@shopify/react-native-skia 0.1.229 → 0.1.231

Sign up to get free protection for your applications and to get access to all the features.
Files changed (686) hide show
  1. package/android/CMakeLists.txt +1 -0
  2. package/android/cpp/jni/JniLoad.cpp +0 -2
  3. package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +2 -2
  4. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
  5. package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
  6. package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
  7. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
  8. package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
  9. package/cpp/api/JsiSkAnimatedImage.h +1 -1
  10. package/cpp/api/JsiSkApi.h +4 -1
  11. package/cpp/api/JsiSkDataFactory.h +6 -6
  12. package/cpp/api/JsiSkImage.h +4 -4
  13. package/cpp/api/JsiSkParagraph.h +15 -0
  14. package/cpp/api/JsiSkParagraphBuilder.h +3 -32
  15. package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
  16. package/cpp/api/JsiSkPath.h +1 -1
  17. package/cpp/api/JsiSkRRect.h +30 -3
  18. package/cpp/api/third_party/base64.cpp +153 -0
  19. package/cpp/api/third_party/base64.h +50 -0
  20. package/cpp/jsi/JsiPromises.h +1 -1
  21. package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
  22. package/cpp/rnskia/RNSkManager.cpp +0 -6
  23. package/cpp/rnskia/RNSkView.h +2 -91
  24. package/cpp/rnskia/dom/JsiDomApi.h +0 -9
  25. package/cpp/rnskia/dom/props/FontProp.h +4 -1
  26. package/cpp/rnskia/dom/props/RRectProp.h +50 -0
  27. package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
  28. package/lib/commonjs/animation/index.d.ts +0 -3
  29. package/lib/commonjs/animation/index.js +0 -39
  30. package/lib/commonjs/animation/index.js.map +1 -1
  31. package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +3 -3
  32. package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
  33. package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
  34. package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
  35. package/lib/commonjs/dom/nodes/Node.js +0 -5
  36. package/lib/commonjs/dom/nodes/Node.js.map +1 -1
  37. package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +1 -1
  38. package/lib/commonjs/dom/nodes/drawings/RRectNode.d.ts +3 -3
  39. package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
  40. package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
  41. package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
  42. package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
  43. package/lib/commonjs/dom/types/Common.d.ts +2 -2
  44. package/lib/commonjs/dom/types/Common.js.map +1 -1
  45. package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
  46. package/lib/commonjs/dom/types/Drawings.js.map +1 -1
  47. package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
  48. package/lib/commonjs/dom/types/NodeType.js +0 -1
  49. package/lib/commonjs/dom/types/NodeType.js.map +1 -1
  50. package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
  51. package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
  52. package/lib/commonjs/headless/index.d.ts +3 -1
  53. package/lib/commonjs/headless/index.js +12 -6
  54. package/lib/commonjs/headless/index.js.map +1 -1
  55. package/lib/commonjs/index.d.ts +0 -1
  56. package/lib/commonjs/index.js +0 -14
  57. package/lib/commonjs/index.js.map +1 -1
  58. package/lib/commonjs/mock/index.js +0 -4
  59. package/lib/commonjs/mock/index.js.map +1 -1
  60. package/lib/commonjs/renderer/Canvas.js +2 -21
  61. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  62. package/lib/commonjs/renderer/Container.d.ts +1 -3
  63. package/lib/commonjs/renderer/Container.js +4 -6
  64. package/lib/commonjs/renderer/Container.js.map +1 -1
  65. package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
  66. package/lib/commonjs/renderer/HostComponents.js +0 -3
  67. package/lib/commonjs/renderer/HostComponents.js.map +1 -1
  68. package/lib/commonjs/renderer/HostConfig.js +2 -23
  69. package/lib/commonjs/renderer/HostConfig.js.map +1 -1
  70. package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
  71. package/lib/commonjs/renderer/Reconciler.js +3 -18
  72. package/lib/commonjs/renderer/Reconciler.js.map +1 -1
  73. package/lib/commonjs/renderer/components/index.d.ts +0 -1
  74. package/lib/commonjs/renderer/components/index.js +0 -13
  75. package/lib/commonjs/renderer/components/index.js.map +1 -1
  76. package/lib/commonjs/renderer/index.d.ts +0 -1
  77. package/lib/commonjs/renderer/index.js +0 -13
  78. package/lib/commonjs/renderer/index.js.map +1 -1
  79. package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
  80. package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
  81. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  82. package/lib/commonjs/skia/types/Canvas.d.ts +4 -4
  83. package/lib/commonjs/skia/types/Canvas.js.map +1 -1
  84. package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
  85. package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
  86. package/lib/commonjs/skia/types/Path/Path.d.ts +2 -2
  87. package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
  88. package/lib/commonjs/skia/types/RRect.d.ts +9 -0
  89. package/lib/commonjs/skia/types/RRect.js.map +1 -1
  90. package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +4 -4
  91. package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
  92. package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
  93. package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
  94. package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
  95. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  96. package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  97. package/lib/commonjs/skia/web/JsiSkPath.d.ts +2 -2
  98. package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
  99. package/lib/commonjs/skia/web/JsiSkRRect.d.ts +2 -2
  100. package/lib/commonjs/skia/web/JsiSkRRect.js +4 -0
  101. package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
  102. package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
  103. package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
  104. package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
  105. package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
  106. package/lib/commonjs/views/SkiaDomView.js +3 -14
  107. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  108. package/lib/commonjs/views/SkiaDomView.web.js +4 -14
  109. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  110. package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
  111. package/lib/commonjs/views/SkiaPictureView.js +3 -14
  112. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  113. package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
  114. package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
  115. package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
  116. package/lib/commonjs/views/index.d.ts +0 -2
  117. package/lib/commonjs/views/index.js +0 -26
  118. package/lib/commonjs/views/index.js.map +1 -1
  119. package/lib/commonjs/views/types.d.ts +2 -15
  120. package/lib/commonjs/views/types.js.map +1 -1
  121. package/lib/module/animation/index.d.ts +0 -3
  122. package/lib/module/animation/index.js +0 -3
  123. package/lib/module/animation/index.js.map +1 -1
  124. package/lib/module/dom/nodes/JsiSkDOM.d.ts +3 -3
  125. package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
  126. package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
  127. package/lib/module/dom/nodes/Node.d.ts +0 -3
  128. package/lib/module/dom/nodes/Node.js +0 -5
  129. package/lib/module/dom/nodes/Node.js.map +1 -1
  130. package/lib/module/dom/nodes/datatypes/Rect.d.ts +1 -1
  131. package/lib/module/dom/nodes/drawings/RRectNode.d.ts +3 -3
  132. package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
  133. package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
  134. package/lib/module/dom/nodes/drawings/index.js +0 -1
  135. package/lib/module/dom/nodes/drawings/index.js.map +1 -1
  136. package/lib/module/dom/types/Common.d.ts +2 -2
  137. package/lib/module/dom/types/Common.js.map +1 -1
  138. package/lib/module/dom/types/Drawings.d.ts +0 -4
  139. package/lib/module/dom/types/Drawings.js.map +1 -1
  140. package/lib/module/dom/types/NodeType.d.ts +0 -1
  141. package/lib/module/dom/types/NodeType.js +0 -1
  142. package/lib/module/dom/types/NodeType.js.map +1 -1
  143. package/lib/module/dom/types/SkDOM.d.ts +1 -2
  144. package/lib/module/dom/types/SkDOM.js.map +1 -1
  145. package/lib/module/headless/index.d.ts +3 -1
  146. package/lib/module/headless/index.js +5 -3
  147. package/lib/module/headless/index.js.map +1 -1
  148. package/lib/module/index.d.ts +0 -1
  149. package/lib/module/index.js +0 -1
  150. package/lib/module/index.js.map +1 -1
  151. package/lib/module/mock/index.js +1 -4
  152. package/lib/module/mock/index.js.map +1 -1
  153. package/lib/module/renderer/Canvas.js +2 -20
  154. package/lib/module/renderer/Canvas.js.map +1 -1
  155. package/lib/module/renderer/Container.d.ts +1 -3
  156. package/lib/module/renderer/Container.js +4 -6
  157. package/lib/module/renderer/Container.js.map +1 -1
  158. package/lib/module/renderer/HostComponents.d.ts +1 -6
  159. package/lib/module/renderer/HostComponents.js +0 -3
  160. package/lib/module/renderer/HostComponents.js.map +1 -1
  161. package/lib/module/renderer/HostConfig.js +3 -23
  162. package/lib/module/renderer/HostConfig.js.map +1 -1
  163. package/lib/module/renderer/Reconciler.d.ts +1 -5
  164. package/lib/module/renderer/Reconciler.js +3 -16
  165. package/lib/module/renderer/Reconciler.js.map +1 -1
  166. package/lib/module/renderer/components/index.d.ts +0 -1
  167. package/lib/module/renderer/components/index.js +0 -1
  168. package/lib/module/renderer/components/index.js.map +1 -1
  169. package/lib/module/renderer/index.d.ts +0 -1
  170. package/lib/module/renderer/index.js +0 -1
  171. package/lib/module/renderer/index.js.map +1 -1
  172. package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
  173. package/lib/module/renderer/processors/Animations/Animations.js +0 -28
  174. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  175. package/lib/module/skia/types/Canvas.d.ts +4 -4
  176. package/lib/module/skia/types/Canvas.js.map +1 -1
  177. package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
  178. package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
  179. package/lib/module/skia/types/Path/Path.d.ts +2 -2
  180. package/lib/module/skia/types/Path/Path.js.map +1 -1
  181. package/lib/module/skia/types/RRect.d.ts +9 -0
  182. package/lib/module/skia/types/RRect.js.map +1 -1
  183. package/lib/module/skia/web/JsiSkCanvas.d.ts +4 -4
  184. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  185. package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
  186. package/lib/module/skia/web/JsiSkParagraph.js +12 -0
  187. package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
  188. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
  189. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  190. package/lib/module/skia/web/JsiSkPath.d.ts +2 -2
  191. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  192. package/lib/module/skia/web/JsiSkRRect.d.ts +2 -2
  193. package/lib/module/skia/web/JsiSkRRect.js +4 -0
  194. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  195. package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
  196. package/lib/module/views/SkiaBaseWebView.js +0 -17
  197. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  198. package/lib/module/views/SkiaDomView.d.ts +0 -7
  199. package/lib/module/views/SkiaDomView.js +2 -13
  200. package/lib/module/views/SkiaDomView.js.map +1 -1
  201. package/lib/module/views/SkiaDomView.web.js +4 -13
  202. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  203. package/lib/module/views/SkiaPictureView.d.ts +0 -7
  204. package/lib/module/views/SkiaPictureView.js +2 -13
  205. package/lib/module/views/SkiaPictureView.js.map +1 -1
  206. package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
  207. package/lib/module/views/SkiaViewNativeId.js +4 -0
  208. package/lib/module/views/SkiaViewNativeId.js.map +1 -0
  209. package/lib/module/views/index.d.ts +0 -2
  210. package/lib/module/views/index.js +0 -2
  211. package/lib/module/views/index.js.map +1 -1
  212. package/lib/module/views/types.d.ts +2 -15
  213. package/lib/module/views/types.js.map +1 -1
  214. package/lib/typescript/src/animation/index.d.ts +0 -3
  215. package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +3 -3
  216. package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
  217. package/lib/typescript/src/dom/nodes/datatypes/Rect.d.ts +1 -1
  218. package/lib/typescript/src/dom/nodes/drawings/RRectNode.d.ts +3 -3
  219. package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
  220. package/lib/typescript/src/dom/types/Common.d.ts +2 -2
  221. package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
  222. package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
  223. package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
  224. package/lib/typescript/src/headless/index.d.ts +3 -1
  225. package/lib/typescript/src/index.d.ts +0 -1
  226. package/lib/typescript/src/renderer/Container.d.ts +1 -3
  227. package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
  228. package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
  229. package/lib/typescript/src/renderer/components/index.d.ts +0 -1
  230. package/lib/typescript/src/renderer/index.d.ts +0 -1
  231. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
  232. package/lib/typescript/src/skia/types/Canvas.d.ts +4 -4
  233. package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
  234. package/lib/typescript/src/skia/types/Path/Path.d.ts +2 -2
  235. package/lib/typescript/src/skia/types/RRect.d.ts +9 -0
  236. package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +4 -4
  237. package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
  238. package/lib/typescript/src/skia/web/JsiSkPath.d.ts +2 -2
  239. package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +2 -2
  240. package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
  241. package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
  242. package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
  243. package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
  244. package/lib/typescript/src/views/index.d.ts +0 -2
  245. package/lib/typescript/src/views/types.d.ts +2 -15
  246. package/libs/android/arm64-v8a/libskia.a +0 -0
  247. package/libs/android/armeabi-v7a/libskia.a +0 -0
  248. package/libs/android/x86/libskia.a +0 -0
  249. package/libs/android/x86_64/libskia.a +0 -0
  250. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  251. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  252. package/libs/ios/libskottie.xcframework/Info.plist +5 -5
  253. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  254. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  255. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  256. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  257. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  258. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  259. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  260. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  261. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  262. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  263. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  264. package/libs/ios/libsvg.xcframework/Info.plist +5 -5
  265. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  266. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  267. package/package.json +1 -1
  268. package/src/animation/index.ts +0 -3
  269. package/src/dom/nodes/JsiSkDOM.ts +0 -12
  270. package/src/dom/nodes/Node.ts +0 -5
  271. package/src/dom/nodes/drawings/RRectNode.ts +2 -2
  272. package/src/dom/nodes/drawings/index.ts +0 -1
  273. package/src/dom/types/Common.ts +2 -1
  274. package/src/dom/types/Drawings.ts +0 -5
  275. package/src/dom/types/NodeType.ts +0 -1
  276. package/src/dom/types/SkDOM.ts +0 -4
  277. package/src/headless/index.ts +7 -3
  278. package/src/index.ts +0 -1
  279. package/src/mock/index.ts +0 -3
  280. package/src/renderer/Canvas.tsx +3 -21
  281. package/src/renderer/Container.tsx +1 -4
  282. package/src/renderer/HostComponents.ts +0 -13
  283. package/src/renderer/HostConfig.ts +3 -24
  284. package/src/renderer/Reconciler.tsx +1 -19
  285. package/src/renderer/components/index.ts +0 -1
  286. package/src/renderer/index.ts +0 -1
  287. package/src/renderer/processors/Animations/Animations.ts +1 -51
  288. package/src/skia/types/Canvas.ts +4 -4
  289. package/src/skia/types/Paragraph/Paragraph.ts +25 -0
  290. package/src/skia/types/Path/Path.ts +2 -2
  291. package/src/skia/types/RRect.ts +11 -0
  292. package/src/skia/web/JsiSkCanvas.ts +4 -4
  293. package/src/skia/web/JsiSkParagraph.ts +11 -0
  294. package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
  295. package/src/skia/web/JsiSkPath.ts +2 -2
  296. package/src/skia/web/JsiSkRRect.ts +23 -2
  297. package/src/views/SkiaBaseWebView.tsx +0 -19
  298. package/src/views/SkiaDomView.tsx +1 -13
  299. package/src/views/SkiaDomView.web.tsx +1 -6
  300. package/src/views/SkiaPictureView.tsx +1 -13
  301. package/src/views/SkiaViewNativeId.ts +1 -0
  302. package/src/views/index.ts +0 -2
  303. package/src/views/types.ts +2 -26
  304. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
  305. package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
  306. package/cpp/rnskia/RNSkAnimation.h +0 -65
  307. package/cpp/rnskia/RNSkValueApi.h +0 -72
  308. package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
  309. package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
  310. package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
  311. package/cpp/rnskia/values/RNSkClockValue.h +0 -140
  312. package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
  313. package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
  314. package/cpp/rnskia/values/RNSkValue.h +0 -116
  315. package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
  316. package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
  317. package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
  318. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
  319. package/lib/commonjs/animation/decay/decay.d.ts +0 -2
  320. package/lib/commonjs/animation/decay/decay.js +0 -42
  321. package/lib/commonjs/animation/decay/decay.js.map +0 -1
  322. package/lib/commonjs/animation/decay/index.d.ts +0 -1
  323. package/lib/commonjs/animation/decay/index.js +0 -14
  324. package/lib/commonjs/animation/decay/index.js.map +0 -1
  325. package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
  326. package/lib/commonjs/animation/decay/runDecay.js +0 -48
  327. package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
  328. package/lib/commonjs/animation/decay/types.d.ts +0 -21
  329. package/lib/commonjs/animation/decay/types.js +0 -6
  330. package/lib/commonjs/animation/decay/types.js.map +0 -1
  331. package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
  332. package/lib/commonjs/animation/spring/Spring.js +0 -77
  333. package/lib/commonjs/animation/spring/Spring.js.map +0 -1
  334. package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
  335. package/lib/commonjs/animation/spring/functions/index.js +0 -14
  336. package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
  337. package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
  338. package/lib/commonjs/animation/spring/functions/spring.js +0 -94
  339. package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
  340. package/lib/commonjs/animation/spring/index.d.ts +0 -3
  341. package/lib/commonjs/animation/spring/index.js +0 -30
  342. package/lib/commonjs/animation/spring/index.js.map +0 -1
  343. package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
  344. package/lib/commonjs/animation/spring/runSpring.js +0 -35
  345. package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
  346. package/lib/commonjs/animation/spring/types.d.ts +0 -6
  347. package/lib/commonjs/animation/spring/types.js +0 -2
  348. package/lib/commonjs/animation/spring/types.js.map +0 -1
  349. package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
  350. package/lib/commonjs/animation/spring/useSpring.js +0 -27
  351. package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
  352. package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
  353. package/lib/commonjs/animation/timing/Easing.js +0 -108
  354. package/lib/commonjs/animation/timing/Easing.js.map +0 -1
  355. package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
  356. package/lib/commonjs/animation/timing/createTiming.js +0 -55
  357. package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
  358. package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
  359. package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
  360. package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
  361. package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
  362. package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
  363. package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
  364. package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
  365. package/lib/commonjs/animation/timing/functions/index.js +0 -54
  366. package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
  367. package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
  368. package/lib/commonjs/animation/timing/functions/timing.js +0 -50
  369. package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
  370. package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
  371. package/lib/commonjs/animation/timing/functions/types.js +0 -2
  372. package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
  373. package/lib/commonjs/animation/timing/index.d.ts +0 -4
  374. package/lib/commonjs/animation/timing/index.js +0 -38
  375. package/lib/commonjs/animation/timing/index.js.map +0 -1
  376. package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
  377. package/lib/commonjs/animation/timing/runTiming.js +0 -36
  378. package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
  379. package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
  380. package/lib/commonjs/animation/timing/useLoop.js +0 -25
  381. package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
  382. package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
  383. package/lib/commonjs/animation/timing/useTiming.js +0 -67
  384. package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
  385. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  386. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
  387. package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  388. package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
  389. package/lib/commonjs/renderer/DependencyManager.js +0 -185
  390. package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
  391. package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
  392. package/lib/commonjs/renderer/components/Drawing.js +0 -22
  393. package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
  394. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  395. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
  396. package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  397. package/lib/commonjs/values/api.d.ts +0 -26
  398. package/lib/commonjs/values/api.js +0 -55
  399. package/lib/commonjs/values/api.js.map +0 -1
  400. package/lib/commonjs/values/api.web.d.ts +0 -2
  401. package/lib/commonjs/values/api.web.js +0 -18
  402. package/lib/commonjs/values/api.web.js.map +0 -1
  403. package/lib/commonjs/values/hooks/index.d.ts +0 -4
  404. package/lib/commonjs/values/hooks/index.js +0 -58
  405. package/lib/commonjs/values/hooks/index.js.map +0 -1
  406. package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
  407. package/lib/commonjs/values/hooks/useClockValue.js +0 -30
  408. package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
  409. package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
  410. package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
  411. package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
  412. package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
  413. package/lib/commonjs/values/hooks/useValue.js +0 -26
  414. package/lib/commonjs/values/hooks/useValue.js.map +0 -1
  415. package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
  416. package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
  417. package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
  418. package/lib/commonjs/values/index.d.ts +0 -4
  419. package/lib/commonjs/values/index.js +0 -58
  420. package/lib/commonjs/values/index.js.map +0 -1
  421. package/lib/commonjs/values/selector.d.ts +0 -14
  422. package/lib/commonjs/values/selector.js +0 -24
  423. package/lib/commonjs/values/selector.js.map +0 -1
  424. package/lib/commonjs/values/types.d.ts +0 -63
  425. package/lib/commonjs/values/types.js +0 -2
  426. package/lib/commonjs/values/types.js.map +0 -1
  427. package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
  428. package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
  429. package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
  430. package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
  431. package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
  432. package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
  433. package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
  434. package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
  435. package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
  436. package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
  437. package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
  438. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
  439. package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
  440. package/lib/commonjs/values/web/RNSkValue.js +0 -73
  441. package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
  442. package/lib/commonjs/values/web/api.d.ts +0 -2
  443. package/lib/commonjs/values/web/api.js +0 -31
  444. package/lib/commonjs/values/web/api.js.map +0 -1
  445. package/lib/commonjs/values/web/index.d.ts +0 -1
  446. package/lib/commonjs/values/web/index.js +0 -19
  447. package/lib/commonjs/values/web/index.js.map +0 -1
  448. package/lib/commonjs/views/SkiaView.d.ts +0 -35
  449. package/lib/commonjs/views/SkiaView.js +0 -139
  450. package/lib/commonjs/views/SkiaView.js.map +0 -1
  451. package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
  452. package/lib/commonjs/views/SkiaView.web.js +0 -30
  453. package/lib/commonjs/views/SkiaView.web.js.map +0 -1
  454. package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
  455. package/lib/commonjs/views/useDrawCallback.js +0 -23
  456. package/lib/commonjs/views/useDrawCallback.js.map +0 -1
  457. package/lib/module/animation/decay/decay.d.ts +0 -2
  458. package/lib/module/animation/decay/decay.js +0 -33
  459. package/lib/module/animation/decay/decay.js.map +0 -1
  460. package/lib/module/animation/decay/index.d.ts +0 -1
  461. package/lib/module/animation/decay/index.js +0 -2
  462. package/lib/module/animation/decay/index.js.map +0 -1
  463. package/lib/module/animation/decay/runDecay.d.ts +0 -10
  464. package/lib/module/animation/decay/runDecay.js +0 -38
  465. package/lib/module/animation/decay/runDecay.js.map +0 -1
  466. package/lib/module/animation/decay/types.d.ts +0 -21
  467. package/lib/module/animation/decay/types.js +0 -2
  468. package/lib/module/animation/decay/types.js.map +0 -1
  469. package/lib/module/animation/spring/Spring.d.ts +0 -65
  470. package/lib/module/animation/spring/Spring.js +0 -69
  471. package/lib/module/animation/spring/Spring.js.map +0 -1
  472. package/lib/module/animation/spring/functions/index.d.ts +0 -1
  473. package/lib/module/animation/spring/functions/index.js +0 -2
  474. package/lib/module/animation/spring/functions/index.js.map +0 -1
  475. package/lib/module/animation/spring/functions/spring.d.ts +0 -10
  476. package/lib/module/animation/spring/functions/spring.js +0 -85
  477. package/lib/module/animation/spring/functions/spring.js.map +0 -1
  478. package/lib/module/animation/spring/index.d.ts +0 -3
  479. package/lib/module/animation/spring/index.js +0 -4
  480. package/lib/module/animation/spring/index.js.map +0 -1
  481. package/lib/module/animation/spring/runSpring.d.ts +0 -19
  482. package/lib/module/animation/spring/runSpring.js +0 -24
  483. package/lib/module/animation/spring/runSpring.js.map +0 -1
  484. package/lib/module/animation/spring/types.d.ts +0 -6
  485. package/lib/module/animation/spring/types.js +0 -2
  486. package/lib/module/animation/spring/types.js.map +0 -1
  487. package/lib/module/animation/spring/useSpring.d.ts +0 -13
  488. package/lib/module/animation/spring/useSpring.js +0 -16
  489. package/lib/module/animation/spring/useSpring.js.map +0 -1
  490. package/lib/module/animation/timing/Easing.d.ts +0 -19
  491. package/lib/module/animation/timing/Easing.js +0 -98
  492. package/lib/module/animation/timing/Easing.js.map +0 -1
  493. package/lib/module/animation/timing/createTiming.d.ts +0 -17
  494. package/lib/module/animation/timing/createTiming.js +0 -49
  495. package/lib/module/animation/timing/createTiming.js.map +0 -1
  496. package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
  497. package/lib/module/animation/timing/functions/bezier.js +0 -141
  498. package/lib/module/animation/timing/functions/bezier.js.map +0 -1
  499. package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
  500. package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
  501. package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
  502. package/lib/module/animation/timing/functions/index.d.ts +0 -4
  503. package/lib/module/animation/timing/functions/index.js +0 -5
  504. package/lib/module/animation/timing/functions/index.js.map +0 -1
  505. package/lib/module/animation/timing/functions/timing.d.ts +0 -17
  506. package/lib/module/animation/timing/functions/timing.js +0 -41
  507. package/lib/module/animation/timing/functions/timing.js.map +0 -1
  508. package/lib/module/animation/timing/functions/types.d.ts +0 -7
  509. package/lib/module/animation/timing/functions/types.js +0 -2
  510. package/lib/module/animation/timing/functions/types.js.map +0 -1
  511. package/lib/module/animation/timing/index.d.ts +0 -4
  512. package/lib/module/animation/timing/index.js +0 -5
  513. package/lib/module/animation/timing/index.js.map +0 -1
  514. package/lib/module/animation/timing/runTiming.d.ts +0 -19
  515. package/lib/module/animation/timing/runTiming.js +0 -26
  516. package/lib/module/animation/timing/runTiming.js.map +0 -1
  517. package/lib/module/animation/timing/useLoop.d.ts +0 -11
  518. package/lib/module/animation/timing/useLoop.js +0 -16
  519. package/lib/module/animation/timing/useLoop.js.map +0 -1
  520. package/lib/module/animation/timing/useTiming.d.ts +0 -13
  521. package/lib/module/animation/timing/useTiming.js +0 -57
  522. package/lib/module/animation/timing/useTiming.js.map +0 -1
  523. package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  524. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
  525. package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
  526. package/lib/module/renderer/DependencyManager.d.ts +0 -46
  527. package/lib/module/renderer/DependencyManager.js +0 -174
  528. package/lib/module/renderer/DependencyManager.js.map +0 -1
  529. package/lib/module/renderer/components/Drawing.d.ts +0 -8
  530. package/lib/module/renderer/components/Drawing.js +0 -11
  531. package/lib/module/renderer/components/Drawing.js.map +0 -1
  532. package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  533. package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
  534. package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
  535. package/lib/module/values/api.d.ts +0 -26
  536. package/lib/module/values/api.js +0 -48
  537. package/lib/module/values/api.js.map +0 -1
  538. package/lib/module/values/api.web.d.ts +0 -2
  539. package/lib/module/values/api.web.js +0 -7
  540. package/lib/module/values/api.web.js.map +0 -1
  541. package/lib/module/values/hooks/index.d.ts +0 -4
  542. package/lib/module/values/hooks/index.js +0 -5
  543. package/lib/module/values/hooks/index.js.map +0 -1
  544. package/lib/module/values/hooks/useClockValue.d.ts +0 -9
  545. package/lib/module/values/hooks/useClockValue.js +0 -20
  546. package/lib/module/values/hooks/useClockValue.js.map +0 -1
  547. package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
  548. package/lib/module/values/hooks/useComputedValue.js +0 -21
  549. package/lib/module/values/hooks/useComputedValue.js.map +0 -1
  550. package/lib/module/values/hooks/useValue.d.ts +0 -10
  551. package/lib/module/values/hooks/useValue.js +0 -16
  552. package/lib/module/values/hooks/useValue.js.map +0 -1
  553. package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
  554. package/lib/module/values/hooks/useValueEffect.js +0 -16
  555. package/lib/module/values/hooks/useValueEffect.js.map +0 -1
  556. package/lib/module/values/index.d.ts +0 -4
  557. package/lib/module/values/index.js +0 -5
  558. package/lib/module/values/index.js.map +0 -1
  559. package/lib/module/values/selector.d.ts +0 -14
  560. package/lib/module/values/selector.js +0 -15
  561. package/lib/module/values/selector.js.map +0 -1
  562. package/lib/module/values/types.d.ts +0 -63
  563. package/lib/module/values/types.js +0 -2
  564. package/lib/module/values/types.js.map +0 -1
  565. package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
  566. package/lib/module/values/web/RNSkAnimation.js +0 -36
  567. package/lib/module/values/web/RNSkAnimation.js.map +0 -1
  568. package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
  569. package/lib/module/values/web/RNSkClockValue.js +0 -65
  570. package/lib/module/values/web/RNSkClockValue.js.map +0 -1
  571. package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
  572. package/lib/module/values/web/RNSkComputedValue.js +0 -49
  573. package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
  574. package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
  575. package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
  576. package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
  577. package/lib/module/values/web/RNSkValue.d.ts +0 -14
  578. package/lib/module/values/web/RNSkValue.js +0 -63
  579. package/lib/module/values/web/RNSkValue.js.map +0 -1
  580. package/lib/module/values/web/api.d.ts +0 -2
  581. package/lib/module/values/web/api.js +0 -19
  582. package/lib/module/values/web/api.js.map +0 -1
  583. package/lib/module/values/web/index.d.ts +0 -1
  584. package/lib/module/values/web/index.js +0 -2
  585. package/lib/module/values/web/index.js.map +0 -1
  586. package/lib/module/views/SkiaView.d.ts +0 -35
  587. package/lib/module/views/SkiaView.js +0 -119
  588. package/lib/module/views/SkiaView.js.map +0 -1
  589. package/lib/module/views/SkiaView.web.d.ts +0 -7
  590. package/lib/module/views/SkiaView.web.js +0 -20
  591. package/lib/module/views/SkiaView.web.js.map +0 -1
  592. package/lib/module/views/useDrawCallback.d.ts +0 -8
  593. package/lib/module/views/useDrawCallback.js +0 -14
  594. package/lib/module/views/useDrawCallback.js.map +0 -1
  595. package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
  596. package/lib/typescript/src/animation/decay/index.d.ts +0 -1
  597. package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
  598. package/lib/typescript/src/animation/decay/types.d.ts +0 -21
  599. package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
  600. package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
  601. package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
  602. package/lib/typescript/src/animation/spring/index.d.ts +0 -3
  603. package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
  604. package/lib/typescript/src/animation/spring/types.d.ts +0 -6
  605. package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
  606. package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
  607. package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
  608. package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
  609. package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
  610. package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
  611. package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
  612. package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
  613. package/lib/typescript/src/animation/timing/index.d.ts +0 -4
  614. package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
  615. package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
  616. package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
  617. package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
  618. package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
  619. package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
  620. package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
  621. package/lib/typescript/src/values/api.d.ts +0 -26
  622. package/lib/typescript/src/values/api.web.d.ts +0 -2
  623. package/lib/typescript/src/values/hooks/index.d.ts +0 -4
  624. package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
  625. package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
  626. package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
  627. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
  628. package/lib/typescript/src/values/index.d.ts +0 -4
  629. package/lib/typescript/src/values/selector.d.ts +0 -14
  630. package/lib/typescript/src/values/types.d.ts +0 -63
  631. package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
  632. package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
  633. package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
  634. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
  635. package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
  636. package/lib/typescript/src/values/web/api.d.ts +0 -2
  637. package/lib/typescript/src/values/web/index.d.ts +0 -1
  638. package/lib/typescript/src/views/SkiaView.d.ts +0 -35
  639. package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
  640. package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
  641. package/src/animation/decay/decay.ts +0 -35
  642. package/src/animation/decay/index.ts +0 -1
  643. package/src/animation/decay/runDecay.ts +0 -40
  644. package/src/animation/decay/types.ts +0 -24
  645. package/src/animation/spring/Spring.ts +0 -61
  646. package/src/animation/spring/functions/index.ts +0 -1
  647. package/src/animation/spring/functions/spring.ts +0 -86
  648. package/src/animation/spring/index.ts +0 -3
  649. package/src/animation/spring/runSpring.ts +0 -40
  650. package/src/animation/spring/types.ts +0 -6
  651. package/src/animation/spring/useSpring.ts +0 -31
  652. package/src/animation/timing/Easing.ts +0 -102
  653. package/src/animation/timing/createTiming.ts +0 -62
  654. package/src/animation/timing/functions/bezier.ts +0 -165
  655. package/src/animation/timing/functions/getResolvedParams.ts +0 -50
  656. package/src/animation/timing/functions/index.ts +0 -4
  657. package/src/animation/timing/functions/timing.ts +0 -44
  658. package/src/animation/timing/functions/types.ts +0 -8
  659. package/src/animation/timing/index.ts +0 -4
  660. package/src/animation/timing/runTiming.ts +0 -36
  661. package/src/animation/timing/useLoop.ts +0 -21
  662. package/src/animation/timing/useTiming.ts +0 -71
  663. package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
  664. package/src/renderer/DependencyManager.tsx +0 -196
  665. package/src/renderer/components/Drawing.tsx +0 -12
  666. package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
  667. package/src/values/api.ts +0 -61
  668. package/src/values/api.web.ts +0 -5
  669. package/src/values/hooks/index.ts +0 -4
  670. package/src/values/hooks/useClockValue.ts +0 -21
  671. package/src/values/hooks/useComputedValue.ts +0 -24
  672. package/src/values/hooks/useValue.ts +0 -17
  673. package/src/values/hooks/useValueEffect.ts +0 -18
  674. package/src/values/index.ts +0 -4
  675. package/src/values/selector.ts +0 -24
  676. package/src/values/types.ts +0 -73
  677. package/src/values/web/RNSkAnimation.ts +0 -33
  678. package/src/values/web/RNSkClockValue.ts +0 -58
  679. package/src/values/web/RNSkComputedValue.ts +0 -49
  680. package/src/values/web/RNSkReadonlyValue.ts +0 -38
  681. package/src/values/web/RNSkValue.ts +0 -57
  682. package/src/values/web/api.ts +0 -33
  683. package/src/values/web/index.ts +0 -1
  684. package/src/views/SkiaView.tsx +0 -111
  685. package/src/views/SkiaView.web.tsx +0 -22
  686. package/src/views/useDrawCallback.ts +0 -19
@@ -1,5 +1,4 @@
1
- import { JsiSkApi } from "../skia/web";
2
- import { ValueApi } from "../values/web"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
1
+ import { JsiSkApi } from "../skia/web"; // eslint-disable-next-line @typescript-eslint/no-explicit-any
3
2
 
4
3
  const Noop = () => undefined;
5
4
 
@@ -13,13 +12,11 @@ const NoopSharedValue = () => ({
13
12
 
14
13
  export const Mock = CanvasKit => {
15
14
  global.SkiaApi = JsiSkApi(CanvasKit);
16
- global.SkiaValueApi = ValueApi;
17
15
  const Skia = global.SkiaApi;
18
16
  return {
19
17
  Skia,
20
18
  ...require("../renderer/components"),
21
19
  ...require("../skia"),
22
- ...require("../values"),
23
20
  ...require("../animation"),
24
21
  ...require("../dom/types"),
25
22
  ...require("../dom/nodes"),
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkApi","ValueApi","Noop","undefined","NoopValue","current","NoopSharedValue","value","Mock","CanvasKit","global","SkiaApi","SkiaValueApi","Skia","require","Canvas","useValue","useComputedValue","useTouchHandler","useTiming","useLoop","useSpring","useClockValue","useValueEffect","useClock","usePathInterpolation","useRawData","useData","useFont","Font","useTypeface","useImage","useSVG"],"sources":["index.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport { JsiSkApi } from \"../skia/web\";\nimport { ValueApi } from \"../values/web\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst Noop: () => any = () => undefined;\nconst NoopValue = () => ({ current: 0 });\nconst NoopSharedValue = () => ({ value: 0 });\n\nexport const Mock = (CanvasKit: CanvasKit) => {\n global.SkiaApi = JsiSkApi(CanvasKit);\n global.SkiaValueApi = ValueApi;\n const Skia = global.SkiaApi;\n return {\n Skia,\n ...require(\"../renderer/components\"),\n ...require(\"../skia\"),\n ...require(\"../values\"),\n ...require(\"../animation\"),\n ...require(\"../dom/types\"),\n ...require(\"../dom/nodes\"),\n // We could use the real Canvas if we mock the SkiaView component for node\n Canvas: Noop,\n // Skia Animations\n useValue: NoopValue,\n useComputedValue: NoopValue,\n useTouchHandler: Noop,\n useTiming: NoopValue,\n useLoop: NoopValue,\n useSpring: NoopValue,\n useClockValue: NoopValue,\n useValueEffect: Noop,\n // Reanimated hooks\n useClock: NoopSharedValue,\n usePathInterpolation: NoopSharedValue,\n useRawData: Noop,\n useData: Noop,\n useFont: () => Skia.Font(undefined, 0),\n useTypeface: () => null,\n useImage: () => null,\n useSVG: () => null,\n };\n};\n"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB;AACA,SAASC,QAAT,QAAyB,eAAzB,C,CAEA;;AACA,MAAMC,IAAe,GAAG,MAAMC,SAA9B;;AACA,MAAMC,SAAS,GAAG,OAAO;EAAEC,OAAO,EAAE;AAAX,CAAP,CAAlB;;AACA,MAAMC,eAAe,GAAG,OAAO;EAAEC,KAAK,EAAE;AAAT,CAAP,CAAxB;;AAEA,OAAO,MAAMC,IAAI,GAAIC,SAAD,IAA0B;EAC5CC,MAAM,CAACC,OAAP,GAAiBX,QAAQ,CAACS,SAAD,CAAzB;EACAC,MAAM,CAACE,YAAP,GAAsBX,QAAtB;EACA,MAAMY,IAAI,GAAGH,MAAM,CAACC,OAApB;EACA,OAAO;IACLE,IADK;IAEL,GAAGC,OAAO,CAAC,wBAAD,CAFL;IAGL,GAAGA,OAAO,CAAC,SAAD,CAHL;IAIL,GAAGA,OAAO,CAAC,WAAD,CAJL;IAKL,GAAGA,OAAO,CAAC,cAAD,CALL;IAML,GAAGA,OAAO,CAAC,cAAD,CANL;IAOL,GAAGA,OAAO,CAAC,cAAD,CAPL;IAQL;IACAC,MAAM,EAAEb,IATH;IAUL;IACAc,QAAQ,EAAEZ,SAXL;IAYLa,gBAAgB,EAAEb,SAZb;IAaLc,eAAe,EAAEhB,IAbZ;IAcLiB,SAAS,EAAEf,SAdN;IAeLgB,OAAO,EAAEhB,SAfJ;IAgBLiB,SAAS,EAAEjB,SAhBN;IAiBLkB,aAAa,EAAElB,SAjBV;IAkBLmB,cAAc,EAAErB,IAlBX;IAmBL;IACAsB,QAAQ,EAAElB,eApBL;IAqBLmB,oBAAoB,EAAEnB,eArBjB;IAsBLoB,UAAU,EAAExB,IAtBP;IAuBLyB,OAAO,EAAEzB,IAvBJ;IAwBL0B,OAAO,EAAE,MAAMf,IAAI,CAACgB,IAAL,CAAU1B,SAAV,EAAqB,CAArB,CAxBV;IAyBL2B,WAAW,EAAE,MAAM,IAzBd;IA0BLC,QAAQ,EAAE,MAAM,IA1BX;IA2BLC,MAAM,EAAE,MAAM;EA3BT,CAAP;AA6BD,CAjCM"}
1
+ {"version":3,"names":["JsiSkApi","Noop","undefined","NoopValue","current","NoopSharedValue","value","Mock","CanvasKit","global","SkiaApi","Skia","require","Canvas","useValue","useComputedValue","useTouchHandler","useTiming","useLoop","useSpring","useClockValue","useValueEffect","useClock","usePathInterpolation","useRawData","useData","useFont","Font","useTypeface","useImage","useSVG"],"sources":["index.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport { JsiSkApi } from \"../skia/web\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst Noop: () => any = () => undefined;\nconst NoopValue = () => ({ current: 0 });\nconst NoopSharedValue = () => ({ value: 0 });\n\nexport const Mock = (CanvasKit: CanvasKit) => {\n global.SkiaApi = JsiSkApi(CanvasKit);\n const Skia = global.SkiaApi;\n return {\n Skia,\n ...require(\"../renderer/components\"),\n ...require(\"../skia\"),\n ...require(\"../animation\"),\n ...require(\"../dom/types\"),\n ...require(\"../dom/nodes\"),\n // We could use the real Canvas if we mock the SkiaView component for node\n Canvas: Noop,\n // Skia Animations\n useValue: NoopValue,\n useComputedValue: NoopValue,\n useTouchHandler: Noop,\n useTiming: NoopValue,\n useLoop: NoopValue,\n useSpring: NoopValue,\n useClockValue: NoopValue,\n useValueEffect: Noop,\n // Reanimated hooks\n useClock: NoopSharedValue,\n usePathInterpolation: NoopSharedValue,\n useRawData: Noop,\n useData: Noop,\n useFont: () => Skia.Font(undefined, 0),\n useTypeface: () => null,\n useImage: () => null,\n useSVG: () => null,\n };\n};\n"],"mappings":"AAEA,SAASA,QAAT,QAAyB,aAAzB,C,CAEA;;AACA,MAAMC,IAAe,GAAG,MAAMC,SAA9B;;AACA,MAAMC,SAAS,GAAG,OAAO;EAAEC,OAAO,EAAE;AAAX,CAAP,CAAlB;;AACA,MAAMC,eAAe,GAAG,OAAO;EAAEC,KAAK,EAAE;AAAT,CAAP,CAAxB;;AAEA,OAAO,MAAMC,IAAI,GAAIC,SAAD,IAA0B;EAC5CC,MAAM,CAACC,OAAP,GAAiBV,QAAQ,CAACQ,SAAD,CAAzB;EACA,MAAMG,IAAI,GAAGF,MAAM,CAACC,OAApB;EACA,OAAO;IACLC,IADK;IAEL,GAAGC,OAAO,CAAC,wBAAD,CAFL;IAGL,GAAGA,OAAO,CAAC,SAAD,CAHL;IAIL,GAAGA,OAAO,CAAC,cAAD,CAJL;IAKL,GAAGA,OAAO,CAAC,cAAD,CALL;IAML,GAAGA,OAAO,CAAC,cAAD,CANL;IAOL;IACAC,MAAM,EAAEZ,IARH;IASL;IACAa,QAAQ,EAAEX,SAVL;IAWLY,gBAAgB,EAAEZ,SAXb;IAYLa,eAAe,EAAEf,IAZZ;IAaLgB,SAAS,EAAEd,SAbN;IAcLe,OAAO,EAAEf,SAdJ;IAeLgB,SAAS,EAAEhB,SAfN;IAgBLiB,aAAa,EAAEjB,SAhBV;IAiBLkB,cAAc,EAAEpB,IAjBX;IAkBL;IACAqB,QAAQ,EAAEjB,eAnBL;IAoBLkB,oBAAoB,EAAElB,eApBjB;IAqBLmB,UAAU,EAAEvB,IArBP;IAsBLwB,OAAO,EAAExB,IAtBJ;IAuBLyB,OAAO,EAAE,MAAMf,IAAI,CAACgB,IAAL,CAAUzB,SAAV,EAAqB,CAArB,CAvBV;IAwBL0B,WAAW,EAAE,MAAM,IAxBd;IAyBLC,QAAQ,EAAE,MAAM,IAzBX;IA0BLC,MAAM,EAAE,MAAM;EA1BT,CAAP;AA4BD,CA/BM"}
@@ -6,7 +6,6 @@ import { SkiaDomView as SkiaDomViewWeb } from "../views/SkiaDomView.web";
6
6
  import { Skia } from "../skia/Skia";
7
7
  import { SkiaRoot } from "./Reconciler";
8
8
  import { NATIVE_DOM } from "./HostComponents";
9
- import { isValue } from "./processors";
10
9
  export const useCanvasRef = () => useRef(null);
11
10
 
12
11
  const useOnSizeEvent = (resultValue, onLayout) => {
@@ -20,12 +19,7 @@ const useOnSizeEvent = (resultValue, onLayout) => {
20
19
  height
21
20
  } = event.nativeEvent.layout;
22
21
 
23
- if (isValue(resultValue)) {
24
- resultValue.current = {
25
- width,
26
- height
27
- };
28
- } else if (resultValue) {
22
+ if (resultValue) {
29
23
  resultValue.value = {
30
24
  width,
31
25
  height
@@ -59,23 +53,11 @@ export const Canvas = /*#__PURE__*/forwardRef((_ref, forwardedRef) => {
59
53
  const id = (_innerRef$current$nat = (_innerRef$current2 = innerRef.current) === null || _innerRef$current2 === void 0 ? void 0 : _innerRef$current2.nativeId) !== null && _innerRef$current$nat !== void 0 ? _innerRef$current$nat : -1;
60
54
  return id;
61
55
  }, [innerRef]);
62
- const registerValues = useCallback(values => {
63
- if (ref.current !== null) {
64
- return ref.current.registerValues(values);
65
- }
66
-
67
- return () => {};
68
- }, [ref]);
69
- const root = useMemo(() => new SkiaRoot(Skia, registerValues, redraw, getNativeId), [redraw, registerValues, getNativeId]); // Render effect
56
+ const root = useMemo(() => new SkiaRoot(Skia, redraw, getNativeId), [redraw, getNativeId]); // Render effect
70
57
 
71
58
  useEffect(() => {
72
59
  root.render(children);
73
60
  }, [children, root, redraw]);
74
- useEffect(() => {
75
- return () => {
76
- root.unmount();
77
- };
78
- }, [root]);
79
61
 
80
62
  if (NATIVE_DOM) {
81
63
  return /*#__PURE__*/React.createElement(SkiaDomView, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useCallback","useMemo","forwardRef","useRef","SkiaDomView","SkiaDomViewWeb","Skia","SkiaRoot","NATIVE_DOM","isValue","useCanvasRef","useOnSizeEvent","resultValue","onLayout","event","width","height","nativeEvent","layout","current","value","Canvas","forwardedRef","children","style","debug","mode","onTouch","onSize","_onSize","_onLayout","props","innerRef","ref","useCombinedRefs","redraw","getNativeId","id","nativeId","registerValues","values","root","render","unmount","dom","refs","targetRef","forEach"],"sources":["Canvas.tsx"],"sourcesContent":["import React, {\n useEffect,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n MutableRefObject,\n ForwardedRef,\n FunctionComponent,\n} from \"react\";\nimport type { LayoutChangeEvent } from \"react-native\";\n\nimport { SkiaDomView } from \"../views\";\nimport { SkiaDomView as SkiaDomViewWeb } from \"../views/SkiaDomView.web\";\nimport { Skia } from \"../skia/Skia\";\nimport type { TouchHandler, SkiaBaseViewProps } from \"../views\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { SkiaRoot } from \"./Reconciler\";\nimport { NATIVE_DOM } from \"./HostComponents\";\nimport { isValue } from \"./processors\";\n\nexport const useCanvasRef = () => useRef<SkiaDomView>(null);\n\nexport interface CanvasProps extends SkiaBaseViewProps {\n ref?: RefObject<SkiaDomView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nconst useOnSizeEvent = (\n resultValue: SkiaBaseViewProps[\"onSize\"],\n onLayout?: (event: LayoutChangeEvent) => void\n) => {\n return useCallback(\n (event: LayoutChangeEvent) => {\n if (onLayout) {\n onLayout(event);\n }\n const { width, height } = event.nativeEvent.layout;\n\n if (isValue(resultValue)) {\n resultValue.current = { width, height };\n } else if (resultValue) {\n resultValue.value = { width, height };\n }\n },\n [onLayout, resultValue]\n );\n};\n\nexport const Canvas = forwardRef<SkiaDomView, CanvasProps>(\n (\n {\n children,\n style,\n debug,\n mode,\n onTouch,\n onSize: _onSize,\n onLayout: _onLayout,\n ...props\n },\n forwardedRef\n ) => {\n const onLayout = useOnSizeEvent(_onSize, _onLayout);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const redraw = useCallback(() => {\n innerRef.current?.redraw();\n }, [innerRef]);\n const getNativeId = useCallback(() => {\n const id = innerRef.current?.nativeId ?? -1;\n return id;\n }, [innerRef]);\n\n const registerValues = useCallback(\n (values: Array<SkiaValue<unknown>>) => {\n if (ref.current !== null) {\n return ref.current.registerValues(values);\n }\n return () => {};\n },\n [ref]\n );\n const root = useMemo(\n () => new SkiaRoot(Skia, registerValues, redraw, getNativeId),\n [redraw, registerValues, getNativeId]\n );\n\n // Render effect\n useEffect(() => {\n root.render(children);\n }, [children, root, redraw]);\n\n useEffect(() => {\n return () => {\n root.unmount();\n };\n }, [root]);\n if (NATIVE_DOM) {\n return (\n <SkiaDomView\n ref={ref}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onLayout={onLayout}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n } else {\n return (\n <SkiaDomViewWeb\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onLayout={onLayout}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n }\n }\n) as FunctionComponent<CanvasProps & React.RefAttributes<SkiaDomView>>;\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,IACEC,SADF,EAEEC,WAFF,EAGEC,OAHF,EAIEC,UAJF,EAKEC,MALF,QAMO,OANP;AAgBA,SAASC,WAAT,QAA4B,UAA5B;AACA,SAASA,WAAW,IAAIC,cAAxB,QAA8C,0BAA9C;AACA,SAASC,IAAT,QAAqB,cAArB;AAIA,SAASC,QAAT,QAAyB,cAAzB;AACA,SAASC,UAAT,QAA2B,kBAA3B;AACA,SAASC,OAAT,Q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,EAAEiB,IAAI,CAACG,GAJb;MAKE,OAAO,EAAEjB,OALX;MAME,QAAQ,EAAEd,QANZ;MAOE,IAAI,EAAEa,IAPR;MAQE,KAAK,EAAED;IART,GASMM,KATN,EADF;EAaD;AACF,CA7E6B,CAAzB;AAgFP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMG,eAAe,GAAG,YAEnB;EAAA,kCADAW,IACA;IADAA,IACA;EAAA;;EACH,MAAMC,SAAS,GAAGhD,KAAK,CAACK,MAAN,CAAgB,IAAhB,CAAlB;EACAL,KAAK,CAACC,SAAN,CAAgB,MAAM;IACpB8C,IAAI,CAACE,OAAL,CAAcd,GAAD,IAAS;MACpB,IAAIA,GAAJ,EAAS;QACP,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;UAC7BA,GAAG,CAACa,SAAS,CAAC3B,OAAX,CAAH;QACD,CAFD,MAEO;UACLc,GAAG,CAACd,OAAJ,GAAc2B,SAAS,CAAC3B,OAAxB;QACD;MACF;IACF,CARD;EASD,CAVD,EAUG,CAAC0B,IAAD,CAVH;EAWA,OAAOC,SAAP;AACD,CAhBD"}
1
+ {"version":3,"names":["React","useEffect","useCallback","useMemo","forwardRef","useRef","SkiaDomView","SkiaDomViewWeb","Skia","SkiaRoot","NATIVE_DOM","useCanvasRef","useOnSizeEvent","resultValue","onLayout","event","width","height","nativeEvent","layout","value","Canvas","forwardedRef","children","style","debug","mode","onTouch","onSize","_onSize","_onLayout","props","innerRef","ref","useCombinedRefs","redraw","current","getNativeId","id","nativeId","root","render","dom","refs","targetRef","forEach"],"sources":["Canvas.tsx"],"sourcesContent":["import React, {\n useEffect,\n useCallback,\n useMemo,\n forwardRef,\n useRef,\n} from \"react\";\nimport type {\n RefObject,\n ReactNode,\n MutableRefObject,\n ForwardedRef,\n FunctionComponent,\n} from \"react\";\nimport type { LayoutChangeEvent } from \"react-native\";\n\nimport { SkiaDomView } from \"../views\";\nimport { SkiaDomView as SkiaDomViewWeb } from \"../views/SkiaDomView.web\";\nimport { Skia } from \"../skia/Skia\";\nimport type { TouchHandler, SkiaBaseViewProps } from \"../views\";\n\nimport { SkiaRoot } from \"./Reconciler\";\nimport { NATIVE_DOM } from \"./HostComponents\";\n\nexport const useCanvasRef = () => useRef<SkiaDomView>(null);\n\nexport interface CanvasProps extends SkiaBaseViewProps {\n ref?: RefObject<SkiaDomView>;\n children: ReactNode;\n onTouch?: TouchHandler;\n}\n\nconst useOnSizeEvent = (\n resultValue: SkiaBaseViewProps[\"onSize\"],\n onLayout?: (event: LayoutChangeEvent) => void\n) => {\n return useCallback(\n (event: LayoutChangeEvent) => {\n if (onLayout) {\n onLayout(event);\n }\n const { width, height } = event.nativeEvent.layout;\n\n if (resultValue) {\n resultValue.value = { width, height };\n }\n },\n [onLayout, resultValue]\n );\n};\n\nexport const Canvas = forwardRef<SkiaDomView, CanvasProps>(\n (\n {\n children,\n style,\n debug,\n mode,\n onTouch,\n onSize: _onSize,\n onLayout: _onLayout,\n ...props\n },\n forwardedRef\n ) => {\n const onLayout = useOnSizeEvent(_onSize, _onLayout);\n const innerRef = useCanvasRef();\n const ref = useCombinedRefs(forwardedRef, innerRef);\n const redraw = useCallback(() => {\n innerRef.current?.redraw();\n }, [innerRef]);\n const getNativeId = useCallback(() => {\n const id = innerRef.current?.nativeId ?? -1;\n return id;\n }, [innerRef]);\n\n const root = useMemo(\n () => new SkiaRoot(Skia, redraw, getNativeId),\n [redraw, getNativeId]\n );\n\n // Render effect\n useEffect(() => {\n root.render(children);\n }, [children, root, redraw]);\n\n if (NATIVE_DOM) {\n return (\n <SkiaDomView\n ref={ref}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onLayout={onLayout}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n } else {\n return (\n <SkiaDomViewWeb\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ref={ref as any}\n style={style}\n root={root.dom}\n onTouch={onTouch}\n onLayout={onLayout}\n mode={mode}\n debug={debug}\n {...props}\n />\n );\n }\n }\n) as FunctionComponent<CanvasProps & React.RefAttributes<SkiaDomView>>;\n\n/**\n * Combines a list of refs into a single ref. This can be used to provide\n * both a forwarded ref and an internal ref keeping the same functionality\n * on both of the refs.\n * @param refs Array of refs to combine\n * @returns A single ref that can be used in a ref prop.\n */\nconst useCombinedRefs = <T,>(\n ...refs: Array<MutableRefObject<T> | ForwardedRef<T>>\n) => {\n const targetRef = React.useRef<T>(null);\n React.useEffect(() => {\n refs.forEach((ref) => {\n if (ref) {\n if (typeof ref === \"function\") {\n ref(targetRef.current);\n } else {\n ref.current = targetRef.current;\n }\n }\n });\n }, [refs]);\n return targetRef;\n};\n"],"mappings":";;AAAA,OAAOA,KAAP,IACEC,SADF,EAEEC,WAFF,EAGEC,OAHF,EAIEC,UAJF,EAKEC,MALF,QAMO,OANP;AAgBA,SAASC,WAAT,QAA4B,UAA5B;AACA,SAASA,WAAW,IAAIC,cAAxB,QAA8C,0BAA9C;AACA,SAASC,IAAT,QAAqB,cAArB;AAGA,SAASC,QAAT,QAAyB,cAAzB;AACA,SAASC,UAAT,QAA2B,kBAA3B;AAEA,OAAO,MAAMC,YAAY,GAAG,MAAMN,MAAM,CAAc,IAAd,CAAjC;;AAQP,MAAMO,cAAc,GAAG,CACrBC,WADqB,EAErBC,QAFqB,KAGlB;EACH,OAAOZ,WAAW,CACfa,KAAD,IAA8B;IAC5B,IAAID,QAAJ,EAAc;MACZA,QAAQ,CAACC,KAAD,CAAR;IACD;;IACD,MAAM;MAAEC,KAAF;MAASC;IAAT,IAAoBF,KAAK,CAACG,WAAN,CAAkBC,MAA5C;;IAEA,IAAIN,WAAJ,EAAiB;MACfA,WAAW,CAACO,KAAZ,GAAoB;QAAEJ,KAAF;QAASC;MAAT,CAApB;IACD;EACF,CAVe,EAWhB,CAACH,QAAD,EAAWD,WAAX,CAXgB,CAAlB;AAaD,CAjBD;;AAmBA,OAAO,MAAMQ,MAAM,gBAAGjB,UAAU,CAC9B,OAWEkB,YAXF,KAYK;EA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AQMM,KARN,EADF;EAYD,CAbD,MAaO;IACL,oBACE,oBAAC,cAAD,CACE;IADF;MAEE,GAAG,EAAEE,GAFP;MAGE,KAAK,EAAET,KAHT;MAIE,IAAI,EAAEgB,IAAI,CAACE,GAJb;MAKE,OAAO,EAAEf,OALX;MAME,QAAQ,EAAEb,QANZ;MAOE,IAAI,EAAEY,IAPR;MAQE,KAAK,EAAED;IART,GASMM,KATN,EADF;EAaD;AACF,CA/D6B,CAAzB;AAkEP;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,MAAMG,eAAe,GAAG,YAEnB;EAAA,kCADAS,IACA;IADAA,IACA;EAAA;;EACH,MAAMC,SAAS,GAAG5C,KAAK,CAACK,MAAN,CAAgB,IAAhB,CAAlB;EACAL,KAAK,CAACC,SAAN,CAAgB,MAAM;IACpB0C,IAAI,CAACE,OAAL,CAAcZ,GAAD,IAAS;MACpB,IAAIA,GAAJ,EAAS;QACP,IAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;UAC7BA,GAAG,CAACW,SAAS,CAACR,OAAX,CAAH;QACD,CAFD,MAEO;UACLH,GAAG,CAACG,OAAJ,GAAcQ,SAAS,CAACR,OAAxB;QACD;MACF;IACF,CARD;EASD,CAVD,EAUG,CAACO,IAAD,CAVH;EAWA,OAAOC,SAAP;AACD,CAhBD"}
@@ -1,13 +1,11 @@
1
1
  import type { GroupProps, DrawingContext, RenderNode, SkDOM } from "../dom/types";
2
2
  import type { Skia } from "../skia/types";
3
- import type { DependencyManager } from "./DependencyManager";
4
3
  export declare class Container {
5
- depMgr: DependencyManager;
6
4
  redraw: () => void;
7
5
  getNativeId: () => number;
8
6
  private _root;
9
7
  Sk: SkDOM;
10
- constructor(Skia: Skia, depMgr: DependencyManager, redraw?: () => void, getNativeId?: () => number);
8
+ constructor(Skia: Skia, redraw?: () => void, getNativeId?: () => number);
11
9
  draw(ctx: DrawingContext): void;
12
10
  get root(): RenderNode<GroupProps>;
13
11
  }
@@ -2,10 +2,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2
2
 
3
3
  import { JsiSkDOM } from "../dom/nodes";
4
4
  export class Container {
5
- constructor(Skia, depMgr) {
6
- let redraw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
7
- let getNativeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : () => 0;
8
- this.depMgr = depMgr;
5
+ constructor(Skia) {
6
+ let redraw = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
7
+ let getNativeId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => 0;
9
8
  this.redraw = redraw;
10
9
  this.getNativeId = getNativeId;
11
10
 
@@ -14,8 +13,7 @@ export class Container {
14
13
  _defineProperty(this, "Sk", void 0);
15
14
 
16
15
  this.Sk = new JsiSkDOM({
17
- Skia,
18
- depMgr
16
+ Skia
19
17
  });
20
18
  this._root = this.Sk.Group();
21
19
  }
@@ -1 +1 @@
1
- {"version":3,"names":["JsiSkDOM","Container","constructor","Skia","depMgr","redraw","getNativeId","Sk","_root","Group","draw","ctx","render","root"],"sources":["Container.tsx"],"sourcesContent":["import { JsiSkDOM } from \"../dom/nodes\";\nimport type {\n GroupProps,\n DrawingContext,\n RenderNode,\n SkDOM,\n} from \"../dom/types\";\nimport type { Skia } from \"../skia/types\";\n\nimport type { DependencyManager } from \"./DependencyManager\";\n\nexport class Container {\n private _root: RenderNode<GroupProps>;\n public Sk: SkDOM;\n constructor(\n Skia: Skia,\n public depMgr: DependencyManager,\n public redraw: () => void = () => {},\n public getNativeId: () => number = () => 0\n ) {\n this.Sk = new JsiSkDOM({ Skia, depMgr });\n this._root = this.Sk.Group();\n }\n\n draw(ctx: DrawingContext) {\n this._root.render(ctx);\n }\n\n get root() {\n return this._root;\n }\n}\n"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,cAAzB;AAWA,OAAO,MAAMC,SAAN,CAAgB;EAGrBC,WAAW,CACTC,IADS,EAEFC,MAFE,EAKT;IAAA,IAFOC,MAEP,uEAF4B,MAAM,CAAE,CAEpC;IAAA,IADOC,WACP,uEADmC,MAAM,CACzC;IAAA,KAHOF,MAGP,GAHOA,MAGP;IAAA,KAFOC,MAEP,GAFOA,MAEP;IAAA,KADOC,WACP,GADOA,WACP;;IAAA;;IAAA;;IACA,KAAKC,EAAL,GAAU,IAAIP,QAAJ,CAAa;MAAEG,IAAF;MAAQC;IAAR,CAAb,CAAV;IACA,KAAKI,KAAL,GAAa,KAAKD,EAAL,CAAQE,KAAR,EAAb;EACD;;EAEDC,IAAI,CAACC,GAAD,EAAsB;IACxB,KAAKH,KAAL,CAAWI,MAAX,CAAkBD,GAAlB;EACD;;EAEO,IAAJE,IAAI,GAAG;IACT,OAAO,KAAKL,KAAZ;EACD;;AAnBoB"}
1
+ {"version":3,"names":["JsiSkDOM","Container","constructor","Skia","redraw","getNativeId","Sk","_root","Group","draw","ctx","render","root"],"sources":["Container.tsx"],"sourcesContent":["import { JsiSkDOM } from \"../dom/nodes\";\nimport type {\n GroupProps,\n DrawingContext,\n RenderNode,\n SkDOM,\n} from \"../dom/types\";\nimport type { Skia } from \"../skia/types\";\n\nexport class Container {\n private _root: RenderNode<GroupProps>;\n public Sk: SkDOM;\n constructor(\n Skia: Skia,\n public redraw: () => void = () => {},\n public getNativeId: () => number = () => 0\n ) {\n this.Sk = new JsiSkDOM({ Skia });\n this._root = this.Sk.Group();\n }\n\n draw(ctx: DrawingContext) {\n this._root.render(ctx);\n }\n\n get root() {\n return this._root;\n }\n}\n"],"mappings":";;AAAA,SAASA,QAAT,QAAyB,cAAzB;AASA,OAAO,MAAMC,SAAN,CAAgB;EAGrBC,WAAW,CACTC,IADS,EAIT;IAAA,IAFOC,MAEP,uEAF4B,MAAM,CAAE,CAEpC;IAAA,IADOC,WACP,uEADmC,MAAM,CACzC;IAAA,KAFOD,MAEP,GAFOA,MAEP;IAAA,KADOC,WACP,GADOA,WACP;;IAAA;;IAAA;;IACA,KAAKC,EAAL,GAAU,IAAIN,QAAJ,CAAa;MAAEG;IAAF,CAAb,CAAV;IACA,KAAKI,KAAL,GAAa,KAAKD,EAAL,CAAQE,KAAR,EAAb;EACD;;EAEDC,IAAI,CAACC,GAAD,EAAsB;IACxB,KAAKH,KAAL,CAAWI,MAAX,CAAkBD,GAAlB;EACD;;EAEO,IAAJE,IAAI,GAAG;IACT,OAAO,KAAKL,KAAZ;EACD;;AAlBoB"}
@@ -1,17 +1,14 @@
1
1
  import { NodeType } from "../dom/types";
2
- import type { DeclarationNode, FractalNoiseProps, RenderNode, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, CustomDrawingNodeProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps, ParagraphProps } from "../dom/types";
2
+ import type { DeclarationNode, FractalNoiseProps, RenderNode, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps, ParagraphProps } from "../dom/types";
3
3
  import type { ChildrenProps } from "../dom/types/Common";
4
4
  import type { BlendProps, MorphologyImageFilterProps } from "../dom/types/ImageFilters";
5
5
  import type { SkRect, SkRRect } from "../skia/types";
6
6
  import type { JsiDrawingNode } from "../dom/nodes/DrawingNode";
7
- import type { SkiaValue } from "../values";
8
7
  import type { Container } from "./Container";
9
8
  import type { SkiaProps } from "./processors";
10
- import type { DependencyManager } from "./DependencyManager";
11
9
  export declare const NATIVE_DOM: boolean;
12
10
  declare global {
13
11
  var SkiaDomApi: {
14
- DependencyManager: (registerValues: (values: Array<SkiaValue<unknown>>) => () => void) => DependencyManager;
15
12
  RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;
16
13
  RRectNode: (props: RoundedRectProps) => JsiDrawingNode<RoundedRectProps, SkRRect>;
17
14
  GroupNode: (props: GroupProps) => RenderNode<GroupProps>;
@@ -19,7 +16,6 @@ declare global {
19
16
  FillNode: (props: PaintProps) => RenderNode<PaintProps>;
20
17
  CircleNode: (props: CircleProps) => RenderNode<CircleProps>;
21
18
  PathNode: (props: PathProps) => RenderNode<PathProps>;
22
- CustomDrawingNode: (props: CustomDrawingNodeProps) => RenderNode<CustomDrawingNodeProps>;
23
19
  LineNode: (props: LineProps) => RenderNode<LineProps>;
24
20
  ImageNode: (props: ImageProps) => RenderNode<ImageProps>;
25
21
  OvalNode: (props: OvalProps) => RenderNode<OvalProps>;
@@ -79,7 +75,6 @@ declare global {
79
75
  skImage: SkiaProps<ImageProps>;
80
76
  skCircle: SkiaProps<CircleProps>;
81
77
  skPath: SkiaProps<PathProps>;
82
- skDrawing: SkiaProps<CustomDrawingNodeProps>;
83
78
  skLine: SkiaProps<LineProps>;
84
79
  skOval: SkiaProps<OvalProps>;
85
80
  skPatch: SkiaProps<PatchProps>;
@@ -31,9 +31,6 @@ export const createNode = (container, type, props) => {
31
31
  case NodeType.Path:
32
32
  return Sk.Path(props);
33
33
 
34
- case NodeType.Drawing:
35
- return Sk.CustomDrawing(props);
36
-
37
34
  case NodeType.Line:
38
35
  return Sk.Line(props);
39
36
 
@@ -1 +1 @@
1
- {"version":3,"names":["NodeType","exhaustiveCheck","shouldUseJSDomOnNative","NATIVE_DOM","global","SkiaDomApi","createNode","container","type","props","Sk","Layer","Group","Paint","Fill","Image","Circle","Path","Drawing","CustomDrawing","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","BlurImageFilter","OffsetImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LerpColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","Shader","ImageShader","ColorShader","Turbulence","FractalNoise","LinearGradient","RadialGradient","SweepGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow","Paragraph"],"sources":["HostComponents.ts"],"sourcesContent":["import { NodeType } from \"../dom/types\";\nimport type {\n DeclarationNode,\n FractalNoiseProps,\n RenderNode,\n CircleProps,\n DrawingNodeProps,\n ImageProps,\n PaintProps,\n PathProps,\n CustomDrawingNodeProps,\n LineProps,\n OvalProps,\n DiffRectProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextProps,\n VerticesProps,\n BlurMaskFilterProps,\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n MatrixColorFilterProps,\n ShaderProps,\n ImageShaderProps,\n LinearGradientProps,\n GroupProps,\n PatchProps,\n BlendColorFilterProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n CornerPathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n BoxProps,\n BoxShadowProps,\n ParagraphProps,\n} from \"../dom/types\";\nimport type { ChildrenProps } from \"../dom/types/Common\";\nimport type {\n BlendProps,\n MorphologyImageFilterProps,\n} from \"../dom/types/ImageFilters\";\nimport type { SkRect, SkRRect } from \"../skia/types\";\nimport type { JsiDrawingNode } from \"../dom/nodes/DrawingNode\";\nimport type { SkiaValue } from \"../values\";\n\nimport type { Container } from \"./Container\";\nimport { exhaustiveCheck } from \"./typeddash\";\nimport type { SkiaProps } from \"./processors\";\nimport type { DependencyManager } from \"./DependencyManager\";\n\n// This flag should only be turned on for debugging/testing\nconst shouldUseJSDomOnNative = false;\nexport const NATIVE_DOM = shouldUseJSDomOnNative ? false : !!global.SkiaDomApi;\n\ndeclare global {\n var SkiaDomApi: {\n DependencyManager: (\n registerValues: (values: Array<SkiaValue<unknown>>) => () => void\n ) => DependencyManager;\n\n // FIXME: We need a better type for this\n RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;\n RRectNode: (\n props: RoundedRectProps\n ) => JsiDrawingNode<RoundedRectProps, SkRRect>;\n GroupNode: (props: GroupProps) => RenderNode<GroupProps>;\n PaintNode: (props: PaintProps) => DeclarationNode<PaintProps>;\n FillNode: (props: PaintProps) => RenderNode<PaintProps>;\n CircleNode: (props: CircleProps) => RenderNode<CircleProps>;\n PathNode: (props: PathProps) => RenderNode<PathProps>;\n CustomDrawingNode: (\n props: CustomDrawingNodeProps\n ) => RenderNode<CustomDrawingNodeProps>;\n LineNode: (props: LineProps) => RenderNode<LineProps>;\n ImageNode: (props: ImageProps) => RenderNode<ImageProps>;\n OvalNode: (props: OvalProps) => RenderNode<OvalProps>;\n PatchNode: (props: PatchProps) => RenderNode<PatchProps>;\n PointsNode: (props: PointsProps) => RenderNode<PointsProps>;\n DiffRectNode: (props: DiffRectProps) => RenderNode<DiffRectProps>;\n // Mask filters\n BlurMaskFilterNode: (\n props: BlurMaskFilterProps\n ) => DeclarationNode<BlurMaskFilterProps>;\n\n // Path effects\n DashPathEffectNode: (\n props: DashPathEffectProps\n ) => DeclarationNode<DashPathEffectProps>;\n DiscretePathEffectNode: (\n props: DiscretePathEffectProps\n ) => DeclarationNode<DiscretePathEffectProps>;\n CornerPathEffectNode: (\n props: CornerPathEffectProps\n ) => DeclarationNode<CornerPathEffectProps>;\n Path1DPathEffectNode: (\n props: Path1DPathEffectProps\n ) => DeclarationNode<Path1DPathEffectProps>;\n Path2DPathEffectNode: (\n props: Path2DPathEffectProps\n ) => DeclarationNode<Path2DPathEffectProps>;\n Line2DPathEffectNode: (\n props: Line2DPathEffectProps\n ) => DeclarationNode<Line2DPathEffectProps>;\n SumPathEffectNode: () => DeclarationNode<null>;\n\n // Image filters\n BlendImageFilterNode: (\n props: BlendImageFilterProps\n ) => DeclarationNode<BlendImageFilterProps>;\n DropShadowImageFilterNode: (\n props: DropShadowImageFilterProps\n ) => DeclarationNode<DropShadowImageFilterProps>;\n DisplacementMapImageFilterNode: (\n props: DisplacementMapImageFilterProps\n ) => DeclarationNode<DisplacementMapImageFilterProps>;\n BlurImageFilterNode: (\n props: BlurImageFilterProps\n ) => DeclarationNode<BlurImageFilterProps>;\n OffsetImageFilterNode: (\n props: OffsetImageFilterProps\n ) => DeclarationNode<OffsetImageFilterProps>;\n MorphologyImageFilterNode: (\n props: MorphologyImageFilterProps\n ) => DeclarationNode<MorphologyImageFilterProps>;\n RuntimeShaderImageFilterNode: (\n props: RuntimeShaderImageFilterProps\n ) => DeclarationNode<RuntimeShaderImageFilterProps>;\n\n // Color filters\n MatrixColorFilterNode: (\n props: MatrixColorFilterProps\n ) => DeclarationNode<MatrixColorFilterProps>;\n BlendColorFilterNode: (\n props: BlendColorFilterProps\n ) => DeclarationNode<BlendColorFilterProps>;\n LinearToSRGBGammaColorFilterNode: () => DeclarationNode<null>;\n SRGBToLinearGammaColorFilterNode: () => DeclarationNode<null>;\n LumaColorFilterNode: () => DeclarationNode<null>;\n LerpColorFilterNode: (\n props: LerpColorFilterProps\n ) => DeclarationNode<LerpColorFilterProps>;\n\n // Shaders\n ShaderNode: (props: ShaderProps) => DeclarationNode<ShaderProps>;\n ImageShaderNode: (\n props: ImageShaderProps\n ) => DeclarationNode<ImageShaderProps>;\n ColorShaderNode: (props: ColorProps) => DeclarationNode<ColorProps>;\n TurbulenceNode: (\n props: TurbulenceProps\n ) => DeclarationNode<TurbulenceProps>;\n FractalNoiseNode: (\n props: FractalNoiseProps\n ) => DeclarationNode<FractalNoiseProps>;\n LinearGradientNode: (\n props: LinearGradientProps\n ) => DeclarationNode<LinearGradientProps>;\n RadialGradientNode: (\n props: RadialGradientProps\n ) => DeclarationNode<RadialGradientProps>;\n SweepGradientNode: (\n props: SweepGradientProps\n ) => DeclarationNode<SweepGradientProps>;\n TwoPointConicalGradientNode: (\n props: TwoPointConicalGradientProps\n ) => DeclarationNode<TwoPointConicalGradientProps>;\n PictureNode: (props: PictureProps) => RenderNode<PictureProps>;\n ImageSVGNode: (props: ImageSVGProps) => RenderNode<ImageSVGProps>;\n VerticesNode: (props: VerticesProps) => RenderNode<VerticesProps>;\n TextNode: (prop: TextProps) => RenderNode<TextProps>;\n TextPathNode: (prop: TextPathProps) => RenderNode<TextPathProps>;\n TextBlobNode: (prop: TextBlobProps) => RenderNode<TextBlobProps>;\n GlyphsNode: (prop: GlyphsProps) => RenderNode<GlyphsProps>;\n BlendNode: (prop: BlendProps) => DeclarationNode<BlendProps>;\n BackdropFilterNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n BoxNode: (prop: BoxProps) => RenderNode<BoxProps>;\n BoxShadowNode: (prop: BoxShadowProps) => DeclarationNode<BoxShadowProps>;\n LayerNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n\n // Paragraph\n ParagraphNode: (props: ParagraphProps) => RenderNode<ParagraphProps>;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n skGroup: SkiaProps<GroupProps>;\n skLayer: SkiaProps<ChildrenProps>;\n skPaint: SkiaProps<PaintProps>;\n\n // Drawings\n skFill: SkiaProps<DrawingNodeProps>;\n skImage: SkiaProps<ImageProps>;\n skCircle: SkiaProps<CircleProps>;\n skPath: SkiaProps<PathProps>;\n skDrawing: SkiaProps<CustomDrawingNodeProps>;\n skLine: SkiaProps<LineProps>;\n skOval: SkiaProps<OvalProps>;\n skPatch: SkiaProps<PatchProps>;\n skPoints: SkiaProps<PointsProps>;\n skRect: SkiaProps<RectProps>;\n skRRect: SkiaProps<RoundedRectProps>;\n skVertices: SkiaProps<VerticesProps>;\n skText: SkiaProps<TextProps>;\n skTextPath: SkiaProps<TextPathProps>;\n skTextBlob: SkiaProps<TextBlobProps>;\n skGlyphs: SkiaProps<GlyphsProps>;\n skDiffRect: SkiaProps<DiffRectProps>;\n skPicture: SkiaProps<PictureProps>;\n skImageSVG: SkiaProps<ImageSVGProps>;\n\n // BlurMaskFilters\n skBlurMaskFilter: SkiaProps<BlurMaskFilterProps>;\n\n // ImageFilters\n skBlendImageFilter: SkiaProps<BlendImageFilterProps>;\n skBlurImageFilter: SkiaProps<BlurImageFilterProps>;\n skOffsetImageFilter: SkiaProps<OffsetImageFilterProps>;\n skDropShadowImageFilter: SkiaProps<DropShadowImageFilterProps>;\n skDisplacementMapImageFilter: SkiaProps<DisplacementMapImageFilterProps>;\n skRuntimeShaderImageFilter: SkiaProps<RuntimeShaderImageFilterProps>;\n skMorphologyImageFilter: SkiaProps<MorphologyImageFilterProps>;\n\n // ColorFilters\n skMatrixColorFilter: SkiaProps<MatrixColorFilterProps>;\n skBlendColorFilter: SkiaProps<BlendColorFilterProps>;\n skLinearToSRGBGammaColorFilter: SkiaProps<ChildrenProps>;\n skSRGBToLinearGammaColorFilter: SkiaProps<ChildrenProps>;\n skLumaColorFilter: SkiaProps<ChildrenProps>;\n skLerpColorFilter: SkiaProps<LerpColorFilterProps>;\n\n // Shaders\n skShader: SkiaProps<ShaderProps>;\n skImageShader: SkiaProps<ImageShaderProps>;\n skColorShader: SkiaProps<ColorProps>;\n skTurbulence: SkiaProps<TurbulenceProps>;\n skFractalNoise: SkiaProps<FractalNoiseProps>;\n skLinearGradient: SkiaProps<LinearGradientProps>;\n skRadialGradient: SkiaProps<RadialGradientProps>;\n skSweepGradient: SkiaProps<SweepGradientProps>;\n skTwoPointConicalGradient: SkiaProps<TwoPointConicalGradientProps>;\n\n // Path Effects\n skDiscretePathEffect: SkiaProps<DiscretePathEffectProps>;\n skDashPathEffect: SkiaProps<DashPathEffectProps>;\n skPath1DPathEffect: SkiaProps<Path1DPathEffectProps>;\n skPath2DPathEffect: SkiaProps<Path2DPathEffectProps>;\n skCornerPathEffect: SkiaProps<CornerPathEffectProps>;\n skSumPathEffect: ChildrenProps;\n skLine2DPathEffect: SkiaProps<Line2DPathEffectProps>;\n\n // Mixed declarations/drawings\n skBlend: SkiaProps<BlendProps>;\n skBackdropFilter: SkiaProps<ChildrenProps>;\n skBox: SkiaProps<BoxProps>;\n skBoxShadow: SkiaProps<BoxShadowProps>;\n\n // Paragraph\n skParagraph: SkiaProps<ParagraphProps>;\n }\n }\n}\n\nexport const createNode = (\n container: Container,\n type: NodeType,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n) => {\n const { Sk } = container;\n switch (type) {\n case NodeType.Layer:\n return Sk.Layer(props);\n case NodeType.Group:\n return Sk.Group(props);\n case NodeType.Paint:\n return Sk.Paint(props);\n // Drawings\n case NodeType.Fill:\n return Sk.Fill(props);\n case NodeType.Image:\n return Sk.Image(props);\n case NodeType.Circle:\n return Sk.Circle(props);\n case NodeType.Path:\n return Sk.Path(props);\n case NodeType.Drawing:\n return Sk.CustomDrawing(props);\n case NodeType.Line:\n return Sk.Line(props);\n case NodeType.Oval:\n return Sk.Oval(props);\n case NodeType.Patch:\n return Sk.Patch(props);\n case NodeType.Points:\n return Sk.Points(props);\n case NodeType.Rect:\n return Sk.Rect(props);\n case NodeType.RRect:\n return Sk.RRect(props);\n case NodeType.Vertices:\n return Sk.Vertices(props);\n case NodeType.Text:\n return Sk.Text(props);\n case NodeType.TextPath:\n return Sk.TextPath(props);\n case NodeType.TextBlob:\n return Sk.TextBlob(props);\n case NodeType.Glyphs:\n return Sk.Glyphs(props);\n case NodeType.DiffRect:\n return Sk.DiffRect(props);\n case NodeType.Picture:\n return Sk.Picture(props);\n case NodeType.ImageSVG:\n return Sk.ImageSVG(props);\n // Mask Filter\n case NodeType.BlurMaskFilter:\n return Sk.BlurMaskFilter(props);\n // Image Filter\n case NodeType.BlendImageFilter:\n return Sk.BlendImageFilter(props);\n case NodeType.BlurImageFilter:\n return Sk.BlurImageFilter(props);\n case NodeType.OffsetImageFilter:\n return Sk.OffsetImageFilter(props);\n case NodeType.DropShadowImageFilter:\n return Sk.DropShadowImageFilter(props);\n case NodeType.DisplacementMapImageFilter:\n return Sk.DisplacementMapImageFilter(props);\n case NodeType.MorphologyImageFilter:\n return Sk.MorphologyImageFilter(props);\n case NodeType.RuntimeShaderImageFilter:\n return Sk.RuntimeShaderImageFilter(props);\n // Color Filter\n case NodeType.MatrixColorFilter:\n return Sk.MatrixColorFilter(props);\n case NodeType.BlendColorFilter:\n return Sk.BlendColorFilter(props);\n case NodeType.LerpColorFilter:\n return Sk.LerpColorFilter(props);\n case NodeType.LumaColorFilter:\n return Sk.LumaColorFilter();\n case NodeType.LinearToSRGBGammaColorFilter:\n return Sk.LinearToSRGBGammaColorFilter();\n case NodeType.SRGBToLinearGammaColorFilter:\n return Sk.SRGBToLinearGammaColorFilter();\n // Shader\n case NodeType.Shader:\n return Sk.Shader(props);\n case NodeType.ImageShader:\n return Sk.ImageShader(props);\n case NodeType.ColorShader:\n return Sk.ColorShader(props);\n case NodeType.Turbulence:\n return Sk.Turbulence(props);\n case NodeType.FractalNoise:\n return Sk.FractalNoise(props);\n case NodeType.LinearGradient:\n return Sk.LinearGradient(props);\n case NodeType.RadialGradient:\n return Sk.RadialGradient(props);\n case NodeType.SweepGradient:\n return Sk.SweepGradient(props);\n case NodeType.TwoPointConicalGradient:\n return Sk.TwoPointConicalGradient(props);\n // Path Effect\n case NodeType.CornerPathEffect:\n return Sk.CornerPathEffect(props);\n case NodeType.DiscretePathEffect:\n return Sk.DiscretePathEffect(props);\n case NodeType.DashPathEffect:\n return Sk.DashPathEffect(props);\n case NodeType.Path1DPathEffect:\n return Sk.Path1DPathEffect(props);\n case NodeType.Path2DPathEffect:\n return Sk.Path2DPathEffect(props);\n case NodeType.SumPathEffect:\n return Sk.SumPathEffect();\n case NodeType.Line2DPathEffect:\n return Sk.Line2DPathEffect(props);\n // Mixed\n case NodeType.Blend:\n return Sk.Blend(props);\n case NodeType.BackdropFilter:\n return Sk.BackdropFilter(props);\n case NodeType.Box:\n return Sk.Box(props);\n case NodeType.BoxShadow:\n return Sk.BoxShadow(props);\n // Paragraph\n case NodeType.Paragraph:\n return Sk.Paragraph(props);\n default:\n return exhaustiveCheck(type);\n }\n};\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,cAAzB;AAgEA,SAASC,eAAT,QAAgC,aAAhC;AAIA;AACA,MAAMC,sBAAsB,GAAG,KAA/B;AACA,OAAO,MAAMC,UAAU,GAAGD,sBAAsB,GAAG,KAAH,GAAW,CAAC,CAACE,MAAM,CAACC,UAA7D;AAmNP,OAAO,MAAMC,UAAU,GAAG,CACxBC,SADwB,EAExBC,IAFwB,EAIxBC,KAJwB,KAKrB;EACH,MAAM;IAAEC;EAAF,IAASH,SAAf;;EACA,QAAQC,IAAR;IACE,KAAKR,QAAQ,CAACW,KA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AAC0D,SAAH,CAAa3D,KAAb,CAAP;;IACF;MACE,OAAOR,eAAe,CAACO,IAAD,CAAtB;EA5HJ;AA8HD,CArIM"}
1
+ {"version":3,"names":["NodeType","exhaustiveCheck","shouldUseJSDomOnNative","NATIVE_DOM","global","SkiaDomApi","createNode","container","type","props","Sk","Layer","Group","Paint","Fill","Image","Circle","Path","Line","Oval","Patch","Points","Rect","RRect","Vertices","Text","TextPath","TextBlob","Glyphs","DiffRect","Picture","ImageSVG","BlurMaskFilter","BlendImageFilter","BlurImageFilter","OffsetImageFilter","DropShadowImageFilter","DisplacementMapImageFilter","MorphologyImageFilter","RuntimeShaderImageFilter","MatrixColorFilter","BlendColorFilter","LerpColorFilter","LumaColorFilter","LinearToSRGBGammaColorFilter","SRGBToLinearGammaColorFilter","Shader","ImageShader","ColorShader","Turbulence","FractalNoise","LinearGradient","RadialGradient","SweepGradient","TwoPointConicalGradient","CornerPathEffect","DiscretePathEffect","DashPathEffect","Path1DPathEffect","Path2DPathEffect","SumPathEffect","Line2DPathEffect","Blend","BackdropFilter","Box","BoxShadow","Paragraph"],"sources":["HostComponents.ts"],"sourcesContent":["import { NodeType } from \"../dom/types\";\nimport type {\n DeclarationNode,\n FractalNoiseProps,\n RenderNode,\n CircleProps,\n DrawingNodeProps,\n ImageProps,\n PaintProps,\n PathProps,\n LineProps,\n OvalProps,\n DiffRectProps,\n PointsProps,\n RectProps,\n RoundedRectProps,\n TextProps,\n VerticesProps,\n BlurMaskFilterProps,\n BlendImageFilterProps,\n BlurImageFilterProps,\n DisplacementMapImageFilterProps,\n DropShadowImageFilterProps,\n OffsetImageFilterProps,\n RuntimeShaderImageFilterProps,\n MatrixColorFilterProps,\n ShaderProps,\n ImageShaderProps,\n LinearGradientProps,\n GroupProps,\n PatchProps,\n BlendColorFilterProps,\n DashPathEffectProps,\n DiscretePathEffectProps,\n CornerPathEffectProps,\n Line2DPathEffectProps,\n Path1DPathEffectProps,\n Path2DPathEffectProps,\n TextPathProps,\n TextBlobProps,\n GlyphsProps,\n TwoPointConicalGradientProps,\n TurbulenceProps,\n SweepGradientProps,\n RadialGradientProps,\n ColorProps,\n PictureProps,\n ImageSVGProps,\n LerpColorFilterProps,\n BoxProps,\n BoxShadowProps,\n ParagraphProps,\n} from \"../dom/types\";\nimport type { ChildrenProps } from \"../dom/types/Common\";\nimport type {\n BlendProps,\n MorphologyImageFilterProps,\n} from \"../dom/types/ImageFilters\";\nimport type { SkRect, SkRRect } from \"../skia/types\";\nimport type { JsiDrawingNode } from \"../dom/nodes/DrawingNode\";\n\nimport type { Container } from \"./Container\";\nimport { exhaustiveCheck } from \"./typeddash\";\nimport type { SkiaProps } from \"./processors\";\n\n// This flag should only be turned on for debugging/testing\nconst shouldUseJSDomOnNative = false;\nexport const NATIVE_DOM = shouldUseJSDomOnNative ? false : !!global.SkiaDomApi;\n\ndeclare global {\n var SkiaDomApi: {\n // FIXME: We need a better type for this\n RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;\n RRectNode: (\n props: RoundedRectProps\n ) => JsiDrawingNode<RoundedRectProps, SkRRect>;\n GroupNode: (props: GroupProps) => RenderNode<GroupProps>;\n PaintNode: (props: PaintProps) => DeclarationNode<PaintProps>;\n FillNode: (props: PaintProps) => RenderNode<PaintProps>;\n CircleNode: (props: CircleProps) => RenderNode<CircleProps>;\n PathNode: (props: PathProps) => RenderNode<PathProps>;\n LineNode: (props: LineProps) => RenderNode<LineProps>;\n ImageNode: (props: ImageProps) => RenderNode<ImageProps>;\n OvalNode: (props: OvalProps) => RenderNode<OvalProps>;\n PatchNode: (props: PatchProps) => RenderNode<PatchProps>;\n PointsNode: (props: PointsProps) => RenderNode<PointsProps>;\n DiffRectNode: (props: DiffRectProps) => RenderNode<DiffRectProps>;\n // Mask filters\n BlurMaskFilterNode: (\n props: BlurMaskFilterProps\n ) => DeclarationNode<BlurMaskFilterProps>;\n\n // Path effects\n DashPathEffectNode: (\n props: DashPathEffectProps\n ) => DeclarationNode<DashPathEffectProps>;\n DiscretePathEffectNode: (\n props: DiscretePathEffectProps\n ) => DeclarationNode<DiscretePathEffectProps>;\n CornerPathEffectNode: (\n props: CornerPathEffectProps\n ) => DeclarationNode<CornerPathEffectProps>;\n Path1DPathEffectNode: (\n props: Path1DPathEffectProps\n ) => DeclarationNode<Path1DPathEffectProps>;\n Path2DPathEffectNode: (\n props: Path2DPathEffectProps\n ) => DeclarationNode<Path2DPathEffectProps>;\n Line2DPathEffectNode: (\n props: Line2DPathEffectProps\n ) => DeclarationNode<Line2DPathEffectProps>;\n SumPathEffectNode: () => DeclarationNode<null>;\n\n // Image filters\n BlendImageFilterNode: (\n props: BlendImageFilterProps\n ) => DeclarationNode<BlendImageFilterProps>;\n DropShadowImageFilterNode: (\n props: DropShadowImageFilterProps\n ) => DeclarationNode<DropShadowImageFilterProps>;\n DisplacementMapImageFilterNode: (\n props: DisplacementMapImageFilterProps\n ) => DeclarationNode<DisplacementMapImageFilterProps>;\n BlurImageFilterNode: (\n props: BlurImageFilterProps\n ) => DeclarationNode<BlurImageFilterProps>;\n OffsetImageFilterNode: (\n props: OffsetImageFilterProps\n ) => DeclarationNode<OffsetImageFilterProps>;\n MorphologyImageFilterNode: (\n props: MorphologyImageFilterProps\n ) => DeclarationNode<MorphologyImageFilterProps>;\n RuntimeShaderImageFilterNode: (\n props: RuntimeShaderImageFilterProps\n ) => DeclarationNode<RuntimeShaderImageFilterProps>;\n\n // Color filters\n MatrixColorFilterNode: (\n props: MatrixColorFilterProps\n ) => DeclarationNode<MatrixColorFilterProps>;\n BlendColorFilterNode: (\n props: BlendColorFilterProps\n ) => DeclarationNode<BlendColorFilterProps>;\n LinearToSRGBGammaColorFilterNode: () => DeclarationNode<null>;\n SRGBToLinearGammaColorFilterNode: () => DeclarationNode<null>;\n LumaColorFilterNode: () => DeclarationNode<null>;\n LerpColorFilterNode: (\n props: LerpColorFilterProps\n ) => DeclarationNode<LerpColorFilterProps>;\n\n // Shaders\n ShaderNode: (props: ShaderProps) => DeclarationNode<ShaderProps>;\n ImageShaderNode: (\n props: ImageShaderProps\n ) => DeclarationNode<ImageShaderProps>;\n ColorShaderNode: (props: ColorProps) => DeclarationNode<ColorProps>;\n TurbulenceNode: (\n props: TurbulenceProps\n ) => DeclarationNode<TurbulenceProps>;\n FractalNoiseNode: (\n props: FractalNoiseProps\n ) => DeclarationNode<FractalNoiseProps>;\n LinearGradientNode: (\n props: LinearGradientProps\n ) => DeclarationNode<LinearGradientProps>;\n RadialGradientNode: (\n props: RadialGradientProps\n ) => DeclarationNode<RadialGradientProps>;\n SweepGradientNode: (\n props: SweepGradientProps\n ) => DeclarationNode<SweepGradientProps>;\n TwoPointConicalGradientNode: (\n props: TwoPointConicalGradientProps\n ) => DeclarationNode<TwoPointConicalGradientProps>;\n PictureNode: (props: PictureProps) => RenderNode<PictureProps>;\n ImageSVGNode: (props: ImageSVGProps) => RenderNode<ImageSVGProps>;\n VerticesNode: (props: VerticesProps) => RenderNode<VerticesProps>;\n TextNode: (prop: TextProps) => RenderNode<TextProps>;\n TextPathNode: (prop: TextPathProps) => RenderNode<TextPathProps>;\n TextBlobNode: (prop: TextBlobProps) => RenderNode<TextBlobProps>;\n GlyphsNode: (prop: GlyphsProps) => RenderNode<GlyphsProps>;\n BlendNode: (prop: BlendProps) => DeclarationNode<BlendProps>;\n BackdropFilterNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n BoxNode: (prop: BoxProps) => RenderNode<BoxProps>;\n BoxShadowNode: (prop: BoxShadowProps) => DeclarationNode<BoxShadowProps>;\n LayerNode: (prop: ChildrenProps) => RenderNode<ChildrenProps>;\n\n // Paragraph\n ParagraphNode: (props: ParagraphProps) => RenderNode<ParagraphProps>;\n };\n\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n skGroup: SkiaProps<GroupProps>;\n skLayer: SkiaProps<ChildrenProps>;\n skPaint: SkiaProps<PaintProps>;\n\n // Drawings\n skFill: SkiaProps<DrawingNodeProps>;\n skImage: SkiaProps<ImageProps>;\n skCircle: SkiaProps<CircleProps>;\n skPath: SkiaProps<PathProps>;\n skLine: SkiaProps<LineProps>;\n skOval: SkiaProps<OvalProps>;\n skPatch: SkiaProps<PatchProps>;\n skPoints: SkiaProps<PointsProps>;\n skRect: SkiaProps<RectProps>;\n skRRect: SkiaProps<RoundedRectProps>;\n skVertices: SkiaProps<VerticesProps>;\n skText: SkiaProps<TextProps>;\n skTextPath: SkiaProps<TextPathProps>;\n skTextBlob: SkiaProps<TextBlobProps>;\n skGlyphs: SkiaProps<GlyphsProps>;\n skDiffRect: SkiaProps<DiffRectProps>;\n skPicture: SkiaProps<PictureProps>;\n skImageSVG: SkiaProps<ImageSVGProps>;\n\n // BlurMaskFilters\n skBlurMaskFilter: SkiaProps<BlurMaskFilterProps>;\n\n // ImageFilters\n skBlendImageFilter: SkiaProps<BlendImageFilterProps>;\n skBlurImageFilter: SkiaProps<BlurImageFilterProps>;\n skOffsetImageFilter: SkiaProps<OffsetImageFilterProps>;\n skDropShadowImageFilter: SkiaProps<DropShadowImageFilterProps>;\n skDisplacementMapImageFilter: SkiaProps<DisplacementMapImageFilterProps>;\n skRuntimeShaderImageFilter: SkiaProps<RuntimeShaderImageFilterProps>;\n skMorphologyImageFilter: SkiaProps<MorphologyImageFilterProps>;\n\n // ColorFilters\n skMatrixColorFilter: SkiaProps<MatrixColorFilterProps>;\n skBlendColorFilter: SkiaProps<BlendColorFilterProps>;\n skLinearToSRGBGammaColorFilter: SkiaProps<ChildrenProps>;\n skSRGBToLinearGammaColorFilter: SkiaProps<ChildrenProps>;\n skLumaColorFilter: SkiaProps<ChildrenProps>;\n skLerpColorFilter: SkiaProps<LerpColorFilterProps>;\n\n // Shaders\n skShader: SkiaProps<ShaderProps>;\n skImageShader: SkiaProps<ImageShaderProps>;\n skColorShader: SkiaProps<ColorProps>;\n skTurbulence: SkiaProps<TurbulenceProps>;\n skFractalNoise: SkiaProps<FractalNoiseProps>;\n skLinearGradient: SkiaProps<LinearGradientProps>;\n skRadialGradient: SkiaProps<RadialGradientProps>;\n skSweepGradient: SkiaProps<SweepGradientProps>;\n skTwoPointConicalGradient: SkiaProps<TwoPointConicalGradientProps>;\n\n // Path Effects\n skDiscretePathEffect: SkiaProps<DiscretePathEffectProps>;\n skDashPathEffect: SkiaProps<DashPathEffectProps>;\n skPath1DPathEffect: SkiaProps<Path1DPathEffectProps>;\n skPath2DPathEffect: SkiaProps<Path2DPathEffectProps>;\n skCornerPathEffect: SkiaProps<CornerPathEffectProps>;\n skSumPathEffect: ChildrenProps;\n skLine2DPathEffect: SkiaProps<Line2DPathEffectProps>;\n\n // Mixed declarations/drawings\n skBlend: SkiaProps<BlendProps>;\n skBackdropFilter: SkiaProps<ChildrenProps>;\n skBox: SkiaProps<BoxProps>;\n skBoxShadow: SkiaProps<BoxShadowProps>;\n\n // Paragraph\n skParagraph: SkiaProps<ParagraphProps>;\n }\n }\n}\n\nexport const createNode = (\n container: Container,\n type: NodeType,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n props: any\n) => {\n const { Sk } = container;\n switch (type) {\n case NodeType.Layer:\n return Sk.Layer(props);\n case NodeType.Group:\n return Sk.Group(props);\n case NodeType.Paint:\n return Sk.Paint(props);\n // Drawings\n case NodeType.Fill:\n return Sk.Fill(props);\n case NodeType.Image:\n return Sk.Image(props);\n case NodeType.Circle:\n return Sk.Circle(props);\n case NodeType.Path:\n return Sk.Path(props);\n case NodeType.Line:\n return Sk.Line(props);\n case NodeType.Oval:\n return Sk.Oval(props);\n case NodeType.Patch:\n return Sk.Patch(props);\n case NodeType.Points:\n return Sk.Points(props);\n case NodeType.Rect:\n return Sk.Rect(props);\n case NodeType.RRect:\n return Sk.RRect(props);\n case NodeType.Vertices:\n return Sk.Vertices(props);\n case NodeType.Text:\n return Sk.Text(props);\n case NodeType.TextPath:\n return Sk.TextPath(props);\n case NodeType.TextBlob:\n return Sk.TextBlob(props);\n case NodeType.Glyphs:\n return Sk.Glyphs(props);\n case NodeType.DiffRect:\n return Sk.DiffRect(props);\n case NodeType.Picture:\n return Sk.Picture(props);\n case NodeType.ImageSVG:\n return Sk.ImageSVG(props);\n // Mask Filter\n case NodeType.BlurMaskFilter:\n return Sk.BlurMaskFilter(props);\n // Image Filter\n case NodeType.BlendImageFilter:\n return Sk.BlendImageFilter(props);\n case NodeType.BlurImageFilter:\n return Sk.BlurImageFilter(props);\n case NodeType.OffsetImageFilter:\n return Sk.OffsetImageFilter(props);\n case NodeType.DropShadowImageFilter:\n return Sk.DropShadowImageFilter(props);\n case NodeType.DisplacementMapImageFilter:\n return Sk.DisplacementMapImageFilter(props);\n case NodeType.MorphologyImageFilter:\n return Sk.MorphologyImageFilter(props);\n case NodeType.RuntimeShaderImageFilter:\n return Sk.RuntimeShaderImageFilter(props);\n // Color Filter\n case NodeType.MatrixColorFilter:\n return Sk.MatrixColorFilter(props);\n case NodeType.BlendColorFilter:\n return Sk.BlendColorFilter(props);\n case NodeType.LerpColorFilter:\n return Sk.LerpColorFilter(props);\n case NodeType.LumaColorFilter:\n return Sk.LumaColorFilter();\n case NodeType.LinearToSRGBGammaColorFilter:\n return Sk.LinearToSRGBGammaColorFilter();\n case NodeType.SRGBToLinearGammaColorFilter:\n return Sk.SRGBToLinearGammaColorFilter();\n // Shader\n case NodeType.Shader:\n return Sk.Shader(props);\n case NodeType.ImageShader:\n return Sk.ImageShader(props);\n case NodeType.ColorShader:\n return Sk.ColorShader(props);\n case NodeType.Turbulence:\n return Sk.Turbulence(props);\n case NodeType.FractalNoise:\n return Sk.FractalNoise(props);\n case NodeType.LinearGradient:\n return Sk.LinearGradient(props);\n case NodeType.RadialGradient:\n return Sk.RadialGradient(props);\n case NodeType.SweepGradient:\n return Sk.SweepGradient(props);\n case NodeType.TwoPointConicalGradient:\n return Sk.TwoPointConicalGradient(props);\n // Path Effect\n case NodeType.CornerPathEffect:\n return Sk.CornerPathEffect(props);\n case NodeType.DiscretePathEffect:\n return Sk.DiscretePathEffect(props);\n case NodeType.DashPathEffect:\n return Sk.DashPathEffect(props);\n case NodeType.Path1DPathEffect:\n return Sk.Path1DPathEffect(props);\n case NodeType.Path2DPathEffect:\n return Sk.Path2DPathEffect(props);\n case NodeType.SumPathEffect:\n return Sk.SumPathEffect();\n case NodeType.Line2DPathEffect:\n return Sk.Line2DPathEffect(props);\n // Mixed\n case NodeType.Blend:\n return Sk.Blend(props);\n case NodeType.BackdropFilter:\n return Sk.BackdropFilter(props);\n case NodeType.Box:\n return Sk.Box(props);\n case NodeType.BoxShadow:\n return Sk.BoxShadow(props);\n // Paragraph\n case NodeType.Paragraph:\n return Sk.Paragraph(props);\n default:\n return exhaustiveCheck(type);\n }\n};\n"],"mappings":"AAAA,SAASA,QAAT,QAAyB,cAAzB;AA8DA,SAASC,eAAT,QAAgC,aAAhC;AAGA;AACA,MAAMC,sBAAsB,GAAG,KAA/B;AACA,OAAO,MAAMC,UAAU,GAAGD,sBAAsB,GAAG,KAAH,GAAW,CAAC,CAACE,MAAM,CAACC,UAA7D;AA2MP,OAAO,MAAMC,UAAU,GAAG,CACxBC,SADwB,EAExBC,IAFwB,EAIxBC,KAJwB,KAKrB;EACH,MAAM;IAAEC;EAAF,IAASH,SAAf;;EACA,QAAQC,IAAR;IACE,KAAKR,QAAQ,CAACW,KAAd;MACE,OAAOD,EAAE,CAACC,KAAH,CAASF,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACY,KAAd;MACE,OAAOF,EAAE,CAACE,KAAH,CAASH,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACa,KAAd;MACE,OAAOH,EAAE,CAACG,KAAH,CAASJ,KAAT,CAAP;IACF;;IACA,KAAKT,QAAQ,CAACc,IAAd;MACE,OAAOJ,EAAE,CAACI,IAAH,CAAQL,KAAR,CAAP;;IACF,KAAKT,QAAQ,CAACe,KAAd;MACE,OAAOL,EAAE,CAACK,KAAH,CAASN,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAACgB,MAAd;MACE,OAAON,EAAE,CA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ACgD,gBAAH,CAAoBjD,KAApB,CAAP;;IACF,KAAKT,QAAQ,CAAC2D,gBAAd;MACE,OAAOjD,EAAE,CAACiD,gBAAH,CAAoBlD,KAApB,CAAP;;IACF,KAAKT,QAAQ,CAAC4D,aAAd;MACE,OAAOlD,EAAE,CAACkD,aAAH,EAAP;;IACF,KAAK5D,QAAQ,CAAC6D,gBAAd;MACE,OAAOnD,EAAE,CAACmD,gBAAH,CAAoBpD,KAApB,CAAP;IACF;;IACA,KAAKT,QAAQ,CAAC8D,KAAd;MACE,OAAOpD,EAAE,CAACoD,KAAH,CAASrD,KAAT,CAAP;;IACF,KAAKT,QAAQ,CAAC+D,cAAd;MACE,OAAOrD,EAAE,CAACqD,cAAH,CAAkBtD,KAAlB,CAAP;;IACF,KAAKT,QAAQ,CAACgE,GAAd;MACE,OAAOtD,EAAE,CAACsD,GAAH,CAAOvD,KAAP,CAAP;;IACF,KAAKT,QAAQ,CAACiE,SAAd;MACE,OAAOvD,EAAE,CAACuD,SAAH,CAAaxD,KAAb,CAAP;IACF;;IACA,KAAKT,QAAQ,CAACkE,SAAd;MACE,OAAOxD,EAAE,CAACwD,SAAH,CAAazD,KAAb,CAAP;;IACF;MACE,OAAOR,eAAe,CAACO,IAAD,CAAtB;EA1HJ;AA4HD,CAnIM"}
@@ -2,8 +2,7 @@
2
2
  import { DefaultEventPriority } from "react-reconciler/constants";
3
3
  import { bindReanimatedProps, extractReanimatedProps, unbindReanimatedNode } from "../external/reanimated/renderHelpers";
4
4
  import { createNode } from "./HostComponents";
5
- import { isSelector, isValue } from "./processors";
6
- import { mapKeys, shallowEq } from "./typeddash";
5
+ import { shallowEq } from "./typeddash";
7
6
  const DEBUG = false;
8
7
  export const debug = function () {
9
8
  if (DEBUG) {
@@ -71,9 +70,8 @@ export const skHostConfig = {
71
70
  createInstance(type, pristineProps, container, _hostContext, _internalInstanceHandle) {
72
71
  debug("createInstance", type);
73
72
  const [props, reanimatedProps] = extractReanimatedProps(pristineProps);
74
- const node = createNode(container, type, materialize(props));
73
+ const node = createNode(container, type, props);
75
74
  bindReanimatedProps(container, node, reanimatedProps);
76
- container.depMgr.subscribeNode(node, props);
77
75
  return node;
78
76
  },
79
77
 
@@ -99,7 +97,6 @@ export const skHostConfig = {
99
97
 
100
98
  resetAfterCommit(container) {
101
99
  debug("resetAfterCommit");
102
- container.depMgr.update();
103
100
  container.redraw();
104
101
  },
105
102
 
@@ -128,10 +125,8 @@ export const skHostConfig = {
128
125
  }
129
126
 
130
127
  const [props, reanimatedProps] = extractReanimatedProps(nextProps);
131
- updatePayload.depMgr.unsubscribeNode(instance);
132
- instance.setProps(materialize(props));
128
+ instance.setProps(props);
133
129
  bindReanimatedProps(updatePayload, instance, reanimatedProps);
134
- updatePayload.depMgr.subscribeNode(instance, props);
135
130
  },
136
131
 
137
132
  commitTextUpdate: (_textInstance, _oldText, _newText) => {// textInstance.instance = newText;
@@ -165,19 +160,4 @@ export const skHostConfig = {
165
160
  afterActiveInstanceBlur: () => {},
166
161
  detachDeletedInstance: () => {}
167
162
  };
168
-
169
- const materialize = props => {
170
- const result = { ...props
171
- };
172
- mapKeys(props).forEach(key => {
173
- const prop = props[key];
174
-
175
- if (isValue(prop)) {
176
- result[key] = prop.current;
177
- } else if (isSelector(prop)) {
178
- result[key] = prop.selector(prop.value.current);
179
- }
180
- });
181
- return result;
182
- };
183
163
  //# sourceMappingURL=HostConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["DefaultEventPriority","bindReanimatedProps","extractReanimatedProps","unbindReanimatedNode","createNode","isSelector","isValue","mapKeys","shallowEq","DEBUG","debug","console","log","appendNode","parent","child","addChild","removeNode","removeChild","insertBefore","before","insertChildBefore","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","pristineProps","props","reanimatedProps","node","materialize","depMgr","subscribeNode","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","update","redraw","getPublicInstance","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","commitUpdate","instance","updatePayload","prevProps","nextProps","_internalHandle","unsubscribeNode","setProps","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","children","forEach","preparePortalMount","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","result","key","prop","current","selector","value"],"sources":["HostConfig.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType, Node } from \"../dom/types\";\nimport type { SkiaValue } from \"../values\";\nimport {\n bindReanimatedProps,\n extractReanimatedProps,\n unbindReanimatedNode,\n} from \"../external/reanimated/renderHelpers\";\n\nimport type { Container } from \"./Container\";\nimport { createNode } from \"./HostComponents\";\nimport type { AnimatedProps } from \"./processors\";\nimport { isSelector, isValue } from \"./processors\";\nimport { mapKeys, shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.addChild(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n unbindReanimatedNode(child);\n return parent.removeChild(child);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.insertChildBefore(child, before);\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container.root, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n pristineProps,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n const [props, reanimatedProps] = extractReanimatedProps(pristineProps);\n const node = createNode(container, type, materialize(props));\n bindReanimatedProps(container, node, reanimatedProps);\n container.depMgr.subscribeNode(node, props);\n return node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.depMgr.update();\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n const [props, reanimatedProps] = extractReanimatedProps(nextProps);\n updatePayload.depMgr.unsubscribeNode(instance);\n instance.setProps(materialize(props));\n bindReanimatedProps(updatePayload, instance, reanimatedProps);\n updatePayload.depMgr.subscribeNode(instance, props);\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root.children().forEach((child) => {\n container.root.removeChild(child);\n });\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n removeNode(container.root, child);\n },\n\n insertInContainerBefore: (container, child, before) => {\n insertBefore(container.root, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n};\n\nconst materialize = <P>(props: AnimatedProps<P>) => {\n const result = { ...props } as P;\n mapKeys(props).forEach((key) => {\n const prop = props[key];\n if (isValue(prop)) {\n result[key] = (prop as SkiaValue<P[typeof key]>).current;\n } else if (isSelector(prop)) {\n result[key] = prop.selector(prop.value.current) as P[typeof key];\n }\n });\n\n return result;\n};\n"],"mappings":"AAAA;AAEA,SAASA,oBAAT,QAAqC,4BAArC;AAIA,SACEC,mBADF,EAEEC,sBAFF,EAGEC,oBAHF,QAIO,sCAJP;AAOA,SAASC,UAAT,QAA2B,kBAA3B;AAEA,SAASC,UAAT,EAAqBC,OAArB,QAAoC,cAApC;AACA,SAASC,OAAT,EAAkBC,SAAlB,QAAmC,aAAnC;AAEA,MAAMC,KAAK,GAAG,KAAd;AACA,OAAO,MAAMC,KAAK,GAAG,YAA6C;EAChE,IAAID,KAAJ,EAAW;IACTE,OAAO,CAACC,GAAR,CAAY,YAAZ;EACD;AACF,CAJM;;AAmCP,MAAMC,UAAU,GAAG,CAACC,MAAD,EAAwBC,KAAxB,KAAiD;EAClED,MAAM,CAACE,QAAP,CAAgBD,KAAhB;AACD,CAFD;;AAIA,MAAME,UAAU,GAAG,CAACH,MAAD,EAAwBC,KAAxB,KAAiD;EAClEZ,oBAAoB,CAACY,KAAD,CAApB;EACA,OAAOD,MAAM,CAACI,WAAP,CAAmBH,KAAnB,CAAP;AACD,CAHD;;AAKA,MAAMI,YAAY,GAAG,CACnBL,MADmB,EAEnBC,KAFmB,EAGnBK,MAHmB,KAIhB;EACHN,MAAM,CAACO,iBAAP,CAAyBN,KAAzB,EAAgCK,MAAhC;AACD,CAND;;AAQA,OAAO,MAAME,YAA4B,GAAG;EAC1C;AACF;AACA;EACEC,GAAG,EAAEC,IAAI,CAACD,GAJgC;EAK1CE,gBAAgB,EAAE,IALwB;EAM1CC,iBAAiB,EAAE,KANuB;EAO1CC,mBAAmB,EAAE,KAPqB;EAQ1CC,iBAAiB,E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AACxD,SAAD,EAAYpB,KAAZ,KAAsB;IAC9CE,UAAU,CAACkB,SAAS,CAACC,IAAX,EAAiBrB,KAAjB,CAAV;EACD,CAnKyC;EAqK1C6E,uBAAuB,EAAE,CAACzD,SAAD,EAAYpB,KAAZ,EAAmBK,MAAnB,KAA8B;IACrDD,YAAY,CAACgB,SAAS,CAACC,IAAX,EAAiBrB,KAAjB,EAAwBK,MAAxB,CAAZ;EACD,CAvKyC;EAyK1CD,YAAY,EAAE,CAACL,MAAD,EAASC,KAAT,EAAgBK,MAAhB,KAA2B;IACvCD,YAAY,CAACL,MAAD,EAASC,KAAT,EAAgBK,MAAhB,CAAZ;EACD,CA3KyC;EA4K1C;EACA;EACA;EACAyE,uBAAuB,EAAE,MAAM7F,oBA/KW;EAgL1C8F,wBAAwB,EAAE,MAAM,CAAE,CAhLQ;EAiL1CC,uBAAuB,EAAE,MAAM,CAAE,CAjLS;EAkL1CC,qBAAqB,EAAE,MAAM,CAAE;AAlLW,CAArC;;AAqLP,MAAMxC,WAAW,GAAOH,KAAJ,IAAgC;EAClD,MAAM4C,MAAM,GAAG,EAAE,GAAG5C;EAAL,CAAf;EACA9C,OAAO,CAAC8C,KAAD,CAAP,CAAeoC,OAAf,CAAwBS,GAAD,IAAS;IAC9B,MAAMC,IAAI,GAAG9C,KAAK,CAAC6C,GAAD,CAAlB;;IACA,IAAI5F,OAAO,CAAC6F,IAAD,CAAX,EAAmB;MACjBF,MAAM,CAACC,GAAD,CAAN,GAAeC,IAAD,CAAmCC,OAAjD;IACD,CAFD,MAEO,IAAI/F,UAAU,CAAC8F,IAAD,CAAd,EAAsB;MAC3BF,MAAM,CAACC,GAAD,CAAN,GAAcC,IAAI,CAACE,QAAL,CAAcF,IAAI,CAACG,KAAL,CAAWF,OAAzB,CAAd;IACD;EACF,CAPD;EASA,OAAOH,MAAP;AACD,CAZD"}
1
+ {"version":3,"names":["DefaultEventPriority","bindReanimatedProps","extractReanimatedProps","unbindReanimatedNode","createNode","shallowEq","DEBUG","debug","console","log","appendNode","parent","child","addChild","removeNode","removeChild","insertBefore","before","insertChildBefore","skHostConfig","now","Date","supportsMutation","isPrimaryRenderer","supportsPersistence","supportsHydration","scheduleTimeout","setTimeout","cancelTimeout","clearTimeout","noTimeout","appendChildToContainer","container","root","appendChild","getRootHostContext","_rootContainerInstance","getChildHostContext","_parentHostContext","_type","shouldSetTextContent","_props","createTextInstance","_text","_hostContext","_internalInstanceHandle","Error","createInstance","type","pristineProps","props","reanimatedProps","node","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","redraw","getPublicInstance","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","commitUpdate","instance","updatePayload","prevProps","nextProps","_internalHandle","setProps","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","children","forEach","preparePortalMount","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance"],"sources":["HostConfig.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType, Node } from \"../dom/types\";\nimport {\n bindReanimatedProps,\n extractReanimatedProps,\n unbindReanimatedNode,\n} from \"../external/reanimated/renderHelpers\";\n\nimport type { Container } from \"./Container\";\nimport { createNode } from \"./HostComponents\";\nimport { shallowEq } from \"./typeddash\";\n\nconst DEBUG = false;\nexport const debug = (...args: Parameters<typeof console.log>) => {\n if (DEBUG) {\n console.log(...args);\n }\n};\n\ntype Instance = Node<unknown>;\n\ntype Props = object;\ntype TextInstance = Node<unknown>;\ntype SuspenseInstance = Instance;\ntype HydratableInstance = Instance;\ntype PublicInstance = Instance;\ntype HostContext = null;\ntype UpdatePayload = Container;\ntype ChildSet = unknown;\ntype TimeoutHandle = NodeJS.Timeout;\ntype NoTimeout = -1;\n\ntype SkiaHostConfig = HostConfig<\n NodeType,\n Props,\n Container,\n Instance,\n TextInstance,\n SuspenseInstance,\n HydratableInstance,\n PublicInstance,\n HostContext,\n UpdatePayload,\n ChildSet,\n TimeoutHandle,\n NoTimeout\n>;\n\nconst appendNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.addChild(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n unbindReanimatedNode(child);\n return parent.removeChild(child);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.insertChildBefore(child, before);\n};\n\nexport const skHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\n now: Date.now,\n supportsMutation: true,\n isPrimaryRenderer: false,\n supportsPersistence: false,\n supportsHydration: false,\n //supportsMicrotask: true,\n\n scheduleTimeout: setTimeout,\n cancelTimeout: clearTimeout,\n noTimeout: -1,\n\n appendChildToContainer(container, child) {\n debug(\"appendChildToContainer\", container, child);\n appendNode(container.root, child);\n },\n\n appendChild(parent, child) {\n debug(\"appendChild\", parent, child);\n appendNode(parent, child);\n },\n\n getRootHostContext: (_rootContainerInstance: Container) => {\n debug(\"getRootHostContext\");\n return null;\n },\n\n getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {\n debug(\"getChildHostContext\");\n return null;\n },\n\n shouldSetTextContent(_type, _props) {\n return false;\n },\n\n createTextInstance(\n _text,\n _rootContainerInstance,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createTextInstance\");\n // return SpanNode({}, text) as SkNode;\n throw new Error(\"Text nodes are not supported yet\");\n },\n\n createInstance(\n type,\n pristineProps,\n container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n const [props, reanimatedProps] = extractReanimatedProps(pristineProps);\n const node = createNode(container, type, props);\n bindReanimatedProps(container, node, reanimatedProps);\n return node;\n },\n\n appendInitialChild(parentInstance, child) {\n debug(\"appendInitialChild\");\n appendNode(parentInstance, child);\n },\n\n finalizeInitialChildren(\n parentInstance,\n _type,\n _props,\n _rootContainerInstance,\n _hostContext\n ) {\n debug(\"finalizeInitialChildren\", parentInstance);\n return false;\n },\n\n commitMount() {\n // if finalizeInitialChildren = true\n debug(\"commitMount\");\n },\n\n prepareForCommit(_containerInfo) {\n debug(\"prepareForCommit\");\n return null;\n },\n\n resetAfterCommit(container) {\n debug(\"resetAfterCommit\");\n container.redraw();\n },\n\n getPublicInstance(node: Instance) {\n debug(\"getPublicInstance\");\n return node;\n },\n\n prepareUpdate: (\n _instance,\n type,\n oldProps,\n newProps,\n rootContainerInstance,\n _hostContext\n ) => {\n debug(\"prepareUpdate\");\n const propsAreEqual = shallowEq(oldProps, newProps);\n if (propsAreEqual) {\n return null;\n }\n debug(\"update \", type);\n return rootContainerInstance;\n },\n\n commitUpdate(\n instance,\n updatePayload,\n type,\n prevProps,\n nextProps,\n _internalHandle\n ) {\n debug(\"commitUpdate: \", type);\n if (shallowEq(prevProps, nextProps)) {\n return;\n }\n const [props, reanimatedProps] = extractReanimatedProps(nextProps);\n instance.setProps(props);\n bindReanimatedProps(updatePayload, instance, reanimatedProps);\n },\n\n commitTextUpdate: (\n _textInstance: TextInstance,\n _oldText: string,\n _newText: string\n ) => {\n // textInstance.instance = newText;\n },\n\n clearContainer: (container) => {\n debug(\"clearContainer\");\n container.root.children().forEach((child) => {\n container.root.removeChild(child);\n });\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n removeNode(container.root, child);\n },\n\n insertInContainerBefore: (container, child, before) => {\n insertBefore(container.root, child, before);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n after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AAuB,EAAE,MAAM,CAAE,CA7KS;EA8K1CC,qBAAqB,EAAE,MAAM,CAAE;AA9KW,CAArC"}
@@ -1,13 +1,9 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { Skia } from "../skia/types";
3
- import type { SkiaValue } from "../values/types";
4
- type RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;
5
3
  export declare class SkiaRoot {
6
4
  private root;
7
5
  private container;
8
- constructor(Skia: Skia, registerValues?: RegisterValues, redraw?: () => void, getNativeId?: () => number);
6
+ constructor(Skia: Skia, redraw?: () => void, getNativeId?: () => number);
9
7
  render(element: ReactNode): void;
10
- unmount(): void;
11
8
  get dom(): import("..").RenderNode<import("..").GroupProps>;
12
9
  }
13
- export {};
@@ -1,14 +1,9 @@
1
1
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
2
 
3
3
  import ReactReconciler from "react-reconciler";
4
- import { DependencyManager } from "./DependencyManager";
5
4
  import { skHostConfig, debug as hostDebug } from "./HostConfig";
6
5
  import { Container } from "./Container";
7
- import { NATIVE_DOM } from "./HostComponents";
8
6
  const skiaReconciler = ReactReconciler(skHostConfig);
9
-
10
- const createDependencyManager = registerValues => NATIVE_DOM ? global.SkiaDomApi.DependencyManager(registerValues) : new DependencyManager(registerValues);
11
-
12
7
  skiaReconciler.injectIntoDevTools({
13
8
  bundleType: 1,
14
9
  version: "0.0.1",
@@ -16,16 +11,14 @@ skiaReconciler.injectIntoDevTools({
16
11
  });
17
12
  export class SkiaRoot {
18
13
  constructor(Skia) {
19
- let registerValues = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => () => {};
20
- let redraw = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => {};
21
- let getNativeId = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : () => 0;
14
+ let redraw = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => {};
15
+ let getNativeId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : () => 0;
22
16
 
23
17
  _defineProperty(this, "root", void 0);
24
18
 
25
19
  _defineProperty(this, "container", void 0);
26
20
 
27
- const depMgr = createDependencyManager(registerValues);
28
- this.container = new Container(Skia, depMgr, redraw, getNativeId);
21
+ this.container = new Container(Skia, redraw, getNativeId);
29
22
  this.root = skiaReconciler.createContainer(this.container, 0, null, true, null, "", console.error, null);
30
23
  }
31
24
 
@@ -36,12 +29,6 @@ export class SkiaRoot {
36
29
  });
37
30
  }
38
31
 
39
- unmount() {
40
- skiaReconciler.updateContainer(null, this.root, null, () => {
41
- this.container.depMgr.remove();
42
- });
43
- }
44
-
45
32
  get dom() {
46
33
  return this.container.root;
47
34
  }
@@ -1 +1 @@
1
- {"version":3,"names":["ReactReconciler","DependencyManager","skHostConfig","debug","hostDebug","Container","NATIVE_DOM","skiaReconciler","createDependencyManager","registerValues","global","SkiaDomApi","injectIntoDevTools","bundleType","version","rendererPackageName","SkiaRoot","constructor","Skia","redraw","getNativeId","depMgr","container","root","createContainer","console","error","render","element","updateContainer","unmount","remove","dom"],"sources":["Reconciler.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport type { Skia } from \"../skia/types\";\nimport type { SkiaValue } from \"../values/types\";\n\nimport { DependencyManager } from \"./DependencyManager\";\nimport { skHostConfig, debug as hostDebug } from \"./HostConfig\";\nimport { Container } from \"./Container\";\nimport { NATIVE_DOM } from \"./HostComponents\";\n\nconst skiaReconciler = ReactReconciler(skHostConfig);\n\ntype RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;\n\nconst createDependencyManager = (registerValues: RegisterValues) =>\n NATIVE_DOM\n ? global.SkiaDomApi.DependencyManager(registerValues)\n : new DependencyManager(registerValues);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nexport class SkiaRoot {\n private root: OpaqueRoot;\n private container: Container;\n\n constructor(\n Skia: Skia,\n registerValues: RegisterValues = () => () => {},\n redraw: () => void = () => {},\n getNativeId: () => number = () => 0\n ) {\n const depMgr = createDependencyManager(registerValues);\n this.container = new Container(Skia, depMgr, redraw, getNativeId);\n this.root = skiaReconciler.createContainer(\n this.container,\n 0,\n null,\n true,\n null,\n \"\",\n console.error,\n null\n );\n }\n\n render(element: ReactNode) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skiaReconciler.updateContainer(element as any, this.root, null, () => {\n hostDebug(\"updateContainer\");\n });\n }\n\n unmount() {\n skiaReconciler.updateContainer(null, this.root, null, () => {\n this.container.depMgr.remove();\n });\n }\n\n get dom() {\n return this.container.root;\n }\n}\n"],"mappings":";;AAEA,OAAOA,eAAP,MAA4B,kBAA5B;AAKA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,YAAT,EAAuBC,KAAK,IAAIC,SAAhC,QAAiD,cAAjD;AACA,SAASC,SAAT,QAA0B,aAA1B;AACA,SAASC,UAAT,QAA2B,kBAA3B;AAEA,MAAMC,cAAc,GAAGP,eAAe,CAACE,YAAD,CAAtC;;AAIA,MAAMM,uBAAuB,GAAIC,cAAD,IAC9BH,UAAU,GACNI,MAAM,CAACC,UAAP,CAAkBV,iBAAlB,CAAoCQ,cAApC,CADM,GAEN,IAAIR,iBAAJ,CAAsBQ,cAAtB,CAHN;;AAKAF,cAAc,CAACK,kBAAf,CAAkC;EAChCC,UAAU,EAAE,CADoB;EAEhCC,OAAO,EAAE,OAFuB;EAGhCC,mBAAmB,EAAE;AAHW,CAAlC;AAMA,OAAO,MAAMC,QAAN,CAAe;EAIpBC,WAAW,CACTC,IADS,EAKT;IAAA,IAHAT,cAGA,uEAHiC,MAAM,MAAM,CAAE,CAG/C;IAAA,IAFAU,MAEA,uEAFqB,MAAM,CAAE,CAE7B;IAAA,IADAC,WACA,uEAD4B,MAAM,CAClC;;IAAA;;IAAA;;IACA,MAAMC,MAAM,GAAGb,uBAAuB,CAACC,cAAD,CAAtC;IACA,KAAKa,SAAL,GAAiB,IAAIjB,SAAJ,CAAca,IAAd,EAAoBG,MAApB,EAA4BF,MAA5B,EAAoCC,WAApC,CAAjB;IACA,KAAKG,IAAL,GAAYhB,cAAc,CAACiB,eAAf,CACV,KAAKF,SADK,EAEV,CAFU,EAGV,IAHU,EAIV,IAJU,EAKV,IALU,EAMV,EANU,EAOVG,OAAO,CAACC,KAPE,EAQV,IARU,CAAZ;EAUD;;EAEDC,MAAM,CAACC,OAAD,EAAqB;IACzB;IACArB,cAAc,CAACsB,eAAf,CAA+BD,OAA/B,EAA+C,KAAKL,IAApD,EAA0D,IAA1D,EAAgE,MAAM;MACpEnB,SAAS,CAAC,iBAAD,CAAT;IACD,CAFD;EAGD;;EAED0B,OAAO,GAAG;IACRvB,cAAc,CAACsB,eAAf,CAA+B,IAA/B,EAAqC,KAAKN,IAA1C,EAAgD,IAAhD,EAAsD,MAAM;MAC1D,KAAKD,SAAL,CAAeD,MAAf,CAAsBU,MAAtB;IACD,CAFD;EAGD;;EAEM,IAAHC,GAAG,GAAG;IACR,OAAO,KAAKV,SAAL,CAAeC,IAAtB;EACD;;AAvCmB"}
1
+ {"version":3,"names":["ReactReconciler","skHostConfig","debug","hostDebug","Container","skiaReconciler","injectIntoDevTools","bundleType","version","rendererPackageName","SkiaRoot","constructor","Skia","redraw","getNativeId","container","root","createContainer","console","error","render","element","updateContainer","dom"],"sources":["Reconciler.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport type { OpaqueRoot } from \"react-reconciler\";\nimport ReactReconciler from \"react-reconciler\";\n\nimport type { Skia } from \"../skia/types\";\n\nimport { skHostConfig, debug as hostDebug } from \"./HostConfig\";\nimport { Container } from \"./Container\";\n\nconst skiaReconciler = ReactReconciler(skHostConfig);\n\nskiaReconciler.injectIntoDevTools({\n bundleType: 1,\n version: \"0.0.1\",\n rendererPackageName: \"react-native-skia\",\n});\n\nexport class SkiaRoot {\n private root: OpaqueRoot;\n private container: Container;\n\n constructor(\n Skia: Skia,\n redraw: () => void = () => {},\n getNativeId: () => number = () => 0\n ) {\n this.container = new Container(Skia, redraw, getNativeId);\n this.root = skiaReconciler.createContainer(\n this.container,\n 0,\n null,\n true,\n null,\n \"\",\n console.error,\n null\n );\n }\n\n render(element: ReactNode) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n skiaReconciler.updateContainer(element as any, this.root, null, () => {\n hostDebug(\"updateContainer\");\n });\n }\n\n get dom() {\n return this.container.root;\n }\n}\n"],"mappings":";;AAEA,OAAOA,eAAP,MAA4B,kBAA5B;AAIA,SAASC,YAAT,EAAuBC,KAAK,IAAIC,SAAhC,QAAiD,cAAjD;AACA,SAASC,SAAT,QAA0B,aAA1B;AAEA,MAAMC,cAAc,GAAGL,eAAe,CAACC,YAAD,CAAtC;AAEAI,cAAc,CAACC,kBAAf,CAAkC;EAChCC,UAAU,EAAE,CADoB;EAEhCC,OAAO,EAAE,OAFuB;EAGhCC,mBAAmB,EAAE;AAHW,CAAlC;AAMA,OAAO,MAAMC,QAAN,CAAe;EAIpBC,WAAW,CACTC,IADS,EAIT;IAAA,IAFAC,MAEA,uEAFqB,MAAM,CAAE,CAE7B;IAAA,IADAC,WACA,uEAD4B,MAAM,CAClC;;IAAA;;IAAA;;IACA,KAAKC,SAAL,GAAiB,IAAIX,SAAJ,CAAcQ,IAAd,EAAoBC,MAApB,EAA4BC,WAA5B,CAAjB;IACA,KAAKE,IAAL,GAAYX,cAAc,CAACY,eAAf,CACV,KAAKF,SADK,EAEV,CAFU,EAGV,IAHU,EAIV,IAJU,EAKV,IALU,EAMV,EANU,EAOVG,OAAO,CAACC,KAPE,EAQV,IARU,CAAZ;EAUD;;EAEDC,MAAM,CAACC,OAAD,EAAqB;IACzB;IACAhB,cAAc,CAACiB,eAAf,CAA+BD,OAA/B,EAA+C,KAAKL,IAApD,EAA0D,IAA1D,EAAgE,MAAM;MACpEb,SAAS,CAAC,iBAAD,CAAT;IACD,CAFD;EAGD;;EAEM,IAAHoB,GAAG,GAAG;IACR,OAAO,KAAKR,SAAL,CAAeC,IAAtB;EACD;;AA/BmB"}
@@ -13,5 +13,4 @@ export * from "./Group";
13
13
  export * from "./Mask";
14
14
  export * from "./Paint";
15
15
  export * from "./Blend";
16
- export * from "./Drawing";
17
16
  export * from "./paragraph";
@@ -13,6 +13,5 @@ export * from "./Group";
13
13
  export * from "./Mask";
14
14
  export * from "./Paint";
15
15
  export * from "./Blend";
16
- export * from "./Drawing";
17
16
  export * from "./paragraph";
18
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Blend\";\nexport * from \"./Drawing\";\n\nexport * from \"./paragraph\";\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,QAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd;AAEA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,SAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AAEA,cAAc,aAAd"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./shapes\";\nexport * from \"./backdrop\";\nexport * from \"./image\";\nexport * from \"./shaders\";\nexport * from \"./text\";\nexport * from \"./colorFilters\";\nexport * from \"./maskFilters\";\nexport * from \"./imageFilters\";\nexport * from \"./pathEffects\";\nexport * from \"../processors\";\nexport * from \"./Picture\";\n\nexport * from \"./Group\";\nexport * from \"./Mask\";\nexport * from \"./Paint\";\nexport * from \"./Blend\";\n\nexport * from \"./paragraph\";\n"],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,WAAd;AACA,cAAc,QAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,gBAAd;AACA,cAAc,eAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd;AAEA,cAAc,SAAd;AACA,cAAc,QAAd;AACA,cAAc,SAAd;AACA,cAAc,SAAd;AAEA,cAAc,aAAd"}
@@ -1,2 +1 @@
1
1
  export * from "./components";
2
- export * from "./DependencyManager";
@@ -1,3 +1,2 @@
1
1
  export * from "./components";
2
- export * from "./DependencyManager";
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./components\";\nexport * from \"./DependencyManager\";\n"],"mappings":"AAAA,cAAc,cAAd;AACA,cAAc,qBAAd"}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./components\";\n"],"mappings":"AAAA,cAAc,cAAd"}
@@ -1,14 +1,7 @@
1
- import type { SkiaSelector, SkiaValue } from "../../../values";
2
1
  export type SharedValueType<T = number> = {
3
2
  value: T;
4
3
  };
5
- export declare const isValue: (value: unknown) => value is SkiaValue<unknown>;
6
- export declare const isSelector: <T, R>(value: unknown) => value is {
7
- selector: (v: T) => R;
8
- value: SkiaValue<T>;
9
- };
10
- export declare const isAnimated: <T>(props: AnimatedProps<T, never>) => boolean;
11
- export type AnimatedProp<T, P = any> = T | SkiaValue<T> | SkiaSelector<T, P> | SharedValueType<T>;
4
+ export type AnimatedProp<T> = T | SharedValueType<T>;
12
5
  export type AnimatedProps<T, O extends keyof T | never = never> = {
13
6
  [K in keyof T]: K extends "children" ? T[K] : K extends O ? T[K] : AnimatedProp<T[K]>;
14
7
  };