@shopify/react-native-skia 0.1.228 → 0.1.230

Sign up to get free protection for your applications and to get access to all the features.
Files changed (629) hide show
  1. package/android/cpp/jni/JniLoad.cpp +0 -2
  2. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
  3. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
  5. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
  6. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
  7. package/cpp/api/JsiSkApi.h +4 -1
  8. package/cpp/api/JsiSkParagraph.h +15 -0
  9. package/cpp/api/JsiSkParagraphBuilder.h +3 -32
  10. package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
  11. package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
  12. package/cpp/rnskia/RNSkManager.cpp +0 -6
  13. package/cpp/rnskia/RNSkView.h +2 -91
  14. package/cpp/rnskia/dom/JsiDomApi.h +0 -9
  15. package/lib/commonjs/animation/index.d.ts +0 -3
  16. package/lib/commonjs/animation/index.js +0 -39
  17. package/lib/commonjs/animation/index.js.map +1 -1
  18. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +1 -2
  19. package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
  20. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  21. package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
  22. package/lib/commonjs/dom/nodes/Node.js +0 -5
  23. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  24. package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
  25. package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
  26. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  27. package/lib/commonjs/dom/types/Common.d.ts +2 -2
  28. package/lib/commonjs/dom/types/Common.js.map +1 -1
  29. package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
  30. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  31. package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
  32. package/lib/commonjs/dom/types/NodeType.js +0 -1
  33. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  34. package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
  35. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  36. package/lib/commonjs/index.d.ts +0 -1
  37. package/lib/commonjs/index.js +0 -14
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/mock/index.js +0 -4
  40. package/lib/commonjs/mock/index.js.map +1 -1
  41. package/lib/commonjs/renderer/Canvas.js +9 -34
  42. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  43. package/lib/commonjs/renderer/Container.d.ts +1 -3
  44. package/lib/commonjs/renderer/Container.js +4 -6
  45. package/lib/commonjs/renderer/Container.js.map +1 -1
  46. package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
  47. package/lib/commonjs/renderer/HostComponents.js +0 -3
  48. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  49. package/lib/commonjs/renderer/HostConfig.js +2 -23
  50. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  51. package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
  52. package/lib/commonjs/renderer/Reconciler.js +3 -18
  53. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  54. package/lib/commonjs/renderer/components/index.d.ts +0 -1
  55. package/lib/commonjs/renderer/components/index.js +0 -13
  56. package/lib/commonjs/renderer/components/index.js.map +1 -1
  57. package/lib/commonjs/renderer/index.d.ts +0 -1
  58. package/lib/commonjs/renderer/index.js +0 -13
  59. package/lib/commonjs/renderer/index.js.map +1 -1
  60. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
  61. package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
  62. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  63. package/lib/commonjs/skia/types/Canvas.d.ts +2 -2
  64. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  65. package/lib/commonjs/skia/types/Matrix.d.ts +2 -1
  66. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  67. package/lib/commonjs/skia/types/Matrix4.d.ts +9 -1
  68. package/lib/commonjs/skia/types/Matrix4.js +49 -3
  69. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  70. package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
  71. package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
  72. package/lib/commonjs/skia/types/Path/Path.d.ts +2 -2
  73. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  74. package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +2 -2
  75. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
  76. package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
  77. package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
  78. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  79. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  80. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  81. package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
  82. package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
  83. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  84. package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
  85. package/lib/commonjs/views/SkiaDomView.js +3 -14
  86. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  87. package/lib/commonjs/views/SkiaDomView.web.js +4 -14
  88. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  89. package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
  90. package/lib/commonjs/views/SkiaPictureView.js +3 -14
  91. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  92. package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
  93. package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
  94. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
  95. package/lib/commonjs/views/index.d.ts +0 -2
  96. package/lib/commonjs/views/index.js +0 -26
  97. package/lib/commonjs/views/index.js.map +1 -1
  98. package/lib/commonjs/views/types.d.ts +2 -15
  99. package/lib/commonjs/views/types.js.map +1 -1
  100. package/lib/module/animation/index.d.ts +0 -3
  101. package/lib/module/animation/index.js +0 -3
  102. package/lib/module/animation/index.js.map +1 -1
  103. package/lib/module/dom/nodes/JsiSkDOM.d.ts +1 -2
  104. package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
  105. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  106. package/lib/module/dom/nodes/Node.d.ts +0 -3
  107. package/lib/module/dom/nodes/Node.js +0 -5
  108. package/lib/module/dom/nodes/Node.js.map +1 -1
  109. package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
  110. package/lib/module/dom/nodes/drawings/index.js +0 -1
  111. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  112. package/lib/module/dom/types/Common.d.ts +2 -2
  113. package/lib/module/dom/types/Common.js.map +1 -1
  114. package/lib/module/dom/types/Drawings.d.ts +0 -4
  115. package/lib/module/dom/types/Drawings.js.map +1 -1
  116. package/lib/module/dom/types/NodeType.d.ts +0 -1
  117. package/lib/module/dom/types/NodeType.js +0 -1
  118. package/lib/module/dom/types/NodeType.js.map +1 -1
  119. package/lib/module/dom/types/SkDOM.d.ts +1 -2
  120. package/lib/module/dom/types/SkDOM.js.map +1 -1
  121. package/lib/module/index.d.ts +0 -1
  122. package/lib/module/index.js +0 -1
  123. package/lib/module/index.js.map +1 -1
  124. package/lib/module/mock/index.js +1 -4
  125. package/lib/module/mock/index.js.map +1 -1
  126. package/lib/module/renderer/Canvas.js +9 -32
  127. package/lib/module/renderer/Canvas.js.map +1 -1
  128. package/lib/module/renderer/Container.d.ts +1 -3
  129. package/lib/module/renderer/Container.js +4 -6
  130. package/lib/module/renderer/Container.js.map +1 -1
  131. package/lib/module/renderer/HostComponents.d.ts +1 -6
  132. package/lib/module/renderer/HostComponents.js +0 -3
  133. package/lib/module/renderer/HostComponents.js.map +1 -1
  134. package/lib/module/renderer/HostConfig.js +3 -23
  135. package/lib/module/renderer/HostConfig.js.map +1 -1
  136. package/lib/module/renderer/Reconciler.d.ts +1 -5
  137. package/lib/module/renderer/Reconciler.js +3 -16
  138. package/lib/module/renderer/Reconciler.js.map +1 -1
  139. package/lib/module/renderer/components/index.d.ts +0 -1
  140. package/lib/module/renderer/components/index.js +0 -1
  141. package/lib/module/renderer/components/index.js.map +1 -1
  142. package/lib/module/renderer/index.d.ts +0 -1
  143. package/lib/module/renderer/index.js +0 -1
  144. package/lib/module/renderer/index.js.map +1 -1
  145. package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
  146. package/lib/module/renderer/processors/Animations/Animations.js +0 -28
  147. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  148. package/lib/module/skia/types/Canvas.d.ts +2 -2
  149. package/lib/module/skia/types/Canvas.js.map +1 -1
  150. package/lib/module/skia/types/Matrix.d.ts +2 -1
  151. package/lib/module/skia/types/Matrix.js.map +1 -1
  152. package/lib/module/skia/types/Matrix4.d.ts +9 -1
  153. package/lib/module/skia/types/Matrix4.js +42 -2
  154. package/lib/module/skia/types/Matrix4.js.map +1 -1
  155. package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
  156. package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
  157. package/lib/module/skia/types/Path/Path.d.ts +2 -2
  158. package/lib/module/skia/types/Path/Path.js.map +1 -1
  159. package/lib/module/skia/web/JsiSkMatrix.d.ts +2 -2
  160. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  161. package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
  162. package/lib/module/skia/web/JsiSkParagraph.js +12 -0
  163. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  164. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  165. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  166. package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
  167. package/lib/module/views/SkiaBaseWebView.js +0 -17
  168. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  169. package/lib/module/views/SkiaDomView.d.ts +0 -7
  170. package/lib/module/views/SkiaDomView.js +2 -13
  171. package/lib/module/views/SkiaDomView.js.map +1 -1
  172. package/lib/module/views/SkiaDomView.web.js +4 -13
  173. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  174. package/lib/module/views/SkiaPictureView.d.ts +0 -7
  175. package/lib/module/views/SkiaPictureView.js +2 -13
  176. package/lib/module/views/SkiaPictureView.js.map +1 -1
  177. package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
  178. package/lib/module/views/SkiaViewNativeId.js +4 -0
  179. package/lib/module/views/SkiaViewNativeId.js.map +1 -0
  180. package/lib/module/views/index.d.ts +0 -2
  181. package/lib/module/views/index.js +0 -2
  182. package/lib/module/views/index.js.map +1 -1
  183. package/lib/module/views/types.d.ts +2 -15
  184. package/lib/module/views/types.js.map +1 -1
  185. package/lib/typescript/src/animation/index.d.ts +0 -3
  186. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +1 -2
  187. package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
  188. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
  189. package/lib/typescript/src/dom/types/Common.d.ts +2 -2
  190. package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
  191. package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
  192. package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
  193. package/lib/typescript/src/index.d.ts +0 -1
  194. package/lib/typescript/src/renderer/Container.d.ts +1 -3
  195. package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
  196. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
  197. package/lib/typescript/src/renderer/components/index.d.ts +0 -1
  198. package/lib/typescript/src/renderer/index.d.ts +0 -1
  199. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
  200. package/lib/typescript/src/skia/types/Canvas.d.ts +2 -2
  201. package/lib/typescript/src/skia/types/Matrix.d.ts +2 -1
  202. package/lib/typescript/src/skia/types/Matrix4.d.ts +9 -1
  203. package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
  204. package/lib/typescript/src/skia/types/Path/Path.d.ts +2 -2
  205. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +2 -2
  206. package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
  207. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
  208. package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
  209. package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
  210. package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
  211. package/lib/typescript/src/views/index.d.ts +0 -2
  212. package/lib/typescript/src/views/types.d.ts +2 -15
  213. package/package.json +1 -1
  214. package/src/animation/index.ts +0 -3
  215. package/src/dom/nodes/JsiSkDOM.ts +0 -12
  216. package/src/dom/nodes/Node.ts +0 -5
  217. package/src/dom/nodes/drawings/index.ts +0 -1
  218. package/src/dom/types/Common.ts +2 -4
  219. package/src/dom/types/Drawings.ts +0 -5
  220. package/src/dom/types/NodeType.ts +0 -1
  221. package/src/dom/types/SkDOM.ts +0 -4
  222. package/src/index.ts +0 -1
  223. package/src/mock/index.ts +0 -3
  224. package/src/renderer/Canvas.tsx +9 -34
  225. package/src/renderer/Container.tsx +1 -4
  226. package/src/renderer/HostComponents.ts +0 -13
  227. package/src/renderer/HostConfig.ts +3 -24
  228. package/src/renderer/Reconciler.tsx +1 -19
  229. package/src/renderer/components/index.ts +0 -1
  230. package/src/renderer/index.ts +0 -1
  231. package/src/renderer/processors/Animations/Animations.ts +1 -51
  232. package/src/skia/types/Canvas.ts +2 -2
  233. package/src/skia/types/Matrix.ts +3 -1
  234. package/src/skia/types/Matrix4.ts +94 -63
  235. package/src/skia/types/Paragraph/Paragraph.ts +25 -0
  236. package/src/skia/types/Path/Path.ts +2 -2
  237. package/src/skia/web/JsiSkMatrix.ts +5 -5
  238. package/src/skia/web/JsiSkParagraph.ts +11 -0
  239. package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
  240. package/src/views/SkiaBaseWebView.tsx +0 -19
  241. package/src/views/SkiaDomView.tsx +1 -13
  242. package/src/views/SkiaDomView.web.tsx +1 -6
  243. package/src/views/SkiaPictureView.tsx +1 -13
  244. package/src/views/SkiaViewNativeId.ts +1 -0
  245. package/src/views/index.ts +0 -2
  246. package/src/views/types.ts +2 -26
  247. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
  248. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
  249. package/cpp/rnskia/RNSkAnimation.h +0 -65
  250. package/cpp/rnskia/RNSkValueApi.h +0 -72
  251. package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
  252. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
  253. package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
  254. package/cpp/rnskia/values/RNSkClockValue.h +0 -140
  255. package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
  256. package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
  257. package/cpp/rnskia/values/RNSkValue.h +0 -116
  258. package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
  259. package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
  260. package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
  261. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
  262. package/lib/commonjs/animation/decay/decay.d.ts +0 -2
  263. package/lib/commonjs/animation/decay/decay.js +0 -42
  264. package/lib/commonjs/animation/decay/decay.js.map +0 -1
  265. package/lib/commonjs/animation/decay/index.d.ts +0 -1
  266. package/lib/commonjs/animation/decay/index.js +0 -14
  267. package/lib/commonjs/animation/decay/index.js.map +0 -1
  268. package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
  269. package/lib/commonjs/animation/decay/runDecay.js +0 -48
  270. package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
  271. package/lib/commonjs/animation/decay/types.d.ts +0 -21
  272. package/lib/commonjs/animation/decay/types.js +0 -6
  273. package/lib/commonjs/animation/decay/types.js.map +0 -1
  274. package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
  275. package/lib/commonjs/animation/spring/Spring.js +0 -77
  276. package/lib/commonjs/animation/spring/Spring.js.map +0 -1
  277. package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
  278. package/lib/commonjs/animation/spring/functions/index.js +0 -14
  279. package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
  280. package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
  281. package/lib/commonjs/animation/spring/functions/spring.js +0 -94
  282. package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
  283. package/lib/commonjs/animation/spring/index.d.ts +0 -3
  284. package/lib/commonjs/animation/spring/index.js +0 -30
  285. package/lib/commonjs/animation/spring/index.js.map +0 -1
  286. package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
  287. package/lib/commonjs/animation/spring/runSpring.js +0 -35
  288. package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
  289. package/lib/commonjs/animation/spring/types.d.ts +0 -6
  290. package/lib/commonjs/animation/spring/types.js +0 -2
  291. package/lib/commonjs/animation/spring/types.js.map +0 -1
  292. package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
  293. package/lib/commonjs/animation/spring/useSpring.js +0 -27
  294. package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
  295. package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
  296. package/lib/commonjs/animation/timing/Easing.js +0 -108
  297. package/lib/commonjs/animation/timing/Easing.js.map +0 -1
  298. package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
  299. package/lib/commonjs/animation/timing/createTiming.js +0 -55
  300. package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
  301. package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
  302. package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
  303. package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
  304. package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
  305. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
  306. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
  307. package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
  308. package/lib/commonjs/animation/timing/functions/index.js +0 -54
  309. package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
  310. package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
  311. package/lib/commonjs/animation/timing/functions/timing.js +0 -50
  312. package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
  313. package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
  314. package/lib/commonjs/animation/timing/functions/types.js +0 -2
  315. package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
  316. package/lib/commonjs/animation/timing/index.d.ts +0 -4
  317. package/lib/commonjs/animation/timing/index.js +0 -38
  318. package/lib/commonjs/animation/timing/index.js.map +0 -1
  319. package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
  320. package/lib/commonjs/animation/timing/runTiming.js +0 -36
  321. package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
  322. package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
  323. package/lib/commonjs/animation/timing/useLoop.js +0 -25
  324. package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
  325. package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
  326. package/lib/commonjs/animation/timing/useTiming.js +0 -67
  327. package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
  328. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  329. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
  330. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  331. package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
  332. package/lib/commonjs/renderer/DependencyManager.js +0 -185
  333. package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
  334. package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
  335. package/lib/commonjs/renderer/components/Drawing.js +0 -22
  336. package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
  337. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  338. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
  339. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  340. package/lib/commonjs/values/api.d.ts +0 -26
  341. package/lib/commonjs/values/api.js +0 -55
  342. package/lib/commonjs/values/api.js.map +0 -1
  343. package/lib/commonjs/values/api.web.d.ts +0 -2
  344. package/lib/commonjs/values/api.web.js +0 -18
  345. package/lib/commonjs/values/api.web.js.map +0 -1
  346. package/lib/commonjs/values/hooks/index.d.ts +0 -4
  347. package/lib/commonjs/values/hooks/index.js +0 -58
  348. package/lib/commonjs/values/hooks/index.js.map +0 -1
  349. package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
  350. package/lib/commonjs/values/hooks/useClockValue.js +0 -30
  351. package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
  352. package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
  353. package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
  354. package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
  355. package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
  356. package/lib/commonjs/values/hooks/useValue.js +0 -26
  357. package/lib/commonjs/values/hooks/useValue.js.map +0 -1
  358. package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
  359. package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
  360. package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
  361. package/lib/commonjs/values/index.d.ts +0 -4
  362. package/lib/commonjs/values/index.js +0 -58
  363. package/lib/commonjs/values/index.js.map +0 -1
  364. package/lib/commonjs/values/selector.d.ts +0 -14
  365. package/lib/commonjs/values/selector.js +0 -24
  366. package/lib/commonjs/values/selector.js.map +0 -1
  367. package/lib/commonjs/values/types.d.ts +0 -63
  368. package/lib/commonjs/values/types.js +0 -2
  369. package/lib/commonjs/values/types.js.map +0 -1
  370. package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
  371. package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
  372. package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
  373. package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
  374. package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
  375. package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
  376. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
  377. package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
  378. package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
  379. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
  380. package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
  381. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
  382. package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
  383. package/lib/commonjs/values/web/RNSkValue.js +0 -73
  384. package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
  385. package/lib/commonjs/values/web/api.d.ts +0 -2
  386. package/lib/commonjs/values/web/api.js +0 -31
  387. package/lib/commonjs/values/web/api.js.map +0 -1
  388. package/lib/commonjs/values/web/index.d.ts +0 -1
  389. package/lib/commonjs/values/web/index.js +0 -19
  390. package/lib/commonjs/values/web/index.js.map +0 -1
  391. package/lib/commonjs/views/SkiaView.d.ts +0 -35
  392. package/lib/commonjs/views/SkiaView.js +0 -139
  393. package/lib/commonjs/views/SkiaView.js.map +0 -1
  394. package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
  395. package/lib/commonjs/views/SkiaView.web.js +0 -30
  396. package/lib/commonjs/views/SkiaView.web.js.map +0 -1
  397. package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
  398. package/lib/commonjs/views/useDrawCallback.js +0 -23
  399. package/lib/commonjs/views/useDrawCallback.js.map +0 -1
  400. package/lib/module/animation/decay/decay.d.ts +0 -2
  401. package/lib/module/animation/decay/decay.js +0 -33
  402. package/lib/module/animation/decay/decay.js.map +0 -1
  403. package/lib/module/animation/decay/index.d.ts +0 -1
  404. package/lib/module/animation/decay/index.js +0 -2
  405. package/lib/module/animation/decay/index.js.map +0 -1
  406. package/lib/module/animation/decay/runDecay.d.ts +0 -10
  407. package/lib/module/animation/decay/runDecay.js +0 -38
  408. package/lib/module/animation/decay/runDecay.js.map +0 -1
  409. package/lib/module/animation/decay/types.d.ts +0 -21
  410. package/lib/module/animation/decay/types.js +0 -2
  411. package/lib/module/animation/decay/types.js.map +0 -1
  412. package/lib/module/animation/spring/Spring.d.ts +0 -65
  413. package/lib/module/animation/spring/Spring.js +0 -69
  414. package/lib/module/animation/spring/Spring.js.map +0 -1
  415. package/lib/module/animation/spring/functions/index.d.ts +0 -1
  416. package/lib/module/animation/spring/functions/index.js +0 -2
  417. package/lib/module/animation/spring/functions/index.js.map +0 -1
  418. package/lib/module/animation/spring/functions/spring.d.ts +0 -10
  419. package/lib/module/animation/spring/functions/spring.js +0 -85
  420. package/lib/module/animation/spring/functions/spring.js.map +0 -1
  421. package/lib/module/animation/spring/index.d.ts +0 -3
  422. package/lib/module/animation/spring/index.js +0 -4
  423. package/lib/module/animation/spring/index.js.map +0 -1
  424. package/lib/module/animation/spring/runSpring.d.ts +0 -19
  425. package/lib/module/animation/spring/runSpring.js +0 -24
  426. package/lib/module/animation/spring/runSpring.js.map +0 -1
  427. package/lib/module/animation/spring/types.d.ts +0 -6
  428. package/lib/module/animation/spring/types.js +0 -2
  429. package/lib/module/animation/spring/types.js.map +0 -1
  430. package/lib/module/animation/spring/useSpring.d.ts +0 -13
  431. package/lib/module/animation/spring/useSpring.js +0 -16
  432. package/lib/module/animation/spring/useSpring.js.map +0 -1
  433. package/lib/module/animation/timing/Easing.d.ts +0 -19
  434. package/lib/module/animation/timing/Easing.js +0 -98
  435. package/lib/module/animation/timing/Easing.js.map +0 -1
  436. package/lib/module/animation/timing/createTiming.d.ts +0 -17
  437. package/lib/module/animation/timing/createTiming.js +0 -49
  438. package/lib/module/animation/timing/createTiming.js.map +0 -1
  439. package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
  440. package/lib/module/animation/timing/functions/bezier.js +0 -141
  441. package/lib/module/animation/timing/functions/bezier.js.map +0 -1
  442. package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
  443. package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
  444. package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
  445. package/lib/module/animation/timing/functions/index.d.ts +0 -4
  446. package/lib/module/animation/timing/functions/index.js +0 -5
  447. package/lib/module/animation/timing/functions/index.js.map +0 -1
  448. package/lib/module/animation/timing/functions/timing.d.ts +0 -17
  449. package/lib/module/animation/timing/functions/timing.js +0 -41
  450. package/lib/module/animation/timing/functions/timing.js.map +0 -1
  451. package/lib/module/animation/timing/functions/types.d.ts +0 -7
  452. package/lib/module/animation/timing/functions/types.js +0 -2
  453. package/lib/module/animation/timing/functions/types.js.map +0 -1
  454. package/lib/module/animation/timing/index.d.ts +0 -4
  455. package/lib/module/animation/timing/index.js +0 -5
  456. package/lib/module/animation/timing/index.js.map +0 -1
  457. package/lib/module/animation/timing/runTiming.d.ts +0 -19
  458. package/lib/module/animation/timing/runTiming.js +0 -26
  459. package/lib/module/animation/timing/runTiming.js.map +0 -1
  460. package/lib/module/animation/timing/useLoop.d.ts +0 -11
  461. package/lib/module/animation/timing/useLoop.js +0 -16
  462. package/lib/module/animation/timing/useLoop.js.map +0 -1
  463. package/lib/module/animation/timing/useTiming.d.ts +0 -13
  464. package/lib/module/animation/timing/useTiming.js +0 -57
  465. package/lib/module/animation/timing/useTiming.js.map +0 -1
  466. package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  467. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
  468. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  469. package/lib/module/renderer/DependencyManager.d.ts +0 -46
  470. package/lib/module/renderer/DependencyManager.js +0 -174
  471. package/lib/module/renderer/DependencyManager.js.map +0 -1
  472. package/lib/module/renderer/components/Drawing.d.ts +0 -8
  473. package/lib/module/renderer/components/Drawing.js +0 -11
  474. package/lib/module/renderer/components/Drawing.js.map +0 -1
  475. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  476. package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
  477. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  478. package/lib/module/values/api.d.ts +0 -26
  479. package/lib/module/values/api.js +0 -48
  480. package/lib/module/values/api.js.map +0 -1
  481. package/lib/module/values/api.web.d.ts +0 -2
  482. package/lib/module/values/api.web.js +0 -7
  483. package/lib/module/values/api.web.js.map +0 -1
  484. package/lib/module/values/hooks/index.d.ts +0 -4
  485. package/lib/module/values/hooks/index.js +0 -5
  486. package/lib/module/values/hooks/index.js.map +0 -1
  487. package/lib/module/values/hooks/useClockValue.d.ts +0 -9
  488. package/lib/module/values/hooks/useClockValue.js +0 -20
  489. package/lib/module/values/hooks/useClockValue.js.map +0 -1
  490. package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
  491. package/lib/module/values/hooks/useComputedValue.js +0 -21
  492. package/lib/module/values/hooks/useComputedValue.js.map +0 -1
  493. package/lib/module/values/hooks/useValue.d.ts +0 -10
  494. package/lib/module/values/hooks/useValue.js +0 -16
  495. package/lib/module/values/hooks/useValue.js.map +0 -1
  496. package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
  497. package/lib/module/values/hooks/useValueEffect.js +0 -16
  498. package/lib/module/values/hooks/useValueEffect.js.map +0 -1
  499. package/lib/module/values/index.d.ts +0 -4
  500. package/lib/module/values/index.js +0 -5
  501. package/lib/module/values/index.js.map +0 -1
  502. package/lib/module/values/selector.d.ts +0 -14
  503. package/lib/module/values/selector.js +0 -15
  504. package/lib/module/values/selector.js.map +0 -1
  505. package/lib/module/values/types.d.ts +0 -63
  506. package/lib/module/values/types.js +0 -2
  507. package/lib/module/values/types.js.map +0 -1
  508. package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
  509. package/lib/module/values/web/RNSkAnimation.js +0 -36
  510. package/lib/module/values/web/RNSkAnimation.js.map +0 -1
  511. package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
  512. package/lib/module/values/web/RNSkClockValue.js +0 -65
  513. package/lib/module/values/web/RNSkClockValue.js.map +0 -1
  514. package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
  515. package/lib/module/values/web/RNSkComputedValue.js +0 -49
  516. package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
  517. package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
  518. package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
  519. package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
  520. package/lib/module/values/web/RNSkValue.d.ts +0 -14
  521. package/lib/module/values/web/RNSkValue.js +0 -63
  522. package/lib/module/values/web/RNSkValue.js.map +0 -1
  523. package/lib/module/values/web/api.d.ts +0 -2
  524. package/lib/module/values/web/api.js +0 -19
  525. package/lib/module/values/web/api.js.map +0 -1
  526. package/lib/module/values/web/index.d.ts +0 -1
  527. package/lib/module/values/web/index.js +0 -2
  528. package/lib/module/values/web/index.js.map +0 -1
  529. package/lib/module/views/SkiaView.d.ts +0 -35
  530. package/lib/module/views/SkiaView.js +0 -119
  531. package/lib/module/views/SkiaView.js.map +0 -1
  532. package/lib/module/views/SkiaView.web.d.ts +0 -7
  533. package/lib/module/views/SkiaView.web.js +0 -20
  534. package/lib/module/views/SkiaView.web.js.map +0 -1
  535. package/lib/module/views/useDrawCallback.d.ts +0 -8
  536. package/lib/module/views/useDrawCallback.js +0 -14
  537. package/lib/module/views/useDrawCallback.js.map +0 -1
  538. package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
  539. package/lib/typescript/src/animation/decay/index.d.ts +0 -1
  540. package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
  541. package/lib/typescript/src/animation/decay/types.d.ts +0 -21
  542. package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
  543. package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
  544. package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
  545. package/lib/typescript/src/animation/spring/index.d.ts +0 -3
  546. package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
  547. package/lib/typescript/src/animation/spring/types.d.ts +0 -6
  548. package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
  549. package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
  550. package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
  551. package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
  552. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
  553. package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
  554. package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
  555. package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
  556. package/lib/typescript/src/animation/timing/index.d.ts +0 -4
  557. package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
  558. package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
  559. package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
  560. package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  561. package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
  562. package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
  563. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  564. package/lib/typescript/src/values/api.d.ts +0 -26
  565. package/lib/typescript/src/values/api.web.d.ts +0 -2
  566. package/lib/typescript/src/values/hooks/index.d.ts +0 -4
  567. package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
  568. package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
  569. package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
  570. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
  571. package/lib/typescript/src/values/index.d.ts +0 -4
  572. package/lib/typescript/src/values/selector.d.ts +0 -14
  573. package/lib/typescript/src/values/types.d.ts +0 -63
  574. package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
  575. package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
  576. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
  577. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
  578. package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
  579. package/lib/typescript/src/values/web/api.d.ts +0 -2
  580. package/lib/typescript/src/values/web/index.d.ts +0 -1
  581. package/lib/typescript/src/views/SkiaView.d.ts +0 -35
  582. package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
  583. package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
  584. package/src/animation/decay/decay.ts +0 -35
  585. package/src/animation/decay/index.ts +0 -1
  586. package/src/animation/decay/runDecay.ts +0 -40
  587. package/src/animation/decay/types.ts +0 -24
  588. package/src/animation/spring/Spring.ts +0 -61
  589. package/src/animation/spring/functions/index.ts +0 -1
  590. package/src/animation/spring/functions/spring.ts +0 -86
  591. package/src/animation/spring/index.ts +0 -3
  592. package/src/animation/spring/runSpring.ts +0 -40
  593. package/src/animation/spring/types.ts +0 -6
  594. package/src/animation/spring/useSpring.ts +0 -31
  595. package/src/animation/timing/Easing.ts +0 -102
  596. package/src/animation/timing/createTiming.ts +0 -62
  597. package/src/animation/timing/functions/bezier.ts +0 -165
  598. package/src/animation/timing/functions/getResolvedParams.ts +0 -50
  599. package/src/animation/timing/functions/index.ts +0 -4
  600. package/src/animation/timing/functions/timing.ts +0 -44
  601. package/src/animation/timing/functions/types.ts +0 -8
  602. package/src/animation/timing/index.ts +0 -4
  603. package/src/animation/timing/runTiming.ts +0 -36
  604. package/src/animation/timing/useLoop.ts +0 -21
  605. package/src/animation/timing/useTiming.ts +0 -71
  606. package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
  607. package/src/renderer/DependencyManager.tsx +0 -196
  608. package/src/renderer/components/Drawing.tsx +0 -12
  609. package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
  610. package/src/values/api.ts +0 -61
  611. package/src/values/api.web.ts +0 -5
  612. package/src/values/hooks/index.ts +0 -4
  613. package/src/values/hooks/useClockValue.ts +0 -21
  614. package/src/values/hooks/useComputedValue.ts +0 -24
  615. package/src/values/hooks/useValue.ts +0 -17
  616. package/src/values/hooks/useValueEffect.ts +0 -18
  617. package/src/values/index.ts +0 -4
  618. package/src/values/selector.ts +0 -24
  619. package/src/values/types.ts +0 -73
  620. package/src/values/web/RNSkAnimation.ts +0 -33
  621. package/src/values/web/RNSkClockValue.ts +0 -58
  622. package/src/values/web/RNSkComputedValue.ts +0 -49
  623. package/src/values/web/RNSkReadonlyValue.ts +0 -38
  624. package/src/values/web/RNSkValue.ts +0 -57
  625. package/src/values/web/api.ts +0 -33
  626. package/src/values/web/index.ts +0 -1
  627. package/src/views/SkiaView.tsx +0 -111
  628. package/src/views/SkiaView.web.tsx +0 -22
  629. package/src/views/useDrawCallback.ts +0 -19
@@ -2,10 +2,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2
2
 
3
3
  import { JsiSkDOM } from "../dom/nodes";
4
4
  export class Container {
5
- constructor(Skia, depMgr) {
6
- let redraw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
7
- let getNativeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : () => 0;
8
- this.depMgr = depMgr;
5
+ constructor(Skia) {
6
+ let redraw = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
7
+ let getNativeId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => 0;
9
8
  this.redraw = redraw;
10
9
  this.getNativeId = getNativeId;
11
10
 
@@ -14,8 +13,7 @@ export class Container {
14
13
  _defineProperty(this, "Sk", void 0);
15
14
 
16
15
  this.Sk = new JsiSkDOM({
17
- Skia,
18
- depMgr
16
+ Skia
19
17
  });
20
18
  this._root = this.Sk.Group();
21
19
  }
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkDOM","Container","constructor","Skia","depMgr","redraw","getNativeId","Sk","_root","Group","draw","ctx","render","root"],"sources":["Container.tsx"],"sourcesContent":["import { JsiSkDOM } from \"../dom/nodes\";\nimport type {\n GroupProps,\n DrawingContext,\n RenderNode,\n SkDOM,\n} from \"../dom/types\";\nimport type { Skia } from \"../skia/types\";\n\nimport type { DependencyManager } from \"./DependencyManager\";\n\nexport class Container {\n private _root: RenderNode<GroupProps>;\n public Sk: SkDOM;\n constructor(\n Skia: Skia,\n public depMgr: DependencyManager,\n public redraw: () => void = () => {},\n public getNativeId: () => number = () => 0\n ) {\n this.Sk = new JsiSkDOM({ Skia, depMgr });\n this._root = this.Sk.Group();\n }\n\n draw(ctx: DrawingContext) {\n this._root.render(ctx);\n }\n\n get root() {\n return this._root;\n }\n}\n"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,cAAzB;AAWA,OAAO,MAAMC,SAAN,CAAgB;EAGrBC,WAAW,CACTC,IADS,EAEFC,MAFE,EAKT;IAAA,IAFOC,MAEP,uEAF4B,MAAM,CAAE,CAEpC;IAAA,IADOC,WACP,uEADmC,MAAM,CACzC;IAAA,KAHOF,MAGP,GAHOA,MAGP;IAAA,KAFOC,MAEP,GAFOA,MAEP;IAAA,KADOC,WACP,GADOA,WACP;;IAAA;;IAAA;;IACA,KAAKC,EAAL,GAAU,IAAIP,QAAJ,CAAa;MAAEG,IAAF;MAAQC;IAAR,CAAb,CAAV;IACA,KAAKI,KAAL,GAAa,KAAKD,EAAL,CAAQE,KAAR,EAAb;EACD;;EAEDC,IAAI,CAACC,GAAD,EAAsB;IACxB,KAAKH,KAAL,CAAWI,MAAX,CAAkBD,GAAlB;EACD;;EAEO,IAAJE,IAAI,GAAG;IACT,OAAO,KAAKL,KAAZ;EACD;;AAnBoB"}
1
+ {"version":3,"names":["JsiSkDOM","Container","constructor","Skia","redraw","getNativeId","Sk","_root","Group","draw","ctx","render","root"],"sources":["Container.tsx"],"sourcesContent":["import { JsiSkDOM } from \"../dom/nodes\";\nimport type {\n GroupProps,\n DrawingContext,\n RenderNode,\n SkDOM,\n} from \"../dom/types\";\nimport type { Skia } from \"../skia/types\";\n\nexport class Container {\n private _root: RenderNode<GroupProps>;\n public Sk: SkDOM;\n constructor(\n Skia: Skia,\n public redraw: () => void = () => {},\n public getNativeId: () => number = () => 0\n ) {\n this.Sk = new JsiSkDOM({ Skia });\n this._root = this.Sk.Group();\n }\n\n draw(ctx: DrawingContext) {\n this._root.render(ctx);\n }\n\n get root() {\n return this._root;\n }\n}\n"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,cAAzB;AASA,OAAO,MAAMC,SAAN,CAAgB;EAGrBC,WAAW,CACTC,IADS,EAIT;IAAA,IAFOC,MAEP,uEAF4B,MAAM,CAAE,CAEpC;IAAA,IADOC,WACP,uEADmC,MAAM,CACzC;IAAA,KAFOD,MAEP,GAFOA,MAEP;IAAA,KADOC,WACP,GADOA,WACP;;IAAA;;IAAA;;IACA,KAAKC,EAAL,GAAU,IAAIN,QAAJ,CAAa;MAAEG;IAAF,CAAb,CAAV;IACA,KAAKI,KAAL,GAAa,KAAKD,EAAL,CAAQE,KAAR,EAAb;EACD;;EAEDC,IAAI,CAACC,GAAD,EAAsB;IACxB,KAAKH,KAAL,CAAWI,MAAX,CAAkBD,GAAlB;EACD;;EAEO,IAAJE,IAAI,GAAG;IACT,OAAO,KAAKL,KAAZ;EACD;;AAlBoB"}
@@ -1,17 +1,14 @@
1
1
  import { NodeType } from "../dom/types";
2
- import type { DeclarationNode, FractalNoiseProps, RenderNode, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, CustomDrawingNodeProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps, ParagraphProps } from "../dom/types";
2
+ import type { DeclarationNode, FractalNoiseProps, RenderNode, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps, ParagraphProps } from "../dom/types";
3
3
  import type { ChildrenProps } from "../dom/types/Common";
4
4
  import type { BlendProps, MorphologyImageFilterProps } from "../dom/types/ImageFilters";
5
5
  import type { SkRect, SkRRect } from "../skia/types";
6
6
  import type { JsiDrawingNode } from "../dom/nodes/DrawingNode";
7
- import type { SkiaValue } from "../values";
8
7
  import type { Container } from "./Container";
9
8
  import type { SkiaProps } from "./processors";
10
- import type { DependencyManager } from "./DependencyManager";
11
9
  export declare const NATIVE_DOM: boolean;
12
10
  declare global {
13
11
  var SkiaDomApi: {
14
- DependencyManager: (registerValues: (values: Array<SkiaValue<unknown>>) => () => void) => DependencyManager;
15
12
  RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;
16
13
  RRectNode: (props: RoundedRectProps) => JsiDrawingNode<RoundedRectProps, SkRRect>;
17
14
  GroupNode: (props: GroupProps) => RenderNode<GroupProps>;
@@ -19,7 +16,6 @@ declare global {
19
16
  FillNode: (props: PaintProps) => RenderNode<PaintProps>;
20
17
  CircleNode: (props: CircleProps) => RenderNode<CircleProps>;
21
18
  PathNode: (props: PathProps) => RenderNode<PathProps>;
22
- CustomDrawingNode: (props: CustomDrawingNodeProps) => RenderNode<CustomDrawingNodeProps>;
23
19
  LineNode: (props: LineProps) => RenderNode<LineProps>;
24
20
  ImageNode: (props: ImageProps) => RenderNode<ImageProps>;
25
21
  OvalNode: (props: OvalProps) => RenderNode<OvalProps>;
@@ -79,7 +75,6 @@ declare global {
79
75
  skImage: SkiaProps<ImageProps>;
80
76
  skCircle: SkiaProps<CircleProps>;
81
77
  skPath: SkiaProps<PathProps>;
82
- skDrawing: SkiaProps<CustomDrawingNodeProps>;
83
78
  skLine: SkiaProps<LineProps>;
84
79
  skOval: SkiaProps<OvalProps>;
85
80
  skPatch: SkiaProps<PatchProps>;
@@ -31,9 +31,6 @@ export const createNode = (container, type, props) => {
31
31
  case NodeType.Path:
32
32
  return Sk.Path(props);
33
33
 
34
- case NodeType.Drawing:
35
- return Sk.CustomDrawing(props);
36
-
37
34
  case NodeType.Line:
38
35
  return Sk.Line(props);
39
36
 
@@ -1 +1 @@
1
- {"version":3,"names":["NodeType","exhaustiveCheck","shouldUseJSDomOnNative","NATIVE_DOM","global","SkiaDomApi","createNode","container","type","props","Sk","Layer","Group","Paint","Fill","Image","Circle","Path","Drawing","CustomDrawing","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","BlurImageFilter","OffsetImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LerpColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","Shader","ImageShader","ColorShader","Turbulence","FractalNoise","LinearGradient","RadialGradient","SweepGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow","Paragraph"],"sources":["HostComponents.ts"],"sourcesContent":["import { NodeType } from \"../dom/types\";\nimport type {\n DeclarationNode,\n FractalNoiseProps,\n RenderNode,\n CircleProps,\n DrawingNodeProps,\n ImageProps,\n PaintProps,\n PathProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n DiffRectProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextProps,\n VerticesProps,\n BlurMaskFilterProps,\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n MatrixColorFilterProps,\n ShaderProps,\n ImageShaderProps,\n LinearGradientProps,\n GroupProps,\n PatchProps,\n BlendColorFilterProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n CornerPathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n BoxProps,\n BoxShadowProps,\n ParagraphProps,\n} from \"../dom/types\";\nimport type { ChildrenProps } from \"../dom/types/Common\";\nimport type {\n BlendProps,\n MorphologyImageFilterProps,\n} from \"../dom/types/ImageFilters\";\nimport type { SkRect, SkRRect } from \"../skia/types\";\nimport type { JsiDrawingNode } from \"../dom/nodes/DrawingNode\";\nimport type { SkiaValue } from \"../values\";\n\nimport type { Container } from \"./Container\";\nimport { exhaustiveCheck } from \"./typeddash\";\nimport type { SkiaProps } from \"./processors\";\nimport type { DependencyManager } from \"./DependencyManager\";\n\n// This flag should only be turned on for debugging/testing\nconst shouldUseJSDomOnNative = false;\nexport const NATIVE_DOM = shouldUseJSDomOnNative ? false : !!global.SkiaDomApi;\n\ndeclare global {\n var SkiaDomApi: {\n DependencyManager: (\n registerValues: (values: Array<SkiaValue<unknown>>) => () => void\n ) => DependencyManager;\n\n // FIXME: We need a better type for this\n RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;\n RRectNode: (\n props: RoundedRectProps\n ) => JsiDrawingNode<RoundedRectProps, SkRRect>;\n GroupNode: (props: GroupProps) => RenderNode<GroupProps>;\n PaintNode: (props: PaintProps) => DeclarationNode<PaintProps>;\n FillNode: (props: PaintProps) => RenderNode<PaintProps>;\n CircleNode: (props: CircleProps) => RenderNode<CircleProps>;\n PathNode: (props: PathProps) => RenderNode<PathProps>;\n CustomDrawingNode: (\n props: CustomDrawingNodeProps\n ) => RenderNode<CustomDrawingNodeProps>;\n LineNode: (props: LineProps) => RenderNode<LineProps>;\n ImageNode: (props: ImageProps) => RenderNode<ImageProps>;\n OvalNode: (props: OvalProps) => RenderNode<OvalProps>;\n PatchNode: (props: PatchProps) => RenderNode<PatchProps>;\n PointsNode: (props: PointsProps) => RenderNode<PointsProps>;\n DiffRectNode: (props: DiffRectProps) => RenderNode<DiffRectProps>;\n // Mask filters\n BlurMaskFilterNode: (\n props: BlurMaskFilterProps\n ) => DeclarationNode<BlurMaskFilterProps>;\n\n // Path effects\n DashPathEffectNode: (\n props: DashPathEffectProps\n ) => DeclarationNode<DashPathEffectProps>;\n DiscretePathEffectNode: (\n props: DiscretePathEffectProps\n ) => DeclarationNode<DiscretePathEffectProps>;\n CornerPathEffectNode: (\n props: CornerPathEffectProps\n ) => DeclarationNode<CornerPathEffectProps>;\n Path1DPathEffectNode: (\n props: Path1DPathEffectProps\n ) => DeclarationNode<Path1DPathEffectProps>;\n Path2DPathEffectNode: (\n props: Path2DPathEffectProps\n ) => DeclarationNode<Path2DPathEffectProps>;\n Line2DPathEffectNode: (\n props: Line2DPathEffectProps\n ) => DeclarationNode<Line2DPathEffectProps>;\n SumPathEffectNode: () => DeclarationNode<null>;\n\n // Image filters\n BlendImageFilterNode: (\n props: BlendImageFilterProps\n ) => DeclarationNode<BlendImageFilterProps>;\n DropShadowImageFilterNode: (\n props: DropShadowImageFilterProps\n ) => DeclarationNode<DropShadowImageFilterProps>;\n DisplacementMapImageFilterNode: (\n props: DisplacementMapImageFilterProps\n ) => DeclarationNode<DisplacementMapImageFilterProps>;\n BlurImageFilterNode: (\n props: BlurImageFilterProps\n ) => DeclarationNode<BlurImageFilterProps>;\n OffsetImageFilterNode: (\n props: OffsetImageFilterProps\n ) => DeclarationNode<OffsetImageFilterProps>;\n MorphologyImageFilterNode: (\n props: MorphologyImageFilterProps\n ) => DeclarationNode<MorphologyImageFilterProps>;\n RuntimeShaderImageFilterNode: (\n props: RuntimeShaderImageFilterProps\n ) => DeclarationNode<RuntimeShaderImageFilterProps>;\n\n // Color filters\n MatrixColorFilterNode: (\n props: MatrixColorFilterProps\n ) => DeclarationNode<MatrixColorFilterProps>;\n BlendColorFilterNode: (\n props: BlendColorFilterProps\n ) => DeclarationNode<BlendColorFilterProps>;\n LinearToSRGBGammaColorFilterNode: () => DeclarationNode<null>;\n SRGBToLinearGammaColorFilterNode: () => DeclarationNode<null>;\n LumaColorFilterNode: () => DeclarationNode<null>;\n LerpColorFilterNode: (\n props: LerpColorFilterProps\n ) => DeclarationNode<LerpColorFilterProps>;\n\n // Shaders\n ShaderNode: (props: ShaderProps) => DeclarationNode<ShaderProps>;\n ImageShaderNode: (\n props: ImageShaderProps\n ) => DeclarationNode<ImageShaderProps>;\n ColorShaderNode: (props: ColorProps) => DeclarationNode<ColorProps>;\n TurbulenceNode: (\n props: TurbulenceProps\n ) => DeclarationNode<TurbulenceProps>;\n FractalNoiseNode: (\n props: FractalNoiseProps\n ) => DeclarationNode<FractalNoiseProps>;\n LinearGradientNode: (\n props: LinearGradientProps\n ) => DeclarationNode<LinearGradientProps>;\n RadialGradientNode: (\n props: RadialGradientProps\n ) => DeclarationNode<RadialGradientProps>;\n SweepGradientNode: (\n props: SweepGradientProps\n ) => DeclarationNode<SweepGradientProps>;\n TwoPointConicalGradientNode: (\n props: TwoPointConicalGradientProps\n ) => DeclarationNode<TwoPointConicalGradientProps>;\n PictureNode: (props: PictureProps) => RenderNode<PictureProps>;\n ImageSVGNode: (props: ImageSVGProps) => RenderNode<ImageSVGProps>;\n VerticesNode: (props: VerticesProps) => RenderNode<VerticesProps>;\n TextNode: (prop: TextProps) => RenderNode<TextProps>;\n TextPathNode: (prop: TextPathProps) => RenderNode<TextPathProps>;\n TextBlobNode: (prop: TextBlobProps) => RenderNode<TextBlobProps>;\n GlyphsNode: (prop: GlyphsProps) => RenderNode<GlyphsProps>;\n BlendNode: (prop: BlendProps) => DeclarationNode<BlendProps>;\n BackdropFilterNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n BoxNode: (prop: BoxProps) => RenderNode<BoxProps>;\n BoxShadowNode: (prop: BoxShadowProps) => DeclarationNode<BoxShadowProps>;\n LayerNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n\n // Paragraph\n ParagraphNode: (props: ParagraphProps) => RenderNode<ParagraphProps>;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n skGroup: SkiaProps<GroupProps>;\n skLayer: SkiaProps<ChildrenProps>;\n skPaint: SkiaProps<PaintProps>;\n\n // Drawings\n skFill: SkiaProps<DrawingNodeProps>;\n skImage: SkiaProps<ImageProps>;\n skCircle: SkiaProps<CircleProps>;\n skPath: SkiaProps<PathProps>;\n skDrawing: SkiaProps<CustomDrawingNodeProps>;\n skLine: SkiaProps<LineProps>;\n skOval: SkiaProps<OvalProps>;\n skPatch: SkiaProps<PatchProps>;\n skPoints: SkiaProps<PointsProps>;\n skRect: SkiaProps<RectProps>;\n skRRect: SkiaProps<RoundedRectProps>;\n skVertices: SkiaProps<VerticesProps>;\n skText: SkiaProps<TextProps>;\n skTextPath: SkiaProps<TextPathProps>;\n skTextBlob: SkiaProps<TextBlobProps>;\n skGlyphs: SkiaProps<GlyphsProps>;\n skDiffRect: SkiaProps<DiffRectProps>;\n skPicture: SkiaProps<PictureProps>;\n skImageSVG: SkiaProps<ImageSVGProps>;\n\n // BlurMaskFilters\n skBlurMaskFilter: SkiaProps<BlurMaskFilterProps>;\n\n // ImageFilters\n skBlendImageFilter: SkiaProps<BlendImageFilterProps>;\n skBlurImageFilter: SkiaProps<BlurImageFilterProps>;\n skOffsetImageFilter: SkiaProps<OffsetImageFilterProps>;\n skDropShadowImageFilter: SkiaProps<DropShadowImageFilterProps>;\n skDisplacementMapImageFilter: SkiaProps<DisplacementMapImageFilterProps>;\n skRuntimeShaderImageFilter: SkiaProps<RuntimeShaderImageFilterProps>;\n skMorphologyImageFilter: SkiaProps<MorphologyImageFilterProps>;\n\n // ColorFilters\n skMatrixColorFilter: SkiaProps<MatrixColorFilterProps>;\n skBlendColorFilter: SkiaProps<BlendColorFilterProps>;\n skLinearToSRGBGammaColorFilter: SkiaProps<ChildrenProps>;\n skSRGBToLinearGammaColorFilter: SkiaProps<ChildrenProps>;\n skLumaColorFilter: SkiaProps<ChildrenProps>;\n skLerpColorFilter: SkiaProps<LerpColorFilterProps>;\n\n // Shaders\n skShader: SkiaProps<ShaderProps>;\n skImageShader: SkiaProps<ImageShaderProps>;\n skColorShader: SkiaProps<ColorProps>;\n skTurbulence: SkiaProps<TurbulenceProps>;\n skFractalNoise: SkiaProps<FractalNoiseProps>;\n skLinearGradient: SkiaProps<LinearGradientProps>;\n skRadialGradient: SkiaProps<RadialGradientProps>;\n skSweepGradient: SkiaProps<SweepGradientProps>;\n skTwoPointConicalGradient: SkiaProps<TwoPointConicalGradientProps>;\n\n // Path Effects\n skDiscretePathEffect: SkiaProps<DiscretePathEffectProps>;\n skDashPathEffect: SkiaProps<DashPathEffectProps>;\n skPath1DPathEffect: SkiaProps<Path1DPathEffectProps>;\n skPath2DPathEffect: SkiaProps<Path2DPathEffectProps>;\n skCornerPathEffect: SkiaProps<CornerPathEffectProps>;\n skSumPathEffect: ChildrenProps;\n skLine2DPathEffect: SkiaProps<Line2DPathEffectProps>;\n\n // Mixed declarations/drawings\n skBlend: SkiaProps<BlendProps>;\n skBackdropFilter: SkiaProps<ChildrenProps>;\n skBox: SkiaProps<BoxProps>;\n skBoxShadow: SkiaProps<BoxShadowProps>;\n\n // Paragraph\n skParagraph: SkiaProps<ParagraphProps>;\n }\n }\n}\n\nexport const createNode = (\n container: Container,\n type: NodeType,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n) => {\n const { Sk } = container;\n switch (type) {\n case NodeType.Layer:\n return Sk.Layer(props);\n case NodeType.Group:\n return Sk.Group(props);\n case NodeType.Paint:\n return Sk.Paint(props);\n // Drawings\n case NodeType.Fill:\n return Sk.Fill(props);\n case NodeType.Image:\n return Sk.Image(props);\n case NodeType.Circle:\n return Sk.Circle(props);\n case NodeType.Path:\n return Sk.Path(props);\n case NodeType.Drawing:\n return Sk.CustomDrawing(props);\n case NodeType.Line:\n return Sk.Line(props);\n case NodeType.Oval:\n return Sk.Oval(props);\n case NodeType.Patch:\n return Sk.Patch(props);\n case NodeType.Points:\n return Sk.Points(props);\n case NodeType.Rect:\n return Sk.Rect(props);\n case NodeType.RRect:\n return Sk.RRect(props);\n case NodeType.Vertices:\n return Sk.Vertices(props);\n case NodeType.Text:\n return Sk.Text(props);\n case NodeType.TextPath:\n return Sk.TextPath(props);\n case NodeType.TextBlob:\n return Sk.TextBlob(props);\n case NodeType.Glyphs:\n return Sk.Glyphs(props);\n case NodeType.DiffRect:\n return Sk.DiffRect(props);\n case NodeType.Picture:\n return Sk.Picture(props);\n case NodeType.ImageSVG:\n return Sk.ImageSVG(props);\n // Mask Filter\n case NodeType.BlurMaskFilter:\n return Sk.BlurMaskFilter(props);\n // Image Filter\n case NodeType.BlendImageFilter:\n return Sk.BlendImageFilter(props);\n case NodeType.BlurImageFilter:\n return Sk.BlurImageFilter(props);\n case NodeType.OffsetImageFilter:\n return Sk.OffsetImageFilter(props);\n case NodeType.DropShadowImageFilter:\n return Sk.DropShadowImageFilter(props);\n case NodeType.DisplacementMapImageFilter:\n return Sk.DisplacementMapImageFilter(props);\n case NodeType.MorphologyImageFilter:\n return Sk.MorphologyImageFilter(props);\n case NodeType.RuntimeShaderImageFilter:\n return Sk.RuntimeShaderImageFilter(props);\n // Color Filter\n case NodeType.MatrixColorFilter:\n return Sk.MatrixColorFilter(props);\n case NodeType.BlendColorFilter:\n return Sk.BlendColorFilter(props);\n case NodeType.LerpColorFilter:\n return Sk.LerpColorFilter(props);\n case NodeType.LumaColorFilter:\n return Sk.LumaColorFilter();\n case NodeType.LinearToSRGBGammaColorFilter:\n return Sk.LinearToSRGBGammaColorFilter();\n case NodeType.SRGBToLinearGammaColorFilter:\n return Sk.SRGBToLinearGammaColorFilter();\n // Shader\n case NodeType.Shader:\n return Sk.Shader(props);\n case NodeType.ImageShader:\n return Sk.ImageShader(props);\n case NodeType.ColorShader:\n return Sk.ColorShader(props);\n case NodeType.Turbulence:\n return Sk.Turbulence(props);\n case NodeType.FractalNoise:\n return Sk.FractalNoise(props);\n case NodeType.LinearGradient:\n return Sk.LinearGradient(props);\n case NodeType.RadialGradient:\n return Sk.RadialGradient(props);\n case NodeType.SweepGradient:\n return Sk.SweepGradient(props);\n case NodeType.TwoPointConicalGradient:\n return Sk.TwoPointConicalGradient(props);\n // Path Effect\n case NodeType.CornerPathEffect:\n return Sk.CornerPathEffect(props);\n case NodeType.DiscretePathEffect:\n return Sk.DiscretePathEffect(props);\n case NodeType.DashPathEffect:\n return Sk.DashPathEffect(props);\n case NodeType.Path1DPathEffect:\n return Sk.Path1DPathEffect(props);\n case NodeType.Path2DPathEffect:\n return Sk.Path2DPathEffect(props);\n case NodeType.SumPathEffect:\n return Sk.SumPathEffect();\n case NodeType.Line2DPathEffect:\n return Sk.Line2DPathEffect(props);\n // Mixed\n case NodeType.Blend:\n return Sk.Blend(props);\n case NodeType.BackdropFilter:\n return Sk.BackdropFilter(props);\n case NodeType.Box:\n return Sk.Box(props);\n case NodeType.BoxShadow:\n return Sk.BoxShadow(props);\n // Paragraph\n case NodeType.Paragraph:\n return Sk.Paragraph(props);\n default:\n return exhaustiveCheck(type);\n }\n};\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,cAAzB;AAgEA,SAASC,eAAT,QAAgC,aAAhC;AAIA;AACA,MAAMC,sBAAsB,GAAG,KAA/B;AACA,OAAO,MAAMC,UAAU,GAAGD,sBAAsB,GAAG,KAAH,GAAW,CAAC,CAACE,MAAM,CAACC,UAA7D;AAmNP,OAAO,MAAMC,UAAU,GAAG,CACxBC,SADwB,EAExBC,IAFwB,EAIxBC,KAJwB,KAKrB;EACH,MAAM;IAAEC;EAAF,IAASH,SAAf;;EACA,QAAQC,IAAR;IACE,KAAKR,QAAQ,CAACW,KAAd;MACE,OAAOD,EAAE,CAACC,KAAH,CAASF,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACY,KAAd;MACE,OAAOF,EAAE,CAACE,KAAH,CAASH,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACa,KAAd;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global","SkiaDomApi","createNode","container","type","props","Sk","Layer","Group","Paint","Fill","Image","Circle","Path","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","BlurImageFilter","OffsetImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LerpColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","Shader","ImageShader","ColorShader","Turbulence","FractalNoise","LinearGradient","RadialGradient","SweepGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow","Paragraph"],"sources":["HostComponents.ts"],"sourcesContent":["import { NodeType } from \"../dom/types\";\nimport type {\n DeclarationNode,\n FractalNoiseProps,\n RenderNode,\n CircleProps,\n DrawingNodeProps,\n ImageProps,\n PaintProps,\n PathProps,\n LineProps,\n OvalProps,\n DiffRectProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextProps,\n VerticesProps,\n BlurMaskFilterProps,\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n MatrixColorFilterProps,\n ShaderProps,\n ImageShaderProps,\n LinearGradientProps,\n GroupProps,\n PatchProps,\n BlendColorFilterProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n CornerPathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n BoxProps,\n BoxShadowProps,\n ParagraphProps,\n} from \"../dom/types\";\nimport type { ChildrenProps } from \"../dom/types/Common\";\nimport type {\n BlendProps,\n MorphologyImageFilterProps,\n} from \"../dom/types/ImageFilters\";\nimport type { SkRect, SkRRect } from \"../skia/types\";\nimport type { JsiDrawingNode } from \"../dom/nodes/DrawingNode\";\n\nimport type { Container } from \"./Container\";\nimport { exhaustiveCheck } from \"./typeddash\";\nimport type { SkiaProps } from \"./processors\";\n\n// This flag should only be turned on for debugging/testing\nconst shouldUseJSDomOnNative = false;\nexport const NATIVE_DOM = shouldUseJSDomOnNative ? false : !!global.SkiaDomApi;\n\ndeclare global {\n var SkiaDomApi: {\n // FIXME: We need a better type for this\n RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;\n RRectNode: (\n props: RoundedRectProps\n ) => JsiDrawingNode<RoundedRectProps, SkRRect>;\n GroupNode: (props: GroupProps) => RenderNode<GroupProps>;\n PaintNode: (props: PaintProps) => DeclarationNode<PaintProps>;\n FillNode: (props: PaintProps) => RenderNode<PaintProps>;\n CircleNode: (props: CircleProps) => RenderNode<CircleProps>;\n PathNode: (props: PathProps) => RenderNode<PathProps>;\n LineNode: (props: LineProps) => RenderNode<LineProps>;\n ImageNode: (props: ImageProps) => RenderNode<ImageProps>;\n OvalNode: (props: OvalProps) => RenderNode<OvalProps>;\n PatchNode: (props: PatchProps) => RenderNode<PatchProps>;\n PointsNode: (props: PointsProps) => RenderNode<PointsProps>;\n DiffRectNode: (props: DiffRectProps) => RenderNode<DiffRectProps>;\n // Mask filters\n BlurMaskFilterNode: (\n props: BlurMaskFilterProps\n ) => DeclarationNode<BlurMaskFilterProps>;\n\n // Path effects\n DashPathEffectNode: (\n props: DashPathEffectProps\n ) => DeclarationNode<DashPathEffectProps>;\n DiscretePathEffectNode: (\n props: DiscretePathEffectProps\n ) => DeclarationNode<DiscretePathEffectProps>;\n CornerPathEffectNode: (\n props: CornerPathEffectProps\n ) => DeclarationNode<CornerPathEffectProps>;\n Path1DPathEffectNode: (\n props: Path1DPathEffectProps\n ) => DeclarationNode<Path1DPathEffectProps>;\n Path2DPathEffectNode: (\n props: Path2DPathEffectProps\n ) => DeclarationNode<Path2DPathEffectProps>;\n Line2DPathEffectNode: (\n props: Line2DPathEffectProps\n ) => DeclarationNode<Line2DPathEffectProps>;\n SumPathEffectNode: () => DeclarationNode<null>;\n\n // Image filters\n BlendImageFilterNode: (\n props: BlendImageFilterProps\n ) => DeclarationNode<BlendImageFilterProps>;\n DropShadowImageFilterNode: (\n props: DropShadowImageFilterProps\n ) => DeclarationNode<DropShadowImageFilterProps>;\n DisplacementMapImageFilterNode: (\n props: DisplacementMapImageFilterProps\n ) => DeclarationNode<DisplacementMapImageFilterProps>;\n BlurImageFilterNode: (\n props: BlurImageFilterProps\n ) => DeclarationNode<BlurImageFilterProps>;\n OffsetImageFilterNode: (\n props: OffsetImageFilterProps\n ) => DeclarationNode<OffsetImageFilterProps>;\n MorphologyImageFilterNode: (\n props: MorphologyImageFilterProps\n ) => DeclarationNode<MorphologyImageFilterProps>;\n RuntimeShaderImageFilterNode: (\n props: RuntimeShaderImageFilterProps\n ) => DeclarationNode<RuntimeShaderImageFilterProps>;\n\n // Color filters\n MatrixColorFilterNode: (\n props: MatrixColorFilterProps\n ) => DeclarationNode<MatrixColorFilterProps>;\n BlendColorFilterNode: (\n props: BlendColorFilterProps\n ) => DeclarationNode<BlendColorFilterProps>;\n LinearToSRGBGammaColorFilterNode: () => DeclarationNode<null>;\n SRGBToLinearGammaColorFilterNode: () => DeclarationNode<null>;\n LumaColorFilterNode: () => DeclarationNode<null>;\n LerpColorFilterNode: (\n props: LerpColorFilterProps\n ) => DeclarationNode<LerpColorFilterProps>;\n\n // Shaders\n ShaderNode: (props: ShaderProps) => DeclarationNode<ShaderProps>;\n ImageShaderNode: (\n props: ImageShaderProps\n ) => DeclarationNode<ImageShaderProps>;\n ColorShaderNode: (props: ColorProps) => DeclarationNode<ColorProps>;\n TurbulenceNode: (\n props: TurbulenceProps\n ) => DeclarationNode<TurbulenceProps>;\n FractalNoiseNode: (\n props: FractalNoiseProps\n ) => DeclarationNode<FractalNoiseProps>;\n LinearGradientNode: (\n props: LinearGradientProps\n ) => DeclarationNode<LinearGradientProps>;\n RadialGradientNode: (\n props: RadialGradientProps\n ) => DeclarationNode<RadialGradientProps>;\n SweepGradientNode: (\n props: SweepGradientProps\n ) => DeclarationNode<SweepGradientProps>;\n TwoPointConicalGradientNode: (\n props: TwoPointConicalGradientProps\n ) => DeclarationNode<TwoPointConicalGradientProps>;\n PictureNode: (props: PictureProps) => RenderNode<PictureProps>;\n ImageSVGNode: (props: ImageSVGProps) => RenderNode<ImageSVGProps>;\n VerticesNode: (props: VerticesProps) => RenderNode<VerticesProps>;\n TextNode: (prop: TextProps) => RenderNode<TextProps>;\n TextPathNode: (prop: TextPathProps) => RenderNode<TextPathProps>;\n TextBlobNode: (prop: TextBlobProps) => RenderNode<TextBlobProps>;\n GlyphsNode: (prop: GlyphsProps) => RenderNode<GlyphsProps>;\n BlendNode: (prop: BlendProps) => DeclarationNode<BlendProps>;\n BackdropFilterNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n BoxNode: (prop: BoxProps) => RenderNode<BoxProps>;\n BoxShadowNode: (prop: BoxShadowProps) => DeclarationNode<BoxShadowProps>;\n LayerNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n\n // Paragraph\n ParagraphNode: (props: ParagraphProps) => RenderNode<ParagraphProps>;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n skGroup: SkiaProps<GroupProps>;\n skLayer: SkiaProps<ChildrenProps>;\n skPaint: SkiaProps<PaintProps>;\n\n // Drawings\n skFill: SkiaProps<DrawingNodeProps>;\n skImage: SkiaProps<ImageProps>;\n skCircle: SkiaProps<CircleProps>;\n skPath: SkiaProps<PathProps>;\n skLine: SkiaProps<LineProps>;\n skOval: SkiaProps<OvalProps>;\n skPatch: SkiaProps<PatchProps>;\n skPoints: SkiaProps<PointsProps>;\n skRect: SkiaProps<RectProps>;\n skRRect: SkiaProps<RoundedRectProps>;\n skVertices: SkiaProps<VerticesProps>;\n skText: SkiaProps<TextProps>;\n skTextPath: SkiaProps<TextPathProps>;\n skTextBlob: SkiaProps<TextBlobProps>;\n skGlyphs: SkiaProps<GlyphsProps>;\n skDiffRect: SkiaProps<DiffRectProps>;\n skPicture: SkiaProps<PictureProps>;\n skImageSVG: SkiaProps<ImageSVGProps>;\n\n // BlurMaskFilters\n skBlurMaskFilter: SkiaProps<BlurMaskFilterProps>;\n\n // ImageFilters\n skBlendImageFilter: SkiaProps<BlendImageFilterProps>;\n skBlurImageFilter: SkiaProps<BlurImageFilterProps>;\n skOffsetImageFilter: SkiaProps<OffsetImageFilterProps>;\n skDropShadowImageFilter: SkiaProps<DropShadowImageFilterProps>;\n skDisplacementMapImageFilter: SkiaProps<DisplacementMapImageFilterProps>;\n skRuntimeShaderImageFilter: SkiaProps<RuntimeShaderImageFilterProps>;\n skMorphologyImageFilter: SkiaProps<MorphologyImageFilterProps>;\n\n // ColorFilters\n skMatrixColorFilter: SkiaProps<MatrixColorFilterProps>;\n skBlendColorFilter: SkiaProps<BlendColorFilterProps>;\n skLinearToSRGBGammaColorFilter: SkiaProps<ChildrenProps>;\n skSRGBToLinearGammaColorFilter: SkiaProps<ChildrenProps>;\n skLumaColorFilter: SkiaProps<ChildrenProps>;\n skLerpColorFilter: SkiaProps<LerpColorFilterProps>;\n\n // Shaders\n skShader: SkiaProps<ShaderProps>;\n skImageShader: SkiaProps<ImageShaderProps>;\n skColorShader: SkiaProps<ColorProps>;\n skTurbulence: SkiaProps<TurbulenceProps>;\n skFractalNoise: SkiaProps<FractalNoiseProps>;\n skLinearGradient: SkiaProps<LinearGradientProps>;\n skRadialGradient: SkiaProps<RadialGradientProps>;\n skSweepGradient: SkiaProps<SweepGradientProps>;\n skTwoPointConicalGradient: SkiaProps<TwoPointConicalGradientProps>;\n\n // Path Effects\n skDiscretePathEffect: SkiaProps<DiscretePathEffectProps>;\n skDashPathEffect: SkiaProps<DashPathEffectProps>;\n skPath1DPathEffect: SkiaProps<Path1DPathEffectProps>;\n skPath2DPathEffect: SkiaProps<Path2DPathEffectProps>;\n skCornerPathEffect: SkiaProps<CornerPathEffectProps>;\n skSumPathEffect: ChildrenProps;\n skLine2DPathEffect: SkiaProps<Line2DPathEffectProps>;\n\n // Mixed declarations/drawings\n skBlend: SkiaProps<BlendProps>;\n skBackdropFilter: SkiaProps<ChildrenProps>;\n skBox: SkiaProps<BoxProps>;\n skBoxShadow: SkiaProps<BoxShadowProps>;\n\n // Paragraph\n skParagraph: SkiaProps<ParagraphProps>;\n }\n }\n}\n\nexport const createNode = (\n container: Container,\n type: NodeType,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n) => {\n const { Sk } = container;\n switch (type) {\n case NodeType.Layer:\n return Sk.Layer(props);\n case NodeType.Group:\n return Sk.Group(props);\n case NodeType.Paint:\n return Sk.Paint(props);\n // Drawings\n case NodeType.Fill:\n return Sk.Fill(props);\n case NodeType.Image:\n return Sk.Image(props);\n case NodeType.Circle:\n return Sk.Circle(props);\n case NodeType.Path:\n return Sk.Path(props);\n case NodeType.Line:\n return Sk.Line(props);\n case NodeType.Oval:\n return Sk.Oval(props);\n case NodeType.Patch:\n return Sk.Patch(props);\n case NodeType.Points:\n return Sk.Points(props);\n case NodeType.Rect:\n return Sk.Rect(props);\n case NodeType.RRect:\n return Sk.RRect(props);\n case NodeType.Vertices:\n return Sk.Vertices(props);\n case NodeType.Text:\n return Sk.Text(props);\n case NodeType.TextPath:\n return Sk.TextPath(props);\n case NodeType.TextBlob:\n return Sk.TextBlob(props);\n case NodeType.Glyphs:\n return Sk.Glyphs(props);\n case NodeType.DiffRect:\n return Sk.DiffRect(props);\n case NodeType.Picture:\n return Sk.Picture(props);\n case NodeType.ImageSVG:\n return Sk.ImageSVG(props);\n // Mask Filter\n case NodeType.BlurMaskFilter:\n return Sk.BlurMaskFilter(props);\n // Image Filter\n case NodeType.BlendImageFilter:\n return Sk.BlendImageFilter(props);\n case NodeType.BlurImageFilter:\n return Sk.BlurImageFilter(props);\n case NodeType.OffsetImageFilter:\n return Sk.OffsetImageFilter(props);\n case NodeType.DropShadowImageFilter:\n return Sk.DropShadowImageFilter(props);\n case NodeType.DisplacementMapImageFilter:\n return Sk.DisplacementMapImageFilter(props);\n case NodeType.MorphologyImageFilter:\n return Sk.MorphologyImageFilter(props);\n case NodeType.RuntimeShaderImageFilter:\n return Sk.RuntimeShaderImageFilter(props);\n // Color Filter\n case NodeType.MatrixColorFilter:\n return Sk.MatrixColorFilter(props);\n case NodeType.BlendColorFilter:\n return Sk.BlendColorFilter(props);\n case NodeType.LerpColorFilter:\n return Sk.LerpColorFilter(props);\n case NodeType.LumaColorFilter:\n return Sk.LumaColorFilter();\n case NodeType.LinearToSRGBGammaColorFilter:\n return Sk.LinearToSRGBGammaColorFilter();\n case NodeType.SRGBToLinearGammaColorFilter:\n return Sk.SRGBToLinearGammaColorFilter();\n // Shader\n case NodeType.Shader:\n return Sk.Shader(props);\n case NodeType.ImageShader:\n return Sk.ImageShader(props);\n case NodeType.ColorShader:\n return Sk.ColorShader(props);\n case NodeType.Turbulence:\n return Sk.Turbulence(props);\n case NodeType.FractalNoise:\n return Sk.FractalNoise(props);\n case NodeType.LinearGradient:\n return Sk.LinearGradient(props);\n case NodeType.RadialGradient:\n return Sk.RadialGradient(props);\n case NodeType.SweepGradient:\n return Sk.SweepGradient(props);\n case NodeType.TwoPointConicalGradient:\n return Sk.TwoPointConicalGradient(props);\n // Path Effect\n case NodeType.CornerPathEffect:\n return Sk.CornerPathEffect(props);\n case NodeType.DiscretePathEffect:\n return Sk.DiscretePathEffect(props);\n case NodeType.DashPathEffect:\n return Sk.DashPathEffect(props);\n case NodeType.Path1DPathEffect:\n return Sk.Path1DPathEffect(props);\n case NodeType.Path2DPathEffect:\n return Sk.Path2DPathEffect(props);\n case NodeType.SumPathEffect:\n return Sk.SumPathEffect();\n case NodeType.Line2DPathEffect:\n return Sk.Line2DPathEffect(props);\n // Mixed\n case NodeType.Blend:\n return Sk.Blend(props);\n case NodeType.BackdropFilter:\n return Sk.BackdropFilter(props);\n case NodeType.Box:\n return Sk.Box(props);\n case NodeType.BoxShadow:\n return Sk.BoxShadow(props);\n // Paragraph\n case NodeType.Paragraph:\n return Sk.Paragraph(props);\n default:\n return exhaustiveCheck(type);\n }\n};\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,cAAzB;AA8DA,SAASC,eAAT,QAAgC,aAAhC;AAGA;AACA,MAAMC,sBAAsB,GAAG,KAA/B;AACA,OAAO,MAAMC,UAAU,GAAGD,sBAAsB,GAAG,KAAH,GAAW,CAAC,CAACE,MAAM,CAACC,UAA7D;AA2MP,OAAO,MAAMC,UAAU,GAAG,CACxBC,SADwB,EAExBC,IAFwB,EAIxBC,KAJwB,KAKrB;EACH,MAAM;IAAEC;EAAF,IAASH,SAAf;;EACA,QAAQC,IAAR;IACE,KAAKR,QAAQ,CAACW,KAAd;MACE,OAAOD,EAAE,CAACC,KAAH,CAASF,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACY,KAAd;MACE,OAAOF,EAAE,CAACE,KAAH,CAASH,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACa,KAAd;MACE,OAAOH,EAAE,CAACG,KAAH,CAASJ,KAAT,CAAP;IACF;;IACA,KAAKT,QAAQ,CAACc,IAAd;MACE,OAAOJ,EAAE,CAACI,IAAH,CAAQL,KAAR,CAAP;;IACF,KAAKT,QAAQ,CAACe,KAAd;MACE,OAAOL,EAAE,CAACK,KAAH,CAASN,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACgB,MAAd;MACE,OAAON,EAAE,CAACM,MAAH,CAAUP,KAAV,CAAP;;IACF,KAAKT,QAAQ,CAACiB,IAAd;MACE,OAAOP,EAAE,CAACO,IAAH,CAAQR,KAAR,CAAP;;IACF,KAAKT,QAAQ,CAACkB,IAAd;MACE,OAAOR,EAAE,C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OAAOlD,EAAE,CAACkD,aAAH,EAAP;;IACF,KAAK5D,QAAQ,CAAC6D,gBAAd;MACE,OAAOnD,EAAE,CAACmD,gBAAH,CAAoBpD,KAApB,CAAP;IACF;;IACA,KAAKT,QAAQ,CAAC8D,KAAd;MACE,OAAOpD,EAAE,CAACoD,KAAH,CAASrD,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAAC+D,cAAd;MACE,OAAOrD,EAAE,CAACqD,cAAH,CAAkBtD,KAAlB,CAAP;;IACF,KAAKT,QAAQ,CAACgE,GAAd;MACE,OAAOtD,EAAE,CAACsD,GAAH,CAAOvD,KAAP,CAAP;;IACF,KAAKT,QAAQ,CAACiE,SAAd;MACE,OAAOvD,EAAE,CAACuD,SAAH,CAAaxD,KAAb,CAAP;IACF;;IACA,KAAKT,QAAQ,CAACkE,SAAd;MACE,OAAOxD,EAAE,CAACwD,SAAH,CAAazD,KAAb,CAAP;;IACF;MACE,OAAOR,eAAe,CAACO,IAAD,CAAtB;EA1HJ;AA4HD,CAnIM"}
@@ -2,8 +2,7 @@
2
2
  import { DefaultEventPriority } from "react-reconciler/constants";
3
3
  import { bindReanimatedProps, extractReanimatedProps, unbindReanimatedNode } from "../external/reanimated/renderHelpers";
4
4
  import { createNode } from "./HostComponents";
5
- import { isSelector, isValue } from "./processors";
6
- import { mapKeys, shallowEq } from "./typeddash";
5
+ import { shallowEq } from "./typeddash";
7
6
  const DEBUG = false;
8
7
  export const debug = function () {
9
8
  if (DEBUG) {
@@ -71,9 +70,8 @@ export const skHostConfig = {
71
70
  createInstance(type, pristineProps, container, _hostContext, _internalInstanceHandle) {
72
71
  debug("createInstance", type);
73
72
  const [props, reanimatedProps] = extractReanimatedProps(pristineProps);
74
- const node = createNode(container, type, materialize(props));
73
+ const node = createNode(container, type, props);
75
74
  bindReanimatedProps(container, node, reanimatedProps);
76
- container.depMgr.subscribeNode(node, props);
77
75
  return node;
78
76
  },
79
77
 
@@ -99,7 +97,6 @@ export const skHostConfig = {
99
97
 
100
98
  resetAfterCommit(container) {
101
99
  debug("resetAfterCommit");
102
- container.depMgr.update();
103
100
  container.redraw();
104
101
  },
105
102
 
@@ -128,10 +125,8 @@ export const skHostConfig = {
128
125
  }
129
126
 
130
127
  const [props, reanimatedProps] = extractReanimatedProps(nextProps);
131
- updatePayload.depMgr.unsubscribeNode(instance);
132
- instance.setProps(materialize(props));
128
+ instance.setProps(props);
133
129
  bindReanimatedProps(updatePayload, instance, reanimatedProps);
134
- updatePayload.depMgr.subscribeNode(instance, props);
135
130
  },
136
131
 
137
132
  commitTextUpdate: (_textInstance, _oldText, _newText) => {// textInstance.instance = newText;
@@ -165,19 +160,4 @@ export const skHostConfig = {
165
160
  afterActiveInstanceBlur: () => {},
166
161
  detachDeletedInstance: () => {}
167
162
  };
168
-
169
- const materialize = props => {
170
- const result = { ...props
171
- };
172
- mapKeys(props).forEach(key => {
173
- const prop = props[key];
174
-
175
- if (isValue(prop)) {
176
- result[key] = prop.current;
177
- } else if (isSelector(prop)) {
178
- result[key] = prop.selector(prop.value.current);
179
- }
180
- });
181
- return result;
182
- };
183
163
  //# sourceMappingURL=HostConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DefaultEventPriority","bindReanimatedProps","extractReanimatedProps","unbindReanimatedNode","createNode","isSelector","isValue","mapKeys","shallowEq","DEBUG","debug","console","log","appendNode","parent","child","addChild","removeNode","removeChild","insertBefore","before","insertChildBefore","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","pristineProps","props","reanimatedProps","node","materialize","depMgr","subscribeNode","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","update","redraw","getPublicInstance","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","commitUpdate","instance","updatePayload","prevProps","nextProps","_internalHandle","unsubscribeNode","setProps","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","children","forEach","preparePortalMount","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","result","key","prop","current","selector","value"],"sources":["HostConfig.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType, Node } from \"../dom/types\";\nimport type { SkiaValue } from \"../values\";\nimport {\n bindReanimatedProps,\n extractReanimatedProps,\n unbindReanimatedNode,\n} from \"../external/reanimated/renderHelpers\";\n\nimport type { Container } from \"./Container\";\nimport { createNode } from \"./HostComponents\";\nimport type { AnimatedProps } from \"./processors\";\nimport { isSelector, isValue } from \"./processors\";\nimport { mapKeys, shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.addChild(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n unbindReanimatedNode(child);\n return parent.removeChild(child);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.insertChildBefore(child, before);\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container.root, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n pristineProps,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n const [props, reanimatedProps] = extractReanimatedProps(pristineProps);\n const node = createNode(container, type, materialize(props));\n bindReanimatedProps(container, node, reanimatedProps);\n container.depMgr.subscribeNode(node, props);\n return node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.depMgr.update();\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n const [props, reanimatedProps] = extractReanimatedProps(nextProps);\n updatePayload.depMgr.unsubscribeNode(instance);\n instance.setProps(materialize(props));\n bindReanimatedProps(updatePayload, instance, reanimatedProps);\n updatePayload.depMgr.subscribeNode(instance, props);\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root.children().forEach((child) => {\n container.root.removeChild(child);\n });\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n removeNode(container.root, child);\n },\n\n insertInContainerBefore: (container, child, before) => {\n insertBefore(container.root, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n};\n\nconst materialize = <P>(props: AnimatedProps<P>) => {\n const result = { ...props } as P;\n mapKeys(props).forEach((key) => {\n const prop = props[key];\n if (isValue(prop)) {\n result[key] = (prop as SkiaValue<P[typeof key]>).current;\n } else if (isSelector(prop)) {\n result[key] = prop.selector(prop.value.current) as P[typeof key];\n }\n });\n\n return result;\n};\n"],"mappings":"AAAA;AAEA,SAASA,oBAAT,QAAqC,4BAArC;AAIA,SACEC,mBADF,EAEEC,sBAFF,EAGEC,oBAHF,QAIO,sCAJP;AAOA,SAASC,UAAT,QAA2B,kBAA3B;AAEA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,cAApC;AACA,SAASC,OAAT,EAAkBC,SAAlB,QAAmC,aAAnC;AAEA,MAAMC,KAAK,GAAG,KAAd;AACA,OAAO,MAAMC,KAAK,GAAG,YAA6C;EAChE,IAAID,KAAJ,EAAW;IACTE,OAAO,CAACC,GAAR,CAAY,YAAZ;EACD;AACF,CAJM;;AAmCP,MAAMC,UAAU,GAAG,CAACC,MAAD,EAAwBC,KAAxB,KAAiD;EAClED,MAAM,CAACE,QAAP,CAAgBD,KAAhB;AACD,CAFD;;AAIA,MAAME,UAAU,GAAG,CAACH,MAAD,EAAwBC,KAAxB,KAAiD;EAClEZ,oBAAoB,CAACY,KAAD,CAApB;EACA,OAAOD,MAAM,CAACI,WAAP,CAAmBH,KAAnB,CAAP;AACD,CAHD;;AAKA,MAAMI,YAAY,GAAG,CACnBL,MADmB,EAEnBC,KAFmB,EAGnBK,MAHmB,KAIhB;EACHN,MAAM,CAACO,iBAAP,CAAyBN,KAAzB,EAAgCK,MAAhC;AACD,CAND;;AAQA,OAAO,MAAME,YAA4B,GAAG;EAC1C;AACF;AACA;EACEC,GAAG,EAAEC,IAAI,CAACD,GAJgC;EAK1CE,gBAAgB,EAAE,IALwB;EAM1CC,iBAAiB,EAAE,KANuB;EAO1CC,mBAAmB,EAAE,KAPqB;EAQ1CC,iBAAiB,EAAE,KARuB;EAS1C;EAEAC,eAAe,EAAEC,UAXyB;EAY1CC,aAAa,EAAEC,YAZ2B;EAa1CC,SAAS,EAAE,CAAC,CAb8B;;EAe1CC,sBAAsB,CAACC,SAAD,EAAYpB,KAAZ,EAAmB;IAC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EAAmBK,MAAnB,KAA8B;IACrDD,YAAY,CAACgB,SAAS,CAACC,IAAX,EAAiBrB,KAAjB,EAAwBK,MAAxB,CAAZ;EACD,CAvKyC;EAyK1CD,YAAY,EAAE,CAACL,MAAD,EAASC,KAAT,EAAgBK,MAAhB,KAA2B;IACvCD,YAAY,CAACL,MAAD,EAASC,KAAT,EAAgBK,MAAhB,CAAZ;EACD,CA3KyC;EA4K1C;EACA;EACA;EACAyE,uBAAuB,EAAE,MAAM7F,oBA/KW;EAgL1C8F,wBAAwB,EAAE,MAAM,CAAE,CAhLQ;EAiL1CC,uBAAuB,EAAE,MAAM,CAAE,CAjLS;EAkL1CC,qBAAqB,EAAE,MAAM,CAAE;AAlLW,CAArC;;AAqLP,MAAMxC,WAAW,GAAOH,KAAJ,IAAgC;EAClD,MAAM4C,MAAM,GAAG,EAAE,GAAG5C;EAAL,CAAf;EACA9C,OAAO,CAAC8C,KAAD,CAAP,CAAeoC,OAAf,CAAwBS,GAAD,IAAS;IAC9B,MAAMC,IAAI,GAAG9C,KAAK,CAAC6C,GAAD,CAAlB;;IACA,IAAI5F,OAAO,CAAC6F,IAAD,CAAX,EAAmB;MACjBF,MAAM,CAACC,GAAD,CAAN,GAAeC,IAAD,CAAmCC,OAAjD;IACD,CAFD,MAEO,IAAI/F,UAAU,CAAC8F,IAAD,CAAd,EAAsB;MAC3BF,MAAM,CAACC,GAAD,CAAN,GAAcC,IAAI,CAACE,QAAL,CAAcF,IAAI,CAACG,KAAL,CAAWF,OAAzB,CAAd;IACD;EACF,CAPD;EASA,OAAOH,MAAP;AACD,CAZD"}
1
+ {"version":3,"names":["DefaultEventPriority","bindReanimatedProps","extractReanimatedProps","unbindReanimatedNode","createNode","shallowEq","DEBUG","debug","console","log","appendNode","parent","child","addChild","removeNode","removeChild","insertBefore","before","insertChildBefore","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","pristineProps","props","reanimatedProps","node","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","redraw","getPublicInstance","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","commitUpdate","instance","updatePayload","prevProps","nextProps","_internalHandle","setProps","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","children","forEach","preparePortalMount","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance"],"sources":["HostConfig.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType, Node } from \"../dom/types\";\nimport {\n bindReanimatedProps,\n extractReanimatedProps,\n unbindReanimatedNode,\n} from \"../external/reanimated/renderHelpers\";\n\nimport type { Container } from \"./Container\";\nimport { createNode } from \"./HostComponents\";\nimport { shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.addChild(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n unbindReanimatedNode(child);\n return parent.removeChild(child);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.insertChildBefore(child, before);\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container.root, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n pristineProps,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n const [props, reanimatedProps] = extractReanimatedProps(pristineProps);\n const node = createNode(container, type, props);\n bindReanimatedProps(container, node, reanimatedProps);\n return node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n const [props, reanimatedProps] = extractReanimatedProps(nextProps);\n instance.setProps(props);\n bindReanimatedProps(updatePayload, instance, reanimatedProps);\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root.children().forEach((child) => {\n container.root.removeChild(child);\n });\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n removeNode(container.root, child);\n },\n\n insertInContainerBefore: (container, child, before) => {\n insertBefore(container.root, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n};\n"],"mappings":"AAAA;AAEA,SAASA,oBAAT,QAAqC,4BAArC;AAGA,SACEC,mBADF,EAEEC,sBAFF,EAGEC,oBAHF,QAIO,sCAJP;AAOA,SAASC,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} from "../values/types";
4
- type RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;
5
3
  export declare class SkiaRoot {
6
4
  private root;
7
5
  private container;
8
- constructor(Skia: Skia, registerValues?: RegisterValues, redraw?: () => void, getNativeId?: () => number);
6
+ constructor(Skia: Skia, redraw?: () => void, getNativeId?: () => number);
9
7
  render(element: ReactNode): void;
10
- unmount(): void;
11
8
  get dom(): import("..").RenderNode<import("..").GroupProps>;
12
9
  }
13
- export {};
@@ -1,14 +1,9 @@
1
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
2
 
3
3
  import ReactReconciler from "react-reconciler";
4
- import { DependencyManager } from "./DependencyManager";
5
4
  import { skHostConfig, debug as hostDebug } from "./HostConfig";
6
5
  import { Container } from "./Container";
7
- import { NATIVE_DOM } from "./HostComponents";
8
6
  const skiaReconciler = ReactReconciler(skHostConfig);
9
-
10
- const createDependencyManager = registerValues => NATIVE_DOM ? global.SkiaDomApi.DependencyManager(registerValues) : new DependencyManager(registerValues);
11
-
12
7
  skiaReconciler.injectIntoDevTools({
13
8
  bundleType: 1,
14
9
  version: "0.0.1",
@@ -16,16 +11,14 @@ skiaReconciler.injectIntoDevTools({
16
11
  });
17
12
  export class SkiaRoot {
18
13
  constructor(Skia) {
19
- let registerValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => () => {};
20
- let redraw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
21
- let getNativeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : () => 0;
14
+ let redraw = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
15
+ let getNativeId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => 0;
22
16
 
23
17
  _defineProperty(this, "root", void 0);
24
18
 
25
19
  _defineProperty(this, "container", void 0);
26
20
 
27
- const depMgr = createDependencyManager(registerValues);
28
- this.container = new Container(Skia, depMgr, redraw, getNativeId);
21
+ this.container = new Container(Skia, redraw, getNativeId);
29
22
  this.root = skiaReconciler.createContainer(this.container, 0, null, true, null, "", console.error, null);
30
23
  }
31
24
 
@@ -36,12 +29,6 @@ export class SkiaRoot {
36
29
  });
37
30
  }
38
31
 
39
- unmount() {
40
- skiaReconciler.updateContainer(null, this.root, null, () => {
41
- this.container.depMgr.remove();
42
- });
43
- }
44
-
45
32
  get dom() {
46
33
  return this.container.root;
47
34
  }
@@ -1 +1 @@
1
- {"version":3,"names":["ReactReconciler","DependencyManager","skHostConfig","debug","hostDebug","Container","NATIVE_DOM","skiaReconciler","createDependencyManager","registerValues","global","SkiaDomApi","injectIntoDevTools","bundleType","version","rendererPackageName","SkiaRoot","constructor","Skia","redraw","getNativeId","depMgr","container","root","createContainer","console","error","render","element","updateContainer","unmount","remove","dom"],"sources":["Reconciler.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport type { Skia } from \"../skia/types\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { DependencyManager } from \"./DependencyManager\";\nimport { skHostConfig, debug as hostDebug } from \"./HostConfig\";\nimport { Container } from \"./Container\";\nimport { NATIVE_DOM } from \"./HostComponents\";\n\nconst skiaReconciler = ReactReconciler(skHostConfig);\n\ntype RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;\n\nconst createDependencyManager = (registerValues: RegisterValues) =>\n NATIVE_DOM\n ? global.SkiaDomApi.DependencyManager(registerValues)\n : new DependencyManager(registerValues);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nexport class SkiaRoot {\n private root: OpaqueRoot;\n private container: Container;\n\n constructor(\n Skia: Skia,\n registerValues: RegisterValues = () => () => {},\n redraw: () => void = () => {},\n getNativeId: () => number = () => 0\n ) {\n const depMgr = createDependencyManager(registerValues);\n this.container = new Container(Skia, depMgr, redraw, getNativeId);\n this.root = skiaReconciler.createContainer(\n this.container,\n 0,\n null,\n true,\n null,\n \"\",\n console.error,\n null\n );\n }\n\n render(element: ReactNode) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skiaReconciler.updateContainer(element as any, this.root, null, () => {\n hostDebug(\"updateContainer\");\n });\n }\n\n unmount() {\n skiaReconciler.updateContainer(null, this.root, null, () => {\n this.container.depMgr.remove();\n });\n }\n\n get dom() {\n return this.container.root;\n }\n}\n"],"mappings":";;AAEA,OAAOA,eAAP,MAA4B,kBAA5B;AAKA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,YAAT,EAAuBC,KAAK,IAAIC,SAAhC,QAAiD,cAAjD;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,UAAT,QAA2B,kBAA3B;AAEA,MAAMC,cAAc,GAAGP,eAAe,CAACE,YAAD,CAAtC;;AAIA,MAAMM,uBAAuB,GAAIC,cAAD,IAC9BH,UAAU,GACNI,MAAM,CAACC,UAAP,CAAkBV,iBAAlB,CAAoCQ,cAApC,CADM,GAEN,IAAIR,iBAAJ,CAAsBQ,cAAtB,CAHN;;AAKAF,cAAc,CAACK,kBAAf,CAAkC;EAChCC,UAAU,EAAE,CADoB;EAEhCC,OAAO,EAAE,OAFuB;EAGhCC,mBAAmB,EAAE;AAHW,CAAlC;AAMA,OAAO,MAAMC,QAAN,CAAe;EAIpBC,WAAW,CACTC,IADS,EAKT;IAAA,IAHAT,cAGA,uEAHiC,MAAM,MAAM,CAAE,CAG/C;IAAA,IAFAU,MAEA,uEAFqB,MAAM,CAAE,CAE7B;IAAA,IADAC,WACA,uEAD4B,MAAM,CAClC;;IAAA;;IAAA;;IACA,MAAMC,MAAM,GAAGb,uBAAuB,CAACC,cAAD,CAAtC;IACA,KAAKa,SAAL,GAAiB,IAAIjB,SAAJ,CAAca,IAAd,EAAoBG,MAApB,EAA4BF,MAA5B,EAAoCC,WAApC,CAAjB;IACA,KAAKG,IAAL,GAAYhB,cAAc,CAACiB,eAAf,CACV,KAAKF,SADK,EAEV,CAFU,EAGV,IAHU,EAIV,IAJU,EAKV,IALU,EAMV,EANU,EAOVG,OAAO,CAACC,KAPE,EAQV,IARU,CAAZ;EAUD;;EAEDC,MAAM,CAACC,OAAD,EAAqB;IACzB;IACArB,cAAc,CAACsB,eAAf,CAA+BD,OAA/B,EAA+C,KAAKL,IAApD,EAA0D,IAA1D,EAAgE,MAAM;MACpEnB,SAAS,CAAC,iBAAD,CAAT;IACD,CAFD;EAGD;;EAED0B,OAAO,GAAG;IACRvB,cAAc,CAACsB,eAAf,CAA+B,IAA/B,EAAqC,KAAKN,IAA1C,EAAgD,IAAhD,EAAsD,MAAM;MAC1D,KAAKD,SAAL,CAAeD,MAAf,CAAsBU,MAAtB;IACD,CAFD;EAGD;;EAEM,IAAHC,GAAG,GAAG;IACR,OAAO,KAAKV,SAAL,CAAeC,IAAtB;EACD;;AAvCmB"}
1
+ {"version":3,"names":["ReactReconciler","skHostConfig","debug","hostDebug","Container","skiaReconciler","injectIntoDevTools","bundleType","version","rendererPackageName","SkiaRoot","constructor","Skia","redraw","getNativeId","container","root","createContainer","console","error","render","element","updateContainer","dom"],"sources":["Reconciler.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport type { Skia } from \"../skia/types\";\n\nimport { skHostConfig, debug as hostDebug } from \"./HostConfig\";\nimport { Container } from \"./Container\";\n\nconst skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nexport class SkiaRoot {\n private root: OpaqueRoot;\n private container: Container;\n\n constructor(\n Skia: Skia,\n redraw: () => void = () => {},\n getNativeId: () => number = () => 0\n ) {\n this.container = new Container(Skia, redraw, getNativeId);\n this.root = skiaReconciler.createContainer(\n this.container,\n 0,\n null,\n true,\n null,\n \"\",\n console.error,\n null\n );\n }\n\n render(element: ReactNode) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skiaReconciler.updateContainer(element as any, this.root, null, () => {\n hostDebug(\"updateContainer\");\n });\n }\n\n get dom() {\n return this.container.root;\n }\n}\n"],"mappings":";;AAEA,OAAOA,eAAP,MAA4B,kBAA5B;AAIA,SAASC,YAAT,EAAuBC,KAAK,IAAIC,SAAhC,QAAiD,cAAjD;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,MAAMC,cAAc,GAAGL,eAAe,CAACC,YAAD,CAAtC;AAEAI,cAAc,CAACC,kBAAf,CAAkC;EAChCC,UAAU,EAAE,CADoB;EAEhCC,OAAO,EAAE,OAFuB;EAGhCC,mBAAmB,EAAE;AAHW,CAAlC;AAMA,OAAO,MAAMC,QAAN,CAAe;EAIpBC,WAAW,CACTC,IADS,EAIT;IAAA,IAFAC,MAEA,uEAFqB,MAAM,CAAE,CAE7B;IAAA,IADAC,WACA,uEAD4B,MAAM,CAClC;;IAAA;;IAAA;;IACA,KAAKC,SAAL,GAAiB,IAAIX,SAAJ,CAAcQ,IAAd,EAAoBC,MAApB,EAA4BC,WAA5B,CAAjB;IACA,KAAKE,IAAL,GAAYX,cAAc,CAACY,eAAf,CACV,KAAKF,SADK,EAEV,CAFU,EAGV,IAHU,EAIV,IAJU,EAKV,IALU,EAMV,EANU,EAOVG,OAAO,CAACC,KAPE,EAQV,IARU,CAAZ;EAUD;;EAEDC,MAAM,CAACC,OAAD,EAAqB;IACzB;IACAhB,cAAc,CAACiB,eAAf,CAA+BD,OAA/B,EAA+C,KAAKL,IAApD,EAA0D,IAA1D,EAAgE,MAAM;MACpEb,SAAS,CAAC,iBAAD,CAAT;IACD,CAFD;EAGD;;EAEM,IAAHoB,GAAG,GAAG;IACR,OAAO,KAAKR,SAAL,CAAeC,IAAtB;EACD;;AA/BmB"}
@@ -13,5 +13,4 @@ export * from "./Group";
13
13
  export * from "./Mask";
14
14
  export * from "./Paint";
15
15
  export * from "./Blend";
16
- export * from "./Drawing";
17
16
  export * from "./paragraph";
@@ -13,6 +13,5 @@ export * from "./Group";
13
13
  export * from "./Mask";
14
14
  export * from "./Paint";
15
15
  export * from "./Blend";
16
- export * from "./Drawing";
17
16
  export * from "./paragraph";
18
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Blend\";\nexport * from \"./Drawing\";\n\nexport * from \"./paragraph\";\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,QAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd;AAEA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,SAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AAEA,cAAc,aAAd"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Blend\";\n\nexport * from \"./paragraph\";\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,QAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd;AAEA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,SAAd;AACA,cAAc,SAAd;AAEA,cAAc,aAAd"}
@@ -1,2 +1 @@
1
1
  export * from "./components";
2
- export * from "./DependencyManager";
@@ -1,3 +1,2 @@
1
1
  export * from "./components";
2
- export * from "./DependencyManager";
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./components\";\nexport * from \"./DependencyManager\";\n"],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,qBAAd"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./components\";\n"],"mappings":"AAAA,cAAc,cAAd"}
@@ -1,14 +1,7 @@
1
- import type { SkiaSelector, SkiaValue } from "../../../values";
2
1
  export type SharedValueType<T = number> = {
3
2
  value: T;
4
3
  };
5
- export declare const isValue: (value: unknown) => value is SkiaValue<unknown>;
6
- export declare const isSelector: <T, R>(value: unknown) => value is {
7
- selector: (v: T) => R;
8
- value: SkiaValue<T>;
9
- };
10
- export declare const isAnimated: <T>(props: AnimatedProps<T, never>) => boolean;
11
- export type AnimatedProp<T, P = any> = T | SkiaValue<T> | SkiaSelector<T, P> | SharedValueType<T>;
4
+ export type AnimatedProp<T> = T | SharedValueType<T>;
12
5
  export type AnimatedProps<T, O extends keyof T | never = never> = {
13
6
  [K in keyof T]: K extends "children" ? T[K] : K extends O ? T[K] : AnimatedProp<T[K]>;
14
7
  };
@@ -1,30 +1,2 @@
1
- export const isValue = value => {
2
- if (value === undefined || value === null) {
3
- return false;
4
- }
5
1
 
6
- try {
7
- if (typeof value === "object" && "__typename__" in value && value.__typename__ === "RNSkValue") {
8
- return true;
9
- }
10
- } catch {}
11
-
12
- return false;
13
- };
14
- export const isSelector = value => {
15
- if (value) {
16
- return typeof value === "object" && "selector" in value && "value" in value && value.selector !== undefined && value.value !== undefined;
17
- }
18
-
19
- return false;
20
- };
21
- export const isAnimated = props => {
22
- for (const value of Object.values(props)) {
23
- if (isValue(value) || isSelector(value)) {
24
- return true;
25
- }
26
- }
27
-
28
- return false;
29
- }; // eslint-disable-next-line @typescript-eslint/no-explicit-any
30
2
  //# sourceMappingURL=Animations.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["isValue","value","undefined","__typename__","isSelector","selector","isAnimated","props","Object","values"],"sources":["Animations.ts"],"sourcesContent":["import type { SkiaSelector, SkiaValue } from \"../../../values\";\n\nexport type SharedValueType<T = number> = {\n value: T;\n};\n\nexport const isValue = (value: unknown): value is SkiaValue<unknown> => {\n if (value === undefined || value === null) {\n return false;\n }\n try {\n if (\n typeof value === \"object\" &&\n \"__typename__\" in value &&\n (value as unknown as SkiaValue<unknown>).__typename__ === \"RNSkValue\"\n ) {\n return true;\n }\n } catch {}\n return false;\n};\n\nexport const isSelector = <T, R>(\n value: unknown\n): value is {\n selector: (v: T) => R;\n value: SkiaValue<T>;\n} => {\n if (value) {\n return (\n typeof value === \"object\" &&\n \"selector\" in value &&\n \"value\" in value &&\n (value as Record<string, unknown>).selector !== undefined &&\n (value as Record<string, unknown>).value !== undefined\n );\n }\n return false;\n};\n\nexport const isAnimated = <T>(props: AnimatedProps<T>) => {\n for (const value of Object.values(props)) {\n if (isValue(value) || isSelector(value)) {\n return true;\n }\n }\n return false;\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport type AnimatedProp<T, P = any> =\n | T\n | SkiaValue<T>\n | SkiaSelector<T, P>\n | SharedValueType<T>;\n\nexport type AnimatedProps<T, O extends keyof T | never = never> = {\n [K in keyof T]: K extends \"children\"\n ? T[K]\n : K extends O\n ? T[K]\n : AnimatedProp<T[K]>;\n};\n\nexport type SkiaProps<\n P = object,\n O extends keyof P | never = never\n> = AnimatedProps<P, O>;\n\ntype WithOptional<T extends object, N extends keyof T> = Omit<T, N> & {\n [K in N]?: T[K];\n};\n\nexport type SkiaDefaultProps<\n T extends object,\n N extends keyof T\n> = WithOptional<SkiaProps<T>, N>;\n"],"mappings":"AAMA,OAAO,MAAMA,OAAO,GAAIC,KAAD,IAAiD;EACtE,IAAIA,KAAK,KAAKC,SAAV,IAAuBD,KAAK,KAAK,IAArC,EAA2C;IACzC,OAAO,KAAP;EACD;;EACD,IAAI;IACF,IACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,kBAAkBA,KADlB,IAECA,KAAD,CAAyCE,YAAzC,KAA0D,WAH5D,EAIE;MACA,OAAO,IAAP;IACD;EACF,CARD,CAQE,MAAM,CAAE;;EACV,OAAO,KAAP;AACD,CAdM;AAgBP,OAAO,MAAMC,UAAU,GACrBH,KADwB,IAKrB;EACH,IAAIA,KAAJ,EAAW;IACT,OACE,OAAOA,KAAP,KAAiB,QAAjB,IACA,cAAcA,KADd,IAEA,WAAWA,KAFX,IAGCA,KAAD,CAAmCI,QAAnC,KAAgDH,SAHhD,IAICD,KAAD,CAAmCA,KAAnC,KAA6CC,SAL/C;EAOD;;EACD,OAAO,KAAP;AACD,CAhBM;AAkBP,OAAO,MAAMI,UAAU,GAAOC,KAAJ,IAAgC;EACxD,KAAK,MAAMN,KAAX,IAAoBO,MAAM,CAACC,MAAP,CAAcF,KAAd,CAApB,EAA0C;IACxC,IAAIP,OAAO,CAACC,KAAD,CAAP,IAAkBG,UAAU,CAACH,KAAD,CAAhC,EAAyC;MACvC,OAAO,IAAP;IACD;EACF;;EACD,OAAO,KAAP;AACD,CAPM,C,CASP"}
1
+ {"version":3,"names":[],"sources":["Animations.ts"],"sourcesContent":["export type SharedValueType<T = number> = {\n value: T;\n};\n\nexport type AnimatedProp<T> = T | SharedValueType<T>;\n\nexport type AnimatedProps<T, O extends keyof T | never = never> = {\n [K in keyof T]: K extends \"children\"\n ? T[K]\n : K extends O\n ? T[K]\n : AnimatedProp<T[K]>;\n};\n\nexport type SkiaProps<\n P = object,\n O extends keyof P | never = never\n> = AnimatedProps<P, O>;\n\ntype WithOptional<T extends object, N extends keyof T> = Omit<T, N> & {\n [K in N]?: T[K];\n};\n\nexport type SkiaDefaultProps<\n T extends object,\n N extends keyof T\n> = WithOptional<SkiaProps<T>, N>;\n"],"mappings":""}
@@ -8,7 +8,7 @@ import type { SkColor } from "./Color";
8
8
  import type { SkRRect } from "./RRect";
9
9
  import type { BlendMode } from "./Paint/BlendMode";
10
10
  import type { SkPoint, PointMode } from "./Point";
11
- import type { SkMatrix } from "./Matrix";
11
+ import type { InputMatrix } from "./Matrix";
12
12
  import type { SkImageFilter } from "./ImageFilter";
13
13
  import type { SkVertices } from "./Vertices";
14
14
  import type { SkTextBlob } from "./TextBlob";
@@ -372,7 +372,7 @@ export interface SkCanvas {
372
372
  * Replaces current matrix with m premultiplied with the existing matrix.
373
373
  * @param m
374
374
  */
375
- concat(m: SkMatrix | number[]): void;
375
+ concat(m: InputMatrix): void;
376
376
  /**
377
377
  * Draws the given picture using the current clip, current matrix, and the provided paint.
378
378
  * @param skp
@@ -1 +1 @@
1
- {"version":3,"names":["ClipOp","SaveLayerFlag"],"sources":["Canvas.ts"],"sourcesContent":["import type { SkPaint } from \"./Paint\";\nimport type { SkRect } from \"./Rect\";\nimport type { SkFont } from \"./Font\";\nimport type { SkPath } from \"./Path\";\nimport type { SkImage, MipmapMode, FilterMode, ImageInfo } from \"./Image\";\nimport type { SkSVG } from \"./SVG\";\nimport type { SkColor } from \"./Color\";\nimport type { SkRRect } from \"./RRect\";\nimport type { BlendMode } from \"./Paint/BlendMode\";\nimport type { SkPoint, PointMode } from \"./Point\";\nimport type { SkMatrix } from \"./Matrix\";\nimport type { SkImageFilter } from \"./ImageFilter\";\nimport type { SkVertices } from \"./Vertices\";\nimport type { SkTextBlob } from \"./TextBlob\";\nimport type { SkPicture } from \"./Picture\";\n\nexport enum ClipOp {\n Difference,\n Intersect,\n}\n\nexport enum SaveLayerFlag {\n SaveLayerInitWithPrevious = 1 << 2,\n SaveLayerF16ColorType = 1 << 4,\n}\n\nexport interface SkCanvas {\n /**\n * Draws the given image with its top-left corner at (left, top) using the current clip,\n * the current matrix, and optionally-provided paint.\n * @param img\n * @param left\n * @param top\n * @param paint\n */\n drawImage: (image: SkImage, x: number, y: number, paint?: SkPaint) => void;\n\n /**\n * Draws sub-rectangle src from provided image, scaled and translated to fill dst rectangle.\n * @param img\n * @param src\n * @param dest\n * @param paint\n * @param fastSample - if false, will filter strictly within src.\n */\n drawImageRect(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n paint: SkPaint,\n fastSample?: boolean\n ): void;\n\n /**\n * Draws the given image with its top-left corner at (left, top) using the current clip,\n * the current matrix. It will use the cubic sampling options B and C if necessary.\n * @param img\n * @param left\n * @param top\n * @param B - See CubicResampler in SkSamplingOptions.h for more information\n * @param C - See CubicResampler in SkSamplingOptions.h for more information\n * @param paint\n */\n drawImageCubic(\n img: SkImage,\n left: number,\n top: number,\n B: number,\n C: number,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws the given image with its top-left corner at (left, top) using the current clip,\n * the current matrix. It will use the provided sampling options if necessary.\n * @param img\n * @param left\n * @param top\n * @param fm - The filter mode.\n * @param mm - The mipmap mode. Note: for settings other than None, the image must have mipmaps\n * calculated with makeCopyWithDefaultMipmaps;\n * @param paint\n */\n drawImageOptions(\n img: SkImage,\n left: number,\n top: number,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws the provided image stretched proportionally to fit into dst rectangle.\n * The center rectangle divides the image into nine sections: four sides, four corners, and\n * the center.\n * @param img\n * @param center\n * @param dest\n * @param filter - what technique to use when sampling the image\n * @param paint\n */\n drawImageNine(\n img: SkImage,\n center: SkRect,\n dest: SkRect,\n filter: FilterMode,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws sub-rectangle src from provided image, scaled and translated to fill dst rectangle.\n * It will use the cubic sampling options B and C if necessary.\n * @param img\n * @param src\n * @param dest\n * @param B - See CubicResampler in SkSamplingOptions.h for more information\n * @param C - See CubicResampler in SkSamplingOptions.h for more information\n * @param paint\n */\n drawImageRectCubic(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n B: number,\n C: number,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws sub-rectangle src from provided image, scaled and translated to fill dst rectangle.\n * It will use the provided sampling options if necessary.\n * @param img\n * @param src\n * @param dest\n * @param fm - The filter mode.\n * @param mm - The mipmap mode. Note: for settings other than None, the image must have mipmaps\n * calculated with makeCopyWithDefaultMipmaps;\n * @param paint\n */\n drawImageRectOptions(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ): void;\n\n /** Fills clip with SkPaint paint. SkPaint components, SkShader,\n SkColorFilter, SkImageFilter, and SkBlendMode affect drawing;\n SkMaskFilter and SkPathEffect in paint are ignored.\n\n @param paint graphics state used to fill SkCanvas\n\n example: https://fiddle.skia.org/c/@Canvas_drawPaint\n */\n drawPaint: (paint: SkPaint) => void;\n\n /** Draws line segment from (x0, y0) to (x1, y1) using clip, SkMatrix, and SkPaint paint.\n In paint: SkPaint stroke width describes the line thickness;\n SkPaint::Cap draws the end rounded or square;\n SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.\n\n @param x0 start of line segment on x-axis\n @param y0 start of line segment on y-axis\n @param x1 end of line segment on x-axis\n @param y1 end of line segment on y-axis\n @param paint stroke, blend, color, and so on, used to draw\n\n example: https://fiddle.skia.org/c/@Canvas_drawLine\n */\n drawLine: (\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n paint: SkPaint\n ) => void;\n /** Draws SkRect rect using clip, SkMatrix, and SkPaint paint.\n In paint: SkPaint::Style determines if rectangle is stroked or filled;\n if stroked, SkPaint stroke width describes the line thickness, and\n SkPaint::Join draws the corners rounded or square.\n\n @param rect rectangle to draw\n @param paint stroke or fill, blend, color, and so on, used to draw\n\n example: https://fiddle.skia.org/c/@Canvas_drawRect\n */\n drawRect: (rect: SkRect, paint: SkPaint) => void;\n\n /**\n * Draws a circle at (cx, cy) with the given radius.\n * @param cx\n * @param cy\n * @param radius\n * @param paint\n */\n drawCircle(cx: number, cy: number, radius: number, paint: SkPaint): void;\n\n /**\n * Draws the given vertices (a triangle mesh) using the current clip, current matrix, and the\n * provided paint.\n * If paint contains an Shader and vertices does not contain texCoords, the shader\n * is mapped using the vertices' positions.\n * If vertices colors are defined in vertices, and Paint paint contains Shader,\n * BlendMode mode combines vertices colors with Shader.\n * @param verts\n * @param mode\n * @param paint\n */\n drawVertices(verts: SkVertices, mode: BlendMode, paint: SkPaint): void;\n\n /**\n * Draws a cubic patch defined by 12 control points [top, right, bottom, left] with optional\n * colors and shader-coordinates [4] specifed for each corner [top-left, top-right, bottom-right, bottom-left]\n * @param cubics 12 points : 4 connected cubics specifying the boundary of the patch\n * @param colors optional colors interpolated across the patch\n * @param texs optional shader coordinates interpolated across the patch\n * @param mode Specifies how shader and colors blend (if both are specified)\n * @param paint\n */\n drawPatch(\n cubics: readonly SkPoint[],\n colors?: readonly SkColor[] | null,\n texs?: readonly SkPoint[] | null,\n mode?: BlendMode | null,\n paint?: SkPaint\n ): void;\n\n /**\n * Restores state to a previous stack value.\n * @param saveCount\n */\n restoreToCount(saveCount: number): void;\n\n /**\n * Draws the given points using the current clip, current matrix, and the provided paint.\n *\n * See Canvas.h for more on the mode and its interaction with paint.\n * @param mode\n * @param points\n * @param paint\n */\n drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint): void;\n\n /** Draws arc using clip, SkMatrix, and SkPaint paint.\n\n Arc is part of oval bounded by oval, sweeping from startAngle to startAngle plus\n sweepAngle. startAngle and sweepAngle are in degrees.\n\n startAngle of zero places start point at the right middle edge of oval.\n A positive sweepAngle places arc end point clockwise from start point;\n a negative sweepAngle places arc end point counterclockwise from start point.\n sweepAngle may exceed 360 degrees, a full circle.\n If useCenter is true, draw a wedge that includes lines from oval\n center to arc end points. If useCenter is false, draw arc between end points.\n\n If SkRect oval is empty or sweepAngle is zero, nothing is drawn.\n\n @param oval SkRect bounds of oval containing arc to draw\n @param startAngle angle in degrees where arc begins\n @param sweepAngle sweep angle in degrees; positive is clockwise\n @param useCenter if true, include the center of the oval\n @param paint SkPaint stroke or fill, blend, color, and so on, used to draw\n */\n drawArc: (\n oval: SkRect,\n startAngle: number,\n sweepAngle: number,\n useCenter: boolean,\n paint: SkPaint\n ) => void;\n\n /**\n * Draws the given rectangle with rounded corners using the current clip, current matrix,\n * and the provided paint.\n * @param rrect\n * @param paint\n */\n drawRRect(rrect: SkRRect, paint: SkPaint): void;\n\n /**\n * Draws RRect outer and inner using clip, Matrix, and Paint paint.\n * outer must contain inner or the drawing is undefined.\n * @param outer\n * @param inner\n * @param paint\n */\n drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;\n\n /**\n * Draws an oval bounded by the given rectangle using the current clip, current matrix,\n * and the provided paint.\n * @param oval\n * @param paint\n */\n drawOval(oval: SkRect, paint: SkPaint): void;\n\n /** Draws SkPath path using clip, SkMatrix, and SkPaint paint.\n SkPath contains an array of path contour, each of which may be open or closed.\n\n In paint: SkPaint::Style determines if SkRRect is stroked or filled:\n if filled, SkPath::FillType determines whether path contour describes inside or\n outside of fill; if stroked, SkPaint stroke width describes the line thickness,\n SkPaint::Cap describes line ends, and SkPaint::Join describes how\n corners are drawn.\n\n @param path SkPath to draw\n @param paint stroke, blend, color, and so on, used to draw\n\n example: https://fiddle.skia.org/c/@Canvas_drawPath\n */\n drawPath: (path: SkPath, paint: SkPaint) => void;\n\n /**\n * Draw the given text at the location (x, y) using the provided paint and font. The text will\n * be drawn as is; no shaping, left-to-right, etc.\n * @param str\n * @param x\n * @param y\n * @param paint\n * @param font\n */\n drawText(\n str: string,\n x: number,\n y: number,\n paint: SkPaint,\n font: SkFont\n ): void;\n\n /**\n * Draws the given TextBlob at (x, y) using the current clip, current matrix, and the\n * provided paint. Reminder that the fonts used to draw TextBlob are part of the blob.\n * @param blob\n * @param x\n * @param y\n * @param paint\n */\n drawTextBlob(blob: SkTextBlob, x: number, y: number, paint: SkPaint): void;\n\n /**\n * Draws a run of glyphs, at corresponding positions, in a given font.\n * @param glyphs the array of glyph IDs (Uint16TypedArray)\n * @param positions the array of x,y floats to position each glyph\n * @param x x-coordinate of the origin of the entire run\n * @param y y-coordinate of the origin of the entire run\n * @param font the font that contains the glyphs\n * @param paint\n */\n drawGlyphs(\n glyphs: number[],\n positions: SkPoint[],\n x: number,\n y: number,\n font: SkFont,\n paint: SkPaint\n ): void;\n\n /**\n * Renders the SVG Dom object to the canvas. If width/height are omitted,\n * the SVG will be rendered to fit the canvas.\n */\n drawSvg: (svgDom: SkSVG, width?: number, height?: number) => void;\n /** Saves SkMatrix and clip.\n Calling restore() discards changes to SkMatrix and clip,\n restoring the SkMatrix and clip to their state when save() was called.\n\n SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix(),\n and resetMatrix(). Clip may be changed by clipRect(), clipRRect(), clipPath(), clipRegion().\n\n Saved SkCanvas state is put on a stack; multiple calls to save() should be balance\n by an equal number of calls to restore().\n\n Call restoreToCount() with result to restore this and subsequent saves.\n\n @return depth of saved stack\n\n example: https://fiddle.skia.org/c/@Canvas_save\n */\n save: () => number;\n\n /**\n * Saves Matrix and clip, and allocates a SkBitmap for subsequent drawing.\n * Calling restore() discards changes to Matrix and clip, and draws the SkBitmap.\n * It returns the height of the stack.\n * See Canvas.h for more.\n * @param paint\n * @param bounds\n * @param backdrop\n * @param flags\n */\n saveLayer(\n paint?: SkPaint,\n bounds?: SkRect | null,\n backdrop?: SkImageFilter | null,\n flags?: SaveLayerFlag\n ): number;\n\n /** Removes changes to SkMatrix and clip since SkCanvas state was\n last saved. The state is removed from the stack.\n\n Does nothing if the stack is empty.\n\n example: https://fiddle.skia.org/c/@AutoCanvasRestore_restore\n\n example: https://fiddle.skia.org/c/@Canvas_restore\n */\n restore: () => void;\n\n /**\n * Rotates the current matrix by the number of degrees.\n * @param rot - angle of rotation in degrees.\n * @param rx\n * @param ry\n */\n rotate(rotationInDegrees: number, rx: number, ry: number): void;\n\n /**\n * Scales the current matrix by sx on the x-axis and sy on the y-axis.\n * @param sx\n * @param sy\n */\n scale(sx: number, sy: number): void;\n\n /**\n * Skews Matrix by sx on the x-axis and sy on the y-axis. A positive value of sx\n * skews the drawing right as y-axis values increase; a positive value of sy skews\n * the drawing down as x-axis values increase.\n * @param sx\n * @param sy\n */\n skew(sx: number, sy: number): void;\n\n /**\n * Translates Matrix by dx along the x-axis and dy along the y-axis.\n * @param dx\n * @param dy\n */\n translate(dx: number, dy: number): void;\n\n /**\n * Fills clip with the given color.\n * @param color\n * @param blendMode - defaults to SrcOver.\n */\n drawColor(color: SkColor, blendMode?: BlendMode): void;\n\n /**\n * Fills the current clip with the given color using Src BlendMode.\n * This has the effect of replacing all pixels contained by clip with color.\n * @param color\n */\n clear(color: SkColor): void;\n\n /**\n * Replaces clip with the intersection or difference of the current clip and path,\n * with an aliased or anti-aliased clip edge.\n * @param path\n * @param op\n * @param doAntiAlias\n */\n clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean): void;\n\n /**\n * Replaces clip with the intersection or difference of the current clip and rect,\n * with an aliased or anti-aliased clip edge.\n * @param rect\n * @param op\n * @param doAntiAlias\n */\n clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean): void;\n\n /**\n * Replaces clip with the intersection or difference of the current clip and rrect,\n * with an aliased or anti-aliased clip edge.\n * @param rrect\n * @param op\n * @param doAntiAlias\n */\n clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;\n\n /**\n * Replaces current matrix with m premultiplied with the existing matrix.\n * @param m\n */\n concat(m: SkMatrix | number[]): void;\n\n /**\n * Draws the given picture using the current clip, current matrix, and the provided paint.\n * @param skp\n */\n drawPicture(skp: SkPicture): void;\n\n /** Read Image pixels\n *\n * @param srcX - x-axis upper left corner of the rectangle to read from\n * @param srcY - y-axis upper left corner of the rectangle to read from\n * @param imageInfo - describes the pixel format and dimensions of the data to read into\n * @return Float32Array or Uint8Array with data or null if the read failed.\n */\n readPixels(\n srcX: number,\n srcY: number,\n imageInfo: ImageInfo\n ): Float32Array | Uint8Array | null;\n}\n"],"mappings":"AAgBA,WAAYA,MAAZ;;WAAYA,M;EAAAA,M,CAAAA,M;EAAAA,M,CAAAA,M;GAAAA,M,KAAAA,M;;AAKZ,WAAYC,aAAZ;;WAAYA,a;EAAAA,a,CAAAA,a;EAAAA,a,CAAAA,a;GAAAA,a,KAAAA,a"}
1
+ {"version":3,"names":["ClipOp","SaveLayerFlag"],"sources":["Canvas.ts"],"sourcesContent":["import type { SkPaint } from \"./Paint\";\nimport type { SkRect } from \"./Rect\";\nimport type { SkFont } from \"./Font\";\nimport type { SkPath } from \"./Path\";\nimport type { SkImage, MipmapMode, FilterMode, ImageInfo } from \"./Image\";\nimport type { SkSVG } from \"./SVG\";\nimport type { SkColor } from \"./Color\";\nimport type { SkRRect } from \"./RRect\";\nimport type { BlendMode } from \"./Paint/BlendMode\";\nimport type { SkPoint, PointMode } from \"./Point\";\nimport type { InputMatrix } from \"./Matrix\";\nimport type { SkImageFilter } from \"./ImageFilter\";\nimport type { SkVertices } from \"./Vertices\";\nimport type { SkTextBlob } from \"./TextBlob\";\nimport type { SkPicture } from \"./Picture\";\n\nexport enum ClipOp {\n Difference,\n Intersect,\n}\n\nexport enum SaveLayerFlag {\n SaveLayerInitWithPrevious = 1 << 2,\n SaveLayerF16ColorType = 1 << 4,\n}\n\nexport interface SkCanvas {\n /**\n * Draws the given image with its top-left corner at (left, top) using the current clip,\n * the current matrix, and optionally-provided paint.\n * @param img\n * @param left\n * @param top\n * @param paint\n */\n drawImage: (image: SkImage, x: number, y: number, paint?: SkPaint) => void;\n\n /**\n * Draws sub-rectangle src from provided image, scaled and translated to fill dst rectangle.\n * @param img\n * @param src\n * @param dest\n * @param paint\n * @param fastSample - if false, will filter strictly within src.\n */\n drawImageRect(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n paint: SkPaint,\n fastSample?: boolean\n ): void;\n\n /**\n * Draws the given image with its top-left corner at (left, top) using the current clip,\n * the current matrix. It will use the cubic sampling options B and C if necessary.\n * @param img\n * @param left\n * @param top\n * @param B - See CubicResampler in SkSamplingOptions.h for more information\n * @param C - See CubicResampler in SkSamplingOptions.h for more information\n * @param paint\n */\n drawImageCubic(\n img: SkImage,\n left: number,\n top: number,\n B: number,\n C: number,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws the given image with its top-left corner at (left, top) using the current clip,\n * the current matrix. It will use the provided sampling options if necessary.\n * @param img\n * @param left\n * @param top\n * @param fm - The filter mode.\n * @param mm - The mipmap mode. Note: for settings other than None, the image must have mipmaps\n * calculated with makeCopyWithDefaultMipmaps;\n * @param paint\n */\n drawImageOptions(\n img: SkImage,\n left: number,\n top: number,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws the provided image stretched proportionally to fit into dst rectangle.\n * The center rectangle divides the image into nine sections: four sides, four corners, and\n * the center.\n * @param img\n * @param center\n * @param dest\n * @param filter - what technique to use when sampling the image\n * @param paint\n */\n drawImageNine(\n img: SkImage,\n center: SkRect,\n dest: SkRect,\n filter: FilterMode,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws sub-rectangle src from provided image, scaled and translated to fill dst rectangle.\n * It will use the cubic sampling options B and C if necessary.\n * @param img\n * @param src\n * @param dest\n * @param B - See CubicResampler in SkSamplingOptions.h for more information\n * @param C - See CubicResampler in SkSamplingOptions.h for more information\n * @param paint\n */\n drawImageRectCubic(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n B: number,\n C: number,\n paint?: SkPaint | null\n ): void;\n\n /**\n * Draws sub-rectangle src from provided image, scaled and translated to fill dst rectangle.\n * It will use the provided sampling options if necessary.\n * @param img\n * @param src\n * @param dest\n * @param fm - The filter mode.\n * @param mm - The mipmap mode. Note: for settings other than None, the image must have mipmaps\n * calculated with makeCopyWithDefaultMipmaps;\n * @param paint\n */\n drawImageRectOptions(\n img: SkImage,\n src: SkRect,\n dest: SkRect,\n fm: FilterMode,\n mm: MipmapMode,\n paint?: SkPaint | null\n ): void;\n\n /** Fills clip with SkPaint paint. SkPaint components, SkShader,\n SkColorFilter, SkImageFilter, and SkBlendMode affect drawing;\n SkMaskFilter and SkPathEffect in paint are ignored.\n\n @param paint graphics state used to fill SkCanvas\n\n example: https://fiddle.skia.org/c/@Canvas_drawPaint\n */\n drawPaint: (paint: SkPaint) => void;\n\n /** Draws line segment from (x0, y0) to (x1, y1) using clip, SkMatrix, and SkPaint paint.\n In paint: SkPaint stroke width describes the line thickness;\n SkPaint::Cap draws the end rounded or square;\n SkPaint::Style is ignored, as if were set to SkPaint::kStroke_Style.\n\n @param x0 start of line segment on x-axis\n @param y0 start of line segment on y-axis\n @param x1 end of line segment on x-axis\n @param y1 end of line segment on y-axis\n @param paint stroke, blend, color, and so on, used to draw\n\n example: https://fiddle.skia.org/c/@Canvas_drawLine\n */\n drawLine: (\n x0: number,\n y0: number,\n x1: number,\n y1: number,\n paint: SkPaint\n ) => void;\n /** Draws SkRect rect using clip, SkMatrix, and SkPaint paint.\n In paint: SkPaint::Style determines if rectangle is stroked or filled;\n if stroked, SkPaint stroke width describes the line thickness, and\n SkPaint::Join draws the corners rounded or square.\n\n @param rect rectangle to draw\n @param paint stroke or fill, blend, color, and so on, used to draw\n\n example: https://fiddle.skia.org/c/@Canvas_drawRect\n */\n drawRect: (rect: SkRect, paint: SkPaint) => void;\n\n /**\n * Draws a circle at (cx, cy) with the given radius.\n * @param cx\n * @param cy\n * @param radius\n * @param paint\n */\n drawCircle(cx: number, cy: number, radius: number, paint: SkPaint): void;\n\n /**\n * Draws the given vertices (a triangle mesh) using the current clip, current matrix, and the\n * provided paint.\n * If paint contains an Shader and vertices does not contain texCoords, the shader\n * is mapped using the vertices' positions.\n * If vertices colors are defined in vertices, and Paint paint contains Shader,\n * BlendMode mode combines vertices colors with Shader.\n * @param verts\n * @param mode\n * @param paint\n */\n drawVertices(verts: SkVertices, mode: BlendMode, paint: SkPaint): void;\n\n /**\n * Draws a cubic patch defined by 12 control points [top, right, bottom, left] with optional\n * colors and shader-coordinates [4] specifed for each corner [top-left, top-right, bottom-right, bottom-left]\n * @param cubics 12 points : 4 connected cubics specifying the boundary of the patch\n * @param colors optional colors interpolated across the patch\n * @param texs optional shader coordinates interpolated across the patch\n * @param mode Specifies how shader and colors blend (if both are specified)\n * @param paint\n */\n drawPatch(\n cubics: readonly SkPoint[],\n colors?: readonly SkColor[] | null,\n texs?: readonly SkPoint[] | null,\n mode?: BlendMode | null,\n paint?: SkPaint\n ): void;\n\n /**\n * Restores state to a previous stack value.\n * @param saveCount\n */\n restoreToCount(saveCount: number): void;\n\n /**\n * Draws the given points using the current clip, current matrix, and the provided paint.\n *\n * See Canvas.h for more on the mode and its interaction with paint.\n * @param mode\n * @param points\n * @param paint\n */\n drawPoints(mode: PointMode, points: SkPoint[], paint: SkPaint): void;\n\n /** Draws arc using clip, SkMatrix, and SkPaint paint.\n\n Arc is part of oval bounded by oval, sweeping from startAngle to startAngle plus\n sweepAngle. startAngle and sweepAngle are in degrees.\n\n startAngle of zero places start point at the right middle edge of oval.\n A positive sweepAngle places arc end point clockwise from start point;\n a negative sweepAngle places arc end point counterclockwise from start point.\n sweepAngle may exceed 360 degrees, a full circle.\n If useCenter is true, draw a wedge that includes lines from oval\n center to arc end points. If useCenter is false, draw arc between end points.\n\n If SkRect oval is empty or sweepAngle is zero, nothing is drawn.\n\n @param oval SkRect bounds of oval containing arc to draw\n @param startAngle angle in degrees where arc begins\n @param sweepAngle sweep angle in degrees; positive is clockwise\n @param useCenter if true, include the center of the oval\n @param paint SkPaint stroke or fill, blend, color, and so on, used to draw\n */\n drawArc: (\n oval: SkRect,\n startAngle: number,\n sweepAngle: number,\n useCenter: boolean,\n paint: SkPaint\n ) => void;\n\n /**\n * Draws the given rectangle with rounded corners using the current clip, current matrix,\n * and the provided paint.\n * @param rrect\n * @param paint\n */\n drawRRect(rrect: SkRRect, paint: SkPaint): void;\n\n /**\n * Draws RRect outer and inner using clip, Matrix, and Paint paint.\n * outer must contain inner or the drawing is undefined.\n * @param outer\n * @param inner\n * @param paint\n */\n drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;\n\n /**\n * Draws an oval bounded by the given rectangle using the current clip, current matrix,\n * and the provided paint.\n * @param oval\n * @param paint\n */\n drawOval(oval: SkRect, paint: SkPaint): void;\n\n /** Draws SkPath path using clip, SkMatrix, and SkPaint paint.\n SkPath contains an array of path contour, each of which may be open or closed.\n\n In paint: SkPaint::Style determines if SkRRect is stroked or filled:\n if filled, SkPath::FillType determines whether path contour describes inside or\n outside of fill; if stroked, SkPaint stroke width describes the line thickness,\n SkPaint::Cap describes line ends, and SkPaint::Join describes how\n corners are drawn.\n\n @param path SkPath to draw\n @param paint stroke, blend, color, and so on, used to draw\n\n example: https://fiddle.skia.org/c/@Canvas_drawPath\n */\n drawPath: (path: SkPath, paint: SkPaint) => void;\n\n /**\n * Draw the given text at the location (x, y) using the provided paint and font. The text will\n * be drawn as is; no shaping, left-to-right, etc.\n * @param str\n * @param x\n * @param y\n * @param paint\n * @param font\n */\n drawText(\n str: string,\n x: number,\n y: number,\n paint: SkPaint,\n font: SkFont\n ): void;\n\n /**\n * Draws the given TextBlob at (x, y) using the current clip, current matrix, and the\n * provided paint. Reminder that the fonts used to draw TextBlob are part of the blob.\n * @param blob\n * @param x\n * @param y\n * @param paint\n */\n drawTextBlob(blob: SkTextBlob, x: number, y: number, paint: SkPaint): void;\n\n /**\n * Draws a run of glyphs, at corresponding positions, in a given font.\n * @param glyphs the array of glyph IDs (Uint16TypedArray)\n * @param positions the array of x,y floats to position each glyph\n * @param x x-coordinate of the origin of the entire run\n * @param y y-coordinate of the origin of the entire run\n * @param font the font that contains the glyphs\n * @param paint\n */\n drawGlyphs(\n glyphs: number[],\n positions: SkPoint[],\n x: number,\n y: number,\n font: SkFont,\n paint: SkPaint\n ): void;\n\n /**\n * Renders the SVG Dom object to the canvas. If width/height are omitted,\n * the SVG will be rendered to fit the canvas.\n */\n drawSvg: (svgDom: SkSVG, width?: number, height?: number) => void;\n /** Saves SkMatrix and clip.\n Calling restore() discards changes to SkMatrix and clip,\n restoring the SkMatrix and clip to their state when save() was called.\n\n SkMatrix may be changed by translate(), scale(), rotate(), skew(), concat(), setMatrix(),\n and resetMatrix(). Clip may be changed by clipRect(), clipRRect(), clipPath(), clipRegion().\n\n Saved SkCanvas state is put on a stack; multiple calls to save() should be balance\n by an equal number of calls to restore().\n\n Call restoreToCount() with result to restore this and subsequent saves.\n\n @return depth of saved stack\n\n example: https://fiddle.skia.org/c/@Canvas_save\n */\n save: () => number;\n\n /**\n * Saves Matrix and clip, and allocates a SkBitmap for subsequent drawing.\n * Calling restore() discards changes to Matrix and clip, and draws the SkBitmap.\n * It returns the height of the stack.\n * See Canvas.h for more.\n * @param paint\n * @param bounds\n * @param backdrop\n * @param flags\n */\n saveLayer(\n paint?: SkPaint,\n bounds?: SkRect | null,\n backdrop?: SkImageFilter | null,\n flags?: SaveLayerFlag\n ): number;\n\n /** Removes changes to SkMatrix and clip since SkCanvas state was\n last saved. The state is removed from the stack.\n\n Does nothing if the stack is empty.\n\n example: https://fiddle.skia.org/c/@AutoCanvasRestore_restore\n\n example: https://fiddle.skia.org/c/@Canvas_restore\n */\n restore: () => void;\n\n /**\n * Rotates the current matrix by the number of degrees.\n * @param rot - angle of rotation in degrees.\n * @param rx\n * @param ry\n */\n rotate(rotationInDegrees: number, rx: number, ry: number): void;\n\n /**\n * Scales the current matrix by sx on the x-axis and sy on the y-axis.\n * @param sx\n * @param sy\n */\n scale(sx: number, sy: number): void;\n\n /**\n * Skews Matrix by sx on the x-axis and sy on the y-axis. A positive value of sx\n * skews the drawing right as y-axis values increase; a positive value of sy skews\n * the drawing down as x-axis values increase.\n * @param sx\n * @param sy\n */\n skew(sx: number, sy: number): void;\n\n /**\n * Translates Matrix by dx along the x-axis and dy along the y-axis.\n * @param dx\n * @param dy\n */\n translate(dx: number, dy: number): void;\n\n /**\n * Fills clip with the given color.\n * @param color\n * @param blendMode - defaults to SrcOver.\n */\n drawColor(color: SkColor, blendMode?: BlendMode): void;\n\n /**\n * Fills the current clip with the given color using Src BlendMode.\n * This has the effect of replacing all pixels contained by clip with color.\n * @param color\n */\n clear(color: SkColor): void;\n\n /**\n * Replaces clip with the intersection or difference of the current clip and path,\n * with an aliased or anti-aliased clip edge.\n * @param path\n * @param op\n * @param doAntiAlias\n */\n clipPath(path: SkPath, op: ClipOp, doAntiAlias: boolean): void;\n\n /**\n * Replaces clip with the intersection or difference of the current clip and rect,\n * with an aliased or anti-aliased clip edge.\n * @param rect\n * @param op\n * @param doAntiAlias\n */\n clipRect(rect: SkRect, op: ClipOp, doAntiAlias: boolean): void;\n\n /**\n * Replaces clip with the intersection or difference of the current clip and rrect,\n * with an aliased or anti-aliased clip edge.\n * @param rrect\n * @param op\n * @param doAntiAlias\n */\n clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;\n\n /**\n * Replaces current matrix with m premultiplied with the existing matrix.\n * @param m\n */\n concat(m: InputMatrix): void;\n\n /**\n * Draws the given picture using the current clip, current matrix, and the provided paint.\n * @param skp\n */\n drawPicture(skp: SkPicture): void;\n\n /** Read Image pixels\n *\n * @param srcX - x-axis upper left corner of the rectangle to read from\n * @param srcY - y-axis upper left corner of the rectangle to read from\n * @param imageInfo - describes the pixel format and dimensions of the data to read into\n * @return Float32Array or Uint8Array with data or null if the read failed.\n */\n readPixels(\n srcX: number,\n srcY: number,\n imageInfo: ImageInfo\n ): Float32Array | Uint8Array | null;\n}\n"],"mappings":"AAgBA,WAAYA,MAAZ;;WAAYA,M;EAAAA,M,CAAAA,M;EAAAA,M,CAAAA,M;GAAAA,M,KAAAA,M;;AAKZ,WAAYC,aAAZ;;WAAYA,a;EAAAA,a,CAAAA,a;EAAAA,a,CAAAA,a;GAAAA,a,KAAAA,a"}