@shopify/react-native-skia 0.1.229 → 0.1.231

Sign up to get free protection for your applications and to get access to all the features.
Files changed (686) hide show
  1. package/android/CMakeLists.txt +1 -0
  2. package/android/cpp/jni/JniLoad.cpp +0 -2
  3. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +2 -2
  4. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
  5. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
  6. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
  7. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
  8. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
  9. package/cpp/api/JsiSkAnimatedImage.h +1 -1
  10. package/cpp/api/JsiSkApi.h +4 -1
  11. package/cpp/api/JsiSkDataFactory.h +6 -6
  12. package/cpp/api/JsiSkImage.h +4 -4
  13. package/cpp/api/JsiSkParagraph.h +15 -0
  14. package/cpp/api/JsiSkParagraphBuilder.h +3 -32
  15. package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
  16. package/cpp/api/JsiSkPath.h +1 -1
  17. package/cpp/api/JsiSkRRect.h +30 -3
  18. package/cpp/api/third_party/base64.cpp +153 -0
  19. package/cpp/api/third_party/base64.h +50 -0
  20. package/cpp/jsi/JsiPromises.h +1 -1
  21. package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
  22. package/cpp/rnskia/RNSkManager.cpp +0 -6
  23. package/cpp/rnskia/RNSkView.h +2 -91
  24. package/cpp/rnskia/dom/JsiDomApi.h +0 -9
  25. package/cpp/rnskia/dom/props/FontProp.h +4 -1
  26. package/cpp/rnskia/dom/props/RRectProp.h +50 -0
  27. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
  28. package/lib/commonjs/animation/index.d.ts +0 -3
  29. package/lib/commonjs/animation/index.js +0 -39
  30. package/lib/commonjs/animation/index.js.map +1 -1
  31. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +3 -3
  32. package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
  33. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  34. package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
  35. package/lib/commonjs/dom/nodes/Node.js +0 -5
  36. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  37. package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +1 -1
  38. package/lib/commonjs/dom/nodes/drawings/RRectNode.d.ts +3 -3
  39. package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
  40. package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
  41. package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
  42. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  43. package/lib/commonjs/dom/types/Common.d.ts +2 -2
  44. package/lib/commonjs/dom/types/Common.js.map +1 -1
  45. package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
  46. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  47. package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
  48. package/lib/commonjs/dom/types/NodeType.js +0 -1
  49. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  50. package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
  51. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  52. package/lib/commonjs/headless/index.d.ts +3 -1
  53. package/lib/commonjs/headless/index.js +12 -6
  54. package/lib/commonjs/headless/index.js.map +1 -1
  55. package/lib/commonjs/index.d.ts +0 -1
  56. package/lib/commonjs/index.js +0 -14
  57. package/lib/commonjs/index.js.map +1 -1
  58. package/lib/commonjs/mock/index.js +0 -4
  59. package/lib/commonjs/mock/index.js.map +1 -1
  60. package/lib/commonjs/renderer/Canvas.js +2 -21
  61. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  62. package/lib/commonjs/renderer/Container.d.ts +1 -3
  63. package/lib/commonjs/renderer/Container.js +4 -6
  64. package/lib/commonjs/renderer/Container.js.map +1 -1
  65. package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
  66. package/lib/commonjs/renderer/HostComponents.js +0 -3
  67. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  68. package/lib/commonjs/renderer/HostConfig.js +2 -23
  69. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  70. package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
  71. package/lib/commonjs/renderer/Reconciler.js +3 -18
  72. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  73. package/lib/commonjs/renderer/components/index.d.ts +0 -1
  74. package/lib/commonjs/renderer/components/index.js +0 -13
  75. package/lib/commonjs/renderer/components/index.js.map +1 -1
  76. package/lib/commonjs/renderer/index.d.ts +0 -1
  77. package/lib/commonjs/renderer/index.js +0 -13
  78. package/lib/commonjs/renderer/index.js.map +1 -1
  79. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
  80. package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
  81. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  82. package/lib/commonjs/skia/types/Canvas.d.ts +4 -4
  83. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  84. package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
  85. package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
  86. package/lib/commonjs/skia/types/Path/Path.d.ts +2 -2
  87. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  88. package/lib/commonjs/skia/types/RRect.d.ts +9 -0
  89. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  90. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +4 -4
  91. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  92. package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
  93. package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
  94. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  95. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  96. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  97. package/lib/commonjs/skia/web/JsiSkPath.d.ts +2 -2
  98. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  99. package/lib/commonjs/skia/web/JsiSkRRect.d.ts +2 -2
  100. package/lib/commonjs/skia/web/JsiSkRRect.js +4 -0
  101. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  102. package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
  103. package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
  104. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  105. package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
  106. package/lib/commonjs/views/SkiaDomView.js +3 -14
  107. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  108. package/lib/commonjs/views/SkiaDomView.web.js +4 -14
  109. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  110. package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
  111. package/lib/commonjs/views/SkiaPictureView.js +3 -14
  112. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  113. package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
  114. package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
  115. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
  116. package/lib/commonjs/views/index.d.ts +0 -2
  117. package/lib/commonjs/views/index.js +0 -26
  118. package/lib/commonjs/views/index.js.map +1 -1
  119. package/lib/commonjs/views/types.d.ts +2 -15
  120. package/lib/commonjs/views/types.js.map +1 -1
  121. package/lib/module/animation/index.d.ts +0 -3
  122. package/lib/module/animation/index.js +0 -3
  123. package/lib/module/animation/index.js.map +1 -1
  124. package/lib/module/dom/nodes/JsiSkDOM.d.ts +3 -3
  125. package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
  126. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  127. package/lib/module/dom/nodes/Node.d.ts +0 -3
  128. package/lib/module/dom/nodes/Node.js +0 -5
  129. package/lib/module/dom/nodes/Node.js.map +1 -1
  130. package/lib/module/dom/nodes/datatypes/Rect.d.ts +1 -1
  131. package/lib/module/dom/nodes/drawings/RRectNode.d.ts +3 -3
  132. package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
  133. package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
  134. package/lib/module/dom/nodes/drawings/index.js +0 -1
  135. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  136. package/lib/module/dom/types/Common.d.ts +2 -2
  137. package/lib/module/dom/types/Common.js.map +1 -1
  138. package/lib/module/dom/types/Drawings.d.ts +0 -4
  139. package/lib/module/dom/types/Drawings.js.map +1 -1
  140. package/lib/module/dom/types/NodeType.d.ts +0 -1
  141. package/lib/module/dom/types/NodeType.js +0 -1
  142. package/lib/module/dom/types/NodeType.js.map +1 -1
  143. package/lib/module/dom/types/SkDOM.d.ts +1 -2
  144. package/lib/module/dom/types/SkDOM.js.map +1 -1
  145. package/lib/module/headless/index.d.ts +3 -1
  146. package/lib/module/headless/index.js +5 -3
  147. package/lib/module/headless/index.js.map +1 -1
  148. package/lib/module/index.d.ts +0 -1
  149. package/lib/module/index.js +0 -1
  150. package/lib/module/index.js.map +1 -1
  151. package/lib/module/mock/index.js +1 -4
  152. package/lib/module/mock/index.js.map +1 -1
  153. package/lib/module/renderer/Canvas.js +2 -20
  154. package/lib/module/renderer/Canvas.js.map +1 -1
  155. package/lib/module/renderer/Container.d.ts +1 -3
  156. package/lib/module/renderer/Container.js +4 -6
  157. package/lib/module/renderer/Container.js.map +1 -1
  158. package/lib/module/renderer/HostComponents.d.ts +1 -6
  159. package/lib/module/renderer/HostComponents.js +0 -3
  160. package/lib/module/renderer/HostComponents.js.map +1 -1
  161. package/lib/module/renderer/HostConfig.js +3 -23
  162. package/lib/module/renderer/HostConfig.js.map +1 -1
  163. package/lib/module/renderer/Reconciler.d.ts +1 -5
  164. package/lib/module/renderer/Reconciler.js +3 -16
  165. package/lib/module/renderer/Reconciler.js.map +1 -1
  166. package/lib/module/renderer/components/index.d.ts +0 -1
  167. package/lib/module/renderer/components/index.js +0 -1
  168. package/lib/module/renderer/components/index.js.map +1 -1
  169. package/lib/module/renderer/index.d.ts +0 -1
  170. package/lib/module/renderer/index.js +0 -1
  171. package/lib/module/renderer/index.js.map +1 -1
  172. package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
  173. package/lib/module/renderer/processors/Animations/Animations.js +0 -28
  174. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  175. package/lib/module/skia/types/Canvas.d.ts +4 -4
  176. package/lib/module/skia/types/Canvas.js.map +1 -1
  177. package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
  178. package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
  179. package/lib/module/skia/types/Path/Path.d.ts +2 -2
  180. package/lib/module/skia/types/Path/Path.js.map +1 -1
  181. package/lib/module/skia/types/RRect.d.ts +9 -0
  182. package/lib/module/skia/types/RRect.js.map +1 -1
  183. package/lib/module/skia/web/JsiSkCanvas.d.ts +4 -4
  184. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  185. package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
  186. package/lib/module/skia/web/JsiSkParagraph.js +12 -0
  187. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  188. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  189. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  190. package/lib/module/skia/web/JsiSkPath.d.ts +2 -2
  191. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  192. package/lib/module/skia/web/JsiSkRRect.d.ts +2 -2
  193. package/lib/module/skia/web/JsiSkRRect.js +4 -0
  194. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  195. package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
  196. package/lib/module/views/SkiaBaseWebView.js +0 -17
  197. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  198. package/lib/module/views/SkiaDomView.d.ts +0 -7
  199. package/lib/module/views/SkiaDomView.js +2 -13
  200. package/lib/module/views/SkiaDomView.js.map +1 -1
  201. package/lib/module/views/SkiaDomView.web.js +4 -13
  202. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  203. package/lib/module/views/SkiaPictureView.d.ts +0 -7
  204. package/lib/module/views/SkiaPictureView.js +2 -13
  205. package/lib/module/views/SkiaPictureView.js.map +1 -1
  206. package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
  207. package/lib/module/views/SkiaViewNativeId.js +4 -0
  208. package/lib/module/views/SkiaViewNativeId.js.map +1 -0
  209. package/lib/module/views/index.d.ts +0 -2
  210. package/lib/module/views/index.js +0 -2
  211. package/lib/module/views/index.js.map +1 -1
  212. package/lib/module/views/types.d.ts +2 -15
  213. package/lib/module/views/types.js.map +1 -1
  214. package/lib/typescript/src/animation/index.d.ts +0 -3
  215. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +3 -3
  216. package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
  217. package/lib/typescript/src/dom/nodes/datatypes/Rect.d.ts +1 -1
  218. package/lib/typescript/src/dom/nodes/drawings/RRectNode.d.ts +3 -3
  219. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
  220. package/lib/typescript/src/dom/types/Common.d.ts +2 -2
  221. package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
  222. package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
  223. package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
  224. package/lib/typescript/src/headless/index.d.ts +3 -1
  225. package/lib/typescript/src/index.d.ts +0 -1
  226. package/lib/typescript/src/renderer/Container.d.ts +1 -3
  227. package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
  228. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
  229. package/lib/typescript/src/renderer/components/index.d.ts +0 -1
  230. package/lib/typescript/src/renderer/index.d.ts +0 -1
  231. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
  232. package/lib/typescript/src/skia/types/Canvas.d.ts +4 -4
  233. package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
  234. package/lib/typescript/src/skia/types/Path/Path.d.ts +2 -2
  235. package/lib/typescript/src/skia/types/RRect.d.ts +9 -0
  236. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +4 -4
  237. package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
  238. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +2 -2
  239. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +2 -2
  240. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
  241. package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
  242. package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
  243. package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
  244. package/lib/typescript/src/views/index.d.ts +0 -2
  245. package/lib/typescript/src/views/types.d.ts +2 -15
  246. package/libs/android/arm64-v8a/libskia.a +0 -0
  247. package/libs/android/armeabi-v7a/libskia.a +0 -0
  248. package/libs/android/x86/libskia.a +0 -0
  249. package/libs/android/x86_64/libskia.a +0 -0
  250. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  251. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  252. package/libs/ios/libskottie.xcframework/Info.plist +5 -5
  253. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  254. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  255. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  256. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  257. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  258. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  259. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  260. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  261. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  262. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  263. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  264. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  265. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  266. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  267. package/package.json +1 -1
  268. package/src/animation/index.ts +0 -3
  269. package/src/dom/nodes/JsiSkDOM.ts +0 -12
  270. package/src/dom/nodes/Node.ts +0 -5
  271. package/src/dom/nodes/drawings/RRectNode.ts +2 -2
  272. package/src/dom/nodes/drawings/index.ts +0 -1
  273. package/src/dom/types/Common.ts +2 -1
  274. package/src/dom/types/Drawings.ts +0 -5
  275. package/src/dom/types/NodeType.ts +0 -1
  276. package/src/dom/types/SkDOM.ts +0 -4
  277. package/src/headless/index.ts +7 -3
  278. package/src/index.ts +0 -1
  279. package/src/mock/index.ts +0 -3
  280. package/src/renderer/Canvas.tsx +3 -21
  281. package/src/renderer/Container.tsx +1 -4
  282. package/src/renderer/HostComponents.ts +0 -13
  283. package/src/renderer/HostConfig.ts +3 -24
  284. package/src/renderer/Reconciler.tsx +1 -19
  285. package/src/renderer/components/index.ts +0 -1
  286. package/src/renderer/index.ts +0 -1
  287. package/src/renderer/processors/Animations/Animations.ts +1 -51
  288. package/src/skia/types/Canvas.ts +4 -4
  289. package/src/skia/types/Paragraph/Paragraph.ts +25 -0
  290. package/src/skia/types/Path/Path.ts +2 -2
  291. package/src/skia/types/RRect.ts +11 -0
  292. package/src/skia/web/JsiSkCanvas.ts +4 -4
  293. package/src/skia/web/JsiSkParagraph.ts +11 -0
  294. package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
  295. package/src/skia/web/JsiSkPath.ts +2 -2
  296. package/src/skia/web/JsiSkRRect.ts +23 -2
  297. package/src/views/SkiaBaseWebView.tsx +0 -19
  298. package/src/views/SkiaDomView.tsx +1 -13
  299. package/src/views/SkiaDomView.web.tsx +1 -6
  300. package/src/views/SkiaPictureView.tsx +1 -13
  301. package/src/views/SkiaViewNativeId.ts +1 -0
  302. package/src/views/index.ts +0 -2
  303. package/src/views/types.ts +2 -26
  304. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
  305. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
  306. package/cpp/rnskia/RNSkAnimation.h +0 -65
  307. package/cpp/rnskia/RNSkValueApi.h +0 -72
  308. package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
  309. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
  310. package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
  311. package/cpp/rnskia/values/RNSkClockValue.h +0 -140
  312. package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
  313. package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
  314. package/cpp/rnskia/values/RNSkValue.h +0 -116
  315. package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
  316. package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
  317. package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
  318. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
  319. package/lib/commonjs/animation/decay/decay.d.ts +0 -2
  320. package/lib/commonjs/animation/decay/decay.js +0 -42
  321. package/lib/commonjs/animation/decay/decay.js.map +0 -1
  322. package/lib/commonjs/animation/decay/index.d.ts +0 -1
  323. package/lib/commonjs/animation/decay/index.js +0 -14
  324. package/lib/commonjs/animation/decay/index.js.map +0 -1
  325. package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
  326. package/lib/commonjs/animation/decay/runDecay.js +0 -48
  327. package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
  328. package/lib/commonjs/animation/decay/types.d.ts +0 -21
  329. package/lib/commonjs/animation/decay/types.js +0 -6
  330. package/lib/commonjs/animation/decay/types.js.map +0 -1
  331. package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
  332. package/lib/commonjs/animation/spring/Spring.js +0 -77
  333. package/lib/commonjs/animation/spring/Spring.js.map +0 -1
  334. package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
  335. package/lib/commonjs/animation/spring/functions/index.js +0 -14
  336. package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
  337. package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
  338. package/lib/commonjs/animation/spring/functions/spring.js +0 -94
  339. package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
  340. package/lib/commonjs/animation/spring/index.d.ts +0 -3
  341. package/lib/commonjs/animation/spring/index.js +0 -30
  342. package/lib/commonjs/animation/spring/index.js.map +0 -1
  343. package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
  344. package/lib/commonjs/animation/spring/runSpring.js +0 -35
  345. package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
  346. package/lib/commonjs/animation/spring/types.d.ts +0 -6
  347. package/lib/commonjs/animation/spring/types.js +0 -2
  348. package/lib/commonjs/animation/spring/types.js.map +0 -1
  349. package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
  350. package/lib/commonjs/animation/spring/useSpring.js +0 -27
  351. package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
  352. package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
  353. package/lib/commonjs/animation/timing/Easing.js +0 -108
  354. package/lib/commonjs/animation/timing/Easing.js.map +0 -1
  355. package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
  356. package/lib/commonjs/animation/timing/createTiming.js +0 -55
  357. package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
  358. package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
  359. package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
  360. package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
  361. package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
  362. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
  363. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
  364. package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
  365. package/lib/commonjs/animation/timing/functions/index.js +0 -54
  366. package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
  367. package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
  368. package/lib/commonjs/animation/timing/functions/timing.js +0 -50
  369. package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
  370. package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
  371. package/lib/commonjs/animation/timing/functions/types.js +0 -2
  372. package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
  373. package/lib/commonjs/animation/timing/index.d.ts +0 -4
  374. package/lib/commonjs/animation/timing/index.js +0 -38
  375. package/lib/commonjs/animation/timing/index.js.map +0 -1
  376. package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
  377. package/lib/commonjs/animation/timing/runTiming.js +0 -36
  378. package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
  379. package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
  380. package/lib/commonjs/animation/timing/useLoop.js +0 -25
  381. package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
  382. package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
  383. package/lib/commonjs/animation/timing/useTiming.js +0 -67
  384. package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
  385. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  386. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
  387. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  388. package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
  389. package/lib/commonjs/renderer/DependencyManager.js +0 -185
  390. package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
  391. package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
  392. package/lib/commonjs/renderer/components/Drawing.js +0 -22
  393. package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
  394. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  395. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
  396. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  397. package/lib/commonjs/values/api.d.ts +0 -26
  398. package/lib/commonjs/values/api.js +0 -55
  399. package/lib/commonjs/values/api.js.map +0 -1
  400. package/lib/commonjs/values/api.web.d.ts +0 -2
  401. package/lib/commonjs/values/api.web.js +0 -18
  402. package/lib/commonjs/values/api.web.js.map +0 -1
  403. package/lib/commonjs/values/hooks/index.d.ts +0 -4
  404. package/lib/commonjs/values/hooks/index.js +0 -58
  405. package/lib/commonjs/values/hooks/index.js.map +0 -1
  406. package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
  407. package/lib/commonjs/values/hooks/useClockValue.js +0 -30
  408. package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
  409. package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
  410. package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
  411. package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
  412. package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
  413. package/lib/commonjs/values/hooks/useValue.js +0 -26
  414. package/lib/commonjs/values/hooks/useValue.js.map +0 -1
  415. package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
  416. package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
  417. package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
  418. package/lib/commonjs/values/index.d.ts +0 -4
  419. package/lib/commonjs/values/index.js +0 -58
  420. package/lib/commonjs/values/index.js.map +0 -1
  421. package/lib/commonjs/values/selector.d.ts +0 -14
  422. package/lib/commonjs/values/selector.js +0 -24
  423. package/lib/commonjs/values/selector.js.map +0 -1
  424. package/lib/commonjs/values/types.d.ts +0 -63
  425. package/lib/commonjs/values/types.js +0 -2
  426. package/lib/commonjs/values/types.js.map +0 -1
  427. package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
  428. package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
  429. package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
  430. package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
  431. package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
  432. package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
  433. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
  434. package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
  435. package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
  436. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
  437. package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
  438. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
  439. package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
  440. package/lib/commonjs/values/web/RNSkValue.js +0 -73
  441. package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
  442. package/lib/commonjs/values/web/api.d.ts +0 -2
  443. package/lib/commonjs/values/web/api.js +0 -31
  444. package/lib/commonjs/values/web/api.js.map +0 -1
  445. package/lib/commonjs/values/web/index.d.ts +0 -1
  446. package/lib/commonjs/values/web/index.js +0 -19
  447. package/lib/commonjs/values/web/index.js.map +0 -1
  448. package/lib/commonjs/views/SkiaView.d.ts +0 -35
  449. package/lib/commonjs/views/SkiaView.js +0 -139
  450. package/lib/commonjs/views/SkiaView.js.map +0 -1
  451. package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
  452. package/lib/commonjs/views/SkiaView.web.js +0 -30
  453. package/lib/commonjs/views/SkiaView.web.js.map +0 -1
  454. package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
  455. package/lib/commonjs/views/useDrawCallback.js +0 -23
  456. package/lib/commonjs/views/useDrawCallback.js.map +0 -1
  457. package/lib/module/animation/decay/decay.d.ts +0 -2
  458. package/lib/module/animation/decay/decay.js +0 -33
  459. package/lib/module/animation/decay/decay.js.map +0 -1
  460. package/lib/module/animation/decay/index.d.ts +0 -1
  461. package/lib/module/animation/decay/index.js +0 -2
  462. package/lib/module/animation/decay/index.js.map +0 -1
  463. package/lib/module/animation/decay/runDecay.d.ts +0 -10
  464. package/lib/module/animation/decay/runDecay.js +0 -38
  465. package/lib/module/animation/decay/runDecay.js.map +0 -1
  466. package/lib/module/animation/decay/types.d.ts +0 -21
  467. package/lib/module/animation/decay/types.js +0 -2
  468. package/lib/module/animation/decay/types.js.map +0 -1
  469. package/lib/module/animation/spring/Spring.d.ts +0 -65
  470. package/lib/module/animation/spring/Spring.js +0 -69
  471. package/lib/module/animation/spring/Spring.js.map +0 -1
  472. package/lib/module/animation/spring/functions/index.d.ts +0 -1
  473. package/lib/module/animation/spring/functions/index.js +0 -2
  474. package/lib/module/animation/spring/functions/index.js.map +0 -1
  475. package/lib/module/animation/spring/functions/spring.d.ts +0 -10
  476. package/lib/module/animation/spring/functions/spring.js +0 -85
  477. package/lib/module/animation/spring/functions/spring.js.map +0 -1
  478. package/lib/module/animation/spring/index.d.ts +0 -3
  479. package/lib/module/animation/spring/index.js +0 -4
  480. package/lib/module/animation/spring/index.js.map +0 -1
  481. package/lib/module/animation/spring/runSpring.d.ts +0 -19
  482. package/lib/module/animation/spring/runSpring.js +0 -24
  483. package/lib/module/animation/spring/runSpring.js.map +0 -1
  484. package/lib/module/animation/spring/types.d.ts +0 -6
  485. package/lib/module/animation/spring/types.js +0 -2
  486. package/lib/module/animation/spring/types.js.map +0 -1
  487. package/lib/module/animation/spring/useSpring.d.ts +0 -13
  488. package/lib/module/animation/spring/useSpring.js +0 -16
  489. package/lib/module/animation/spring/useSpring.js.map +0 -1
  490. package/lib/module/animation/timing/Easing.d.ts +0 -19
  491. package/lib/module/animation/timing/Easing.js +0 -98
  492. package/lib/module/animation/timing/Easing.js.map +0 -1
  493. package/lib/module/animation/timing/createTiming.d.ts +0 -17
  494. package/lib/module/animation/timing/createTiming.js +0 -49
  495. package/lib/module/animation/timing/createTiming.js.map +0 -1
  496. package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
  497. package/lib/module/animation/timing/functions/bezier.js +0 -141
  498. package/lib/module/animation/timing/functions/bezier.js.map +0 -1
  499. package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
  500. package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
  501. package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
  502. package/lib/module/animation/timing/functions/index.d.ts +0 -4
  503. package/lib/module/animation/timing/functions/index.js +0 -5
  504. package/lib/module/animation/timing/functions/index.js.map +0 -1
  505. package/lib/module/animation/timing/functions/timing.d.ts +0 -17
  506. package/lib/module/animation/timing/functions/timing.js +0 -41
  507. package/lib/module/animation/timing/functions/timing.js.map +0 -1
  508. package/lib/module/animation/timing/functions/types.d.ts +0 -7
  509. package/lib/module/animation/timing/functions/types.js +0 -2
  510. package/lib/module/animation/timing/functions/types.js.map +0 -1
  511. package/lib/module/animation/timing/index.d.ts +0 -4
  512. package/lib/module/animation/timing/index.js +0 -5
  513. package/lib/module/animation/timing/index.js.map +0 -1
  514. package/lib/module/animation/timing/runTiming.d.ts +0 -19
  515. package/lib/module/animation/timing/runTiming.js +0 -26
  516. package/lib/module/animation/timing/runTiming.js.map +0 -1
  517. package/lib/module/animation/timing/useLoop.d.ts +0 -11
  518. package/lib/module/animation/timing/useLoop.js +0 -16
  519. package/lib/module/animation/timing/useLoop.js.map +0 -1
  520. package/lib/module/animation/timing/useTiming.d.ts +0 -13
  521. package/lib/module/animation/timing/useTiming.js +0 -57
  522. package/lib/module/animation/timing/useTiming.js.map +0 -1
  523. package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  524. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
  525. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  526. package/lib/module/renderer/DependencyManager.d.ts +0 -46
  527. package/lib/module/renderer/DependencyManager.js +0 -174
  528. package/lib/module/renderer/DependencyManager.js.map +0 -1
  529. package/lib/module/renderer/components/Drawing.d.ts +0 -8
  530. package/lib/module/renderer/components/Drawing.js +0 -11
  531. package/lib/module/renderer/components/Drawing.js.map +0 -1
  532. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  533. package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
  534. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  535. package/lib/module/values/api.d.ts +0 -26
  536. package/lib/module/values/api.js +0 -48
  537. package/lib/module/values/api.js.map +0 -1
  538. package/lib/module/values/api.web.d.ts +0 -2
  539. package/lib/module/values/api.web.js +0 -7
  540. package/lib/module/values/api.web.js.map +0 -1
  541. package/lib/module/values/hooks/index.d.ts +0 -4
  542. package/lib/module/values/hooks/index.js +0 -5
  543. package/lib/module/values/hooks/index.js.map +0 -1
  544. package/lib/module/values/hooks/useClockValue.d.ts +0 -9
  545. package/lib/module/values/hooks/useClockValue.js +0 -20
  546. package/lib/module/values/hooks/useClockValue.js.map +0 -1
  547. package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
  548. package/lib/module/values/hooks/useComputedValue.js +0 -21
  549. package/lib/module/values/hooks/useComputedValue.js.map +0 -1
  550. package/lib/module/values/hooks/useValue.d.ts +0 -10
  551. package/lib/module/values/hooks/useValue.js +0 -16
  552. package/lib/module/values/hooks/useValue.js.map +0 -1
  553. package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
  554. package/lib/module/values/hooks/useValueEffect.js +0 -16
  555. package/lib/module/values/hooks/useValueEffect.js.map +0 -1
  556. package/lib/module/values/index.d.ts +0 -4
  557. package/lib/module/values/index.js +0 -5
  558. package/lib/module/values/index.js.map +0 -1
  559. package/lib/module/values/selector.d.ts +0 -14
  560. package/lib/module/values/selector.js +0 -15
  561. package/lib/module/values/selector.js.map +0 -1
  562. package/lib/module/values/types.d.ts +0 -63
  563. package/lib/module/values/types.js +0 -2
  564. package/lib/module/values/types.js.map +0 -1
  565. package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
  566. package/lib/module/values/web/RNSkAnimation.js +0 -36
  567. package/lib/module/values/web/RNSkAnimation.js.map +0 -1
  568. package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
  569. package/lib/module/values/web/RNSkClockValue.js +0 -65
  570. package/lib/module/values/web/RNSkClockValue.js.map +0 -1
  571. package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
  572. package/lib/module/values/web/RNSkComputedValue.js +0 -49
  573. package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
  574. package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
  575. package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
  576. package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
  577. package/lib/module/values/web/RNSkValue.d.ts +0 -14
  578. package/lib/module/values/web/RNSkValue.js +0 -63
  579. package/lib/module/values/web/RNSkValue.js.map +0 -1
  580. package/lib/module/values/web/api.d.ts +0 -2
  581. package/lib/module/values/web/api.js +0 -19
  582. package/lib/module/values/web/api.js.map +0 -1
  583. package/lib/module/values/web/index.d.ts +0 -1
  584. package/lib/module/values/web/index.js +0 -2
  585. package/lib/module/values/web/index.js.map +0 -1
  586. package/lib/module/views/SkiaView.d.ts +0 -35
  587. package/lib/module/views/SkiaView.js +0 -119
  588. package/lib/module/views/SkiaView.js.map +0 -1
  589. package/lib/module/views/SkiaView.web.d.ts +0 -7
  590. package/lib/module/views/SkiaView.web.js +0 -20
  591. package/lib/module/views/SkiaView.web.js.map +0 -1
  592. package/lib/module/views/useDrawCallback.d.ts +0 -8
  593. package/lib/module/views/useDrawCallback.js +0 -14
  594. package/lib/module/views/useDrawCallback.js.map +0 -1
  595. package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
  596. package/lib/typescript/src/animation/decay/index.d.ts +0 -1
  597. package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
  598. package/lib/typescript/src/animation/decay/types.d.ts +0 -21
  599. package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
  600. package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
  601. package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
  602. package/lib/typescript/src/animation/spring/index.d.ts +0 -3
  603. package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
  604. package/lib/typescript/src/animation/spring/types.d.ts +0 -6
  605. package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
  606. package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
  607. package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
  608. package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
  609. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
  610. package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
  611. package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
  612. package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
  613. package/lib/typescript/src/animation/timing/index.d.ts +0 -4
  614. package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
  615. package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
  616. package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
  617. package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  618. package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
  619. package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
  620. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  621. package/lib/typescript/src/values/api.d.ts +0 -26
  622. package/lib/typescript/src/values/api.web.d.ts +0 -2
  623. package/lib/typescript/src/values/hooks/index.d.ts +0 -4
  624. package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
  625. package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
  626. package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
  627. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
  628. package/lib/typescript/src/values/index.d.ts +0 -4
  629. package/lib/typescript/src/values/selector.d.ts +0 -14
  630. package/lib/typescript/src/values/types.d.ts +0 -63
  631. package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
  632. package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
  633. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
  634. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
  635. package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
  636. package/lib/typescript/src/values/web/api.d.ts +0 -2
  637. package/lib/typescript/src/values/web/index.d.ts +0 -1
  638. package/lib/typescript/src/views/SkiaView.d.ts +0 -35
  639. package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
  640. package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
  641. package/src/animation/decay/decay.ts +0 -35
  642. package/src/animation/decay/index.ts +0 -1
  643. package/src/animation/decay/runDecay.ts +0 -40
  644. package/src/animation/decay/types.ts +0 -24
  645. package/src/animation/spring/Spring.ts +0 -61
  646. package/src/animation/spring/functions/index.ts +0 -1
  647. package/src/animation/spring/functions/spring.ts +0 -86
  648. package/src/animation/spring/index.ts +0 -3
  649. package/src/animation/spring/runSpring.ts +0 -40
  650. package/src/animation/spring/types.ts +0 -6
  651. package/src/animation/spring/useSpring.ts +0 -31
  652. package/src/animation/timing/Easing.ts +0 -102
  653. package/src/animation/timing/createTiming.ts +0 -62
  654. package/src/animation/timing/functions/bezier.ts +0 -165
  655. package/src/animation/timing/functions/getResolvedParams.ts +0 -50
  656. package/src/animation/timing/functions/index.ts +0 -4
  657. package/src/animation/timing/functions/timing.ts +0 -44
  658. package/src/animation/timing/functions/types.ts +0 -8
  659. package/src/animation/timing/index.ts +0 -4
  660. package/src/animation/timing/runTiming.ts +0 -36
  661. package/src/animation/timing/useLoop.ts +0 -21
  662. package/src/animation/timing/useTiming.ts +0 -71
  663. package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
  664. package/src/renderer/DependencyManager.tsx +0 -196
  665. package/src/renderer/components/Drawing.tsx +0 -12
  666. package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
  667. package/src/values/api.ts +0 -61
  668. package/src/values/api.web.ts +0 -5
  669. package/src/values/hooks/index.ts +0 -4
  670. package/src/values/hooks/useClockValue.ts +0 -21
  671. package/src/values/hooks/useComputedValue.ts +0 -24
  672. package/src/values/hooks/useValue.ts +0 -17
  673. package/src/values/hooks/useValueEffect.ts +0 -18
  674. package/src/values/index.ts +0 -4
  675. package/src/values/selector.ts +0 -24
  676. package/src/values/types.ts +0 -73
  677. package/src/values/web/RNSkAnimation.ts +0 -33
  678. package/src/values/web/RNSkClockValue.ts +0 -58
  679. package/src/values/web/RNSkComputedValue.ts +0 -49
  680. package/src/values/web/RNSkReadonlyValue.ts +0 -38
  681. package/src/values/web/RNSkValue.ts +0 -57
  682. package/src/values/web/api.ts +0 -33
  683. package/src/values/web/index.ts +0 -1
  684. package/src/views/SkiaView.tsx +0 -111
  685. package/src/views/SkiaView.web.tsx +0 -22
  686. package/src/views/useDrawCallback.ts +0 -19
@@ -5,7 +5,7 @@ import type { SkPath } from "./Path";
5
5
  import type { SkImage, MipmapMode, FilterMode, ImageInfo } from "./Image";
6
6
  import type { SkSVG } from "./SVG";
7
7
  import type { SkColor } from "./Color";
8
- import type { SkRRect } from "./RRect";
8
+ import type { InputRRect } from "./RRect";
9
9
  import type { BlendMode } from "./Paint/BlendMode";
10
10
  import type { SkPoint, PointMode } from "./Point";
11
11
  import type { InputMatrix } from "./Matrix";
@@ -278,7 +278,7 @@ export interface SkCanvas {
278
278
  * @param rrect
279
279
  * @param paint
280
280
  */
281
- drawRRect(rrect: SkRRect, paint: SkPaint): void;
281
+ drawRRect(rrect: InputRRect, paint: SkPaint): void;
282
282
 
283
283
  /**
284
284
  * Draws RRect outer and inner using clip, Matrix, and Paint paint.
@@ -287,7 +287,7 @@ export interface SkCanvas {
287
287
  * @param inner
288
288
  * @param paint
289
289
  */
290
- drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint): void;
290
+ drawDRRect(outer: InputRRect, inner: InputRRect, paint: SkPaint): void;
291
291
 
292
292
  /**
293
293
  * Draws an oval bounded by the given rectangle using the current clip, current matrix,
@@ -479,7 +479,7 @@ export interface SkCanvas {
479
479
  * @param op
480
480
  * @param doAntiAlias
481
481
  */
482
- clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean): void;
482
+ clipRRect(rrect: InputRRect, op: ClipOp, doAntiAlias: boolean): void;
483
483
 
484
484
  /**
485
485
  * Replaces current matrix with m premultiplied with the existing matrix.
@@ -32,6 +32,31 @@ export interface SkParagraph extends SkJSIInstance<"Paragraph"> {
32
32
  * method to have been called first.
33
33
  */
34
34
  getMaxWidth(): number;
35
+ /**
36
+ * Returns the minimum intrinsic width of the paragraph.
37
+ * The minimum intrinsic width is the width beyond which increasing the width of the paragraph
38
+ * does not decrease the height. This is effectively the width at which the paragraph
39
+ * can no longer wrap lines and is forced to overflow.
40
+ * This method requires the layout method to have been called first.
41
+ * @returns {number} The minimum intrinsic width of the paragraph.
42
+ */
43
+ getMinIntrinsicWidth(): number;
44
+ /**
45
+ * Returns the maximum intrinsic width of the paragraph.
46
+ * The maximum intrinsic width is the width at which the paragraph can layout its content without line breaks,
47
+ * meaning it's the width of the widest line or the widest word if the widest line is shorter than that.
48
+ * This width represents the ideal width for the paragraph to display all content in a single line without overflow.
49
+ * This method requires the layout method to have been called first.
50
+ * @returns {number} The maximum intrinsic width of the paragraph.
51
+ */
52
+ getMaxIntrinsicWidth(): number;
53
+
54
+ /**
55
+ * Returns the width of the longest line in the paragraph.
56
+ * This method requires the layout method to have been called first.
57
+ */
58
+ getLongestLine(): number;
59
+
35
60
  /**
36
61
  * Returns the index of the glyph at the given position. This method requires
37
62
  * the layout method to have been called first.
@@ -1,6 +1,6 @@
1
1
  import type { SkRect } from "../Rect";
2
2
  import type { SkPoint } from "../Point";
3
- import type { SkRRect } from "../RRect";
3
+ import type { InputRRect } from "../RRect";
4
4
  import type { StrokeJoin, StrokeCap } from "../Paint";
5
5
  import type { InputMatrix, SkMatrix } from "../Matrix";
6
6
  import type { SkJSIInstance } from "../JsiInstance";
@@ -439,7 +439,7 @@ export interface SkPath extends SkJSIInstance<"Path"> {
439
439
  * @param rrect
440
440
  * @param isCCW
441
441
  */
442
- addRRect(rrect: SkRRect, isCCW?: boolean): SkPath;
442
+ addRRect(rrect: InputRRect, isCCW?: boolean): SkPath;
443
443
 
444
444
  /** Appends src to SkPath, transformed by matrix. Transformed curves may have
445
445
  different verbs, SkPoint, and conic weights.
@@ -1,3 +1,4 @@
1
+ import type { SkPoint } from "./Point";
1
2
  import type { SkRect } from "./Rect";
2
3
 
3
4
  export interface SkRRect {
@@ -6,6 +7,16 @@ export interface SkRRect {
6
7
  readonly ry: number;
7
8
  }
8
9
 
10
+ export interface NonUniformRRect {
11
+ readonly rect: SkRect;
12
+ readonly topLeft: SkPoint;
13
+ readonly topRight: SkPoint;
14
+ readonly bottomRight: SkPoint;
15
+ readonly bottomLeft: SkPoint;
16
+ }
17
+
18
+ export type InputRRect = SkRRect | NonUniformRRect;
19
+
9
20
  // We have an issue to check property existence on JSI backed instances
10
21
  export const isRRect = (def: SkRect | SkRRect): def is SkRRect =>
11
22
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -19,7 +19,7 @@ import type {
19
19
  SkPicture,
20
20
  SkPoint,
21
21
  SkRect,
22
- SkRRect,
22
+ InputRRect,
23
23
  SkSVG,
24
24
  SkTextBlob,
25
25
  SkVertices,
@@ -235,14 +235,14 @@ export class JsiSkCanvas
235
235
  );
236
236
  }
237
237
 
238
- drawRRect(rrect: SkRRect, paint: SkPaint) {
238
+ drawRRect(rrect: InputRRect, paint: SkPaint) {
239
239
  this.ref.drawRRect(
240
240
  JsiSkRRect.fromValue(this.CanvasKit, rrect),
241
241
  JsiSkPaint.fromValue(paint)
242
242
  );
243
243
  }
244
244
 
245
- drawDRRect(outer: SkRRect, inner: SkRRect, paint: SkPaint) {
245
+ drawDRRect(outer: InputRRect, inner: InputRRect, paint: SkPaint) {
246
246
  this.ref.drawDRRect(
247
247
  JsiSkRRect.fromValue(this.CanvasKit, outer),
248
248
  JsiSkRRect.fromValue(this.CanvasKit, inner),
@@ -367,7 +367,7 @@ export class JsiSkCanvas
367
367
  );
368
368
  }
369
369
 
370
- clipRRect(rrect: SkRRect, op: ClipOp, doAntiAlias: boolean) {
370
+ clipRRect(rrect: InputRRect, op: ClipOp, doAntiAlias: boolean) {
371
371
  this.ref.clipRRect(
372
372
  JsiSkRRect.fromValue(this.CanvasKit, rrect),
373
373
  getEnum(this.CanvasKit.PathOp, op),
@@ -12,6 +12,17 @@ export class JsiSkParagraph
12
12
  constructor(CanvasKit: CanvasKit, ref: Paragraph) {
13
13
  super(CanvasKit, ref, "Paragraph");
14
14
  }
15
+ getMinIntrinsicWidth(): number {
16
+ return this.ref.getMinIntrinsicWidth();
17
+ }
18
+
19
+ getMaxIntrinsicWidth(): number {
20
+ return this.ref.getMaxIntrinsicWidth();
21
+ }
22
+
23
+ getLongestLine(): number {
24
+ return this.ref.getLongestLine();
25
+ }
15
26
 
16
27
  layout(width: number): void {
17
28
  this.ref.layout(width);
@@ -9,7 +9,7 @@ import type {
9
9
  import { Host } from "./Host";
10
10
  import { JsiSkParagraphBuilder } from "./JsiSkParagraphBuilder";
11
11
  import { JsiSkParagraphStyle } from "./JsiSkParagraphStyle";
12
- import { JsiSkTypeface } from "./JsiSkTypeface";
12
+ import { JsiSkTypefaceFontProvider } from "./JsiSkTypefaceFontProvider";
13
13
 
14
14
  export class JsiSkParagraphBuilderFactory
15
15
  extends Host
@@ -31,11 +31,17 @@ export class JsiSkParagraphBuilderFactory
31
31
  "SkTypefaceFontProvider is required on React Native Web."
32
32
  );
33
33
  }
34
+ const fontCollection = this.CanvasKit.FontCollection.Make();
35
+ fontCollection.setDefaultFontManager(
36
+ JsiSkTypefaceFontProvider.fromValue(typefaceProvider)
37
+ );
38
+ fontCollection.enableFontFallback();
39
+
34
40
  return new JsiSkParagraphBuilder(
35
41
  this.CanvasKit,
36
- this.CanvasKit.ParagraphBuilder.MakeFromFontProvider(
42
+ this.CanvasKit.ParagraphBuilder.MakeFromFontCollection(
37
43
  style,
38
- JsiSkTypeface.fromValue(typefaceProvider)
44
+ fontCollection
39
45
  )
40
46
  );
41
47
  }
@@ -9,7 +9,7 @@ import type {
9
9
  SkPath,
10
10
  SkPoint,
11
11
  SkRect,
12
- SkRRect,
12
+ InputRRect,
13
13
  StrokeOpts,
14
14
  } from "../types";
15
15
 
@@ -285,7 +285,7 @@ export class JsiSkPath extends HostObject<Path, "Path"> implements SkPath {
285
285
  return this;
286
286
  }
287
287
 
288
- addRRect(rrect: SkRRect, isCCW?: boolean) {
288
+ addRRect(rrect: InputRRect, isCCW?: boolean) {
289
289
  this.ref.addRRect(JsiSkRRect.fromValue(this.CanvasKit, rrect), isCCW);
290
290
  return this;
291
291
  }
@@ -1,6 +1,6 @@
1
1
  import type { CanvasKit, RRect } from "canvaskit-wasm";
2
2
 
3
- import type { SkRect, SkRRect } from "../types";
3
+ import type { InputRRect, SkRect, SkRRect } from "../types";
4
4
 
5
5
  import { BaseHostObject } from "./Host";
6
6
  import { JsiSkRect } from "./JsiSkRect";
@@ -13,10 +13,31 @@ export class JsiSkRRect
13
13
  // Float32Array
14
14
  };
15
15
 
16
- static fromValue(CanvasKit: CanvasKit, rect: SkRRect) {
16
+ static fromValue(CanvasKit: CanvasKit, rect: InputRRect) {
17
17
  if (rect instanceof JsiSkRect) {
18
18
  return rect.ref;
19
19
  }
20
+ if (
21
+ "topLeft" in rect &&
22
+ "topRight" in rect &&
23
+ "bottomRight" in rect &&
24
+ "bottomLeft" in rect
25
+ ) {
26
+ return Float32Array.of(
27
+ rect.rect.x,
28
+ rect.rect.y,
29
+ rect.rect.x + rect.rect.width,
30
+ rect.rect.y + rect.rect.height,
31
+ rect.topLeft.x,
32
+ rect.topLeft.y,
33
+ rect.topRight.x,
34
+ rect.topRight.y,
35
+ rect.bottomRight.x,
36
+ rect.bottomRight.y,
37
+ rect.bottomLeft.x,
38
+ rect.bottomLeft.y
39
+ );
40
+ }
20
41
  return CanvasKit.RRectXY(
21
42
  JsiSkRect.fromValue(CanvasKit, rect.rect),
22
43
  rect.rx,
@@ -4,7 +4,6 @@ import type { PointerEvent } from "react";
4
4
  import type { LayoutChangeEvent } from "react-native";
5
5
 
6
6
  import type { SkRect, SkCanvas } from "../skia/types";
7
- import type { SkiaValue } from "../values";
8
7
  import { JsiSkSurface } from "../skia/web/JsiSkSurface";
9
8
  import { Platform } from "../Platform";
10
9
 
@@ -148,24 +147,6 @@ export abstract class SkiaBaseWebView<
148
147
  this.tick();
149
148
  }
150
149
 
151
- /**
152
- * Registers one or move values as a dependant value of the Skia View. The view will
153
- * The view will redraw itself when any of the values change.
154
- * @param values Values to register
155
- */
156
- public registerValues(_values: SkiaValue<unknown>[]) {
157
- // Unsubscribe from dependency values
158
- this.unsubscribeAll();
159
- // Register redraw dependencies on values
160
- _values.forEach((v) => {
161
- this._unsubscriptions.push(
162
- v.addListener(() => {
163
- this.redraw();
164
- })
165
- );
166
- });
167
- }
168
-
169
150
  private handleTouchEvent(evt: PointerEvent, touchType: TouchType) {
170
151
  this._touches.push({
171
152
  id: evt.pointerId,
@@ -2,13 +2,12 @@ import React from "react";
2
2
  import type { HostComponent } from "react-native";
3
3
 
4
4
  import type { SkRect } from "../skia/types";
5
- import type { SkiaValue } from "../values";
6
5
  import { Platform } from "../Platform";
7
6
  import SkiaDomViewNativeComponent from "../specs/SkiaDomViewNativeComponent";
8
7
 
9
8
  import { SkiaViewApi } from "./api";
10
- import { SkiaViewNativeId } from "./SkiaView";
11
9
  import type { SkiaDomViewProps } from "./types";
10
+ import { SkiaViewNativeId } from "./SkiaViewNativeId";
12
11
 
13
12
  const NativeSkiaDomView: HostComponent<SkiaDomViewProps> =
14
13
  Platform.OS !== "web"
@@ -75,16 +74,6 @@ export class SkiaDomView extends React.Component<SkiaDomViewProps> {
75
74
  SkiaViewApi.requestRedraw(this._nativeId);
76
75
  }
77
76
 
78
- /**
79
- * Registers one or move values as a dependant value of the Skia View. The view will
80
- * The view will redraw itself when any of the values change.
81
- * @param values Values to register
82
- */
83
- public registerValues(values: SkiaValue<unknown>[]): () => void {
84
- assertSkiaViewApi();
85
- return SkiaViewApi.registerValuesInView(this._nativeId, values);
86
- }
87
-
88
77
  /**
89
78
  * Clear up the dom node when unmounting to release resources.
90
79
  */
@@ -112,7 +101,6 @@ const assertSkiaViewApi = () => {
112
101
  SkiaViewApi === null ||
113
102
  SkiaViewApi.setJsiProperty === null ||
114
103
  SkiaViewApi.callJsiMethod === null ||
115
- SkiaViewApi.registerValuesInView === null ||
116
104
  SkiaViewApi.requestRedraw === null ||
117
105
  SkiaViewApi.makeImageSnapshot === null
118
106
  ) {
@@ -1,7 +1,6 @@
1
1
  import { Skia } from "../skia";
2
2
  import type { SkCanvas } from "../skia/types";
3
3
  import { JsiDrawingContext } from "../dom/types/DrawingContext";
4
- import { isValue } from "../renderer/processors/Animations/Animations";
5
4
 
6
5
  import { SkiaBaseWebView } from "./SkiaBaseWebView";
7
6
  import type { SkiaDomViewProps, TouchInfo } from "./types";
@@ -17,11 +16,7 @@ export class SkiaDomView extends SkiaBaseWebView<SkiaDomViewProps> {
17
16
  }
18
17
  if (this.props.onSize) {
19
18
  const { width, height } = this.getSize();
20
- if (isValue(this.props.onSize)) {
21
- this.props.onSize.current = { width, height };
22
- } else {
23
- this.props.onSize.value = { width, height };
24
- }
19
+ this.props.onSize.value = { width, height };
25
20
  }
26
21
  if (this.props.root) {
27
22
  const ctx = new JsiDrawingContext(Skia, canvas);
@@ -1,12 +1,11 @@
1
1
  import React from "react";
2
2
 
3
3
  import type { SkRect } from "../skia/types";
4
- import type { SkiaValue } from "../values";
5
4
  import SkiaPictureViewNativeComponent from "../specs/SkiaPictureViewNativeComponent";
6
5
 
7
6
  import { SkiaViewApi } from "./api";
8
- import { SkiaViewNativeId } from "./SkiaView";
9
7
  import type { SkiaPictureViewProps } from "./types";
8
+ import { SkiaViewNativeId } from "./SkiaViewNativeId";
10
9
 
11
10
  const NativeSkiaPictureView = SkiaPictureViewNativeComponent;
12
11
 
@@ -61,16 +60,6 @@ export class SkiaPictureView extends React.Component<SkiaPictureViewProps> {
61
60
  SkiaViewApi.requestRedraw(this._nativeId);
62
61
  }
63
62
 
64
- /**
65
- * Registers one or move values as a dependant value of the Skia View. The view will
66
- * The view will redraw itself when any of the values change.
67
- * @param values Values to register
68
- */
69
- public registerValues(values: SkiaValue<unknown>[]): () => void {
70
- assertSkiaViewApi();
71
- return SkiaViewApi.registerValuesInView(this._nativeId, values);
72
- }
73
-
74
63
  render() {
75
64
  const { mode, debug = false, ...viewProps } = this.props;
76
65
  return (
@@ -90,7 +79,6 @@ const assertSkiaViewApi = () => {
90
79
  SkiaViewApi === null ||
91
80
  SkiaViewApi.setJsiProperty === null ||
92
81
  SkiaViewApi.callJsiMethod === null ||
93
- SkiaViewApi.registerValuesInView === null ||
94
82
  SkiaViewApi.requestRedraw === null ||
95
83
  SkiaViewApi.makeImageSnapshot === null
96
84
  ) {
@@ -0,0 +1 @@
1
+ export const SkiaViewNativeId = { current: 1000 };
@@ -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";
@@ -1,14 +1,7 @@
1
1
  import type { ViewProps } from "react-native";
2
2
 
3
3
  import type { GroupProps, RenderNode } from "../dom/types";
4
- import type {
5
- SkCanvas,
6
- SkImage,
7
- SkPicture,
8
- SkRect,
9
- SkSize,
10
- } from "../skia/types";
11
- import type { SkiaMutableValue, SkiaValue } from "../values";
4
+ import type { SkImage, SkPicture, SkRect, SkSize } from "../skia/types";
12
5
  import type { SharedValueType } from "../renderer/processors/Animations/Animations";
13
6
 
14
7
  export type DrawMode = "continuous" | "default";
@@ -55,8 +48,6 @@ export type TouchHandlers = {
55
48
 
56
49
  export type TouchHandler = (touchInfo: Array<Array<TouchInfo>>) => void;
57
50
 
58
- export type RNSkiaDrawCallback = (canvas: SkCanvas, info: DrawingInfo) => void;
59
-
60
51
  /**
61
52
  * Listener interface for value changes
62
53
  */
@@ -72,10 +63,6 @@ export interface ISkiaViewApi {
72
63
  name: string,
73
64
  ...args: T
74
65
  ) => void;
75
- registerValuesInView: (
76
- nativeId: number,
77
- values: SkiaValue<unknown>[]
78
- ) => () => void;
79
66
  requestRedraw: (nativeId: number) => void;
80
67
  makeImageSnapshot: (nativeId: number, rect?: SkRect) => SkImage;
81
68
  }
@@ -98,18 +85,7 @@ export interface SkiaBaseViewProps extends ViewProps {
98
85
  * Pass an animated value to the onSize property to get updates when
99
86
  * the Skia view is resized.
100
87
  */
101
- onSize?: SkiaMutableValue<SkSize> | SharedValueType<SkSize>;
102
- }
103
-
104
- export interface SkiaDrawViewProps extends SkiaBaseViewProps {
105
- /**
106
- * Draw callback. Will be called whenever the view is invalidated and
107
- * needs to redraw. This is either caused by a change in a react
108
- * property, a touch event, or a call to redraw. If the view is in
109
- * continuous mode the callback will be called 60 frames per second
110
- * by the native view.
111
- */
112
- onDraw?: RNSkiaDrawCallback;
88
+ onSize?: SharedValueType<SkSize>;
113
89
  }
114
90
 
115
91
  export interface SkiaPictureViewProps extends SkiaBaseViewProps {
@@ -1,44 +0,0 @@
1
- package com.shopify.reactnative.skia;
2
-
3
- import android.content.Context;
4
-
5
- import com.facebook.jni.HybridData;
6
- import com.facebook.jni.annotations.DoNotStrip;
7
- import com.facebook.react.bridge.ReactContext;
8
-
9
- public class SkiaDrawView extends SkiaBaseView {
10
- @DoNotStrip
11
- private HybridData mHybridData;
12
-
13
- public SkiaDrawView(Context context) {
14
- super(context, false);
15
- RNSkiaModule skiaModule = ((ReactContext) context).getNativeModule(RNSkiaModule.class);
16
- mHybridData = initHybrid(skiaModule.getSkiaManager());
17
- }
18
-
19
- @Override
20
- protected void finalize() throws Throwable {
21
- super.finalize();
22
- mHybridData.resetNative();
23
- }
24
-
25
- private native HybridData initHybrid(SkiaManager skiaManager);
26
-
27
- protected native void surfaceAvailable(Object surface, int width, int height);
28
-
29
- protected native void surfaceSizeChanged(int width, int height);
30
-
31
- protected native void surfaceDestroyed();
32
-
33
- protected native void setBgColor(int color);
34
-
35
- protected native void setMode(String mode);
36
-
37
- protected native void setDebugMode(boolean show);
38
-
39
- protected native void updateTouchPoints(double[] points);
40
-
41
- protected native void registerView(int nativeId);
42
-
43
- protected native void unregisterView();
44
- }
@@ -1,34 +0,0 @@
1
- package com.shopify.reactnative.skia;
2
-
3
- import com.facebook.react.uimanager.ThemedReactContext;
4
- import com.facebook.react.viewmanagers.SkiaDrawViewManagerDelegate;
5
- import com.facebook.react.viewmanagers.SkiaDrawViewManagerInterface;
6
-
7
- import androidx.annotation.NonNull;
8
-
9
- public class SkiaDrawViewManager extends SkiaBaseViewManager<SkiaDrawView> implements SkiaDrawViewManagerInterface<SkiaDrawView> {
10
-
11
-
12
- protected SkiaDrawViewManagerDelegate mDelegate;
13
-
14
- SkiaDrawViewManager() {
15
- mDelegate = new SkiaDrawViewManagerDelegate(this);
16
- }
17
-
18
- protected SkiaDrawViewManagerDelegate getDelegate() {
19
- return mDelegate;
20
- }
21
-
22
- @NonNull
23
- @Override
24
- public String getName() {
25
- return "SkiaDrawView";
26
- }
27
-
28
- @NonNull
29
- @Override
30
- public SkiaDrawView createViewInstance(@NonNull ThemedReactContext reactContext) {
31
- return new SkiaDrawView(reactContext);
32
- }
33
-
34
- }
@@ -1,65 +0,0 @@
1
- #pragma once
2
-
3
- #include <array>
4
- #include <memory>
5
-
6
- #include "JsiHostObject.h"
7
- #include "RNSkClockValue.h"
8
- #include "RNSkPlatformContext.h"
9
- #include <jsi/jsi.h>
10
-
11
- namespace RNSkia {
12
- namespace jsi = facebook::jsi;
13
-
14
- /**
15
- Implements an animation that can be used to drive other values
16
- */
17
- class RNSkAnimation : public RNSkClockValue {
18
-
19
- public:
20
- RNSkAnimation(std::shared_ptr<RNSkPlatformContext> platformContext,
21
- size_t identifier, jsi::Runtime &runtime,
22
- const jsi::Value *arguments, size_t count)
23
- : RNSkClockValue(platformContext, identifier, runtime, arguments, count) {
24
- // Save the update function
25
- _updateFunction = std::make_shared<jsi::Function>(
26
- arguments[0].asObject(runtime).asFunction(runtime));
27
-
28
- // Set state to undefined initially.
29
- _args[1] = jsi::Value::undefined();
30
- }
31
-
32
- JSI_HOST_FUNCTION(cancel) {
33
- stopClock();
34
- return jsi::Value::undefined();
35
- }
36
-
37
- JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(RNSkAnimation, cancel))
38
-
39
- protected:
40
- void tick(jsi::Runtime &runtime, const jsi::Value &value) override {
41
- // Set up arguments and call the update function
42
- _args[0] = value.asNumber();
43
- _args[1] = _updateFunction->call(
44
- runtime, static_cast<const jsi::Value *>(_args.data()), _args.size());
45
-
46
- // Get finished
47
- auto finished =
48
- _args[1].asObject(runtime).getProperty(runtime, "finished").getBool();
49
- if (finished) {
50
- stopClock();
51
- }
52
-
53
- // Get the next value
54
- auto nextValue =
55
- _args[1].asObject(runtime).getProperty(runtime, "current").asNumber();
56
-
57
- // Update self
58
- update(runtime, nextValue);
59
- }
60
-
61
- private:
62
- std::shared_ptr<jsi::Function> _updateFunction;
63
- std::array<jsi::Value, 2> _args;
64
- };
65
- } // namespace RNSkia
@@ -1,72 +0,0 @@
1
- #pragma once
2
-
3
- #include <memory>
4
-
5
- #include "JsiHostObject.h"
6
- #include "RNSkAnimation.h"
7
- #include "RNSkComputedValue.h"
8
- #include "RNSkPlatformContext.h"
9
- #include "RNSkValue.h"
10
- #include <jsi/jsi.h>
11
-
12
- namespace RNSkia {
13
-
14
- namespace jsi = facebook::jsi;
15
-
16
- class RNSkValueApi : public RNJsi::JsiHostObject {
17
- public:
18
- /**
19
- * Constructor
20
- * @param platformContext Platform context
21
- */
22
- explicit RNSkValueApi(std::shared_ptr<RNSkPlatformContext> platformContext)
23
- : JsiHostObject(), _platformContext(platformContext) {
24
- _valueIdentifier = 50000;
25
- }
26
-
27
- /**
28
- * Destructor
29
- */
30
- ~RNSkValueApi() {}
31
-
32
- JSI_HOST_FUNCTION(createValue) {
33
- return jsi::Object::createFromHostObject(
34
- runtime, std::make_shared<RNSkValue>(_platformContext, runtime,
35
- arguments, count));
36
- }
37
-
38
- JSI_HOST_FUNCTION(createComputedValue) {
39
- // Creation and initialization is done in two steps to be able to use weak
40
- // references when setting up dependencies - since weak_from_this needs our
41
- // instance to be a shared_ptr before calling weak_from_this().
42
- auto computedValue = std::make_shared<RNSkComputedValue>(
43
- _platformContext, runtime, arguments, count);
44
- computedValue->initializeDependencies(runtime, arguments, count);
45
- return jsi::Object::createFromHostObject(runtime, computedValue);
46
- }
47
-
48
- JSI_HOST_FUNCTION(createAnimation) {
49
- return jsi::Object::createFromHostObject(
50
- runtime,
51
- std::make_shared<RNSkAnimation>(_platformContext, ++_valueIdentifier,
52
- runtime, arguments, count));
53
- }
54
-
55
- JSI_HOST_FUNCTION(createClockValue) {
56
- return jsi::Object::createFromHostObject(
57
- runtime,
58
- std::make_shared<RNSkClockValue>(_platformContext, ++_valueIdentifier,
59
- runtime, arguments, count));
60
- }
61
-
62
- JSI_EXPORT_FUNCTIONS(JSI_EXPORT_FUNC(RNSkValueApi, createValue),
63
- JSI_EXPORT_FUNC(RNSkValueApi, createComputedValue),
64
- JSI_EXPORT_FUNC(RNSkValueApi, createClockValue),
65
- JSI_EXPORT_FUNC(RNSkValueApi, createAnimation))
66
-
67
- private:
68
- // Platform context
69
- std::shared_ptr<RNSkPlatformContext> _platformContext;
70
- std::atomic<long> _valueIdentifier;
71
- };
72
- } // namespace RNSkia