@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
@@ -4,9 +4,10 @@ const red = c => c >> 16 & 255;
4
4
 
5
5
  const green = c => c >> 8 & 255;
6
6
 
7
- const blue = c => c & 255;
7
+ const blue = c => c & 255; // From https://raw.githubusercontent.com/deanm/css-color-parser-js/master/csscolorparser.js
8
8
 
9
- const colorMap = {
9
+
10
+ const CSSColorTable = {
10
11
  transparent: Float32Array.of(0, 0, 0, 0),
11
12
  aliceblue: Float32Array.of(240, 248, 255, 1),
12
13
  antiquewhite: Float32Array.of(250, 235, 215, 1),
@@ -157,11 +158,170 @@ const colorMap = {
157
158
  yellow: Float32Array.of(255, 255, 0, 1),
158
159
  yellowgreen: Float32Array.of(154, 205, 50, 1)
159
160
  };
160
- export const Color = (CanvasKit, color) => {
161
+
162
+ const clampCSSByte = j => {
163
+ // Clamp to integer 0 .. 255.
164
+ const i = Math.round(j); // Seems to be what Chrome does (vs truncation).
165
+ // eslint-disable-next-line no-nested-ternary
166
+
167
+ return i < 0 ? 0 : i > 255 ? 255 : i;
168
+ };
169
+
170
+ const clampCSSFloat = f => {
171
+ // eslint-disable-next-line no-nested-ternary
172
+ return f < 0 ? 0 : f > 1 ? 1 : f;
173
+ };
174
+
175
+ const parseCSSInt = str => {
176
+ // int or percentage.
177
+ if (str[str.length - 1] === "%") {
178
+ return clampCSSByte(parseFloat(str) / 100 * 255);
179
+ } // eslint-disable-next-line radix
180
+
181
+
182
+ return clampCSSByte(parseInt(str));
183
+ };
184
+
185
+ const parseCSSFloat = str => {
186
+ if (str === undefined) {
187
+ return 1;
188
+ } // float or percentage.
189
+
190
+
191
+ if (str[str.length - 1] === "%") {
192
+ return clampCSSFloat(parseFloat(str) / 100);
193
+ }
194
+
195
+ return clampCSSFloat(parseFloat(str));
196
+ };
197
+
198
+ const CSSHueToRGB = (m1, m2, h) => {
199
+ if (h < 0) {
200
+ h += 1;
201
+ } else if (h > 1) {
202
+ h -= 1;
203
+ }
204
+
205
+ if (h * 6 < 1) {
206
+ return m1 + (m2 - m1) * h * 6;
207
+ }
208
+
209
+ if (h * 2 < 1) {
210
+ return m2;
211
+ }
212
+
213
+ if (h * 3 < 2) {
214
+ return m1 + (m2 - m1) * (2 / 3 - h) * 6;
215
+ }
216
+
217
+ return m1;
218
+ };
219
+
220
+ const parseCSSColor = cssStr => {
221
+ // Remove all whitespace, not compliant, but should just be more accepting.
222
+ var str = cssStr.replace(/ /g, "").toLowerCase(); // Color keywords (and transparent) lookup.
223
+
224
+ if (str in CSSColorTable) {
225
+ const cl = CSSColorTable[str];
226
+
227
+ if (cl) {
228
+ return Float32Array.of(...cl);
229
+ }
230
+
231
+ return null;
232
+ } // dup.
233
+ // #abc and #abc123 syntax.
234
+
235
+
236
+ if (str[0] === "#") {
237
+ if (str.length === 4) {
238
+ var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
239
+
240
+ if (!(iv >= 0 && iv <= 0xfff)) {
241
+ return null;
242
+ } // Covers NaN.
243
+
244
+
245
+ return [(iv & 0xf00) >> 4 | (iv & 0xf00) >> 8, iv & 0xf0 | (iv & 0xf0) >> 4, iv & 0xf | (iv & 0xf) << 4, 1];
246
+ } else if (str.length === 7) {
247
+ var iv = parseInt(str.substr(1), 16); // TODO(deanm): Stricter parsing.
248
+
249
+ if (!(iv >= 0 && iv <= 0xffffff)) {
250
+ return null;
251
+ } // Covers NaN.
252
+
253
+
254
+ return [(iv & 0xff0000) >> 16, (iv & 0xff00) >> 8, iv & 0xff, 1];
255
+ }
256
+
257
+ return null;
258
+ }
259
+
260
+ var op = str.indexOf("("),
261
+ ep = str.indexOf(")");
262
+
263
+ if (op !== -1 && ep + 1 === str.length) {
264
+ var fname = str.substr(0, op);
265
+ var params = str.substr(op + 1, ep - (op + 1)).split(",");
266
+ var alpha = 1; // To allow case fallthrough.
267
+
268
+ switch (fname) {
269
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
270
+ //@ts-expect-error
271
+ case "rgba":
272
+ if (params.length !== 4) {
273
+ return null;
274
+ }
275
+
276
+ alpha = parseCSSFloat(params.pop());
277
+ // Fall through.
278
+
279
+ case "rgb":
280
+ if (params.length !== 3) {
281
+ return null;
282
+ }
283
+
284
+ return [parseCSSInt(params[0]), parseCSSInt(params[1]), parseCSSInt(params[2]), alpha];
285
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
286
+ //@ts-expect-error
287
+
288
+ case "hsla":
289
+ if (params.length !== 4) {
290
+ return null;
291
+ }
292
+
293
+ alpha = parseCSSFloat(params.pop());
294
+ // Fall through.
295
+
296
+ case "hsl":
297
+ if (params.length !== 3) {
298
+ return null;
299
+ }
300
+
301
+ var h = (parseFloat(params[0]) % 360 + 360) % 360 / 360; // 0 .. 1
302
+ // NOTE(deanm): According to the CSS spec s/l should only be
303
+ // percentages, but we don't bother and let float or percentage.
304
+
305
+ var s = parseCSSFloat(params[1]);
306
+ var l = parseCSSFloat(params[2]);
307
+ var m2 = l <= 0.5 ? l * (s + 1) : l + s - l * s;
308
+ var m1 = l * 2 - m2;
309
+ return [clampCSSByte(CSSHueToRGB(m1, m2, h + 1 / 3) * 255), clampCSSByte(CSSHueToRGB(m1, m2, h) * 255), clampCSSByte(CSSHueToRGB(m1, m2, h - 1 / 3) * 255), alpha];
310
+
311
+ default:
312
+ return null;
313
+ }
314
+ }
315
+
316
+ return null;
317
+ };
318
+
319
+ export const Color = color => {
161
320
  if (color instanceof Float32Array) {
162
321
  return color;
163
322
  } else if (typeof color === "string") {
164
- const rgba = CanvasKit.parseColorString(color, colorMap);
323
+ const r = parseCSSColor(color);
324
+ const rgba = r === null ? CSSColorTable.black : r;
165
325
  return Float32Array.of(rgba[0] / 255, rgba[1] / 255, rgba[2] / 255, rgba[3]);
166
326
  } else {
167
327
  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,CAA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GAAyB,GAA1B,CAFP,EAGLjB,YAAY,CAACc,WAAW,CAACC,EAAD,EAAKC,EAAL,EAASC,CAAC,GAAG,IAAI,CAAjB,CAAX,GAAiC,GAAlC,CAHP,EAILc,KAJK,CAAP;;AAMF;AACE,eAAO,IAAP;AA7CJ;AA+CD;;AAED,SAAO,IAAP;AACD,CA7FD;;AA+FA,OAAO,MAAMI,KAAK,GAAIC,KAAD,IAAgC;AACnD,MAAIA,KAAK,YAAYvL,YAArB,EAAmC;AACjC,WAAOuL,KAAP;AACD,GAFD,MAEO,IAAI,OAAOA,KAAP,KAAiB,QAArB,EAA+B;AACpC,UAAMC,CAAC,GAAGnB,aAAa,CAACkB,KAAD,CAAvB;AACA,UAAME,IAAI,GAAGD,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":["HostObject","JsiSkColorFilter","constructor","CanvasKit","ref"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,gBAAN,SACGD,UADH,CAGP;AACEE,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":["HostObject","JsiSkColorFilter","constructor","CanvasKit","ref"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,gBAAN,SACGD,UADH,CAGP;AACEE,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,37 @@
1
+ import { ckEnum, Host, toValue, NotImplementedOnRNWeb } from "./Host";
2
+ import { JsiSkColorFilter } from "./JsiSkColorFilter";
3
+ export class JsiSkColorFilterFactory extends Host {
4
+ constructor(CanvasKit) {
5
+ super(CanvasKit);
6
+ }
7
+
8
+ MakeMatrix(cMatrix) {
9
+ return new JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeMatrix(cMatrix));
10
+ }
11
+
12
+ MakeBlend(color, mode) {
13
+ return new JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeBlend(toValue(color), ckEnum(mode)));
14
+ }
15
+
16
+ MakeCompose(outer, inner) {
17
+ return new JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeCompose(toValue(outer), toValue(inner)));
18
+ }
19
+
20
+ MakeLerp(t, dst, src) {
21
+ return new JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeLerp(t, toValue(dst), toValue(src)));
22
+ }
23
+
24
+ MakeLinearToSRGBGamma() {
25
+ return new JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeLinearToSRGBGamma());
26
+ }
27
+
28
+ MakeSRGBToLinearGamma() {
29
+ return new JsiSkColorFilter(this.CanvasKit, this.CanvasKit.ColorFilter.MakeSRGBToLinearGamma());
30
+ }
31
+
32
+ MakeLumaColorFilter() {
33
+ throw new NotImplementedOnRNWeb();
34
+ }
35
+
36
+ }
37
+ //# sourceMappingURL=JsiSkColorFilterFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkColorFilterFactory.ts"],"names":["ckEnum","Host","toValue","NotImplementedOnRNWeb","JsiSkColorFilter","JsiSkColorFilterFactory","constructor","CanvasKit","MakeMatrix","cMatrix","ColorFilter","MakeBlend","color","mode","MakeCompose","outer","inner","MakeLerp","t","dst","src","MakeLinearToSRGBGamma","MakeSRGBToLinearGamma","MakeLumaColorFilter"],"mappings":"AAUA,SAASA,MAAT,EAAiBC,IAAjB,EAAuBC,OAAvB,EAAgCC,qBAAhC,QAA6D,QAA7D;AACA,SAASC,gBAAT,QAAiC,oBAAjC;AAEA,OAAO,MAAMC,uBAAN,SACGJ,IADH,CAGP;AACEK,EAAAA,WAAW,CAACC,SAAD,EAAuB;AAChC,UAAMA,SAAN;AACD;;AAEDC,EAAAA,U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,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,31 @@
1
+ import { HostObject } from "./Host";
2
+ import { JsiSkPath } from "./JsiSkPath";
3
+ export class JsiSkContourMeasure extends HostObject {
4
+ constructor(CanvasKit, ref) {
5
+ super(CanvasKit, ref, "ContourMeasure");
6
+ }
7
+
8
+ getPosTan(distance) {
9
+ const [px, py, tx, ty] = this.ref.getPosTan(distance);
10
+ return {
11
+ px,
12
+ py,
13
+ tx,
14
+ ty
15
+ };
16
+ }
17
+
18
+ getSegment(startD, stopD, startWithMoveTo) {
19
+ return new JsiSkPath(this.CanvasKit, this.ref.getSegment(startD, stopD, startWithMoveTo));
20
+ }
21
+
22
+ isClosed() {
23
+ return this.ref.isClosed();
24
+ }
25
+
26
+ length() {
27
+ return this.ref.length();
28
+ }
29
+
30
+ }
31
+ //# sourceMappingURL=JsiSkContourMeasure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkContourMeasure.ts"],"names":["HostObject","JsiSkPath","JsiSkContourMeasure","constructor","CanvasKit","ref","getPosTan","distance","px","py","tx","ty","getSegment","startD","stopD","startWithMoveTo","isClosed","length"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,mBAAN,SACGF,UADH,CAGP;AACEG,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,IAAId,SAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASO,UAAT,CAAoBC,MAApB,EAA4BC,KAA5B,EAAmCC,eAAnC,CAFK,CAAP;AAID;;AAEDC,EAAAA,QAAQ,GAAG;AACT,WAAO,KAAKX,GAAL,CAASW,QAAT,EAAP;AACD;;AAEDC,EAAAA,MAAM,GAAG;AACP,WAAO,KAAKZ,GAAL,CAASY,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,19 @@
1
+ import { HostObject } from "./Host";
2
+ import { JsiSkContourMeasure } from "./JsiSkContourMeasure";
3
+ export class JsiSkContourMeasureIter extends HostObject {
4
+ constructor(CanvasKit, ref) {
5
+ super(CanvasKit, ref, "ContourMeasureIter");
6
+ }
7
+
8
+ next() {
9
+ const result = this.ref.next();
10
+
11
+ if (result === null) {
12
+ return null;
13
+ }
14
+
15
+ return new JsiSkContourMeasure(this.CanvasKit, result);
16
+ }
17
+
18
+ }
19
+ //# sourceMappingURL=JsiSkContourMeasureIter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkContourMeasureIter.ts"],"names":["HostObject","JsiSkContourMeasure","JsiSkContourMeasureIter","constructor","CanvasKit","ref","next","result"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,mBAAT,QAAoC,uBAApC;AAEA,OAAO,MAAMC,uBAAN,SACGF,UADH,CAGP;AACEG,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,IAAIN,mBAAJ,CAAwB,KAAKG,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"]}
@@ -0,0 +1,8 @@
1
+ import { HostObject } from "./Host";
2
+ export class JsiSkData extends HostObject {
3
+ constructor(CanvasKit, ref) {
4
+ super(CanvasKit, ref, "Data");
5
+ }
6
+
7
+ }
8
+ //# sourceMappingURL=JsiSkData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkData.ts"],"names":["HostObject","JsiSkData","constructor","CanvasKit","ref"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAIA,OAAO,MAAMC,SAAN,SAAwBD,UAAxB,CAAmE;AACxEE,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;AAC3C,UAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;AACD;;AAHuE","sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkData } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\ntype Data = ArrayBuffer;\n\nexport class JsiSkData extends HostObject<Data, \"Data\"> implements SkData {\n constructor(CanvasKit: CanvasKit, ref: Data) {\n super(CanvasKit, ref, \"Data\");\n }\n}\n"]}
@@ -0,0 +1,33 @@
1
+ /*global btoa, atob*/
2
+ import { Host } from "./Host";
3
+ import { JsiSkData } from "./JsiSkData";
4
+ export class JsiSkDataFactory extends Host {
5
+ constructor(CanvasKit) {
6
+ super(CanvasKit);
7
+ }
8
+
9
+ fromURI(uri) {
10
+ return fetch(uri).then(response => response.arrayBuffer()).then(data => new JsiSkData(this.CanvasKit, data));
11
+ }
12
+ /**
13
+ * Creates a new Data object from a byte array.
14
+ * @param bytes An array of bytes representing the data
15
+ */
16
+
17
+
18
+ fromBytes(bytes) {
19
+ return new JsiSkData(this.CanvasKit, bytes);
20
+ }
21
+ /**
22
+ * Creates a new Data object from a base64 encoded string.
23
+ * @param base64 A Base64 encoded string representing the data
24
+ */
25
+
26
+
27
+ fromBase64(base64) {
28
+ const bytes = Uint8Array.from(atob(base64), c => c.charCodeAt(0));
29
+ return this.fromBytes(bytes);
30
+ }
31
+
32
+ }
33
+ //# sourceMappingURL=JsiSkDataFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkDataFactory.ts"],"names":["Host","JsiSkData","JsiSkDataFactory","constructor","CanvasKit","fromURI","uri","fetch","then","response","arrayBuffer","data","fromBytes","bytes","fromBase64","base64","Uint8Array","from","atob","c","charCodeAt"],"mappings":"AAAA;AAMA,SAASA,IAAT,QAAqB,QAArB;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,gBAAN,SAA+BF,IAA/B,CAA2D;AAChEG,EAAAA,WAAW,CAACC,SAAD,EAAuB;AAChC,UAAMA,SAAN;AACD;;AAEDC,EAAAA,OAAO,CAACC,GAAD,EAAc;AACnB,WAAOC,KAAK,CAACD,GAAD,CAAL,CACJE,IADI,CACEC,QAAD,IAAcA,QAAQ,CAACC,WAAT,EADf,EAEJF,IAFI,CAEEG,IAAD,IAAU,IAAIV,SAAJ,CAAc,KAAKG,SAAnB,EAA8BO,IAA9B,CAFX,CAAP;AAGD;AACD;AACF;AACA;AACA;;;AACEC,EAAAA,SAAS,CAACC,KAAD,EAAoB;AAC3B,WAAO,IAAIZ,SAAJ,CAAc,KAAKG,SAAnB,EAA8BS,KAA9B,CAAP;AACD;AACD;AACF;AACA;AACA;;;AACEC,EAAAA,UAAU,CAACC,MAAD,EAAyB;AACjC,UAAMF,KAAK,GAAGG,UAAU,CAACC,IAAX,CAAgBC,IAAI,CAACH,MAAD,CAApB,EAA+BI,CAAD,IAAOA,CAAC,CAACC,UAAF,CAAa,CAAb,CAArC,CAAd;AACA,WAAO,KAAKR,SAAL,CAAeC,KAAf,CAAP;AACD;;AAxB+D","sourcesContent":["/*global btoa, atob*/\nimport type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkData } from \"../types\";\nimport type { DataFactory } from \"../types/Data/DataFactory\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkData } from \"./JsiSkData\";\n\nexport class JsiSkDataFactory extends Host implements DataFactory {\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n fromURI(uri: string) {\n return fetch(uri)\n .then((response) => response.arrayBuffer())\n .then((data) => new JsiSkData(this.CanvasKit, data));\n }\n /**\n * Creates a new Data object from a byte array.\n * @param bytes An array of bytes representing the data\n */\n fromBytes(bytes: Uint8Array) {\n return new JsiSkData(this.CanvasKit, bytes);\n }\n /**\n * Creates a new Data object from a base64 encoded string.\n * @param base64 A Base64 encoded string representing the data\n */\n fromBase64(base64: string): SkData {\n const bytes = Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));\n return this.fromBytes(bytes);\n }\n}\n"]}
@@ -0,0 +1,101 @@
1
+ import { HostObject, toValue, ckEnum } from "./Host";
2
+ import { JsiSkRect } from "./JsiSkRect";
3
+ import { JsiSkTypeface } from "./JsiSkTypeface";
4
+ export class JsiSkFont extends HostObject {
5
+ constructor(CanvasKit, ref) {
6
+ super(CanvasKit, ref, "Font");
7
+ }
8
+
9
+ measureText(_text, _paint) {
10
+ console.warn(`measureText() is deprecated an returns an empty rectangle on React Native Web.
11
+ Clients should use "Font.getGlyphWidths" instead (the latter does no shaping)`);
12
+ return new JsiSkRect(this.CanvasKit, this.CanvasKit.XYWHRect(0, 0, 0, 0));
13
+ }
14
+
15
+ getMetrics() {
16
+ const result = this.ref.getMetrics();
17
+ return {
18
+ ascent: result.ascent,
19
+ descent: result.descent,
20
+ leading: result.leading,
21
+ bounds: result.bounds ? new JsiSkRect(this.CanvasKit, result.bounds) : undefined
22
+ };
23
+ }
24
+
25
+ getGlyphIDs(str, numCodePoints) {
26
+ // TODO: Fix return value in the C++ implementation
27
+ return [...this.ref.getGlyphIDs(str, numCodePoints)];
28
+ } // TODO: Fix return value in the C++ implementation, it return float32
29
+
30
+
31
+ getGlyphWidths(glyphs, paint) {
32
+ return [...this.ref.getGlyphWidths(glyphs, paint ? toValue(paint) : null)];
33
+ }
34
+
35
+ getGlyphIntercepts(glyphs, positions, top, bottom) {
36
+ return [...this.ref.getGlyphIntercepts(glyphs, positions.map(p => toValue(p)), top, bottom)];
37
+ }
38
+
39
+ getScaleX() {
40
+ return this.ref.getScaleX();
41
+ }
42
+
43
+ getSize() {
44
+ return this.ref.getSize();
45
+ }
46
+
47
+ getSkewX() {
48
+ return this.ref.getSkewX();
49
+ }
50
+
51
+ isEmbolden() {
52
+ return this.ref.isEmbolden();
53
+ }
54
+
55
+ getTypeface() {
56
+ const tf = this.ref.getTypeface();
57
+ return tf ? new JsiSkTypeface(this.CanvasKit, tf) : null;
58
+ }
59
+
60
+ setEdging(edging) {
61
+ this.ref.setEdging(ckEnum(edging));
62
+ }
63
+
64
+ setEmbeddedBitmaps(embeddedBitmaps) {
65
+ this.ref.setEmbeddedBitmaps(embeddedBitmaps);
66
+ }
67
+
68
+ setHinting(hinting) {
69
+ this.ref.setHinting(ckEnum(hinting));
70
+ }
71
+
72
+ setLinearMetrics(linearMetrics) {
73
+ this.ref.setLinearMetrics(linearMetrics);
74
+ }
75
+
76
+ setScaleX(sx) {
77
+ this.ref.setScaleX(sx);
78
+ }
79
+
80
+ setSize(points) {
81
+ this.ref.setSize(points);
82
+ }
83
+
84
+ setSkewX(sx) {
85
+ this.ref.setSkewX(sx);
86
+ }
87
+
88
+ setEmbolden(embolden) {
89
+ this.ref.setEmbolden(embolden);
90
+ }
91
+
92
+ setSubpixel(subpixel) {
93
+ this.ref.setSubpixel(subpixel);
94
+ }
95
+
96
+ setTypeface(face) {
97
+ this.ref.setTypeface(face ? toValue(face) : null);
98
+ }
99
+
100
+ }
101
+ //# sourceMappingURL=JsiSkFont.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkFont.ts"],"names":["HostObject","toValue","ckEnum","JsiSkRect","JsiSkTypeface","JsiSkFont","constructor","CanvasKit","ref","measureText","_text","_paint","console","warn","XYWHRect","getMetrics","result","ascent","descent","leading","bounds","undefined","getGlyphIDs","str","numCodePoints","getGlyphWidths","glyphs","paint","getGlyphIntercepts","positions","top","bottom","map","p","getScaleX","getSize","getSkewX","isEmbolden","getTypeface","tf","setEdging","edging","setEmbeddedBitmaps","embeddedBitmaps","setHinting","hinting","setLinearMetrics","linearMetrics","setScaleX","sx","setSize","points","setSkewX","setEmbolden","embolden","setSubpixel","subpixel","setTypeface","face"],"mappings":"AAYA,SAASA,UAAT,EAAqBC,OAArB,EAA8BC,MAA9B,QAA4C,QAA5C;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,aAAT,QAA8B,iBAA9B;AAEA,OAAO,MAAMC,SAAN,SAAwBL,UAAxB,CAAmE;AACxEM,EAAAA,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;AAC3C,UAAMD,SAAN,EAAiBC,GAAjB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EAAD,EAAa;AACnB,SAAKzC,GAAL,CAAS4C,QAAT,CAAkBH,EAAlB;AACD;;AAEDI,EAAAA,WAAW,CAACC,QAAD,EAAoB;AAC7B,SAAK9C,GAAL,CAAS6C,WAAT,CAAqBC,QAArB;AACD;;AAEDC,EAAAA,WAAW,CAACC,QAAD,EAAoB;AAC7B,SAAKhD,GAAL,CAAS+C,WAAT,CAAqBC,QAArB;AACD;;AAEDC,EAAAA,WAAW,CAACC,IAAD,EAA0B;AACnC,SAAKlD,GAAL,CAASiD,WAAT,CAAqBC,IAAI,GAAGzD,OAAO,CAACyD,IAAD,CAAV,GAAmB,IAA5C;AACD;;AA9GuE","sourcesContent":["import type { CanvasKit, Font } from \"canvaskit-wasm\";\n\nimport type {\n FontEdging,\n FontHinting,\n SkFont,\n SkPaint,\n SkPoint,\n SkRect,\n SkTypeface,\n} from \"../types\";\n\nimport { HostObject, toValue, ckEnum } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\n\nexport class JsiSkFont extends HostObject<Font, \"Font\"> implements SkFont {\n constructor(CanvasKit: CanvasKit, ref: Font) {\n super(CanvasKit, ref, \"Font\");\n }\n\n measureText(_text: string, _paint?: SkPaint): SkRect {\n console.warn(\n `measureText() is deprecated an returns an empty rectangle on React Native Web.\nClients should use \"Font.getGlyphWidths\" instead (the latter does no shaping)`\n );\n return new JsiSkRect(this.CanvasKit, this.CanvasKit.XYWHRect(0, 0, 0, 0));\n }\n\n getMetrics() {\n const result = this.ref.getMetrics();\n return {\n ascent: result.ascent,\n descent: result.descent,\n leading: result.leading,\n bounds: result.bounds\n ? new JsiSkRect(this.CanvasKit, result.bounds)\n : undefined,\n };\n }\n\n getGlyphIDs(str: string, numCodePoints?: number) {\n // TODO: Fix return value in the C++ implementation\n return [...this.ref.getGlyphIDs(str, numCodePoints)];\n }\n\n // TODO: Fix return value in the C++ implementation, it return float32\n getGlyphWidths(glyphs: number[], paint?: SkPaint | null) {\n return [...this.ref.getGlyphWidths(glyphs, paint ? toValue(paint) : null)];\n }\n\n getGlyphIntercepts(\n glyphs: number[],\n positions: SkPoint[],\n top: number,\n bottom: number\n ) {\n return [\n ...this.ref.getGlyphIntercepts(\n glyphs,\n positions.map((p) => toValue(p)),\n top,\n bottom\n ),\n ];\n }\n\n getScaleX() {\n return this.ref.getScaleX();\n }\n\n getSize() {\n return this.ref.getSize();\n }\n\n getSkewX() {\n return this.ref.getSkewX();\n }\n\n isEmbolden() {\n return this.ref.isEmbolden();\n }\n\n getTypeface() {\n const tf = this.ref.getTypeface();\n return tf ? new JsiSkTypeface(this.CanvasKit, tf) : null;\n }\n\n setEdging(edging: FontEdging) {\n this.ref.setEdging(ckEnum(edging));\n }\n\n setEmbeddedBitmaps(embeddedBitmaps: boolean) {\n this.ref.setEmbeddedBitmaps(embeddedBitmaps);\n }\n\n setHinting(hinting: FontHinting) {\n this.ref.setHinting(ckEnum(hinting));\n }\n\n setLinearMetrics(linearMetrics: boolean) {\n this.ref.setLinearMetrics(linearMetrics);\n }\n\n setScaleX(sx: number) {\n this.ref.setScaleX(sx);\n }\n\n setSize(points: number) {\n this.ref.setSize(points);\n }\n\n setSkewX(sx: number) {\n this.ref.setSkewX(sx);\n }\n\n setEmbolden(embolden: boolean) {\n this.ref.setEmbolden(embolden);\n }\n\n setSubpixel(subpixel: boolean) {\n this.ref.setSubpixel(subpixel);\n }\n\n setTypeface(face: SkTypeface | null) {\n this.ref.setTypeface(face ? toValue(face) : null);\n }\n}\n"]}
@@ -0,0 +1,23 @@
1
+ import { HostObject } from "./Host";
2
+ export class JsiSkFontMgr extends HostObject {
3
+ constructor(CanvasKit) {
4
+ super(CanvasKit, null, "FontMgr");
5
+ }
6
+
7
+ countFamilies() {
8
+ console.warn("countFamilies() is deprecated. It returns 0 on React Native Web");
9
+ return 0;
10
+ }
11
+
12
+ getFamilyName(_index) {
13
+ console.warn("getFamilyName() is deprecated. It returns an empty string on React Native Web");
14
+ return "";
15
+ }
16
+
17
+ matchFamilyStyle(_familyName, _fontStyle) {
18
+ console.warn("matchFamilyStyle() is deprecated. It returns null on React Native Web");
19
+ return null;
20
+ }
21
+
22
+ }
23
+ //# sourceMappingURL=JsiSkFontMgr.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkFontMgr.ts"],"names":["HostObject","JsiSkFontMgr","constructor","CanvasKit","countFamilies","console","warn","getFamilyName","_index","matchFamilyStyle","_familyName","_fontStyle"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,YAAN,SACGD,UADH,CAGP;AACEE,EAAAA,WAAW,CAACC,SAAD,EAAuB;AAChC,UAAMA,SAAN,EAAiB,IAAjB,EAAuB,SAAvB;AACD;;AAEDC,EAAAA,aAAa,GAAG;AACdC,IAAAA,OAAO,CAACC,IAAR,CACE,iEADF;AAGA,WAAO,CAAP;AACD;;AAEDC,EAAAA,aAAa,CAACC,MAAD,EAAiB;AAC5BH,IAAAA,OAAO,CAACC,IAAR,CACE,+EADF;AAGA,WAAO,EAAP;AACD;;AAEDG,EAAAA,gBAAgB,CACdC,WADc,EAEdC,UAFc,EAGK;AACnBN,IAAAA,OAAO,CAACC,IAAR,CACE,uEADF;AAGA,WAAO,IAAP;AACD;;AA3BH","sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { FontStyle, SkFontMgr, SkTypeface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkFontMgr\n extends HostObject<null, \"FontMgr\">\n implements SkFontMgr\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit, null, \"FontMgr\");\n }\n\n countFamilies() {\n console.warn(\n \"countFamilies() is deprecated. It returns 0 on React Native Web\"\n );\n return 0;\n }\n\n getFamilyName(_index: number) {\n console.warn(\n \"getFamilyName() is deprecated. It returns an empty string on React Native Web\"\n );\n return \"\";\n }\n\n matchFamilyStyle(\n _familyName: string,\n _fontStyle?: FontStyle\n ): SkTypeface | null {\n console.warn(\n \"matchFamilyStyle() is deprecated. It returns null on React Native Web\"\n );\n return null;\n }\n}\n"]}
@@ -0,0 +1,14 @@
1
+ /*global atob*/
2
+ import { Host } from "./Host";
3
+ import { JsiSkFontMgr } from "./JsiSkFontMgr";
4
+ export class JsiSkFontMgrFactory extends Host {
5
+ constructor(CanvasKit) {
6
+ super(CanvasKit);
7
+ }
8
+
9
+ RefDefault() {
10
+ return new JsiSkFontMgr(this.CanvasKit);
11
+ }
12
+
13
+ }
14
+ //# sourceMappingURL=JsiSkFontMgrFactory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["JsiSkFontMgrFactory.ts"],"names":["Host","JsiSkFontMgr","JsiSkFontMgrFactory","constructor","CanvasKit","RefDefault"],"mappings":"AAAA;AAMA,SAASA,IAAT,QAAqB,QAArB;AACA,SAASC,YAAT,QAA6B,gBAA7B;AAEA,OAAO,MAAMC,mBAAN,SAAkCF,IAAlC,CAAiE;AACtEG,EAAAA,WAAW,CAACC,SAAD,EAAuB;AAChC,UAAMA,SAAN;AACD;;AAEDC,EAAAA,UAAU,GAAc;AACtB,WAAO,IAAIJ,YAAJ,CAAiB,KAAKG,SAAtB,CAAP;AACD;;AAPqE","sourcesContent":["/*global atob*/\nimport type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkFontMgr } from \"../types\";\nimport type { FontMgrFactory } from \"../types/FontMgr/FontMgrFactory\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkFontMgr } from \"./JsiSkFontMgr\";\n\nexport class JsiSkFontMgrFactory extends Host implements FontMgrFactory {\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n RefDefault(): SkFontMgr {\n return new JsiSkFontMgr(this.CanvasKit);\n }\n}\n"]}