@shopify/react-native-skia 0.1.229 → 0.1.230

Sign up to get free protection for your applications and to get access to all the features.
Files changed (591) 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/Drawings.d.ts +0 -4
  28. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  29. package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
  30. package/lib/commonjs/dom/types/NodeType.js +0 -1
  31. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  32. package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
  33. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  34. package/lib/commonjs/index.d.ts +0 -1
  35. package/lib/commonjs/index.js +0 -14
  36. package/lib/commonjs/index.js.map +1 -1
  37. package/lib/commonjs/mock/index.js +0 -4
  38. package/lib/commonjs/mock/index.js.map +1 -1
  39. package/lib/commonjs/renderer/Canvas.js +2 -21
  40. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  41. package/lib/commonjs/renderer/Container.d.ts +1 -3
  42. package/lib/commonjs/renderer/Container.js +4 -6
  43. package/lib/commonjs/renderer/Container.js.map +1 -1
  44. package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
  45. package/lib/commonjs/renderer/HostComponents.js +0 -3
  46. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  47. package/lib/commonjs/renderer/HostConfig.js +2 -23
  48. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  49. package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
  50. package/lib/commonjs/renderer/Reconciler.js +3 -18
  51. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  52. package/lib/commonjs/renderer/components/index.d.ts +0 -1
  53. package/lib/commonjs/renderer/components/index.js +0 -13
  54. package/lib/commonjs/renderer/components/index.js.map +1 -1
  55. package/lib/commonjs/renderer/index.d.ts +0 -1
  56. package/lib/commonjs/renderer/index.js +0 -13
  57. package/lib/commonjs/renderer/index.js.map +1 -1
  58. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
  59. package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
  60. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  61. package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
  62. package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
  63. package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
  64. package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
  65. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  66. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  67. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  68. package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
  69. package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
  70. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  71. package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
  72. package/lib/commonjs/views/SkiaDomView.js +3 -14
  73. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  74. package/lib/commonjs/views/SkiaDomView.web.js +4 -14
  75. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  76. package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
  77. package/lib/commonjs/views/SkiaPictureView.js +3 -14
  78. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  79. package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
  80. package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
  81. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
  82. package/lib/commonjs/views/index.d.ts +0 -2
  83. package/lib/commonjs/views/index.js +0 -26
  84. package/lib/commonjs/views/index.js.map +1 -1
  85. package/lib/commonjs/views/types.d.ts +2 -15
  86. package/lib/commonjs/views/types.js.map +1 -1
  87. package/lib/module/animation/index.d.ts +0 -3
  88. package/lib/module/animation/index.js +0 -3
  89. package/lib/module/animation/index.js.map +1 -1
  90. package/lib/module/dom/nodes/JsiSkDOM.d.ts +1 -2
  91. package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
  92. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  93. package/lib/module/dom/nodes/Node.d.ts +0 -3
  94. package/lib/module/dom/nodes/Node.js +0 -5
  95. package/lib/module/dom/nodes/Node.js.map +1 -1
  96. package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
  97. package/lib/module/dom/nodes/drawings/index.js +0 -1
  98. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  99. package/lib/module/dom/types/Drawings.d.ts +0 -4
  100. package/lib/module/dom/types/Drawings.js.map +1 -1
  101. package/lib/module/dom/types/NodeType.d.ts +0 -1
  102. package/lib/module/dom/types/NodeType.js +0 -1
  103. package/lib/module/dom/types/NodeType.js.map +1 -1
  104. package/lib/module/dom/types/SkDOM.d.ts +1 -2
  105. package/lib/module/dom/types/SkDOM.js.map +1 -1
  106. package/lib/module/index.d.ts +0 -1
  107. package/lib/module/index.js +0 -1
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/mock/index.js +1 -4
  110. package/lib/module/mock/index.js.map +1 -1
  111. package/lib/module/renderer/Canvas.js +2 -20
  112. package/lib/module/renderer/Canvas.js.map +1 -1
  113. package/lib/module/renderer/Container.d.ts +1 -3
  114. package/lib/module/renderer/Container.js +4 -6
  115. package/lib/module/renderer/Container.js.map +1 -1
  116. package/lib/module/renderer/HostComponents.d.ts +1 -6
  117. package/lib/module/renderer/HostComponents.js +0 -3
  118. package/lib/module/renderer/HostComponents.js.map +1 -1
  119. package/lib/module/renderer/HostConfig.js +3 -23
  120. package/lib/module/renderer/HostConfig.js.map +1 -1
  121. package/lib/module/renderer/Reconciler.d.ts +1 -5
  122. package/lib/module/renderer/Reconciler.js +3 -16
  123. package/lib/module/renderer/Reconciler.js.map +1 -1
  124. package/lib/module/renderer/components/index.d.ts +0 -1
  125. package/lib/module/renderer/components/index.js +0 -1
  126. package/lib/module/renderer/components/index.js.map +1 -1
  127. package/lib/module/renderer/index.d.ts +0 -1
  128. package/lib/module/renderer/index.js +0 -1
  129. package/lib/module/renderer/index.js.map +1 -1
  130. package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
  131. package/lib/module/renderer/processors/Animations/Animations.js +0 -28
  132. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  133. package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
  134. package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
  135. package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
  136. package/lib/module/skia/web/JsiSkParagraph.js +12 -0
  137. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  138. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  139. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  140. package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
  141. package/lib/module/views/SkiaBaseWebView.js +0 -17
  142. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  143. package/lib/module/views/SkiaDomView.d.ts +0 -7
  144. package/lib/module/views/SkiaDomView.js +2 -13
  145. package/lib/module/views/SkiaDomView.js.map +1 -1
  146. package/lib/module/views/SkiaDomView.web.js +4 -13
  147. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  148. package/lib/module/views/SkiaPictureView.d.ts +0 -7
  149. package/lib/module/views/SkiaPictureView.js +2 -13
  150. package/lib/module/views/SkiaPictureView.js.map +1 -1
  151. package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
  152. package/lib/module/views/SkiaViewNativeId.js +4 -0
  153. package/lib/module/views/SkiaViewNativeId.js.map +1 -0
  154. package/lib/module/views/index.d.ts +0 -2
  155. package/lib/module/views/index.js +0 -2
  156. package/lib/module/views/index.js.map +1 -1
  157. package/lib/module/views/types.d.ts +2 -15
  158. package/lib/module/views/types.js.map +1 -1
  159. package/lib/typescript/src/animation/index.d.ts +0 -3
  160. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +1 -2
  161. package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
  162. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
  163. package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
  164. package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
  165. package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
  166. package/lib/typescript/src/index.d.ts +0 -1
  167. package/lib/typescript/src/renderer/Container.d.ts +1 -3
  168. package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
  169. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
  170. package/lib/typescript/src/renderer/components/index.d.ts +0 -1
  171. package/lib/typescript/src/renderer/index.d.ts +0 -1
  172. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
  173. package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
  174. package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
  175. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
  176. package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
  177. package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
  178. package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
  179. package/lib/typescript/src/views/index.d.ts +0 -2
  180. package/lib/typescript/src/views/types.d.ts +2 -15
  181. package/package.json +1 -1
  182. package/src/animation/index.ts +0 -3
  183. package/src/dom/nodes/JsiSkDOM.ts +0 -12
  184. package/src/dom/nodes/Node.ts +0 -5
  185. package/src/dom/nodes/drawings/index.ts +0 -1
  186. package/src/dom/types/Drawings.ts +0 -5
  187. package/src/dom/types/NodeType.ts +0 -1
  188. package/src/dom/types/SkDOM.ts +0 -4
  189. package/src/index.ts +0 -1
  190. package/src/mock/index.ts +0 -3
  191. package/src/renderer/Canvas.tsx +3 -21
  192. package/src/renderer/Container.tsx +1 -4
  193. package/src/renderer/HostComponents.ts +0 -13
  194. package/src/renderer/HostConfig.ts +3 -24
  195. package/src/renderer/Reconciler.tsx +1 -19
  196. package/src/renderer/components/index.ts +0 -1
  197. package/src/renderer/index.ts +0 -1
  198. package/src/renderer/processors/Animations/Animations.ts +1 -51
  199. package/src/skia/types/Paragraph/Paragraph.ts +25 -0
  200. package/src/skia/web/JsiSkParagraph.ts +11 -0
  201. package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
  202. package/src/views/SkiaBaseWebView.tsx +0 -19
  203. package/src/views/SkiaDomView.tsx +1 -13
  204. package/src/views/SkiaDomView.web.tsx +1 -6
  205. package/src/views/SkiaPictureView.tsx +1 -13
  206. package/src/views/SkiaViewNativeId.ts +1 -0
  207. package/src/views/index.ts +0 -2
  208. package/src/views/types.ts +2 -26
  209. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
  210. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
  211. package/cpp/rnskia/RNSkAnimation.h +0 -65
  212. package/cpp/rnskia/RNSkValueApi.h +0 -72
  213. package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
  214. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
  215. package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
  216. package/cpp/rnskia/values/RNSkClockValue.h +0 -140
  217. package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
  218. package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
  219. package/cpp/rnskia/values/RNSkValue.h +0 -116
  220. package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
  221. package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
  222. package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
  223. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
  224. package/lib/commonjs/animation/decay/decay.d.ts +0 -2
  225. package/lib/commonjs/animation/decay/decay.js +0 -42
  226. package/lib/commonjs/animation/decay/decay.js.map +0 -1
  227. package/lib/commonjs/animation/decay/index.d.ts +0 -1
  228. package/lib/commonjs/animation/decay/index.js +0 -14
  229. package/lib/commonjs/animation/decay/index.js.map +0 -1
  230. package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
  231. package/lib/commonjs/animation/decay/runDecay.js +0 -48
  232. package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
  233. package/lib/commonjs/animation/decay/types.d.ts +0 -21
  234. package/lib/commonjs/animation/decay/types.js +0 -6
  235. package/lib/commonjs/animation/decay/types.js.map +0 -1
  236. package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
  237. package/lib/commonjs/animation/spring/Spring.js +0 -77
  238. package/lib/commonjs/animation/spring/Spring.js.map +0 -1
  239. package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
  240. package/lib/commonjs/animation/spring/functions/index.js +0 -14
  241. package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
  242. package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
  243. package/lib/commonjs/animation/spring/functions/spring.js +0 -94
  244. package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
  245. package/lib/commonjs/animation/spring/index.d.ts +0 -3
  246. package/lib/commonjs/animation/spring/index.js +0 -30
  247. package/lib/commonjs/animation/spring/index.js.map +0 -1
  248. package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
  249. package/lib/commonjs/animation/spring/runSpring.js +0 -35
  250. package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
  251. package/lib/commonjs/animation/spring/types.d.ts +0 -6
  252. package/lib/commonjs/animation/spring/types.js +0 -2
  253. package/lib/commonjs/animation/spring/types.js.map +0 -1
  254. package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
  255. package/lib/commonjs/animation/spring/useSpring.js +0 -27
  256. package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
  257. package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
  258. package/lib/commonjs/animation/timing/Easing.js +0 -108
  259. package/lib/commonjs/animation/timing/Easing.js.map +0 -1
  260. package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
  261. package/lib/commonjs/animation/timing/createTiming.js +0 -55
  262. package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
  263. package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
  264. package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
  265. package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
  266. package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
  267. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
  268. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
  269. package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
  270. package/lib/commonjs/animation/timing/functions/index.js +0 -54
  271. package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
  272. package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
  273. package/lib/commonjs/animation/timing/functions/timing.js +0 -50
  274. package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
  275. package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
  276. package/lib/commonjs/animation/timing/functions/types.js +0 -2
  277. package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
  278. package/lib/commonjs/animation/timing/index.d.ts +0 -4
  279. package/lib/commonjs/animation/timing/index.js +0 -38
  280. package/lib/commonjs/animation/timing/index.js.map +0 -1
  281. package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
  282. package/lib/commonjs/animation/timing/runTiming.js +0 -36
  283. package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
  284. package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
  285. package/lib/commonjs/animation/timing/useLoop.js +0 -25
  286. package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
  287. package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
  288. package/lib/commonjs/animation/timing/useTiming.js +0 -67
  289. package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
  290. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  291. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
  292. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  293. package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
  294. package/lib/commonjs/renderer/DependencyManager.js +0 -185
  295. package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
  296. package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
  297. package/lib/commonjs/renderer/components/Drawing.js +0 -22
  298. package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
  299. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  300. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
  301. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  302. package/lib/commonjs/values/api.d.ts +0 -26
  303. package/lib/commonjs/values/api.js +0 -55
  304. package/lib/commonjs/values/api.js.map +0 -1
  305. package/lib/commonjs/values/api.web.d.ts +0 -2
  306. package/lib/commonjs/values/api.web.js +0 -18
  307. package/lib/commonjs/values/api.web.js.map +0 -1
  308. package/lib/commonjs/values/hooks/index.d.ts +0 -4
  309. package/lib/commonjs/values/hooks/index.js +0 -58
  310. package/lib/commonjs/values/hooks/index.js.map +0 -1
  311. package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
  312. package/lib/commonjs/values/hooks/useClockValue.js +0 -30
  313. package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
  314. package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
  315. package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
  316. package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
  317. package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
  318. package/lib/commonjs/values/hooks/useValue.js +0 -26
  319. package/lib/commonjs/values/hooks/useValue.js.map +0 -1
  320. package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
  321. package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
  322. package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
  323. package/lib/commonjs/values/index.d.ts +0 -4
  324. package/lib/commonjs/values/index.js +0 -58
  325. package/lib/commonjs/values/index.js.map +0 -1
  326. package/lib/commonjs/values/selector.d.ts +0 -14
  327. package/lib/commonjs/values/selector.js +0 -24
  328. package/lib/commonjs/values/selector.js.map +0 -1
  329. package/lib/commonjs/values/types.d.ts +0 -63
  330. package/lib/commonjs/values/types.js +0 -2
  331. package/lib/commonjs/values/types.js.map +0 -1
  332. package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
  333. package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
  334. package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
  335. package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
  336. package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
  337. package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
  338. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
  339. package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
  340. package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
  341. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
  342. package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
  343. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
  344. package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
  345. package/lib/commonjs/values/web/RNSkValue.js +0 -73
  346. package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
  347. package/lib/commonjs/values/web/api.d.ts +0 -2
  348. package/lib/commonjs/values/web/api.js +0 -31
  349. package/lib/commonjs/values/web/api.js.map +0 -1
  350. package/lib/commonjs/values/web/index.d.ts +0 -1
  351. package/lib/commonjs/values/web/index.js +0 -19
  352. package/lib/commonjs/values/web/index.js.map +0 -1
  353. package/lib/commonjs/views/SkiaView.d.ts +0 -35
  354. package/lib/commonjs/views/SkiaView.js +0 -139
  355. package/lib/commonjs/views/SkiaView.js.map +0 -1
  356. package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
  357. package/lib/commonjs/views/SkiaView.web.js +0 -30
  358. package/lib/commonjs/views/SkiaView.web.js.map +0 -1
  359. package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
  360. package/lib/commonjs/views/useDrawCallback.js +0 -23
  361. package/lib/commonjs/views/useDrawCallback.js.map +0 -1
  362. package/lib/module/animation/decay/decay.d.ts +0 -2
  363. package/lib/module/animation/decay/decay.js +0 -33
  364. package/lib/module/animation/decay/decay.js.map +0 -1
  365. package/lib/module/animation/decay/index.d.ts +0 -1
  366. package/lib/module/animation/decay/index.js +0 -2
  367. package/lib/module/animation/decay/index.js.map +0 -1
  368. package/lib/module/animation/decay/runDecay.d.ts +0 -10
  369. package/lib/module/animation/decay/runDecay.js +0 -38
  370. package/lib/module/animation/decay/runDecay.js.map +0 -1
  371. package/lib/module/animation/decay/types.d.ts +0 -21
  372. package/lib/module/animation/decay/types.js +0 -2
  373. package/lib/module/animation/decay/types.js.map +0 -1
  374. package/lib/module/animation/spring/Spring.d.ts +0 -65
  375. package/lib/module/animation/spring/Spring.js +0 -69
  376. package/lib/module/animation/spring/Spring.js.map +0 -1
  377. package/lib/module/animation/spring/functions/index.d.ts +0 -1
  378. package/lib/module/animation/spring/functions/index.js +0 -2
  379. package/lib/module/animation/spring/functions/index.js.map +0 -1
  380. package/lib/module/animation/spring/functions/spring.d.ts +0 -10
  381. package/lib/module/animation/spring/functions/spring.js +0 -85
  382. package/lib/module/animation/spring/functions/spring.js.map +0 -1
  383. package/lib/module/animation/spring/index.d.ts +0 -3
  384. package/lib/module/animation/spring/index.js +0 -4
  385. package/lib/module/animation/spring/index.js.map +0 -1
  386. package/lib/module/animation/spring/runSpring.d.ts +0 -19
  387. package/lib/module/animation/spring/runSpring.js +0 -24
  388. package/lib/module/animation/spring/runSpring.js.map +0 -1
  389. package/lib/module/animation/spring/types.d.ts +0 -6
  390. package/lib/module/animation/spring/types.js +0 -2
  391. package/lib/module/animation/spring/types.js.map +0 -1
  392. package/lib/module/animation/spring/useSpring.d.ts +0 -13
  393. package/lib/module/animation/spring/useSpring.js +0 -16
  394. package/lib/module/animation/spring/useSpring.js.map +0 -1
  395. package/lib/module/animation/timing/Easing.d.ts +0 -19
  396. package/lib/module/animation/timing/Easing.js +0 -98
  397. package/lib/module/animation/timing/Easing.js.map +0 -1
  398. package/lib/module/animation/timing/createTiming.d.ts +0 -17
  399. package/lib/module/animation/timing/createTiming.js +0 -49
  400. package/lib/module/animation/timing/createTiming.js.map +0 -1
  401. package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
  402. package/lib/module/animation/timing/functions/bezier.js +0 -141
  403. package/lib/module/animation/timing/functions/bezier.js.map +0 -1
  404. package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
  405. package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
  406. package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
  407. package/lib/module/animation/timing/functions/index.d.ts +0 -4
  408. package/lib/module/animation/timing/functions/index.js +0 -5
  409. package/lib/module/animation/timing/functions/index.js.map +0 -1
  410. package/lib/module/animation/timing/functions/timing.d.ts +0 -17
  411. package/lib/module/animation/timing/functions/timing.js +0 -41
  412. package/lib/module/animation/timing/functions/timing.js.map +0 -1
  413. package/lib/module/animation/timing/functions/types.d.ts +0 -7
  414. package/lib/module/animation/timing/functions/types.js +0 -2
  415. package/lib/module/animation/timing/functions/types.js.map +0 -1
  416. package/lib/module/animation/timing/index.d.ts +0 -4
  417. package/lib/module/animation/timing/index.js +0 -5
  418. package/lib/module/animation/timing/index.js.map +0 -1
  419. package/lib/module/animation/timing/runTiming.d.ts +0 -19
  420. package/lib/module/animation/timing/runTiming.js +0 -26
  421. package/lib/module/animation/timing/runTiming.js.map +0 -1
  422. package/lib/module/animation/timing/useLoop.d.ts +0 -11
  423. package/lib/module/animation/timing/useLoop.js +0 -16
  424. package/lib/module/animation/timing/useLoop.js.map +0 -1
  425. package/lib/module/animation/timing/useTiming.d.ts +0 -13
  426. package/lib/module/animation/timing/useTiming.js +0 -57
  427. package/lib/module/animation/timing/useTiming.js.map +0 -1
  428. package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  429. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
  430. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  431. package/lib/module/renderer/DependencyManager.d.ts +0 -46
  432. package/lib/module/renderer/DependencyManager.js +0 -174
  433. package/lib/module/renderer/DependencyManager.js.map +0 -1
  434. package/lib/module/renderer/components/Drawing.d.ts +0 -8
  435. package/lib/module/renderer/components/Drawing.js +0 -11
  436. package/lib/module/renderer/components/Drawing.js.map +0 -1
  437. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  438. package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
  439. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  440. package/lib/module/values/api.d.ts +0 -26
  441. package/lib/module/values/api.js +0 -48
  442. package/lib/module/values/api.js.map +0 -1
  443. package/lib/module/values/api.web.d.ts +0 -2
  444. package/lib/module/values/api.web.js +0 -7
  445. package/lib/module/values/api.web.js.map +0 -1
  446. package/lib/module/values/hooks/index.d.ts +0 -4
  447. package/lib/module/values/hooks/index.js +0 -5
  448. package/lib/module/values/hooks/index.js.map +0 -1
  449. package/lib/module/values/hooks/useClockValue.d.ts +0 -9
  450. package/lib/module/values/hooks/useClockValue.js +0 -20
  451. package/lib/module/values/hooks/useClockValue.js.map +0 -1
  452. package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
  453. package/lib/module/values/hooks/useComputedValue.js +0 -21
  454. package/lib/module/values/hooks/useComputedValue.js.map +0 -1
  455. package/lib/module/values/hooks/useValue.d.ts +0 -10
  456. package/lib/module/values/hooks/useValue.js +0 -16
  457. package/lib/module/values/hooks/useValue.js.map +0 -1
  458. package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
  459. package/lib/module/values/hooks/useValueEffect.js +0 -16
  460. package/lib/module/values/hooks/useValueEffect.js.map +0 -1
  461. package/lib/module/values/index.d.ts +0 -4
  462. package/lib/module/values/index.js +0 -5
  463. package/lib/module/values/index.js.map +0 -1
  464. package/lib/module/values/selector.d.ts +0 -14
  465. package/lib/module/values/selector.js +0 -15
  466. package/lib/module/values/selector.js.map +0 -1
  467. package/lib/module/values/types.d.ts +0 -63
  468. package/lib/module/values/types.js +0 -2
  469. package/lib/module/values/types.js.map +0 -1
  470. package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
  471. package/lib/module/values/web/RNSkAnimation.js +0 -36
  472. package/lib/module/values/web/RNSkAnimation.js.map +0 -1
  473. package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
  474. package/lib/module/values/web/RNSkClockValue.js +0 -65
  475. package/lib/module/values/web/RNSkClockValue.js.map +0 -1
  476. package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
  477. package/lib/module/values/web/RNSkComputedValue.js +0 -49
  478. package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
  479. package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
  480. package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
  481. package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
  482. package/lib/module/values/web/RNSkValue.d.ts +0 -14
  483. package/lib/module/values/web/RNSkValue.js +0 -63
  484. package/lib/module/values/web/RNSkValue.js.map +0 -1
  485. package/lib/module/values/web/api.d.ts +0 -2
  486. package/lib/module/values/web/api.js +0 -19
  487. package/lib/module/values/web/api.js.map +0 -1
  488. package/lib/module/values/web/index.d.ts +0 -1
  489. package/lib/module/values/web/index.js +0 -2
  490. package/lib/module/values/web/index.js.map +0 -1
  491. package/lib/module/views/SkiaView.d.ts +0 -35
  492. package/lib/module/views/SkiaView.js +0 -119
  493. package/lib/module/views/SkiaView.js.map +0 -1
  494. package/lib/module/views/SkiaView.web.d.ts +0 -7
  495. package/lib/module/views/SkiaView.web.js +0 -20
  496. package/lib/module/views/SkiaView.web.js.map +0 -1
  497. package/lib/module/views/useDrawCallback.d.ts +0 -8
  498. package/lib/module/views/useDrawCallback.js +0 -14
  499. package/lib/module/views/useDrawCallback.js.map +0 -1
  500. package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
  501. package/lib/typescript/src/animation/decay/index.d.ts +0 -1
  502. package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
  503. package/lib/typescript/src/animation/decay/types.d.ts +0 -21
  504. package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
  505. package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
  506. package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
  507. package/lib/typescript/src/animation/spring/index.d.ts +0 -3
  508. package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
  509. package/lib/typescript/src/animation/spring/types.d.ts +0 -6
  510. package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
  511. package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
  512. package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
  513. package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
  514. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
  515. package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
  516. package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
  517. package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
  518. package/lib/typescript/src/animation/timing/index.d.ts +0 -4
  519. package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
  520. package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
  521. package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
  522. package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  523. package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
  524. package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
  525. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  526. package/lib/typescript/src/values/api.d.ts +0 -26
  527. package/lib/typescript/src/values/api.web.d.ts +0 -2
  528. package/lib/typescript/src/values/hooks/index.d.ts +0 -4
  529. package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
  530. package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
  531. package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
  532. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
  533. package/lib/typescript/src/values/index.d.ts +0 -4
  534. package/lib/typescript/src/values/selector.d.ts +0 -14
  535. package/lib/typescript/src/values/types.d.ts +0 -63
  536. package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
  537. package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
  538. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
  539. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
  540. package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
  541. package/lib/typescript/src/values/web/api.d.ts +0 -2
  542. package/lib/typescript/src/values/web/index.d.ts +0 -1
  543. package/lib/typescript/src/views/SkiaView.d.ts +0 -35
  544. package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
  545. package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
  546. package/src/animation/decay/decay.ts +0 -35
  547. package/src/animation/decay/index.ts +0 -1
  548. package/src/animation/decay/runDecay.ts +0 -40
  549. package/src/animation/decay/types.ts +0 -24
  550. package/src/animation/spring/Spring.ts +0 -61
  551. package/src/animation/spring/functions/index.ts +0 -1
  552. package/src/animation/spring/functions/spring.ts +0 -86
  553. package/src/animation/spring/index.ts +0 -3
  554. package/src/animation/spring/runSpring.ts +0 -40
  555. package/src/animation/spring/types.ts +0 -6
  556. package/src/animation/spring/useSpring.ts +0 -31
  557. package/src/animation/timing/Easing.ts +0 -102
  558. package/src/animation/timing/createTiming.ts +0 -62
  559. package/src/animation/timing/functions/bezier.ts +0 -165
  560. package/src/animation/timing/functions/getResolvedParams.ts +0 -50
  561. package/src/animation/timing/functions/index.ts +0 -4
  562. package/src/animation/timing/functions/timing.ts +0 -44
  563. package/src/animation/timing/functions/types.ts +0 -8
  564. package/src/animation/timing/index.ts +0 -4
  565. package/src/animation/timing/runTiming.ts +0 -36
  566. package/src/animation/timing/useLoop.ts +0 -21
  567. package/src/animation/timing/useTiming.ts +0 -71
  568. package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
  569. package/src/renderer/DependencyManager.tsx +0 -196
  570. package/src/renderer/components/Drawing.tsx +0 -12
  571. package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
  572. package/src/values/api.ts +0 -61
  573. package/src/values/api.web.ts +0 -5
  574. package/src/values/hooks/index.ts +0 -4
  575. package/src/values/hooks/useClockValue.ts +0 -21
  576. package/src/values/hooks/useComputedValue.ts +0 -24
  577. package/src/values/hooks/useValue.ts +0 -17
  578. package/src/values/hooks/useValueEffect.ts +0 -18
  579. package/src/values/index.ts +0 -4
  580. package/src/values/selector.ts +0 -24
  581. package/src/values/types.ts +0 -73
  582. package/src/values/web/RNSkAnimation.ts +0 -33
  583. package/src/values/web/RNSkClockValue.ts +0 -58
  584. package/src/values/web/RNSkComputedValue.ts +0 -49
  585. package/src/values/web/RNSkReadonlyValue.ts +0 -38
  586. package/src/values/web/RNSkValue.ts +0 -57
  587. package/src/values/web/api.ts +0 -33
  588. package/src/values/web/index.ts +0 -1
  589. package/src/views/SkiaView.tsx +0 -111
  590. package/src/views/SkiaView.web.tsx +0 -22
  591. package/src/views/useDrawCallback.ts +0 -19
@@ -11,7 +11,7 @@ var _JsiSkParagraphBuilder = require("./JsiSkParagraphBuilder");
11
11
 
12
12
  var _JsiSkParagraphStyle = require("./JsiSkParagraphStyle");
13
13
 
14
- var _JsiSkTypeface = require("./JsiSkTypeface");
14
+ var _JsiSkTypefaceFontProvider = require("./JsiSkTypefaceFontProvider");
15
15
 
16
16
  class JsiSkParagraphBuilderFactory extends _Host.Host {
17
17
  constructor(CanvasKit) {
@@ -25,7 +25,10 @@ class JsiSkParagraphBuilderFactory extends _Host.Host {
25
25
  throw new Error("SkTypefaceFontProvider is required on React Native Web.");
26
26
  }
27
27
 
28
- return new _JsiSkParagraphBuilder.JsiSkParagraphBuilder(this.CanvasKit, this.CanvasKit.ParagraphBuilder.MakeFromFontProvider(style, _JsiSkTypeface.JsiSkTypeface.fromValue(typefaceProvider)));
28
+ const fontCollection = this.CanvasKit.FontCollection.Make();
29
+ fontCollection.setDefaultFontManager(_JsiSkTypefaceFontProvider.JsiSkTypefaceFontProvider.fromValue(typefaceProvider));
30
+ fontCollection.enableFontFallback();
31
+ return new _JsiSkParagraphBuilder.JsiSkParagraphBuilder(this.CanvasKit, this.CanvasKit.ParagraphBuilder.MakeFromFontCollection(style, fontCollection));
29
32
  }
30
33
 
31
34
  }
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkParagraphBuilderFactory","Host","constructor","CanvasKit","Make","paragraphStyle","typefaceProvider","style","ParagraphStyle","JsiSkParagraphStyle","toParagraphStyle","undefined","Error","JsiSkParagraphBuilder","ParagraphBuilder","MakeFromFontProvider","JsiSkTypeface","fromValue"],"sources":["JsiSkParagraphBuilderFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n ParagraphBuilderFactory,\n SkParagraphStyle,\n SkTypefaceFontProvider,\n} from \"../types\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkParagraphBuilder } from \"./JsiSkParagraphBuilder\";\nimport { JsiSkParagraphStyle } from \"./JsiSkParagraphStyle\";\nimport { JsiSkTypeface } from \"./JsiSkTypeface\";\n\nexport class JsiSkParagraphBuilderFactory\n extends Host\n implements ParagraphBuilderFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n Make(\n paragraphStyle: SkParagraphStyle,\n typefaceProvider?: SkTypefaceFontProvider\n ) {\n const style = new this.CanvasKit.ParagraphStyle(\n JsiSkParagraphStyle.toParagraphStyle(this.CanvasKit, paragraphStyle ?? {})\n );\n if (typefaceProvider === undefined) {\n throw new Error(\n \"SkTypefaceFontProvider is required on React Native Web.\"\n );\n }\n return new JsiSkParagraphBuilder(\n this.CanvasKit,\n this.CanvasKit.ParagraphBuilder.MakeFromFontProvider(\n style,\n JsiSkTypeface.fromValue(typefaceProvider)\n )\n );\n }\n}\n"],"mappings":";;;;;;;AAQA;;AACA;;AACA;;AACA;;AAEO,MAAMA,4BAAN,SACGC,UADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuB;IAChC,MAAMA,SAAN;EACD;;EAEDC,IAAI,CACFC,cADE,EAEFC,gBAFE,EAGF;IACA,MAAMC,KAAK,GAAG,IAAI,KAAKJ,SAAL,CAAeK,cAAnB,CACZC,wCAAA,CAAoBC,gBAApB,CAAqC,KAAKP,SAA1C,EAAqDE,cAAc,IAAI,EAAvE,CADY,CAAd;;IAGA,IAAIC,gBAAgB,KAAKK,SAAzB,EAAoC;MAClC,MAAM,IAAIC,KAAJ,CACJ,yDADI,CAAN;IAGD;;IACD,OAAO,IAAIC,4CAAJ,CACL,KAAKV,SADA,EAEL,KAAKA,SAAL,CAAeW,gBAAf,CAAgCC,oBAAhC,CACER,KADF,EAEES,4BAAA,CAAcC,SAAd,CAAwBX,gBAAxB,CAFF,CAFK,CAAP;EAOD;;AAxBH"}
1
+ {"version":3,"names":["JsiSkParagraphBuilderFactory","Host","constructor","CanvasKit","Make","paragraphStyle","typefaceProvider","style","ParagraphStyle","JsiSkParagraphStyle","toParagraphStyle","undefined","Error","fontCollection","FontCollection","setDefaultFontManager","JsiSkTypefaceFontProvider","fromValue","enableFontFallback","JsiSkParagraphBuilder","ParagraphBuilder","MakeFromFontCollection"],"sources":["JsiSkParagraphBuilderFactory.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type {\n ParagraphBuilderFactory,\n SkParagraphStyle,\n SkTypefaceFontProvider,\n} from \"../types\";\n\nimport { Host } from \"./Host\";\nimport { JsiSkParagraphBuilder } from \"./JsiSkParagraphBuilder\";\nimport { JsiSkParagraphStyle } from \"./JsiSkParagraphStyle\";\nimport { JsiSkTypefaceFontProvider } from \"./JsiSkTypefaceFontProvider\";\n\nexport class JsiSkParagraphBuilderFactory\n extends Host\n implements ParagraphBuilderFactory\n{\n constructor(CanvasKit: CanvasKit) {\n super(CanvasKit);\n }\n\n Make(\n paragraphStyle: SkParagraphStyle,\n typefaceProvider?: SkTypefaceFontProvider\n ) {\n const style = new this.CanvasKit.ParagraphStyle(\n JsiSkParagraphStyle.toParagraphStyle(this.CanvasKit, paragraphStyle ?? {})\n );\n if (typefaceProvider === undefined) {\n throw new Error(\n \"SkTypefaceFontProvider is required on React Native Web.\"\n );\n }\n const fontCollection = this.CanvasKit.FontCollection.Make();\n fontCollection.setDefaultFontManager(\n JsiSkTypefaceFontProvider.fromValue(typefaceProvider)\n );\n fontCollection.enableFontFallback();\n\n return new JsiSkParagraphBuilder(\n this.CanvasKit,\n this.CanvasKit.ParagraphBuilder.MakeFromFontCollection(\n style,\n fontCollection\n )\n );\n }\n}\n"],"mappings":";;;;;;;AAQA;;AACA;;AACA;;AACA;;AAEO,MAAMA,4BAAN,SACGC,UADH,CAGP;EACEC,WAAW,CAACC,SAAD,EAAuB;IAChC,MAAMA,SAAN;EACD;;EAEDC,IAAI,CACFC,cADE,EAEFC,gBAFE,EAGF;IACA,MAAMC,KAAK,GAAG,IAAI,KAAKJ,SAAL,CAAeK,cAAnB,CACZC,wCAAA,CAAoBC,gBAApB,CAAqC,KAAKP,SAA1C,EAAqDE,cAAc,IAAI,EAAvE,CADY,CAAd;;IAGA,IAAIC,gBAAgB,KAAKK,SAAzB,EAAoC;MAClC,MAAM,IAAIC,KAAJ,CACJ,yDADI,CAAN;IAGD;;IACD,MAAMC,cAAc,GAAG,KAAKV,SAAL,CAAeW,cAAf,CAA8BV,IAA9B,EAAvB;IACAS,cAAc,CAACE,qBAAf,CACEC,oDAAA,CAA0BC,SAA1B,CAAoCX,gBAApC,CADF;IAGAO,cAAc,CAACK,kBAAf;IAEA,OAAO,IAAIC,4CAAJ,CACL,KAAKhB,SADA,EAEL,KAAKA,SAAL,CAAeiB,gBAAf,CAAgCC,sBAAhC,CACEd,KADF,EAEEM,cAFF,CAFK,CAAP;EAOD;;AA9BH"}
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import type { PointerEvent } from "react";
3
3
  import type { SkRect, SkCanvas } from "../skia/types";
4
- import type { SkiaValue } from "../values";
5
4
  import type { DrawMode, SkiaBaseViewProps, TouchInfo } from "./types";
6
5
  import { TouchType } from "./types";
7
6
  export declare abstract class SkiaBaseWebView<TProps extends SkiaBaseViewProps> extends React.Component<TProps> {
@@ -50,12 +49,6 @@ export declare abstract class SkiaBaseWebView<TProps extends SkiaBaseViewProps>
50
49
  * @param mode Drawing mode to use.
51
50
  */
52
51
  setDrawMode(mode: DrawMode): void;
53
- /**
54
- * Registers one or move values as a dependant value of the Skia View. The view will
55
- * The view will redraw itself when any of the values change.
56
- * @param values Values to register
57
- */
58
- registerValues(_values: SkiaValue<unknown>[]): void;
59
52
  private handleTouchEvent;
60
53
  createTouchHandler(touchType: TouchType): (evt: PointerEvent) => void;
61
54
  private onStart;
@@ -186,23 +186,6 @@ class SkiaBaseWebView extends _react.default.Component {
186
186
  this._mode = mode;
187
187
  this.tick();
188
188
  }
189
- /**
190
- * Registers one or move values as a dependant value of the Skia View. The view will
191
- * The view will redraw itself when any of the values change.
192
- * @param values Values to register
193
- */
194
-
195
-
196
- registerValues(_values) {
197
- // Unsubscribe from dependency values
198
- this.unsubscribeAll(); // Register redraw dependencies on values
199
-
200
- _values.forEach(v => {
201
- this._unsubscriptions.push(v.addListener(() => {
202
- this.redraw();
203
- }));
204
- });
205
- }
206
189
 
207
190
  handleTouchEvent(evt, touchType) {
208
191
  this._touches.push({
@@ -1 +1 @@
1
- {"version":3,"names":["pd","Platform","PixelRatio","SkiaBaseWebView","React","Component","constructor","props","createRef","createTouchHandler","TouchType","Start","Active","Cancelled","End","onLayoutEvent","bind","_mode","mode","unsubscribeAll","_unsubscriptions","forEach","u","evt","CanvasKit","global","canvas","_canvasRef","current","width","clientWidth","height","clientHeight","surface","MakeWebGLCanvasSurface","Error","_surface","JsiSkSurface","_canvas","getCanvas","redraw","onLayout","getSize","componentDidMount","tick","componentDidUpdate","componentWillUnmount","cancelAnimationFrame","requestId","getContext","getExtension","loseContext","makeImageSnapshot","rect","clear","TRANSPARENT","renderInCanvas","ref","flush","_redrawRequests","touches","_touches","Float32Array","of","save","scale","restore","requestAnimationFrame","setDrawMode","registerValues","_values","v","push","addListener","handleTouchEvent","touchType","id","pointerId","x","clientX","currentTarget","getClientRects","left","y","clientY","top","force","pressure","type","timestamp","Date","now","render","debug","viewProps","display","flex","onStart","onActive","onEnd","onCancel"],"sources":["SkiaBaseWebView.tsx"],"sourcesContent":["/* global HTMLCanvasElement */\nimport React from \"react\";\nimport type { PointerEvent } from \"react\";\nimport type { LayoutChangeEvent } from \"react-native\";\n\nimport type { SkRect, SkCanvas } from \"../skia/types\";\nimport type { SkiaValue } from \"../values\";\nimport { JsiSkSurface } from \"../skia/web/JsiSkSurface\";\nimport { Platform } from \"../Platform\";\n\nimport type { DrawMode, SkiaBaseViewProps, TouchInfo } from \"./types\";\nimport { TouchType } from \"./types\";\n\nconst pd = Platform.PixelRatio;\n\nexport abstract class SkiaBaseWebView<\n TProps extends SkiaBaseViewProps\n> extends React.Component<TProps> {\n constructor(props: TProps) {\n super(props);\n this._mode = props.mode ?? \"default\";\n }\n\n private _surface: JsiSkSurface | null = null;\n private _unsubscriptions: Array<() => void> = [];\n private _touches: Array<TouchInfo> = [];\n private _canvas: SkCanvas | null = null;\n private _canvasRef = React.createRef<HTMLCanvasElement>();\n private _mode: DrawMode;\n private _redrawRequests = 0;\n private requestId = 0;\n\n protected width = 0;\n protected height = 0;\n\n private unsubscribeAll() {\n this._unsubscriptions.forEach((u) => u());\n this._unsubscriptions = [];\n }\n\n private onLayoutEvent(evt: LayoutChangeEvent) {\n const { CanvasKit } = global;\n // Reset canvas / surface on layout change\n const canvas = this._canvasRef.current;\n if (canvas) {\n this.width = canvas.clientWidth;\n this.height = canvas.clientHeight;\n canvas.width = this.width * pd;\n canvas.height = this.height * pd;\n const surface = CanvasKit.MakeWebGLCanvasSurface(canvas);\n if (!surface) {\n throw new Error(\"Could not create surface\");\n }\n this._surface = new JsiSkSurface(CanvasKit, surface);\n this._canvas = this._surface.getCanvas();\n this.redraw();\n }\n // Call onLayout callback if it exists\n if (this.props.onLayout) {\n this.props.onLayout(evt);\n }\n }\n\n protected getSize() {\n return { width: this.width, height: this.height };\n }\n\n componentDidMount() {\n // Start render loop\n this.tick();\n }\n\n componentDidUpdate() {\n this.redraw();\n }\n\n componentWillUnmount() {\n this.unsubscribeAll();\n cancelAnimationFrame(this.requestId);\n // eslint-disable-next-line max-len\n // https://stackoverflow.com/questions/23598471/how-do-i-clean-up-and-unload-a-webgl-canvas-context-from-gpu-after-use\n // https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context\n // We delete the context, only if the context has been intialized\n if (this._surface) {\n this._canvasRef.current\n ?.getContext(\"webgl2\")\n ?.getExtension(\"WEBGL_lose_context\")\n ?.loseContext();\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n this._canvas!.clear(CanvasKit.TRANSPARENT);\n this.renderInCanvas(this._canvas!, []);\n this._surface?.ref.flush();\n return this._surface?.makeImageSnapshot(rect);\n }\n\n /**\n * Override to render\n */\n protected abstract renderInCanvas(\n canvas: SkCanvas,\n touches: TouchInfo[]\n ): void;\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n private tick() {\n if (this._mode === \"continuous\" || this._redrawRequests > 0) {\n this._redrawRequests = 0;\n if (this._canvas) {\n const touches = [...this._touches];\n this._touches = [];\n const canvas = this._canvas!;\n canvas.clear(Float32Array.of(0, 0, 0, 0));\n canvas.save();\n canvas.scale(pd, pd);\n this.renderInCanvas(canvas, touches);\n canvas.restore();\n this._surface?.ref.flush();\n }\n }\n this.requestId = requestAnimationFrame(this.tick.bind(this));\n }\n\n public redraw() {\n this._redrawRequests++;\n }\n\n /**\n * Updates the drawing mode for the skia view. This is the same\n * as declaratively setting the mode property on the SkiaView.\n * There are two drawing modes, \"continuous\" and \"default\",\n * where the continuous mode will continuously redraw the view and\n * the default mode will only redraw when any of the regular react\n * properties are changed like size and margins.\n * @param mode Drawing mode to use.\n */\n public setDrawMode(mode: DrawMode) {\n this._mode = mode;\n this.tick();\n }\n\n /**\n * Registers one or move values as a dependant value of the Skia View. The view will\n * The view will redraw itself when any of the values change.\n * @param values Values to register\n */\n public registerValues(_values: SkiaValue<unknown>[]) {\n // Unsubscribe from dependency values\n this.unsubscribeAll();\n // Register redraw dependencies on values\n _values.forEach((v) => {\n this._unsubscriptions.push(\n v.addListener(() => {\n this.redraw();\n })\n );\n });\n }\n\n private handleTouchEvent(evt: PointerEvent, touchType: TouchType) {\n this._touches.push({\n id: evt.pointerId,\n x: evt.clientX - evt.currentTarget.getClientRects()[0].left,\n y: evt.clientY - evt.currentTarget.getClientRects()[0].top,\n force: evt.pressure,\n type: touchType,\n timestamp: Date.now(),\n });\n this.redraw();\n }\n\n createTouchHandler(touchType: TouchType) {\n return (evt: PointerEvent) => this.handleTouchEvent(evt, touchType);\n }\n\n private onStart = this.createTouchHandler(TouchType.Start);\n private onActive = this.createTouchHandler(TouchType.Active);\n private onCancel = this.createTouchHandler(TouchType.Cancelled);\n private onEnd = this.createTouchHandler(TouchType.End);\n private onLayout = this.onLayoutEvent.bind(this);\n\n render() {\n const { mode, debug = false, ...viewProps } = this.props;\n return (\n <Platform.View {...viewProps} onLayout={this.onLayout}>\n <canvas\n ref={this._canvasRef}\n style={{ display: \"flex\", flex: 1 }}\n onPointerDown={this.onStart}\n onPointerMove={this.onActive}\n onPointerUp={this.onEnd}\n onPointerCancel={this.onCancel}\n onPointerLeave={this.onEnd}\n onPointerOut={this.onEnd}\n />\n </Platform.View>\n );\n }\n}\n"],"mappings":";;;;;;;AACA;;AAMA;;AACA;;AAGA;;;;;;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+B"}
1
+ {"version":3,"names":["pd","Platform","PixelRatio","SkiaBaseWebView","React","Component","constructor","props","createRef","createTouchHandler","TouchType","Start","Active","Cancelled","End","onLayoutEvent","bind","_mode","mode","unsubscribeAll","_unsubscriptions","forEach","u","evt","CanvasKit","global","canvas","_canvasRef","current","width","clientWidth","height","clientHeight","surface","MakeWebGLCanvasSurface","Error","_surface","JsiSkSurface","_canvas","getCanvas","redraw","onLayout","getSize","componentDidMount","tick","componentDidUpdate","componentWillUnmount","cancelAnimationFrame","requestId","getContext","getExtension","loseContext","makeImageSnapshot","rect","clear","TRANSPARENT","renderInCanvas","ref","flush","_redrawRequests","touches","_touches","Float32Array","of","save","scale","restore","requestAnimationFrame","setDrawMode","handleTouchEvent","touchType","push","id","pointerId","x","clientX","currentTarget","getClientRects","left","y","clientY","top","force","pressure","type","timestamp","Date","now","render","debug","viewProps","display","flex","onStart","onActive","onEnd","onCancel"],"sources":["SkiaBaseWebView.tsx"],"sourcesContent":["/* global HTMLCanvasElement */\nimport React from \"react\";\nimport type { PointerEvent } from \"react\";\nimport type { LayoutChangeEvent } from \"react-native\";\n\nimport type { SkRect, SkCanvas } from \"../skia/types\";\nimport { JsiSkSurface } from \"../skia/web/JsiSkSurface\";\nimport { Platform } from \"../Platform\";\n\nimport type { DrawMode, SkiaBaseViewProps, TouchInfo } from \"./types\";\nimport { TouchType } from \"./types\";\n\nconst pd = Platform.PixelRatio;\n\nexport abstract class SkiaBaseWebView<\n TProps extends SkiaBaseViewProps\n> extends React.Component<TProps> {\n constructor(props: TProps) {\n super(props);\n this._mode = props.mode ?? \"default\";\n }\n\n private _surface: JsiSkSurface | null = null;\n private _unsubscriptions: Array<() => void> = [];\n private _touches: Array<TouchInfo> = [];\n private _canvas: SkCanvas | null = null;\n private _canvasRef = React.createRef<HTMLCanvasElement>();\n private _mode: DrawMode;\n private _redrawRequests = 0;\n private requestId = 0;\n\n protected width = 0;\n protected height = 0;\n\n private unsubscribeAll() {\n this._unsubscriptions.forEach((u) => u());\n this._unsubscriptions = [];\n }\n\n private onLayoutEvent(evt: LayoutChangeEvent) {\n const { CanvasKit } = global;\n // Reset canvas / surface on layout change\n const canvas = this._canvasRef.current;\n if (canvas) {\n this.width = canvas.clientWidth;\n this.height = canvas.clientHeight;\n canvas.width = this.width * pd;\n canvas.height = this.height * pd;\n const surface = CanvasKit.MakeWebGLCanvasSurface(canvas);\n if (!surface) {\n throw new Error(\"Could not create surface\");\n }\n this._surface = new JsiSkSurface(CanvasKit, surface);\n this._canvas = this._surface.getCanvas();\n this.redraw();\n }\n // Call onLayout callback if it exists\n if (this.props.onLayout) {\n this.props.onLayout(evt);\n }\n }\n\n protected getSize() {\n return { width: this.width, height: this.height };\n }\n\n componentDidMount() {\n // Start render loop\n this.tick();\n }\n\n componentDidUpdate() {\n this.redraw();\n }\n\n componentWillUnmount() {\n this.unsubscribeAll();\n cancelAnimationFrame(this.requestId);\n // eslint-disable-next-line max-len\n // https://stackoverflow.com/questions/23598471/how-do-i-clean-up-and-unload-a-webgl-canvas-context-from-gpu-after-use\n // https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context\n // We delete the context, only if the context has been intialized\n if (this._surface) {\n this._canvasRef.current\n ?.getContext(\"webgl2\")\n ?.getExtension(\"WEBGL_lose_context\")\n ?.loseContext();\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n this._canvas!.clear(CanvasKit.TRANSPARENT);\n this.renderInCanvas(this._canvas!, []);\n this._surface?.ref.flush();\n return this._surface?.makeImageSnapshot(rect);\n }\n\n /**\n * Override to render\n */\n protected abstract renderInCanvas(\n canvas: SkCanvas,\n touches: TouchInfo[]\n ): void;\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n private tick() {\n if (this._mode === \"continuous\" || this._redrawRequests > 0) {\n this._redrawRequests = 0;\n if (this._canvas) {\n const touches = [...this._touches];\n this._touches = [];\n const canvas = this._canvas!;\n canvas.clear(Float32Array.of(0, 0, 0, 0));\n canvas.save();\n canvas.scale(pd, pd);\n this.renderInCanvas(canvas, touches);\n canvas.restore();\n this._surface?.ref.flush();\n }\n }\n this.requestId = requestAnimationFrame(this.tick.bind(this));\n }\n\n public redraw() {\n this._redrawRequests++;\n }\n\n /**\n * Updates the drawing mode for the skia view. This is the same\n * as declaratively setting the mode property on the SkiaView.\n * There are two drawing modes, \"continuous\" and \"default\",\n * where the continuous mode will continuously redraw the view and\n * the default mode will only redraw when any of the regular react\n * properties are changed like size and margins.\n * @param mode Drawing mode to use.\n */\n public setDrawMode(mode: DrawMode) {\n this._mode = mode;\n this.tick();\n }\n\n private handleTouchEvent(evt: PointerEvent, touchType: TouchType) {\n this._touches.push({\n id: evt.pointerId,\n x: evt.clientX - evt.currentTarget.getClientRects()[0].left,\n y: evt.clientY - evt.currentTarget.getClientRects()[0].top,\n force: evt.pressure,\n type: touchType,\n timestamp: Date.now(),\n });\n this.redraw();\n }\n\n createTouchHandler(touchType: TouchType) {\n return (evt: PointerEvent) => this.handleTouchEvent(evt, touchType);\n }\n\n private onStart = this.createTouchHandler(TouchType.Start);\n private onActive = this.createTouchHandler(TouchType.Active);\n private onCancel = this.createTouchHandler(TouchType.Cancelled);\n private onEnd = this.createTouchHandler(TouchType.End);\n private onLayout = this.onLayoutEvent.bind(this);\n\n render() {\n const { mode, debug = false, ...viewProps } = this.props;\n return (\n <Platform.View {...viewProps} onLayout={this.onLayout}>\n <canvas\n ref={this._canvasRef}\n style={{ display: \"flex\", flex: 1 }}\n onPointerDown={this.onStart}\n onPointerMove={this.onActive}\n onPointerUp={this.onEnd}\n onPointerCancel={this.onCancel}\n onPointerLeave={this.onEnd}\n onPointerOut={this.onEnd}\n />\n </Platform.View>\n );\n }\n}\n"],"mappings":";;;;;;;AACA;;AAKA;;AACA;;AAGA;;;;;;kNAVA;;AAYA,MAAMA,EAAE,GAAGC,kBAAA,CAASC,UAApB;;AAEO,MAA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AAJ,GAAczD,GAAG,CAACqD,aAAJ,CAAkBC,cAAlB,GAAmC,CAAnC,EAAsCI,GAHtC;MAIjBC,KAAK,EAAE3D,GAAG,CAAC4D,QAJM;MAKjBC,IAAI,EAAEd,SALW;MAMjBe,SAAS,EAAEC,IAAI,CAACC,GAAL;IANM,CAAnB;;IAQA,KAAK/C,MAAL;EACD;;EAED/B,kBAAkB,CAAC6D,SAAD,EAAuB;IACvC,OAAQ/C,GAAD,IAAuB,KAAK8C,gBAAL,CAAsB9C,GAAtB,EAA2B+C,SAA3B,CAA9B;EACD;;EAQDkB,MAAM,GAAG;IACP,MAAM;MAAEtE,IAAF;MAAQuE,KAAK,GAAG,KAAhB;MAAuB,GAAGC;IAA1B,IAAwC,KAAKnF,KAAnD;IACA,oBACE,6BAAC,kBAAD,CAAU,IAAV,eAAmBmF,SAAnB;MAA8B,QAAQ,EAAE,KAAKjD;IAA7C,iBACE;MACE,GAAG,EAAE,KAAKd,UADZ;MAEE,KAAK,EAAE;QAAEgE,OAAO,EAAE,MAAX;QAAmBC,IAAI,EAAE;MAAzB,CAFT;MAGE,aAAa,EAAE,KAAKC,OAHtB;MAIE,aAAa,EAAE,KAAKC,QAJtB;MAKE,WAAW,EAAE,KAAKC,KALpB;MAME,eAAe,EAAE,KAAKC,QANxB;MAOE,cAAc,EAAE,KAAKD,KAPvB;MAQE,YAAY,EAAE,KAAKA;IARrB,EADF,CADF;EAcD;;AA3K+B"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import type { SkRect } from "../skia/types";
3
- import type { SkiaValue } from "../values";
4
3
  import type { SkiaDomViewProps } from "./types";
5
4
  export declare class SkiaDomView extends React.Component<SkiaDomViewProps> {
6
5
  constructor(props: SkiaDomViewProps);
@@ -17,12 +16,6 @@ export declare class SkiaDomView extends React.Component<SkiaDomViewProps> {
17
16
  * Sends a redraw request to the native SkiaView.
18
17
  */
19
18
  redraw(): void;
20
- /**
21
- * Registers one or move values as a dependant value of the Skia View. The view will
22
- * The view will redraw itself when any of the values change.
23
- * @param values Values to register
24
- */
25
- registerValues(values: SkiaValue<unknown>[]): () => void;
26
19
  /**
27
20
  * Clear up the dom node when unmounting to release resources.
28
21
  */
@@ -13,7 +13,7 @@ var _SkiaDomViewNativeComponent = _interopRequireDefault(require("../specs/SkiaD
13
13
 
14
14
  var _api = require("./api");
15
15
 
16
- var _SkiaView = require("./SkiaView");
16
+ var _SkiaViewNativeId = require("./SkiaViewNativeId");
17
17
 
18
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
19
 
@@ -30,7 +30,7 @@ class SkiaDomView extends _react.default.Component {
30
30
 
31
31
  _defineProperty(this, "_nativeId", void 0);
32
32
 
33
- this._nativeId = _SkiaView.SkiaViewNativeId.current++;
33
+ this._nativeId = _SkiaViewNativeId.SkiaViewNativeId.current++;
34
34
  const {
35
35
  root,
36
36
  onTouch,
@@ -106,17 +106,6 @@ class SkiaDomView extends _react.default.Component {
106
106
 
107
107
  _api.SkiaViewApi.requestRedraw(this._nativeId);
108
108
  }
109
- /**
110
- * Registers one or move values as a dependant value of the Skia View. The view will
111
- * The view will redraw itself when any of the values change.
112
- * @param values Values to register
113
- */
114
-
115
-
116
- registerValues(values) {
117
- assertSkiaViewApi();
118
- return _api.SkiaViewApi.registerValuesInView(this._nativeId, values);
119
- }
120
109
  /**
121
110
  * Clear up the dom node when unmounting to release resources.
122
111
  */
@@ -147,7 +136,7 @@ class SkiaDomView extends _react.default.Component {
147
136
  exports.SkiaDomView = SkiaDomView;
148
137
 
149
138
  const assertSkiaViewApi = () => {
150
- if (_api.SkiaViewApi === null || _api.SkiaViewApi.setJsiProperty === null || _api.SkiaViewApi.callJsiMethod === null || _api.SkiaViewApi.registerValuesInView === null || _api.SkiaViewApi.requestRedraw === null || _api.SkiaViewApi.makeImageSnapshot === null) {
139
+ if (_api.SkiaViewApi === null || _api.SkiaViewApi.setJsiProperty === null || _api.SkiaViewApi.callJsiMethod === null || _api.SkiaViewApi.requestRedraw === null || _api.SkiaViewApi.makeImageSnapshot === null) {
151
140
  throw Error("Skia View Api was not found.");
152
141
  }
153
142
  };
@@ -1 +1 @@
1
- {"version":3,"names":["NativeSkiaDomView","Platform","OS","SkiaDomViewNativeComponent","SkiaDomView","React","Component","constructor","props","_nativeId","SkiaViewNativeId","current","root","onTouch","onSize","assertSkiaViewApi","SkiaViewApi","setJsiProperty","nativeId","componentDidUpdate","prevProps","makeImageSnapshot","rect","redraw","requestRedraw","registerValues","values","registerValuesInView","componentWillUnmount","render","mode","debug","viewProps","callJsiMethod","Error"],"sources":["SkiaDomView.tsx"],"sourcesContent":["import React from \"react\";\nimport type { HostComponent } from \"react-native\";\n\nimport type { SkRect } from \"../skia/types\";\nimport type { SkiaValue } from \"../values\";\nimport { Platform } from \"../Platform\";\nimport SkiaDomViewNativeComponent from \"../specs/SkiaDomViewNativeComponent\";\n\nimport { SkiaViewApi } from \"./api\";\nimport { SkiaViewNativeId } from \"./SkiaView\";\nimport type { SkiaDomViewProps } from \"./types\";\n\nconst NativeSkiaDomView: HostComponent<SkiaDomViewProps> =\n Platform.OS !== \"web\"\n ? SkiaDomViewNativeComponent\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (null as any);\n\nexport class SkiaDomView extends React.Component<SkiaDomViewProps> {\n constructor(props: SkiaDomViewProps) {\n super(props);\n this._nativeId = SkiaViewNativeId.current++;\n const { root, onTouch, onSize } = props;\n if (root) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"root\", root);\n }\n if (onTouch) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onTouch\", onTouch);\n }\n if (onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n private _nativeId: number;\n\n public get nativeId() {\n return this._nativeId;\n }\n\n componentDidUpdate(prevProps: SkiaDomViewProps) {\n const { root, onTouch, onSize } = this.props;\n if (root !== prevProps.root) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"root\", root);\n }\n if (onTouch !== prevProps.onTouch) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onTouch\", onTouch);\n }\n if (onSize !== prevProps.onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n assertSkiaViewApi();\n return SkiaViewApi.makeImageSnapshot(this._nativeId, rect);\n }\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n public redraw() {\n assertSkiaViewApi();\n SkiaViewApi.requestRedraw(this._nativeId);\n }\n\n /**\n * Registers one or move values as a dependant value of the Skia View. The view will\n * The view will redraw itself when any of the values change.\n * @param values Values to register\n */\n public registerValues(values: SkiaValue<unknown>[]): () => void {\n assertSkiaViewApi();\n return SkiaViewApi.registerValuesInView(this._nativeId, values);\n }\n\n /**\n * Clear up the dom node when unmounting to release resources.\n */\n componentWillUnmount(): void {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"root\", null);\n }\n\n render() {\n const { mode, debug = false, ...viewProps } = this.props;\n return (\n <NativeSkiaDomView\n collapsable={false}\n nativeID={`${this._nativeId}`}\n mode={mode}\n debug={debug}\n {...viewProps}\n />\n );\n }\n}\n\nconst assertSkiaViewApi = () => {\n if (\n SkiaViewApi === null ||\n SkiaViewApi.setJsiProperty === null ||\n SkiaViewApi.callJsiMethod === null ||\n SkiaViewApi.registerValuesInView === null ||\n SkiaViewApi.requestRedraw === null ||\n SkiaViewApi.makeImageSnapshot === null\n ) {\n throw Error(\"Skia View Api was not found.\");\n }\n};\n"],"mappings":";;;;;;;AAAA;;AAKA;;AACA;;AAEA;;AACA;;;;;;;;AAGA,MAAMA,iBAAkD,GACtDC,kBAAA,CAASC,EAAT,K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KAAkC,IANpC,EAOE;IACA,MAAMa,KAAK,CAAC,8BAAD,CAAX;EACD;AACF,CAXD"}
1
+ {"version":3,"names":["NativeSkiaDomView","Platform","OS","SkiaDomViewNativeComponent","SkiaDomView","React","Component","constructor","props","_nativeId","SkiaViewNativeId","current","root","onTouch","onSize","assertSkiaViewApi","SkiaViewApi","setJsiProperty","nativeId","componentDidUpdate","prevProps","makeImageSnapshot","rect","redraw","requestRedraw","componentWillUnmount","render","mode","debug","viewProps","callJsiMethod","Error"],"sources":["SkiaDomView.tsx"],"sourcesContent":["import React from \"react\";\nimport type { HostComponent } from \"react-native\";\n\nimport type { SkRect } from \"../skia/types\";\nimport { Platform } from \"../Platform\";\nimport SkiaDomViewNativeComponent from \"../specs/SkiaDomViewNativeComponent\";\n\nimport { SkiaViewApi } from \"./api\";\nimport type { SkiaDomViewProps } from \"./types\";\nimport { SkiaViewNativeId } from \"./SkiaViewNativeId\";\n\nconst NativeSkiaDomView: HostComponent<SkiaDomViewProps> =\n Platform.OS !== \"web\"\n ? SkiaDomViewNativeComponent\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (null as any);\n\nexport class SkiaDomView extends React.Component<SkiaDomViewProps> {\n constructor(props: SkiaDomViewProps) {\n super(props);\n this._nativeId = SkiaViewNativeId.current++;\n const { root, onTouch, onSize } = props;\n if (root) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"root\", root);\n }\n if (onTouch) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onTouch\", onTouch);\n }\n if (onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n private _nativeId: number;\n\n public get nativeId() {\n return this._nativeId;\n }\n\n componentDidUpdate(prevProps: SkiaDomViewProps) {\n const { root, onTouch, onSize } = this.props;\n if (root !== prevProps.root) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"root\", root);\n }\n if (onTouch !== prevProps.onTouch) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onTouch\", onTouch);\n }\n if (onSize !== prevProps.onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n assertSkiaViewApi();\n return SkiaViewApi.makeImageSnapshot(this._nativeId, rect);\n }\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n public redraw() {\n assertSkiaViewApi();\n SkiaViewApi.requestRedraw(this._nativeId);\n }\n\n /**\n * Clear up the dom node when unmounting to release resources.\n */\n componentWillUnmount(): void {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"root\", null);\n }\n\n render() {\n const { mode, debug = false, ...viewProps } = this.props;\n return (\n <NativeSkiaDomView\n collapsable={false}\n nativeID={`${this._nativeId}`}\n mode={mode}\n debug={debug}\n {...viewProps}\n />\n );\n }\n}\n\nconst assertSkiaViewApi = () => {\n if (\n SkiaViewApi === null ||\n SkiaViewApi.setJsiProperty === null ||\n SkiaViewApi.callJsiMethod === null ||\n SkiaViewApi.requestRedraw === null ||\n SkiaViewApi.makeImageSnapshot === null\n ) {\n throw Error(\"Skia View Api was not found.\");\n }\n};\n"],"mappings":";;;;;;;AAAA;;AAIA;;AACA;;AAEA;;AAEA;;;;;;;;AAEA,MAAMA,iBAAkD,GACtDC,kBAAA,CAASC,EAAT,KAAgB,KAAhB,GACIC,mCADJ,GAEI;AACC,IAJP;;AAMO,MAAMC,WAAN,SAA0BC,cAAA,CAAMC,SAAhC,CAA4D;EACjEC,WAAW,CAACC,KAAD,EAA0B;IACnC,MAAMA,KAAN;;IADmC;;IAEnC,KAAKC,SAAL,GAAiBC,kCAAA,CAAiBC,OAAjB,EAAjB;IACA,MAAM;MAAEC,IAAF;MAAQC,OAA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;AACA;;;EACSC,MAAM,GAAG;IACdR,iBAAiB;;IACjBC,gBAAA,CAAYQ,aAAZ,CAA0B,KAAKf,SAA/B;EACD;EAED;AACF;AACA;;;EACEgB,oBAAoB,GAAS;IAC3BV,iBAAiB;;IACjBC,gBAAA,CAAYC,cAAZ,CAA2B,KAAKR,SAAhC,EAA2C,MAA3C,EAAmD,IAAnD;EACD;;EAEDiB,MAAM,GAAG;IACP,MAAM;MAAEC,IAAF;MAAQC,KAAK,GAAG,KAAhB;MAAuB,GAAGC;IAA1B,IAAwC,KAAKrB,KAAnD;IACA,oBACE,6BAAC,iBAAD;MACE,WAAW,EAAE,KADf;MAEE,QAAQ,EAAG,GAAE,KAAKC,SAAU,EAF9B;MAGE,IAAI,EAAEkB,IAHR;MAIE,KAAK,EAAEC;IAJT,GAKMC,SALN,EADF;EASD;;AA9EgE;;;;AAiFnE,MAAMd,iBAAiB,GAAG,MAAM;EAC9B,IACEC,gBAAA,KAAgB,IAAhB,IACAA,gBAAA,CAAYC,cAAZ,KAA+B,IAD/B,IAEAD,gBAAA,CAAYc,aAAZ,KAA8B,IAF9B,IAGAd,gBAAA,CAAYQ,aAAZ,KAA8B,IAH9B,IAIAR,gBAAA,CAAYK,iBAAZ,KAAkC,IALpC,EAME;IACA,MAAMU,KAAK,CAAC,8BAAD,CAAX;EACD;AACF,CAVD"}
@@ -9,8 +9,6 @@ var _skia = require("../skia");
9
9
 
10
10
  var _DrawingContext = require("../dom/types/DrawingContext");
11
11
 
12
- var _Animations = require("../renderer/processors/Animations/Animations");
13
-
14
12
  var _SkiaBaseWebView = require("./SkiaBaseWebView");
15
13
 
16
14
  class SkiaDomView extends _SkiaBaseWebView.SkiaBaseWebView {
@@ -28,18 +26,10 @@ class SkiaDomView extends _SkiaBaseWebView.SkiaBaseWebView {
28
26
  width,
29
27
  height
30
28
  } = this.getSize();
31
-
32
- if ((0, _Animations.isValue)(this.props.onSize)) {
33
- this.props.onSize.current = {
34
- width,
35
- height
36
- };
37
- } else {
38
- this.props.onSize.value = {
39
- width,
40
- height
41
- };
42
- }
29
+ this.props.onSize.value = {
30
+ width,
31
+ height
32
+ };
43
33
  }
44
34
 
45
35
  if (this.props.root) {
@@ -1 +1 @@
1
- {"version":3,"names":["SkiaDomView","SkiaBaseWebView","constructor","props","renderInCanvas","canvas","touches","onTouch","onSize","width","height","getSize","isValue","current","value","root","ctx","JsiDrawingContext","Skia","render"],"sources":["SkiaDomView.web.tsx"],"sourcesContent":["import { Skia } from \"../skia\";\nimport type { SkCanvas } from \"../skia/types\";\nimport { JsiDrawingContext } from \"../dom/types/DrawingContext\";\nimport { isValue } from \"../renderer/processors/Animations/Animations\";\n\nimport { SkiaBaseWebView } from \"./SkiaBaseWebView\";\nimport type { SkiaDomViewProps, TouchInfo } from \"./types\";\n\nexport class SkiaDomView extends SkiaBaseWebView<SkiaDomViewProps> {\n constructor(props: SkiaDomViewProps) {\n super(props);\n }\n\n protected renderInCanvas(canvas: SkCanvas, touches: TouchInfo[]): void {\n if (this.props.onTouch) {\n this.props.onTouch([touches]);\n }\n if (this.props.onSize) {\n const { width, height } = this.getSize();\n if (isValue(this.props.onSize)) {\n this.props.onSize.current = { width, height };\n } else {\n this.props.onSize.value = { width, height };\n }\n }\n if (this.props.root) {\n const ctx = new JsiDrawingContext(Skia, canvas);\n this.props.root.render(ctx);\n }\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AACA;;AAEA;;AAGO,MAAMA,WAAN,SAA0BC,gCAA1B,CAA4D;EACjEC,WAAW,CAACC,KAAD,EAA0B;IACnC,MAAMA,KAAN;EACD;;EAESC,cAAc,CAACC,MAAD,EAAmBC,OAAnB,EAA+C;IACrE,IAAI,KAAKH,KAAL,CAAWI,OAAf,EAAwB;MACtB,KAAKJ,KAAL,CAAWI,OAAX,CAAmB,CAACD,OAAD,CAAnB;IACD;;IACD,IAAI,KAAKH,KAAL,CAAWK,MAAf,EAAuB;MACrB,MAAM;QAAEC,KAAF;QAASC;MAAT,IAAoB,KAAKC,OAAL,EAA1B;;MACA,IAAI,IAAAC,mBAAA,EAAQ,KAAKT,KAAL,CAAWK,MAAnB,CAAJ,EAAgC;QAC9B,KAAKL,KAAL,CAAWK,MAAX,CAAkBK,OAAlB,GAA4B;UAAEJ,KAAF;UAASC;QAAT,CAA5B;MACD,CAFD,MAEO;QACL,KAAKP,KAAL,CAAWK,MAAX,CAAkBM,KAAlB,GAA0B;UAAEL,KAAF;UAASC;QAAT,CAA1B;MACD;IACF;;IACD,IAAI,KAAKP,KAAL,CAAWY,IAAf,EAAqB;MACnB,MAAMC,GAAG,GAAG,IAAIC,iCAAJ,CAAsBC,UAAtB,EAA4Bb,MAA5B,CAAZ;MACA,KAAKF,KAAL,CAAWY,IAAX,CAAgBI,MAAhB,CAAuBH,GAAvB;IACD;EACF;;AArBgE"}
1
+ {"version":3,"names":["SkiaDomView","SkiaBaseWebView","constructor","props","renderInCanvas","canvas","touches","onTouch","onSize","width","height","getSize","value","root","ctx","JsiDrawingContext","Skia","render"],"sources":["SkiaDomView.web.tsx"],"sourcesContent":["import { Skia } from \"../skia\";\nimport type { SkCanvas } from \"../skia/types\";\nimport { JsiDrawingContext } from \"../dom/types/DrawingContext\";\n\nimport { SkiaBaseWebView } from \"./SkiaBaseWebView\";\nimport type { SkiaDomViewProps, TouchInfo } from \"./types\";\n\nexport class SkiaDomView extends SkiaBaseWebView<SkiaDomViewProps> {\n constructor(props: SkiaDomViewProps) {\n super(props);\n }\n\n protected renderInCanvas(canvas: SkCanvas, touches: TouchInfo[]): void {\n if (this.props.onTouch) {\n this.props.onTouch([touches]);\n }\n if (this.props.onSize) {\n const { width, height } = this.getSize();\n this.props.onSize.value = { width, height };\n }\n if (this.props.root) {\n const ctx = new JsiDrawingContext(Skia, canvas);\n this.props.root.render(ctx);\n }\n }\n}\n"],"mappings":";;;;;;;AAAA;;AAEA;;AAEA;;AAGO,MAAMA,WAAN,SAA0BC,gCAA1B,CAA4D;EACjEC,WAAW,CAACC,KAAD,EAA0B;IACnC,MAAMA,KAAN;EACD;;EAESC,cAAc,CAACC,MAAD,EAAmBC,OAAnB,EAA+C;IACrE,IAAI,KAAKH,KAAL,CAAWI,OAAf,EAAwB;MACtB,KAAKJ,KAAL,CAAWI,OAAX,CAAmB,CAACD,OAAD,CAAnB;IACD;;IACD,IAAI,KAAKH,KAAL,CAAWK,MAAf,EAAuB;MACrB,MAAM;QAAEC,KAAF;QAASC;MAAT,IAAoB,KAAKC,OAAL,EAA1B;MACA,KAAKR,KAAL,CAAWK,MAAX,CAAkBI,KAAlB,GAA0B;QAAEH,KAAF;QAASC;MAAT,CAA1B;IACD;;IACD,IAAI,KAAKP,KAAL,CAAWU,IAAf,EAAqB;MACnB,MAAMC,GAAG,GAAG,IAAIC,iCAAJ,CAAsBC,UAAtB,EAA4BX,MAA5B,CAAZ;MACA,KAAKF,KAAL,CAAWU,IAAX,CAAgBI,MAAhB,CAAuBH,GAAvB;IACD;EACF;;AAjBgE"}
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import type { SkRect } from "../skia/types";
3
- import type { SkiaValue } from "../values";
4
3
  import type { SkiaPictureViewProps } from "./types";
5
4
  export declare class SkiaPictureView extends React.Component<SkiaPictureViewProps> {
6
5
  constructor(props: SkiaPictureViewProps);
@@ -17,11 +16,5 @@ export declare class SkiaPictureView extends React.Component<SkiaPictureViewProp
17
16
  * Sends a redraw request to the native SkiaView.
18
17
  */
19
18
  redraw(): void;
20
- /**
21
- * Registers one or move values as a dependant value of the Skia View. The view will
22
- * The view will redraw itself when any of the values change.
23
- * @param values Values to register
24
- */
25
- registerValues(values: SkiaValue<unknown>[]): () => void;
26
19
  render(): React.JSX.Element;
27
20
  }
@@ -11,7 +11,7 @@ var _SkiaPictureViewNativeComponent = _interopRequireDefault(require("../specs/S
11
11
 
12
12
  var _api = require("./api");
13
13
 
14
- var _SkiaView = require("./SkiaView");
14
+ var _SkiaViewNativeId = require("./SkiaViewNativeId");
15
15
 
16
16
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
17
 
@@ -27,7 +27,7 @@ class SkiaPictureView extends _react.default.Component {
27
27
 
28
28
  _defineProperty(this, "_nativeId", void 0);
29
29
 
30
- this._nativeId = _SkiaView.SkiaViewNativeId.current++;
30
+ this._nativeId = _SkiaViewNativeId.SkiaViewNativeId.current++;
31
31
  const {
32
32
  picture,
33
33
  onSize
@@ -89,17 +89,6 @@ class SkiaPictureView extends _react.default.Component {
89
89
 
90
90
  _api.SkiaViewApi.requestRedraw(this._nativeId);
91
91
  }
92
- /**
93
- * Registers one or move values as a dependant value of the Skia View. The view will
94
- * The view will redraw itself when any of the values change.
95
- * @param values Values to register
96
- */
97
-
98
-
99
- registerValues(values) {
100
- assertSkiaViewApi();
101
- return _api.SkiaViewApi.registerValuesInView(this._nativeId, values);
102
- }
103
92
 
104
93
  render() {
105
94
  const {
@@ -120,7 +109,7 @@ class SkiaPictureView extends _react.default.Component {
120
109
  exports.SkiaPictureView = SkiaPictureView;
121
110
 
122
111
  const assertSkiaViewApi = () => {
123
- if (_api.SkiaViewApi === null || _api.SkiaViewApi.setJsiProperty === null || _api.SkiaViewApi.callJsiMethod === null || _api.SkiaViewApi.registerValuesInView === null || _api.SkiaViewApi.requestRedraw === null || _api.SkiaViewApi.makeImageSnapshot === null) {
112
+ if (_api.SkiaViewApi === null || _api.SkiaViewApi.setJsiProperty === null || _api.SkiaViewApi.callJsiMethod === null || _api.SkiaViewApi.requestRedraw === null || _api.SkiaViewApi.makeImageSnapshot === null) {
124
113
  throw Error("Skia View Api was not found.");
125
114
  }
126
115
  };
@@ -1 +1 @@
1
- {"version":3,"names":["NativeSkiaPictureView","SkiaPictureViewNativeComponent","SkiaPictureView","React","Component","constructor","props","_nativeId","SkiaViewNativeId","current","picture","onSize","assertSkiaViewApi","SkiaViewApi","setJsiProperty","nativeId","componentDidUpdate","prevProps","makeImageSnapshot","rect","redraw","requestRedraw","registerValues","values","registerValuesInView","render","mode","debug","viewProps","callJsiMethod","Error"],"sources":["SkiaPictureView.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkRect } from \"../skia/types\";\nimport type { SkiaValue } from \"../values\";\nimport SkiaPictureViewNativeComponent from \"../specs/SkiaPictureViewNativeComponent\";\n\nimport { SkiaViewApi } from \"./api\";\nimport { SkiaViewNativeId } from \"./SkiaView\";\nimport type { SkiaPictureViewProps } from \"./types\";\n\nconst NativeSkiaPictureView = SkiaPictureViewNativeComponent;\n\nexport class SkiaPictureView extends React.Component<SkiaPictureViewProps> {\n constructor(props: SkiaPictureViewProps) {\n super(props);\n this._nativeId = SkiaViewNativeId.current++;\n const { picture, onSize } = props;\n if (picture) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"picture\", picture);\n }\n if (onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n private _nativeId: number;\n\n public get nativeId() {\n return this._nativeId;\n }\n\n componentDidUpdate(prevProps: SkiaPictureViewProps) {\n const { picture, onSize } = this.props;\n if (picture !== prevProps.picture) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"picture\", picture);\n }\n if (onSize !== prevProps.onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n assertSkiaViewApi();\n return SkiaViewApi.makeImageSnapshot(this._nativeId, rect);\n }\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n public redraw() {\n assertSkiaViewApi();\n SkiaViewApi.requestRedraw(this._nativeId);\n }\n\n /**\n * Registers one or move values as a dependant value of the Skia View. The view will\n * The view will redraw itself when any of the values change.\n * @param values Values to register\n */\n public registerValues(values: SkiaValue<unknown>[]): () => void {\n assertSkiaViewApi();\n return SkiaViewApi.registerValuesInView(this._nativeId, values);\n }\n\n render() {\n const { mode, debug = false, ...viewProps } = this.props;\n return (\n <NativeSkiaPictureView\n collapsable={false}\n nativeID={`${this._nativeId}`}\n mode={mode ?? \"default\"}\n debug={debug}\n {...viewProps}\n />\n );\n }\n}\n\nconst assertSkiaViewApi = () => {\n if (\n SkiaViewApi === null ||\n SkiaViewApi.setJsiProperty === null ||\n SkiaViewApi.callJsiMethod === null ||\n SkiaViewApi.registerValuesInView === null ||\n SkiaViewApi.requestRedraw === null ||\n SkiaViewApi.makeImageSnapshot === null\n ) {\n throw Error(\"Skia View Api was not found.\");\n }\n};\n"],"mappings":";;;;;;;AAAA;;AAIA;;AAEA;;AACA;;;;;;;;AAGA,MAAMA,qBAAqB,GAAGC,uCAA9B;;AAEO,MAAMC,eAAN,SAA8BC,cAAA,CAAMC,SAApC,CAAoE;EACzEC,WAAW,CAACC,KAAD,EAA8B;IACvC,MAAMA,KAAN;;IADuC;;IAEvC,KAAKC,SAAL,GAAiBC,0BAAA,CAAiBC,OAAjB,EAAjB;IACA,MAAM;MAAEC,OAAF;MAAWC;IAAX,IAAsBL,KAA5B;;IACA,IAAII,OAAJ,EAAa;MACXE,iBAAiB;;MACjBC,gBAAA,CAAYC,cAAZ,CAA2B,KAAKP,SAAhC,EAA2C,SAA3C,EAAsDG,OAAtD;IACD;;IACD,IAAIC,MAAJ,EAAY;MACVC,iBAAiB;;MACjBC,gBAAA,CAAYC,cAAZ,CAA2B,KAAKP,SAAhC,EAA2C,QAA3C,EAAqDI,MAArD;IACD;EACF;;EAIkB,IAARI,QAAQ,GAAG;IACpB,OAAO,KAAKR,SAAZ;EACD;;EAEDS,kBAAkB,CAACC,SAAD,EAAkC;IAClD,MAAM;MAAEP,OAAF;MAAWC;IAAX,IAAsB,KAAKL,KAAjC;;IACA,IAAII,OAAO,KAAKO,SAAS,CAACP,OAA1B,EAAmC;MACjCE,iBAAiB;;MACjBC,gBAAA,CAAYC,cAAZ,CAA2B,KAAKP,SAAhC,EA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,MAAMY,KAAK,CAAC,8BAAD,CAAX;EACD;AACF,CAXD"}
1
+ {"version":3,"names":["NativeSkiaPictureView","SkiaPictureViewNativeComponent","SkiaPictureView","React","Component","constructor","props","_nativeId","SkiaViewNativeId","current","picture","onSize","assertSkiaViewApi","SkiaViewApi","setJsiProperty","nativeId","componentDidUpdate","prevProps","makeImageSnapshot","rect","redraw","requestRedraw","render","mode","debug","viewProps","callJsiMethod","Error"],"sources":["SkiaPictureView.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { SkRect } from \"../skia/types\";\nimport SkiaPictureViewNativeComponent from \"../specs/SkiaPictureViewNativeComponent\";\n\nimport { SkiaViewApi } from \"./api\";\nimport type { SkiaPictureViewProps } from \"./types\";\nimport { SkiaViewNativeId } from \"./SkiaViewNativeId\";\n\nconst NativeSkiaPictureView = SkiaPictureViewNativeComponent;\n\nexport class SkiaPictureView extends React.Component<SkiaPictureViewProps> {\n constructor(props: SkiaPictureViewProps) {\n super(props);\n this._nativeId = SkiaViewNativeId.current++;\n const { picture, onSize } = props;\n if (picture) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"picture\", picture);\n }\n if (onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n private _nativeId: number;\n\n public get nativeId() {\n return this._nativeId;\n }\n\n componentDidUpdate(prevProps: SkiaPictureViewProps) {\n const { picture, onSize } = this.props;\n if (picture !== prevProps.picture) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"picture\", picture);\n }\n if (onSize !== prevProps.onSize) {\n assertSkiaViewApi();\n SkiaViewApi.setJsiProperty(this._nativeId, \"onSize\", onSize);\n }\n }\n\n /**\n * Creates a snapshot from the canvas in the surface\n * @param rect Rect to use as bounds. Optional.\n * @returns An Image object.\n */\n public makeImageSnapshot(rect?: SkRect) {\n assertSkiaViewApi();\n return SkiaViewApi.makeImageSnapshot(this._nativeId, rect);\n }\n\n /**\n * Sends a redraw request to the native SkiaView.\n */\n public redraw() {\n assertSkiaViewApi();\n SkiaViewApi.requestRedraw(this._nativeId);\n }\n\n render() {\n const { mode, debug = false, ...viewProps } = this.props;\n return (\n <NativeSkiaPictureView\n collapsable={false}\n nativeID={`${this._nativeId}`}\n mode={mode ?? \"default\"}\n debug={debug}\n {...viewProps}\n />\n );\n }\n}\n\nconst assertSkiaViewApi = () => {\n if (\n SkiaViewApi === null ||\n SkiaViewApi.setJsiProperty === null ||\n SkiaViewApi.callJsiMethod === null ||\n SkiaViewApi.requestRedraw === null ||\n SkiaViewApi.makeImageSnapshot === null\n ) {\n throw Error(\"Skia View Api was not found.\");\n }\n};\n"],"mappings":";;;;;;;AAAA;;AAGA;;AAEA;;AAEA;;;;;;;;AAEA,MAAMA,qBAAqB,GAAGC,uCAA9B;;AAEO,MAAMC,eAAN,SAA8BC,cAAA,CAAMC,SAApC,CAAoE;EACzEC,WAAW,CAACC,KAAD,EAA8B;IACvC,MAAMA,KAAN;;IADuC;;IAEvC,KAAKC,SAAL,GAAiBC,kCAAA,CAAiBC,OAAjB,EAAjB;IACA,MAAM;MAAEC,OAAF;MAAWC;IAAX,IAAsBL,KAA5B;;IACA,IAAII,OAAJ,EAAa;MACXE,iBAAiB;;MACjBC,gBAAA,CAAYC,cAAZ,CAA2B,KAAKP,SAAhC,EAA2C,SAA3C,EAAsDG,OAAtD;IACD;;IACD,IAAIC,MAAJ,EAAY;MACVC,iBAAiB;;MACjBC,gBAAA,CAAYC,cAAZ,CAA2B,KAAKP,SAAhC,EAA2C,QAA3C,EAAqDI,MAArD;IACD;EACF;;EAIkB,IAARI,QAAQ,GAAG;IACpB,OAAO,KAAKR,SAAZ;EACD;;EAEDS,kBAAkB,CAACC,SAAD,EAAkC;IAClD,MAAM;MAAEP,OAAF;MAAWC;IAAX,IAAsB,KAAKL,KAAjC;;IACA,IAAII,OAAO,KAAKO,SAAS,CAACP,OAA1B,EAAmC;MACjCE,iBAAiB;;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defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SkiaViewNativeId = void 0;
7
+ const SkiaViewNativeId = {
8
+ current: 1000
9
+ };
10
+ exports.SkiaViewNativeId = SkiaViewNativeId;
11
+ //# sourceMappingURL=SkiaViewNativeId.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SkiaViewNativeId","current"],"sources":["SkiaViewNativeId.ts"],"sourcesContent":["export const SkiaViewNativeId = { current: 1000 };\n"],"mappings":";;;;;;AAAO,MAAMA,gBAAgB,GAAG;EAAEC,OAAO,EAAE;AAAX,CAAzB"}
@@ -1,6 +1,4 @@
1
- export * from "./SkiaView";
2
1
  export * from "./SkiaPictureView";
3
2
  export * from "./SkiaDomView";
4
3
  export * from "./types";
5
- export * from "./useDrawCallback";
6
4
  export * from "./useTouchHandler";
@@ -4,19 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var _SkiaView = require("./SkiaView");
8
-
9
- Object.keys(_SkiaView).forEach(function (key) {
10
- if (key === "default" || key === "__esModule") return;
11
- if (key in exports && exports[key] === _SkiaView[key]) return;
12
- Object.defineProperty(exports, key, {
13
- enumerable: true,
14
- get: function () {
15
- return _SkiaView[key];
16
- }
17
- });
18
- });
19
-
20
7
  var _SkiaPictureView = require("./SkiaPictureView");
21
8
 
22
9
  Object.keys(_SkiaPictureView).forEach(function (key) {
@@ -56,19 +43,6 @@ Object.keys(_types).forEach(function (key) {
56
43
  });
57
44
  });
58
45
 
59
- var _useDrawCallback = require("./useDrawCallback");
60
-
61
- Object.keys(_useDrawCallback).forEach(function (key) {
62
- if (key === "default" || key === "__esModule") return;
63
- if (key in exports && exports[key] === _useDrawCallback[key]) return;
64
- Object.defineProperty(exports, key, {
65
- enumerable: true,
66
- get: function () {
67
- return _useDrawCallback[key];
68
- }
69
- });
70
- });
71
-
72
46
  var _useTouchHandler = require("./useTouchHandler");
73
47
 
74
48
  Object.keys(_useTouchHandler).forEach(function (key) {
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SkiaView\";\nexport * from \"./SkiaPictureView\";\nexport * from \"./SkiaDomView\";\nexport * from \"./types\";\nexport * from \"./useDrawCallback\";\nexport * from \"./useTouchHandler\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SkiaPictureView\";\nexport * from \"./SkiaDomView\";\nexport * from \"./types\";\nexport * from \"./useTouchHandler\";\n"],"mappings":";;;;;;AAAA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;;AACA;;AAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA"}
@@ -1,7 +1,6 @@
1
1
  import type { ViewProps } from "react-native";
2
2
  import type { GroupProps, RenderNode } from "../dom/types";
3
- import type { SkCanvas, SkImage, SkPicture, SkRect, SkSize } from "../skia/types";
4
- import type { SkiaMutableValue, SkiaValue } from "../values";
3
+ import type { SkImage, SkPicture, SkRect, SkSize } from "../skia/types";
5
4
  import type { SharedValueType } from "../renderer/processors/Animations/Animations";
6
5
  export type DrawMode = "continuous" | "default";
7
6
  export type NativeSkiaViewProps = ViewProps & {
@@ -38,7 +37,6 @@ export type TouchHandlers = {
38
37
  onEnd?: (touchInfo: ExtendedTouchInfo) => void;
39
38
  };
40
39
  export type TouchHandler = (touchInfo: Array<Array<TouchInfo>>) => void;
41
- export type RNSkiaDrawCallback = (canvas: SkCanvas, info: DrawingInfo) => void;
42
40
  /**
43
41
  * Listener interface for value changes
44
42
  */
@@ -49,7 +47,6 @@ export interface ValueListener {
49
47
  export interface ISkiaViewApi {
50
48
  setJsiProperty: <T>(nativeId: number, name: string, value: T) => void;
51
49
  callJsiMethod: <T extends Array<unknown>>(nativeId: number, name: string, ...args: T) => void;
52
- registerValuesInView: (nativeId: number, values: SkiaValue<unknown>[]) => () => void;
53
50
  requestRedraw: (nativeId: number) => void;
54
51
  makeImageSnapshot: (nativeId: number, rect?: SkRect) => SkImage;
55
52
  }
@@ -71,17 +68,7 @@ export interface SkiaBaseViewProps extends ViewProps {
71
68
  * Pass an animated value to the onSize property to get updates when
72
69
  * the Skia view is resized.
73
70
  */
74
- onSize?: SkiaMutableValue<SkSize> | SharedValueType<SkSize>;
75
- }
76
- export interface SkiaDrawViewProps extends SkiaBaseViewProps {
77
- /**
78
- * Draw callback. Will be called whenever the view is invalidated and
79
- * needs to redraw. This is either caused by a change in a react
80
- * property, a touch event, or a call to redraw. If the view is in
81
- * continuous mode the callback will be called 60 frames per second
82
- * by the native view.
83
- */
84
- onDraw?: RNSkiaDrawCallback;
71
+ onSize?: SharedValueType<SkSize>;
85
72
  }
86
73
  export interface SkiaPictureViewProps extends SkiaBaseViewProps {
87
74
  picture?: SkPicture;
@@ -1 +1 @@
1
- {"version":3,"names":["TouchType"],"sources":["types.ts"],"sourcesContent":["import type { ViewProps } from \"react-native\";\n\nimport type { GroupProps, RenderNode } from \"../dom/types\";\nimport type {\n SkCanvas,\n SkImage,\n SkPicture,\n SkRect,\n SkSize,\n} from \"../skia/types\";\nimport type { SkiaMutableValue, SkiaValue } from \"../values\";\nimport type { SharedValueType } from \"../renderer/processors/Animations/Animations\";\n\nexport type DrawMode = \"continuous\" | \"default\";\n\nexport type NativeSkiaViewProps = ViewProps & {\n mode?: DrawMode;\n debug?: boolean;\n};\n\nexport enum TouchType {\n Start,\n Active,\n End,\n Cancelled,\n}\n\nexport interface TouchInfo {\n x: number;\n y: number;\n force: number;\n type: TouchType;\n id: number;\n timestamp: number;\n}\n\nexport interface DrawingInfo {\n width: number;\n height: number;\n timestamp: number;\n touches: Array<Array<TouchInfo>>;\n}\n\nexport type ExtendedTouchInfo = TouchInfo & {\n // points per second\n velocityX: number;\n velocityY: number;\n};\n\nexport type TouchHandlers = {\n onStart?: (touchInfo: TouchInfo) => void;\n onActive?: (touchInfo: ExtendedTouchInfo) => void;\n onEnd?: (touchInfo: ExtendedTouchInfo) => void;\n};\n\nexport type TouchHandler = (touchInfo: Array<Array<TouchInfo>>) => void;\n\nexport type RNSkiaDrawCallback = (canvas: SkCanvas, info: DrawingInfo) => void;\n\n/**\n * Listener interface for value changes\n */\nexport interface ValueListener {\n addListener: (callback: () => void) => number;\n removeListener: (id: number) => void;\n}\n\nexport interface ISkiaViewApi {\n setJsiProperty: <T>(nativeId: number, name: string, value: T) => void;\n callJsiMethod: <T extends Array<unknown>>(\n nativeId: number,\n name: string,\n ...args: T\n ) => void;\n registerValuesInView: (\n nativeId: number,\n values: SkiaValue<unknown>[]\n ) => () => void;\n requestRedraw: (nativeId: number) => void;\n makeImageSnapshot: (nativeId: number, rect?: SkRect) => SkImage;\n}\n\nexport interface SkiaBaseViewProps extends ViewProps {\n /**\n * Sets the drawing mode for the skia view. There are two drawing\n * modes, \"continuous\" and \"default\", where the continuous mode will\n * continuously redraw the view, and the default mode will only\n * redraw when any of the regular react properties are changed like\n * sizes and margins.\n */\n mode?: DrawMode;\n /**\n * When set to true the view will display information about the\n * average time it takes to render.\n */\n debug?: boolean;\n /**\n * Pass an animated value to the onSize property to get updates when\n * the Skia view is resized.\n */\n onSize?: SkiaMutableValue<SkSize> | SharedValueType<SkSize>;\n}\n\nexport interface SkiaDrawViewProps extends SkiaBaseViewProps {\n /**\n * Draw callback. Will be called whenever the view is invalidated and\n * needs to redraw. This is either caused by a change in a react\n * property, a touch event, or a call to redraw. If the view is in\n * continuous mode the callback will be called 60 frames per second\n * by the native view.\n */\n onDraw?: RNSkiaDrawCallback;\n}\n\nexport interface SkiaPictureViewProps extends SkiaBaseViewProps {\n picture?: SkPicture;\n}\n\nexport interface SkiaDomViewProps extends SkiaBaseViewProps {\n root?: RenderNode<GroupProps>;\n onTouch?: TouchHandler;\n}\n"],"mappings":";;;;;;IAoBYA,S;;;WAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;AAuCZ;AACA;AACA"}
1
+ {"version":3,"names":["TouchType"],"sources":["types.ts"],"sourcesContent":["import type { ViewProps } from \"react-native\";\n\nimport type { GroupProps, RenderNode } from \"../dom/types\";\nimport type { SkImage, SkPicture, SkRect, SkSize } from \"../skia/types\";\nimport type { SharedValueType } from \"../renderer/processors/Animations/Animations\";\n\nexport type DrawMode = \"continuous\" | \"default\";\n\nexport type NativeSkiaViewProps = ViewProps & {\n mode?: DrawMode;\n debug?: boolean;\n};\n\nexport enum TouchType {\n Start,\n Active,\n End,\n Cancelled,\n}\n\nexport interface TouchInfo {\n x: number;\n y: number;\n force: number;\n type: TouchType;\n id: number;\n timestamp: number;\n}\n\nexport interface DrawingInfo {\n width: number;\n height: number;\n timestamp: number;\n touches: Array<Array<TouchInfo>>;\n}\n\nexport type ExtendedTouchInfo = TouchInfo & {\n // points per second\n velocityX: number;\n velocityY: number;\n};\n\nexport type TouchHandlers = {\n onStart?: (touchInfo: TouchInfo) => void;\n onActive?: (touchInfo: ExtendedTouchInfo) => void;\n onEnd?: (touchInfo: ExtendedTouchInfo) => void;\n};\n\nexport type TouchHandler = (touchInfo: Array<Array<TouchInfo>>) => void;\n\n/**\n * Listener interface for value changes\n */\nexport interface ValueListener {\n addListener: (callback: () => void) => number;\n removeListener: (id: number) => void;\n}\n\nexport interface ISkiaViewApi {\n setJsiProperty: <T>(nativeId: number, name: string, value: T) => void;\n callJsiMethod: <T extends Array<unknown>>(\n nativeId: number,\n name: string,\n ...args: T\n ) => void;\n requestRedraw: (nativeId: number) => void;\n makeImageSnapshot: (nativeId: number, rect?: SkRect) => SkImage;\n}\n\nexport interface SkiaBaseViewProps extends ViewProps {\n /**\n * Sets the drawing mode for the skia view. There are two drawing\n * modes, \"continuous\" and \"default\", where the continuous mode will\n * continuously redraw the view, and the default mode will only\n * redraw when any of the regular react properties are changed like\n * sizes and margins.\n */\n mode?: DrawMode;\n /**\n * When set to true the view will display information about the\n * average time it takes to render.\n */\n debug?: boolean;\n /**\n * Pass an animated value to the onSize property to get updates when\n * the Skia view is resized.\n */\n onSize?: SharedValueType<SkSize>;\n}\n\nexport interface SkiaPictureViewProps extends SkiaBaseViewProps {\n picture?: SkPicture;\n}\n\nexport interface SkiaDomViewProps extends SkiaBaseViewProps {\n root?: RenderNode<GroupProps>;\n onTouch?: TouchHandler;\n}\n"],"mappings":";;;;;;IAaYA,S;;;WAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;EAAAA,S,CAAAA,S;GAAAA,S,yBAAAA,S;AAqCZ;AACA;AACA"}
@@ -1,4 +1 @@
1
- export * from "./timing";
2
- export * from "./spring";
3
- export * from "./decay";
4
1
  export * from "./functions";
@@ -1,5 +1,2 @@
1
- export * from "./timing";
2
- export * from "./spring";
3
- export * from "./decay";
4
1
  export * from "./functions";
5
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./timing\";\nexport * from \"./spring\";\nexport * from \"./decay\";\nexport * from \"./functions\";\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,UAAd;AACA,cAAc,SAAd;AACA,cAAc,aAAd"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./functions\";\n"],"mappings":"AAAA,cAAc,aAAd"}
@@ -1,4 +1,4 @@
1
- import type { PathProps, SkDOM, GroupProps, ImageProps, BlurImageFilterProps, MatrixColorFilterProps, CircleProps, BlurMaskFilterProps, LinearGradientProps, PaintProps, ShaderProps, ImageShaderProps, CustomDrawingNodeProps, LineProps, OvalProps, PatchProps, PointsProps, RectProps, RoundedRectProps, VerticesProps, TextProps, DiffRectProps, OffsetImageFilterProps, BlendColorFilterProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, FractalNoiseProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, DrawingNodeProps, BoxProps, BoxShadowProps, ChildrenProps } from "../types";
1
+ import type { PathProps, SkDOM, GroupProps, ImageProps, BlurImageFilterProps, MatrixColorFilterProps, CircleProps, BlurMaskFilterProps, LinearGradientProps, PaintProps, ShaderProps, ImageShaderProps, LineProps, OvalProps, PatchProps, PointsProps, RectProps, RoundedRectProps, VerticesProps, TextProps, DiffRectProps, OffsetImageFilterProps, BlendColorFilterProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, FractalNoiseProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, DrawingNodeProps, BoxProps, BoxShadowProps, ChildrenProps } from "../types";
2
2
  import type { BlendImageFilterProps, BlendProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, MorphologyImageFilterProps, RuntimeShaderImageFilterProps } from "../types/ImageFilters";
3
3
  import type { CornerPathEffectProps, DashPathEffectProps, DiscretePathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps } from "../types/PathEffects";
4
4
  import type { ParagraphProps } from "../types/Paragraph";
@@ -13,7 +13,6 @@ export declare class JsiSkDOM implements SkDOM {
13
13
  Image(props: ImageProps): import("../types").RenderNode<ImageProps>;
14
14
  Circle(props: CircleProps): import("../types").RenderNode<CircleProps>;
15
15
  Path(props: PathProps): import("../types").RenderNode<PathProps>;
16
- CustomDrawing(props: CustomDrawingNodeProps): import("../types").RenderNode<CustomDrawingNodeProps>;
17
16
  Line(props: LineProps): import("../types").RenderNode<LineProps>;
18
17
  Oval(props: OvalProps): import("../types").RenderNode<OvalProps>;
19
18
  Patch(props: PatchProps): import("../types").RenderNode<PatchProps>;
@@ -1,5 +1,5 @@
1
1
  import { NATIVE_DOM } from "../../renderer/HostComponents";
2
- import { FillNode, ImageNode, CircleNode, PathNode, LineNode, PatchNode, PointsNode, RectNode, RRectNode, VerticesNode, TextNode, OvalNode, CustomDrawingNode, TextPathNode, TextBlobNode, GlyphsNode, DiffRectNode, PictureNode, ImageSVGNode, BackdropFilterNode, BoxNode, BoxShadowNode } from "./drawings";
2
+ import { FillNode, ImageNode, CircleNode, PathNode, LineNode, PatchNode, PointsNode, RectNode, RRectNode, VerticesNode, TextNode, OvalNode, TextPathNode, TextBlobNode, GlyphsNode, DiffRectNode, PictureNode, ImageSVGNode, BackdropFilterNode, BoxNode, BoxShadowNode } from "./drawings";
3
3
  import { BlendImageFilterNode, BlurImageFilterNode, BlurMaskFilterNode, DisplacementMapImageFilterNode, DropShadowImageFilterNode, OffsetImageFilterNode, RuntimeShaderImageFilterNode, CornerPathEffectNode, DiscretePathEffectNode, DashPathEffectNode, Path1DPathEffectNode, Path2DPathEffectNode, SumPathEffectNode, Line2DPathEffectNode, BlendNode } from "./paint";
4
4
  import { MatrixColorFilterNode, LumaColorFilterNode, LinearToSRGBGammaColorFilterNode, SRGBToLinearGammaColorFilterNode, BlendColorFilterNode, LerpColorFilterNode } from "./paint/ColorFilters";
5
5
  import { LinearGradientNode, ShaderNode, ImageShaderNode, TwoPointConicalGradientNode, TurbulenceNode, SweepGradientNode, RadialGradientNode, FractalNoiseNode, ColorNode } from "./paint/Shaders";
@@ -42,12 +42,6 @@ export class JsiSkDOM {
42
42
  return NATIVE_DOM ? global.SkiaDomApi.PathNode(props !== null && props !== void 0 ? props : {}) : new PathNode(this.ctx, props);
43
43
  }
44
44
 
45
- CustomDrawing(props) {
46
- console.warn( // eslint-disable-next-line max-len
47
- "The <Drawing /> component is deprecated and will be removed in the next release. For custom drawings, please sure the <Picture /> component: https://shopify.github.io/react-native-skia/docs/shapes/pictures/");
48
- return NATIVE_DOM ? global.SkiaDomApi.CustomDrawingNode(props !== null && props !== void 0 ? props : {}) : new CustomDrawingNode(this.ctx, props);
49
- }
50
-
51
45
  Line(props) {
52
46
  return NATIVE_DOM ? global.SkiaDomApi.LineNode(props !== null && props !== void 0 ? props : {}) : new LineNode(this.ctx, props);
53
47
  }