@shopify/react-native-skia 1.11.8 → 1.11.9-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (352) hide show
  1. package/android/CMakeLists.txt +30 -153
  2. package/android/build.gradle +1 -1
  3. package/cpp/skia/include/codec/SkCodec.h +7 -2
  4. package/cpp/skia/include/config/SkUserConfig.h +11 -0
  5. package/cpp/skia/include/core/SkCanvas.h +11 -7
  6. package/cpp/skia/include/core/SkColor.h +10 -0
  7. package/cpp/skia/include/core/SkColorSpace.h +184 -2
  8. package/cpp/skia/include/core/SkColorType.h +114 -32
  9. package/cpp/skia/include/core/SkFontScanner.h +5 -8
  10. package/cpp/skia/include/core/SkFontStyle.h +1 -1
  11. package/cpp/skia/include/core/SkMaskFilter.h +0 -8
  12. package/cpp/skia/include/core/SkMilestone.h +1 -1
  13. package/cpp/skia/include/core/SkPath.h +1 -1
  14. package/cpp/skia/include/core/SkRRect.h +3 -1
  15. package/cpp/skia/include/core/SkShader.h +3 -3
  16. package/cpp/skia/include/core/SkString.h +8 -8
  17. package/cpp/skia/include/core/SkSurface.h +14 -0
  18. package/cpp/skia/include/core/SkTypeface.h +24 -7
  19. package/cpp/skia/include/effects/SkGradientShader.h +6 -1
  20. package/cpp/skia/include/effects/SkRuntimeEffect.h +1 -0
  21. package/cpp/skia/include/encode/SkPngEncoder.h +14 -0
  22. package/cpp/skia/include/gpu/GpuTypes.h +9 -0
  23. package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +135 -133
  24. package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +5 -0
  25. package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +3 -3
  26. package/cpp/skia/include/gpu/ganesh/GrTypes.h +14 -9
  27. package/cpp/skia/include/gpu/graphite/Context.h +25 -2
  28. package/cpp/skia/include/gpu/graphite/ContextOptions.h +23 -5
  29. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +20 -1
  30. package/cpp/skia/include/gpu/graphite/Image.h +1 -0
  31. package/cpp/skia/include/gpu/graphite/LogPriority.h +36 -0
  32. package/cpp/skia/include/gpu/graphite/PrecompileContext.h +52 -0
  33. package/cpp/skia/include/gpu/graphite/Recorder.h +6 -0
  34. package/cpp/skia/include/gpu/graphite/Recording.h +3 -1
  35. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +4 -36
  36. package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +48 -0
  37. package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +3 -2
  38. package/cpp/skia/include/pathops/SkPathOps.h +9 -1
  39. package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +3 -0
  40. package/cpp/skia/include/private/SkPathRef.h +15 -21
  41. package/cpp/skia/include/private/base/SkAttributes.h +16 -10
  42. package/cpp/skia/include/private/base/SkMutex.h +8 -0
  43. package/cpp/skia/include/private/base/SkTArray.h +1 -1
  44. package/cpp/skia/include/private/base/SkTDArray.h +1 -1
  45. package/cpp/skia/include/private/base/SkTemplates.h +24 -11
  46. package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
  47. package/cpp/skia/include/sksl/SkSLDebugTrace.h +0 -3
  48. package/cpp/skia/modules/skcms/src/Transform_inl.h +20 -20
  49. package/cpp/skia/modules/skcms/src/skcms_Transform.h +4 -3
  50. package/cpp/skia/modules/skcms/src/skcms_public.h +19 -15
  51. package/cpp/skia/modules/skresources/include/SkResources.h +3 -1
  52. package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
  53. package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
  54. package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
  55. package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
  56. package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
  57. package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
  58. package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
  59. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +2 -0
  60. package/cpp/skia/modules/svg/include/SkSVGShape.h +1 -0
  61. package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
  62. package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +4 -0
  63. package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
  64. package/cpp/skia/src/core/SkLRUCache.h +19 -13
  65. package/cpp/skia/src/core/SkTHash.h +50 -4
  66. package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +1 -0
  67. package/lib/commonjs/external/reanimated/textures.js +4 -3
  68. package/lib/commonjs/external/reanimated/textures.js.map +1 -1
  69. package/lib/commonjs/headless/index.d.ts +1 -1
  70. package/lib/commonjs/headless/index.js +2 -2
  71. package/lib/commonjs/headless/index.js.map +1 -1
  72. package/lib/commonjs/renderer/Canvas.d.ts +2 -2
  73. package/lib/commonjs/renderer/Canvas.js +10 -27
  74. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  75. package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  76. package/lib/commonjs/renderer/Offscreen.js +4 -4
  77. package/lib/commonjs/renderer/Offscreen.js.map +1 -1
  78. package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -5
  79. package/lib/commonjs/sksg/Container.d.ts +3 -1
  80. package/lib/commonjs/sksg/Container.js +7 -1
  81. package/lib/commonjs/sksg/Container.js.map +1 -1
  82. package/lib/commonjs/sksg/HostConfig.d.ts +1 -1
  83. package/lib/commonjs/sksg/HostConfig.js +36 -6
  84. package/lib/commonjs/sksg/HostConfig.js.map +1 -1
  85. package/lib/commonjs/sksg/Reconciler.d.ts +3 -2
  86. package/lib/commonjs/sksg/Reconciler.js +16 -6
  87. package/lib/commonjs/sksg/Reconciler.js.map +1 -1
  88. package/lib/module/Platform/Platform.web.js +1 -1
  89. package/lib/module/Platform/Platform.web.js.map +1 -1
  90. package/lib/module/dom/nodes/datatypes/Circle.js +1 -2
  91. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  92. package/lib/module/dom/nodes/datatypes/Gradient.js +3 -3
  93. package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
  94. package/lib/module/dom/nodes/datatypes/Rect.js +3 -5
  95. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  96. package/lib/module/external/reanimated/buffers.js +1 -2
  97. package/lib/module/external/reanimated/buffers.js.map +1 -1
  98. package/lib/module/external/reanimated/textures.js +5 -4
  99. package/lib/module/external/reanimated/textures.js.map +1 -1
  100. package/lib/module/external/reanimated/useAnimatedImageValue.js +1 -1
  101. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  102. package/lib/module/external/reanimated/useVideo.js +10 -23
  103. package/lib/module/external/reanimated/useVideo.js.map +1 -1
  104. package/lib/module/headless/index.d.ts +1 -1
  105. package/lib/module/headless/index.js +2 -2
  106. package/lib/module/headless/index.js.map +1 -1
  107. package/lib/module/renderer/Canvas.d.ts +2 -2
  108. package/lib/module/renderer/Canvas.js +9 -27
  109. package/lib/module/renderer/Canvas.js.map +1 -1
  110. package/lib/module/renderer/Offscreen.d.ts +2 -2
  111. package/lib/module/renderer/Offscreen.js +4 -4
  112. package/lib/module/renderer/Offscreen.js.map +1 -1
  113. package/lib/module/renderer/__tests__/setup.d.ts +5 -5
  114. package/lib/module/skia/core/Vector.js +1 -1
  115. package/lib/module/skia/core/Vector.js.map +1 -1
  116. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js +1 -4
  117. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -1
  118. package/lib/module/skia/web/Host.js +1 -7
  119. package/lib/module/skia/web/Host.js.map +1 -1
  120. package/lib/module/skia/web/JsiSkAnimatedImage.js +3 -6
  121. package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
  122. package/lib/module/skia/web/JsiSkCanvas.js +3 -6
  123. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  124. package/lib/module/skia/web/JsiSkColorFilter.js +3 -6
  125. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  126. package/lib/module/skia/web/JsiSkContourMeasure.js +3 -6
  127. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  128. package/lib/module/skia/web/JsiSkContourMeasureIter.js +3 -6
  129. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  130. package/lib/module/skia/web/JsiSkData.js +3 -6
  131. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  132. package/lib/module/skia/web/JsiSkFont.js +3 -6
  133. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  134. package/lib/module/skia/web/JsiSkImage.js +8 -12
  135. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  136. package/lib/module/skia/web/JsiSkImageFilter.js +3 -6
  137. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  138. package/lib/module/skia/web/JsiSkMaskFilter.js +3 -6
  139. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  140. package/lib/module/skia/web/JsiSkMatrix.js +5 -8
  141. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  142. package/lib/module/skia/web/JsiSkPaint.js +3 -6
  143. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  144. package/lib/module/skia/web/JsiSkParagraphBuilder.js +2 -3
  145. package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -1
  146. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +1 -1
  147. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  148. package/lib/module/skia/web/JsiSkParagraphStyle.js +15 -15
  149. package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
  150. package/lib/module/skia/web/JsiSkPath.js +3 -6
  151. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  152. package/lib/module/skia/web/JsiSkPathEffect.js +3 -6
  153. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  154. package/lib/module/skia/web/JsiSkPicture.js +3 -6
  155. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  156. package/lib/module/skia/web/JsiSkPictureRecorder.js +3 -6
  157. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  158. package/lib/module/skia/web/JsiSkPoint.js +3 -6
  159. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  160. package/lib/module/skia/web/JsiSkRRect.js +3 -6
  161. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  162. package/lib/module/skia/web/JsiSkRSXform.js +3 -6
  163. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  164. package/lib/module/skia/web/JsiSkRect.js +3 -6
  165. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  166. package/lib/module/skia/web/JsiSkRuntimeEffect.js +3 -6
  167. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  168. package/lib/module/skia/web/JsiSkSVG.js +5 -8
  169. package/lib/module/skia/web/JsiSkSVG.js.map +1 -1
  170. package/lib/module/skia/web/JsiSkShader.js +3 -6
  171. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  172. package/lib/module/skia/web/JsiSkSurface.js +3 -6
  173. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  174. package/lib/module/skia/web/JsiSkTextBlob.js +3 -6
  175. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  176. package/lib/module/skia/web/JsiSkTypeface.js +3 -6
  177. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  178. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +1 -4
  179. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
  180. package/lib/module/skia/web/JsiSkVertices.js +3 -6
  181. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  182. package/lib/module/skia/web/JsiVideo.js +2 -5
  183. package/lib/module/skia/web/JsiVideo.js.map +1 -1
  184. package/lib/module/sksg/Container.d.ts +3 -1
  185. package/lib/module/sksg/Container.js +11 -8
  186. package/lib/module/sksg/Container.js.map +1 -1
  187. package/lib/module/sksg/HostConfig.d.ts +1 -1
  188. package/lib/module/sksg/HostConfig.js +36 -7
  189. package/lib/module/sksg/HostConfig.js.map +1 -1
  190. package/lib/module/sksg/Reconciler.d.ts +3 -2
  191. package/lib/module/sksg/Reconciler.js +16 -11
  192. package/lib/module/sksg/Reconciler.js.map +1 -1
  193. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +1 -5
  194. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  195. package/lib/module/sksg/Recorder/Recorder.js +3 -6
  196. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  197. package/lib/module/sksg/Recorder/Visitor.js +1 -1
  198. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  199. package/lib/module/sksg/Recorder/commands/Drawing.js +2 -4
  200. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  201. package/lib/module/sksg/Recorder/commands/Shaders.js +2 -3
  202. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
  203. package/lib/module/views/SkiaBaseWebView.js +9 -12
  204. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  205. package/lib/module/views/SkiaPictureView.js +1 -5
  206. package/lib/module/views/SkiaPictureView.js.map +1 -1
  207. package/lib/module/views/SkiaPictureView.web.js +1 -4
  208. package/lib/module/views/SkiaPictureView.web.js.map +1 -1
  209. package/lib/module/web/LoadSkiaWeb.js +1 -2
  210. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  211. package/lib/module/web/WithSkiaWeb.js +1 -1
  212. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  213. package/lib/typescript/lib/commonjs/headless/index.d.ts +1 -1
  214. package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +9 -1
  215. package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  216. package/lib/typescript/lib/commonjs/sksg/Container.d.ts +3 -0
  217. package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +21 -4
  218. package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +9 -2
  219. package/lib/typescript/lib/module/headless/index.d.ts +1 -1
  220. package/lib/typescript/lib/module/renderer/Canvas.d.ts +9 -1
  221. package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
  222. package/lib/typescript/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +2 -2
  223. package/lib/typescript/lib/module/skia/web/JsiSkAnimatedImage.d.ts +1 -0
  224. package/lib/typescript/lib/module/skia/web/JsiSkCanvas.d.ts +1 -0
  225. package/lib/typescript/lib/module/skia/web/JsiSkColorFilter.d.ts +1 -0
  226. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasure.d.ts +1 -0
  227. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  228. package/lib/typescript/lib/module/skia/web/JsiSkData.d.ts +1 -0
  229. package/lib/typescript/lib/module/skia/web/JsiSkFont.d.ts +1 -0
  230. package/lib/typescript/lib/module/skia/web/JsiSkImage.d.ts +1 -0
  231. package/lib/typescript/lib/module/skia/web/JsiSkImageFilter.d.ts +1 -0
  232. package/lib/typescript/lib/module/skia/web/JsiSkMaskFilter.d.ts +1 -0
  233. package/lib/typescript/lib/module/skia/web/JsiSkMatrix.d.ts +1 -0
  234. package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  235. package/lib/typescript/lib/module/skia/web/JsiSkPath.d.ts +1 -0
  236. package/lib/typescript/lib/module/skia/web/JsiSkPathEffect.d.ts +1 -0
  237. package/lib/typescript/lib/module/skia/web/JsiSkPicture.d.ts +1 -0
  238. package/lib/typescript/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  239. package/lib/typescript/lib/module/skia/web/JsiSkPoint.d.ts +1 -0
  240. package/lib/typescript/lib/module/skia/web/JsiSkRRect.d.ts +1 -0
  241. package/lib/typescript/lib/module/skia/web/JsiSkRSXform.d.ts +1 -0
  242. package/lib/typescript/lib/module/skia/web/JsiSkRect.d.ts +1 -0
  243. package/lib/typescript/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  244. package/lib/typescript/lib/module/skia/web/JsiSkSVG.d.ts +1 -0
  245. package/lib/typescript/lib/module/skia/web/JsiSkShader.d.ts +1 -0
  246. package/lib/typescript/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
  247. package/lib/typescript/lib/module/skia/web/JsiSkTextBlob.d.ts +1 -0
  248. package/lib/typescript/lib/module/skia/web/JsiSkTypeface.d.ts +1 -0
  249. package/lib/typescript/lib/module/skia/web/JsiSkTypefaceFontProvider.d.ts +1 -0
  250. package/lib/typescript/lib/module/skia/web/JsiSkVertices.d.ts +1 -0
  251. package/lib/typescript/lib/module/skia/web/JsiVideo.d.ts +2 -2
  252. package/lib/typescript/lib/module/sksg/Container.d.ts +7 -12
  253. package/lib/typescript/lib/module/sksg/HostConfig.d.ts +20 -4
  254. package/lib/typescript/lib/module/sksg/Reconciler.d.ts +18 -17
  255. package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  256. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +5 -2
  257. package/lib/typescript/lib/module/views/SkiaBaseWebView.d.ts +12 -11
  258. package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +2 -2
  259. package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
  260. package/lib/typescript/src/headless/index.d.ts +1 -1
  261. package/lib/typescript/src/renderer/Canvas.d.ts +2 -2
  262. package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
  263. package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -5
  264. package/lib/typescript/src/sksg/Container.d.ts +3 -1
  265. package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
  266. package/lib/typescript/src/sksg/Reconciler.d.ts +3 -2
  267. package/libs/apple/libskia.xcframework/Info.plist +15 -15
  268. package/libs/apple/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  269. package/libs/apple/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  270. package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
  271. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e/libskia.a +0 -0
  272. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  273. package/libs/apple/libskottie.xcframework/Info.plist +8 -8
  274. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  275. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  276. package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
  277. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e/libskottie.a +0 -0
  278. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  279. package/libs/apple/libskparagraph.xcframework/Info.plist +7 -7
  280. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  281. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  282. package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
  283. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e/libskparagraph.a +0 -0
  284. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  285. package/libs/apple/libsksg.xcframework/Info.plist +12 -12
  286. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  287. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  288. package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
  289. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e/libsksg.a +0 -0
  290. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  291. package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
  292. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  293. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  294. package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
  295. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e/libskshaper.a +0 -0
  296. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  297. package/libs/apple/libskunicode_core.xcframework/Info.plist +14 -14
  298. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e/libskunicode_core.a +0 -0
  299. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  300. package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
  301. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e/libskunicode_core.a +0 -0
  302. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  303. package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +13 -13
  304. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  305. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  306. package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
  307. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  308. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  309. package/libs/apple/libsvg.xcframework/Info.plist +11 -11
  310. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  311. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  312. package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
  313. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e/libsvg.a +0 -0
  314. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  315. package/package.json +10 -9
  316. package/src/external/reanimated/textures.tsx +5 -4
  317. package/src/headless/index.ts +2 -2
  318. package/src/renderer/Canvas.tsx +57 -80
  319. package/src/renderer/Offscreen.tsx +4 -4
  320. package/src/renderer/__tests__/Data.spec.tsx +9 -10
  321. package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
  322. package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
  323. package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
  324. package/src/renderer/__tests__/Image.spec.tsx +2 -2
  325. package/src/renderer/__tests__/Paths.spec.tsx +8 -8
  326. package/src/renderer/__tests__/Picture.spec.tsx +10 -12
  327. package/src/renderer/__tests__/Simple.spec.tsx +6 -6
  328. package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
  329. package/src/renderer/__tests__/Text.spec.tsx +12 -12
  330. package/src/renderer/__tests__/Transform.spec.tsx +8 -8
  331. package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
  332. package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
  333. package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
  334. package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
  335. package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
  336. package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
  337. package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
  338. package/src/renderer/__tests__/setup.tsx +13 -13
  339. package/src/sksg/Container.ts +9 -1
  340. package/src/sksg/HostConfig.ts +37 -7
  341. package/src/sksg/Reconciler.ts +17 -6
  342. package/src/sksg/__tests__/Simple.spec.tsx +8 -8
  343. package/lib/commonjs/sksg/HostConfig2.d.ts +0 -19
  344. package/lib/commonjs/sksg/HostConfig2.js +0 -159
  345. package/lib/commonjs/sksg/HostConfig2.js.map +0 -1
  346. package/lib/module/sksg/HostConfig2.d.ts +0 -19
  347. package/lib/module/sksg/HostConfig2.js +0 -152
  348. package/lib/module/sksg/HostConfig2.js.map +0 -1
  349. package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +0 -44
  350. package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +0 -43
  351. package/lib/typescript/src/sksg/HostConfig2.d.ts +0 -19
  352. package/src/sksg/HostConfig2.ts +0 -247
@@ -1,4 +1,5 @@
1
1
  /*global NodeJS*/
2
+ import { createContext } from "react";
2
3
  import type { Fiber, HostConfig } from "react-reconciler";
3
4
  import { DefaultEventPriority } from "react-reconciler/constants";
4
5
 
@@ -8,6 +9,9 @@ import { shallowEq } from "../renderer/typeddash";
8
9
  import type { Node } from "./Node";
9
10
  import type { Container } from "./Container";
10
11
 
12
+ type EventPriority = number;
13
+ const NoEventPriority = 0;
14
+
11
15
  const DEBUG = false;
12
16
  export const debug = (...args: Parameters<typeof console.log>) => {
13
17
  if (DEBUG) {
@@ -22,7 +26,7 @@ type TextInstance = Node;
22
26
  type SuspenseInstance = Instance;
23
27
  type HydratableInstance = Instance;
24
28
  type PublicInstance = Instance;
25
- type HostContext = null;
29
+ type HostContext = object;
26
30
  type UpdatePayload = Container;
27
31
  type ChildSet = Node[];
28
32
  type TimeoutHandle = NodeJS.Timeout;
@@ -43,6 +47,7 @@ type SkiaHostConfig = HostConfig<
43
47
  TimeoutHandle,
44
48
  NoTimeout
45
49
  >;
50
+ let currentUpdatePriority: EventPriority = NoEventPriority;
46
51
 
47
52
  export const sksgHostConfig: SkiaHostConfig = {
48
53
  /**
@@ -59,12 +64,12 @@ export const sksgHostConfig: SkiaHostConfig = {
59
64
 
60
65
  getRootHostContext: (_rootContainerInstance: Container) => {
61
66
  debug("getRootHostContext");
62
- return null;
67
+ return {};
63
68
  },
64
69
 
65
70
  getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
66
71
  debug("getChildHostContext");
67
- return null;
72
+ return {};
68
73
  },
69
74
 
70
75
  shouldSetTextContent(_type, _props) {
@@ -125,9 +130,8 @@ export const sksgHostConfig: SkiaHostConfig = {
125
130
  return null;
126
131
  },
127
132
 
128
- resetAfterCommit(container) {
133
+ resetAfterCommit(_container) {
129
134
  debug("resetAfterCommit");
130
- container.redraw();
131
135
  },
132
136
 
133
137
  getPublicInstance(node: Instance) {
@@ -169,16 +173,15 @@ export const sksgHostConfig: SkiaHostConfig = {
169
173
 
170
174
  cloneInstance(
171
175
  instance,
172
- _updatePayload,
173
176
  _type,
174
177
  _oldProps,
175
178
  newProps,
179
+ _updatePayload,
176
180
  _internalInstanceHandle,
177
181
  keepChildren: boolean,
178
182
  _recyclableInstance: null | Instance
179
183
  ) {
180
184
  debug("cloneInstance");
181
-
182
185
  return {
183
186
  type: instance.type,
184
187
  props: newProps,
@@ -234,4 +237,31 @@ export const sksgHostConfig: SkiaHostConfig = {
234
237
  getInstanceFromScope: function (_scopeInstance): Instance | null {
235
238
  throw new Error("Function not implemented.");
236
239
  },
240
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
241
+ // @ts-expect-error
242
+ shouldAttemptEagerTransition: () => false,
243
+ trackSchedulerEvent: () => {},
244
+ resolveEventType: () => null,
245
+ resolveEventTimeStamp: () => -1.1,
246
+ requestPostPaintCallback() {},
247
+ maySuspendCommit: () => false,
248
+ preloadInstance: () => true, // true indicates already loaded
249
+ startSuspendingCommit() {},
250
+ suspendInstance() {},
251
+ waitForCommitToBeReady: () => null,
252
+ NotPendingTransition: null,
253
+ HostTransitionContext: createContext(null),
254
+ setCurrentUpdatePriority(newPriority: number) {
255
+ currentUpdatePriority = newPriority;
256
+ },
257
+ getCurrentUpdatePriority() {
258
+ return currentUpdatePriority;
259
+ },
260
+ resolveUpdatePriority() {
261
+ if (currentUpdatePriority !== NoEventPriority) {
262
+ return currentUpdatePriority;
263
+ }
264
+ return DefaultEventPriority;
265
+ },
266
+ resetFormInstance() {},
237
267
  };
@@ -41,13 +41,21 @@ export class SkiaSGRoot {
41
41
  return { type: NodeType.Group, props: {}, children, isDeclaration: false };
42
42
  }
43
43
 
44
- render(element: ReactNode) {
45
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
46
- skiaReconciler.updateContainer(element as any, this.root, null, () => {
47
- debug("updateContainer");
44
+ private updateContainer(element: ReactNode) {
45
+ return new Promise((resolve) => {
46
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
47
+ skiaReconciler.updateContainer(element as any, this.root, null, () => {
48
+ debug("updateContainer");
49
+ resolve(true);
50
+ });
48
51
  });
49
52
  }
50
53
 
54
+ async render(element: ReactNode) {
55
+ await this.updateContainer(element);
56
+ this.container.redraw();
57
+ }
58
+
51
59
  drawOnCanvas(canvas: SkCanvas) {
52
60
  this.container.drawOnCanvas(canvas);
53
61
  }
@@ -61,8 +69,11 @@ export class SkiaSGRoot {
61
69
 
62
70
  unmount() {
63
71
  this.container.unmount();
64
- skiaReconciler.updateContainer(null, this.root, null, () => {
65
- debug("unmountContainer");
72
+ return new Promise((resolve) => {
73
+ skiaReconciler.updateContainer(null, this.root, null, () => {
74
+ debug("unmountContainer");
75
+ resolve(true);
76
+ });
66
77
  });
67
78
  }
68
79
  }
@@ -39,10 +39,10 @@ const Ring = ({ index, progress, width, center }: RingProps) => {
39
39
  };
40
40
 
41
41
  describe("Simple", () => {
42
- it("should have a simple render (1)", () => {
42
+ it("should have a simple render (1)", async () => {
43
43
  const { Skia } = importSkia();
44
44
  const root = new SkiaSGRoot(Skia);
45
- root.render(<skCircle r={128} color="cyan" />);
45
+ await root.render(<skCircle r={128} color="cyan" />);
46
46
  const surface = Skia.Surface.Make(768, 768)!;
47
47
  expect(surface).toBeDefined();
48
48
  const canvas = surface.getCanvas();
@@ -52,10 +52,10 @@ describe("Simple", () => {
52
52
  expect(image).toBeDefined();
53
53
  checkImage(image, "snapshots/sksg/simple.png");
54
54
  });
55
- it("should have a simple render (2)", () => {
55
+ it("should have a simple render (2)", async () => {
56
56
  const { Skia } = importSkia();
57
57
  const root = new SkiaSGRoot(Skia);
58
- root.render(
58
+ await root.render(
59
59
  <>
60
60
  <skFill color="magenta" />
61
61
  <skCircle r={128} cx={768 / 2} cy={768 / 2} color="cyan" />
@@ -70,7 +70,7 @@ describe("Simple", () => {
70
70
  expect(image).toBeDefined();
71
71
  checkImage(image, "snapshots/sksg/simple2.png");
72
72
  });
73
- it("simple demo", () => {
73
+ it("simple demo", async () => {
74
74
  const { Skia } = importSkia();
75
75
  const root = new SkiaSGRoot(Skia);
76
76
  const width = 768;
@@ -78,7 +78,7 @@ describe("Simple", () => {
78
78
  const center = { x: width / 2, y: height / 2 };
79
79
  const progress = 0.5;
80
80
  const transform = (() => [{ rotate: mix(progress, -Math.PI, 0) }])();
81
- root.render(
81
+ await root.render(
82
82
  <>
83
83
  <skFill color="rgb(36,43,56)" />
84
84
  <skGroup blendMode="screen" origin={center} transform={transform}>
@@ -108,7 +108,7 @@ describe("Simple", () => {
108
108
  checkImage(image, "snapshots/sksg/breathe.png");
109
109
  });
110
110
 
111
- it("simple demo (2)", () => {
111
+ it("simple demo (2)", async () => {
112
112
  const { Skia } = importSkia();
113
113
  const root = new SkiaSGRoot(Skia);
114
114
  const width = 768;
@@ -116,7 +116,7 @@ describe("Simple", () => {
116
116
  const center = { x: width / 2, y: height / 2 };
117
117
  const progress = 0;
118
118
  const transform = (() => [{ rotate: mix(progress, -Math.PI, 0) }])();
119
- root.render(
119
+ await root.render(
120
120
  <>
121
121
  <skFill color="rgb(36,43,56)" />
122
122
  <skGroup blendMode="screen" origin={center} transform={transform}>
@@ -1,19 +0,0 @@
1
- import type { HostConfig } from "react-reconciler";
2
- import type { NodeType } from "../dom/types";
3
- import type { Container } from "./Container";
4
- import type { Node } from "./Node";
5
- export declare const debug: (message?: any, ...optionalParams: any[]) => void;
6
- type Instance = Node<unknown>;
7
- type Props = object;
8
- type TextInstance = Node<unknown>;
9
- type SuspenseInstance = Instance;
10
- type HydratableInstance = Instance;
11
- type PublicInstance = Instance;
12
- type HostContext = null;
13
- type UpdatePayload = Container;
14
- type ChildSet = unknown;
15
- type TimeoutHandle = NodeJS.Timeout;
16
- type NoTimeout = -1;
17
- type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
18
- export declare const sksgHostConfig: SkiaHostConfig;
19
- export {};
@@ -1,159 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.sksgHostConfig = exports.debug = void 0;
7
- var _constants = require("react-reconciler/constants");
8
- var _typeddash = require("../renderer/typeddash");
9
- /*global NodeJS*/
10
-
11
- const DEBUG = false;
12
- const debug = (...args) => {
13
- if (DEBUG) {
14
- console.log(...args);
15
- }
16
- };
17
- exports.debug = debug;
18
- const appendNode = (parent, child) => {
19
- parent.children.push(child);
20
- };
21
- const removeNode = (parent, child) => {
22
- parent.children.splice(parent.children.indexOf(child), 1);
23
- };
24
- const insertBefore = (parent, child, before) => {
25
- parent.children.splice(parent.children.indexOf(before), 0, child);
26
- };
27
- const sksgHostConfig = exports.sksgHostConfig = {
28
- /**
29
- * This function is used by the reconciler in order to calculate current time for prioritising work.
30
- */
31
- supportsMutation: true,
32
- isPrimaryRenderer: false,
33
- supportsPersistence: false,
34
- supportsHydration: false,
35
- //supportsMicrotask: true,
36
-
37
- scheduleTimeout: setTimeout,
38
- cancelTimeout: clearTimeout,
39
- noTimeout: -1,
40
- appendChildToContainer(container, child) {
41
- debug("appendChildToContainer");
42
- container.root.push(child);
43
- },
44
- appendChild(parent, child) {
45
- debug("appendChild", parent, child);
46
- appendNode(parent, child);
47
- },
48
- getRootHostContext: _rootContainerInstance => {
49
- debug("getRootHostContext");
50
- return null;
51
- },
52
- getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
53
- debug("getChildHostContext");
54
- return null;
55
- },
56
- shouldSetTextContent(_type, _props) {
57
- return false;
58
- },
59
- createTextInstance(_text, _rootContainerInstance, _hostContext, _internalInstanceHandle) {
60
- debug("createTextInstance");
61
- // return SpanNode({}, text) as SkNode;
62
- throw new Error("Text nodes are not supported yet");
63
- },
64
- createInstance(type, propsWithChildren, _container, _hostContext, _internalInstanceHandle) {
65
- debug("createInstance", type);
66
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
67
- const {
68
- children,
69
- ...props
70
- } = propsWithChildren;
71
- debug("createInstance", type);
72
- const instance = {
73
- type,
74
- props,
75
- children: []
76
- };
77
- return instance;
78
- },
79
- appendInitialChild(parentInstance, child) {
80
- debug("appendInitialChild");
81
- appendNode(parentInstance, child);
82
- },
83
- finalizeInitialChildren(parentInstance, _type, _props, _rootContainerInstance, _hostContext) {
84
- debug("finalizeInitialChildren", parentInstance);
85
- return false;
86
- },
87
- commitMount() {
88
- // if finalizeInitialChildren = true
89
- debug("commitMount");
90
- },
91
- prepareForCommit(_containerInfo) {
92
- debug("prepareForCommit");
93
- return null;
94
- },
95
- resetAfterCommit(container) {
96
- debug("resetAfterCommit");
97
- container.redraw();
98
- },
99
- getPublicInstance(node) {
100
- debug("getPublicInstance");
101
- return node;
102
- },
103
- prepareUpdate: (_instance, type, oldProps, newProps, rootContainerInstance, _hostContext) => {
104
- debug("prepareUpdate");
105
- const propsAreEqual = (0, _typeddash.shallowEq)(oldProps, newProps);
106
- if (propsAreEqual) {
107
- return null;
108
- }
109
- debug("update ", type);
110
- return rootContainerInstance;
111
- },
112
- commitUpdate(instance, _updatePayload, type, prevProps, nextProps, _internalHandle) {
113
- debug("commitUpdate: ", type);
114
- if ((0, _typeddash.shallowEq)(prevProps, nextProps)) {
115
- return;
116
- }
117
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
118
- const {
119
- children,
120
- ...props
121
- } = nextProps;
122
- instance.props = props;
123
- },
124
- commitTextUpdate: (_textInstance, _oldText, _newText) => {
125
- // textInstance.instance = newText;
126
- },
127
- clearContainer: container => {
128
- debug("clearContainer");
129
- container.root = [];
130
- },
131
- preparePortalMount: () => {
132
- debug("preparePortalMount");
133
- },
134
- removeChild: (parent, child) => {
135
- removeNode(parent, child);
136
- },
137
- removeChildFromContainer: (container, child) => {
138
- container.root.splice(container.root.indexOf(child), 1);
139
- },
140
- insertInContainerBefore: (container, child, before) => {
141
- container.root.splice(container.root.indexOf(before), 0, child);
142
- },
143
- insertBefore: (parent, child, before) => {
144
- insertBefore(parent, child, before);
145
- },
146
- // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874
147
- getCurrentEventPriority: () => _constants.DefaultEventPriority,
148
- beforeActiveInstanceBlur: () => {},
149
- afterActiveInstanceBlur: () => {},
150
- detachDeletedInstance: () => {},
151
- getInstanceFromNode: function (_node) {
152
- return null;
153
- },
154
- prepareScopeUpdate: function (_scopeInstance, _instance) {},
155
- getInstanceFromScope: function (_scopeInstance) {
156
- return null;
157
- }
158
- };
159
- //# sourceMappingURL=HostConfig2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_constants","require","_typeddash","DEBUG","debug","args","console","log","exports","appendNode","parent","child","children","push","removeNode","splice","indexOf","insertBefore","before","sksgHostConfig","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","propsWithChildren","_container","props","instance","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","redraw","getPublicInstance","node","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","shallowEq","commitUpdate","_updatePayload","prevProps","nextProps","_internalHandle","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","preparePortalMount","removeChild","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","DefaultEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","getInstanceFromNode","_node","prepareScopeUpdate","_scopeInstance","getInstanceFromScope"],"sources":["HostConfig2.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { Fiber, HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType } from \"../dom/types\";\nimport { shallowEq } from \"../renderer/typeddash\";\n\nimport type { Container } from \"./Container\";\nimport type { Node } from \"./Node\";\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.children.push(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.children.splice(parent.children.indexOf(child), 1);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.children.splice(parent.children.indexOf(before), 0, child);\n};\n\nexport const sksgHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\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\");\n container.root.push(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 propsWithChildren,\n _container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { children, ...props } = propsWithChildren as any;\n debug(\"createInstance\", type);\n const instance = {\n type,\n props,\n children: [],\n };\n return instance;\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { children, ...props } = nextProps as any;\n instance.props = 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 = [];\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n container.root.splice(container.root.indexOf(child), 1);\n },\n\n insertInContainerBefore: (container, child, before) => {\n container.root.splice(container.root.indexOf(before), 0, child);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n\n getInstanceFromNode: function (_node): Fiber | null | undefined {\n return null;\n },\n prepareScopeUpdate: function (_scopeInstance, _instance): void {},\n getInstanceFromScope: function (_scopeInstance): Instance | null {\n return null;\n },\n};\n"],"mappings":";;;;;;AAEA,IAAAA,UAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AALA;;AAUA,MAAME,KAAK,GAAG,KAAK;AACZ,MAAMC,KAAK,GAAGA,CAAC,GAAGC,IAAoC,KAAK;EAChE,IAAIF,KAAK,EAAE;IACTG,OAAO,CAACC,GAAG,CAAC,GAAGF,IAAI,CAAC;EACtB;AACF,CAAC;AAACG,OAAA,CAAAJ,KAAA,G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AC;EAED2E,WAAW,EAAEA,CAACrE,MAAM,EAAEC,KAAK,KAAK;IAC9BG,UAAU,CAACJ,MAAM,EAAEC,KAAK,CAAC;EAC3B,CAAC;EAEDqE,wBAAwB,EAAEA,CAAClD,SAAS,EAAEnB,KAAK,KAAK;IAC9CmB,SAAS,CAACC,IAAI,CAAChB,MAAM,CAACe,SAAS,CAACC,IAAI,CAACf,OAAO,CAACL,KAAK,CAAC,EAAE,CAAC,CAAC;EACzD,CAAC;EAEDsE,uBAAuB,EAAEA,CAACnD,SAAS,EAAEnB,KAAK,EAAEO,MAAM,KAAK;IACrDY,SAAS,CAACC,IAAI,CAAChB,MAAM,CAACe,SAAS,CAACC,IAAI,CAACf,OAAO,CAACE,MAAM,CAAC,EAAE,CAAC,EAAEP,KAAK,CAAC;EACjE,CAAC;EAEDM,YAAY,EAAEA,CAACP,MAAM,EAAEC,KAAK,EAAEO,MAAM,KAAK;IACvCD,YAAY,CAACP,MAAM,EAAEC,KAAK,EAAEO,MAAM,CAAC;EACrC,CAAC;EAED;EACAgE,uBAAuB,EAAEA,CAAA,KAAMC,+BAAoB;EACnDC,wBAAwB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClCC,uBAAuB,EAAEA,CAAA,KAAM,CAAC,CAAC;EACjCC,qBAAqB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAE/BC,mBAAmB,EAAE,SAAAA,CAAUC,KAAK,EAA4B;IAC9D,OAAO,IAAI;EACb,CAAC;EACDC,kBAAkB,EAAE,SAAAA,CAAUC,cAAc,EAAE5B,SAAS,EAAQ,CAAC,CAAC;EACjE6B,oBAAoB,EAAE,SAAAA,CAAUD,cAAc,EAAmB;IAC/D,OAAO,IAAI;EACb;AACF,CAAC","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- import type { HostConfig } from "react-reconciler";
2
- import type { NodeType } from "../dom/types";
3
- import type { Container } from "./Container";
4
- import type { Node } from "./Node";
5
- export declare const debug: (message?: any, ...optionalParams: any[]) => void;
6
- type Instance = Node<unknown>;
7
- type Props = object;
8
- type TextInstance = Node<unknown>;
9
- type SuspenseInstance = Instance;
10
- type HydratableInstance = Instance;
11
- type PublicInstance = Instance;
12
- type HostContext = null;
13
- type UpdatePayload = Container;
14
- type ChildSet = unknown;
15
- type TimeoutHandle = NodeJS.Timeout;
16
- type NoTimeout = -1;
17
- type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
18
- export declare const sksgHostConfig: SkiaHostConfig;
19
- export {};
@@ -1,152 +0,0 @@
1
- /*global NodeJS*/
2
-
3
- import { DefaultEventPriority } from "react-reconciler/constants";
4
- import { shallowEq } from "../renderer/typeddash";
5
- const DEBUG = false;
6
- export const debug = (...args) => {
7
- if (DEBUG) {
8
- console.log(...args);
9
- }
10
- };
11
- const appendNode = (parent, child) => {
12
- parent.children.push(child);
13
- };
14
- const removeNode = (parent, child) => {
15
- parent.children.splice(parent.children.indexOf(child), 1);
16
- };
17
- const insertBefore = (parent, child, before) => {
18
- parent.children.splice(parent.children.indexOf(before), 0, child);
19
- };
20
- export const sksgHostConfig = {
21
- /**
22
- * This function is used by the reconciler in order to calculate current time for prioritising work.
23
- */
24
- supportsMutation: true,
25
- isPrimaryRenderer: false,
26
- supportsPersistence: false,
27
- supportsHydration: false,
28
- //supportsMicrotask: true,
29
-
30
- scheduleTimeout: setTimeout,
31
- cancelTimeout: clearTimeout,
32
- noTimeout: -1,
33
- appendChildToContainer(container, child) {
34
- debug("appendChildToContainer");
35
- container.root.push(child);
36
- },
37
- appendChild(parent, child) {
38
- debug("appendChild", parent, child);
39
- appendNode(parent, child);
40
- },
41
- getRootHostContext: _rootContainerInstance => {
42
- debug("getRootHostContext");
43
- return null;
44
- },
45
- getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
46
- debug("getChildHostContext");
47
- return null;
48
- },
49
- shouldSetTextContent(_type, _props) {
50
- return false;
51
- },
52
- createTextInstance(_text, _rootContainerInstance, _hostContext, _internalInstanceHandle) {
53
- debug("createTextInstance");
54
- // return SpanNode({}, text) as SkNode;
55
- throw new Error("Text nodes are not supported yet");
56
- },
57
- createInstance(type, propsWithChildren, _container, _hostContext, _internalInstanceHandle) {
58
- debug("createInstance", type);
59
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
60
- const {
61
- children,
62
- ...props
63
- } = propsWithChildren;
64
- debug("createInstance", type);
65
- const instance = {
66
- type,
67
- props,
68
- children: []
69
- };
70
- return instance;
71
- },
72
- appendInitialChild(parentInstance, child) {
73
- debug("appendInitialChild");
74
- appendNode(parentInstance, child);
75
- },
76
- finalizeInitialChildren(parentInstance, _type, _props, _rootContainerInstance, _hostContext) {
77
- debug("finalizeInitialChildren", parentInstance);
78
- return false;
79
- },
80
- commitMount() {
81
- // if finalizeInitialChildren = true
82
- debug("commitMount");
83
- },
84
- prepareForCommit(_containerInfo) {
85
- debug("prepareForCommit");
86
- return null;
87
- },
88
- resetAfterCommit(container) {
89
- debug("resetAfterCommit");
90
- container.redraw();
91
- },
92
- getPublicInstance(node) {
93
- debug("getPublicInstance");
94
- return node;
95
- },
96
- prepareUpdate: (_instance, type, oldProps, newProps, rootContainerInstance, _hostContext) => {
97
- debug("prepareUpdate");
98
- const propsAreEqual = shallowEq(oldProps, newProps);
99
- if (propsAreEqual) {
100
- return null;
101
- }
102
- debug("update ", type);
103
- return rootContainerInstance;
104
- },
105
- commitUpdate(instance, _updatePayload, type, prevProps, nextProps, _internalHandle) {
106
- debug("commitUpdate: ", type);
107
- if (shallowEq(prevProps, nextProps)) {
108
- return;
109
- }
110
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
111
- const {
112
- children,
113
- ...props
114
- } = nextProps;
115
- instance.props = props;
116
- },
117
- commitTextUpdate: (_textInstance, _oldText, _newText) => {
118
- // textInstance.instance = newText;
119
- },
120
- clearContainer: container => {
121
- debug("clearContainer");
122
- container.root = [];
123
- },
124
- preparePortalMount: () => {
125
- debug("preparePortalMount");
126
- },
127
- removeChild: (parent, child) => {
128
- removeNode(parent, child);
129
- },
130
- removeChildFromContainer: (container, child) => {
131
- container.root.splice(container.root.indexOf(child), 1);
132
- },
133
- insertInContainerBefore: (container, child, before) => {
134
- container.root.splice(container.root.indexOf(before), 0, child);
135
- },
136
- insertBefore: (parent, child, before) => {
137
- insertBefore(parent, child, before);
138
- },
139
- // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874
140
- getCurrentEventPriority: () => DefaultEventPriority,
141
- beforeActiveInstanceBlur: () => {},
142
- afterActiveInstanceBlur: () => {},
143
- detachDeletedInstance: () => {},
144
- getInstanceFromNode: function (_node) {
145
- return null;
146
- },
147
- prepareScopeUpdate: function (_scopeInstance, _instance) {},
148
- getInstanceFromScope: function (_scopeInstance) {
149
- return null;
150
- }
151
- };
152
- //# sourceMappingURL=HostConfig2.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["DefaultEventPriority","shallowEq","DEBUG","debug","args","console","log","appendNode","parent","child","children","push","removeNode","splice","indexOf","insertBefore","before","sksgHostConfig","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","propsWithChildren","_container","props","instance","appendInitialChild","parentInstance","finalizeInitialChildren","commitMount","prepareForCommit","_containerInfo","resetAfterCommit","redraw","getPublicInstance","node","prepareUpdate","_instance","oldProps","newProps","rootContainerInstance","propsAreEqual","commitUpdate","_updatePayload","prevProps","nextProps","_internalHandle","commitTextUpdate","_textInstance","_oldText","_newText","clearContainer","preparePortalMount","removeChild","removeChildFromContainer","insertInContainerBefore","getCurrentEventPriority","beforeActiveInstanceBlur","afterActiveInstanceBlur","detachDeletedInstance","getInstanceFromNode","_node","prepareScopeUpdate","_scopeInstance","getInstanceFromScope"],"sources":["HostConfig2.ts"],"sourcesContent":["/*global NodeJS*/\nimport type { Fiber, HostConfig } from \"react-reconciler\";\nimport { DefaultEventPriority } from \"react-reconciler/constants\";\n\nimport type { NodeType } from \"../dom/types\";\nimport { shallowEq } from \"../renderer/typeddash\";\n\nimport type { Container } from \"./Container\";\nimport type { Node } from \"./Node\";\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.children.push(child);\n};\n\nconst removeNode = (parent: Node<unknown>, child: Node<unknown>) => {\n parent.children.splice(parent.children.indexOf(child), 1);\n};\n\nconst insertBefore = (\n parent: Node<unknown>,\n child: Node<unknown>,\n before: Node<unknown>\n) => {\n parent.children.splice(parent.children.indexOf(before), 0, child);\n};\n\nexport const sksgHostConfig: SkiaHostConfig = {\n /**\n * This function is used by the reconciler in order to calculate current time for prioritising work.\n */\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\");\n container.root.push(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 propsWithChildren,\n _container,\n _hostContext,\n _internalInstanceHandle\n ) {\n debug(\"createInstance\", type);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { children, ...props } = propsWithChildren as any;\n debug(\"createInstance\", type);\n const instance = {\n type,\n props,\n children: [],\n };\n return instance;\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 // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const { children, ...props } = nextProps as any;\n instance.props = 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 = [];\n },\n\n preparePortalMount: () => {\n debug(\"preparePortalMount\");\n },\n\n removeChild: (parent, child) => {\n removeNode(parent, child);\n },\n\n removeChildFromContainer: (container, child) => {\n container.root.splice(container.root.indexOf(child), 1);\n },\n\n insertInContainerBefore: (container, child, before) => {\n container.root.splice(container.root.indexOf(before), 0, child);\n },\n\n insertBefore: (parent, child, before) => {\n insertBefore(parent, child, before);\n },\n\n // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874\n getCurrentEventPriority: () => DefaultEventPriority,\n beforeActiveInstanceBlur: () => {},\n afterActiveInstanceBlur: () => {},\n detachDeletedInstance: () => {},\n\n getInstanceFromNode: function (_node): Fiber | null | undefined {\n return null;\n },\n prepareScopeUpdate: function (_scopeInstance, _instance): void {},\n getInstanceFromScope: function (_scopeInstance): Instance | null {\n return null;\n },\n};\n"],"mappings":"AAAA;;AAEA,SAASA,oBAAoB,QAAQ,4BAA4B;AAGjE,SAASC,SAAS,QAAQ,uBAAuB;AAKjD,MAAMC,KAAK,GAAG,KAAK;AACnB,OAAO,MAAMC,KAAK,GAAGA,CAAC,GAAGC,IAAoC,KAAK;EAChE,IAAIF,KAAK,EAAE;IACTG,OAAO,CAACC,GAAG,CAAC,GAAGF,IAAI,CAAC;EACtB;AACF,CAAC;AA+BD,MAAMG,UAAU,GAAGA,CAACC,MAAqB,EAAEC,KAAoB,KAAK;EAClED,MAAM,CAACE,QAAQ,CAACC,IAAI,CAACF,KAAK,CAAC;AAC7B,CAAC;AAED,MAAMG,UAAU,GAAGA,CAACJ,MAAqB,EAAEC,KAAoB,KAAK;EAClED,MAAM,CAACE,QAAQ,CAACG,MAAM,CAACL,MAAM,CAACE,QAAQ,CAACI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DqE,uBAAuB,EAAEA,CAAClD,SAAS,EAAEnB,KAAK,EAAEO,MAAM,KAAK;IACrDY,SAAS,CAACC,IAAI,CAAChB,MAAM,CAACe,SAAS,CAACC,IAAI,CAACf,OAAO,CAACE,MAAM,CAAC,EAAE,CAAC,EAAEP,KAAK,CAAC;EACjE,CAAC;EAEDM,YAAY,EAAEA,CAACP,MAAM,EAAEC,KAAK,EAAEO,MAAM,KAAK;IACvCD,YAAY,CAACP,MAAM,EAAEC,KAAK,EAAEO,MAAM,CAAC;EACrC,CAAC;EAED;EACA+D,uBAAuB,EAAEA,CAAA,KAAM/E,oBAAoB;EACnDgF,wBAAwB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAClCC,uBAAuB,EAAEA,CAAA,KAAM,CAAC,CAAC;EACjCC,qBAAqB,EAAEA,CAAA,KAAM,CAAC,CAAC;EAE/BC,mBAAmB,EAAE,SAAAA,CAAUC,KAAK,EAA4B;IAC9D,OAAO,IAAI;EACb,CAAC;EACDC,kBAAkB,EAAE,SAAAA,CAAUC,cAAc,EAAE1B,SAAS,EAAQ,CAAC,CAAC;EACjE2B,oBAAoB,EAAE,SAAAA,CAAUD,cAAc,EAAmB;IAC/D,OAAO,IAAI;EACb;AACF,CAAC","ignoreList":[]}
@@ -1,44 +0,0 @@
1
- export const __esModule: boolean;
2
- export namespace sksgHostConfig {
3
- let supportsMutation: boolean;
4
- let isPrimaryRenderer: boolean;
5
- let supportsPersistence: boolean;
6
- let supportsHydration: boolean;
7
- let scheduleTimeout: typeof setTimeout;
8
- let cancelTimeout: typeof clearTimeout;
9
- let noTimeout: number;
10
- function appendChildToContainer(container: any, child: any): void;
11
- function appendChild(parent: any, child: any): void;
12
- function getRootHostContext(_rootContainerInstance: any): null;
13
- function getChildHostContext(_parentHostContext: any, _type: any, _rootContainerInstance: any): null;
14
- function shouldSetTextContent(_type: any, _props: any): boolean;
15
- function createTextInstance(_text: any, _rootContainerInstance: any, _hostContext: any, _internalInstanceHandle: any): never;
16
- function createInstance(type: any, propsWithChildren: any, _container: any, _hostContext: any, _internalInstanceHandle: any): {
17
- type: any;
18
- props: any;
19
- children: never[];
20
- };
21
- function appendInitialChild(parentInstance: any, child: any): void;
22
- function finalizeInitialChildren(parentInstance: any, _type: any, _props: any, _rootContainerInstance: any, _hostContext: any): boolean;
23
- function commitMount(): void;
24
- function prepareForCommit(_containerInfo: any): null;
25
- function resetAfterCommit(container: any): void;
26
- function getPublicInstance(node: any): any;
27
- function prepareUpdate(_instance: any, type: any, oldProps: any, newProps: any, rootContainerInstance: any, _hostContext: any): any;
28
- function commitUpdate(instance: any, _updatePayload: any, type: any, prevProps: any, nextProps: any, _internalHandle: any): void;
29
- function commitTextUpdate(_textInstance: any, _oldText: any, _newText: any): void;
30
- function clearContainer(container: any): void;
31
- function preparePortalMount(): void;
32
- function removeChild(parent: any, child: any): void;
33
- function removeChildFromContainer(container: any, child: any): void;
34
- function insertInContainerBefore(container: any, child: any, before: any): void;
35
- function insertBefore(parent: any, child: any, before: any): void;
36
- function getCurrentEventPriority(): number;
37
- function beforeActiveInstanceBlur(): void;
38
- function afterActiveInstanceBlur(): void;
39
- function detachDeletedInstance(): void;
40
- function getInstanceFromNode(_node: any): null;
41
- function prepareScopeUpdate(_scopeInstance: any, _instance: any): void;
42
- function getInstanceFromScope(_scopeInstance: any): null;
43
- }
44
- export function debug(...args: any[]): void;