@shopify/react-native-skia 0.1.190 → 0.1.192

Sign up to get free protection for your applications and to get access to all the features.
Files changed (357) 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/dom/nodes/JsiImageSvgNode.h +24 -3
  29. package/cpp/rnskia/dom/nodes/JsiPathNode.h +11 -11
  30. package/cpp/rnskia/values/RNSkReadonlyValue.h +2 -2
  31. package/cpp/rnskia/values/RNSkValue.h +1 -1
  32. package/lib/commonjs/Platform/Platform.web.js +1 -1
  33. package/lib/commonjs/Platform/Platform.web.js.map +1 -1
  34. package/lib/commonjs/dom/nodes/drawings/ImageSVG.d.ts +7 -2
  35. package/lib/commonjs/dom/nodes/drawings/ImageSVG.js +29 -7
  36. package/lib/commonjs/dom/nodes/drawings/ImageSVG.js.map +1 -1
  37. package/lib/commonjs/dom/nodes/drawings/PathNode.js +6 -2
  38. package/lib/commonjs/dom/nodes/drawings/PathNode.js.map +1 -1
  39. package/lib/commonjs/dom/types/Drawings.d.ts +7 -2
  40. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  41. package/lib/commonjs/renderer/Canvas.js +17 -1
  42. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  43. package/lib/commonjs/renderer/processors/math/Math.d.ts +1 -0
  44. package/lib/commonjs/renderer/processors/math/Math.js +9 -1
  45. package/lib/commonjs/renderer/processors/math/Math.js.map +1 -1
  46. package/lib/commonjs/skia/core/Data.d.ts +2 -2
  47. package/lib/commonjs/skia/core/Data.js.map +1 -1
  48. package/lib/commonjs/skia/types/Data/Data.d.ts +2 -2
  49. package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
  50. package/lib/commonjs/skia/types/Image/Image.d.ts +2 -2
  51. package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
  52. package/lib/commonjs/skia/types/JsiInstance.d.ts +4 -4
  53. package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
  54. package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -2
  55. package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
  56. package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -2
  57. package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
  58. package/lib/commonjs/skia/web/Host.d.ts +1 -0
  59. package/lib/commonjs/skia/web/Host.js +2 -0
  60. package/lib/commonjs/skia/web/Host.js.map +1 -1
  61. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +1 -0
  62. package/lib/commonjs/skia/web/JsiSkCanvas.js +6 -0
  63. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  64. package/lib/commonjs/skia/web/JsiSkColorFilter.d.ts +1 -0
  65. package/lib/commonjs/skia/web/JsiSkColorFilter.js +6 -0
  66. package/lib/commonjs/skia/web/JsiSkColorFilter.js.map +1 -1
  67. package/lib/commonjs/skia/web/JsiSkContourMeasure.d.ts +1 -0
  68. package/lib/commonjs/skia/web/JsiSkContourMeasure.js +6 -0
  69. package/lib/commonjs/skia/web/JsiSkContourMeasure.js.map +1 -1
  70. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  71. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js +6 -0
  72. package/lib/commonjs/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  73. package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -1
  74. package/lib/commonjs/skia/web/JsiSkData.js +4 -2
  75. package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
  76. package/lib/commonjs/skia/web/JsiSkFont.d.ts +1 -0
  77. package/lib/commonjs/skia/web/JsiSkFont.js +6 -0
  78. package/lib/commonjs/skia/web/JsiSkFont.js.map +1 -1
  79. package/lib/commonjs/skia/web/JsiSkImage.d.ts +1 -1
  80. package/lib/commonjs/skia/web/JsiSkImage.js +6 -4
  81. package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
  82. package/lib/commonjs/skia/web/JsiSkImageFilter.d.ts +1 -0
  83. package/lib/commonjs/skia/web/JsiSkImageFilter.js +6 -0
  84. package/lib/commonjs/skia/web/JsiSkImageFilter.js.map +1 -1
  85. package/lib/commonjs/skia/web/JsiSkMaskFilter.d.ts +1 -0
  86. package/lib/commonjs/skia/web/JsiSkMaskFilter.js +6 -0
  87. package/lib/commonjs/skia/web/JsiSkMaskFilter.js.map +1 -1
  88. package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +1 -0
  89. package/lib/commonjs/skia/web/JsiSkMatrix.js +5 -0
  90. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
  91. package/lib/commonjs/skia/web/JsiSkPaint.d.ts +1 -0
  92. package/lib/commonjs/skia/web/JsiSkPaint.js +6 -0
  93. package/lib/commonjs/skia/web/JsiSkPaint.js.map +1 -1
  94. package/lib/commonjs/skia/web/JsiSkPath.d.ts +1 -0
  95. package/lib/commonjs/skia/web/JsiSkPath.js +6 -0
  96. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  97. package/lib/commonjs/skia/web/JsiSkPathEffect.d.ts +1 -0
  98. package/lib/commonjs/skia/web/JsiSkPathEffect.js +6 -0
  99. package/lib/commonjs/skia/web/JsiSkPathEffect.js.map +1 -1
  100. package/lib/commonjs/skia/web/JsiSkPicture.d.ts +1 -0
  101. package/lib/commonjs/skia/web/JsiSkPicture.js +6 -1
  102. package/lib/commonjs/skia/web/JsiSkPicture.js.map +1 -1
  103. package/lib/commonjs/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  104. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js +6 -0
  105. package/lib/commonjs/skia/web/JsiSkPictureRecorder.js.map +1 -1
  106. package/lib/commonjs/skia/web/JsiSkPoint.d.ts +1 -0
  107. package/lib/commonjs/skia/web/JsiSkPoint.js +5 -0
  108. package/lib/commonjs/skia/web/JsiSkPoint.js.map +1 -1
  109. package/lib/commonjs/skia/web/JsiSkRRect.d.ts +1 -0
  110. package/lib/commonjs/skia/web/JsiSkRRect.js +5 -0
  111. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  112. package/lib/commonjs/skia/web/JsiSkRSXform.d.ts +1 -0
  113. package/lib/commonjs/skia/web/JsiSkRSXform.js +5 -0
  114. package/lib/commonjs/skia/web/JsiSkRSXform.js.map +1 -1
  115. package/lib/commonjs/skia/web/JsiSkRect.d.ts +1 -0
  116. package/lib/commonjs/skia/web/JsiSkRect.js +5 -0
  117. package/lib/commonjs/skia/web/JsiSkRect.js.map +1 -1
  118. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  119. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js +6 -0
  120. package/lib/commonjs/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  121. package/lib/commonjs/skia/web/JsiSkShader.d.ts +1 -0
  122. package/lib/commonjs/skia/web/JsiSkShader.js +6 -0
  123. package/lib/commonjs/skia/web/JsiSkShader.js.map +1 -1
  124. package/lib/commonjs/skia/web/JsiSkSurface.d.ts +1 -0
  125. package/lib/commonjs/skia/web/JsiSkSurface.js +6 -0
  126. package/lib/commonjs/skia/web/JsiSkSurface.js.map +1 -1
  127. package/lib/commonjs/skia/web/JsiSkTextBlob.d.ts +1 -0
  128. package/lib/commonjs/skia/web/JsiSkTextBlob.js +6 -0
  129. package/lib/commonjs/skia/web/JsiSkTextBlob.js.map +1 -1
  130. package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +1 -1
  131. package/lib/commonjs/skia/web/JsiSkTypeface.js +6 -4
  132. package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
  133. package/lib/commonjs/skia/web/JsiSkVertices.d.ts +1 -0
  134. package/lib/commonjs/skia/web/JsiSkVertices.js +6 -0
  135. package/lib/commonjs/skia/web/JsiSkVertices.js.map +1 -1
  136. package/lib/commonjs/values/hooks/useComputedValue.js +1 -1
  137. package/lib/commonjs/values/hooks/useComputedValue.js.map +1 -1
  138. package/lib/commonjs/values/types.d.ts +1 -1
  139. package/lib/commonjs/values/types.js.map +1 -1
  140. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +1 -1
  141. package/lib/commonjs/values/web/RNSkComputedValue.js +1 -1
  142. package/lib/commonjs/values/web/RNSkComputedValue.js.map +1 -1
  143. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +1 -1
  144. package/lib/commonjs/values/web/RNSkReadonlyValue.js +1 -1
  145. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
  146. package/lib/commonjs/views/SkiaBaseWebView.js +9 -4
  147. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  148. package/lib/commonjs/views/SkiaDomView.web.js +14 -4
  149. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  150. package/lib/commonjs/views/types.d.ts +2 -1
  151. package/lib/commonjs/views/types.js.map +1 -1
  152. package/lib/module/Platform/Platform.web.js +1 -1
  153. package/lib/module/Platform/Platform.web.js.map +1 -1
  154. package/lib/module/dom/nodes/drawings/ImageSVG.d.ts +7 -2
  155. package/lib/module/dom/nodes/drawings/ImageSVG.js +29 -6
  156. package/lib/module/dom/nodes/drawings/ImageSVG.js.map +1 -1
  157. package/lib/module/dom/nodes/drawings/PathNode.js +5 -2
  158. package/lib/module/dom/nodes/drawings/PathNode.js.map +1 -1
  159. package/lib/module/dom/types/Drawings.d.ts +7 -2
  160. package/lib/module/dom/types/Drawings.js.map +1 -1
  161. package/lib/module/renderer/Canvas.js +15 -1
  162. package/lib/module/renderer/Canvas.js.map +1 -1
  163. package/lib/module/renderer/processors/math/Math.d.ts +1 -0
  164. package/lib/module/renderer/processors/math/Math.js +5 -0
  165. package/lib/module/renderer/processors/math/Math.js.map +1 -1
  166. package/lib/module/skia/core/Data.d.ts +2 -2
  167. package/lib/module/skia/core/Data.js.map +1 -1
  168. package/lib/module/skia/types/Data/Data.d.ts +2 -2
  169. package/lib/module/skia/types/Data/Data.js.map +1 -1
  170. package/lib/module/skia/types/Image/Image.d.ts +2 -2
  171. package/lib/module/skia/types/Image/Image.js.map +1 -1
  172. package/lib/module/skia/types/JsiInstance.d.ts +4 -4
  173. package/lib/module/skia/types/JsiInstance.js.map +1 -1
  174. package/lib/module/skia/types/SVG/SVG.d.ts +2 -2
  175. package/lib/module/skia/types/SVG/SVG.js.map +1 -1
  176. package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -2
  177. package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
  178. package/lib/module/skia/web/Host.d.ts +1 -0
  179. package/lib/module/skia/web/Host.js +2 -0
  180. package/lib/module/skia/web/Host.js.map +1 -1
  181. package/lib/module/skia/web/JsiSkCanvas.d.ts +1 -0
  182. package/lib/module/skia/web/JsiSkCanvas.js +6 -0
  183. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  184. package/lib/module/skia/web/JsiSkColorFilter.d.ts +1 -0
  185. package/lib/module/skia/web/JsiSkColorFilter.js +6 -0
  186. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  187. package/lib/module/skia/web/JsiSkContourMeasure.d.ts +1 -0
  188. package/lib/module/skia/web/JsiSkContourMeasure.js +6 -0
  189. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  190. package/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  191. package/lib/module/skia/web/JsiSkContourMeasureIter.js +6 -0
  192. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  193. package/lib/module/skia/web/JsiSkData.d.ts +1 -1
  194. package/lib/module/skia/web/JsiSkData.js +4 -2
  195. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  196. package/lib/module/skia/web/JsiSkFont.d.ts +1 -0
  197. package/lib/module/skia/web/JsiSkFont.js +6 -0
  198. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  199. package/lib/module/skia/web/JsiSkImage.d.ts +1 -1
  200. package/lib/module/skia/web/JsiSkImage.js +6 -4
  201. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  202. package/lib/module/skia/web/JsiSkImageFilter.d.ts +1 -0
  203. package/lib/module/skia/web/JsiSkImageFilter.js +6 -0
  204. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  205. package/lib/module/skia/web/JsiSkMaskFilter.d.ts +1 -0
  206. package/lib/module/skia/web/JsiSkMaskFilter.js +6 -0
  207. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  208. package/lib/module/skia/web/JsiSkMatrix.d.ts +1 -0
  209. package/lib/module/skia/web/JsiSkMatrix.js +5 -0
  210. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  211. package/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  212. package/lib/module/skia/web/JsiSkPaint.js +6 -0
  213. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  214. package/lib/module/skia/web/JsiSkPath.d.ts +1 -0
  215. package/lib/module/skia/web/JsiSkPath.js +6 -0
  216. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  217. package/lib/module/skia/web/JsiSkPathEffect.d.ts +1 -0
  218. package/lib/module/skia/web/JsiSkPathEffect.js +6 -0
  219. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  220. package/lib/module/skia/web/JsiSkPicture.d.ts +1 -0
  221. package/lib/module/skia/web/JsiSkPicture.js +6 -0
  222. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  223. package/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  224. package/lib/module/skia/web/JsiSkPictureRecorder.js +6 -0
  225. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  226. package/lib/module/skia/web/JsiSkPoint.d.ts +1 -0
  227. package/lib/module/skia/web/JsiSkPoint.js +5 -0
  228. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  229. package/lib/module/skia/web/JsiSkRRect.d.ts +1 -0
  230. package/lib/module/skia/web/JsiSkRRect.js +5 -0
  231. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  232. package/lib/module/skia/web/JsiSkRSXform.d.ts +1 -0
  233. package/lib/module/skia/web/JsiSkRSXform.js +5 -0
  234. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  235. package/lib/module/skia/web/JsiSkRect.d.ts +1 -0
  236. package/lib/module/skia/web/JsiSkRect.js +5 -0
  237. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  238. package/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  239. package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -0
  240. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  241. package/lib/module/skia/web/JsiSkShader.d.ts +1 -0
  242. package/lib/module/skia/web/JsiSkShader.js +6 -0
  243. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  244. package/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
  245. package/lib/module/skia/web/JsiSkSurface.js +6 -0
  246. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  247. package/lib/module/skia/web/JsiSkTextBlob.d.ts +1 -0
  248. package/lib/module/skia/web/JsiSkTextBlob.js +6 -0
  249. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  250. package/lib/module/skia/web/JsiSkTypeface.d.ts +1 -1
  251. package/lib/module/skia/web/JsiSkTypeface.js +6 -4
  252. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  253. package/lib/module/skia/web/JsiSkVertices.d.ts +1 -0
  254. package/lib/module/skia/web/JsiSkVertices.js +6 -0
  255. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  256. package/lib/module/values/hooks/useComputedValue.js +1 -1
  257. package/lib/module/values/hooks/useComputedValue.js.map +1 -1
  258. package/lib/module/values/types.d.ts +1 -1
  259. package/lib/module/values/types.js.map +1 -1
  260. package/lib/module/values/web/RNSkComputedValue.d.ts +1 -1
  261. package/lib/module/values/web/RNSkComputedValue.js +1 -1
  262. package/lib/module/values/web/RNSkComputedValue.js.map +1 -1
  263. package/lib/module/values/web/RNSkReadonlyValue.d.ts +1 -1
  264. package/lib/module/values/web/RNSkReadonlyValue.js +1 -1
  265. package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
  266. package/lib/module/views/SkiaBaseWebView.js +9 -4
  267. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  268. package/lib/module/views/SkiaDomView.web.js +13 -4
  269. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  270. package/lib/module/views/types.d.ts +2 -1
  271. package/lib/module/views/types.js.map +1 -1
  272. package/lib/typescript/src/dom/nodes/drawings/ImageSVG.d.ts +7 -2
  273. package/lib/typescript/src/dom/types/Drawings.d.ts +7 -2
  274. package/lib/typescript/src/renderer/processors/math/Math.d.ts +1 -0
  275. package/lib/typescript/src/skia/core/Data.d.ts +2 -2
  276. package/lib/typescript/src/skia/types/Data/Data.d.ts +2 -2
  277. package/lib/typescript/src/skia/types/Image/Image.d.ts +2 -2
  278. package/lib/typescript/src/skia/types/JsiInstance.d.ts +4 -4
  279. package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -2
  280. package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +2 -2
  281. package/lib/typescript/src/skia/web/Host.d.ts +1 -0
  282. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +1 -0
  283. package/lib/typescript/src/skia/web/JsiSkColorFilter.d.ts +1 -0
  284. package/lib/typescript/src/skia/web/JsiSkContourMeasure.d.ts +1 -0
  285. package/lib/typescript/src/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  286. package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -1
  287. package/lib/typescript/src/skia/web/JsiSkFont.d.ts +1 -0
  288. package/lib/typescript/src/skia/web/JsiSkImage.d.ts +1 -1
  289. package/lib/typescript/src/skia/web/JsiSkImageFilter.d.ts +1 -0
  290. package/lib/typescript/src/skia/web/JsiSkMaskFilter.d.ts +1 -0
  291. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +1 -0
  292. package/lib/typescript/src/skia/web/JsiSkPaint.d.ts +1 -0
  293. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +1 -0
  294. package/lib/typescript/src/skia/web/JsiSkPathEffect.d.ts +1 -0
  295. package/lib/typescript/src/skia/web/JsiSkPicture.d.ts +1 -0
  296. package/lib/typescript/src/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  297. package/lib/typescript/src/skia/web/JsiSkPoint.d.ts +1 -0
  298. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +1 -0
  299. package/lib/typescript/src/skia/web/JsiSkRSXform.d.ts +1 -0
  300. package/lib/typescript/src/skia/web/JsiSkRect.d.ts +1 -0
  301. package/lib/typescript/src/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  302. package/lib/typescript/src/skia/web/JsiSkShader.d.ts +1 -0
  303. package/lib/typescript/src/skia/web/JsiSkSurface.d.ts +1 -0
  304. package/lib/typescript/src/skia/web/JsiSkTextBlob.d.ts +1 -0
  305. package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +1 -1
  306. package/lib/typescript/src/skia/web/JsiSkVertices.d.ts +1 -0
  307. package/lib/typescript/src/values/types.d.ts +1 -1
  308. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +1 -1
  309. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +1 -1
  310. package/lib/typescript/src/views/types.d.ts +2 -1
  311. package/package.json +4 -1
  312. package/scripts/install-npm.js +2 -3
  313. package/src/Platform/Platform.web.tsx +1 -1
  314. package/src/dom/nodes/drawings/ImageSVG.ts +17 -6
  315. package/src/dom/nodes/drawings/PathNode.ts +10 -1
  316. package/src/dom/types/Drawings.ts +7 -2
  317. package/src/renderer/Canvas.tsx +21 -1
  318. package/src/renderer/processors/math/Math.ts +5 -0
  319. package/src/skia/core/Data.ts +3 -3
  320. package/src/skia/types/Data/Data.ts +2 -2
  321. package/src/skia/types/Image/Image.ts +2 -2
  322. package/src/skia/types/JsiInstance.ts +4 -4
  323. package/src/skia/types/SVG/SVG.ts +2 -2
  324. package/src/skia/types/Typeface/Typeface.ts +2 -2
  325. package/src/skia/web/Host.ts +2 -0
  326. package/src/skia/web/JsiSkCanvas.ts +4 -0
  327. package/src/skia/web/JsiSkColorFilter.ts +4 -0
  328. package/src/skia/web/JsiSkContourMeasure.ts +4 -0
  329. package/src/skia/web/JsiSkContourMeasureIter.ts +4 -0
  330. package/src/skia/web/JsiSkData.ts +3 -3
  331. package/src/skia/web/JsiSkFont.ts +4 -0
  332. package/src/skia/web/JsiSkImage.ts +2 -2
  333. package/src/skia/web/JsiSkImageFilter.ts +4 -0
  334. package/src/skia/web/JsiSkMaskFilter.ts +4 -0
  335. package/src/skia/web/JsiSkMatrix.ts +4 -0
  336. package/src/skia/web/JsiSkPaint.ts +4 -0
  337. package/src/skia/web/JsiSkPath.ts +4 -0
  338. package/src/skia/web/JsiSkPathEffect.ts +4 -0
  339. package/src/skia/web/JsiSkPicture.ts +4 -0
  340. package/src/skia/web/JsiSkPictureRecorder.ts +4 -0
  341. package/src/skia/web/JsiSkPoint.ts +4 -0
  342. package/src/skia/web/JsiSkRRect.ts +4 -0
  343. package/src/skia/web/JsiSkRSXform.ts +4 -0
  344. package/src/skia/web/JsiSkRect.ts +4 -0
  345. package/src/skia/web/JsiSkRuntimeEffect.ts +4 -0
  346. package/src/skia/web/JsiSkShader.ts +4 -0
  347. package/src/skia/web/JsiSkSurface.ts +4 -0
  348. package/src/skia/web/JsiSkTextBlob.ts +4 -0
  349. package/src/skia/web/JsiSkTypeface.ts +2 -2
  350. package/src/skia/web/JsiSkVertices.ts +4 -0
  351. package/src/values/hooks/useComputedValue.ts +1 -1
  352. package/src/values/types.ts +1 -1
  353. package/src/values/web/RNSkComputedValue.ts +1 -1
  354. package/src/values/web/RNSkReadonlyValue.ts +1 -1
  355. package/src/views/SkiaBaseWebView.tsx +9 -4
  356. package/src/views/SkiaDomView.web.tsx +6 -1
  357. package/src/views/types.ts +2 -1
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkFont","HostObject","constructor","CanvasKit","ref","getTextWidth","text","paint","ids","getGlyphIDs","widths","getGlyphWidths","reduce","a","b","getMetrics","result","ascent","descent","leading","bounds","JsiSkRect","undefined","str","numCodePoints","glyphs","JsiSkPaint","fromValue","getGlyphIntercepts","positions","top","bottom","map","p","Array","from","JsiSkPoint","flat","getScaleX","getSize","getSkewX","isEmbolden","getTypeface","tf","JsiSkTypeface","setEdging","edging","ckEnum","setEmbeddedBitmaps","embeddedBitmaps","setHinting","hinting","setLinearMetrics","linearMetrics","setScaleX","sx","setSize","points","setSkewX","setEmbolden","embolden","setSubpixel","subpixel","setTypeface","face"],"sources":["JsiSkFont.ts"],"sourcesContent":["import type { CanvasKit, Font } from \"canvaskit-wasm\";\n\nimport type {\n FontEdging,\n FontHinting,\n SkFont,\n SkPaint,\n SkPoint,\n SkTypeface,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkPoint } from \"./JsiSkPoint\";\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 getTextWidth(text: string, paint?: SkPaint | undefined) {\n const ids = this.getGlyphIDs(text);\n const widths = this.getGlyphWidths(ids, paint);\n return widths.reduce((a, b) => a + b, 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 [\n ...this.ref.getGlyphWidths(\n glyphs,\n paint ? JsiSkPaint.fromValue(paint) : null\n ),\n ];\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) => Array.from(JsiSkPoint.fromValue(p))).flat(),\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 ? JsiSkTypeface.fromValue(face) : null);\n }\n}\n"],"mappings":";;;;;;;AAWA;;AACA;;AACA;;AACA;;AACA;;AAEO,MAAMA,SAAN,SAAwBC,gBAAxB,CAAmE;EACxEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;IAC3C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;EACD;;EAEDC,YAAY,CAACC,IAAD,EAAeC,KAAf,EAA4C;IACtD,MAAMC,GAAG,GAAG,KAAKC,WAAL,CAAiBH,IAAjB,CAAZ;IACA,MAAMI,MAAM,GAAG,KAAKC,cAAL,CAAoBH,GAApB,EAAyBD,KAAzB,CAAf;IACA,OAAOG,MAAM,CAACE,MAAP,CAAc,CAACC,CAAD,EAAIC,CAAJ,KAAUD,CAAC,GAAGC,CAA5B,EAA+B,CAA/B,CAAP;EACD;;EAEDC,UAAU,GAAG;IACX,MAAMC,MAAM,GAAG,KAAKZ,GAAL,CAASW,UAAT,EAAf;IACA,OAAO;MACLE,MAAM,EAAED,MAAM,CAACC,MADV;MAELC,OAAO,EAAEF,MAAM,CAACE,OAFX;MAG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AAX;IACA,OAAOC,EAAE,GAAG,IAAIC,4BAAJ,CAAkB,KAAKzC,SAAvB,EAAkCwC,EAAlC,CAAH,GAA2C,IAApD;EACD;;EAEDE,SAAS,CAACC,MAAD,EAAqB;IAC5B,KAAK1C,GAAL,CAASyC,SAAT,CAAmB,IAAAE,YAAA,EAAOD,MAAP,CAAnB;EACD;;EAEDE,kBAAkB,CAACC,eAAD,EAA2B;IAC3C,KAAK7C,GAAL,CAAS4C,kBAAT,CAA4BC,eAA5B;EACD;;EAEDC,UAAU,CAACC,OAAD,EAAuB;IAC/B,KAAK/C,GAAL,CAAS8C,UAAT,CAAoB,IAAAH,YAAA,EAAOI,OAAP,CAApB;EACD;;EAEDC,gBAAgB,CAACC,aAAD,EAAyB;IACvC,KAAKjD,GAAL,CAASgD,gBAAT,CAA0BC,aAA1B;EACD;;EAEDC,SAAS,CAACC,EAAD,EAAa;IACpB,KAAKnD,GAAL,CAASkD,SAAT,CAAmBC,EAAnB;EACD;;EAEDC,OAAO,CAACC,MAAD,EAAiB;IACtB,KAAKrD,GAAL,CAASoD,OAAT,CAAiBC,MAAjB;EACD;;EAEDC,QAAQ,CAACH,EAAD,EAAa;IACnB,KAAKnD,GAAL,CAASsD,QAAT,CAAkBH,EAAlB;EACD;;EAEDI,WAAW,CAACC,QAAD,EAAoB;IAC7B,KAAKxD,GAAL,CAASuD,WAAT,CAAqBC,QAArB;EACD;;EAEDC,WAAW,CAACC,QAAD,EAAoB;IAC7B,KAAK1D,GAAL,CAASyD,WAAT,CAAqBC,QAArB;EACD;;EAEDC,WAAW,CAACC,IAAD,EAA0B;IACnC,KAAK5D,GAAL,CAAS2D,WAAT,CAAqBC,IAAI,GAAGpB,4BAAA,CAAcjB,SAAd,CAAwBqC,IAAxB,CAAH,GAAmC,IAA5D;EACD;;AAjHuE"}
1
+ {"version":3,"names":["JsiSkFont","HostObject","constructor","CanvasKit","ref","delete","getTextWidth","text","paint","ids","getGlyphIDs","widths","getGlyphWidths","reduce","a","b","getMetrics","result","ascent","descent","leading","bounds","JsiSkRect","undefined","str","numCodePoints","glyphs","JsiSkPaint","fromValue","getGlyphIntercepts","positions","top","bottom","map","p","Array","from","JsiSkPoint","flat","getScaleX","getSize","getSkewX","isEmbolden","getTypeface","tf","JsiSkTypeface","setEdging","edging","ckEnum","setEmbeddedBitmaps","embeddedBitmaps","setHinting","hinting","setLinearMetrics","linearMetrics","setScaleX","sx","setSize","points","setSkewX","setEmbolden","embolden","setSubpixel","subpixel","setTypeface","face"],"sources":["JsiSkFont.ts"],"sourcesContent":["import type { CanvasKit, Font } from \"canvaskit-wasm\";\n\nimport type {\n FontEdging,\n FontHinting,\n SkFont,\n SkPaint,\n SkPoint,\n SkTypeface,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkPaint } from \"./JsiSkPaint\";\nimport { JsiSkPoint } from \"./JsiSkPoint\";\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 dispose = () => {\n this.ref.delete();\n };\n\n getTextWidth(text: string, paint?: SkPaint | undefined) {\n const ids = this.getGlyphIDs(text);\n const widths = this.getGlyphWidths(ids, paint);\n return widths.reduce((a, b) => a + b, 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 [\n ...this.ref.getGlyphWidths(\n glyphs,\n paint ? JsiSkPaint.fromValue(paint) : null\n ),\n ];\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) => Array.from(JsiSkPoint.fromValue(p))).flat(),\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 ? JsiSkTypeface.fromValue(face) : null);\n }\n}\n"],"mappings":";;;;;;;AAWA;;AACA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,SAAN,SAAwBC,gBAAxB,CAAmE;EACxEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;IAC3C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;;IAD2C,iCAInC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CAN4C;EAE5C;;EAMDC,YAAY,CA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EAEDI,WAAW,CAACC,QAAD,EAAoB;IAC7B,KAAKzD,GAAL,CAASwD,WAAT,CAAqBC,QAArB;EACD;;EAEDC,WAAW,CAACC,QAAD,EAAoB;IAC7B,KAAK3D,GAAL,CAAS0D,WAAT,CAAqBC,QAArB;EACD;;EAEDC,WAAW,CAACC,IAAD,EAA0B;IACnC,KAAK7D,GAAL,CAAS4D,WAAT,CAAqBC,IAAI,GAAGpB,4BAAA,CAAcjB,SAAd,CAAwBqC,IAAxB,CAAH,GAAmC,IAA5D;EACD;;AArHuE"}
@@ -10,6 +10,6 @@ export declare class JsiSkImage extends HostObject<Image, "Image"> implements Sk
10
10
  makeShaderCubic(tx: TileMode, ty: TileMode, B: number, C: number, localMatrix?: SkMatrix): SkShader;
11
11
  encodeToBytes(fmt?: ImageFormat, quality?: number): Uint8Array;
12
12
  encodeToBase64(fmt?: ImageFormat, quality?: number): string;
13
- dispose(): void;
13
+ dispose: () => void;
14
14
  makeNonTextureImage(): SkImage;
15
15
  }
@@ -11,6 +11,8 @@ var _JsiSkMatrix = require("./JsiSkMatrix");
11
11
 
12
12
  var _JsiSkShader = require("./JsiSkShader");
13
13
 
14
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
+
14
16
  // https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/modules/canvaskit/htmlcanvas/util.js
15
17
  const toBase64String = bytes => {
16
18
  if (typeof Buffer !== "undefined") {
@@ -46,6 +48,10 @@ exports.toBase64String = toBase64String;
46
48
  class JsiSkImage extends _Host.HostObject {
47
49
  constructor(CanvasKit, ref) {
48
50
  super(CanvasKit, ref, "Image");
51
+
52
+ _defineProperty(this, "dispose", () => {
53
+ this.ref.delete();
54
+ });
49
55
  }
50
56
 
51
57
  height() {
@@ -87,10 +93,6 @@ class JsiSkImage extends _Host.HostObject {
87
93
  return toBase64String(bytes);
88
94
  }
89
95
 
90
- dispose() {
91
- this.ref.delete();
92
- }
93
-
94
96
  makeNonTextureImage() {
95
97
  return new JsiSkImage(this.CanvasKit, this.CanvasKit.MakeImageFromEncoded(this.encodeToBytes()));
96
98
  }
@@ -1 +1 @@
1
- {"version":3,"names":["toBase64String","bytes","Buffer","from","toString","CHUNK_SIZE","index","length","result","slice","Math","min","String","fromCharCode","apply","btoa","JsiSkImage","HostObject","constructor","CanvasKit","ref","height","width","makeShaderOptions","tx","ty","fm","mm","localMatrix","JsiSkShader","ckEnum","JsiSkMatrix","fromValue","undefined","makeShaderCubic","B","C","encodeToBytes","fmt","quality","Error","encodeToBase64","dispose","delete","makeNonTextureImage","MakeImageFromEncoded"],"sources":["JsiSkImage.ts"],"sourcesContent":["import type { CanvasKit, Image } from \"canvaskit-wasm\";\n\nimport type {\n ImageFormat,\n FilterMode,\n MipmapMode,\n SkImage,\n SkMatrix,\n SkShader,\n TileMode,\n} from \"../types\";\n\nimport { ckEnum, HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\n// https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/modules/canvaskit/htmlcanvas/util.js\nexport const toBase64String = (bytes: Uint8Array) => {\n if (typeof Buffer !== \"undefined\") {\n // Are we on node?\n return Buffer.from(bytes).toString(\"base64\");\n } else {\n // From https://stackoverflow.com/a/25644409\n // because the naive solution of\n // btoa(String.fromCharCode.apply(null, bytes));\n // would occasionally throw \"Maximum call stack size exceeded\"\n var CHUNK_SIZE = 0x8000; //arbitrary number\n var index = 0;\n var { length } = bytes;\n var result = \"\";\n var slice;\n while (index < length) {\n slice = bytes.slice(index, Math.min(index + CHUNK_SIZE, length));\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result += String.fromCharCode.apply(null, slice as any);\n index += CHUNK_SIZE;\n }\n return btoa(result);\n }\n};\n\nexport class JsiSkImage extends HostObject<Image, \"Image\"> implements SkImage {\n constructor(CanvasKit: CanvasKit, ref: Image) {\n super(CanvasKit, ref, \"Image\");\n }\n\n height() {\n return this.ref.height();\n }\n\n width() {\n return this.ref.width();\n }\n\n makeShaderOptions(\n tx: TileMode,\n ty: TileMode,\n fm: FilterMode,\n mm: MipmapMode,\n localMatrix?: SkMatrix\n ): SkShader {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderOptions(\n ckEnum(tx),\n ckEnum(ty),\n ckEnum(fm),\n ckEnum(mm),\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined\n )\n );\n }\n\n makeShaderCubic(\n tx: TileMode,\n ty: TileMode,\n B: number,\n C: number,\n localMatrix?: SkMatrix\n ): SkShader {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderCubic(\n ckEnum(tx),\n ckEnum(ty),\n B,\n C,\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined\n )\n );\n }\n\n encodeToBytes(fmt?: ImageFormat, quality?: number) {\n let result: Uint8Array | null;\n if (fmt && quality) {\n result = this.ref.encodeToBytes(ckEnum(fmt), quality);\n } else if (fmt) {\n result = this.ref.encodeToBytes(ckEnum(fmt));\n } else {\n result = this.ref.encodeToBytes();\n }\n if (!result) {\n throw new Error(\"encodeToBytes failed\");\n }\n return result;\n }\n\n encodeToBase64(fmt?: ImageFormat, quality?: number) {\n const bytes = this.encodeToBytes(fmt, quality);\n return toBase64String(bytes);\n }\n\n dispose() {\n this.ref.delete();\n }\n\n makeNonTextureImage(): SkImage {\n return new JsiSkImage(\n this.CanvasKit,\n this.CanvasKit.MakeImageFromEncoded(this.encodeToBytes())!\n );\n }\n}\n"],"mappings":";;;;;;;AAYA;;AACA;;AACA;;AAEA;AACO,MAAMA,cAAc,GAAIC,KAAD,IAAuB;EACnD,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;IACjC;IACA,OAAOA,MAAM,CAACC,IAAP,CAAYF,KAAZ,EAAmBG,QAAnB,CAA4B,QAA5B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AL,CAAe0B,oBAAf,CAAoC,KAAKR,aAAL,EAApC,CAFK,CAAP;EAID;;AAhF2E"}
1
+ {"version":3,"names":["toBase64String","bytes","Buffer","from","toString","CHUNK_SIZE","index","length","result","slice","Math","min","String","fromCharCode","apply","btoa","JsiSkImage","HostObject","constructor","CanvasKit","ref","delete","height","width","makeShaderOptions","tx","ty","fm","mm","localMatrix","JsiSkShader","ckEnum","JsiSkMatrix","fromValue","undefined","makeShaderCubic","B","C","encodeToBytes","fmt","quality","Error","encodeToBase64","makeNonTextureImage","MakeImageFromEncoded"],"sources":["JsiSkImage.ts"],"sourcesContent":["import type { CanvasKit, Image } from \"canvaskit-wasm\";\n\nimport type {\n ImageFormat,\n FilterMode,\n MipmapMode,\n SkImage,\n SkMatrix,\n SkShader,\n TileMode,\n} from \"../types\";\n\nimport { ckEnum, HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\n// https://github.com/google/skia/blob/1f193df9b393d50da39570dab77a0bb5d28ec8ef/modules/canvaskit/htmlcanvas/util.js\nexport const toBase64String = (bytes: Uint8Array) => {\n if (typeof Buffer !== \"undefined\") {\n // Are we on node?\n return Buffer.from(bytes).toString(\"base64\");\n } else {\n // From https://stackoverflow.com/a/25644409\n // because the naive solution of\n // btoa(String.fromCharCode.apply(null, bytes));\n // would occasionally throw \"Maximum call stack size exceeded\"\n var CHUNK_SIZE = 0x8000; //arbitrary number\n var index = 0;\n var { length } = bytes;\n var result = \"\";\n var slice;\n while (index < length) {\n slice = bytes.slice(index, Math.min(index + CHUNK_SIZE, length));\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n result += String.fromCharCode.apply(null, slice as any);\n index += CHUNK_SIZE;\n }\n return btoa(result);\n }\n};\n\nexport class JsiSkImage extends HostObject<Image, \"Image\"> implements SkImage {\n constructor(CanvasKit: CanvasKit, ref: Image) {\n super(CanvasKit, ref, \"Image\");\n }\n\n height() {\n return this.ref.height();\n }\n\n width() {\n return this.ref.width();\n }\n\n makeShaderOptions(\n tx: TileMode,\n ty: TileMode,\n fm: FilterMode,\n mm: MipmapMode,\n localMatrix?: SkMatrix\n ): SkShader {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderOptions(\n ckEnum(tx),\n ckEnum(ty),\n ckEnum(fm),\n ckEnum(mm),\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined\n )\n );\n }\n\n makeShaderCubic(\n tx: TileMode,\n ty: TileMode,\n B: number,\n C: number,\n localMatrix?: SkMatrix\n ): SkShader {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderCubic(\n ckEnum(tx),\n ckEnum(ty),\n B,\n C,\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined\n )\n );\n }\n\n encodeToBytes(fmt?: ImageFormat, quality?: number) {\n let result: Uint8Array | null;\n if (fmt && quality) {\n result = this.ref.encodeToBytes(ckEnum(fmt), quality);\n } else if (fmt) {\n result = this.ref.encodeToBytes(ckEnum(fmt));\n } else {\n result = this.ref.encodeToBytes();\n }\n if (!result) {\n throw new Error(\"encodeToBytes failed\");\n }\n return result;\n }\n\n encodeToBase64(fmt?: ImageFormat, quality?: number) {\n const bytes = this.encodeToBytes(fmt, quality);\n return toBase64String(bytes);\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n makeNonTextureImage(): SkImage {\n return new JsiSkImage(\n this.CanvasKit,\n this.CanvasKit.MakeImageFromEncoded(this.encodeToBytes())!\n );\n }\n}\n"],"mappings":";;;;;;;AAYA;;AACA;;AACA;;;;AAEA;AACO,MAAMA,cAAc,GAAIC,KAAD,IAAuB;EACnD,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;IACjC;IACA,OAAOA,MAAM,CAACC,IAAP,CAAYF,KAAZ,EAAmBG,QAAnB,CAA4B,QAA5B,CAAP;EACD,CAHD,MAGO;IACL;IACA;IACA;IACA;IACA,IAAIC,UAAU,GAAG,MAAjB,CAL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AhF2E"}
@@ -3,4 +3,5 @@ import type { SkImageFilter } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkImageFilter extends HostObject<ImageFilter, "ImageFilter"> implements SkImageFilter {
5
5
  constructor(CanvasKit: CanvasKit, ref: ImageFilter);
6
+ dispose: () => void;
6
7
  }
@@ -7,9 +7,15 @@ exports.JsiSkImageFilter = void 0;
7
7
 
8
8
  var _Host = require("./Host");
9
9
 
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
10
12
  class JsiSkImageFilter extends _Host.HostObject {
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "ImageFilter");
15
+
16
+ _defineProperty(this, "dispose", () => {
17
+ this.ref.delete();
18
+ });
13
19
  }
14
20
 
15
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkImageFilter","HostObject","constructor","CanvasKit","ref"],"sources":["JsiSkImageFilter.ts"],"sourcesContent":["import type { CanvasKit, ImageFilter } from \"canvaskit-wasm\";\n\nimport type { SkImageFilter } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkImageFilter\n extends HostObject<ImageFilter, \"ImageFilter\">\n implements SkImageFilter\n{\n constructor(CanvasKit: CanvasKit, ref: ImageFilter) {\n super(CanvasKit, ref, \"ImageFilter\");\n }\n}\n"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,gBAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAyC;IAClD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,aAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["JsiSkImageFilter","HostObject","constructor","CanvasKit","ref","delete"],"sources":["JsiSkImageFilter.ts"],"sourcesContent":["import type { CanvasKit, ImageFilter } from \"canvaskit-wasm\";\n\nimport type { SkImageFilter } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkImageFilter\n extends HostObject<ImageFilter, \"ImageFilter\">\n implements SkImageFilter\n{\n constructor(CanvasKit: CanvasKit, ref: ImageFilter) {\n super(CanvasKit, ref, \"ImageFilter\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;;;;;;AAIA;;;;AAEO,MAAMA,gBAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAyC;IAClD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,aAAtB;;IADkD,iCAI1C,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CANmD;EAEnD;;AAHH"}
@@ -3,4 +3,5 @@ import type { SkMaskFilter } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkMaskFilter extends HostObject<MaskFilter, "MaskFilter"> implements SkMaskFilter {
5
5
  constructor(CanvasKit: CanvasKit, ref: MaskFilter);
6
+ dispose: () => void;
6
7
  }
@@ -7,9 +7,15 @@ exports.JsiSkMaskFilter = void 0;
7
7
 
8
8
  var _Host = require("./Host");
9
9
 
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
10
12
  class JsiSkMaskFilter extends _Host.HostObject {
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "MaskFilter");
15
+
16
+ _defineProperty(this, "dispose", () => {
17
+ this.ref.delete();
18
+ });
13
19
  }
14
20
 
15
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkMaskFilter","HostObject","constructor","CanvasKit","ref"],"sources":["JsiSkMaskFilter.ts"],"sourcesContent":["import type { CanvasKit, MaskFilter } from \"canvaskit-wasm\";\n\nimport type { SkMaskFilter } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkMaskFilter\n extends HostObject<MaskFilter, \"MaskFilter\">\n implements SkMaskFilter\n{\n constructor(CanvasKit: CanvasKit, ref: MaskFilter) {\n super(CanvasKit, ref, \"MaskFilter\");\n }\n}\n"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,eAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAwC;IACjD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,YAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["JsiSkMaskFilter","HostObject","constructor","CanvasKit","ref","delete"],"sources":["JsiSkMaskFilter.ts"],"sourcesContent":["import type { CanvasKit, MaskFilter } from \"canvaskit-wasm\";\n\nimport type { SkMaskFilter } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkMaskFilter\n extends HostObject<MaskFilter, \"MaskFilter\">\n implements SkMaskFilter\n{\n constructor(CanvasKit: CanvasKit, ref: MaskFilter) {\n super(CanvasKit, ref, \"MaskFilter\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;;;;;;AAIA;;;;AAEO,MAAMA,eAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAwC;IACjD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,YAAtB;;IADiD,iCAIzC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CANkD;EAElD;;AAHH"}
@@ -3,6 +3,7 @@ import type { SkMatrix } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkMatrix extends HostObject<Matrix3x3, "Matrix"> implements SkMatrix {
5
5
  constructor(CanvasKit: CanvasKit, ref: Matrix3x3);
6
+ dispose: () => void;
6
7
  concat(matrix: SkMatrix): this;
7
8
  translate(x: number, y: number): this;
8
9
  scale(x: number, y?: number): this;
@@ -7,9 +7,14 @@ exports.JsiSkMatrix = void 0;
7
7
 
8
8
  var _Host = require("./Host");
9
9
 
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
10
12
  class JsiSkMatrix extends _Host.HostObject {
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "Matrix");
15
+
16
+ _defineProperty(this, "dispose", () => {// Do nothing - the matrix is represenetd by a Float32Array
17
+ });
13
18
  }
14
19
 
15
20
  concat(matrix) {
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkMatrix","HostObject","constructor","CanvasKit","ref","concat","matrix","set","Matrix","multiply","fromValue","translate","x","y","Float32Array","of","translated","scale","scaled","skew","skewed","rotate","value","rotated","identity","get","Array","from"],"sources":["JsiSkMatrix.ts"],"sourcesContent":["import type { CanvasKit, Matrix3x3 } from \"canvaskit-wasm\";\n\nimport type { SkMatrix } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkMatrix\n extends HostObject<Matrix3x3, \"Matrix\">\n implements SkMatrix\n{\n constructor(CanvasKit: CanvasKit, ref: Matrix3x3) {\n super(CanvasKit, ref, \"Matrix\");\n }\n\n concat(matrix: SkMatrix) {\n this.ref.set(\n this.CanvasKit.Matrix.multiply(this.ref, JsiSkMatrix.fromValue(matrix))\n );\n return this;\n }\n\n translate(x: number, y: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.translated(x, y))\n )\n );\n return this;\n }\n\n scale(x: number, y?: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.scaled(x, y ?? x))\n )\n );\n return this;\n }\n\n skew(x: number, y: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.skewed(x, y))\n )\n );\n return this;\n }\n\n rotate(value: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.rotated(value))\n )\n );\n return this;\n }\n\n identity() {\n this.ref.set(this.Can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MAAM,CAACC,KAAD,EAAgB;IACpB,KAAKjB,MAAL,CACE,IAAIL,WAAJ,CACE,KAAKG,SADP,EAEEW,YAAY,CAACC,EAAb,CAAgB,GAAG,KAAKZ,SAAL,CAAeK,MAAf,CAAsBe,OAAtB,CAA8BD,KAA9B,CAAnB,CAFF,CADF;IAMA,OAAO,IAAP;EACD;;EAEDE,QAAQ,GAAG;IACT,KAAKpB,GAAL,CAASG,GAAT,CAAa,KAAKJ,SAAL,CAAeK,MAAf,CAAsBgB,QAAtB,EAAb;IACA,OAAO,IAAP;EACD;;EAEDC,GAAG,GAAG;IACJ,OAAOC,KAAK,CAACC,IAAN,CAAW,KAAKvB,GAAhB,CAAP;EACD;;AA3DH"}
1
+ {"version":3,"names":["JsiSkMatrix","HostObject","constructor","CanvasKit","ref","concat","matrix","set","Matrix","multiply","fromValue","translate","x","y","Float32Array","of","translated","scale","scaled","skew","skewed","rotate","value","rotated","identity","get","Array","from"],"sources":["JsiSkMatrix.ts"],"sourcesContent":["import type { CanvasKit, Matrix3x3 } from \"canvaskit-wasm\";\n\nimport type { SkMatrix } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkMatrix\n extends HostObject<Matrix3x3, \"Matrix\">\n implements SkMatrix\n{\n constructor(CanvasKit: CanvasKit, ref: Matrix3x3) {\n super(CanvasKit, ref, \"Matrix\");\n }\n\n dispose = () => {\n // Do nothing - the matrix is represenetd by a Float32Array\n };\n\n concat(matrix: SkMatrix) {\n this.ref.set(\n this.CanvasKit.Matrix.multiply(this.ref, JsiSkMatrix.fromValue(matrix))\n );\n return this;\n }\n\n translate(x: number, y: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.translated(x, y))\n )\n );\n return this;\n }\n\n scale(x: number, y?: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.scaled(x, y ?? x))\n )\n );\n return this;\n }\n\n skew(x: number, y: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.skewed(x, y))\n )\n );\n return this;\n }\n\n rotate(value: number) {\n this.concat(\n new JsiSkMatrix(\n this.CanvasKit,\n Float32Array.of(...this.CanvasKit.Matrix.rotated(value))\n )\n );\n return this;\n }\n\n identity() {\n this.ref.set(this.CanvasKit.Matrix.identity());\n return this;\n }\n\n get() {\n return Array.from(this.ref);\n }\n}\n"],"mappings":";;;;;;;AAIA;;;;AAEO,MAAMA,WAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAuC;IAChD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,QAAtB;;IADgD,iCAIxC,MAAM,CACd;IACD,CANiD;EAEjD;;EAMDC,MAAM,CAACC,MAAD,EAAmB;IACvB,KAAKF,GAAL,CAASG,GAAT,CACE,KAAKJ,SAAL,CAAeK,MAAf,CAAsBC,QAAtB,CAA+B,KAAKL,GAApC,EAAyCJ,WAAW,CAACU,SAAZ,CAAsBJ,MAAtB,CAAzC,CADF;IAGA,OAAO,IAAP;EACD;;EAEDK,SAAS,CAACC,CAAD,EAAYC,CAAZ,EAAuB;IAC9B,KAAKR,MAAL,CACE,IAAIL,WAAJ,CACE,KAAKG,SADP,EAEEW,YAAY,CAACC,EAAb,CAAgB,GAAG,KAAKZ,SAAL,CAAeK,MAAf,CAAsBQ,UAAtB,CAAiCJ,CAAjC,EAAoCC,CAApC,CAAnB,CAFF,CADF;IAMA,OAAO,IAAP;EACD;;EAEDI,KAAK,CAACL,CAAD,EAAYC,CAAZ,EAAwB;IAC3B,KAAKR,MAAL,CACE,IAAIL,WAAJ,CACE,KAAKG,SADP,EAEEW,YAAY,CAACC,EAAb,CAAgB,GAAG,KAAKZ,SAAL,CAAeK,MAAf,CAAsBU,MAAtB,CAA6BN,CAA7B,EAAgCC,CAAC,IAAID,CAArC,CAAnB,CAFF,CADF;IAMA,OAAO,IAAP;EACD;;EAEDO,IAAI,CAACP,CAAD,EAAYC,CAAZ,EAAuB;IACzB,KAAKR,MAAL,CACE,IAAIL,WAAJ,CACE,KAAKG,SADP,EAEEW,YAAY,CAACC,EAAb,CAAgB,GAAG,KAAKZ,SAAL,CAAeK,MAAf,CAAsBY,MAAtB,CAA6BR,CAA7B,EAAgCC,CAAhC,CAAnB,CAFF,CADF;IAMA,OAAO,IAAP;EACD;;EAEDQ,MAAM,CAACC,KAAD,EAAgB;IACpB,KAAKjB,MAAL,CACE,IAAIL,WAAJ,CACE,KAAKG,SADP,EAEEW,YAAY,CAACC,EAAb,CAAgB,GAAG,KAAKZ,SAAL,CAAeK,MAAf,CAAsBe,OAAtB,CAA8BD,KAA9B,CAAnB,CAFF,CADF;IAMA,OAAO,IAAP;EACD;;EAEDE,QAAQ,GAAG;IACT,KAAKpB,GAAL,CAASG,GAAT,CAAa,KAAKJ,SAAL,CAAeK,MAAf,CAAsBgB,QAAtB,EAAb;IACA,OAAO,IAAP;EACD;;EAEDC,GAAG,GAAG;IACJ,OAAOC,KAAK,CAACC,IAAN,CAAW,KAAKvB,GAAhB,CAAP;EACD;;AA/DH"}
@@ -3,6 +3,7 @@ import type { StrokeJoin, BlendMode, SkColor, SkColorFilter, SkImageFilter, SkPa
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkPaint extends HostObject<Paint, "Paint"> implements SkPaint {
5
5
  constructor(CanvasKit: CanvasKit, ref: Paint);
6
+ dispose: () => void;
6
7
  copy(): JsiSkPaint;
7
8
  reset(): void;
8
9
  getAlphaf(): number;
@@ -17,9 +17,15 @@ var _JsiSkPathEffect = require("./JsiSkPathEffect");
17
17
 
18
18
  var _JsiSkShader = require("./JsiSkShader");
19
19
 
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
20
22
  class JsiSkPaint extends _Host.HostObject {
21
23
  constructor(CanvasKit, ref) {
22
24
  super(CanvasKit, ref, "Paint");
25
+
26
+ _defineProperty(this, "dispose", () => {
27
+ this.ref.delete();
28
+ });
23
29
  }
24
30
 
25
31
  copy() {
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkPaint","HostObject","constructor","CanvasKit","ref","copy","reset","Paint","getAlphaf","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setBlendMode","blendMode","ckEnum","setColor","color","setColorFilter","filter","JsiSkColorFilter","fromValue","setImageFilter","JsiSkImageFilter","setMaskFilter","JsiSkMaskFilter","setPathEffect","effect","JsiSkPathEffect","setShader","shader","JsiSkShader","setStrokeCap","cap","setStrokeJoin","join","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"sources":["JsiSkPaint.ts"],"sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n StrokeJoin,\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkMaskFilter } from \"./JsiSkMaskFilter\";\nimport { JsiSkPathEffect } from \"./JsiSkPathEffect\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n reset() {\n this.ref = new this.CanvasKit.Paint();\n }\n\n getAlphaf() {\n return this.getColor()[3];\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode(ckEnum(blendMode));\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(filter ? JsiSkColorFilter.fromValue(filter) : null);\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(filter ? JsiSkImageFilter.fromValue(filter) : null);\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(filter ? JsiSkMaskFilter.fromValue(filter) : null);\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(effect ? JsiSkPathEffect.fromValue(effect) : null);\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(shader ? JsiSkShader.fromValue(shader) : null);\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap(ckEnum(cap));\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin(ckEnum(join));\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"],"mappings":";;;;;;;AAgBA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEO,MAAMA,UAAN,SAAyBC,gBAAzB,CAAuE;EAC5EC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmC;IAC5C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,OAAtB;EACD;;EAEDC,IAAI,GAAG;IACL,OAAO,IAAIL,UAAJ,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F,MAA3B,CAAH,GAAwC,IAAtE;EACD;;EAEDK,aAAa,CAACL,MAAD,EAA8B;IACzC,KAAKrB,GAAL,CAAS0B,aAAT,CAAuBL,MAAM,GAAGM,gCAAA,CAAgBJ,SAAhB,CAA0BF,MAA1B,CAAH,GAAuC,IAApE;EACD;;EAEDO,aAAa,CAACC,MAAD,EAA8B;IACzC,KAAK7B,GAAL,CAAS4B,aAAT,CAAuBC,MAAM,GAAGC,gCAAA,CAAgBP,SAAhB,CAA0BM,MAA1B,CAAH,GAAuC,IAApE;EACD;;EAEDE,SAAS,CAACC,MAAD,EAA0B;IACjC,KAAKhC,GAAL,CAAS+B,SAAT,CAAmBC,MAAM,GAAGC,wBAAA,CAAYV,SAAZ,CAAsBS,MAAtB,CAAH,GAAmC,IAA5D;EACD;;EAEDE,YAAY,CAACC,GAAD,EAAiB;IAC3B,KAAKnC,GAAL,CAASkC,YAAT,CAAsB,IAAAjB,YAAA,EAAOkB,GAAP,CAAtB;EACD;;EAEDC,aAAa,CAACC,IAAD,EAAmB;IAC9B,KAAKrC,GAAL,CAASoC,aAAT,CAAuB,IAAAnB,YAAA,EAAOoB,IAAP,CAAvB;EACD;;EAEDC,cAAc,CAACC,KAAD,EAAgB;IAC5B,KAAKvC,GAAL,CAASsC,cAAT,CAAwBC,KAAxB;EACD;;EAEDC,cAAc,CAACC,KAAD,EAAgB;IAC5B,KAAKzC,GAAL,CAASwC,cAAT,CAAwBC,KAAxB;EACD;;EAEDC,QAAQ,CAACC,KAAD,EAAoB;IAC1B,KAAK3C,GAAL,CAAS0C,QAAT,CAAkB;MAAEnC,KAAK,EAAEoC;IAAT,CAAlB;EACD;;AA3F2E"}
1
+ {"version":3,"names":["JsiSkPaint","HostObject","constructor","CanvasKit","ref","delete","copy","reset","Paint","getAlphaf","getColor","getStrokeCap","value","getStrokeJoin","getStrokeMiter","getStrokeWidth","setAlphaf","alpha","setAntiAlias","aa","setBlendMode","blendMode","ckEnum","setColor","color","setColorFilter","filter","JsiSkColorFilter","fromValue","setImageFilter","JsiSkImageFilter","setMaskFilter","JsiSkMaskFilter","setPathEffect","effect","JsiSkPathEffect","setShader","shader","JsiSkShader","setStrokeCap","cap","setStrokeJoin","join","setStrokeMiter","limit","setStrokeWidth","width","setStyle","style"],"sources":["JsiSkPaint.ts"],"sourcesContent":["import type { CanvasKit, Paint } from \"canvaskit-wasm\";\n\nimport type {\n StrokeJoin,\n BlendMode,\n SkColor,\n SkColorFilter,\n SkImageFilter,\n SkPaint,\n SkShader,\n StrokeCap,\n PaintStyle,\n SkMaskFilter,\n SkPathEffect,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkColorFilter } from \"./JsiSkColorFilter\";\nimport { JsiSkImageFilter } from \"./JsiSkImageFilter\";\nimport { JsiSkMaskFilter } from \"./JsiSkMaskFilter\";\nimport { JsiSkPathEffect } from \"./JsiSkPathEffect\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkPaint extends HostObject<Paint, \"Paint\"> implements SkPaint {\n constructor(CanvasKit: CanvasKit, ref: Paint) {\n super(CanvasKit, ref, \"Paint\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n copy() {\n return new JsiSkPaint(this.CanvasKit, this.ref.copy());\n }\n\n reset() {\n this.ref = new this.CanvasKit.Paint();\n }\n\n getAlphaf() {\n return this.getColor()[3];\n }\n\n getColor() {\n return this.ref.getColor();\n }\n\n getStrokeCap() {\n return this.ref.getStrokeCap().value;\n }\n\n getStrokeJoin() {\n return this.ref.getStrokeJoin().value;\n }\n\n getStrokeMiter() {\n return this.ref.getStrokeMiter();\n }\n\n getStrokeWidth() {\n return this.ref.getStrokeWidth();\n }\n\n setAlphaf(alpha: number) {\n this.ref.setAlphaf(alpha);\n }\n\n setAntiAlias(aa: boolean) {\n this.ref.setAntiAlias(aa);\n }\n\n setBlendMode(blendMode: BlendMode) {\n this.ref.setBlendMode(ckEnum(blendMode));\n }\n\n setColor(color: SkColor) {\n this.ref.setColor(color);\n }\n\n setColorFilter(filter: SkColorFilter | null) {\n this.ref.setColorFilter(filter ? JsiSkColorFilter.fromValue(filter) : null);\n }\n\n setImageFilter(filter: SkImageFilter | null) {\n this.ref.setImageFilter(filter ? JsiSkImageFilter.fromValue(filter) : null);\n }\n\n setMaskFilter(filter: SkMaskFilter | null) {\n this.ref.setMaskFilter(filter ? JsiSkMaskFilter.fromValue(filter) : null);\n }\n\n setPathEffect(effect: SkPathEffect | null) {\n this.ref.setPathEffect(effect ? JsiSkPathEffect.fromValue(effect) : null);\n }\n\n setShader(shader: SkShader | null) {\n this.ref.setShader(shader ? JsiSkShader.fromValue(shader) : null);\n }\n\n setStrokeCap(cap: StrokeCap) {\n this.ref.setStrokeCap(ckEnum(cap));\n }\n\n setStrokeJoin(join: StrokeJoin) {\n this.ref.setStrokeJoin(ckEnum(join));\n }\n\n setStrokeMiter(limit: number) {\n this.ref.setStrokeMiter(limit);\n }\n\n setStrokeWidth(width: number) {\n this.ref.setStrokeWidth(width);\n }\n\n setStyle(style: PaintStyle) {\n this.ref.setStyle({ value: style });\n }\n}\n"],"mappings":";;;;;;;AAgBA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,UAAN,SAAyBC,gBAAzB,CAAuE;EAC5EC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmC;IAC5C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,OAAtB;;IAD4C,iCAIpC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CAN6C;EAE7C;;EAMDC,IAAI,GAAG;IACL,OAAO,IAAIN,UAAJ,CAAe,KAAKG,SAApB,EAA+B,KAAKC,GAAL,CAASE,IAAT,EAA/B,CAAP;EACD;;EAEDC,KAAK,GAAG;IACN,KAAKH,GAAL,GAAW,IAAI,KAAKD,SAAL,CAAeK,KAAnB,EAAX;EACD;;EAEDC,SAAS,GAAG;IACV,OAAO,KAAKC,QAAL,GAAgB,CAAhB,CAAP;EACD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KAAK9B,GAAL,CAAS6B,aAAT,CAAuBC,MAAM,GAAGC,gCAAA,CAAgBP,SAAhB,CAA0BM,MAA1B,CAAH,GAAuC,IAApE;EACD;;EAEDE,SAAS,CAACC,MAAD,EAA0B;IACjC,KAAKjC,GAAL,CAASgC,SAAT,CAAmBC,MAAM,GAAGC,wBAAA,CAAYV,SAAZ,CAAsBS,MAAtB,CAAH,GAAmC,IAA5D;EACD;;EAEDE,YAAY,CAACC,GAAD,EAAiB;IAC3B,KAAKpC,GAAL,CAASmC,YAAT,CAAsB,IAAAjB,YAAA,EAAOkB,GAAP,CAAtB;EACD;;EAEDC,aAAa,CAACC,IAAD,EAAmB;IAC9B,KAAKtC,GAAL,CAASqC,aAAT,CAAuB,IAAAnB,YAAA,EAAOoB,IAAP,CAAvB;EACD;;EAEDC,cAAc,CAACC,KAAD,EAAgB;IAC5B,KAAKxC,GAAL,CAASuC,cAAT,CAAwBC,KAAxB;EACD;;EAEDC,cAAc,CAACC,KAAD,EAAgB;IAC5B,KAAK1C,GAAL,CAASyC,cAAT,CAAwBC,KAAxB;EACD;;EAEDC,QAAQ,CAACC,KAAD,EAAoB;IAC1B,KAAK5C,GAAL,CAAS2C,QAAT,CAAkB;MAAEnC,KAAK,EAAEoC;IAAT,CAAlB;EACD;;AA/F2E"}
@@ -5,6 +5,7 @@ import { JsiSkPoint } from "./JsiSkPoint";
5
5
  import { JsiSkRect } from "./JsiSkRect";
6
6
  export declare class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
7
7
  constructor(CanvasKit: CanvasKit, ref: Path);
8
+ dispose: () => void;
8
9
  addPath(src: SkPath, matrix?: SkMatrix, extend?: boolean): this;
9
10
  addArc(oval: SkRect, startAngleInDegrees: number, sweepAngleInDegrees: number): this;
10
11
  addOval(oval: SkRect, isCCW?: boolean, startIndex?: number): this;
@@ -17,6 +17,8 @@ var _JsiSkRRect = require("./JsiSkRRect");
17
17
 
18
18
  var _JsiSkMatrix = require("./JsiSkMatrix");
19
19
 
20
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
21
+
20
22
  const CommandCount = {
21
23
  [_types.PathVerb.Move]: 3,
22
24
  [_types.PathVerb.Line]: 3,
@@ -29,6 +31,10 @@ const CommandCount = {
29
31
  class JsiSkPath extends _Host.HostObject {
30
32
  constructor(CanvasKit, ref) {
31
33
  super(CanvasKit, ref, "Path");
34
+
35
+ _defineProperty(this, "dispose", () => {
36
+ this.ref.delete();
37
+ });
32
38
  }
33
39
 
34
40
  addPath(src, matrix) {
@@ -1 +1 @@
1
- {"version":3,"names":["CommandCount","PathVerb","Move","Line","Quad","Conic","Cubic","Close","JsiSkPath","HostObject","constructor","CanvasKit","ref","addPath","src","matrix","extend","args","fromValue","JsiSkMatrix","addArc","oval","startAngleInDegrees","sweepAngleInDegrees","JsiSkRect","addOval","isCCW","startIndex","countPoints","addPoly","points","close","map","p","Array","from","JsiSkPoint","flat","moveTo","x","y","lineTo","makeAsWinding","result","offset","dx","dy","rArcTo","rx","ry","xAxisRotateInDegrees","useSmallArc","rConicTo","dx1","dy1","dx2","dy2","w","rCubicTo","cpx1","cpy1","cpx2","cpy2","rMoveTo","rLineTo","rQuadTo","x1","y1","x2","y2","setFillType","fill","ckEnum","setIsVolatile","volatile","stroke","opts","undefined","width","miter_limit","precision","join","optEnum","cap","reset","rewind","computeTightBounds","arcToOval","forceMoveTo","arcToRotated","arcToTangent","radius","conicTo","contains","copy","cubicTo","dash","on","off","phase","equals","other","getBounds","getFillType","value","quadTo","addRect","rect","addRRect","rrect","JsiSkRRect","getPoint","index","isEmpty","isVolatile","addCircle","r","getLastPt","op","path","simplify","toSVGString","trim","startT","stopT","isComplement","transform","m3","interpolate","end","t","Path","MakeFromPathInterpolation","isInterpolatable","path2","CanInterpolate","toCmds","cmds","reduce","acc","cmd","i","push","current","length"],"sources":["JsiSkPath.ts"],"sourcesContent":["import type { CanvasKit, Path } from \"canvaskit-wasm\";\n\nimport { PathVerb } from \"../types\";\nimport type {\n FillType,\n PathCommand,\n PathOp,\n SkMatrix,\n SkPath,\n SkPoint,\n SkRect,\n SkRRect,\n StrokeOpts,\n} from \"../types\";\n\nimport { ckEnum, HostObject, optEnum } from \"./Host\";\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\n\nconst CommandCount = {\n [PathVerb.Move]: 3,\n [PathVerb.Line]: 3,\n [PathVerb.Quad]: 5,\n [PathVerb.Conic]: 6,\n [PathVerb.Cubic]: 7,\n [PathVerb.Close]: 1,\n};\n\nexport class JsiSkPath extends HostObject<Path, \"Path\"> implements SkPath {\n constructor(CanvasKit: CanvasKit, ref: Path) {\n super(CanvasKit, ref, \"Path\");\n }\n\n addPath(src: SkPath, matrix?: SkMatrix, extend = false) {\n const args = [\n JsiSkPath.fromValue(src),\n ...(matrix ? JsiSkMatrix.fromValue<Float32Array>(matrix) : []),\n extend,\n ];\n this.ref.addPath(...args);\n return this;\n }\n\n addArc(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number\n ) {\n this.ref.addArc(\n JsiSkRect.fromValue(this.CanvasKit, oval),\n startAngleInDegrees,\n sweepAngleInDegrees\n );\n return this;\n }\n\n addOval(oval: SkRect, isCCW?: boolean, startIndex?: number) {\n this.ref.addOval(\n JsiSkRect.fromValue(this.CanvasKit, oval),\n isCCW,\n startIndex\n );\n return this;\n }\n\n countPoints() {\n return this.ref.countPoints();\n }\n\n addPoly(points: SkPoint[], close: boolean) {\n this.ref.addPoly(\n points.map((p) => Array.from(JsiSkPoint.fromValue(p))).flat(),\n close\n );\n return this;\n }\n\n moveTo(x: number, y: number) {\n this.ref.moveTo(x, y);\n return this;\n }\n\n lineTo(x: number, y: number) {\n this.ref.lineTo(x, y);\n return this;\n }\n\n makeAsWinding() {\n const result = this.ref.makeAsWinding();\n return result === null ? result : this;\n }\n\n offset(dx: number, dy: number) {\n this.ref.offset(dx, dy);\n return this;\n }\n\n rArcTo(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n dx: number,\n dy: number\n ) {\n this.ref.rArcTo(rx, ry, xAxisRotateInDegrees, useSmallArc, isCCW, dx, dy);\n return this;\n }\n\n rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number) {\n this.ref.rConicTo(dx1, dy1, dx2, dy2, w);\n return this;\n }\n\n rCubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ) {\n this.ref.rCubicTo(cpx1, cpy1, cpx2, cpy2, x, y);\n return this;\n }\n\n rMoveTo(x: number, y: number) {\n this.ref.rMoveTo(x, y);\n return this;\n }\n\n rLineTo(x: number, y: number) {\n this.ref.rLineTo(x, y);\n return this;\n }\n\n rQuadTo(x1: number, y1: number, x2: number, y2: number) {\n this.ref.rQuadTo(x1, y1, x2, y2);\n return this;\n }\n\n setFillType(fill: FillType) {\n this.ref.setFillType(ckEnum(fill));\n }\n\n setIsVolatile(volatile: boolean) {\n this.ref.setIsVolatile(volatile);\n }\n\n stroke(opts?: StrokeOpts) {\n const result = this.ref.stroke(\n opts === undefined\n ? undefined\n : {\n width: opts.width,\n // eslint-disable-next-line camelcase\n miter_limit: opts.width,\n precision: opts.width,\n join: optEnum(opts.join),\n cap: optEnum(opts.cap),\n }\n );\n return result === null ? result : this;\n }\n\n close() {\n this.ref.close();\n }\n\n reset() {\n this.ref.reset();\n }\n\n rewind() {\n this.ref.rewind();\n }\n\n computeTightBounds(): SkRect {\n return new JsiSkRect(this.CanvasKit, this.ref.computeTightBounds());\n }\n\n arcToOval(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number,\n forceMoveTo: boolean\n ) {\n this.ref.arcToOval(\n JsiSkRect.fromValue(this.CanvasKit, oval),\n startAngleInDegrees,\n sweepAngleInDegrees,\n forceMoveTo\n );\n return this;\n }\n\n arcToRotated(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n x: number,\n y: number\n ) {\n this.ref.arcToRotated(\n rx,\n ry,\n xAxisRotateInDegrees,\n useSmallArc,\n isCCW,\n x,\n y\n );\n return this;\n }\n\n arcToTangent(x1: number, y1: number, x2: number, y2: number, radius: number) {\n this.ref.arcToTangent(x1, y1, x2, y2, radius);\n return this;\n }\n\n conicTo(x1: number, y1: number, x2: number, y2: number, w: number) {\n this.ref.conicTo(x1, y1, x2, y2, w);\n return this;\n }\n\n contains(x: number, y: number) {\n return this.ref.contains(x, y);\n }\n\n copy() {\n return new JsiSkPath(this.CanvasKit, this.ref.copy());\n }\n\n cubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ) {\n this.ref.cubicTo(cpx1, cpy1, cpx2, cpy2, x, y);\n return this;\n }\n\n dash(on: number, off: number, phase: number) {\n return this.ref.dash(on, off, phase);\n }\n\n equals(other: SkPath) {\n return this.ref.equals(JsiSkPath.fromValue(other));\n }\n\n getBounds() {\n return new JsiSkRect(this.CanvasKit, this.ref.getBounds());\n }\n\n getFillType() {\n return this.ref.getFillType().value;\n }\n\n quadTo(x1: number, y1: number, x2: number, y2: number) {\n this.ref.quadTo(x1, y1, x2, y2);\n }\n\n addRect(rect: SkRect, isCCW?: boolean) {\n this.ref.addRect(JsiSkRect.fromValue(this.CanvasKit, rect), isCCW);\n }\n\n addRRect(rrect: SkRRect, isCCW?: boolean) {\n this.ref.addRRect(JsiSkRRect.fromValue(this.CanvasKit, rrect), isCCW);\n return this;\n }\n\n getPoint(index: number) {\n return new JsiSkPoint(this.CanvasKit, this.ref.getPoint(index));\n }\n\n isEmpty() {\n return this.ref.isEmpty();\n }\n\n isVolatile() {\n return this.ref.isVolatile();\n }\n\n addCircle(x: number, y: number, r: number) {\n this.ref.addCircle(x, y, r);\n return this;\n }\n\n getLastPt() {\n return new JsiSkPoint(\n this.CanvasKit,\n this.ref.getPoint(this.ref.countPoints() - 1)\n );\n }\n\n op(path: SkPath, op: PathOp) {\n return this.ref.op(JsiSkPath.fromValue(path), ckEnum(op));\n }\n\n simplify() {\n return this.ref.simplify();\n }\n\n toSVGString() {\n return this.ref.toSVGString();\n }\n\n trim(startT: number, stopT: number, isComplement: boolean) {\n const result = this.ref.trim(startT, stopT, isComplement);\n return result === null ? result : this;\n }\n\n transform(m3: SkMatrix) {\n this.ref.transform(JsiSkMatrix.fromValue(m3));\n }\n\n interpolate(end: SkPath, t: number) {\n const path = this.CanvasKit.Path.MakeFromPathInterpolation(\n this.ref,\n JsiSkPath.fromValue(end),\n t\n );\n if (path === null) {\n return null;\n }\n return new JsiSkPath(this.CanvasKit, path);\n }\n\n isInterpolatable(path2: SkPath): boolean {\n return this.CanvasKit.Path.CanInterpolate(\n this.ref,\n JsiSkPath.fromValue(path2)\n );\n }\n\n toCmds() {\n const cmds = this.ref.toCmds();\n const result = cmds.reduce<PathCommand[]>((acc, cmd, i) => {\n if (i === 0) {\n acc.push([]);\n }\n const current = acc[acc.length - 1];\n if (current.length === 0) {\n current.push(cmd);\n const length = CommandCount[current[0] as PathVerb];\n if (current.length === length && i !== cmds.length - 1) {\n acc.push([]);\n }\n } else {\n const length = CommandCount[current[0] as PathVerb];\n if (current.length < length) {\n current.push(cmd);\n }\n if (current.length === length && i !== cmds.length - 1) {\n acc.push([]);\n }\n }\n return acc;\n }, []);\n return result;\n }\n}\n"],"mappings":";;;;;;;AAEA;;AAaA;;AACA;;AACA;;AACA;;AACA;;AAEA,MAAMA,YAAY,GAAG;EACnB,CAACC,eAAA,CAASC,IAAV,GAAiB,CADE;EAEnB,CAACD,eAAA,CAASE,IAAV,GAAiB,CAFE;EAGnB,CAACF,eAAA,CAASG,IAAV,GAAiB,CAHE;EAInB,CAACH,eAAA,CAASI,KAAV,GAAkB,CAJC;EA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K,CAAV,EAAa;QACXF,GAAG,CAACG,IAAJ,CAAS,EAAT;MACD;;MACD,MAAMC,OAAO,GAAGJ,GAAG,CAACA,GAAG,CAACK,MAAJ,GAAa,CAAd,CAAnB;;MACA,IAAID,OAAO,CAACC,MAAR,KAAmB,CAAvB,EAA0B;QACxBD,OAAO,CAACD,IAAR,CAAaF,GAAb;QACA,MAAMI,MAAM,GAAGhJ,YAAY,CAAC+I,OAAO,CAAC,CAAD,CAAR,CAA3B;;QACA,IAAIA,OAAO,CAACC,MAAR,KAAmBA,MAAnB,IAA6BH,CAAC,KAAKJ,IAAI,CAACO,MAAL,GAAc,CAArD,EAAwD;UACtDL,GAAG,CAACG,IAAJ,CAAS,EAAT;QACD;MACF,CAND,MAMO;QACL,MAAME,MAAM,GAAGhJ,YAAY,CAAC+I,OAAO,CAAC,CAAD,CAAR,CAA3B;;QACA,IAAIA,OAAO,CAACC,MAAR,GAAiBA,MAArB,EAA6B;UAC3BD,OAAO,CAACD,IAAR,CAAaF,GAAb;QACD;;QACD,IAAIG,OAAO,CAACC,MAAR,KAAmBA,MAAnB,IAA6BH,CAAC,KAAKJ,IAAI,CAACO,MAAL,GAAc,CAArD,EAAwD;UACtDL,GAAG,CAACG,IAAJ,CAAS,EAAT;QACD;MACF;;MACD,OAAOH,GAAP;IACD,CArBc,EAqBZ,EArBY,CAAf;IAsBA,OAAOhG,MAAP;EACD;;AAlVuE"}
1
+ {"version":3,"names":["CommandCount","PathVerb","Move","Line","Quad","Conic","Cubic","Close","JsiSkPath","HostObject","constructor","CanvasKit","ref","delete","addPath","src","matrix","extend","args","fromValue","JsiSkMatrix","addArc","oval","startAngleInDegrees","sweepAngleInDegrees","JsiSkRect","addOval","isCCW","startIndex","countPoints","addPoly","points","close","map","p","Array","from","JsiSkPoint","flat","moveTo","x","y","lineTo","makeAsWinding","result","offset","dx","dy","rArcTo","rx","ry","xAxisRotateInDegrees","useSmallArc","rConicTo","dx1","dy1","dx2","dy2","w","rCubicTo","cpx1","cpy1","cpx2","cpy2","rMoveTo","rLineTo","rQuadTo","x1","y1","x2","y2","setFillType","fill","ckEnum","setIsVolatile","volatile","stroke","opts","undefined","width","miter_limit","precision","join","optEnum","cap","reset","rewind","computeTightBounds","arcToOval","forceMoveTo","arcToRotated","arcToTangent","radius","conicTo","contains","copy","cubicTo","dash","on","off","phase","equals","other","getBounds","getFillType","value","quadTo","addRect","rect","addRRect","rrect","JsiSkRRect","getPoint","index","isEmpty","isVolatile","addCircle","r","getLastPt","op","path","simplify","toSVGString","trim","startT","stopT","isComplement","transform","m3","interpolate","end","t","Path","MakeFromPathInterpolation","isInterpolatable","path2","CanInterpolate","toCmds","cmds","reduce","acc","cmd","i","push","current","length"],"sources":["JsiSkPath.ts"],"sourcesContent":["import type { CanvasKit, Path } from \"canvaskit-wasm\";\n\nimport { PathVerb } from \"../types\";\nimport type {\n FillType,\n PathCommand,\n PathOp,\n SkMatrix,\n SkPath,\n SkPoint,\n SkRect,\n SkRRect,\n StrokeOpts,\n} from \"../types\";\n\nimport { ckEnum, HostObject, optEnum } from \"./Host\";\nimport { JsiSkPoint } from \"./JsiSkPoint\";\nimport { JsiSkRect } from \"./JsiSkRect\";\nimport { JsiSkRRect } from \"./JsiSkRRect\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\n\nconst CommandCount = {\n [PathVerb.Move]: 3,\n [PathVerb.Line]: 3,\n [PathVerb.Quad]: 5,\n [PathVerb.Conic]: 6,\n [PathVerb.Cubic]: 7,\n [PathVerb.Close]: 1,\n};\n\nexport class JsiSkPath extends HostObject<Path, \"Path\"> implements SkPath {\n constructor(CanvasKit: CanvasKit, ref: Path) {\n super(CanvasKit, ref, \"Path\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n addPath(src: SkPath, matrix?: SkMatrix, extend = false) {\n const args = [\n JsiSkPath.fromValue(src),\n ...(matrix ? JsiSkMatrix.fromValue<Float32Array>(matrix) : []),\n extend,\n ];\n this.ref.addPath(...args);\n return this;\n }\n\n addArc(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number\n ) {\n this.ref.addArc(\n JsiSkRect.fromValue(this.CanvasKit, oval),\n startAngleInDegrees,\n sweepAngleInDegrees\n );\n return this;\n }\n\n addOval(oval: SkRect, isCCW?: boolean, startIndex?: number) {\n this.ref.addOval(\n JsiSkRect.fromValue(this.CanvasKit, oval),\n isCCW,\n startIndex\n );\n return this;\n }\n\n countPoints() {\n return this.ref.countPoints();\n }\n\n addPoly(points: SkPoint[], close: boolean) {\n this.ref.addPoly(\n points.map((p) => Array.from(JsiSkPoint.fromValue(p))).flat(),\n close\n );\n return this;\n }\n\n moveTo(x: number, y: number) {\n this.ref.moveTo(x, y);\n return this;\n }\n\n lineTo(x: number, y: number) {\n this.ref.lineTo(x, y);\n return this;\n }\n\n makeAsWinding() {\n const result = this.ref.makeAsWinding();\n return result === null ? result : this;\n }\n\n offset(dx: number, dy: number) {\n this.ref.offset(dx, dy);\n return this;\n }\n\n rArcTo(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n dx: number,\n dy: number\n ) {\n this.ref.rArcTo(rx, ry, xAxisRotateInDegrees, useSmallArc, isCCW, dx, dy);\n return this;\n }\n\n rConicTo(dx1: number, dy1: number, dx2: number, dy2: number, w: number) {\n this.ref.rConicTo(dx1, dy1, dx2, dy2, w);\n return this;\n }\n\n rCubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ) {\n this.ref.rCubicTo(cpx1, cpy1, cpx2, cpy2, x, y);\n return this;\n }\n\n rMoveTo(x: number, y: number) {\n this.ref.rMoveTo(x, y);\n return this;\n }\n\n rLineTo(x: number, y: number) {\n this.ref.rLineTo(x, y);\n return this;\n }\n\n rQuadTo(x1: number, y1: number, x2: number, y2: number) {\n this.ref.rQuadTo(x1, y1, x2, y2);\n return this;\n }\n\n setFillType(fill: FillType) {\n this.ref.setFillType(ckEnum(fill));\n }\n\n setIsVolatile(volatile: boolean) {\n this.ref.setIsVolatile(volatile);\n }\n\n stroke(opts?: StrokeOpts) {\n const result = this.ref.stroke(\n opts === undefined\n ? undefined\n : {\n width: opts.width,\n // eslint-disable-next-line camelcase\n miter_limit: opts.width,\n precision: opts.width,\n join: optEnum(opts.join),\n cap: optEnum(opts.cap),\n }\n );\n return result === null ? result : this;\n }\n\n close() {\n this.ref.close();\n }\n\n reset() {\n this.ref.reset();\n }\n\n rewind() {\n this.ref.rewind();\n }\n\n computeTightBounds(): SkRect {\n return new JsiSkRect(this.CanvasKit, this.ref.computeTightBounds());\n }\n\n arcToOval(\n oval: SkRect,\n startAngleInDegrees: number,\n sweepAngleInDegrees: number,\n forceMoveTo: boolean\n ) {\n this.ref.arcToOval(\n JsiSkRect.fromValue(this.CanvasKit, oval),\n startAngleInDegrees,\n sweepAngleInDegrees,\n forceMoveTo\n );\n return this;\n }\n\n arcToRotated(\n rx: number,\n ry: number,\n xAxisRotateInDegrees: number,\n useSmallArc: boolean,\n isCCW: boolean,\n x: number,\n y: number\n ) {\n this.ref.arcToRotated(\n rx,\n ry,\n xAxisRotateInDegrees,\n useSmallArc,\n isCCW,\n x,\n y\n );\n return this;\n }\n\n arcToTangent(x1: number, y1: number, x2: number, y2: number, radius: number) {\n this.ref.arcToTangent(x1, y1, x2, y2, radius);\n return this;\n }\n\n conicTo(x1: number, y1: number, x2: number, y2: number, w: number) {\n this.ref.conicTo(x1, y1, x2, y2, w);\n return this;\n }\n\n contains(x: number, y: number) {\n return this.ref.contains(x, y);\n }\n\n copy() {\n return new JsiSkPath(this.CanvasKit, this.ref.copy());\n }\n\n cubicTo(\n cpx1: number,\n cpy1: number,\n cpx2: number,\n cpy2: number,\n x: number,\n y: number\n ) {\n this.ref.cubicTo(cpx1, cpy1, cpx2, cpy2, x, y);\n return this;\n }\n\n dash(on: number, off: number, phase: number) {\n return this.ref.dash(on, off, phase);\n }\n\n equals(other: SkPath) {\n return this.ref.equals(JsiSkPath.fromValue(other));\n }\n\n getBounds() {\n return new JsiSkRect(this.CanvasKit, this.ref.getBounds());\n }\n\n getFillType() {\n return this.ref.getFillType().value;\n }\n\n quadTo(x1: number, y1: number, x2: number, y2: number) {\n this.ref.quadTo(x1, y1, x2, y2);\n }\n\n addRect(rect: SkRect, isCCW?: boolean) {\n this.ref.addRect(JsiSkRect.fromValue(this.CanvasKit, rect), isCCW);\n }\n\n addRRect(rrect: SkRRect, isCCW?: boolean) {\n this.ref.addRRect(JsiSkRRect.fromValue(this.CanvasKit, rrect), isCCW);\n return this;\n }\n\n getPoint(index: number) {\n return new JsiSkPoint(this.CanvasKit, this.ref.getPoint(index));\n }\n\n isEmpty() {\n return this.ref.isEmpty();\n }\n\n isVolatile() {\n return this.ref.isVolatile();\n }\n\n addCircle(x: number, y: number, r: number) {\n this.ref.addCircle(x, y, r);\n return this;\n }\n\n getLastPt() {\n return new JsiSkPoint(\n this.CanvasKit,\n this.ref.getPoint(this.ref.countPoints() - 1)\n );\n }\n\n op(path: SkPath, op: PathOp) {\n return this.ref.op(JsiSkPath.fromValue(path), ckEnum(op));\n }\n\n simplify() {\n return this.ref.simplify();\n }\n\n toSVGString() {\n return this.ref.toSVGString();\n }\n\n trim(startT: number, stopT: number, isComplement: boolean) {\n const result = this.ref.trim(startT, stopT, isComplement);\n return result === null ? result : this;\n }\n\n transform(m3: SkMatrix) {\n this.ref.transform(JsiSkMatrix.fromValue(m3));\n }\n\n interpolate(end: SkPath, t: number) {\n const path = this.CanvasKit.Path.MakeFromPathInterpolation(\n this.ref,\n JsiSkPath.fromValue(end),\n t\n );\n if (path === null) {\n return null;\n }\n return new JsiSkPath(this.CanvasKit, path);\n }\n\n isInterpolatable(path2: SkPath): boolean {\n return this.CanvasKit.Path.CanInterpolate(\n this.ref,\n JsiSkPath.fromValue(path2)\n );\n }\n\n toCmds() {\n const cmds = this.ref.toCmds();\n const result = cmds.reduce<PathCommand[]>((acc, cmd, i) => {\n if (i === 0) {\n acc.push([]);\n }\n const current = acc[acc.length - 1];\n if (current.length === 0) {\n current.push(cmd);\n const length = CommandCount[current[0] as PathVerb];\n if (current.length === length && i !== cmds.length - 1) {\n acc.push([]);\n }\n } else {\n const length = CommandCount[current[0] as PathVerb];\n if (current.length < length) {\n current.push(cmd);\n }\n if (current.length === length && i !== cmds.length - 1) {\n acc.push([]);\n }\n }\n return acc;\n }, []);\n return result;\n }\n}\n"],"mappings":";;;;;;;AAEA;;AAaA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,YAAY,GAAG;EACnB,CAACC,eAAA,CAASC,IAAV,GAAiB,CADE;EAEnB,CAACD,eAAA,CAASE,IAAV,GAAiB,CAFE;EAGnB,CAACF,eAAA,CAASG,IAAV,GAAiB,CAHE;EAInB,CAACH,eAAA,CAASI,KAAV,GAAkB,CAJC;EAKnB,CAACJ,eAAA,CAASK,KAAV,GAAkB,CALC;EAMnB,CAACL,eAAA,CAASM,KAAV,GAAkB;AANC,CAArB;;AASO,MAAMC,SAAN,SAAwBC,gBAAxB,CAAmE;EACxEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;IAC3C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;;IAD2C,iCAInC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CAN4C;EAE5C;;EAMDC,OAAO,CAACC,GAAD,EAAcC,MAAd,EAAiD;IAAA,IAAhBC,MAAgB,uEAAP,KAAO;IACtD,MAAMC,IAAI,GAAG,CACXV,SAAS,CAACW,SAAV,CAAoBJ,GAApB,CADW,EAEX,IAAIC,MAAM,GAAGI,wBAAA,CAAYD,SAAZ,CAAoCH,MAApC,CAAH,GAAiD,EAA3D,CAFW,EAGXC,MAHW,CAAb;IAKA,KAAKL,GAAL,CAASE,OAAT,CAAiB,GAAGI,IAApB;IACA,OAAO,IAAP;EACD;;EAEDG,MAAM,CACJC,IADI,EAEJC,mBAFI,EAGJC,mBAHI,EAIJ;IACA,KAAKZ,GA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G,OAAO,CAACC,MAAR,KAAmBA,MAAnB,IAA6BH,CAAC,KAAKJ,IAAI,CAACO,MAAL,GAAc,CAArD,EAAwD;UACtDL,GAAG,CAACG,IAAJ,CAAS,EAAT;QACD;MACF;;MACD,OAAOH,GAAP;IACD,CArBc,EAqBZ,EArBY,CAAf;IAsBA,OAAOhG,MAAP;EACD;;AAtVuE"}
@@ -3,4 +3,5 @@ import type { SkPathEffect } from "../types/PathEffect";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkPathEffect extends HostObject<PathEffect, "PathEffect"> implements SkPathEffect {
5
5
  constructor(CanvasKit: CanvasKit, ref: PathEffect);
6
+ dispose: () => void;
6
7
  }
@@ -7,9 +7,15 @@ exports.JsiSkPathEffect = void 0;
7
7
 
8
8
  var _Host = require("./Host");
9
9
 
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
10
12
  class JsiSkPathEffect extends _Host.HostObject {
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "PathEffect");
15
+
16
+ _defineProperty(this, "dispose", () => {
17
+ this.ref.delete();
18
+ });
13
19
  }
14
20
 
15
21
  }
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkPathEffect","HostObject","constructor","CanvasKit","ref"],"sources":["JsiSkPathEffect.ts"],"sourcesContent":["import type { CanvasKit, PathEffect } from \"canvaskit-wasm\";\n\nimport type { SkPathEffect } from \"../types/PathEffect\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkPathEffect\n extends HostObject<PathEffect, \"PathEffect\">\n implements SkPathEffect\n{\n constructor(CanvasKit: CanvasKit, ref: PathEffect) {\n super(CanvasKit, ref, \"PathEffect\");\n }\n}\n"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,eAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAwC;IACjD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,YAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["JsiSkPathEffect","HostObject","constructor","CanvasKit","ref","delete"],"sources":["JsiSkPathEffect.ts"],"sourcesContent":["import type { CanvasKit, PathEffect } from \"canvaskit-wasm\";\n\nimport type { SkPathEffect } from \"../types/PathEffect\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkPathEffect\n extends HostObject<PathEffect, \"PathEffect\">\n implements SkPathEffect\n{\n constructor(CanvasKit: CanvasKit, ref: PathEffect) {\n super(CanvasKit, ref, \"PathEffect\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;;;;;;AAIA;;;;AAEO,MAAMA,eAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAwC;IACjD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,YAAtB;;IADiD,iCAIzC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CANkD;EAElD;;AAHH"}
@@ -4,6 +4,7 @@ import { HostObject } from "./Host";
4
4
  import { JsiSkShader } from "./JsiSkShader";
5
5
  export declare class JsiSkPicture extends HostObject<Picture, "Picture"> implements SkPicture {
6
6
  constructor(CanvasKit: CanvasKit, ref: Picture);
7
+ dispose: () => void;
7
8
  makeShader(tmx: TileMode, tmy: TileMode, mode: FilterMode, localMatrix?: SkMatrix, tileRect?: SkRect): JsiSkShader;
8
9
  serialize(): Uint8Array | null;
9
10
  }
@@ -13,10 +13,15 @@ var _JsiSkMatrix = require("./JsiSkMatrix");
13
13
 
14
14
  var _JsiSkRect = require("./JsiSkRect");
15
15
 
16
- // TODO: suggest to rename SkPicture to Picture for consistency
16
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
+
17
18
  class JsiSkPicture extends _Host.HostObject {
18
19
  constructor(CanvasKit, ref) {
19
20
  super(CanvasKit, ref, "Picture");
21
+
22
+ _defineProperty(this, "dispose", () => {
23
+ this.ref.delete();
24
+ });
20
25
  }
21
26
 
22
27
  makeShader(tmx, tmy, mode, localMatrix, tileRect) {
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkPicture","HostObject","constructor","CanvasKit","ref","makeShader","tmx","tmy","mode","localMatrix","tileRect","JsiSkShader","ckEnum","JsiSkMatrix","fromValue","undefined","JsiSkRect","serialize"],"sources":["JsiSkPicture.ts"],"sourcesContent":["// TODO: suggest to rename SkPicture to Picture for consistency\nimport type { CanvasKit, SkPicture as Picture } from \"canvaskit-wasm\";\n\nimport type {\n FilterMode,\n SkRect,\n TileMode,\n SkPicture,\n SkMatrix,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkShader } from \"./JsiSkShader\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkPicture\n extends HostObject<Picture, \"Picture\">\n implements SkPicture\n{\n constructor(CanvasKit: CanvasKit, ref: Picture) {\n super(CanvasKit, ref, \"Picture\");\n }\n\n makeShader(\n tmx: TileMode,\n tmy: TileMode,\n mode: FilterMode,\n localMatrix?: SkMatrix,\n tileRect?: SkRect\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n ckEnum(tmx),\n ckEnum(tmy),\n ckEnum(mode),\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined,\n tileRect ? JsiSkRect.fromValue(this.CanvasKit, tileRect) : undefined\n )\n );\n }\n\n serialize() {\n return this.ref.serialize();\n }\n}\n"],"mappings":";;;;;;;AAWA;;AACA;;AACA;;AACA;;AAdA;AAgBO,MAAMA,YAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;EACD;;EAEDC,UAAU,CACRC,GADQ,EAERC,GAFQ,EAGRC,IAHQ,EAIRC,WAJQ,EAKRC,QALQ,EAMR;IACA,OAAO,IAAIC,wBAAJ,CACL,KAAKR,SADA,EAEL,KAAKC,GAAL,CAASC,UAAT,CACE,IAAAO,YAAA,EAAON,GAAP,CADF,EAEE,IAAAM,YAAA,EAAOL,GAAP,CAFF,EAGE,IAAAK,YAAA,EAAOJ,IAAP,CAHF,EAIEC,WAAW,GAAGI,wBAAA,CAAYC,SAAZ,CAAsBL,WAAtB,CAAH,GAAwCM,SAJrD,EAKEL,QAAQ,GAAGM,oBAAA,CAAUF,SAAV,CAAoB,KAAKX,SAAzB,EAAoCO,QAApC,CAAH,GAAmDK,SAL7D,CAFK,CAAP;EAUD;;EAEDE,SAAS,GAAG;IACV,OAAO,KAAKb,GAAL,CAASa,SAAT,EAAP;EACD;;AA1BH"}
1
+ {"version":3,"names":["JsiSkPicture","HostObject","constructor","CanvasKit","ref","delete","makeShader","tmx","tmy","mode","localMatrix","tileRect","JsiSkShader","ckEnum","JsiSkMatrix","fromValue","undefined","JsiSkRect","serialize"],"sources":["JsiSkPicture.ts"],"sourcesContent":["// TODO: suggest to rename SkPicture to Picture for consistency\nimport type { CanvasKit, SkPicture as Picture } from \"canvaskit-wasm\";\n\nimport type {\n FilterMode,\n SkRect,\n TileMode,\n SkPicture,\n SkMatrix,\n} from \"../types\";\n\nimport { HostObject, ckEnum } from \"./Host\";\nimport { JsiSkShader } from \"./JsiSkShader\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkPicture\n extends HostObject<Picture, \"Picture\">\n implements SkPicture\n{\n constructor(CanvasKit: CanvasKit, ref: Picture) {\n super(CanvasKit, ref, \"Picture\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n makeShader(\n tmx: TileMode,\n tmy: TileMode,\n mode: FilterMode,\n localMatrix?: SkMatrix,\n tileRect?: SkRect\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n ckEnum(tmx),\n ckEnum(tmy),\n ckEnum(mode),\n localMatrix ? JsiSkMatrix.fromValue(localMatrix) : undefined,\n tileRect ? JsiSkRect.fromValue(this.CanvasKit, tileRect) : undefined\n )\n );\n }\n\n serialize() {\n return this.ref.serialize();\n }\n}\n"],"mappings":";;;;;;;AAWA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,YAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;;IAD8C,iCAItC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CAN+C;EAE/C;;EAMDC,UAAU,CACRC,GADQ,EAERC,GAFQ,EAGRC,IAHQ,EAIRC,WAJQ,EAKRC,QALQ,EAMR;IACA,OAAO,IAAIC,wBAAJ,CACL,KAAKT,SADA,EAEL,KAAKC,GAAL,CAASE,UAAT,CACE,IAAAO,YAAA,EAAON,GAAP,CADF,EAEE,IAAAM,YAAA,EAAOL,GAAP,CAFF,EAGE,IAAAK,YAAA,EAAOJ,IAAP,CAHF,EAIEC,WAAW,GAAGI,wBAAA,CAAYC,SAAZ,CAAsBL,WAAtB,CAAH,GAAwCM,SAJrD,EAKEL,QAAQ,GAAGM,oBAAA,CAAUF,SAAV,CAAoB,KAAKZ,SAAzB,EAAoCQ,QAApC,CAAH,GAAmDK,SAL7D,CAFK,CAAP;EAUD;;EAEDE,SAAS,GAAG;IACV,OAAO,KAAKd,GAAL,CAASc,SAAT,EAAP;EACD;;AA9BH"}
@@ -6,6 +6,7 @@ import { JsiSkCanvas } from "./JsiSkCanvas";
6
6
  import { JsiSkPicture } from "./JsiSkPicture";
7
7
  export declare class JsiSkPictureRecorder extends HostObject<PictureRecorder, "PictureRecorder"> implements SkPictureRecorder {
8
8
  constructor(CanvasKit: CanvasKit, ref: PictureRecorder);
9
+ dispose: () => void;
9
10
  beginRecording(bounds: SkRect): JsiSkCanvas;
10
11
  finishRecordingAsPicture(): JsiSkPicture;
11
12
  }
@@ -13,9 +13,15 @@ var _JsiSkPicture = require("./JsiSkPicture");
13
13
 
14
14
  var _JsiSkRect = require("./JsiSkRect");
15
15
 
16
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
17
+
16
18
  class JsiSkPictureRecorder extends _Host.HostObject {
17
19
  constructor(CanvasKit, ref) {
18
20
  super(CanvasKit, ref, "PictureRecorder");
21
+
22
+ _defineProperty(this, "dispose", () => {
23
+ this.ref.delete();
24
+ });
19
25
  }
20
26
 
21
27
  beginRecording(bounds) {
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkPictureRecorder","HostObject","constructor","CanvasKit","ref","beginRecording","bounds","JsiSkCanvas","JsiSkRect","fromValue","finishRecordingAsPicture","JsiSkPicture"],"sources":["JsiSkPictureRecorder.ts"],"sourcesContent":["import type { CanvasKit, PictureRecorder } from \"canvaskit-wasm\";\n\nimport type { SkRect } from \"../types\";\nimport type { SkPictureRecorder } from \"../types/Picture/PictureRecorder\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkPicture } from \"./JsiSkPicture\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkPictureRecorder\n extends HostObject<PictureRecorder, \"PictureRecorder\">\n implements SkPictureRecorder\n{\n constructor(CanvasKit: CanvasKit, ref: PictureRecorder) {\n super(CanvasKit, ref, \"PictureRecorder\");\n }\n\n beginRecording(bounds: SkRect) {\n return new JsiSkCanvas(\n this.CanvasKit,\n this.ref.beginRecording(JsiSkRect.fromValue(this.CanvasKit, bounds))\n );\n }\n\n finishRecordingAsPicture() {\n return new JsiSkPicture(\n this.CanvasKit,\n this.ref.finishRecordingAsPicture()\n );\n }\n}\n"],"mappings":";;;;;;;AAKA;;AACA;;AACA;;AACA;;AAEO,MAAMA,oBAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAA6C;IACtD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,iBAAtB;EACD;;EAEDC,cAAc,CAACC,MAAD,EAAiB;IAC7B,OAAO,IAAIC,wBAAJ,CACL,KAAKJ,SADA,EAEL,KAAKC,GAAL,CAASC,cAAT,CAAwBG,oBAAA,CAAUC,SAAV,CAAoB,KAAKN,SAAzB,EAAoCG,MAApC,CAAxB,CAFK,CAAP;EAID;;EAEDI,wBAAwB,GAAG;IACzB,OAAO,IAAIC,0BAAJ,CACL,KAAKR,SADA,EAEL,KAAKC,GAAL,CAASM,wBAAT,EAFK,CAAP;EAID;;AAjBH"}
1
+ {"version":3,"names":["JsiSkPictureRecorder","HostObject","constructor","CanvasKit","ref","delete","beginRecording","bounds","JsiSkCanvas","JsiSkRect","fromValue","finishRecordingAsPicture","JsiSkPicture"],"sources":["JsiSkPictureRecorder.ts"],"sourcesContent":["import type { CanvasKit, PictureRecorder } from \"canvaskit-wasm\";\n\nimport type { SkRect } from \"../types\";\nimport type { SkPictureRecorder } from \"../types/Picture/PictureRecorder\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkPicture } from \"./JsiSkPicture\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkPictureRecorder\n extends HostObject<PictureRecorder, \"PictureRecorder\">\n implements SkPictureRecorder\n{\n constructor(CanvasKit: CanvasKit, ref: PictureRecorder) {\n super(CanvasKit, ref, \"PictureRecorder\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n beginRecording(bounds: SkRect) {\n return new JsiSkCanvas(\n this.CanvasKit,\n this.ref.beginRecording(JsiSkRect.fromValue(this.CanvasKit, bounds))\n );\n }\n\n finishRecordingAsPicture() {\n return new JsiSkPicture(\n this.CanvasKit,\n this.ref.finishRecordingAsPicture()\n );\n }\n}\n"],"mappings":";;;;;;;AAKA;;AACA;;AACA;;AACA;;;;AAEO,MAAMA,oBAAN,SACGC,gBADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAA6C;IACtD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,iBAAtB;;IADsD,iCAI9C,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CANuD;EAEvD;;EAMDC,cAAc,CAACC,MAAD,EAAiB;IAC7B,OAAO,IAAIC,wBAAJ,CACL,KAAKL,SADA,EAEL,KAAKC,GAAL,CAASE,cAAT,CAAwBG,oBAAA,CAAUC,SAAV,CAAoB,KAAKP,SAAzB,EAAoCI,MAApC,CAAxB,CAFK,CAAP;EAID;;EAEDI,wBAAwB,GAAG;IACzB,OAAO,IAAIC,0BAAJ,CACL,KAAKT,SADA,EAEL,KAAKC,GAAL,CAASO,wBAAT,EAFK,CAAP;EAID;;AArBH"}
@@ -4,6 +4,7 @@ import { BaseHostObject } from "./Host";
4
4
  export declare class JsiSkPoint extends BaseHostObject<Point, "Point"> implements SkPoint {
5
5
  static fromValue(point: SkPoint): Float32Array;
6
6
  constructor(CanvasKit: CanvasKit, ref: Point);
7
+ dispose: () => void;
7
8
  get x(): number;
8
9
  get y(): number;
9
10
  }
@@ -7,6 +7,8 @@ exports.JsiSkPoint = void 0;
7
7
 
8
8
  var _Host = require("./Host");
9
9
 
10
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
11
+
10
12
  class JsiSkPoint extends _Host.BaseHostObject {
11
13
  static fromValue(point) {
12
14
  if (point instanceof JsiSkPoint) {
@@ -18,6 +20,9 @@ class JsiSkPoint extends _Host.BaseHostObject {
18
20
 
19
21
  constructor(CanvasKit, ref) {
20
22
  super(CanvasKit, ref, "Point");
23
+
24
+ _defineProperty(this, "dispose", () => {// Float32Array
25
+ });
21
26
  }
22
27
 
23
28
  get x() {
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkPoint","BaseHostObject","fromValue","point","ref","Float32Array","x","y","constructor","CanvasKit"],"sources":["JsiSkPoint.ts"],"sourcesContent":["import type { CanvasKit, Point } from \"canvaskit-wasm\";\n\nimport type { SkPoint } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\n\nexport class JsiSkPoint\n extends BaseHostObject<Point, \"Point\">\n implements SkPoint\n{\n static fromValue(point: SkPoint) {\n if (point instanceof JsiSkPoint) {\n return point.ref;\n }\n return new Float32Array([point.x, point.y]);\n }\n\n constructor(CanvasKit: CanvasKit, ref: Point) {\n super(CanvasKit, ref, \"Point\");\n }\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n}\n"],"mappings":";;;;;;;AAIA;;AAEO,MAAMA,UAAN,SACGC,oBADH,CAGP;EACkB,OAATC,SAAS,CAACC,KAAD,EAAiB;IAC/B,IAAIA,KAAK,YAAYH,UAArB,EAAiC;MAC/B,OAAOG,KAAK,CAACC,GAAb;IACD;;IACD,OAAO,IAAIC,YAAJ,CAAiB,CAACF,KAAK,CAACG,CAAP,EAAUH,KAAK,CAACI,CAAhB,CAAjB,CAAP;EACD;;EAEDC,WAAW,CAACC,SAAD,EAAuBL,GAAvB,EAAmC;IAC5C,MAAMK,SAAN,EAAiBL,GAAjB,EAAsB,OAAtB;EACD;;EAEI,IAADE,CAAC,GAAG;IACN,OAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;EACD;;EAEI,IAADG,CAAC,GAAG;IACN,OAAO,KAAKH,GAAL,CAAS,CAAT,CAAP;EACD;;AAlBH"}
1
+ {"version":3,"names":["JsiSkPoint","BaseHostObject","fromValue","point","ref","Float32Array","x","y","constructor","CanvasKit"],"sources":["JsiSkPoint.ts"],"sourcesContent":["import type { CanvasKit, Point } from \"canvaskit-wasm\";\n\nimport type { SkPoint } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\n\nexport class JsiSkPoint\n extends BaseHostObject<Point, \"Point\">\n implements SkPoint\n{\n static fromValue(point: SkPoint) {\n if (point instanceof JsiSkPoint) {\n return point.ref;\n }\n return new Float32Array([point.x, point.y]);\n }\n\n constructor(CanvasKit: CanvasKit, ref: Point) {\n super(CanvasKit, ref, \"Point\");\n }\n\n dispose = () => {\n // Float32Array\n };\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n}\n"],"mappings":";;;;;;;AAIA;;;;AAEO,MAAMA,UAAN,SACGC,oBADH,CAGP;EACkB,OAATC,SAAS,CAACC,KAAD,EAAiB;IAC/B,IAAIA,KAAK,YAAYH,UAArB,EAAiC;MAC/B,OAAOG,KAAK,CAACC,GAAb;IACD;;IACD,OAAO,IAAIC,YAAJ,CAAiB,CAACF,KAAK,CAACG,CAAP,EAAUH,KAAK,CAACI,CAAhB,CAAjB,CAAP;EACD;;EAEDC,WAAW,CAACC,SAAD,EAAuBL,GAAvB,EAAmC;IAC5C,MAAMK,SAAN,EAAiBL,GAAjB,EAAsB,OAAtB;;IAD4C,iCAIpC,MAAM,CACd;IACD,CAN6C;EAE7C;;EAMI,IAADE,CAAC,GAAG;IACN,OAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;EACD;;EAEI,IAADG,CAAC,GAAG;IACN,OAAO,KAAKH,GAAL,CAAS,CAAT,CAAP;EACD;;AAtBH"}
@@ -3,6 +3,7 @@ import type { SkRect, SkRRect } from "../types";
3
3
  import { BaseHostObject } from "./Host";
4
4
  import { JsiSkRect } from "./JsiSkRect";
5
5
  export declare class JsiSkRRect extends BaseHostObject<RRect, "RRect"> implements SkRRect {
6
+ dispose: () => void;
6
7
  static fromValue(CanvasKit: CanvasKit, rect: SkRRect): Float32Array;
7
8
  constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number);
8
9
  get rx(): number;
@@ -9,6 +9,8 @@ var _Host = require("./Host");
9
9
 
10
10
  var _JsiSkRect = require("./JsiSkRect");
11
11
 
12
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+
12
14
  class JsiSkRRect extends _Host.BaseHostObject {
13
15
  static fromValue(CanvasKit, rect) {
14
16
  if (rect instanceof _JsiSkRect.JsiSkRect) {
@@ -33,6 +35,9 @@ class JsiSkRRect extends _Host.BaseHostObject {
33
35
 
34
36
  const ref = CanvasKit.RRectXY(_JsiSkRect.JsiSkRect.fromValue(CanvasKit, rect), rx, ry);
35
37
  super(CanvasKit, ref, "RRect");
38
+
39
+ _defineProperty(this, "dispose", () => {// Float32Array
40
+ });
36
41
  }
37
42
 
38
43
  get rx() {