@shopify/react-native-skia 0.1.191 → 0.1.192

Sign up to get free protection for your applications and to get access to all the features.
Files changed (317) hide show
  1. package/cpp/api/JsiSkColorFilter.h +2 -17
  2. package/cpp/api/JsiSkContourMeasure.h +3 -17
  3. package/cpp/api/JsiSkContourMeasureIter.h +3 -18
  4. package/cpp/api/JsiSkData.h +1 -18
  5. package/cpp/api/JsiSkFont.h +4 -14
  6. package/cpp/api/JsiSkHostObjects.h +85 -10
  7. package/cpp/api/JsiSkImage.h +1 -12
  8. package/cpp/api/JsiSkImageFilter.h +1 -17
  9. package/cpp/api/JsiSkMaskFilter.h +1 -17
  10. package/cpp/api/JsiSkMatrix.h +3 -6
  11. package/cpp/api/JsiSkPaint.h +3 -15
  12. package/cpp/api/JsiSkPath.h +2 -15
  13. package/cpp/api/JsiSkPathEffect.h +2 -17
  14. package/cpp/api/JsiSkPicture.h +4 -18
  15. package/cpp/api/JsiSkPictureRecorder.h +4 -1
  16. package/cpp/api/JsiSkPoint.h +6 -1
  17. package/cpp/api/JsiSkRRect.h +6 -1
  18. package/cpp/api/JsiSkRSXform.h +4 -6
  19. package/cpp/api/JsiSkRect.h +6 -2
  20. package/cpp/api/JsiSkRuntimeEffect.h +4 -7
  21. package/cpp/api/JsiSkRuntimeShaderBuilder.h +2 -10
  22. package/cpp/api/JsiSkSVG.h +1 -10
  23. package/cpp/api/JsiSkShader.h +2 -16
  24. package/cpp/api/JsiSkSurface.h +3 -16
  25. package/cpp/api/JsiSkTextBlob.h +2 -18
  26. package/cpp/api/JsiSkTypeface.h +1 -22
  27. package/cpp/api/JsiSkVertices.h +3 -17
  28. package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -2
  29. package/cpp/rnskia/values/RNSkValue.h +1 -1
  30. package/lib/commonjs/renderer/Canvas.js +17 -1
  31. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  32. package/lib/commonjs/skia/core/Data.d.ts +2 -2
  33. package/lib/commonjs/skia/core/Data.js.map +1 -1
  34. package/lib/commonjs/skia/types/Data/Data.d.ts +2 -2
  35. package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
  36. package/lib/commonjs/skia/types/Image/Image.d.ts +2 -2
  37. package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
  38. package/lib/commonjs/skia/types/JsiInstance.d.ts +4 -4
  39. package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
  40. package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -2
  41. package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
  42. package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -2
  43. package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
  44. package/lib/commonjs/skia/web/Host.d.ts +1 -0
  45. package/lib/commonjs/skia/web/Host.js +2 -0
  46. package/lib/commonjs/skia/web/Host.js.map +1 -1
  47. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +1 -0
  48. package/lib/commonjs/skia/web/JsiSkCanvas.js +6 -0
  49. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  50. package/lib/commonjs/skia/web/JsiSkColorFilter.d.ts +1 -0
  51. package/lib/commonjs/skia/web/JsiSkColorFilter.js +6 -0
  52. package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
  53. package/lib/commonjs/skia/web/JsiSkContourMeasure.d.ts +1 -0
  54. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +6 -0
  55. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
  56. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  57. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +6 -0
  58. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  59. package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -1
  60. package/lib/commonjs/skia/web/JsiSkData.js +4 -2
  61. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
  62. package/lib/commonjs/skia/web/JsiSkFont.d.ts +1 -0
  63. package/lib/commonjs/skia/web/JsiSkFont.js +6 -0
  64. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
  65. package/lib/commonjs/skia/web/JsiSkImage.d.ts +1 -1
  66. package/lib/commonjs/skia/web/JsiSkImage.js +6 -4
  67. package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
  68. package/lib/commonjs/skia/web/JsiSkImageFilter.d.ts +1 -0
  69. package/lib/commonjs/skia/web/JsiSkImageFilter.js +6 -0
  70. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
  71. package/lib/commonjs/skia/web/JsiSkMaskFilter.d.ts +1 -0
  72. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +6 -0
  73. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
  74. package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +1 -0
  75. package/lib/commonjs/skia/web/JsiSkMatrix.js +5 -0
  76. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
  77. package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
  78. package/lib/commonjs/skia/web/JsiSkPaint.js +6 -0
  79. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  80. package/lib/commonjs/skia/web/JsiSkPath.d.ts +1 -0
  81. package/lib/commonjs/skia/web/JsiSkPath.js +6 -0
  82. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  83. package/lib/commonjs/skia/web/JsiSkPathEffect.d.ts +1 -0
  84. package/lib/commonjs/skia/web/JsiSkPathEffect.js +6 -0
  85. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
  86. package/lib/commonjs/skia/web/JsiSkPicture.d.ts +1 -0
  87. package/lib/commonjs/skia/web/JsiSkPicture.js +6 -1
  88. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
  89. package/lib/commonjs/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  90. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +6 -0
  91. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
  92. package/lib/commonjs/skia/web/JsiSkPoint.d.ts +1 -0
  93. package/lib/commonjs/skia/web/JsiSkPoint.js +5 -0
  94. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
  95. package/lib/commonjs/skia/web/JsiSkRRect.d.ts +1 -0
  96. package/lib/commonjs/skia/web/JsiSkRRect.js +5 -0
  97. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  98. package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +1 -0
  99. package/lib/commonjs/skia/web/JsiSkRSXform.js +5 -0
  100. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
  101. package/lib/commonjs/skia/web/JsiSkRect.d.ts +1 -0
  102. package/lib/commonjs/skia/web/JsiSkRect.js +5 -0
  103. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
  104. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  105. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -0
  106. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  107. package/lib/commonjs/skia/web/JsiSkShader.d.ts +1 -0
  108. package/lib/commonjs/skia/web/JsiSkShader.js +6 -0
  109. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
  110. package/lib/commonjs/skia/web/JsiSkSurface.d.ts +1 -0
  111. package/lib/commonjs/skia/web/JsiSkSurface.js +6 -0
  112. package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
  113. package/lib/commonjs/skia/web/JsiSkTextBlob.d.ts +1 -0
  114. package/lib/commonjs/skia/web/JsiSkTextBlob.js +6 -0
  115. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
  116. package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +1 -1
  117. package/lib/commonjs/skia/web/JsiSkTypeface.js +6 -4
  118. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
  119. package/lib/commonjs/skia/web/JsiSkVertices.d.ts +1 -0
  120. package/lib/commonjs/skia/web/JsiSkVertices.js +6 -0
  121. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
  122. package/lib/commonjs/values/hooks/useComputedValue.js +1 -1
  123. package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
  124. package/lib/commonjs/values/types.d.ts +1 -1
  125. package/lib/commonjs/values/types.js.map +1 -1
  126. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +1 -1
  127. package/lib/commonjs/values/web/RNSkComputedValue.js +1 -1
  128. package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -1
  129. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +1 -1
  130. package/lib/commonjs/values/web/RNSkReadonlyValue.js +1 -1
  131. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
  132. package/lib/commonjs/views/SkiaDomView.web.js +14 -4
  133. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  134. package/lib/commonjs/views/types.d.ts +2 -1
  135. package/lib/commonjs/views/types.js.map +1 -1
  136. package/lib/module/renderer/Canvas.js +15 -1
  137. package/lib/module/renderer/Canvas.js.map +1 -1
  138. package/lib/module/skia/core/Data.d.ts +2 -2
  139. package/lib/module/skia/core/Data.js.map +1 -1
  140. package/lib/module/skia/types/Data/Data.d.ts +2 -2
  141. package/lib/module/skia/types/Data/Data.js.map +1 -1
  142. package/lib/module/skia/types/Image/Image.d.ts +2 -2
  143. package/lib/module/skia/types/Image/Image.js.map +1 -1
  144. package/lib/module/skia/types/JsiInstance.d.ts +4 -4
  145. package/lib/module/skia/types/JsiInstance.js.map +1 -1
  146. package/lib/module/skia/types/SVG/SVG.d.ts +2 -2
  147. package/lib/module/skia/types/SVG/SVG.js.map +1 -1
  148. package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -2
  149. package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
  150. package/lib/module/skia/web/Host.d.ts +1 -0
  151. package/lib/module/skia/web/Host.js +2 -0
  152. package/lib/module/skia/web/Host.js.map +1 -1
  153. package/lib/module/skia/web/JsiSkCanvas.d.ts +1 -0
  154. package/lib/module/skia/web/JsiSkCanvas.js +6 -0
  155. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  156. package/lib/module/skia/web/JsiSkColorFilter.d.ts +1 -0
  157. package/lib/module/skia/web/JsiSkColorFilter.js +6 -0
  158. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  159. package/lib/module/skia/web/JsiSkContourMeasure.d.ts +1 -0
  160. package/lib/module/skia/web/JsiSkContourMeasure.js +6 -0
  161. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  162. package/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  163. package/lib/module/skia/web/JsiSkContourMeasureIter.js +6 -0
  164. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  165. package/lib/module/skia/web/JsiSkData.d.ts +1 -1
  166. package/lib/module/skia/web/JsiSkData.js +4 -2
  167. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  168. package/lib/module/skia/web/JsiSkFont.d.ts +1 -0
  169. package/lib/module/skia/web/JsiSkFont.js +6 -0
  170. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  171. package/lib/module/skia/web/JsiSkImage.d.ts +1 -1
  172. package/lib/module/skia/web/JsiSkImage.js +6 -4
  173. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  174. package/lib/module/skia/web/JsiSkImageFilter.d.ts +1 -0
  175. package/lib/module/skia/web/JsiSkImageFilter.js +6 -0
  176. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  177. package/lib/module/skia/web/JsiSkMaskFilter.d.ts +1 -0
  178. package/lib/module/skia/web/JsiSkMaskFilter.js +6 -0
  179. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  180. package/lib/module/skia/web/JsiSkMatrix.d.ts +1 -0
  181. package/lib/module/skia/web/JsiSkMatrix.js +5 -0
  182. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  183. package/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  184. package/lib/module/skia/web/JsiSkPaint.js +6 -0
  185. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  186. package/lib/module/skia/web/JsiSkPath.d.ts +1 -0
  187. package/lib/module/skia/web/JsiSkPath.js +6 -0
  188. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  189. package/lib/module/skia/web/JsiSkPathEffect.d.ts +1 -0
  190. package/lib/module/skia/web/JsiSkPathEffect.js +6 -0
  191. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  192. package/lib/module/skia/web/JsiSkPicture.d.ts +1 -0
  193. package/lib/module/skia/web/JsiSkPicture.js +6 -0
  194. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  195. package/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  196. package/lib/module/skia/web/JsiSkPictureRecorder.js +6 -0
  197. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  198. package/lib/module/skia/web/JsiSkPoint.d.ts +1 -0
  199. package/lib/module/skia/web/JsiSkPoint.js +5 -0
  200. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  201. package/lib/module/skia/web/JsiSkRRect.d.ts +1 -0
  202. package/lib/module/skia/web/JsiSkRRect.js +5 -0
  203. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  204. package/lib/module/skia/web/JsiSkRSXform.d.ts +1 -0
  205. package/lib/module/skia/web/JsiSkRSXform.js +5 -0
  206. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  207. package/lib/module/skia/web/JsiSkRect.d.ts +1 -0
  208. package/lib/module/skia/web/JsiSkRect.js +5 -0
  209. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  210. package/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  211. package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -0
  212. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  213. package/lib/module/skia/web/JsiSkShader.d.ts +1 -0
  214. package/lib/module/skia/web/JsiSkShader.js +6 -0
  215. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  216. package/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
  217. package/lib/module/skia/web/JsiSkSurface.js +6 -0
  218. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  219. package/lib/module/skia/web/JsiSkTextBlob.d.ts +1 -0
  220. package/lib/module/skia/web/JsiSkTextBlob.js +6 -0
  221. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  222. package/lib/module/skia/web/JsiSkTypeface.d.ts +1 -1
  223. package/lib/module/skia/web/JsiSkTypeface.js +6 -4
  224. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  225. package/lib/module/skia/web/JsiSkVertices.d.ts +1 -0
  226. package/lib/module/skia/web/JsiSkVertices.js +6 -0
  227. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  228. package/lib/module/values/hooks/useComputedValue.js +1 -1
  229. package/lib/module/values/hooks/useComputedValue.js.map +1 -1
  230. package/lib/module/values/types.d.ts +1 -1
  231. package/lib/module/values/types.js.map +1 -1
  232. package/lib/module/values/web/RNSkComputedValue.d.ts +1 -1
  233. package/lib/module/values/web/RNSkComputedValue.js +1 -1
  234. package/lib/module/values/web/RNSkComputedValue.js.map +1 -1
  235. package/lib/module/values/web/RNSkReadonlyValue.d.ts +1 -1
  236. package/lib/module/values/web/RNSkReadonlyValue.js +1 -1
  237. package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
  238. package/lib/module/views/SkiaDomView.web.js +13 -4
  239. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  240. package/lib/module/views/types.d.ts +2 -1
  241. package/lib/module/views/types.js.map +1 -1
  242. package/lib/typescript/src/skia/core/Data.d.ts +2 -2
  243. package/lib/typescript/src/skia/types/Data/Data.d.ts +2 -2
  244. package/lib/typescript/src/skia/types/Image/Image.d.ts +2 -2
  245. package/lib/typescript/src/skia/types/JsiInstance.d.ts +4 -4
  246. package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -2
  247. package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +2 -2
  248. package/lib/typescript/src/skia/web/Host.d.ts +1 -0
  249. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +1 -0
  250. package/lib/typescript/src/skia/web/JsiSkColorFilter.d.ts +1 -0
  251. package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +1 -0
  252. package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  253. package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -1
  254. package/lib/typescript/src/skia/web/JsiSkFont.d.ts +1 -0
  255. package/lib/typescript/src/skia/web/JsiSkImage.d.ts +1 -1
  256. package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +1 -0
  257. package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +1 -0
  258. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +1 -0
  259. package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
  260. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +1 -0
  261. package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +1 -0
  262. package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +1 -0
  263. package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  264. package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +1 -0
  265. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +1 -0
  266. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +1 -0
  267. package/lib/typescript/src/skia/web/JsiSkRect.d.ts +1 -0
  268. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  269. package/lib/typescript/src/skia/web/JsiSkShader.d.ts +1 -0
  270. package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +1 -0
  271. package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +1 -0
  272. package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +1 -1
  273. package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +1 -0
  274. package/lib/typescript/src/values/types.d.ts +1 -1
  275. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +1 -1
  276. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +1 -1
  277. package/lib/typescript/src/views/types.d.ts +2 -1
  278. package/package.json +1 -1
  279. package/src/renderer/Canvas.tsx +21 -1
  280. package/src/skia/core/Data.ts +3 -3
  281. package/src/skia/types/Data/Data.ts +2 -2
  282. package/src/skia/types/Image/Image.ts +2 -2
  283. package/src/skia/types/JsiInstance.ts +4 -4
  284. package/src/skia/types/SVG/SVG.ts +2 -2
  285. package/src/skia/types/Typeface/Typeface.ts +2 -2
  286. package/src/skia/web/Host.ts +2 -0
  287. package/src/skia/web/JsiSkCanvas.ts +4 -0
  288. package/src/skia/web/JsiSkColorFilter.ts +4 -0
  289. package/src/skia/web/JsiSkContourMeasure.ts +4 -0
  290. package/src/skia/web/JsiSkContourMeasureIter.ts +4 -0
  291. package/src/skia/web/JsiSkData.ts +3 -3
  292. package/src/skia/web/JsiSkFont.ts +4 -0
  293. package/src/skia/web/JsiSkImage.ts +2 -2
  294. package/src/skia/web/JsiSkImageFilter.ts +4 -0
  295. package/src/skia/web/JsiSkMaskFilter.ts +4 -0
  296. package/src/skia/web/JsiSkMatrix.ts +4 -0
  297. package/src/skia/web/JsiSkPaint.ts +4 -0
  298. package/src/skia/web/JsiSkPath.ts +4 -0
  299. package/src/skia/web/JsiSkPathEffect.ts +4 -0
  300. package/src/skia/web/JsiSkPicture.ts +4 -0
  301. package/src/skia/web/JsiSkPictureRecorder.ts +4 -0
  302. package/src/skia/web/JsiSkPoint.ts +4 -0
  303. package/src/skia/web/JsiSkRRect.ts +4 -0
  304. package/src/skia/web/JsiSkRSXform.ts +4 -0
  305. package/src/skia/web/JsiSkRect.ts +4 -0
  306. package/src/skia/web/JsiSkRuntimeEffect.ts +4 -0
  307. package/src/skia/web/JsiSkShader.ts +4 -0
  308. package/src/skia/web/JsiSkSurface.ts +4 -0
  309. package/src/skia/web/JsiSkTextBlob.ts +4 -0
  310. package/src/skia/web/JsiSkTypeface.ts +2 -2
  311. package/src/skia/web/JsiSkVertices.ts +4 -0
  312. package/src/values/hooks/useComputedValue.ts +1 -1
  313. package/src/values/types.ts +1 -1
  314. package/src/values/web/RNSkComputedValue.ts +1 -1
  315. package/src/values/web/RNSkReadonlyValue.ts +1 -1
  316. package/src/views/SkiaDomView.web.tsx +6 -1
  317. package/src/views/types.ts +2 -1
@@ -26,6 +26,10 @@ export class JsiSkPaint extends HostObject<Paint, "Paint"> implements SkPaint {
26
26
  super(CanvasKit, ref, "Paint");
27
27
  }
28
28
 
29
+ dispose = () => {
30
+ this.ref.delete();
31
+ };
32
+
29
33
  copy() {
30
34
  return new JsiSkPaint(this.CanvasKit, this.ref.copy());
31
35
  }
@@ -33,6 +33,10 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
33
33
  super(CanvasKit, ref, "Path");
34
34
  }
35
35
 
36
+ dispose = () => {
37
+ this.ref.delete();
38
+ };
39
+
36
40
  addPath(src: SkPath, matrix?: SkMatrix, extend = false) {
37
41
  const args = [
38
42
  JsiSkPath.fromValue(src),
@@ -11,4 +11,8 @@ export class JsiSkPathEffect
11
11
  constructor(CanvasKit: CanvasKit, ref: PathEffect) {
12
12
  super(CanvasKit, ref, "PathEffect");
13
13
  }
14
+
15
+ dispose = () => {
16
+ this.ref.delete();
17
+ };
14
18
  }
@@ -22,6 +22,10 @@ export class JsiSkPicture
22
22
  super(CanvasKit, ref, "Picture");
23
23
  }
24
24
 
25
+ dispose = () => {
26
+ this.ref.delete();
27
+ };
28
+
25
29
  makeShader(
26
30
  tmx: TileMode,
27
31
  tmy: TileMode,
@@ -16,6 +16,10 @@ export class JsiSkPictureRecorder
16
16
  super(CanvasKit, ref, "PictureRecorder");
17
17
  }
18
18
 
19
+ dispose = () => {
20
+ this.ref.delete();
21
+ };
22
+
19
23
  beginRecording(bounds: SkRect) {
20
24
  return new JsiSkCanvas(
21
25
  this.CanvasKit,
@@ -19,6 +19,10 @@ export class JsiSkPoint
19
19
  super(CanvasKit, ref, "Point");
20
20
  }
21
21
 
22
+ dispose = () => {
23
+ // Float32Array
24
+ };
25
+
22
26
  get x() {
23
27
  return this.ref[0];
24
28
  }
@@ -9,6 +9,10 @@ export class JsiSkRRect
9
9
  extends BaseHostObject<RRect, "RRect">
10
10
  implements SkRRect
11
11
  {
12
+ dispose = () => {
13
+ // Float32Array
14
+ };
15
+
12
16
  static fromValue(CanvasKit: CanvasKit, rect: SkRRect) {
13
17
  if (rect instanceof JsiSkRect) {
14
18
  return rect.ref;
@@ -13,4 +13,8 @@ export class JsiSkRSXform
13
13
  constructor(CanvasKit: CanvasKit, ref: RSXform) {
14
14
  super(CanvasKit, ref, "RSXform");
15
15
  }
16
+
17
+ dispose = () => {
18
+ // Do nothing in the web implementation
19
+ };
16
20
  }
@@ -12,6 +12,10 @@ export class JsiSkRect extends BaseHostObject<Rect, "Rect"> implements SkRect {
12
12
  return CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height);
13
13
  }
14
14
 
15
+ dispose = () => {
16
+ // Float32Array
17
+ };
18
+
15
19
  constructor(CanvasKit: CanvasKit, ref: Rect) {
16
20
  super(CanvasKit, ref, "Rect");
17
21
  }
@@ -15,6 +15,10 @@ export class JsiSkRuntimeEffect
15
15
  super(CanvasKit, ref, "RuntimeEffect");
16
16
  }
17
17
 
18
+ dispose = () => {
19
+ this.ref.delete();
20
+ };
21
+
18
22
  source() {
19
23
  return this.sksl;
20
24
  }
@@ -11,4 +11,8 @@ export class JsiSkShader
11
11
  constructor(CanvasKit: CanvasKit, ref: Shader) {
12
12
  super(CanvasKit, ref, "Shader");
13
13
  }
14
+
15
+ dispose = () => {
16
+ this.ref.delete();
17
+ };
14
18
  }
@@ -15,6 +15,10 @@ export class JsiSkSurface
15
15
  super(CanvasKit, ref, "Surface");
16
16
  }
17
17
 
18
+ dispose = () => {
19
+ this.ref.delete();
20
+ };
21
+
18
22
  flush() {
19
23
  this.ref.flush();
20
24
  }
@@ -11,4 +11,8 @@ export class JsiSkTextBlob
11
11
  constructor(CanvasKit: CanvasKit, ref: TextBlob) {
12
12
  super(CanvasKit, ref, "TextBlob");
13
13
  }
14
+
15
+ dispose = () => {
16
+ this.ref.delete();
17
+ };
14
18
  }
@@ -26,7 +26,7 @@ export class JsiSkTypeface
26
26
  return false;
27
27
  }
28
28
 
29
- dispose() {
29
+ dispose = () => {
30
30
  this.ref.delete();
31
- }
31
+ };
32
32
  }
@@ -13,6 +13,10 @@ export class JsiSkVertices
13
13
  super(CanvasKit, ref, "Vertices");
14
14
  }
15
15
 
16
+ dispose = () => {
17
+ this.ref.delete();
18
+ };
19
+
16
20
  bounds() {
17
21
  return new JsiSkRect(this.CanvasKit, this.ref.bounds());
18
22
  }
@@ -16,6 +16,6 @@ export const useComputedValue = <R>(cb: () => R, values: unknown[]) => {
16
16
  // eslint-disable-next-line react-hooks/exhaustive-deps
17
17
  values
18
18
  );
19
- useEffect(() => () => value.__invalidate(), [value]);
19
+ useEffect(() => () => value.dispose(), [value]);
20
20
  return value;
21
21
  };
@@ -11,7 +11,7 @@ export interface SkiaValue<T = number> {
11
11
  /**
12
12
  * Invalidates the value. Has different meaning depending on the type of the value.
13
13
  */
14
- __invalidate: () => void;
14
+ dispose: () => void;
15
15
  /**
16
16
  * Field to make typechecking easier
17
17
  */
@@ -42,7 +42,7 @@ export class RNSkComputedValue<T> extends RNSkReadonlyValue<T> {
42
42
  this._unsubscribers = [];
43
43
  }
44
44
 
45
- public __invalidate(): void {
45
+ public dispose(): void {
46
46
  this._unsubscribers.forEach((unsubscribe) => unsubscribe());
47
47
  this._unsubscribers = [];
48
48
  }
@@ -32,7 +32,7 @@ export class RNSkReadonlyValue<T> implements SkiaValue<T> {
32
32
  };
33
33
  }
34
34
 
35
- public __invalidate(): void {
35
+ public dispose(): void {
36
36
  this._listeners = [];
37
37
  }
38
38
  }
@@ -1,6 +1,7 @@
1
1
  import { Skia } from "../skia";
2
2
  import type { SkCanvas } from "../skia/types";
3
3
  import { JsiDrawingContext } from "../dom/types/DrawingContext";
4
+ import { isValue } from "../renderer/processors/Animations/Animations";
4
5
 
5
6
  import { SkiaBaseWebView } from "./SkiaBaseWebView";
6
7
  import type { SkiaDomViewProps, TouchInfo } from "./types";
@@ -16,7 +17,11 @@ export class SkiaDomView extends SkiaBaseWebView<SkiaDomViewProps> {
16
17
  }
17
18
  if (this.props.onSize) {
18
19
  const { width, height } = this.getSize();
19
- this.props.onSize.current = { width, height };
20
+ if (isValue(this.props.onSize)) {
21
+ this.props.onSize.current = { width, height };
22
+ } else {
23
+ this.props.onSize.value = { width, height };
24
+ }
20
25
  }
21
26
  if (this.props.root) {
22
27
  const ctx = new JsiDrawingContext(Skia, canvas);
@@ -9,6 +9,7 @@ import type {
9
9
  SkSize,
10
10
  } from "../skia/types";
11
11
  import type { SkiaMutableValue, SkiaValue } from "../values";
12
+ import type { SharedValueType } from "../renderer/processors/Animations/Animations";
12
13
 
13
14
  export type DrawMode = "continuous" | "default";
14
15
 
@@ -97,7 +98,7 @@ export interface SkiaBaseViewProps extends ViewProps {
97
98
  * Pass an animated value to the onSize property to get updates when
98
99
  * the Skia view is resized.
99
100
  */
100
- onSize?: SkiaMutableValue<SkSize>;
101
+ onSize?: SkiaMutableValue<SkSize> | SharedValueType<SkSize>;
101
102
  }
102
103
 
103
104
  export interface SkiaDrawViewProps extends SkiaBaseViewProps {