@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":["PathVerb","ckEnum","HostObject","optEnum","JsiSkPoint","JsiSkRect","JsiSkRRect","JsiSkMatrix","CommandCount","Move","Line","Quad","Conic","Cubic","Close","JsiSkPath","constructor","CanvasKit","ref","addPath","src","matrix","extend","args","fromValue","addArc","oval","startAngleInDegrees","sweepAngleInDegrees","addOval","isCCW","startIndex","countPoints","addPoly","points","close","map","p","Array","from","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","setIsVolatile","volatile","stroke","opts","undefined","width","miter_limit","precision","join","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","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,SAASA,QAAT,QAAyB,UAAzB;AAaA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,OAA7B,QAA4C,QAA5C;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,MAAMC,YAAY,GAAG;EACnB,CAACR,QAAQ,CAACS,IAAV,GAAiB,CADE;EAEnB,CAACT,QAAQ,CAACU,IAAV,GAAiB,CAFE;EAGnB,CAACV,QAAQ,CAACW,IAAV,GAAiB,CAHE;EAInB,CAACX,QAAQ,CAACY,KAAV,GAAkB,CAJC;EAKnB,CAACZ,QAAQ,CAACa,KAAV,GAAkB,CALC;EAMnB,CAACb,QAAQ,CAACc,KAAV,GAAkB;AANC,CAArB;AASA,OAAO,MAAMC,SAAN,SAAwBb,UAAxB,CAAmE;EACxEc,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAkC;IAC3C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,MAAtB;EACD;;EAEDC,OAAO,CAACC,GAAD,EAAcC,MAAd,EAAiD;IAAA,IAAhBC,MAAgB,uEAAP,KAAO;IACtD,MAAMC,IAAI,GAAG,CACXR,SAAS,CAACS,SAAV,CAAoBJ,GAApB,CADW,EAEX,IAAIC,MAAM,GAAGd,WAAW,CAACiB,SAAZ,CAAoCH,MAApC,CAAH,GAAiD,EAA3D,CAFW,EAGXC,MAHW,CAAb;IAKA,KAAKJ,GAAL,CAASC,OAAT,CAAiB,GAAGI,IAApB;IACA,OAAO,IAAP;EACD;;EAEDE,MAAM,CACJC,IADI,EAEJC,mBAFI,EAGJC,mBAHI,EAIJ;IACA,KAAKV,GAAL,CAASO,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O,MAAL,GAAc,CAArD,EAAwD;UACtDL,GAAG,CAACG,IAAJ,CAAS,EAAT;QACD;MACF;;MACD,OAAOH,GAAP;IACD,CArBc,EAqBZ,EArBY,CAAf;IAsBA,OAAO7F,MAAP;EACD;;AAlVuE"}
1
+ {"version":3,"names":["PathVerb","ckEnum","HostObject","optEnum","JsiSkPoint","JsiSkRect","JsiSkRRect","JsiSkMatrix","CommandCount","Move","Line","Quad","Conic","Cubic","Close","JsiSkPath","constructor","CanvasKit","ref","delete","addPath","src","matrix","extend","args","fromValue","addArc","oval","startAngleInDegrees","sweepAngleInDegrees","addOval","isCCW","startIndex","countPoints","addPoly","points","close","map","p","Array","from","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","setIsVolatile","volatile","stroke","opts","undefined","width","miter_limit","precision","join","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","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,SAASA,QAAT,QAAyB,UAAzB;AAaA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,OAA7B,QAA4C,QAA5C;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,MAAMC,YAAY,GAAG;EACnB,CAACR,QAAQ,CAACS,IAAV,GAAiB,CADE;EAEnB,CAACT,QAAQ,CAACU,IAAV,GAAiB,CAFE;EAGnB,CAACV,QAAQ,CAACW,IAAV,GAAiB,CAHE;EAInB,CAACX,QAAQ,CAACY,KAAV,GAAkB,CAJC;EAKnB,CAACZ,QAAQ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AK,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,GAAGzI,YAAY,CAACwI,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,GAAGzI,YAAY,CAACwI,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,OAAO7F,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
  }
@@ -1,7 +1,13 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  export class JsiSkPathEffect extends HostObject {
3
5
  constructor(CanvasKit, ref) {
4
6
  super(CanvasKit, ref, "PathEffect");
7
+
8
+ _defineProperty(this, "dispose", () => {
9
+ this.ref.delete();
10
+ });
5
11
  }
6
12
 
7
13
  }
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkPathEffect","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,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,eAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAwC;IACjD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,YAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["HostObject","JsiSkPathEffect","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,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,eAAN,SACGD,UADH,CAGP;EACEE,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
  }
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  // TODO: suggest to rename SkPicture to Picture for consistency
2
4
  import { HostObject, ckEnum } from "./Host";
3
5
  import { JsiSkShader } from "./JsiSkShader";
@@ -6,6 +8,10 @@ import { JsiSkRect } from "./JsiSkRect";
6
8
  export class JsiSkPicture extends HostObject {
7
9
  constructor(CanvasKit, ref) {
8
10
  super(CanvasKit, ref, "Picture");
11
+
12
+ _defineProperty(this, "dispose", () => {
13
+ this.ref.delete();
14
+ });
9
15
  }
10
16
 
11
17
  makeShader(tmx, tmy, mode, localMatrix, tileRect) {
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","ckEnum","JsiSkShader","JsiSkMatrix","JsiSkRect","JsiSkPicture","constructor","CanvasKit","ref","makeShader","tmx","tmy","mode","localMatrix","tileRect","fromValue","undefined","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":"AAAA;AAWA,SAASA,UAAT,EAAqBC,MAArB,QAAmC,QAAnC;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,YAAN,SACGL,UADH,CAGP;EACEM,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,IAAIZ,WAAJ,CACL,KAAKK,SADA,EAEL,KAAKC,GAAL,CAASC,UAAT,CACER,MAAM,CAACS,GAAD,CADR,EAEET,MAAM,CAACU,GAAD,CAFR,EAGEV,MAAM,CAACW,IAAD,CAHR,EAIEC,WAAW,GAAGV,WAAW,CAACY,SAAZ,CAAsBF,WAAtB,CAAH,GAAwCG,SAJrD,EAKEF,QAAQ,GAAGV,SAAS,CAACW,SAAV,CAAoB,KAAKR,SAAzB,EAAoCO,QAApC,CAAH,GAAmDE,SAL7D,CAFK,CAAP;EAUD;;EAEDC,SAAS,GAAG;IACV,OAAO,KAAKT,GAAL,CAASS,SAAT,EAAP;EACD;;AA1BH"}
1
+ {"version":3,"names":["HostObject","ckEnum","JsiSkShader","JsiSkMatrix","JsiSkRect","JsiSkPicture","constructor","CanvasKit","ref","delete","makeShader","tmx","tmy","mode","localMatrix","tileRect","fromValue","undefined","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":";;AAAA;AAWA,SAASA,UAAT,EAAqBC,MAArB,QAAmC,QAAnC;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,YAAN,SACGL,UADH,CAGP;EACEM,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,IAAIb,WAAJ,CACL,KAAKK,SADA,EAEL,KAAKC,GAAL,CAASE,UAAT,CACET,MAAM,CAACU,GAAD,CADR,EAEEV,MAAM,CAACW,GAAD,CAFR,EAGEX,MAAM,CAACY,IAAD,CAHR,EAIEC,WAAW,GAAGX,WAAW,CAACa,SAAZ,CAAsBF,WAAtB,CAAH,GAAwCG,SAJrD,EAKEF,QAAQ,GAAGX,SAAS,CAACY,SAAV,CAAoB,KAAKT,SAAzB,EAAoCQ,QAApC,CAAH,GAAmDE,SAL7D,CAFK,CAAP;EAUD;;EAEDC,SAAS,GAAG;IACV,OAAO,KAAKV,GAAL,CAASU,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
  }
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  import { JsiSkCanvas } from "./JsiSkCanvas";
3
5
  import { JsiSkPicture } from "./JsiSkPicture";
@@ -5,6 +7,10 @@ import { JsiSkRect } from "./JsiSkRect";
5
7
  export class JsiSkPictureRecorder extends HostObject {
6
8
  constructor(CanvasKit, ref) {
7
9
  super(CanvasKit, ref, "PictureRecorder");
10
+
11
+ _defineProperty(this, "dispose", () => {
12
+ this.ref.delete();
13
+ });
8
14
  }
9
15
 
10
16
  beginRecording(bounds) {
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkCanvas","JsiSkPicture","JsiSkRect","JsiSkPictureRecorder","constructor","CanvasKit","ref","beginRecording","bounds","fromValue","finishRecordingAsPicture"],"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,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,oBAAN,SACGJ,UADH,CAGP;EACEK,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAA6C;IACtD,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,iBAAtB;EACD;;EAEDC,cAAc,CAACC,MAAD,EAAiB;IAC7B,OAAO,IAAIR,WAAJ,CACL,KAAKK,SADA,EAEL,KAAKC,GAAL,CAASC,cAAT,CAAwBL,SAAS,CAACO,SAAV,CAAoB,KAAKJ,SAAzB,EAAoCG,MAApC,CAAxB,CAFK,CAAP;EAID;;EAEDE,wBAAwB,GAAG;IACzB,OAAO,IAAIT,YAAJ,CACL,KAAKI,SADA,EAEL,KAAKC,GAAL,CAASI,wBAAT,EAFK,CAAP;EAID;;AAjBH"}
1
+ {"version":3,"names":["HostObject","JsiSkCanvas","JsiSkPicture","JsiSkRect","JsiSkPictureRecorder","constructor","CanvasKit","ref","delete","beginRecording","bounds","fromValue","finishRecordingAsPicture"],"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,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,YAAT,QAA6B,gBAA7B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,oBAAN,SACGJ,UADH,CAGP;EACEK,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,IAAIT,WAAJ,CACL,KAAKK,SADA,EAEL,KAAKC,GAAL,CAASE,cAAT,CAAwBN,SAAS,CAACQ,SAAV,CAAoB,KAAKL,SAAzB,EAAoCI,MAApC,CAAxB,CAFK,CAAP;EAID;;EAEDE,wBAAwB,GAAG;IACzB,OAAO,IAAIV,YAAJ,CACL,KAAKI,SADA,EAEL,KAAKC,GAAL,CAASK,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
  }
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  import { BaseHostObject } from "./Host";
2
4
  export class JsiSkPoint extends BaseHostObject {
3
5
  static fromValue(point) {
@@ -10,6 +12,9 @@ export class JsiSkPoint extends BaseHostObject {
10
12
 
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "Point");
15
+
16
+ _defineProperty(this, "dispose", () => {// Float32Array
17
+ });
13
18
  }
14
19
 
15
20
  get x() {
@@ -1 +1 @@
1
- {"version":3,"names":["BaseHostObject","JsiSkPoint","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,SAASA,cAAT,QAA+B,QAA/B;AAEA,OAAO,MAAMC,UAAN,SACGD,cADH,CAGP;EACkB,OAATE,SAAS,CAACC,KAAD,EAAiB;IAC/B,IAAIA,KAAK,YAAYF,UAArB,EAAiC;MAC/B,OAAOE,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":["BaseHostObject","JsiSkPoint","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,SAASA,cAAT,QAA+B,QAA/B;AAEA,OAAO,MAAMC,UAAN,SACGD,cADH,CAGP;EACkB,OAATE,SAAS,CAACC,KAAD,EAAiB;IAC/B,IAAIA,KAAK,YAAYF,UAArB,EAAiC;MAC/B,OAAOE,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;
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  import { BaseHostObject } from "./Host";
2
4
  import { JsiSkRect } from "./JsiSkRect";
3
5
  export class JsiSkRRect extends BaseHostObject {
@@ -24,6 +26,9 @@ export class JsiSkRRect extends BaseHostObject {
24
26
 
25
27
  const ref = CanvasKit.RRectXY(JsiSkRect.fromValue(CanvasKit, rect), rx, ry);
26
28
  super(CanvasKit, ref, "RRect");
29
+
30
+ _defineProperty(this, "dispose", () => {// Float32Array
31
+ });
27
32
  }
28
33
 
29
34
  get rx() {
@@ -1 +1 @@
1
- {"version":3,"names":["BaseHostObject","JsiSkRect","JsiSkRRect","fromValue","CanvasKit","rect","ref","RRectXY","rx","ry","constructor","Infinity","width","height","scale","Math","min","Float32Array","of"],"sources":["JsiSkRRect.ts"],"sourcesContent":["import type { CanvasKit, RRect } from \"canvaskit-wasm\";\n\nimport type { SkRect, SkRRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkRRect\n extends BaseHostObject<RRect, \"RRect\">\n implements SkRRect\n{\n static fromValue(CanvasKit: CanvasKit, rect: SkRRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n return CanvasKit.RRectXY(\n JsiSkRect.fromValue(CanvasKit, rect.rect),\n rect.rx,\n rect.ry\n );\n }\n\n constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number) {\n // based on https://github.com/google/skia/blob/main/src/core/SkRRect.cpp#L51\n if (rx === Infinity || ry === Infinity) {\n rx = ry = 0;\n }\n if (rect.width < rx + rx || rect.height < ry + ry) {\n // At most one of these two divides will be by zero, and neither numerator is zero.\n const scale = Math.min(rect.width / (rx + rx), rect.height / (ry + ry));\n rx *= scale;\n ry *= scale;\n }\n const ref = CanvasKit.RRectXY(JsiSkRect.fromValue(CanvasKit, rect), rx, ry);\n super(CanvasKit, ref, \"RRect\");\n }\n\n get rx() {\n return this.ref[4];\n }\n\n get ry() {\n return this.ref[5];\n }\n\n get rect() {\n return new JsiSkRect(\n this.CanvasKit,\n Float32Array.of(this.ref[0], this.ref[1], this.ref[2], this.ref[3])\n );\n }\n}\n"],"mappings":"AAIA,SAASA,cAAT,QAA+B,QAA/B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AAKH,GAAL,CAAS,CAAT,CAAP;EACD;;EAEO,IAAJD,IAAI,GAAG;IACT,OAAO,IAAIJ,SAAJ,CACL,KAAKG,SADA,EAELa,YAAY,CAACC,EAAb,CAAgB,KAAKZ,GAAL,CAAS,CAAT,CAAhB,EAA6B,KAAKA,GAAL,CAAS,CAAT,CAA7B,EAA0C,KAAKA,GAAL,CAAS,CAAT,CAA1C,EAAuD,KAAKA,GAAL,CAAS,CAAT,CAAvD,CAFK,CAAP;EAID;;AAxCH"}
1
+ {"version":3,"names":["BaseHostObject","JsiSkRect","JsiSkRRect","fromValue","CanvasKit","rect","ref","RRectXY","rx","ry","constructor","Infinity","width","height","scale","Math","min","Float32Array","of"],"sources":["JsiSkRRect.ts"],"sourcesContent":["import type { CanvasKit, RRect } from \"canvaskit-wasm\";\n\nimport type { SkRect, SkRRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkRRect\n extends BaseHostObject<RRect, \"RRect\">\n implements SkRRect\n{\n dispose = () => {\n // Float32Array\n };\n\n static fromValue(CanvasKit: CanvasKit, rect: SkRRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n return CanvasKit.RRectXY(\n JsiSkRect.fromValue(CanvasKit, rect.rect),\n rect.rx,\n rect.ry\n );\n }\n\n constructor(CanvasKit: CanvasKit, rect: SkRect, rx: number, ry: number) {\n // based on https://github.com/google/skia/blob/main/src/core/SkRRect.cpp#L51\n if (rx === Infinity || ry === Infinity) {\n rx = ry = 0;\n }\n if (rect.width < rx + rx || rect.height < ry + ry) {\n // At most one of these two divides will be by zero, and neither numerator is zero.\n const scale = Math.min(rect.width / (rx + rx), rect.height / (ry + ry));\n rx *= scale;\n ry *= scale;\n }\n const ref = CanvasKit.RRectXY(JsiSkRect.fromValue(CanvasKit, rect), rx, ry);\n super(CanvasKit, ref, \"RRect\");\n }\n\n get rx() {\n return this.ref[4];\n }\n\n get ry() {\n return this.ref[5];\n }\n\n get rect() {\n return new JsiSkRect(\n this.CanvasKit,\n Float32Array.of(this.ref[0], this.ref[1], this.ref[2], this.ref[3])\n );\n }\n}\n"],"mappings":";;AAIA,SAASA,cAAT,QAA+B,QAA/B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,UAAN,SACGF,cADH,CAGP;EAKkB,OAATG,SAAS,CAACC,SAAD,EAAuBC,IAAvB,EAAsC;IACpD,IAAIA,IAAI,YAAYJ,SAApB,EAA+B;MAC7B,OAAOI,IAAI,CAACC,GAAZ;IACD;;IACD,OAAOF,SAAS,CAACG,OAAV,CACLN,SAAS,CAACE,SAAV,CAAoBC,SAApB,EAA+BC,IAAI,CAACA,IAApC,CADK,EAELA,IAAI,CAACG,EAFA,EAGLH,IAAI,CAACI,EAHA,CAAP;EAKD;;EAEDC,WAAW,CAACN,SAAD,EAAuBC,IAAvB,EAAqCG,EAArC,EAAiDC,EAAjD,EAA6D;IACtE;IACA,IAAID,EAAE,KAAKG,QAAP,IAAmBF,EAAE,KAAKE,QAA9B,EAAwC;MACtCH,EAAE,GAAGC,EAAE,GAAG,CAAV;IACD;;IACD,IAAIJ,IAAI,CAACO,KAAL,GAAaJ,EAAE,GAAGA,EAAlB,IAAwBH,IAAI,CAACQ,MAAL,GAAcJ,EAAE,GAAGA,EAA/C,EAAmD;MACjD;MACA,MAAMK,KAAK,GAAGC,IAAI,CAACC,GAAL,CAASX,IAAI,CAACO,KAAL,IAAcJ,EAAE,GAAGA,EAAnB,CAAT,EAAiCH,IAAI,CAACQ,MAAL,IAAeJ,EAAE,GAAGA,EAApB,CAAjC,CAAd;MACAD,EAAE,IAAIM,KAAN;MACAL,EAAE,IAAIK,KAAN;IACD;;IACD,MAAMR,GAAG,GAAGF,SAAS,CAACG,OAAV,CAAkBN,SAAS,CAACE,SAAV,CAAoBC,SAApB,EAA+BC,IAA/B,CAAlB,EAAwDG,EAAxD,EAA4DC,EAA5D,CAAZ;IACA,MAAML,SAAN,EAAiBE,GAAjB,EAAsB,OAAtB;;IAZsE,iCAf9D,MAAM,CACd;IACD,CAauE;EAavE;;EAEK,IAAFE,EAAE,GAAG;IACP,OAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;EACD;;EAEK,IAAFG,EAAE,GAAG;IACP,OAAO,KAAKH,GAAL,CAAS,CAAT,CAAP;EACD;;EAEO,IAAJD,IAAI,GAAG;IACT,OAAO,IAAIJ,SAAJ,CACL,KAAKG,SADA,EAELa,YAAY,CAACC,EAAb,CAAgB,KAAKZ,GAAL,CAAS,CAAT,CAAhB,EAA6B,KAAKA,GAAL,CAAS,CAAT,CAA7B,EAA0C,KAAKA,GAAL,CAAS,CAAT,CAA1C,EAAuD,KAAKA,GAAL,CAAS,CAAT,CAAvD,CAFK,CAAP;EAID;;AA5CH"}
@@ -4,4 +4,5 @@ import { HostObject } from "./Host";
4
4
  export declare type RSXform = Float32Array;
5
5
  export declare class JsiSkRSXform extends HostObject<RSXform, "RSXform"> implements SkRSXform {
6
6
  constructor(CanvasKit: CanvasKit, ref: RSXform);
7
+ dispose: () => void;
7
8
  }
@@ -1,7 +1,12 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  export class JsiSkRSXform extends HostObject {
3
5
  constructor(CanvasKit, ref) {
4
6
  super(CanvasKit, ref, "RSXform");
7
+
8
+ _defineProperty(this, "dispose", () => {// Do nothing in the web implementation
9
+ });
5
10
  }
6
11
 
7
12
  }
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkRSXform","constructor","CanvasKit","ref"],"sources":["JsiSkRSXform.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkRSXform } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport type RSXform = Float32Array;\n\nexport class JsiSkRSXform\n extends HostObject<RSXform, \"RSXform\">\n implements SkRSXform\n{\n constructor(CanvasKit: CanvasKit, ref: RSXform) {\n super(CanvasKit, ref, \"RSXform\");\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAIA,OAAO,MAAMC,YAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["HostObject","JsiSkRSXform","constructor","CanvasKit","ref"],"sources":["JsiSkRSXform.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkRSXform } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport type RSXform = Float32Array;\n\nexport class JsiSkRSXform\n extends HostObject<RSXform, \"RSXform\">\n implements SkRSXform\n{\n constructor(CanvasKit: CanvasKit, ref: RSXform) {\n super(CanvasKit, ref, \"RSXform\");\n }\n\n dispose = () => {\n // Do nothing in the web implementation\n };\n}\n"],"mappings":";;AAIA,SAASA,UAAT,QAA2B,QAA3B;AAIA,OAAO,MAAMC,YAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;;IAD8C,iCAItC,MAAM,CACd;IACD,CAN+C;EAE/C;;AAHH"}
@@ -3,6 +3,7 @@ import type { SkRect } from "../types";
3
3
  import { BaseHostObject } from "./Host";
4
4
  export declare class JsiSkRect extends BaseHostObject<Rect, "Rect"> implements SkRect {
5
5
  static fromValue(CanvasKit: CanvasKit, rect: SkRect): Float32Array;
6
+ dispose: () => void;
6
7
  constructor(CanvasKit: CanvasKit, ref: Rect);
7
8
  get x(): number;
8
9
  get y(): number;
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  import { BaseHostObject } from "./Host";
2
4
  export class JsiSkRect extends BaseHostObject {
3
5
  static fromValue(CanvasKit, rect) {
@@ -10,6 +12,9 @@ export class JsiSkRect extends BaseHostObject {
10
12
 
11
13
  constructor(CanvasKit, ref) {
12
14
  super(CanvasKit, ref, "Rect");
15
+
16
+ _defineProperty(this, "dispose", () => {// Float32Array
17
+ });
13
18
  }
14
19
 
15
20
  get x() {
@@ -1 +1 @@
1
- {"version":3,"names":["BaseHostObject","JsiSkRect","fromValue","CanvasKit","rect","ref","XYWHRect","x","y","width","height","constructor"],"sources":["JsiSkRect.ts"],"sourcesContent":["import type { CanvasKit, Rect } from \"canvaskit-wasm\";\n\nimport type { SkRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\n\nexport class JsiSkRect extends BaseHostObject<Rect, \"Rect\"> implements SkRect {\n static fromValue(CanvasKit: CanvasKit, rect: SkRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n return CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height);\n }\n\n constructor(CanvasKit: CanvasKit, ref: Rect) {\n super(CanvasKit, ref, \"Rect\");\n }\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n\n get width() {\n return this.ref[2] - this.ref[0];\n }\n\n get height() {\n return this.ref[3] - this.ref[1];\n }\n}\n"],"mappings":"AAIA,SAASA,cAAT,QAA+B,QAA/B;AAEA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAAuE;EAC5D,OAATE,SAAS,CAACC,SAAD,EAAuBC,IAAvB,EAAqC;IACnD,IAAIA,IAAI,YAAYH,SAApB,EAA+B;MAC7B,OAAOG,IAAI,CAACC,GAAZ;IACD;;IACD,OAAOF,SAAS,CAACG,QAAV,CAAmBF,IAAI,CAACG,CAAxB,EAA2BH,IAAI,CAACI,CAAhC,EAAmCJ,IAAI,CAACK,KAAxC,EAA+CL,IAAI,CAACM,MAApD,CAAP;EACD;;EAEDC,WAAW,CAACR,SAAD,EAAuBE,GAAvB,EAAkC;IAC3C,MAAMF,SAAN,EAAiBE,GAAjB,EAAsB,MAAtB;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;;EAEQ,IAALI,KAAK,GAAG;IACV,OAAO,KAAKJ,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;EACD;;EAES,IAANK,MAAM,GAAG;IACX,OAAO,KAAKL,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;EACD;;AA1B2E"}
1
+ {"version":3,"names":["BaseHostObject","JsiSkRect","fromValue","CanvasKit","rect","ref","XYWHRect","x","y","width","height","constructor"],"sources":["JsiSkRect.ts"],"sourcesContent":["import type { CanvasKit, Rect } from \"canvaskit-wasm\";\n\nimport type { SkRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\n\nexport class JsiSkRect extends BaseHostObject<Rect, \"Rect\"> implements SkRect {\n static fromValue(CanvasKit: CanvasKit, rect: SkRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n return CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height);\n }\n\n dispose = () => {\n // Float32Array\n };\n\n constructor(CanvasKit: CanvasKit, ref: Rect) {\n super(CanvasKit, ref, \"Rect\");\n }\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n\n get width() {\n return this.ref[2] - this.ref[0];\n }\n\n get height() {\n return this.ref[3] - this.ref[1];\n }\n}\n"],"mappings":";;AAIA,SAASA,cAAT,QAA+B,QAA/B;AAEA,OAAO,MAAMC,SAAN,SAAwBD,cAAxB,CAAuE;EAC5D,OAATE,SAAS,CAACC,SAAD,EAAuBC,IAAvB,EAAqC;IACnD,IAAIA,IAAI,YAAYH,SAApB,EAA+B;MAC7B,OAAOG,IAAI,CAACC,GAAZ;IACD;;IACD,OAAOF,SAAS,CAACG,QAAV,CAAmBF,IAAI,CAACG,CAAxB,EAA2BH,IAAI,CAACI,CAAhC,EAAmCJ,IAAI,CAACK,KAAxC,EAA+CL,IAAI,CAACM,MAApD,CAAP;EACD;;EAMDC,WAAW,CAACR,SAAD,EAAuBE,GAAvB,EAAkC;IAC3C,MAAMF,SAAN,EAAiBE,GAAjB,EAAsB,MAAtB;;IAD2C,iCAJnC,MAAM,CACd;IACD,CAE4C;EAE5C;;EAEI,IAADE,CAAC,GAAG;IACN,OAAO,KAAKF,GAAL,CAAS,CAAT,CAAP;EACD;;EAEI,IAADG,CAAC,GAAG;IACN,OAAO,KAAKH,GAAL,CAAS,CAAT,CAAP;EACD;;EAEQ,IAALI,KAAK,GAAG;IACV,OAAO,KAAKJ,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;EACD;;EAES,IAANK,MAAM,GAAG;IACX,OAAO,KAAKL,GAAL,CAAS,CAAT,IAAc,KAAKA,GAAL,CAAS,CAAT,CAArB;EACD;;AA9B2E"}
@@ -6,6 +6,7 @@ import { JsiSkShader } from "./JsiSkShader";
6
6
  export declare class JsiSkRuntimeEffect extends HostObject<RuntimeEffect, "RuntimeEffect"> implements SkRuntimeEffect {
7
7
  private sksl;
8
8
  constructor(CanvasKit: CanvasKit, ref: RuntimeEffect, sksl: string);
9
+ dispose: () => void;
9
10
  source(): string;
10
11
  makeShader(uniforms: number[], localMatrix?: SkMatrix): JsiSkShader;
11
12
  makeShaderWithChildren(uniforms: number[], children?: SkShader[], localMatrix?: SkMatrix): JsiSkShader;
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  import { JsiSkMatrix } from "./JsiSkMatrix";
3
5
  import { JsiSkShader } from "./JsiSkShader";
@@ -5,6 +7,10 @@ export class JsiSkRuntimeEffect extends HostObject {
5
7
  constructor(CanvasKit, ref, sksl) {
6
8
  super(CanvasKit, ref, "RuntimeEffect");
7
9
  this.sksl = sksl;
10
+
11
+ _defineProperty(this, "dispose", () => {
12
+ this.ref.delete();
13
+ });
8
14
  }
9
15
 
10
16
  source() {
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkMatrix","JsiSkShader","JsiSkRuntimeEffect","constructor","CanvasKit","ref","sksl","source","makeShader","uniforms","localMatrix","undefined","fromValue","makeShaderWithChildren","children","map","child","getUniform","index","getUniformCount","getUniformFloatCount","getUniformName"],"sources":["JsiSkRuntimeEffect.ts"],"sourcesContent":["import type { CanvasKit, RuntimeEffect } from \"canvaskit-wasm\";\n\nimport type { SkMatrix, SkShader } from \"../types\";\nimport type { SkRuntimeEffect } from \"../types/RuntimeEffect/RuntimeEffect\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkRuntimeEffect\n extends HostObject<RuntimeEffect, \"RuntimeEffect\">\n implements SkRuntimeEffect\n{\n constructor(CanvasKit: CanvasKit, ref: RuntimeEffect, private sksl: string) {\n super(CanvasKit, ref, \"RuntimeEffect\");\n }\n\n source() {\n return this.sksl;\n }\n\n makeShader(uniforms: number[], localMatrix?: SkMatrix) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n uniforms,\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderWithChildren(\n uniforms,\n children?.map((child) => JsiSkShader.fromValue(child)),\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n getUniform(index: number) {\n return this.ref.getUniform(index);\n }\n\n getUniformCount() {\n return this.ref.getUniformCount();\n }\n\n getUniformFloatCount() {\n return this.ref.getUniformFloatCount();\n }\n\n getUniformName(index: number) {\n return this.ref.getUniformName(index);\n }\n}\n"],"mappings":"AAKA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,OAAO,MAAMC,kBAAN,SACGH,UADH,CAGP;EACEI,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmDC,IAAnD,EAAiE;IAC1E,MAAMF,SAAN,EAAiBC,GAAjB,EAAsB,eAAtB;IAD0E,KAAdC,IAAc,GAAdA,IAAc;EAE3E;;EAEDC,MAAM,GAAG;IACP,OAAO,KAAKD,IAAZ;EACD;;EAEDE,UAAU,CAACC,QAAD,EAAqBC,WAArB,EAA6C;IACrD,OAAO,IAAIT,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASG,UAAT,CACEC,QADF,EAEEC,WAAW,KAAKC,SAAhB,GACIX,WAAW,CAACY,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WAJN,CAFK,CAAP;EASD;;EAEDG,sBAAsB,CACpBJ,QADoB,EAEpBK,QAFoB,EAGpBJ,WAHoB,EAIpB;IACA,OAAO,IAAIT,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASQ,sBAAT,CACEJ,QADF,EAEEK,QAFF,aAEEA,QAFF,uBAEEA,QAAQ,CAAEC,GAAV,CAAeC,KAAD,IAAWf,WAAW,CAACW,SAAZ,CAAsBI,KAAtB,CAAzB,CAFF,EAGEN,WAAW,KAAKC,SAAhB,GACIX,WAAW,CAACY,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WALN,CAFK,CAAP;EAUD;;EAEDO,UAAU,CAACC,KAAD,EAAgB;IACxB,OAAO,KAAKb,GAAL,CAASY,UAAT,CAAoBC,KAApB,CAAP;EACD;;EAEDC,eAAe,GAAG;IAChB,OAAO,KAAKd,GAAL,CAASc,eAAT,EAAP;EACD;;EAEDC,oBAAoB,GAAG;IACrB,OAAO,KAAKf,GAAL,CAASe,oBAAT,EAAP;EACD;;EAEDC,cAAc,CAACH,KAAD,EAAgB;IAC5B,OAAO,KAAKb,GAAL,CAASgB,cAAT,CAAwBH,KAAxB,CAAP;EACD;;AApDH"}
1
+ {"version":3,"names":["HostObject","JsiSkMatrix","JsiSkShader","JsiSkRuntimeEffect","constructor","CanvasKit","ref","sksl","delete","source","makeShader","uniforms","localMatrix","undefined","fromValue","makeShaderWithChildren","children","map","child","getUniform","index","getUniformCount","getUniformFloatCount","getUniformName"],"sources":["JsiSkRuntimeEffect.ts"],"sourcesContent":["import type { CanvasKit, RuntimeEffect } from \"canvaskit-wasm\";\n\nimport type { SkMatrix, SkShader } from \"../types\";\nimport type { SkRuntimeEffect } from \"../types/RuntimeEffect/RuntimeEffect\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkRuntimeEffect\n extends HostObject<RuntimeEffect, \"RuntimeEffect\">\n implements SkRuntimeEffect\n{\n constructor(CanvasKit: CanvasKit, ref: RuntimeEffect, private sksl: string) {\n super(CanvasKit, ref, \"RuntimeEffect\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n source() {\n return this.sksl;\n }\n\n makeShader(uniforms: number[], localMatrix?: SkMatrix) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n uniforms,\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderWithChildren(\n uniforms,\n children?.map((child) => JsiSkShader.fromValue(child)),\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n getUniform(index: number) {\n return this.ref.getUniform(index);\n }\n\n getUniformCount() {\n return this.ref.getUniformCount();\n }\n\n getUniformFloatCount() {\n return this.ref.getUniformFloatCount();\n }\n\n getUniformName(index: number) {\n return this.ref.getUniformName(index);\n }\n}\n"],"mappings":";;AAKA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,WAAT,QAA4B,eAA5B;AAEA,OAAO,MAAMC,kBAAN,SACGH,UADH,CAGP;EACEI,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAmDC,IAAnD,EAAiE;IAC1E,MAAMF,SAAN,EAAiBC,GAAjB,EAAsB,eAAtB;IAD0E,KAAdC,IAAc,GAAdA,IAAc;;IAAA,iCAIlE,MAAM;MACd,KAAKD,GAAL,CAASE,MAAT;IACD,CAN2E;EAE3E;;EAMDC,MAAM,GAAG;IACP,OAAO,KAAKF,IAAZ;EACD;;EAEDG,UAAU,CAACC,QAAD,EAAqBC,WAArB,EAA6C;IACrD,OAAO,IAAIV,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASI,UAAT,CACEC,QADF,EAEEC,WAAW,KAAKC,SAAhB,GACIZ,WAAW,CAACa,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WAJN,CAFK,CAAP;EASD;;EAEDG,sBAAsB,CACpBJ,QADoB,EAEpBK,QAFoB,EAGpBJ,WAHoB,EAIpB;IACA,OAAO,IAAIV,WAAJ,CACL,KAAKG,SADA,EAEL,KAAKC,GAAL,CAASS,sBAAT,CACEJ,QADF,EAEEK,QAFF,aAEEA,QAFF,uBAEEA,QAAQ,CAAEC,GAAV,CAAeC,KAAD,IAAWhB,WAAW,CAACY,SAAZ,CAAsBI,KAAtB,CAAzB,CAFF,EAGEN,WAAW,KAAKC,SAAhB,GACIZ,WAAW,CAACa,SAAZ,CAAsBF,WAAtB,CADJ,GAEIA,WALN,CAFK,CAAP;EAUD;;EAEDO,UAAU,CAACC,KAAD,EAAgB;IACxB,OAAO,KAAKd,GAAL,CAASa,UAAT,CAAoBC,KAApB,CAAP;EACD;;EAEDC,eAAe,GAAG;IAChB,OAAO,KAAKf,GAAL,CAASe,eAAT,EAAP;EACD;;EAEDC,oBAAoB,GAAG;IACrB,OAAO,KAAKhB,GAAL,CAASgB,oBAAT,EAAP;EACD;;EAEDC,cAAc,CAACH,KAAD,EAAgB;IAC5B,OAAO,KAAKd,GAAL,CAASiB,cAAT,CAAwBH,KAAxB,CAAP;EACD;;AAxDH"}
@@ -3,4 +3,5 @@ import type { SkShader } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkShader extends HostObject<Shader, "Shader"> implements SkShader {
5
5
  constructor(CanvasKit: CanvasKit, ref: Shader);
6
+ dispose: () => void;
6
7
  }
@@ -1,7 +1,13 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  export class JsiSkShader extends HostObject {
3
5
  constructor(CanvasKit, ref) {
4
6
  super(CanvasKit, ref, "Shader");
7
+
8
+ _defineProperty(this, "dispose", () => {
9
+ this.ref.delete();
10
+ });
5
11
  }
6
12
 
7
13
  }
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkShader","constructor","CanvasKit","ref"],"sources":["JsiSkShader.ts"],"sourcesContent":["import type { CanvasKit, Shader } from \"canvaskit-wasm\";\n\nimport type { SkShader } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkShader\n extends HostObject<Shader, \"Shader\">\n implements SkShader\n{\n constructor(CanvasKit: CanvasKit, ref: Shader) {\n super(CanvasKit, ref, \"Shader\");\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,WAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAoC;IAC7C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,QAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["HostObject","JsiSkShader","constructor","CanvasKit","ref","delete"],"sources":["JsiSkShader.ts"],"sourcesContent":["import type { CanvasKit, Shader } from \"canvaskit-wasm\";\n\nimport type { SkShader } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkShader\n extends HostObject<Shader, \"Shader\">\n implements SkShader\n{\n constructor(CanvasKit: CanvasKit, ref: Shader) {\n super(CanvasKit, ref, \"Shader\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,WAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAoC;IAC7C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,QAAtB;;IAD6C,iCAIrC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CAN8C;EAE9C;;AAHH"}
@@ -3,6 +3,7 @@ import type { SkCanvas, SkImage, SkRect, SkSurface } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkSurface extends HostObject<Surface, "Surface"> implements SkSurface {
5
5
  constructor(CanvasKit: CanvasKit, ref: Surface);
6
+ dispose: () => void;
6
7
  flush(): void;
7
8
  getCanvas(): SkCanvas;
8
9
  makeImageSnapshot(bounds?: SkRect): SkImage;
@@ -1,3 +1,5 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  import { JsiSkCanvas } from "./JsiSkCanvas";
3
5
  import { JsiSkImage } from "./JsiSkImage";
@@ -5,6 +7,10 @@ import { JsiSkRect } from "./JsiSkRect";
5
7
  export class JsiSkSurface extends HostObject {
6
8
  constructor(CanvasKit, ref) {
7
9
  super(CanvasKit, ref, "Surface");
10
+
11
+ _defineProperty(this, "dispose", () => {
12
+ this.ref.delete();
13
+ });
8
14
  }
9
15
 
10
16
  flush() {
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkCanvas","JsiSkImage","JsiSkRect","JsiSkSurface","constructor","CanvasKit","ref","flush","getCanvas","makeImageSnapshot","bounds","image","Array","from","fromValue","undefined"],"sources":["JsiSkSurface.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SkCanvas, SkImage, SkRect, SkSurface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkSurface\n extends HostObject<Surface, \"Surface\">\n implements SkSurface\n{\n constructor(CanvasKit: CanvasKit, ref: Surface) {\n super(CanvasKit, ref, \"Surface\");\n }\n\n flush() {\n this.ref.flush();\n }\n\n getCanvas(): SkCanvas {\n return new JsiSkCanvas(this.CanvasKit, this.ref.getCanvas());\n }\n\n makeImageSnapshot(bounds?: SkRect): SkImage {\n const image = this.ref.makeImageSnapshot(\n bounds\n ? Array.from(JsiSkRect.fromValue(this.CanvasKit, bounds))\n : undefined\n );\n return new JsiSkImage(this.CanvasKit, image);\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,YAAN,SACGJ,UADH,CAGP;EACEK,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAqC;IAC9C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,SAAtB;EACD;;EAEDC,KAAK,GAAG;IACN,KAAKD,GAAL,CAASC,KAAT;EACD;;EAEDC,SAAS,GAAa;IACpB,OAAO,IAAIR,WAAJ,CAAgB,KAAKK,SAArB,EAAgC,KAAKC,GAAL,CAASE,SAAT,EAAhC,CAAP;EACD;;EAEDC,iBAAiB,CAACC,MAAD,EAA2B;IAC1C,MAAMC,KAAK,GAAG,KAAKL,GAAL,CAASG,iBAAT,CACZC,MAAM,GACFE,KAAK,CAACC,IAAN,CAAWX,SAAS,CAACY,SAAV,CAAoB,KAAKT,SAAzB,EAAoCK,MAApC,CAAX,CADE,GAEFK,SAHQ,CAAd;IAKA,OAAO,IAAId,UAAJ,CAAe,KAAKI,SAApB,EAA+BM,KAA/B,CAAP;EACD;;AApBH"}
1
+ {"version":3,"names":["HostObject","JsiSkCanvas","JsiSkImage","JsiSkRect","JsiSkSurface","constructor","CanvasKit","ref","delete","flush","getCanvas","makeImageSnapshot","bounds","image","Array","from","fromValue","undefined"],"sources":["JsiSkSurface.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SkCanvas, SkImage, SkRect, SkSurface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkSurface\n extends HostObject<Surface, \"Surface\">\n implements SkSurface\n{\n constructor(CanvasKit: CanvasKit, ref: Surface) {\n super(CanvasKit, ref, \"Surface\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n flush() {\n this.ref.flush();\n }\n\n getCanvas(): SkCanvas {\n return new JsiSkCanvas(this.CanvasKit, this.ref.getCanvas());\n }\n\n makeImageSnapshot(bounds?: SkRect): SkImage {\n const image = this.ref.makeImageSnapshot(\n bounds\n ? Array.from(JsiSkRect.fromValue(this.CanvasKit, bounds))\n : undefined\n );\n return new JsiSkImage(this.CanvasKit, image);\n }\n}\n"],"mappings":";;AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,WAAT,QAA4B,eAA5B;AACA,SAASC,UAAT,QAA2B,cAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,YAAN,SACGJ,UADH,CAGP;EACEK,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,KAAK,GAAG;IACN,KAAKF,GAAL,CAASE,KAAT;EACD;;EAEDC,SAAS,GAAa;IACpB,OAAO,IAAIT,WAAJ,CAAgB,KAAKK,SAArB,EAAgC,KAAKC,GAAL,CAASG,SAAT,EAAhC,CAAP;EACD;;EAEDC,iBAAiB,CAACC,MAAD,EAA2B;IAC1C,MAAMC,KAAK,GAAG,KAAKN,GAAL,CAASI,iBAAT,CACZC,MAAM,GACFE,KAAK,CAACC,IAAN,CAAWZ,SAAS,CAACa,SAAV,CAAoB,KAAKV,SAAzB,EAAoCM,MAApC,CAAX,CADE,GAEFK,SAHQ,CAAd;IAKA,OAAO,IAAIf,UAAJ,CAAe,KAAKI,SAApB,EAA+BO,KAA/B,CAAP;EACD;;AAxBH"}
@@ -3,4 +3,5 @@ import type { SkTextBlob } from "../types";
3
3
  import { HostObject } from "./Host";
4
4
  export declare class JsiSkTextBlob extends HostObject<TextBlob, "TextBlob"> implements SkTextBlob {
5
5
  constructor(CanvasKit: CanvasKit, ref: TextBlob);
6
+ dispose: () => void;
6
7
  }
@@ -1,7 +1,13 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  export class JsiSkTextBlob extends HostObject {
3
5
  constructor(CanvasKit, ref) {
4
6
  super(CanvasKit, ref, "TextBlob");
7
+
8
+ _defineProperty(this, "dispose", () => {
9
+ this.ref.delete();
10
+ });
5
11
  }
6
12
 
7
13
  }
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkTextBlob","constructor","CanvasKit","ref"],"sources":["JsiSkTextBlob.ts"],"sourcesContent":["import type { CanvasKit, TextBlob } from \"canvaskit-wasm\";\n\nimport type { SkTextBlob } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkTextBlob\n extends HostObject<TextBlob, \"TextBlob\">\n implements SkTextBlob\n{\n constructor(CanvasKit: CanvasKit, ref: TextBlob) {\n super(CanvasKit, ref, \"TextBlob\");\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,aAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAsC;IAC/C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,UAAtB;EACD;;AAHH"}
1
+ {"version":3,"names":["HostObject","JsiSkTextBlob","constructor","CanvasKit","ref","delete"],"sources":["JsiSkTextBlob.ts"],"sourcesContent":["import type { CanvasKit, TextBlob } from \"canvaskit-wasm\";\n\nimport type { SkTextBlob } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkTextBlob\n extends HostObject<TextBlob, \"TextBlob\">\n implements SkTextBlob\n{\n constructor(CanvasKit: CanvasKit, ref: TextBlob) {\n super(CanvasKit, ref, \"TextBlob\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,aAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAsC;IAC/C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,UAAtB;;IAD+C,iCAIvC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CANgD;EAEhD;;AAHH"}
@@ -5,5 +5,5 @@ export declare class JsiSkTypeface extends HostObject<Typeface, "Typeface"> impl
5
5
  constructor(CanvasKit: CanvasKit, ref: Typeface);
6
6
  get bold(): boolean;
7
7
  get italic(): boolean;
8
- dispose(): void;
8
+ dispose: () => void;
9
9
  }
@@ -1,7 +1,13 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  export class JsiSkTypeface extends HostObject {
3
5
  constructor(CanvasKit, ref) {
4
6
  super(CanvasKit, ref, "Typeface");
7
+
8
+ _defineProperty(this, "dispose", () => {
9
+ this.ref.delete();
10
+ });
5
11
  }
6
12
 
7
13
  get bold() {
@@ -14,9 +20,5 @@ export class JsiSkTypeface extends HostObject {
14
20
  return false;
15
21
  }
16
22
 
17
- dispose() {
18
- this.ref.delete();
19
- }
20
-
21
23
  }
22
24
  //# sourceMappingURL=JsiSkTypeface.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkTypeface","constructor","CanvasKit","ref","bold","console","warn","italic","dispose","delete"],"sources":["JsiSkTypeface.ts"],"sourcesContent":["import type { CanvasKit, Typeface } from \"canvaskit-wasm\";\n\nimport type { SkTypeface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkTypeface\n extends HostObject<Typeface, \"Typeface\">\n implements SkTypeface\n{\n constructor(CanvasKit: CanvasKit, ref: Typeface) {\n super(CanvasKit, ref, \"Typeface\");\n }\n\n get bold(): boolean {\n console.warn(\n \"Typeface.bold is deprecated and will be removed in a future release. The property will return false.\"\n );\n return false;\n }\n\n get italic(): boolean {\n console.warn(\n \"Typeface.italic is deprecated and will be removed in a future release. The property will return false.\"\n );\n return false;\n }\n\n dispose() {\n this.ref.delete();\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,aAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAsC;IAC/C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,UAAtB;EACD;;EAEO,IAAJC,IAAI,GAAY;IAClBC,OAAO,CAACC,IAAR,CACE,sGADF;IAGA,OAAO,KAAP;EACD;;EAES,IAANC,MAAM,GAAY;IACpBF,OAAO,CAACC,IAAR,CACE,wGADF;IAGA,OAAO,KAAP;EACD;;EAEDE,OAAO,GAAG;IACR,KAAKL,GAAL,CAASM,MAAT;EACD;;AArBH"}
1
+ {"version":3,"names":["HostObject","JsiSkTypeface","constructor","CanvasKit","ref","delete","bold","console","warn","italic"],"sources":["JsiSkTypeface.ts"],"sourcesContent":["import type { CanvasKit, Typeface } from \"canvaskit-wasm\";\n\nimport type { SkTypeface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkTypeface\n extends HostObject<Typeface, \"Typeface\">\n implements SkTypeface\n{\n constructor(CanvasKit: CanvasKit, ref: Typeface) {\n super(CanvasKit, ref, \"Typeface\");\n }\n\n get bold(): boolean {\n console.warn(\n \"Typeface.bold is deprecated and will be removed in a future release. The property will return false.\"\n );\n return false;\n }\n\n get italic(): boolean {\n console.warn(\n \"Typeface.italic is deprecated and will be removed in a future release. The property will return false.\"\n );\n return false;\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;AAIA,SAASA,UAAT,QAA2B,QAA3B;AAEA,OAAO,MAAMC,aAAN,SACGD,UADH,CAGP;EACEE,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAsC;IAC/C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,UAAtB;;IAD+C,iCAkBvC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CApBgD;EAEhD;;EAEO,IAAJC,IAAI,GAAY;IAClBC,OAAO,CAACC,IAAR,CACE,sGADF;IAGA,OAAO,KAAP;EACD;;EAES,IAANC,MAAM,GAAY;IACpBF,OAAO,CAACC,IAAR,CACE,wGADF;IAGA,OAAO,KAAP;EACD;;AAjBH"}
@@ -4,6 +4,7 @@ import { HostObject } from "./Host";
4
4
  import { JsiSkRect } from "./JsiSkRect";
5
5
  export declare class JsiSkVertices extends HostObject<Vertices, "Vertices"> implements SkVertices {
6
6
  constructor(CanvasKit: CanvasKit, ref: Vertices);
7
+ dispose: () => void;
7
8
  bounds(): JsiSkRect;
8
9
  uniqueID(): number;
9
10
  }
@@ -1,8 +1,14 @@
1
+ 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; }
2
+
1
3
  import { HostObject } from "./Host";
2
4
  import { JsiSkRect } from "./JsiSkRect";
3
5
  export class JsiSkVertices extends HostObject {
4
6
  constructor(CanvasKit, ref) {
5
7
  super(CanvasKit, ref, "Vertices");
8
+
9
+ _defineProperty(this, "dispose", () => {
10
+ this.ref.delete();
11
+ });
6
12
  }
7
13
 
8
14
  bounds() {
@@ -1 +1 @@
1
- {"version":3,"names":["HostObject","JsiSkRect","JsiSkVertices","constructor","CanvasKit","ref","bounds","uniqueID"],"sources":["JsiSkVertices.ts"],"sourcesContent":["import type { CanvasKit, Vertices } from \"canvaskit-wasm\";\n\nimport type { SkVertices } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkVertices\n extends HostObject<Vertices, \"Vertices\">\n implements SkVertices\n{\n constructor(CanvasKit: CanvasKit, ref: Vertices) {\n super(CanvasKit, ref, \"Vertices\");\n }\n\n bounds() {\n return new JsiSkRect(this.CanvasKit, this.ref.bounds());\n }\n\n uniqueID() {\n return this.ref.uniqueID();\n }\n}\n"],"mappings":"AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,aAAN,SACGF,UADH,CAGP;EACEG,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAsC;IAC/C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,UAAtB;EACD;;EAEDC,MAAM,GAAG;IACP,OAAO,IAAIL,SAAJ,CAAc,KAAKG,SAAnB,EAA8B,KAAKC,GAAL,CAASC,MAAT,EAA9B,CAAP;EACD;;EAEDC,QAAQ,GAAG;IACT,OAAO,KAAKF,GAAL,CAASE,QAAT,EAAP;EACD;;AAXH"}
1
+ {"version":3,"names":["HostObject","JsiSkRect","JsiSkVertices","constructor","CanvasKit","ref","delete","bounds","uniqueID"],"sources":["JsiSkVertices.ts"],"sourcesContent":["import type { CanvasKit, Vertices } from \"canvaskit-wasm\";\n\nimport type { SkVertices } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkVertices\n extends HostObject<Vertices, \"Vertices\">\n implements SkVertices\n{\n constructor(CanvasKit: CanvasKit, ref: Vertices) {\n super(CanvasKit, ref, \"Vertices\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n bounds() {\n return new JsiSkRect(this.CanvasKit, this.ref.bounds());\n }\n\n uniqueID() {\n return this.ref.uniqueID();\n }\n}\n"],"mappings":";;AAIA,SAASA,UAAT,QAA2B,QAA3B;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,OAAO,MAAMC,aAAN,SACGF,UADH,CAGP;EACEG,WAAW,CAACC,SAAD,EAAuBC,GAAvB,EAAsC;IAC/C,MAAMD,SAAN,EAAiBC,GAAjB,EAAsB,UAAtB;;IAD+C,iCAIvC,MAAM;MACd,KAAKA,GAAL,CAASC,MAAT;IACD,CANgD;EAEhD;;EAMDC,MAAM,GAAG;IACP,OAAO,IAAIN,SAAJ,CAAc,KAAKG,SAAnB,EAA8B,KAAKC,GAAL,CAASE,MAAT,EAA9B,CAAP;EACD;;EAEDC,QAAQ,GAAG;IACT,OAAO,KAAKH,GAAL,CAASG,QAAT,EAAP;EACD;;AAfH"}
@@ -12,7 +12,7 @@ import { isValue } from "../../renderer/processors/Animations";
12
12
  export const useComputedValue = (cb, values) => {
13
13
  const value = useMemo(() => ValueApi.createComputedValue(cb, values.filter(isValue)), // eslint-disable-next-line react-hooks/exhaustive-deps
14
14
  values);
15
- useEffect(() => () => value.__invalidate(), [value]);
15
+ useEffect(() => () => value.dispose(), [value]);
16
16
  return value;
17
17
  };
18
18
  //# sourceMappingURL=useComputedValue.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useEffect","useMemo","ValueApi","isValue","useComputedValue","cb","values","value","createComputedValue","filter","__invalidate"],"sources":["useComputedValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport { isValue } from \"../../renderer/processors/Animations\";\n\n/**\n * Creates a new computed value - a value that will calculate its value depending\n * on other values.\n * @param cb Callback to calculate new value\n * @param values Dependant values\n * @returns A readonly value\n */\nexport const useComputedValue = <R>(cb: () => R, values: unknown[]) => {\n const value = useMemo(\n () => ValueApi.createComputedValue<R>(cb, values.filter(isValue)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n values\n );\n useEffect(() => () => value.__invalidate(), [value]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AACA,SAASC,OAAT,QAAwB,sCAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAIC,EAAJ,EAAiBC,MAAjB,KAAuC;EACrE,MAAMC,KAAK,GAAGN,OAAO,CACnB,MAAMC,QAAQ,CAACM,mBAAT,CAAgCH,EAAhC,EAAoCC,MAAM,CAACG,MAAP,CAAcN,OAAd,CAApC,CADa,EAEnB;EACAG,MAHmB,CAArB;EAKAN,SAAS,CAAC,MAAM,MAAMO,KAAK,CAACG,YAAN,EAAb,EAAmC,CAACH,KAAD,CAAnC,CAAT;EACA,OAAOA,KAAP;AACD,CARM"}
1
+ {"version":3,"names":["useEffect","useMemo","ValueApi","isValue","useComputedValue","cb","values","value","createComputedValue","filter","dispose"],"sources":["useComputedValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport { isValue } from \"../../renderer/processors/Animations\";\n\n/**\n * Creates a new computed value - a value that will calculate its value depending\n * on other values.\n * @param cb Callback to calculate new value\n * @param values Dependant values\n * @returns A readonly value\n */\nexport const useComputedValue = <R>(cb: () => R, values: unknown[]) => {\n const value = useMemo(\n () => ValueApi.createComputedValue<R>(cb, values.filter(isValue)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n values\n );\n useEffect(() => () => value.dispose(), [value]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AACA,SAASC,OAAT,QAAwB,sCAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAIC,EAAJ,EAAiBC,MAAjB,KAAuC;EACrE,MAAMC,KAAK,GAAGN,OAAO,CACnB,MAAMC,QAAQ,CAACM,mBAAT,CAAgCH,EAAhC,EAAoCC,MAAM,CAACG,MAAP,CAAcN,OAAd,CAApC,CADa,EAEnB;EACAG,MAHmB,CAArB;EAKAN,SAAS,CAAC,MAAM,MAAMO,KAAK,CAACG,OAAN,EAAb,EAA8B,CAACH,KAAD,CAA9B,CAAT;EACA,OAAOA,KAAP;AACD,CARM"}