@shopify/react-native-skia 0.1.229 → 0.1.230

Sign up to get free protection for your applications and to get access to all the features.
Files changed (591) hide show
  1. package/android/cpp/jni/JniLoad.cpp +0 -2
  2. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
  3. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
  4. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
  5. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
  6. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
  7. package/cpp/api/JsiSkApi.h +4 -1
  8. package/cpp/api/JsiSkParagraph.h +15 -0
  9. package/cpp/api/JsiSkParagraphBuilder.h +3 -32
  10. package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
  11. package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
  12. package/cpp/rnskia/RNSkManager.cpp +0 -6
  13. package/cpp/rnskia/RNSkView.h +2 -91
  14. package/cpp/rnskia/dom/JsiDomApi.h +0 -9
  15. package/lib/commonjs/animation/index.d.ts +0 -3
  16. package/lib/commonjs/animation/index.js +0 -39
  17. package/lib/commonjs/animation/index.js.map +1 -1
  18. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +1 -2
  19. package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
  20. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  21. package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
  22. package/lib/commonjs/dom/nodes/Node.js +0 -5
  23. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  24. package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
  25. package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
  26. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  27. package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
  28. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  29. package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
  30. package/lib/commonjs/dom/types/NodeType.js +0 -1
  31. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  32. package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
  33. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  34. package/lib/commonjs/index.d.ts +0 -1
  35. package/lib/commonjs/index.js +0 -14
  36. package/lib/commonjs/index.js.map +1 -1
  37. package/lib/commonjs/mock/index.js +0 -4
  38. package/lib/commonjs/mock/index.js.map +1 -1
  39. package/lib/commonjs/renderer/Canvas.js +2 -21
  40. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  41. package/lib/commonjs/renderer/Container.d.ts +1 -3
  42. package/lib/commonjs/renderer/Container.js +4 -6
  43. package/lib/commonjs/renderer/Container.js.map +1 -1
  44. package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
  45. package/lib/commonjs/renderer/HostComponents.js +0 -3
  46. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  47. package/lib/commonjs/renderer/HostConfig.js +2 -23
  48. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  49. package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
  50. package/lib/commonjs/renderer/Reconciler.js +3 -18
  51. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  52. package/lib/commonjs/renderer/components/index.d.ts +0 -1
  53. package/lib/commonjs/renderer/components/index.js +0 -13
  54. package/lib/commonjs/renderer/components/index.js.map +1 -1
  55. package/lib/commonjs/renderer/index.d.ts +0 -1
  56. package/lib/commonjs/renderer/index.js +0 -13
  57. package/lib/commonjs/renderer/index.js.map +1 -1
  58. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
  59. package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
  60. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  61. package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
  62. package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
  63. package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
  64. package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
  65. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  66. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  67. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  68. package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
  69. package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
  70. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  71. package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
  72. package/lib/commonjs/views/SkiaDomView.js +3 -14
  73. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  74. package/lib/commonjs/views/SkiaDomView.web.js +4 -14
  75. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  76. package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
  77. package/lib/commonjs/views/SkiaPictureView.js +3 -14
  78. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  79. package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
  80. package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
  81. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
  82. package/lib/commonjs/views/index.d.ts +0 -2
  83. package/lib/commonjs/views/index.js +0 -26
  84. package/lib/commonjs/views/index.js.map +1 -1
  85. package/lib/commonjs/views/types.d.ts +2 -15
  86. package/lib/commonjs/views/types.js.map +1 -1
  87. package/lib/module/animation/index.d.ts +0 -3
  88. package/lib/module/animation/index.js +0 -3
  89. package/lib/module/animation/index.js.map +1 -1
  90. package/lib/module/dom/nodes/JsiSkDOM.d.ts +1 -2
  91. package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
  92. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  93. package/lib/module/dom/nodes/Node.d.ts +0 -3
  94. package/lib/module/dom/nodes/Node.js +0 -5
  95. package/lib/module/dom/nodes/Node.js.map +1 -1
  96. package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
  97. package/lib/module/dom/nodes/drawings/index.js +0 -1
  98. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  99. package/lib/module/dom/types/Drawings.d.ts +0 -4
  100. package/lib/module/dom/types/Drawings.js.map +1 -1
  101. package/lib/module/dom/types/NodeType.d.ts +0 -1
  102. package/lib/module/dom/types/NodeType.js +0 -1
  103. package/lib/module/dom/types/NodeType.js.map +1 -1
  104. package/lib/module/dom/types/SkDOM.d.ts +1 -2
  105. package/lib/module/dom/types/SkDOM.js.map +1 -1
  106. package/lib/module/index.d.ts +0 -1
  107. package/lib/module/index.js +0 -1
  108. package/lib/module/index.js.map +1 -1
  109. package/lib/module/mock/index.js +1 -4
  110. package/lib/module/mock/index.js.map +1 -1
  111. package/lib/module/renderer/Canvas.js +2 -20
  112. package/lib/module/renderer/Canvas.js.map +1 -1
  113. package/lib/module/renderer/Container.d.ts +1 -3
  114. package/lib/module/renderer/Container.js +4 -6
  115. package/lib/module/renderer/Container.js.map +1 -1
  116. package/lib/module/renderer/HostComponents.d.ts +1 -6
  117. package/lib/module/renderer/HostComponents.js +0 -3
  118. package/lib/module/renderer/HostComponents.js.map +1 -1
  119. package/lib/module/renderer/HostConfig.js +3 -23
  120. package/lib/module/renderer/HostConfig.js.map +1 -1
  121. package/lib/module/renderer/Reconciler.d.ts +1 -5
  122. package/lib/module/renderer/Reconciler.js +3 -16
  123. package/lib/module/renderer/Reconciler.js.map +1 -1
  124. package/lib/module/renderer/components/index.d.ts +0 -1
  125. package/lib/module/renderer/components/index.js +0 -1
  126. package/lib/module/renderer/components/index.js.map +1 -1
  127. package/lib/module/renderer/index.d.ts +0 -1
  128. package/lib/module/renderer/index.js +0 -1
  129. package/lib/module/renderer/index.js.map +1 -1
  130. package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
  131. package/lib/module/renderer/processors/Animations/Animations.js +0 -28
  132. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  133. package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
  134. package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
  135. package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
  136. package/lib/module/skia/web/JsiSkParagraph.js +12 -0
  137. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  138. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  139. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  140. package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
  141. package/lib/module/views/SkiaBaseWebView.js +0 -17
  142. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  143. package/lib/module/views/SkiaDomView.d.ts +0 -7
  144. package/lib/module/views/SkiaDomView.js +2 -13
  145. package/lib/module/views/SkiaDomView.js.map +1 -1
  146. package/lib/module/views/SkiaDomView.web.js +4 -13
  147. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  148. package/lib/module/views/SkiaPictureView.d.ts +0 -7
  149. package/lib/module/views/SkiaPictureView.js +2 -13
  150. package/lib/module/views/SkiaPictureView.js.map +1 -1
  151. package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
  152. package/lib/module/views/SkiaViewNativeId.js +4 -0
  153. package/lib/module/views/SkiaViewNativeId.js.map +1 -0
  154. package/lib/module/views/index.d.ts +0 -2
  155. package/lib/module/views/index.js +0 -2
  156. package/lib/module/views/index.js.map +1 -1
  157. package/lib/module/views/types.d.ts +2 -15
  158. package/lib/module/views/types.js.map +1 -1
  159. package/lib/typescript/src/animation/index.d.ts +0 -3
  160. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +1 -2
  161. package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
  162. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
  163. package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
  164. package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
  165. package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
  166. package/lib/typescript/src/index.d.ts +0 -1
  167. package/lib/typescript/src/renderer/Container.d.ts +1 -3
  168. package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
  169. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
  170. package/lib/typescript/src/renderer/components/index.d.ts +0 -1
  171. package/lib/typescript/src/renderer/index.d.ts +0 -1
  172. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
  173. package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
  174. package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
  175. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
  176. package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
  177. package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
  178. package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
  179. package/lib/typescript/src/views/index.d.ts +0 -2
  180. package/lib/typescript/src/views/types.d.ts +2 -15
  181. package/package.json +1 -1
  182. package/src/animation/index.ts +0 -3
  183. package/src/dom/nodes/JsiSkDOM.ts +0 -12
  184. package/src/dom/nodes/Node.ts +0 -5
  185. package/src/dom/nodes/drawings/index.ts +0 -1
  186. package/src/dom/types/Drawings.ts +0 -5
  187. package/src/dom/types/NodeType.ts +0 -1
  188. package/src/dom/types/SkDOM.ts +0 -4
  189. package/src/index.ts +0 -1
  190. package/src/mock/index.ts +0 -3
  191. package/src/renderer/Canvas.tsx +3 -21
  192. package/src/renderer/Container.tsx +1 -4
  193. package/src/renderer/HostComponents.ts +0 -13
  194. package/src/renderer/HostConfig.ts +3 -24
  195. package/src/renderer/Reconciler.tsx +1 -19
  196. package/src/renderer/components/index.ts +0 -1
  197. package/src/renderer/index.ts +0 -1
  198. package/src/renderer/processors/Animations/Animations.ts +1 -51
  199. package/src/skia/types/Paragraph/Paragraph.ts +25 -0
  200. package/src/skia/web/JsiSkParagraph.ts +11 -0
  201. package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
  202. package/src/views/SkiaBaseWebView.tsx +0 -19
  203. package/src/views/SkiaDomView.tsx +1 -13
  204. package/src/views/SkiaDomView.web.tsx +1 -6
  205. package/src/views/SkiaPictureView.tsx +1 -13
  206. package/src/views/SkiaViewNativeId.ts +1 -0
  207. package/src/views/index.ts +0 -2
  208. package/src/views/types.ts +2 -26
  209. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
  210. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
  211. package/cpp/rnskia/RNSkAnimation.h +0 -65
  212. package/cpp/rnskia/RNSkValueApi.h +0 -72
  213. package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
  214. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
  215. package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
  216. package/cpp/rnskia/values/RNSkClockValue.h +0 -140
  217. package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
  218. package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
  219. package/cpp/rnskia/values/RNSkValue.h +0 -116
  220. package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
  221. package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
  222. package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
  223. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
  224. package/lib/commonjs/animation/decay/decay.d.ts +0 -2
  225. package/lib/commonjs/animation/decay/decay.js +0 -42
  226. package/lib/commonjs/animation/decay/decay.js.map +0 -1
  227. package/lib/commonjs/animation/decay/index.d.ts +0 -1
  228. package/lib/commonjs/animation/decay/index.js +0 -14
  229. package/lib/commonjs/animation/decay/index.js.map +0 -1
  230. package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
  231. package/lib/commonjs/animation/decay/runDecay.js +0 -48
  232. package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
  233. package/lib/commonjs/animation/decay/types.d.ts +0 -21
  234. package/lib/commonjs/animation/decay/types.js +0 -6
  235. package/lib/commonjs/animation/decay/types.js.map +0 -1
  236. package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
  237. package/lib/commonjs/animation/spring/Spring.js +0 -77
  238. package/lib/commonjs/animation/spring/Spring.js.map +0 -1
  239. package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
  240. package/lib/commonjs/animation/spring/functions/index.js +0 -14
  241. package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
  242. package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
  243. package/lib/commonjs/animation/spring/functions/spring.js +0 -94
  244. package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
  245. package/lib/commonjs/animation/spring/index.d.ts +0 -3
  246. package/lib/commonjs/animation/spring/index.js +0 -30
  247. package/lib/commonjs/animation/spring/index.js.map +0 -1
  248. package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
  249. package/lib/commonjs/animation/spring/runSpring.js +0 -35
  250. package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
  251. package/lib/commonjs/animation/spring/types.d.ts +0 -6
  252. package/lib/commonjs/animation/spring/types.js +0 -2
  253. package/lib/commonjs/animation/spring/types.js.map +0 -1
  254. package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
  255. package/lib/commonjs/animation/spring/useSpring.js +0 -27
  256. package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
  257. package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
  258. package/lib/commonjs/animation/timing/Easing.js +0 -108
  259. package/lib/commonjs/animation/timing/Easing.js.map +0 -1
  260. package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
  261. package/lib/commonjs/animation/timing/createTiming.js +0 -55
  262. package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
  263. package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
  264. package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
  265. package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
  266. package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
  267. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
  268. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
  269. package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
  270. package/lib/commonjs/animation/timing/functions/index.js +0 -54
  271. package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
  272. package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
  273. package/lib/commonjs/animation/timing/functions/timing.js +0 -50
  274. package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
  275. package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
  276. package/lib/commonjs/animation/timing/functions/types.js +0 -2
  277. package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
  278. package/lib/commonjs/animation/timing/index.d.ts +0 -4
  279. package/lib/commonjs/animation/timing/index.js +0 -38
  280. package/lib/commonjs/animation/timing/index.js.map +0 -1
  281. package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
  282. package/lib/commonjs/animation/timing/runTiming.js +0 -36
  283. package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
  284. package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
  285. package/lib/commonjs/animation/timing/useLoop.js +0 -25
  286. package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
  287. package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
  288. package/lib/commonjs/animation/timing/useTiming.js +0 -67
  289. package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
  290. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  291. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
  292. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  293. package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
  294. package/lib/commonjs/renderer/DependencyManager.js +0 -185
  295. package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
  296. package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
  297. package/lib/commonjs/renderer/components/Drawing.js +0 -22
  298. package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
  299. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  300. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
  301. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  302. package/lib/commonjs/values/api.d.ts +0 -26
  303. package/lib/commonjs/values/api.js +0 -55
  304. package/lib/commonjs/values/api.js.map +0 -1
  305. package/lib/commonjs/values/api.web.d.ts +0 -2
  306. package/lib/commonjs/values/api.web.js +0 -18
  307. package/lib/commonjs/values/api.web.js.map +0 -1
  308. package/lib/commonjs/values/hooks/index.d.ts +0 -4
  309. package/lib/commonjs/values/hooks/index.js +0 -58
  310. package/lib/commonjs/values/hooks/index.js.map +0 -1
  311. package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
  312. package/lib/commonjs/values/hooks/useClockValue.js +0 -30
  313. package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
  314. package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
  315. package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
  316. package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
  317. package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
  318. package/lib/commonjs/values/hooks/useValue.js +0 -26
  319. package/lib/commonjs/values/hooks/useValue.js.map +0 -1
  320. package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
  321. package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
  322. package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
  323. package/lib/commonjs/values/index.d.ts +0 -4
  324. package/lib/commonjs/values/index.js +0 -58
  325. package/lib/commonjs/values/index.js.map +0 -1
  326. package/lib/commonjs/values/selector.d.ts +0 -14
  327. package/lib/commonjs/values/selector.js +0 -24
  328. package/lib/commonjs/values/selector.js.map +0 -1
  329. package/lib/commonjs/values/types.d.ts +0 -63
  330. package/lib/commonjs/values/types.js +0 -2
  331. package/lib/commonjs/values/types.js.map +0 -1
  332. package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
  333. package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
  334. package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
  335. package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
  336. package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
  337. package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
  338. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
  339. package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
  340. package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
  341. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
  342. package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
  343. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
  344. package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
  345. package/lib/commonjs/values/web/RNSkValue.js +0 -73
  346. package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
  347. package/lib/commonjs/values/web/api.d.ts +0 -2
  348. package/lib/commonjs/values/web/api.js +0 -31
  349. package/lib/commonjs/values/web/api.js.map +0 -1
  350. package/lib/commonjs/values/web/index.d.ts +0 -1
  351. package/lib/commonjs/values/web/index.js +0 -19
  352. package/lib/commonjs/values/web/index.js.map +0 -1
  353. package/lib/commonjs/views/SkiaView.d.ts +0 -35
  354. package/lib/commonjs/views/SkiaView.js +0 -139
  355. package/lib/commonjs/views/SkiaView.js.map +0 -1
  356. package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
  357. package/lib/commonjs/views/SkiaView.web.js +0 -30
  358. package/lib/commonjs/views/SkiaView.web.js.map +0 -1
  359. package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
  360. package/lib/commonjs/views/useDrawCallback.js +0 -23
  361. package/lib/commonjs/views/useDrawCallback.js.map +0 -1
  362. package/lib/module/animation/decay/decay.d.ts +0 -2
  363. package/lib/module/animation/decay/decay.js +0 -33
  364. package/lib/module/animation/decay/decay.js.map +0 -1
  365. package/lib/module/animation/decay/index.d.ts +0 -1
  366. package/lib/module/animation/decay/index.js +0 -2
  367. package/lib/module/animation/decay/index.js.map +0 -1
  368. package/lib/module/animation/decay/runDecay.d.ts +0 -10
  369. package/lib/module/animation/decay/runDecay.js +0 -38
  370. package/lib/module/animation/decay/runDecay.js.map +0 -1
  371. package/lib/module/animation/decay/types.d.ts +0 -21
  372. package/lib/module/animation/decay/types.js +0 -2
  373. package/lib/module/animation/decay/types.js.map +0 -1
  374. package/lib/module/animation/spring/Spring.d.ts +0 -65
  375. package/lib/module/animation/spring/Spring.js +0 -69
  376. package/lib/module/animation/spring/Spring.js.map +0 -1
  377. package/lib/module/animation/spring/functions/index.d.ts +0 -1
  378. package/lib/module/animation/spring/functions/index.js +0 -2
  379. package/lib/module/animation/spring/functions/index.js.map +0 -1
  380. package/lib/module/animation/spring/functions/spring.d.ts +0 -10
  381. package/lib/module/animation/spring/functions/spring.js +0 -85
  382. package/lib/module/animation/spring/functions/spring.js.map +0 -1
  383. package/lib/module/animation/spring/index.d.ts +0 -3
  384. package/lib/module/animation/spring/index.js +0 -4
  385. package/lib/module/animation/spring/index.js.map +0 -1
  386. package/lib/module/animation/spring/runSpring.d.ts +0 -19
  387. package/lib/module/animation/spring/runSpring.js +0 -24
  388. package/lib/module/animation/spring/runSpring.js.map +0 -1
  389. package/lib/module/animation/spring/types.d.ts +0 -6
  390. package/lib/module/animation/spring/types.js +0 -2
  391. package/lib/module/animation/spring/types.js.map +0 -1
  392. package/lib/module/animation/spring/useSpring.d.ts +0 -13
  393. package/lib/module/animation/spring/useSpring.js +0 -16
  394. package/lib/module/animation/spring/useSpring.js.map +0 -1
  395. package/lib/module/animation/timing/Easing.d.ts +0 -19
  396. package/lib/module/animation/timing/Easing.js +0 -98
  397. package/lib/module/animation/timing/Easing.js.map +0 -1
  398. package/lib/module/animation/timing/createTiming.d.ts +0 -17
  399. package/lib/module/animation/timing/createTiming.js +0 -49
  400. package/lib/module/animation/timing/createTiming.js.map +0 -1
  401. package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
  402. package/lib/module/animation/timing/functions/bezier.js +0 -141
  403. package/lib/module/animation/timing/functions/bezier.js.map +0 -1
  404. package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
  405. package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
  406. package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
  407. package/lib/module/animation/timing/functions/index.d.ts +0 -4
  408. package/lib/module/animation/timing/functions/index.js +0 -5
  409. package/lib/module/animation/timing/functions/index.js.map +0 -1
  410. package/lib/module/animation/timing/functions/timing.d.ts +0 -17
  411. package/lib/module/animation/timing/functions/timing.js +0 -41
  412. package/lib/module/animation/timing/functions/timing.js.map +0 -1
  413. package/lib/module/animation/timing/functions/types.d.ts +0 -7
  414. package/lib/module/animation/timing/functions/types.js +0 -2
  415. package/lib/module/animation/timing/functions/types.js.map +0 -1
  416. package/lib/module/animation/timing/index.d.ts +0 -4
  417. package/lib/module/animation/timing/index.js +0 -5
  418. package/lib/module/animation/timing/index.js.map +0 -1
  419. package/lib/module/animation/timing/runTiming.d.ts +0 -19
  420. package/lib/module/animation/timing/runTiming.js +0 -26
  421. package/lib/module/animation/timing/runTiming.js.map +0 -1
  422. package/lib/module/animation/timing/useLoop.d.ts +0 -11
  423. package/lib/module/animation/timing/useLoop.js +0 -16
  424. package/lib/module/animation/timing/useLoop.js.map +0 -1
  425. package/lib/module/animation/timing/useTiming.d.ts +0 -13
  426. package/lib/module/animation/timing/useTiming.js +0 -57
  427. package/lib/module/animation/timing/useTiming.js.map +0 -1
  428. package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  429. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
  430. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  431. package/lib/module/renderer/DependencyManager.d.ts +0 -46
  432. package/lib/module/renderer/DependencyManager.js +0 -174
  433. package/lib/module/renderer/DependencyManager.js.map +0 -1
  434. package/lib/module/renderer/components/Drawing.d.ts +0 -8
  435. package/lib/module/renderer/components/Drawing.js +0 -11
  436. package/lib/module/renderer/components/Drawing.js.map +0 -1
  437. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  438. package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
  439. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  440. package/lib/module/values/api.d.ts +0 -26
  441. package/lib/module/values/api.js +0 -48
  442. package/lib/module/values/api.js.map +0 -1
  443. package/lib/module/values/api.web.d.ts +0 -2
  444. package/lib/module/values/api.web.js +0 -7
  445. package/lib/module/values/api.web.js.map +0 -1
  446. package/lib/module/values/hooks/index.d.ts +0 -4
  447. package/lib/module/values/hooks/index.js +0 -5
  448. package/lib/module/values/hooks/index.js.map +0 -1
  449. package/lib/module/values/hooks/useClockValue.d.ts +0 -9
  450. package/lib/module/values/hooks/useClockValue.js +0 -20
  451. package/lib/module/values/hooks/useClockValue.js.map +0 -1
  452. package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
  453. package/lib/module/values/hooks/useComputedValue.js +0 -21
  454. package/lib/module/values/hooks/useComputedValue.js.map +0 -1
  455. package/lib/module/values/hooks/useValue.d.ts +0 -10
  456. package/lib/module/values/hooks/useValue.js +0 -16
  457. package/lib/module/values/hooks/useValue.js.map +0 -1
  458. package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
  459. package/lib/module/values/hooks/useValueEffect.js +0 -16
  460. package/lib/module/values/hooks/useValueEffect.js.map +0 -1
  461. package/lib/module/values/index.d.ts +0 -4
  462. package/lib/module/values/index.js +0 -5
  463. package/lib/module/values/index.js.map +0 -1
  464. package/lib/module/values/selector.d.ts +0 -14
  465. package/lib/module/values/selector.js +0 -15
  466. package/lib/module/values/selector.js.map +0 -1
  467. package/lib/module/values/types.d.ts +0 -63
  468. package/lib/module/values/types.js +0 -2
  469. package/lib/module/values/types.js.map +0 -1
  470. package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
  471. package/lib/module/values/web/RNSkAnimation.js +0 -36
  472. package/lib/module/values/web/RNSkAnimation.js.map +0 -1
  473. package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
  474. package/lib/module/values/web/RNSkClockValue.js +0 -65
  475. package/lib/module/values/web/RNSkClockValue.js.map +0 -1
  476. package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
  477. package/lib/module/values/web/RNSkComputedValue.js +0 -49
  478. package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
  479. package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
  480. package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
  481. package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
  482. package/lib/module/values/web/RNSkValue.d.ts +0 -14
  483. package/lib/module/values/web/RNSkValue.js +0 -63
  484. package/lib/module/values/web/RNSkValue.js.map +0 -1
  485. package/lib/module/values/web/api.d.ts +0 -2
  486. package/lib/module/values/web/api.js +0 -19
  487. package/lib/module/values/web/api.js.map +0 -1
  488. package/lib/module/values/web/index.d.ts +0 -1
  489. package/lib/module/values/web/index.js +0 -2
  490. package/lib/module/values/web/index.js.map +0 -1
  491. package/lib/module/views/SkiaView.d.ts +0 -35
  492. package/lib/module/views/SkiaView.js +0 -119
  493. package/lib/module/views/SkiaView.js.map +0 -1
  494. package/lib/module/views/SkiaView.web.d.ts +0 -7
  495. package/lib/module/views/SkiaView.web.js +0 -20
  496. package/lib/module/views/SkiaView.web.js.map +0 -1
  497. package/lib/module/views/useDrawCallback.d.ts +0 -8
  498. package/lib/module/views/useDrawCallback.js +0 -14
  499. package/lib/module/views/useDrawCallback.js.map +0 -1
  500. package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
  501. package/lib/typescript/src/animation/decay/index.d.ts +0 -1
  502. package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
  503. package/lib/typescript/src/animation/decay/types.d.ts +0 -21
  504. package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
  505. package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
  506. package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
  507. package/lib/typescript/src/animation/spring/index.d.ts +0 -3
  508. package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
  509. package/lib/typescript/src/animation/spring/types.d.ts +0 -6
  510. package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
  511. package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
  512. package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
  513. package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
  514. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
  515. package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
  516. package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
  517. package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
  518. package/lib/typescript/src/animation/timing/index.d.ts +0 -4
  519. package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
  520. package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
  521. package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
  522. package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  523. package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
  524. package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
  525. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  526. package/lib/typescript/src/values/api.d.ts +0 -26
  527. package/lib/typescript/src/values/api.web.d.ts +0 -2
  528. package/lib/typescript/src/values/hooks/index.d.ts +0 -4
  529. package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
  530. package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
  531. package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
  532. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
  533. package/lib/typescript/src/values/index.d.ts +0 -4
  534. package/lib/typescript/src/values/selector.d.ts +0 -14
  535. package/lib/typescript/src/values/types.d.ts +0 -63
  536. package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
  537. package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
  538. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
  539. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
  540. package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
  541. package/lib/typescript/src/values/web/api.d.ts +0 -2
  542. package/lib/typescript/src/values/web/index.d.ts +0 -1
  543. package/lib/typescript/src/views/SkiaView.d.ts +0 -35
  544. package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
  545. package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
  546. package/src/animation/decay/decay.ts +0 -35
  547. package/src/animation/decay/index.ts +0 -1
  548. package/src/animation/decay/runDecay.ts +0 -40
  549. package/src/animation/decay/types.ts +0 -24
  550. package/src/animation/spring/Spring.ts +0 -61
  551. package/src/animation/spring/functions/index.ts +0 -1
  552. package/src/animation/spring/functions/spring.ts +0 -86
  553. package/src/animation/spring/index.ts +0 -3
  554. package/src/animation/spring/runSpring.ts +0 -40
  555. package/src/animation/spring/types.ts +0 -6
  556. package/src/animation/spring/useSpring.ts +0 -31
  557. package/src/animation/timing/Easing.ts +0 -102
  558. package/src/animation/timing/createTiming.ts +0 -62
  559. package/src/animation/timing/functions/bezier.ts +0 -165
  560. package/src/animation/timing/functions/getResolvedParams.ts +0 -50
  561. package/src/animation/timing/functions/index.ts +0 -4
  562. package/src/animation/timing/functions/timing.ts +0 -44
  563. package/src/animation/timing/functions/types.ts +0 -8
  564. package/src/animation/timing/index.ts +0 -4
  565. package/src/animation/timing/runTiming.ts +0 -36
  566. package/src/animation/timing/useLoop.ts +0 -21
  567. package/src/animation/timing/useTiming.ts +0 -71
  568. package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
  569. package/src/renderer/DependencyManager.tsx +0 -196
  570. package/src/renderer/components/Drawing.tsx +0 -12
  571. package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
  572. package/src/values/api.ts +0 -61
  573. package/src/values/api.web.ts +0 -5
  574. package/src/values/hooks/index.ts +0 -4
  575. package/src/values/hooks/useClockValue.ts +0 -21
  576. package/src/values/hooks/useComputedValue.ts +0 -24
  577. package/src/values/hooks/useValue.ts +0 -17
  578. package/src/values/hooks/useValueEffect.ts +0 -18
  579. package/src/values/index.ts +0 -4
  580. package/src/values/selector.ts +0 -24
  581. package/src/values/types.ts +0 -73
  582. package/src/values/web/RNSkAnimation.ts +0 -33
  583. package/src/values/web/RNSkClockValue.ts +0 -58
  584. package/src/values/web/RNSkComputedValue.ts +0 -49
  585. package/src/values/web/RNSkReadonlyValue.ts +0 -38
  586. package/src/values/web/RNSkValue.ts +0 -57
  587. package/src/values/web/api.ts +0 -33
  588. package/src/values/web/index.ts +0 -1
  589. package/src/views/SkiaView.tsx +0 -111
  590. package/src/views/SkiaView.web.tsx +0 -22
  591. package/src/views/useDrawCallback.ts +0 -19
@@ -1,2 +1 @@
1
1
  export * from "./components";
2
- export * from "./DependencyManager";
@@ -1,14 +1,7 @@
1
- import type { SkiaSelector, SkiaValue } from "../../../values";
2
1
  export type SharedValueType<T = number> = {
3
2
  value: T;
4
3
  };
5
- export declare const isValue: (value: unknown) => value is SkiaValue<unknown>;
6
- export declare const isSelector: <T, R>(value: unknown) => value is {
7
- selector: (v: T) => R;
8
- value: SkiaValue<T>;
9
- };
10
- export declare const isAnimated: <T>(props: AnimatedProps<T, never>) => boolean;
11
- export type AnimatedProp<T, P = any> = T | SkiaValue<T> | SkiaSelector<T, P> | SharedValueType<T>;
4
+ export type AnimatedProp<T> = T | SharedValueType<T>;
12
5
  export type AnimatedProps<T, O extends keyof T | never = never> = {
13
6
  [K in keyof T]: K extends "children" ? T[K] : K extends O ? T[K] : AnimatedProp<T[K]>;
14
7
  };
@@ -29,6 +29,29 @@ export interface SkParagraph extends SkJSIInstance<"Paragraph"> {
29
29
  * method to have been called first.
30
30
  */
31
31
  getMaxWidth(): number;
32
+ /**
33
+ * Returns the minimum intrinsic width of the paragraph.
34
+ * The minimum intrinsic width is the width beyond which increasing the width of the paragraph
35
+ * does not decrease the height. This is effectively the width at which the paragraph
36
+ * can no longer wrap lines and is forced to overflow.
37
+ * This method requires the layout method to have been called first.
38
+ * @returns {number} The minimum intrinsic width of the paragraph.
39
+ */
40
+ getMinIntrinsicWidth(): number;
41
+ /**
42
+ * Returns the maximum intrinsic width of the paragraph.
43
+ * The maximum intrinsic width is the width at which the paragraph can layout its content without line breaks,
44
+ * meaning it's the width of the widest line or the widest word if the widest line is shorter than that.
45
+ * This width represents the ideal width for the paragraph to display all content in a single line without overflow.
46
+ * This method requires the layout method to have been called first.
47
+ * @returns {number} The maximum intrinsic width of the paragraph.
48
+ */
49
+ getMaxIntrinsicWidth(): number;
50
+ /**
51
+ * Returns the width of the longest line in the paragraph.
52
+ * This method requires the layout method to have been called first.
53
+ */
54
+ getLongestLine(): number;
32
55
  /**
33
56
  * Returns the index of the glyph at the given position. This method requires
34
57
  * the layout method to have been called first.
@@ -4,6 +4,9 @@ import { HostObject } from "./Host";
4
4
  import type { JsiSkCanvas } from "./JsiSkCanvas";
5
5
  export declare class JsiSkParagraph extends HostObject<Paragraph, "Paragraph"> implements SkParagraph {
6
6
  constructor(CanvasKit: CanvasKit, ref: Paragraph);
7
+ getMinIntrinsicWidth(): number;
8
+ getMaxIntrinsicWidth(): number;
9
+ getLongestLine(): number;
7
10
  layout(width: number): void;
8
11
  paint(canvas: JsiSkCanvas, x: number, y: number): void;
9
12
  getHeight(): number;
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import type { PointerEvent } from "react";
3
3
  import type { SkRect, SkCanvas } from "../skia/types";
4
- import type { SkiaValue } from "../values";
5
4
  import type { DrawMode, SkiaBaseViewProps, TouchInfo } from "./types";
6
5
  import { TouchType } from "./types";
7
6
  export declare abstract class SkiaBaseWebView<TProps extends SkiaBaseViewProps> extends React.Component<TProps> {
@@ -50,12 +49,6 @@ export declare abstract class SkiaBaseWebView<TProps extends SkiaBaseViewProps>
50
49
  * @param mode Drawing mode to use.
51
50
  */
52
51
  setDrawMode(mode: DrawMode): void;
53
- /**
54
- * Registers one or move values as a dependant value of the Skia View. The view will
55
- * The view will redraw itself when any of the values change.
56
- * @param values Values to register
57
- */
58
- registerValues(_values: SkiaValue<unknown>[]): void;
59
52
  private handleTouchEvent;
60
53
  createTouchHandler(touchType: TouchType): (evt: PointerEvent) => void;
61
54
  private onStart;
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import type { SkRect } from "../skia/types";
3
- import type { SkiaValue } from "../values";
4
3
  import type { SkiaDomViewProps } from "./types";
5
4
  export declare class SkiaDomView extends React.Component<SkiaDomViewProps> {
6
5
  constructor(props: SkiaDomViewProps);
@@ -17,12 +16,6 @@ export declare class SkiaDomView extends React.Component<SkiaDomViewProps> {
17
16
  * Sends a redraw request to the native SkiaView.
18
17
  */
19
18
  redraw(): void;
20
- /**
21
- * Registers one or move values as a dependant value of the Skia View. The view will
22
- * The view will redraw itself when any of the values change.
23
- * @param values Values to register
24
- */
25
- registerValues(values: SkiaValue<unknown>[]): () => void;
26
19
  /**
27
20
  * Clear up the dom node when unmounting to release resources.
28
21
  */
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import type { SkRect } from "../skia/types";
3
- import type { SkiaValue } from "../values";
4
3
  import type { SkiaPictureViewProps } from "./types";
5
4
  export declare class SkiaPictureView extends React.Component<SkiaPictureViewProps> {
6
5
  constructor(props: SkiaPictureViewProps);
@@ -17,11 +16,5 @@ export declare class SkiaPictureView extends React.Component<SkiaPictureViewProp
17
16
  * Sends a redraw request to the native SkiaView.
18
17
  */
19
18
  redraw(): void;
20
- /**
21
- * Registers one or move values as a dependant value of the Skia View. The view will
22
- * The view will redraw itself when any of the values change.
23
- * @param values Values to register
24
- */
25
- registerValues(values: SkiaValue<unknown>[]): () => void;
26
19
  render(): React.JSX.Element;
27
20
  }
@@ -0,0 +1,3 @@
1
+ export declare const SkiaViewNativeId: {
2
+ current: number;
3
+ };
@@ -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,7 +1,6 @@
1
1
  import type { ViewProps } from "react-native";
2
2
  import type { GroupProps, RenderNode } from "../dom/types";
3
- import type { SkCanvas, SkImage, SkPicture, SkRect, SkSize } from "../skia/types";
4
- import type { SkiaMutableValue, SkiaValue } from "../values";
3
+ import type { SkImage, SkPicture, SkRect, SkSize } from "../skia/types";
5
4
  import type { SharedValueType } from "../renderer/processors/Animations/Animations";
6
5
  export type DrawMode = "continuous" | "default";
7
6
  export type NativeSkiaViewProps = ViewProps & {
@@ -38,7 +37,6 @@ export type TouchHandlers = {
38
37
  onEnd?: (touchInfo: ExtendedTouchInfo) => void;
39
38
  };
40
39
  export type TouchHandler = (touchInfo: Array<Array<TouchInfo>>) => void;
41
- export type RNSkiaDrawCallback = (canvas: SkCanvas, info: DrawingInfo) => void;
42
40
  /**
43
41
  * Listener interface for value changes
44
42
  */
@@ -49,7 +47,6 @@ export interface ValueListener {
49
47
  export interface ISkiaViewApi {
50
48
  setJsiProperty: <T>(nativeId: number, name: string, value: T) => void;
51
49
  callJsiMethod: <T extends Array<unknown>>(nativeId: number, name: string, ...args: T) => void;
52
- registerValuesInView: (nativeId: number, values: SkiaValue<unknown>[]) => () => void;
53
50
  requestRedraw: (nativeId: number) => void;
54
51
  makeImageSnapshot: (nativeId: number, rect?: SkRect) => SkImage;
55
52
  }
@@ -71,17 +68,7 @@ export interface SkiaBaseViewProps extends ViewProps {
71
68
  * Pass an animated value to the onSize property to get updates when
72
69
  * the Skia view is resized.
73
70
  */
74
- onSize?: SkiaMutableValue<SkSize> | SharedValueType<SkSize>;
75
- }
76
- export interface SkiaDrawViewProps extends SkiaBaseViewProps {
77
- /**
78
- * Draw callback. Will be called whenever the view is invalidated and
79
- * needs to redraw. This is either caused by a change in a react
80
- * property, a touch event, or a call to redraw. If the view is in
81
- * continuous mode the callback will be called 60 frames per second
82
- * by the native view.
83
- */
84
- onDraw?: RNSkiaDrawCallback;
71
+ onSize?: SharedValueType<SkSize>;
85
72
  }
86
73
  export interface SkiaPictureViewProps extends SkiaBaseViewProps {
87
74
  picture?: SkPicture;
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "setup-skia-web": "./scripts/setup-canvaskit.js"
8
8
  },
9
9
  "title": "React Native Skia",
10
- "version": "0.1.229",
10
+ "version": "0.1.230",
11
11
  "description": "High-performance React Native Graphics using Skia",
12
12
  "main": "lib/module/index.js",
13
13
  "files": [
@@ -1,4 +1 @@
1
- export * from "./timing";
2
- export * from "./spring";
3
- export * from "./decay";
4
1
  export * from "./functions";
@@ -11,7 +11,6 @@ import type {
11
11
  PaintProps,
12
12
  ShaderProps,
13
13
  ImageShaderProps,
14
- CustomDrawingNodeProps,
15
14
  LineProps,
16
15
  OvalProps,
17
16
  PatchProps,
@@ -72,7 +71,6 @@ import {
72
71
  VerticesNode,
73
72
  TextNode,
74
73
  OvalNode,
75
- CustomDrawingNode,
76
74
  TextPathNode,
77
75
  TextBlobNode,
78
76
  GlyphsNode,
@@ -172,16 +170,6 @@ export class JsiSkDOM implements SkDOM {
172
170
  : new PathNode(this.ctx, props);
173
171
  }
174
172
 
175
- CustomDrawing(props: CustomDrawingNodeProps) {
176
- console.warn(
177
- // eslint-disable-next-line max-len
178
- "The <Drawing /> component is deprecated and will be removed in the next release. For custom drawings, please sure the <Picture /> component: https://shopify.github.io/react-native-skia/docs/shapes/pictures/"
179
- );
180
- return NATIVE_DOM
181
- ? global.SkiaDomApi.CustomDrawingNode(props ?? {})
182
- : new CustomDrawingNode(this.ctx, props);
183
- }
184
-
185
173
  Line(props: LineProps) {
186
174
  return NATIVE_DOM
187
175
  ? global.SkiaDomApi.LineNode(props ?? {})
@@ -5,22 +5,18 @@ import type {
5
5
  NodeType,
6
6
  DeclarationType,
7
7
  } from "../types";
8
- import type { DependencyManager } from "../../renderer/DependencyManager";
9
8
  import type { DeclarationContext } from "../types/DeclarationContext";
10
9
 
11
10
  export interface NodeContext {
12
11
  Skia: Skia;
13
- depMgr: DependencyManager;
14
12
  }
15
13
 
16
14
  export abstract class JsiNode<P> implements Node<P> {
17
15
  protected _children: JsiNode<unknown>[] = [];
18
16
  protected Skia: Skia;
19
- protected depMgr: DependencyManager;
20
17
 
21
18
  constructor(ctx: NodeContext, public type: NodeType, protected props: P) {
22
19
  this.Skia = ctx.Skia;
23
- this.depMgr = ctx.depMgr;
24
20
  }
25
21
 
26
22
  setProps(props: P) {
@@ -46,7 +42,6 @@ export abstract class JsiNode<P> implements Node<P> {
46
42
  }
47
43
 
48
44
  dispose() {
49
- this.depMgr.unsubscribeNode(this);
50
45
  this._children.forEach((child) => child.dispose());
51
46
  }
52
47
 
@@ -9,7 +9,6 @@ export * from "./OvalNode";
9
9
  export * from "./LineNode";
10
10
  export * from "./PatchNode";
11
11
  export * from "./VerticesNode";
12
- export * from "./CustomDrawingNode";
13
12
  export * from "./Text";
14
13
  export * from "./PictureNode";
15
14
  export * from "./DiffRectNode";
@@ -26,7 +26,6 @@ import type {
26
26
  RRectDef,
27
27
  SkEnum,
28
28
  } from "./Common";
29
- import type { DrawingContext } from "./DrawingContext";
30
29
 
31
30
  export interface DrawingNodeProps extends GroupProps {
32
31
  paint?: SkPaint;
@@ -48,10 +47,6 @@ export interface PathProps extends DrawingNodeProps {
48
47
  fillType?: SkEnum<typeof FillType>;
49
48
  }
50
49
 
51
- export interface CustomDrawingNodeProps extends DrawingNodeProps {
52
- drawing: (ctx: DrawingContext) => void;
53
- }
54
-
55
50
  export interface LineProps extends DrawingNodeProps {
56
51
  p1: Vector;
57
52
  p2: Vector;
@@ -48,7 +48,6 @@ export const enum NodeType {
48
48
 
49
49
  // Drawings
50
50
  Group = "skGroup",
51
- Drawing = "skDrawing",
52
51
  Paint = "skPaint",
53
52
  Circle = "skCircle",
54
53
  Fill = "skFill",
@@ -19,7 +19,6 @@ import type {
19
19
  ImageProps,
20
20
  CircleProps,
21
21
  PathProps,
22
- CustomDrawingNodeProps,
23
22
  LineProps,
24
23
  OvalProps,
25
24
  PatchProps,
@@ -77,9 +76,6 @@ export interface SkDOM {
77
76
  Image(props: ImageProps): DrawingNode<ImageProps>;
78
77
  Circle(props: CircleProps): DrawingNode<CircleProps>;
79
78
  Path(props: PathProps): DrawingNode<PathProps>;
80
- CustomDrawing(
81
- props: CustomDrawingNodeProps
82
- ): DrawingNode<CustomDrawingNodeProps>;
83
79
  Line(props: LineProps): DrawingNode<LineProps>;
84
80
  Oval(props: OvalProps): DrawingNode<OvalProps>;
85
81
  Patch(props: PatchProps): DrawingNode<PatchProps>;
package/src/index.ts CHANGED
@@ -6,7 +6,6 @@ export * from "./renderer/Offscreen";
6
6
  export * from "./views";
7
7
  export * from "./skia";
8
8
  export * from "./external";
9
- export * from "./values";
10
9
  export * from "./animation";
11
10
  export * from "./dom/types";
12
11
  export * from "./dom/nodes";
package/src/mock/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import type { CanvasKit } from "canvaskit-wasm";
2
2
 
3
3
  import { JsiSkApi } from "../skia/web";
4
- import { ValueApi } from "../values/web";
5
4
 
6
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
7
6
  const Noop: () => any = () => undefined;
@@ -10,13 +9,11 @@ const NoopSharedValue = () => ({ value: 0 });
10
9
 
11
10
  export const Mock = (CanvasKit: CanvasKit) => {
12
11
  global.SkiaApi = JsiSkApi(CanvasKit);
13
- global.SkiaValueApi = ValueApi;
14
12
  const Skia = global.SkiaApi;
15
13
  return {
16
14
  Skia,
17
15
  ...require("../renderer/components"),
18
16
  ...require("../skia"),
19
- ...require("../values"),
20
17
  ...require("../animation"),
21
18
  ...require("../dom/types"),
22
19
  ...require("../dom/nodes"),
@@ -18,11 +18,9 @@ import { SkiaDomView } from "../views";
18
18
  import { SkiaDomView as SkiaDomViewWeb } from "../views/SkiaDomView.web";
19
19
  import { Skia } from "../skia/Skia";
20
20
  import type { TouchHandler, SkiaBaseViewProps } from "../views";
21
- import type { SkiaValue } from "../values/types";
22
21
 
23
22
  import { SkiaRoot } from "./Reconciler";
24
23
  import { NATIVE_DOM } from "./HostComponents";
25
- import { isValue } from "./processors";
26
24
 
27
25
  export const useCanvasRef = () => useRef<SkiaDomView>(null);
28
26
 
@@ -43,9 +41,7 @@ const useOnSizeEvent = (
43
41
  }
44
42
  const { width, height } = event.nativeEvent.layout;
45
43
 
46
- if (isValue(resultValue)) {
47
- resultValue.current = { width, height };
48
- } else if (resultValue) {
44
+ if (resultValue) {
49
45
  resultValue.value = { width, height };
50
46
  }
51
47
  },
@@ -78,18 +74,9 @@ export const Canvas = forwardRef<SkiaDomView, CanvasProps>(
78
74
  return id;
79
75
  }, [innerRef]);
80
76
 
81
- const registerValues = useCallback(
82
- (values: Array<SkiaValue<unknown>>) => {
83
- if (ref.current !== null) {
84
- return ref.current.registerValues(values);
85
- }
86
- return () => {};
87
- },
88
- [ref]
89
- );
90
77
  const root = useMemo(
91
- () => new SkiaRoot(Skia, registerValues, redraw, getNativeId),
92
- [redraw, registerValues, getNativeId]
78
+ () => new SkiaRoot(Skia, redraw, getNativeId),
79
+ [redraw, getNativeId]
93
80
  );
94
81
 
95
82
  // Render effect
@@ -97,11 +84,6 @@ export const Canvas = forwardRef<SkiaDomView, CanvasProps>(
97
84
  root.render(children);
98
85
  }, [children, root, redraw]);
99
86
 
100
- useEffect(() => {
101
- return () => {
102
- root.unmount();
103
- };
104
- }, [root]);
105
87
  if (NATIVE_DOM) {
106
88
  return (
107
89
  <SkiaDomView
@@ -7,18 +7,15 @@ import type {
7
7
  } from "../dom/types";
8
8
  import type { Skia } from "../skia/types";
9
9
 
10
- import type { DependencyManager } from "./DependencyManager";
11
-
12
10
  export class Container {
13
11
  private _root: RenderNode<GroupProps>;
14
12
  public Sk: SkDOM;
15
13
  constructor(
16
14
  Skia: Skia,
17
- public depMgr: DependencyManager,
18
15
  public redraw: () => void = () => {},
19
16
  public getNativeId: () => number = () => 0
20
17
  ) {
21
- this.Sk = new JsiSkDOM({ Skia, depMgr });
18
+ this.Sk = new JsiSkDOM({ Skia });
22
19
  this._root = this.Sk.Group();
23
20
  }
24
21
 
@@ -8,7 +8,6 @@ import type {
8
8
  ImageProps,
9
9
  PaintProps,
10
10
  PathProps,
11
- CustomDrawingNodeProps,
12
11
  LineProps,
13
12
  OvalProps,
14
13
  DiffRectProps,
@@ -59,12 +58,10 @@ import type {
59
58
  } from "../dom/types/ImageFilters";
60
59
  import type { SkRect, SkRRect } from "../skia/types";
61
60
  import type { JsiDrawingNode } from "../dom/nodes/DrawingNode";
62
- import type { SkiaValue } from "../values";
63
61
 
64
62
  import type { Container } from "./Container";
65
63
  import { exhaustiveCheck } from "./typeddash";
66
64
  import type { SkiaProps } from "./processors";
67
- import type { DependencyManager } from "./DependencyManager";
68
65
 
69
66
  // This flag should only be turned on for debugging/testing
70
67
  const shouldUseJSDomOnNative = false;
@@ -72,10 +69,6 @@ export const NATIVE_DOM = shouldUseJSDomOnNative ? false : !!global.SkiaDomApi;
72
69
 
73
70
  declare global {
74
71
  var SkiaDomApi: {
75
- DependencyManager: (
76
- registerValues: (values: Array<SkiaValue<unknown>>) => () => void
77
- ) => DependencyManager;
78
-
79
72
  // FIXME: We need a better type for this
80
73
  RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;
81
74
  RRectNode: (
@@ -86,9 +79,6 @@ declare global {
86
79
  FillNode: (props: PaintProps) => RenderNode<PaintProps>;
87
80
  CircleNode: (props: CircleProps) => RenderNode<CircleProps>;
88
81
  PathNode: (props: PathProps) => RenderNode<PathProps>;
89
- CustomDrawingNode: (
90
- props: CustomDrawingNodeProps
91
- ) => RenderNode<CustomDrawingNodeProps>;
92
82
  LineNode: (props: LineProps) => RenderNode<LineProps>;
93
83
  ImageNode: (props: ImageProps) => RenderNode<ImageProps>;
94
84
  OvalNode: (props: OvalProps) => RenderNode<OvalProps>;
@@ -211,7 +201,6 @@ declare global {
211
201
  skImage: SkiaProps<ImageProps>;
212
202
  skCircle: SkiaProps<CircleProps>;
213
203
  skPath: SkiaProps<PathProps>;
214
- skDrawing: SkiaProps<CustomDrawingNodeProps>;
215
204
  skLine: SkiaProps<LineProps>;
216
205
  skOval: SkiaProps<OvalProps>;
217
206
  skPatch: SkiaProps<PatchProps>;
@@ -302,8 +291,6 @@ export const createNode = (
302
291
  return Sk.Circle(props);
303
292
  case NodeType.Path:
304
293
  return Sk.Path(props);
305
- case NodeType.Drawing:
306
- return Sk.CustomDrawing(props);
307
294
  case NodeType.Line:
308
295
  return Sk.Line(props);
309
296
  case NodeType.Oval:
@@ -3,7 +3,6 @@ import type { HostConfig } from "react-reconciler";
3
3
  import { DefaultEventPriority } from "react-reconciler/constants";
4
4
 
5
5
  import type { NodeType, Node } from "../dom/types";
6
- import type { SkiaValue } from "../values";
7
6
  import {
8
7
  bindReanimatedProps,
9
8
  extractReanimatedProps,
@@ -12,9 +11,7 @@ import {
12
11
 
13
12
  import type { Container } from "./Container";
14
13
  import { createNode } from "./HostComponents";
15
- import type { AnimatedProps } from "./processors";
16
- import { isSelector, isValue } from "./processors";
17
- import { mapKeys, shallowEq } from "./typeddash";
14
+ import { shallowEq } from "./typeddash";
18
15
 
19
16
  const DEBUG = false;
20
17
  export const debug = (...args: Parameters<typeof console.log>) => {
@@ -128,9 +125,8 @@ export const skHostConfig: SkiaHostConfig = {
128
125
  ) {
129
126
  debug("createInstance", type);
130
127
  const [props, reanimatedProps] = extractReanimatedProps(pristineProps);
131
- const node = createNode(container, type, materialize(props));
128
+ const node = createNode(container, type, props);
132
129
  bindReanimatedProps(container, node, reanimatedProps);
133
- container.depMgr.subscribeNode(node, props);
134
130
  return node;
135
131
  },
136
132
 
@@ -162,7 +158,6 @@ export const skHostConfig: SkiaHostConfig = {
162
158
 
163
159
  resetAfterCommit(container) {
164
160
  debug("resetAfterCommit");
165
- container.depMgr.update();
166
161
  container.redraw();
167
162
  },
168
163
 
@@ -201,10 +196,8 @@ export const skHostConfig: SkiaHostConfig = {
201
196
  return;
202
197
  }
203
198
  const [props, reanimatedProps] = extractReanimatedProps(nextProps);
204
- updatePayload.depMgr.unsubscribeNode(instance);
205
- instance.setProps(materialize(props));
199
+ instance.setProps(props);
206
200
  bindReanimatedProps(updatePayload, instance, reanimatedProps);
207
- updatePayload.depMgr.subscribeNode(instance, props);
208
201
  },
209
202
 
210
203
  commitTextUpdate: (
@@ -249,17 +242,3 @@ export const skHostConfig: SkiaHostConfig = {
249
242
  afterActiveInstanceBlur: () => {},
250
243
  detachDeletedInstance: () => {},
251
244
  };
252
-
253
- const materialize = <P>(props: AnimatedProps<P>) => {
254
- const result = { ...props } as P;
255
- mapKeys(props).forEach((key) => {
256
- const prop = props[key];
257
- if (isValue(prop)) {
258
- result[key] = (prop as SkiaValue<P[typeof key]>).current;
259
- } else if (isSelector(prop)) {
260
- result[key] = prop.selector(prop.value.current) as P[typeof key];
261
- }
262
- });
263
-
264
- return result;
265
- };
@@ -3,22 +3,12 @@ import type { OpaqueRoot } from "react-reconciler";
3
3
  import ReactReconciler from "react-reconciler";
4
4
 
5
5
  import type { Skia } from "../skia/types";
6
- import type { SkiaValue } from "../values/types";
7
6
 
8
- import { DependencyManager } from "./DependencyManager";
9
7
  import { skHostConfig, debug as hostDebug } from "./HostConfig";
10
8
  import { Container } from "./Container";
11
- import { NATIVE_DOM } from "./HostComponents";
12
9
 
13
10
  const skiaReconciler = ReactReconciler(skHostConfig);
14
11
 
15
- type RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;
16
-
17
- const createDependencyManager = (registerValues: RegisterValues) =>
18
- NATIVE_DOM
19
- ? global.SkiaDomApi.DependencyManager(registerValues)
20
- : new DependencyManager(registerValues);
21
-
22
12
  skiaReconciler.injectIntoDevTools({
23
13
  bundleType: 1,
24
14
  version: "0.0.1",
@@ -31,12 +21,10 @@ export class SkiaRoot {
31
21
 
32
22
  constructor(
33
23
  Skia: Skia,
34
- registerValues: RegisterValues = () => () => {},
35
24
  redraw: () => void = () => {},
36
25
  getNativeId: () => number = () => 0
37
26
  ) {
38
- const depMgr = createDependencyManager(registerValues);
39
- this.container = new Container(Skia, depMgr, redraw, getNativeId);
27
+ this.container = new Container(Skia, redraw, getNativeId);
40
28
  this.root = skiaReconciler.createContainer(
41
29
  this.container,
42
30
  0,
@@ -56,12 +44,6 @@ export class SkiaRoot {
56
44
  });
57
45
  }
58
46
 
59
- unmount() {
60
- skiaReconciler.updateContainer(null, this.root, null, () => {
61
- this.container.depMgr.remove();
62
- });
63
- }
64
-
65
47
  get dom() {
66
48
  return this.container.root;
67
49
  }
@@ -14,6 +14,5 @@ export * from "./Group";
14
14
  export * from "./Mask";
15
15
  export * from "./Paint";
16
16
  export * from "./Blend";
17
- export * from "./Drawing";
18
17
 
19
18
  export * from "./paragraph";
@@ -1,2 +1 @@
1
1
  export * from "./components";
2
- export * from "./DependencyManager";