@shopify/react-native-skia 0.1.228 → 0.1.230

Sign up to get free protection for your applications and to get access to all the features.
Files changed (629) hide show
  1. package/android/cpp/jni/JniLoad.cpp +0 -2
  2. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
  3. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
  5. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
  6. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
  7. package/cpp/api/JsiSkApi.h +4 -1
  8. package/cpp/api/JsiSkParagraph.h +15 -0
  9. package/cpp/api/JsiSkParagraphBuilder.h +3 -32
  10. package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
  11. package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
  12. package/cpp/rnskia/RNSkManager.cpp +0 -6
  13. package/cpp/rnskia/RNSkView.h +2 -91
  14. package/cpp/rnskia/dom/JsiDomApi.h +0 -9
  15. package/lib/commonjs/animation/index.d.ts +0 -3
  16. package/lib/commonjs/animation/index.js +0 -39
  17. package/lib/commonjs/animation/index.js.map +1 -1
  18. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +1 -2
  19. package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
  20. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  21. package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
  22. package/lib/commonjs/dom/nodes/Node.js +0 -5
  23. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  24. package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
  25. package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
  26. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  27. package/lib/commonjs/dom/types/Common.d.ts +2 -2
  28. package/lib/commonjs/dom/types/Common.js.map +1 -1
  29. package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
  30. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  31. package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
  32. package/lib/commonjs/dom/types/NodeType.js +0 -1
  33. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  34. package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
  35. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  36. package/lib/commonjs/index.d.ts +0 -1
  37. package/lib/commonjs/index.js +0 -14
  38. package/lib/commonjs/index.js.map +1 -1
  39. package/lib/commonjs/mock/index.js +0 -4
  40. package/lib/commonjs/mock/index.js.map +1 -1
  41. package/lib/commonjs/renderer/Canvas.js +9 -34
  42. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  43. package/lib/commonjs/renderer/Container.d.ts +1 -3
  44. package/lib/commonjs/renderer/Container.js +4 -6
  45. package/lib/commonjs/renderer/Container.js.map +1 -1
  46. package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
  47. package/lib/commonjs/renderer/HostComponents.js +0 -3
  48. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  49. package/lib/commonjs/renderer/HostConfig.js +2 -23
  50. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  51. package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
  52. package/lib/commonjs/renderer/Reconciler.js +3 -18
  53. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  54. package/lib/commonjs/renderer/components/index.d.ts +0 -1
  55. package/lib/commonjs/renderer/components/index.js +0 -13
  56. package/lib/commonjs/renderer/components/index.js.map +1 -1
  57. package/lib/commonjs/renderer/index.d.ts +0 -1
  58. package/lib/commonjs/renderer/index.js +0 -13
  59. package/lib/commonjs/renderer/index.js.map +1 -1
  60. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
  61. package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
  62. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  63. package/lib/commonjs/skia/types/Canvas.d.ts +2 -2
  64. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  65. package/lib/commonjs/skia/types/Matrix.d.ts +2 -1
  66. package/lib/commonjs/skia/types/Matrix.js.map +1 -1
  67. package/lib/commonjs/skia/types/Matrix4.d.ts +9 -1
  68. package/lib/commonjs/skia/types/Matrix4.js +49 -3
  69. package/lib/commonjs/skia/types/Matrix4.js.map +1 -1
  70. package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
  71. package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
  72. package/lib/commonjs/skia/types/Path/Path.d.ts +2 -2
  73. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  74. package/lib/commonjs/skia/web/JsiSkMatrix.d.ts +2 -2
  75. package/lib/commonjs/skia/web/JsiSkMatrix.js.map +1 -1
  76. package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
  77. package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
  78. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  79. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  80. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  81. package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
  82. package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
  83. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  84. package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
  85. package/lib/commonjs/views/SkiaDomView.js +3 -14
  86. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  87. package/lib/commonjs/views/SkiaDomView.web.js +4 -14
  88. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  89. package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
  90. package/lib/commonjs/views/SkiaPictureView.js +3 -14
  91. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  92. package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
  93. package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
  94. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
  95. package/lib/commonjs/views/index.d.ts +0 -2
  96. package/lib/commonjs/views/index.js +0 -26
  97. package/lib/commonjs/views/index.js.map +1 -1
  98. package/lib/commonjs/views/types.d.ts +2 -15
  99. package/lib/commonjs/views/types.js.map +1 -1
  100. package/lib/module/animation/index.d.ts +0 -3
  101. package/lib/module/animation/index.js +0 -3
  102. package/lib/module/animation/index.js.map +1 -1
  103. package/lib/module/dom/nodes/JsiSkDOM.d.ts +1 -2
  104. package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
  105. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  106. package/lib/module/dom/nodes/Node.d.ts +0 -3
  107. package/lib/module/dom/nodes/Node.js +0 -5
  108. package/lib/module/dom/nodes/Node.js.map +1 -1
  109. package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
  110. package/lib/module/dom/nodes/drawings/index.js +0 -1
  111. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  112. package/lib/module/dom/types/Common.d.ts +2 -2
  113. package/lib/module/dom/types/Common.js.map +1 -1
  114. package/lib/module/dom/types/Drawings.d.ts +0 -4
  115. package/lib/module/dom/types/Drawings.js.map +1 -1
  116. package/lib/module/dom/types/NodeType.d.ts +0 -1
  117. package/lib/module/dom/types/NodeType.js +0 -1
  118. package/lib/module/dom/types/NodeType.js.map +1 -1
  119. package/lib/module/dom/types/SkDOM.d.ts +1 -2
  120. package/lib/module/dom/types/SkDOM.js.map +1 -1
  121. package/lib/module/index.d.ts +0 -1
  122. package/lib/module/index.js +0 -1
  123. package/lib/module/index.js.map +1 -1
  124. package/lib/module/mock/index.js +1 -4
  125. package/lib/module/mock/index.js.map +1 -1
  126. package/lib/module/renderer/Canvas.js +9 -32
  127. package/lib/module/renderer/Canvas.js.map +1 -1
  128. package/lib/module/renderer/Container.d.ts +1 -3
  129. package/lib/module/renderer/Container.js +4 -6
  130. package/lib/module/renderer/Container.js.map +1 -1
  131. package/lib/module/renderer/HostComponents.d.ts +1 -6
  132. package/lib/module/renderer/HostComponents.js +0 -3
  133. package/lib/module/renderer/HostComponents.js.map +1 -1
  134. package/lib/module/renderer/HostConfig.js +3 -23
  135. package/lib/module/renderer/HostConfig.js.map +1 -1
  136. package/lib/module/renderer/Reconciler.d.ts +1 -5
  137. package/lib/module/renderer/Reconciler.js +3 -16
  138. package/lib/module/renderer/Reconciler.js.map +1 -1
  139. package/lib/module/renderer/components/index.d.ts +0 -1
  140. package/lib/module/renderer/components/index.js +0 -1
  141. package/lib/module/renderer/components/index.js.map +1 -1
  142. package/lib/module/renderer/index.d.ts +0 -1
  143. package/lib/module/renderer/index.js +0 -1
  144. package/lib/module/renderer/index.js.map +1 -1
  145. package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
  146. package/lib/module/renderer/processors/Animations/Animations.js +0 -28
  147. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  148. package/lib/module/skia/types/Canvas.d.ts +2 -2
  149. package/lib/module/skia/types/Canvas.js.map +1 -1
  150. package/lib/module/skia/types/Matrix.d.ts +2 -1
  151. package/lib/module/skia/types/Matrix.js.map +1 -1
  152. package/lib/module/skia/types/Matrix4.d.ts +9 -1
  153. package/lib/module/skia/types/Matrix4.js +42 -2
  154. package/lib/module/skia/types/Matrix4.js.map +1 -1
  155. package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
  156. package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
  157. package/lib/module/skia/types/Path/Path.d.ts +2 -2
  158. package/lib/module/skia/types/Path/Path.js.map +1 -1
  159. package/lib/module/skia/web/JsiSkMatrix.d.ts +2 -2
  160. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  161. package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
  162. package/lib/module/skia/web/JsiSkParagraph.js +12 -0
  163. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  164. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  165. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  166. package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
  167. package/lib/module/views/SkiaBaseWebView.js +0 -17
  168. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  169. package/lib/module/views/SkiaDomView.d.ts +0 -7
  170. package/lib/module/views/SkiaDomView.js +2 -13
  171. package/lib/module/views/SkiaDomView.js.map +1 -1
  172. package/lib/module/views/SkiaDomView.web.js +4 -13
  173. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  174. package/lib/module/views/SkiaPictureView.d.ts +0 -7
  175. package/lib/module/views/SkiaPictureView.js +2 -13
  176. package/lib/module/views/SkiaPictureView.js.map +1 -1
  177. package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
  178. package/lib/module/views/SkiaViewNativeId.js +4 -0
  179. package/lib/module/views/SkiaViewNativeId.js.map +1 -0
  180. package/lib/module/views/index.d.ts +0 -2
  181. package/lib/module/views/index.js +0 -2
  182. package/lib/module/views/index.js.map +1 -1
  183. package/lib/module/views/types.d.ts +2 -15
  184. package/lib/module/views/types.js.map +1 -1
  185. package/lib/typescript/src/animation/index.d.ts +0 -3
  186. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +1 -2
  187. package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
  188. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
  189. package/lib/typescript/src/dom/types/Common.d.ts +2 -2
  190. package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
  191. package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
  192. package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
  193. package/lib/typescript/src/index.d.ts +0 -1
  194. package/lib/typescript/src/renderer/Container.d.ts +1 -3
  195. package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
  196. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
  197. package/lib/typescript/src/renderer/components/index.d.ts +0 -1
  198. package/lib/typescript/src/renderer/index.d.ts +0 -1
  199. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
  200. package/lib/typescript/src/skia/types/Canvas.d.ts +2 -2
  201. package/lib/typescript/src/skia/types/Matrix.d.ts +2 -1
  202. package/lib/typescript/src/skia/types/Matrix4.d.ts +9 -1
  203. package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
  204. package/lib/typescript/src/skia/types/Path/Path.d.ts +2 -2
  205. package/lib/typescript/src/skia/web/JsiSkMatrix.d.ts +2 -2
  206. package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
  207. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
  208. package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
  209. package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
  210. package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
  211. package/lib/typescript/src/views/index.d.ts +0 -2
  212. package/lib/typescript/src/views/types.d.ts +2 -15
  213. package/package.json +1 -1
  214. package/src/animation/index.ts +0 -3
  215. package/src/dom/nodes/JsiSkDOM.ts +0 -12
  216. package/src/dom/nodes/Node.ts +0 -5
  217. package/src/dom/nodes/drawings/index.ts +0 -1
  218. package/src/dom/types/Common.ts +2 -4
  219. package/src/dom/types/Drawings.ts +0 -5
  220. package/src/dom/types/NodeType.ts +0 -1
  221. package/src/dom/types/SkDOM.ts +0 -4
  222. package/src/index.ts +0 -1
  223. package/src/mock/index.ts +0 -3
  224. package/src/renderer/Canvas.tsx +9 -34
  225. package/src/renderer/Container.tsx +1 -4
  226. package/src/renderer/HostComponents.ts +0 -13
  227. package/src/renderer/HostConfig.ts +3 -24
  228. package/src/renderer/Reconciler.tsx +1 -19
  229. package/src/renderer/components/index.ts +0 -1
  230. package/src/renderer/index.ts +0 -1
  231. package/src/renderer/processors/Animations/Animations.ts +1 -51
  232. package/src/skia/types/Canvas.ts +2 -2
  233. package/src/skia/types/Matrix.ts +3 -1
  234. package/src/skia/types/Matrix4.ts +94 -63
  235. package/src/skia/types/Paragraph/Paragraph.ts +25 -0
  236. package/src/skia/types/Path/Path.ts +2 -2
  237. package/src/skia/web/JsiSkMatrix.ts +5 -5
  238. package/src/skia/web/JsiSkParagraph.ts +11 -0
  239. package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
  240. package/src/views/SkiaBaseWebView.tsx +0 -19
  241. package/src/views/SkiaDomView.tsx +1 -13
  242. package/src/views/SkiaDomView.web.tsx +1 -6
  243. package/src/views/SkiaPictureView.tsx +1 -13
  244. package/src/views/SkiaViewNativeId.ts +1 -0
  245. package/src/views/index.ts +0 -2
  246. package/src/views/types.ts +2 -26
  247. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
  248. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
  249. package/cpp/rnskia/RNSkAnimation.h +0 -65
  250. package/cpp/rnskia/RNSkValueApi.h +0 -72
  251. package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
  252. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
  253. package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
  254. package/cpp/rnskia/values/RNSkClockValue.h +0 -140
  255. package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
  256. package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
  257. package/cpp/rnskia/values/RNSkValue.h +0 -116
  258. package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
  259. package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
  260. package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
  261. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
  262. package/lib/commonjs/animation/decay/decay.d.ts +0 -2
  263. package/lib/commonjs/animation/decay/decay.js +0 -42
  264. package/lib/commonjs/animation/decay/decay.js.map +0 -1
  265. package/lib/commonjs/animation/decay/index.d.ts +0 -1
  266. package/lib/commonjs/animation/decay/index.js +0 -14
  267. package/lib/commonjs/animation/decay/index.js.map +0 -1
  268. package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
  269. package/lib/commonjs/animation/decay/runDecay.js +0 -48
  270. package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
  271. package/lib/commonjs/animation/decay/types.d.ts +0 -21
  272. package/lib/commonjs/animation/decay/types.js +0 -6
  273. package/lib/commonjs/animation/decay/types.js.map +0 -1
  274. package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
  275. package/lib/commonjs/animation/spring/Spring.js +0 -77
  276. package/lib/commonjs/animation/spring/Spring.js.map +0 -1
  277. package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
  278. package/lib/commonjs/animation/spring/functions/index.js +0 -14
  279. package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
  280. package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
  281. package/lib/commonjs/animation/spring/functions/spring.js +0 -94
  282. package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
  283. package/lib/commonjs/animation/spring/index.d.ts +0 -3
  284. package/lib/commonjs/animation/spring/index.js +0 -30
  285. package/lib/commonjs/animation/spring/index.js.map +0 -1
  286. package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
  287. package/lib/commonjs/animation/spring/runSpring.js +0 -35
  288. package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
  289. package/lib/commonjs/animation/spring/types.d.ts +0 -6
  290. package/lib/commonjs/animation/spring/types.js +0 -2
  291. package/lib/commonjs/animation/spring/types.js.map +0 -1
  292. package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
  293. package/lib/commonjs/animation/spring/useSpring.js +0 -27
  294. package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
  295. package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
  296. package/lib/commonjs/animation/timing/Easing.js +0 -108
  297. package/lib/commonjs/animation/timing/Easing.js.map +0 -1
  298. package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
  299. package/lib/commonjs/animation/timing/createTiming.js +0 -55
  300. package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
  301. package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
  302. package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
  303. package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
  304. package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
  305. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
  306. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
  307. package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
  308. package/lib/commonjs/animation/timing/functions/index.js +0 -54
  309. package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
  310. package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
  311. package/lib/commonjs/animation/timing/functions/timing.js +0 -50
  312. package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
  313. package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
  314. package/lib/commonjs/animation/timing/functions/types.js +0 -2
  315. package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
  316. package/lib/commonjs/animation/timing/index.d.ts +0 -4
  317. package/lib/commonjs/animation/timing/index.js +0 -38
  318. package/lib/commonjs/animation/timing/index.js.map +0 -1
  319. package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
  320. package/lib/commonjs/animation/timing/runTiming.js +0 -36
  321. package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
  322. package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
  323. package/lib/commonjs/animation/timing/useLoop.js +0 -25
  324. package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
  325. package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
  326. package/lib/commonjs/animation/timing/useTiming.js +0 -67
  327. package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
  328. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  329. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
  330. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  331. package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
  332. package/lib/commonjs/renderer/DependencyManager.js +0 -185
  333. package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
  334. package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
  335. package/lib/commonjs/renderer/components/Drawing.js +0 -22
  336. package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
  337. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  338. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
  339. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  340. package/lib/commonjs/values/api.d.ts +0 -26
  341. package/lib/commonjs/values/api.js +0 -55
  342. package/lib/commonjs/values/api.js.map +0 -1
  343. package/lib/commonjs/values/api.web.d.ts +0 -2
  344. package/lib/commonjs/values/api.web.js +0 -18
  345. package/lib/commonjs/values/api.web.js.map +0 -1
  346. package/lib/commonjs/values/hooks/index.d.ts +0 -4
  347. package/lib/commonjs/values/hooks/index.js +0 -58
  348. package/lib/commonjs/values/hooks/index.js.map +0 -1
  349. package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
  350. package/lib/commonjs/values/hooks/useClockValue.js +0 -30
  351. package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
  352. package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
  353. package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
  354. package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
  355. package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
  356. package/lib/commonjs/values/hooks/useValue.js +0 -26
  357. package/lib/commonjs/values/hooks/useValue.js.map +0 -1
  358. package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
  359. package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
  360. package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
  361. package/lib/commonjs/values/index.d.ts +0 -4
  362. package/lib/commonjs/values/index.js +0 -58
  363. package/lib/commonjs/values/index.js.map +0 -1
  364. package/lib/commonjs/values/selector.d.ts +0 -14
  365. package/lib/commonjs/values/selector.js +0 -24
  366. package/lib/commonjs/values/selector.js.map +0 -1
  367. package/lib/commonjs/values/types.d.ts +0 -63
  368. package/lib/commonjs/values/types.js +0 -2
  369. package/lib/commonjs/values/types.js.map +0 -1
  370. package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
  371. package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
  372. package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
  373. package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
  374. package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
  375. package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
  376. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
  377. package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
  378. package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
  379. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
  380. package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
  381. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
  382. package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
  383. package/lib/commonjs/values/web/RNSkValue.js +0 -73
  384. package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
  385. package/lib/commonjs/values/web/api.d.ts +0 -2
  386. package/lib/commonjs/values/web/api.js +0 -31
  387. package/lib/commonjs/values/web/api.js.map +0 -1
  388. package/lib/commonjs/values/web/index.d.ts +0 -1
  389. package/lib/commonjs/values/web/index.js +0 -19
  390. package/lib/commonjs/values/web/index.js.map +0 -1
  391. package/lib/commonjs/views/SkiaView.d.ts +0 -35
  392. package/lib/commonjs/views/SkiaView.js +0 -139
  393. package/lib/commonjs/views/SkiaView.js.map +0 -1
  394. package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
  395. package/lib/commonjs/views/SkiaView.web.js +0 -30
  396. package/lib/commonjs/views/SkiaView.web.js.map +0 -1
  397. package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
  398. package/lib/commonjs/views/useDrawCallback.js +0 -23
  399. package/lib/commonjs/views/useDrawCallback.js.map +0 -1
  400. package/lib/module/animation/decay/decay.d.ts +0 -2
  401. package/lib/module/animation/decay/decay.js +0 -33
  402. package/lib/module/animation/decay/decay.js.map +0 -1
  403. package/lib/module/animation/decay/index.d.ts +0 -1
  404. package/lib/module/animation/decay/index.js +0 -2
  405. package/lib/module/animation/decay/index.js.map +0 -1
  406. package/lib/module/animation/decay/runDecay.d.ts +0 -10
  407. package/lib/module/animation/decay/runDecay.js +0 -38
  408. package/lib/module/animation/decay/runDecay.js.map +0 -1
  409. package/lib/module/animation/decay/types.d.ts +0 -21
  410. package/lib/module/animation/decay/types.js +0 -2
  411. package/lib/module/animation/decay/types.js.map +0 -1
  412. package/lib/module/animation/spring/Spring.d.ts +0 -65
  413. package/lib/module/animation/spring/Spring.js +0 -69
  414. package/lib/module/animation/spring/Spring.js.map +0 -1
  415. package/lib/module/animation/spring/functions/index.d.ts +0 -1
  416. package/lib/module/animation/spring/functions/index.js +0 -2
  417. package/lib/module/animation/spring/functions/index.js.map +0 -1
  418. package/lib/module/animation/spring/functions/spring.d.ts +0 -10
  419. package/lib/module/animation/spring/functions/spring.js +0 -85
  420. package/lib/module/animation/spring/functions/spring.js.map +0 -1
  421. package/lib/module/animation/spring/index.d.ts +0 -3
  422. package/lib/module/animation/spring/index.js +0 -4
  423. package/lib/module/animation/spring/index.js.map +0 -1
  424. package/lib/module/animation/spring/runSpring.d.ts +0 -19
  425. package/lib/module/animation/spring/runSpring.js +0 -24
  426. package/lib/module/animation/spring/runSpring.js.map +0 -1
  427. package/lib/module/animation/spring/types.d.ts +0 -6
  428. package/lib/module/animation/spring/types.js +0 -2
  429. package/lib/module/animation/spring/types.js.map +0 -1
  430. package/lib/module/animation/spring/useSpring.d.ts +0 -13
  431. package/lib/module/animation/spring/useSpring.js +0 -16
  432. package/lib/module/animation/spring/useSpring.js.map +0 -1
  433. package/lib/module/animation/timing/Easing.d.ts +0 -19
  434. package/lib/module/animation/timing/Easing.js +0 -98
  435. package/lib/module/animation/timing/Easing.js.map +0 -1
  436. package/lib/module/animation/timing/createTiming.d.ts +0 -17
  437. package/lib/module/animation/timing/createTiming.js +0 -49
  438. package/lib/module/animation/timing/createTiming.js.map +0 -1
  439. package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
  440. package/lib/module/animation/timing/functions/bezier.js +0 -141
  441. package/lib/module/animation/timing/functions/bezier.js.map +0 -1
  442. package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
  443. package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
  444. package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
  445. package/lib/module/animation/timing/functions/index.d.ts +0 -4
  446. package/lib/module/animation/timing/functions/index.js +0 -5
  447. package/lib/module/animation/timing/functions/index.js.map +0 -1
  448. package/lib/module/animation/timing/functions/timing.d.ts +0 -17
  449. package/lib/module/animation/timing/functions/timing.js +0 -41
  450. package/lib/module/animation/timing/functions/timing.js.map +0 -1
  451. package/lib/module/animation/timing/functions/types.d.ts +0 -7
  452. package/lib/module/animation/timing/functions/types.js +0 -2
  453. package/lib/module/animation/timing/functions/types.js.map +0 -1
  454. package/lib/module/animation/timing/index.d.ts +0 -4
  455. package/lib/module/animation/timing/index.js +0 -5
  456. package/lib/module/animation/timing/index.js.map +0 -1
  457. package/lib/module/animation/timing/runTiming.d.ts +0 -19
  458. package/lib/module/animation/timing/runTiming.js +0 -26
  459. package/lib/module/animation/timing/runTiming.js.map +0 -1
  460. package/lib/module/animation/timing/useLoop.d.ts +0 -11
  461. package/lib/module/animation/timing/useLoop.js +0 -16
  462. package/lib/module/animation/timing/useLoop.js.map +0 -1
  463. package/lib/module/animation/timing/useTiming.d.ts +0 -13
  464. package/lib/module/animation/timing/useTiming.js +0 -57
  465. package/lib/module/animation/timing/useTiming.js.map +0 -1
  466. package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  467. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
  468. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  469. package/lib/module/renderer/DependencyManager.d.ts +0 -46
  470. package/lib/module/renderer/DependencyManager.js +0 -174
  471. package/lib/module/renderer/DependencyManager.js.map +0 -1
  472. package/lib/module/renderer/components/Drawing.d.ts +0 -8
  473. package/lib/module/renderer/components/Drawing.js +0 -11
  474. package/lib/module/renderer/components/Drawing.js.map +0 -1
  475. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  476. package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
  477. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  478. package/lib/module/values/api.d.ts +0 -26
  479. package/lib/module/values/api.js +0 -48
  480. package/lib/module/values/api.js.map +0 -1
  481. package/lib/module/values/api.web.d.ts +0 -2
  482. package/lib/module/values/api.web.js +0 -7
  483. package/lib/module/values/api.web.js.map +0 -1
  484. package/lib/module/values/hooks/index.d.ts +0 -4
  485. package/lib/module/values/hooks/index.js +0 -5
  486. package/lib/module/values/hooks/index.js.map +0 -1
  487. package/lib/module/values/hooks/useClockValue.d.ts +0 -9
  488. package/lib/module/values/hooks/useClockValue.js +0 -20
  489. package/lib/module/values/hooks/useClockValue.js.map +0 -1
  490. package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
  491. package/lib/module/values/hooks/useComputedValue.js +0 -21
  492. package/lib/module/values/hooks/useComputedValue.js.map +0 -1
  493. package/lib/module/values/hooks/useValue.d.ts +0 -10
  494. package/lib/module/values/hooks/useValue.js +0 -16
  495. package/lib/module/values/hooks/useValue.js.map +0 -1
  496. package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
  497. package/lib/module/values/hooks/useValueEffect.js +0 -16
  498. package/lib/module/values/hooks/useValueEffect.js.map +0 -1
  499. package/lib/module/values/index.d.ts +0 -4
  500. package/lib/module/values/index.js +0 -5
  501. package/lib/module/values/index.js.map +0 -1
  502. package/lib/module/values/selector.d.ts +0 -14
  503. package/lib/module/values/selector.js +0 -15
  504. package/lib/module/values/selector.js.map +0 -1
  505. package/lib/module/values/types.d.ts +0 -63
  506. package/lib/module/values/types.js +0 -2
  507. package/lib/module/values/types.js.map +0 -1
  508. package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
  509. package/lib/module/values/web/RNSkAnimation.js +0 -36
  510. package/lib/module/values/web/RNSkAnimation.js.map +0 -1
  511. package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
  512. package/lib/module/values/web/RNSkClockValue.js +0 -65
  513. package/lib/module/values/web/RNSkClockValue.js.map +0 -1
  514. package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
  515. package/lib/module/values/web/RNSkComputedValue.js +0 -49
  516. package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
  517. package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
  518. package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
  519. package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
  520. package/lib/module/values/web/RNSkValue.d.ts +0 -14
  521. package/lib/module/values/web/RNSkValue.js +0 -63
  522. package/lib/module/values/web/RNSkValue.js.map +0 -1
  523. package/lib/module/values/web/api.d.ts +0 -2
  524. package/lib/module/values/web/api.js +0 -19
  525. package/lib/module/values/web/api.js.map +0 -1
  526. package/lib/module/values/web/index.d.ts +0 -1
  527. package/lib/module/values/web/index.js +0 -2
  528. package/lib/module/values/web/index.js.map +0 -1
  529. package/lib/module/views/SkiaView.d.ts +0 -35
  530. package/lib/module/views/SkiaView.js +0 -119
  531. package/lib/module/views/SkiaView.js.map +0 -1
  532. package/lib/module/views/SkiaView.web.d.ts +0 -7
  533. package/lib/module/views/SkiaView.web.js +0 -20
  534. package/lib/module/views/SkiaView.web.js.map +0 -1
  535. package/lib/module/views/useDrawCallback.d.ts +0 -8
  536. package/lib/module/views/useDrawCallback.js +0 -14
  537. package/lib/module/views/useDrawCallback.js.map +0 -1
  538. package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
  539. package/lib/typescript/src/animation/decay/index.d.ts +0 -1
  540. package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
  541. package/lib/typescript/src/animation/decay/types.d.ts +0 -21
  542. package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
  543. package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
  544. package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
  545. package/lib/typescript/src/animation/spring/index.d.ts +0 -3
  546. package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
  547. package/lib/typescript/src/animation/spring/types.d.ts +0 -6
  548. package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
  549. package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
  550. package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
  551. package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
  552. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
  553. package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
  554. package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
  555. package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
  556. package/lib/typescript/src/animation/timing/index.d.ts +0 -4
  557. package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
  558. package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
  559. package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
  560. package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  561. package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
  562. package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
  563. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  564. package/lib/typescript/src/values/api.d.ts +0 -26
  565. package/lib/typescript/src/values/api.web.d.ts +0 -2
  566. package/lib/typescript/src/values/hooks/index.d.ts +0 -4
  567. package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
  568. package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
  569. package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
  570. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
  571. package/lib/typescript/src/values/index.d.ts +0 -4
  572. package/lib/typescript/src/values/selector.d.ts +0 -14
  573. package/lib/typescript/src/values/types.d.ts +0 -63
  574. package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
  575. package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
  576. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
  577. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
  578. package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
  579. package/lib/typescript/src/values/web/api.d.ts +0 -2
  580. package/lib/typescript/src/values/web/index.d.ts +0 -1
  581. package/lib/typescript/src/views/SkiaView.d.ts +0 -35
  582. package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
  583. package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
  584. package/src/animation/decay/decay.ts +0 -35
  585. package/src/animation/decay/index.ts +0 -1
  586. package/src/animation/decay/runDecay.ts +0 -40
  587. package/src/animation/decay/types.ts +0 -24
  588. package/src/animation/spring/Spring.ts +0 -61
  589. package/src/animation/spring/functions/index.ts +0 -1
  590. package/src/animation/spring/functions/spring.ts +0 -86
  591. package/src/animation/spring/index.ts +0 -3
  592. package/src/animation/spring/runSpring.ts +0 -40
  593. package/src/animation/spring/types.ts +0 -6
  594. package/src/animation/spring/useSpring.ts +0 -31
  595. package/src/animation/timing/Easing.ts +0 -102
  596. package/src/animation/timing/createTiming.ts +0 -62
  597. package/src/animation/timing/functions/bezier.ts +0 -165
  598. package/src/animation/timing/functions/getResolvedParams.ts +0 -50
  599. package/src/animation/timing/functions/index.ts +0 -4
  600. package/src/animation/timing/functions/timing.ts +0 -44
  601. package/src/animation/timing/functions/types.ts +0 -8
  602. package/src/animation/timing/index.ts +0 -4
  603. package/src/animation/timing/runTiming.ts +0 -36
  604. package/src/animation/timing/useLoop.ts +0 -21
  605. package/src/animation/timing/useTiming.ts +0 -71
  606. package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
  607. package/src/renderer/DependencyManager.tsx +0 -196
  608. package/src/renderer/components/Drawing.tsx +0 -12
  609. package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
  610. package/src/values/api.ts +0 -61
  611. package/src/values/api.web.ts +0 -5
  612. package/src/values/hooks/index.ts +0 -4
  613. package/src/values/hooks/useClockValue.ts +0 -21
  614. package/src/values/hooks/useComputedValue.ts +0 -24
  615. package/src/values/hooks/useValue.ts +0 -17
  616. package/src/values/hooks/useValueEffect.ts +0 -18
  617. package/src/values/index.ts +0 -4
  618. package/src/values/selector.ts +0 -24
  619. package/src/values/types.ts +0 -73
  620. package/src/values/web/RNSkAnimation.ts +0 -33
  621. package/src/values/web/RNSkClockValue.ts +0 -58
  622. package/src/values/web/RNSkComputedValue.ts +0 -49
  623. package/src/values/web/RNSkReadonlyValue.ts +0 -38
  624. package/src/values/web/RNSkValue.ts +0 -57
  625. package/src/values/web/api.ts +0 -33
  626. package/src/values/web/index.ts +0 -1
  627. package/src/views/SkiaView.tsx +0 -111
  628. package/src/views/SkiaView.web.tsx +0 -22
  629. package/src/views/useDrawCallback.ts +0 -19
@@ -1,46 +0,0 @@
1
- import type { Node } from "../dom/types";
2
- import type { SkiaValue } from "../values";
3
- import type { AnimatedProps } from "./processors";
4
- type Unsubscribe = () => void;
5
- type Mutator = (value: unknown) => void;
6
- type SubscriptionState = {
7
- nodes: Map<Node<unknown>, Mutator[]>;
8
- unsubscribe: null | Unsubscribe;
9
- };
10
- export declare class DependencyManager {
11
- registerValues: (values: Array<SkiaValue<unknown>>) => () => void;
12
- subscriptions: Map<SkiaValue<unknown>, SubscriptionState>;
13
- unregisterDependantValues: null | Unsubscribe;
14
- constructor(registerValues: (values: Array<SkiaValue<unknown>>) => () => void);
15
- /**
16
- * Call to unsubscribe all value listeners from the given node based
17
- * on the current list of subscriptions for the node. This function
18
- * is typically called when the node is unmounted or when one or more
19
- * properties have changed.
20
- * @param node Node to unsubscribe value listeners from
21
- */
22
- unsubscribeNode(node: Node<unknown>): void;
23
- /**
24
- * Adds listeners to the provided values so that the node is notified
25
- * when a value changes. This is done in an optimized way so that this
26
- * class only needs to listen to the value once and then forwards the
27
- * change to the node and its listener. This method is typically called
28
- * when the node is mounted and when one or more props on the node changes.
29
- * @param node Node to subscribe to value changes for
30
- * @param props Node's properties
31
- */
32
- subscribeNode<P>(node: Node<unknown>, props: AnimatedProps<P>): void;
33
- /**
34
- * Called when the hosting container is mounted or updated. This ensures that we have
35
- * a ref to the underlying SkiaView so that we can registers redraw listeners
36
- * on values used in the current View automatically.
37
- */
38
- update(): void;
39
- /**
40
- * Called when the hosting container is unmounted or recreated. This ensures that we remove
41
- * all subscriptions to Skia values so that we don't have any listeners left after
42
- * the component is removed.
43
- */
44
- remove(): void;
45
- }
46
- export {};
@@ -1,174 +0,0 @@
1
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
-
3
- import { isSelector, isValue } from "./processors";
4
- import { mapKeys } from "./typeddash";
5
- export class DependencyManager {
6
- constructor(registerValues) {
7
- _defineProperty(this, "registerValues", void 0);
8
-
9
- _defineProperty(this, "subscriptions", new Map());
10
-
11
- _defineProperty(this, "unregisterDependantValues", null);
12
-
13
- this.registerValues = registerValues;
14
- }
15
- /**
16
- * Call to unsubscribe all value listeners from the given node based
17
- * on the current list of subscriptions for the node. This function
18
- * is typically called when the node is unmounted or when one or more
19
- * properties have changed.
20
- * @param node Node to unsubscribe value listeners from
21
- */
22
-
23
-
24
- unsubscribeNode(node) {
25
- const subscriptions = Array.from(this.subscriptions.values()).filter(p => p.nodes.has(node));
26
-
27
- if (subscriptions) {
28
- subscriptions.forEach(si => {
29
- // Delete node from subscription
30
- si.nodes.delete(node); // Remove subscription if there are no listeneres left on the value
31
-
32
- if (si.nodes.size === 0) {
33
- // There are no more nodes subscribing to this value, we can call
34
- // unsubscribe on it.
35
- if (!si.unsubscribe) {
36
- throw new Error("Failed to unsubscribe to value subscription");
37
- }
38
-
39
- si.unsubscribe && si.unsubscribe(); // Remove from subscription states as well
40
-
41
- const element = Array.from(this.subscriptions.entries()).find(_ref => {
42
- let [_, sub] = _ref;
43
- return sub === si;
44
- });
45
-
46
- if (!element) {
47
- throw new Error("Failed to find value subscription");
48
- }
49
-
50
- if (!this.subscriptions.delete(element[0])) {
51
- throw new Error("Failed to delete value subscription");
52
- }
53
- }
54
- });
55
- }
56
- }
57
- /**
58
- * Adds listeners to the provided values so that the node is notified
59
- * when a value changes. This is done in an optimized way so that this
60
- * class only needs to listen to the value once and then forwards the
61
- * change to the node and its listener. This method is typically called
62
- * when the node is mounted and when one or more props on the node changes.
63
- * @param node Node to subscribe to value changes for
64
- * @param props Node's properties
65
- */
66
-
67
-
68
- subscribeNode(node, props) {
69
- // Get mutators from node's properties
70
- const propSubscriptions = initializePropertySubscriptions(node, props);
71
-
72
- if (propSubscriptions.length === 0) {
73
- return;
74
- } // Install all mutators for the node
75
-
76
-
77
- propSubscriptions.forEach(ps => {
78
- // Do we already have a state for this SkiaValue
79
- let subscriptionState = this.subscriptions.get(ps.value);
80
-
81
- if (!subscriptionState) {
82
- // Let's create a new subscription state for the skia value
83
- subscriptionState = {
84
- nodes: new Map(),
85
- unsubscribe: null
86
- }; // Add single subscription to the new value
87
-
88
- subscriptionState.unsubscribe = ps.value.addListener(v => {
89
- subscriptionState.nodes.forEach(mutators => mutators.forEach(m => m(v)));
90
- });
91
- this.subscriptions.set(ps.value, subscriptionState);
92
- } // subscription mutators
93
-
94
-
95
- subscriptionState.nodes.set(node, propSubscriptions.filter(m => m.value === ps.value).map(m => m.mutator));
96
- });
97
- }
98
- /**
99
- * Called when the hosting container is mounted or updated. This ensures that we have
100
- * a ref to the underlying SkiaView so that we can registers redraw listeners
101
- * on values used in the current View automatically.
102
- */
103
-
104
-
105
- update() {
106
- // Remove any previous registrations
107
- if (this.unregisterDependantValues) {
108
- this.unregisterDependantValues();
109
- } // Register redraw requests on the SkiaView for each unique value
110
-
111
-
112
- this.unregisterDependantValues = this.registerValues(Array.from(this.subscriptions.keys()));
113
- }
114
- /**
115
- * Called when the hosting container is unmounted or recreated. This ensures that we remove
116
- * all subscriptions to Skia values so that we don't have any listeners left after
117
- * the component is removed.
118
- */
119
-
120
-
121
- remove() {
122
- // 1) Unregister redraw requests
123
- if (this.unregisterDependantValues) {
124
- this.unregisterDependantValues();
125
- this.unregisterDependantValues = null;
126
- } // 2) Unregister nodes
127
-
128
-
129
- Array.from(this.subscriptions.values()).forEach(si => {
130
- Array.from(si.nodes.keys()).forEach(node => this.unsubscribeNode(node));
131
- }); // 3) Clear the rest of the subscriptions
132
-
133
- this.subscriptions.clear();
134
- }
135
-
136
- }
137
-
138
- const initializePropertySubscriptions = (node, props) => {
139
- const nodePropSubscriptions = [];
140
- mapKeys(props).forEach(key => {
141
- if (key === "children") {
142
- return;
143
- }
144
-
145
- const propvalue = props[key];
146
-
147
- if (isValue(propvalue)) {
148
- // Subscribe to changes
149
- nodePropSubscriptions.push({
150
- value: propvalue,
151
- mutator: v => {
152
- node.setProp(key, v);
153
- }
154
- }); // Set initial value
155
-
156
- node.setProp(key, propvalue.current);
157
- } else if (isSelector(propvalue)) {
158
- // Subscribe to changes
159
- nodePropSubscriptions.push({
160
- value: propvalue.value,
161
- mutator: v => {
162
- node.setProp(key, propvalue.selector(v));
163
- }
164
- }); // Set initial value
165
-
166
- node.setProp(key, propvalue.selector(propvalue.value.current));
167
- } else {
168
- // Set initial value
169
- node.setProp(key, propvalue);
170
- }
171
- });
172
- return nodePropSubscriptions;
173
- };
174
- //# sourceMappingURL=DependencyManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["isSelector","isValue","mapKeys","DependencyManager","constructor","registerValues","Map","unsubscribeNode","node","subscriptions","Array","from","values","filter","p","nodes","has","forEach","si","delete","size","unsubscribe","Error","element","entries","find","_","sub","subscribeNode","props","propSubscriptions","initializePropertySubscriptions","length","ps","subscriptionState","get","value","addListener","v","mutators","m","set","map","mutator","update","unregisterDependantValues","keys","remove","clear","nodePropSubscriptions","key","propvalue","push","setProp","current","selector"],"sources":["DependencyManager.tsx"],"sourcesContent":["import type { Node } from \"../dom/types\";\nimport type { SkiaValue } from \"../values\";\n\nimport type { AnimatedProps } from \"./processors\";\nimport { isSelector, isValue } from \"./processors\";\nimport { mapKeys } from \"./typeddash\";\n\ntype Unsubscribe = () => void;\ntype Mutator = (value: unknown) => void;\n\ntype SubscriptionState = {\n nodes: Map<Node<unknown>, Mutator[]>;\n unsubscribe: null | Unsubscribe;\n};\n\nexport class DependencyManager {\n registerValues: (values: Array<SkiaValue<unknown>>) => () => void;\n subscriptions: Map<SkiaValue<unknown>, SubscriptionState> = new Map();\n unregisterDependantValues: null | Unsubscribe = null;\n\n constructor(\n registerValues: (values: Array<SkiaValue<unknown>>) => () => void\n ) {\n this.registerValues = registerValues;\n }\n\n /**\n * Call to unsubscribe all value listeners from the given node based\n * on the current list of subscriptions for the node. This function\n * is typically called when the node is unmounted or when one or more\n * properties have changed.\n * @param node Node to unsubscribe value listeners from\n */\n unsubscribeNode(node: Node<unknown>) {\n const subscriptions = Array.from(this.subscriptions.values()).filter((p) =>\n p.nodes.has(node)\n );\n\n if (subscriptions) {\n subscriptions.forEach((si) => {\n // Delete node from subscription\n si.nodes.delete(node);\n\n // Remove subscription if there are no listeneres left on the value\n if (si.nodes.size === 0) {\n // There are no more nodes subscribing to this value, we can call\n // unsubscribe on it.\n if (!si.unsubscribe) {\n throw new Error(\"Failed to unsubscribe to value subscription\");\n }\n si.unsubscribe && si.unsubscribe();\n\n // Remove from subscription states as well\n const element = Array.from(this.subscriptions.entries()).find(\n ([_, sub]) => sub === si\n );\n if (!element) {\n throw new Error(\"Failed to find value subscription\");\n }\n if (!this.subscriptions.delete(element[0])) {\n throw new Error(\"Failed to delete value subscription\");\n }\n }\n });\n }\n }\n\n /**\n * Adds listeners to the provided values so that the node is notified\n * when a value changes. This is done in an optimized way so that this\n * class only needs to listen to the value once and then forwards the\n * change to the node and its listener. This method is typically called\n * when the node is mounted and when one or more props on the node changes.\n * @param node Node to subscribe to value changes for\n * @param props Node's properties\n */\n subscribeNode<P>(node: Node<unknown>, props: AnimatedProps<P>) {\n // Get mutators from node's properties\n const propSubscriptions = initializePropertySubscriptions(node, props);\n if (propSubscriptions.length === 0) {\n return;\n }\n\n // Install all mutators for the node\n propSubscriptions.forEach((ps) => {\n // Do we already have a state for this SkiaValue\n let subscriptionState = this.subscriptions.get(ps.value);\n if (!subscriptionState) {\n // Let's create a new subscription state for the skia value\n subscriptionState = {\n nodes: new Map(),\n unsubscribe: null,\n };\n // Add single subscription to the new value\n subscriptionState.unsubscribe = ps.value.addListener((v) => {\n subscriptionState!.nodes.forEach((mutators) =>\n mutators.forEach((m) => m(v))\n );\n });\n this.subscriptions.set(ps.value, subscriptionState);\n }\n // subscription mutators\n subscriptionState.nodes.set(\n node,\n propSubscriptions\n .filter((m) => m.value === ps.value)\n .map((m) => m.mutator)\n );\n });\n }\n\n /**\n * Called when the hosting container is mounted or updated. This ensures that we have\n * a ref to the underlying SkiaView so that we can registers redraw listeners\n * on values used in the current View automatically.\n */\n update() {\n // Remove any previous registrations\n if (this.unregisterDependantValues) {\n this.unregisterDependantValues();\n }\n\n // Register redraw requests on the SkiaView for each unique value\n this.unregisterDependantValues = this.registerValues(\n Array.from(this.subscriptions.keys())\n );\n }\n\n /**\n * Called when the hosting container is unmounted or recreated. This ensures that we remove\n * all subscriptions to Skia values so that we don't have any listeners left after\n * the component is removed.\n */\n remove() {\n // 1) Unregister redraw requests\n if (this.unregisterDependantValues) {\n this.unregisterDependantValues();\n this.unregisterDependantValues = null;\n }\n\n // 2) Unregister nodes\n Array.from(this.subscriptions.values()).forEach((si) => {\n Array.from(si.nodes.keys()).forEach((node) => this.unsubscribeNode(node));\n });\n\n // 3) Clear the rest of the subscriptions\n this.subscriptions.clear();\n }\n}\n\nconst initializePropertySubscriptions = <P,>(\n node: Node<P>,\n props: AnimatedProps<P>\n) => {\n const nodePropSubscriptions: Array<{\n value: SkiaValue<unknown>;\n mutator: Mutator;\n }> = [];\n\n mapKeys(props).forEach((key) => {\n if (key === \"children\") {\n return;\n }\n const propvalue = props[key];\n\n if (isValue(propvalue)) {\n // Subscribe to changes\n nodePropSubscriptions.push({\n value: propvalue,\n mutator: (v) => {\n node.setProp(key, v as P[typeof key]);\n },\n });\n // Set initial value\n node.setProp(key, (propvalue as SkiaValue<P[typeof key]>).current);\n } else if (isSelector(propvalue)) {\n // Subscribe to changes\n nodePropSubscriptions.push({\n value: propvalue.value,\n mutator: (v) => {\n node.setProp(key, propvalue.selector(v) as P[typeof key]);\n },\n });\n // Set initial value\n node.setProp(\n key,\n propvalue.selector(propvalue.value.current) as P[typeof key]\n );\n } else {\n // Set initial value\n node.setProp(key, propvalue as P[typeof key]);\n }\n });\n\n return nodePropSubscriptions;\n};\n"],"mappings":"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"}
@@ -1,8 +0,0 @@
1
- import React from "react";
2
- import type { CustomDrawingNodeProps } from "../../dom/types";
3
- /**
4
- * @deprecated If you are looking to use the Skia imperative API, you can use:
5
- * The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/
6
- * The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures
7
- */
8
- export declare const Drawing: (props: CustomDrawingNodeProps) => React.JSX.Element;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
-
3
- /**
4
- * @deprecated If you are looking to use the Skia imperative API, you can use:
5
- * The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/
6
- * The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures
7
- */
8
- export const Drawing = props => {
9
- return /*#__PURE__*/React.createElement("skDrawing", props);
10
- };
11
- //# sourceMappingURL=Drawing.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Drawing","props"],"sources":["Drawing.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type { CustomDrawingNodeProps } from \"../../dom/types\";\n\n/**\n * @deprecated If you are looking to use the Skia imperative API, you can use:\n * The picture API: https://shopify.github.io/react-native-skia/docs/shapes/pictures/\n * The offscreen API: https://shopify.github.io/react-native-skia/docs/animations/textures\n */\nexport const Drawing = (props: CustomDrawingNodeProps) => {\n return <skDrawing {...props} />;\n};\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;;AAIA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAIC,KAAD,IAAmC;EACxD,oBAAO,iCAAeA,KAAf,CAAP;AACD,CAFM"}
@@ -1,8 +0,0 @@
1
- /// <reference types="react-native/types/modules/Codegen" />
2
- import type { ViewProps } from "react-native";
3
- export interface NativeProps extends ViewProps {
4
- mode: string;
5
- debug?: boolean;
6
- }
7
- declare const _default: import("react-native/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
8
- export default _default;
@@ -1,4 +0,0 @@
1
- import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
2
- // eslint-disable-next-line import/no-default-export
3
- export default codegenNativeComponent("SkiaDrawView");
4
- //# sourceMappingURL=SkiaDrawViewNativeComponent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["SkiaDrawViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\nimport type { ViewProps } from \"react-native\";\n\nexport interface NativeProps extends ViewProps {\n mode: string;\n debug?: boolean;\n}\n\n// eslint-disable-next-line import/no-default-export\nexport default codegenNativeComponent<NativeProps>(\"SkiaDrawView\");\n"],"mappings":"AAAA,OAAOA,sBAAP,MAAmC,yDAAnC;AAQA;AACA,eAAeA,sBAAsB,CAAc,cAAd,CAArC"}
@@ -1,26 +0,0 @@
1
- import type { AnimationState, ISkiaValueApi, SkiaAnimation, SkiaClockValue, SkiaMutableValue, SkiaValue } from "./types";
2
- declare global {
3
- var SkiaValueApi: ISkiaValueApi;
4
- }
5
- export declare const ValueApi: {
6
- /**
7
- * @deprecated Use Reanimated 3
8
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
9
- */
10
- createValue<T>(initialValue: T): SkiaMutableValue<T>;
11
- /**
12
- * @deprecated Use Reanimated 3
13
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
14
- */
15
- createComputedValue<R>(cb: () => R, values: SkiaValue<unknown>[]): SkiaValue<R>;
16
- /**
17
- * @deprecated Use Reanimated 3
18
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
19
- */
20
- createClockValue(): SkiaClockValue;
21
- /**
22
- * @deprecated Use Reanimated 3
23
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
24
- */
25
- createAnimation<S extends AnimationState = AnimationState>(cb: (t: number, state: S | undefined) => S): SkiaAnimation;
26
- };
@@ -1,48 +0,0 @@
1
- const {
2
- SkiaValueApi
3
- } = global;
4
-
5
- const deprecatedWarning = () => {
6
- console.warn(`Skia values are deprecated and will be removed in the next Skia release.
7
- Please use Reanimated instead: https://shopify.github.io/react-native-skia/docs/animations/animations`);
8
- };
9
-
10
- export const ValueApi = {
11
- /**
12
- * @deprecated Use Reanimated 3
13
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
14
- */
15
- createValue(initialValue) {
16
- deprecatedWarning();
17
- return SkiaValueApi.createValue(initialValue);
18
- },
19
-
20
- /**
21
- * @deprecated Use Reanimated 3
22
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
23
- */
24
- createComputedValue(cb, values) {
25
- deprecatedWarning();
26
- return SkiaValueApi.createComputedValue(cb, values);
27
- },
28
-
29
- /**
30
- * @deprecated Use Reanimated 3
31
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
32
- */
33
- createClockValue() {
34
- deprecatedWarning();
35
- return SkiaValueApi.createClockValue();
36
- },
37
-
38
- /**
39
- * @deprecated Use Reanimated 3
40
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
41
- */
42
- createAnimation(cb) {
43
- deprecatedWarning();
44
- return SkiaValueApi.createAnimation(cb);
45
- }
46
-
47
- };
48
- //# sourceMappingURL=api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["SkiaValueApi","global","deprecatedWarning","console","warn","ValueApi","createValue","initialValue","createComputedValue","cb","values","createClockValue","createAnimation"],"sources":["api.ts"],"sourcesContent":["import type {\n AnimationState,\n ISkiaValueApi,\n SkiaAnimation,\n SkiaClockValue,\n SkiaMutableValue,\n SkiaValue,\n} from \"./types\";\n\ndeclare global {\n var SkiaValueApi: ISkiaValueApi;\n}\n\nconst { SkiaValueApi } = global;\n\nconst deprecatedWarning = () => {\n console.warn(\n `Skia values are deprecated and will be removed in the next Skia release.\nPlease use Reanimated instead: https://shopify.github.io/react-native-skia/docs/animations/animations`\n );\n};\n\nexport const ValueApi = {\n /**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n */\n createValue<T>(initialValue: T): SkiaMutableValue<T> {\n deprecatedWarning();\n return SkiaValueApi.createValue(initialValue);\n },\n /**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n */\n createComputedValue<R>(\n cb: () => R,\n values: SkiaValue<unknown>[]\n ): SkiaValue<R> {\n deprecatedWarning();\n return SkiaValueApi.createComputedValue(cb, values);\n },\n /**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n */\n createClockValue(): SkiaClockValue {\n deprecatedWarning();\n return SkiaValueApi.createClockValue();\n },\n /**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n */\n createAnimation<S extends AnimationState = AnimationState>(\n cb: (t: number, state: S | undefined) => S\n ): SkiaAnimation {\n deprecatedWarning();\n return SkiaValueApi.createAnimation(cb);\n },\n};\n"],"mappings":"AAaA,MAAM;EAAEA;AAAF,IAAmBC,MAAzB;;AAEA,MAAMC,iBAAiB,GAAG,MAAM;EAC9BC,OAAO,CAACC,IAAR,CACG;AACL,sGAFE;AAID,CALD;;AAOA,OAAO,MAAMC,QAAQ,GAAG;EACtB;AACF;AACA;AACA;EACEC,WAAW,CAAIC,YAAJ,EAA0C;IACnDL,iBAAiB;IACjB,OAAOF,YAAY,CAACM,WAAb,CAAyBC,YAAzB,CAAP;EACD,CARqB;;EAStB;AACF;AACA;AACA;EACEC,mBAAmB,CACjBC,EADiB,EAEjBC,MAFiB,EAGH;IACdR,iBAAiB;IACjB,OAAOF,YAAY,CAACQ,mBAAb,CAAiCC,EAAjC,EAAqCC,MAArC,CAAP;EACD,CAnBqB;;EAoBtB;AACF;AACA;AACA;EACEC,gBAAgB,GAAmB;IACjCT,iBAAiB;IACjB,OAAOF,YAAY,CAACW,gBAAb,EAAP;EACD,CA3BqB;;EA4BtB;AACF;AACA;AACA;EACEC,eAAe,CACbH,EADa,EAEE;IACfP,iBAAiB;IACjB,OAAOF,YAAY,CAACY,eAAb,CAA6BH,EAA7B,CAAP;EACD;;AArCqB,CAAjB"}
@@ -1,2 +0,0 @@
1
- export declare const ValueApi: import("./types").ISkiaValueApi;
2
- export declare const createValue: <T>(initialValue: T) => import("./types").SkiaMutableValue<T>, createComputedValue: <R>(cb: () => R, values: import("./types").SkiaValue<unknown>[]) => import("./types").SkiaValue<R>;
@@ -1,7 +0,0 @@
1
- import { ValueApi as ValueApiWeb } from "./web";
2
- export const ValueApi = ValueApiWeb;
3
- export const {
4
- createValue,
5
- createComputedValue
6
- } = ValueApi;
7
- //# sourceMappingURL=api.web.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["ValueApi","ValueApiWeb","createValue","createComputedValue"],"sources":["api.web.ts"],"sourcesContent":["import { ValueApi as ValueApiWeb } from \"./web\";\n\nexport const ValueApi = ValueApiWeb;\n\nexport const { createValue, createComputedValue } = ValueApi;\n"],"mappings":"AAAA,SAASA,QAAQ,IAAIC,WAArB,QAAwC,OAAxC;AAEA,OAAO,MAAMD,QAAQ,GAAGC,WAAjB;AAEP,OAAO,MAAM;EAAEC,WAAF;EAAeC;AAAf,IAAuCH,QAA7C"}
@@ -1,4 +0,0 @@
1
- export * from "./useClockValue";
2
- export * from "./useComputedValue";
3
- export * from "./useValue";
4
- export * from "./useValueEffect";
@@ -1,5 +0,0 @@
1
- export * from "./useClockValue";
2
- export * from "./useComputedValue";
3
- export * from "./useValue";
4
- export * from "./useValueEffect";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./useClockValue\";\nexport * from \"./useComputedValue\";\nexport * from \"./useValue\";\nexport * from \"./useValueEffect\";\n"],"mappings":"AAAA,cAAc,iBAAd;AACA,cAAc,oBAAd;AACA,cAAc,YAAd;AACA,cAAc,kBAAd"}
@@ -1,9 +0,0 @@
1
- /**
2
- * @deprecated Use Reanimated 3
3
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
4
- *
5
- * @returns A new value that will be updated on every frame redraw with the
6
- * number of milliseconds elapsed since the value was started.
7
- * The clock is created in the stopped state.
8
- */
9
- export declare const useClockValue: () => import("..").SkiaClockValue;
@@ -1,20 +0,0 @@
1
- import { useEffect, useMemo } from "react";
2
- import { ValueApi } from "../api";
3
- /**
4
- * @deprecated Use Reanimated 3
5
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
6
- *
7
- * @returns A new value that will be updated on every frame redraw with the
8
- * number of milliseconds elapsed since the value was started.
9
- * The clock is created in the stopped state.
10
- */
11
-
12
- export const useClockValue = () => {
13
- const clock = useMemo(() => ValueApi.createClockValue(), []);
14
- useEffect(() => {
15
- clock.start();
16
- return clock.stop;
17
- }, [clock]);
18
- return clock;
19
- };
20
- //# sourceMappingURL=useClockValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useMemo","ValueApi","useClockValue","clock","createClockValue","start","stop"],"sources":["useClockValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * @returns A new value that will be updated on every frame redraw with the\n * number of milliseconds elapsed since the value was started.\n * The clock is created in the stopped state.\n */\n\nexport const useClockValue = () => {\n const clock = useMemo(() => ValueApi.createClockValue(), []);\n useEffect(() => {\n clock.start();\n return clock.stop;\n }, [clock]);\n return clock;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAO,MAAMC,aAAa,GAAG,MAAM;EACjC,MAAMC,KAAK,GAAGH,OAAO,CAAC,MAAMC,QAAQ,CAACG,gBAAT,EAAP,EAAoC,EAApC,CAArB;EACAL,SAAS,CAAC,MAAM;IACdI,KAAK,CAACE,KAAN;IACA,OAAOF,KAAK,CAACG,IAAb;EACD,CAHQ,EAGN,CAACH,KAAD,CAHM,CAAT;EAIA,OAAOA,KAAP;AACD,CAPM"}
@@ -1,11 +0,0 @@
1
- /**
2
- * @deprecated Use Reanimated 3
3
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
4
- *
5
- * Creates a new computed value - a value that will calculate its value depending
6
- * on other values.
7
- * @param cb Callback to calculate new value
8
- * @param values Dependant values
9
- * @returns A readonly value
10
- */
11
- export declare const useComputedValue: <R>(cb: () => R, values: unknown[]) => import("..").SkiaValue<R>;
@@ -1,21 +0,0 @@
1
- import { useEffect, useMemo } from "react";
2
- import { ValueApi } from "../api";
3
- import { isValue } from "../../renderer/processors/Animations";
4
- /**
5
- * @deprecated Use Reanimated 3
6
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
7
- *
8
- * Creates a new computed value - a value that will calculate its value depending
9
- * on other values.
10
- * @param cb Callback to calculate new value
11
- * @param values Dependant values
12
- * @returns A readonly value
13
- */
14
-
15
- export const useComputedValue = (cb, values) => {
16
- const value = useMemo(() => ValueApi.createComputedValue(cb, values.filter(isValue)), // eslint-disable-next-line react-hooks/exhaustive-deps
17
- values);
18
- useEffect(() => () => value.dispose(), [value]);
19
- return value;
20
- };
21
- //# sourceMappingURL=useComputedValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useMemo","ValueApi","isValue","useComputedValue","cb","values","value","createComputedValue","filter","dispose"],"sources":["useComputedValue.ts"],"sourcesContent":["import { useEffect, useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport { isValue } from \"../../renderer/processors/Animations\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Creates a new computed value - a value that will calculate its value depending\n * on other values.\n * @param cb Callback to calculate new value\n * @param values Dependant values\n * @returns A readonly value\n */\nexport const useComputedValue = <R>(cb: () => R, values: unknown[]) => {\n const value = useMemo(\n () => ValueApi.createComputedValue<R>(cb, values.filter(isValue)),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n values\n );\n useEffect(() => () => value.dispose(), [value]);\n return value;\n};\n"],"mappings":"AAAA,SAASA,SAAT,EAAoBC,OAApB,QAAmC,OAAnC;AAEA,SAASC,QAAT,QAAyB,QAAzB;AACA,SAASC,OAAT,QAAwB,sCAAxB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMC,gBAAgB,GAAG,CAAIC,EAAJ,EAAiBC,MAAjB,KAAuC;EACrE,MAAMC,KAAK,GAAGN,OAAO,CACnB,MAAMC,QAAQ,CAACM,mBAAT,CAAgCH,EAAhC,EAAoCC,MAAM,CAACG,MAAP,CAAcN,OAAd,CAApC,CADa,EAEnB;EACAG,MAHmB,CAArB;EAKAN,SAAS,CAAC,MAAM,MAAMO,KAAK,CAACG,OAAN,EAAb,EAA8B,CAACH,KAAD,CAA9B,CAAT;EACA,OAAOA,KAAP;AACD,CARM"}
@@ -1,10 +0,0 @@
1
- import type { SkiaMutableValue } from "../types";
2
- /**
3
- * @deprecated Use Reanimated 3
4
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
5
- *
6
- * Creates a new value that holds some data.
7
- * @param v Value to hold
8
- * @returns A Value of type of v
9
- */
10
- export declare const useValue: <T>(v: T) => SkiaMutableValue<T>;
@@ -1,16 +0,0 @@
1
- import { useMemo } from "react";
2
- import { ValueApi } from "../api";
3
-
4
- /**
5
- * @deprecated Use Reanimated 3
6
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
7
- *
8
- * Creates a new value that holds some data.
9
- * @param v Value to hold
10
- * @returns A Value of type of v
11
- */
12
- export const useValue = v => {
13
- // eslint-disable-next-line react-hooks/exhaustive-deps
14
- return useMemo(() => ValueApi.createValue(v), []);
15
- };
16
- //# sourceMappingURL=useValue.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useMemo","ValueApi","useValue","v","createValue"],"sources":["useValue.ts"],"sourcesContent":["import { useMemo } from \"react\";\n\nimport { ValueApi } from \"../api\";\nimport type { SkiaMutableValue } from \"../types\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Creates a new value that holds some data.\n * @param v Value to hold\n * @returns A Value of type of v\n */\nexport const useValue = <T>(v: T): SkiaMutableValue<T> => {\n // eslint-disable-next-line react-hooks/exhaustive-deps\n return useMemo(() => ValueApi.createValue(v), []);\n};\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,QAAT,QAAyB,QAAzB;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAOC,CAAJ,IAAkC;EACxD;EACA,OAAOH,OAAO,CAAC,MAAMC,QAAQ,CAACG,WAAT,CAAqBD,CAArB,CAAP,EAAgC,EAAhC,CAAd;AACD,CAHM"}
@@ -1,10 +0,0 @@
1
- import type { SkiaValue } from "../types";
2
- /**
3
- * @deprecated Use Reanimated 3
4
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
5
- *
6
- * Sets up an effect that will be run whenever the value changes
7
- * @param value Value to subscribe to changes on
8
- * @param cb Callback to run when value changes
9
- */
10
- export declare const useValueEffect: <T>(value: SkiaValue<T>, cb: (v: T) => void) => void;
@@ -1,16 +0,0 @@
1
- import { useEffect } from "react";
2
-
3
- /**
4
- * @deprecated Use Reanimated 3
5
- * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations
6
- *
7
- * Sets up an effect that will be run whenever the value changes
8
- * @param value Value to subscribe to changes on
9
- * @param cb Callback to run when value changes
10
- */
11
- export const useValueEffect = (value, cb) => {
12
- useEffect(() => {
13
- return value.addListener(cb); // eslint-disable-next-line react-hooks/exhaustive-deps
14
- }, [value]);
15
- };
16
- //# sourceMappingURL=useValueEffect.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useValueEffect","value","cb","addListener"],"sources":["useValueEffect.ts"],"sourcesContent":["import { useEffect } from \"react\";\n\nimport type { SkiaValue } from \"../types\";\n\n/**\n * @deprecated Use Reanimated 3\n * for animating Skia: https://shopify.github.io/react-native-skia/docs/animations/animations\n *\n * Sets up an effect that will be run whenever the value changes\n * @param value Value to subscribe to changes on\n * @param cb Callback to run when value changes\n */\nexport const useValueEffect = <T>(value: SkiaValue<T>, cb: (v: T) => void) => {\n useEffect(() => {\n return value.addListener(cb);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [value]);\n};\n"],"mappings":"AAAA,SAASA,SAAT,QAA0B,OAA1B;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAG,CAAIC,KAAJ,EAAyBC,EAAzB,KAAgD;EAC5EH,SAAS,CAAC,MAAM;IACd,OAAOE,KAAK,CAACE,WAAN,CAAkBD,EAAlB,CAAP,CADc,CAEd;EACD,CAHQ,EAGN,CAACD,KAAD,CAHM,CAAT;AAID,CALM"}
@@ -1,4 +0,0 @@
1
- export * from "./types";
2
- export * from "./hooks";
3
- export * from "./api";
4
- export * from "./selector";
@@ -1,5 +0,0 @@
1
- export * from "./types";
2
- export * from "./hooks";
3
- export * from "./api";
4
- export * from "./selector";
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./types\";\nexport * from \"./hooks\";\nexport * from \"./api\";\nexport * from \"./selector\";\n"],"mappings":"AAAA,cAAc,SAAd;AACA,cAAc,SAAd;AACA,cAAc,OAAd;AACA,cAAc,YAAd"}
@@ -1,14 +0,0 @@
1
- import type { SkiaValue } from "./types";
2
- export type SkiaSelector<TReturn, TInput = unknown> = {
3
- value: SkiaValue<TInput>;
4
- selector: (v: TInput) => TReturn;
5
- };
6
- /**
7
- * Wraps a Skia Value with a selector function. The selector function can access the
8
- * inner values of the Skia Value so that we can dynamically ready array values and
9
- * object values when doing animations in Skia.
10
- * @param value Dependant value
11
- * @param selector Selector function to calculate new value from the Skia Value's value
12
- * @returns A descriptor that will be used by the reconciler to calculate the value
13
- */
14
- export declare const Selector: <TInput, TReturn>(value: SkiaValue<TInput>, selector: (v: TInput) => TReturn) => SkiaSelector<TReturn, TInput>;
@@ -1,15 +0,0 @@
1
- /**
2
- * Wraps a Skia Value with a selector function. The selector function can access the
3
- * inner values of the Skia Value so that we can dynamically ready array values and
4
- * object values when doing animations in Skia.
5
- * @param value Dependant value
6
- * @param selector Selector function to calculate new value from the Skia Value's value
7
- * @returns A descriptor that will be used by the reconciler to calculate the value
8
- */
9
- export const Selector = (value, selector) => {
10
- return {
11
- selector,
12
- value
13
- };
14
- };
15
- //# sourceMappingURL=selector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Selector","value","selector"],"sources":["selector.ts"],"sourcesContent":["import type { SkiaValue } from \"./types\";\n\nexport type SkiaSelector<TReturn, TInput = unknown> = {\n value: SkiaValue<TInput>;\n selector: (v: TInput) => TReturn;\n};\n\n/**\n * Wraps a Skia Value with a selector function. The selector function can access the\n * inner values of the Skia Value so that we can dynamically ready array values and\n * object values when doing animations in Skia.\n * @param value Dependant value\n * @param selector Selector function to calculate new value from the Skia Value's value\n * @returns A descriptor that will be used by the reconciler to calculate the value\n */\nexport const Selector = <TInput, TReturn>(\n value: SkiaValue<TInput>,\n selector: (v: TInput) => TReturn\n): SkiaSelector<TReturn, TInput> => {\n return {\n selector,\n value,\n };\n};\n"],"mappings":"AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,QAAQ,GAAG,CACtBC,KADsB,EAEtBC,QAFsB,KAGY;EAClC,OAAO;IACLA,QADK;IAELD;EAFK,CAAP;AAID,CARM"}