@shopify/react-native-skia 1.11.7 → 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 (362) 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/commonjs/specs/NativeSkiaModule.web.d.ts +2 -0
  89. package/lib/commonjs/specs/NativeSkiaModule.web.js +6 -0
  90. package/lib/commonjs/specs/NativeSkiaModule.web.js.map +1 -1
  91. package/lib/module/Platform/Platform.web.js +1 -1
  92. package/lib/module/Platform/Platform.web.js.map +1 -1
  93. package/lib/module/dom/nodes/datatypes/Circle.js +1 -2
  94. package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
  95. package/lib/module/dom/nodes/datatypes/Gradient.js +3 -3
  96. package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
  97. package/lib/module/dom/nodes/datatypes/Rect.js +3 -5
  98. package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
  99. package/lib/module/external/reanimated/buffers.js +1 -2
  100. package/lib/module/external/reanimated/buffers.js.map +1 -1
  101. package/lib/module/external/reanimated/textures.js +5 -4
  102. package/lib/module/external/reanimated/textures.js.map +1 -1
  103. package/lib/module/external/reanimated/useAnimatedImageValue.js +1 -1
  104. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  105. package/lib/module/external/reanimated/useVideo.js +10 -23
  106. package/lib/module/external/reanimated/useVideo.js.map +1 -1
  107. package/lib/module/headless/index.d.ts +1 -1
  108. package/lib/module/headless/index.js +2 -2
  109. package/lib/module/headless/index.js.map +1 -1
  110. package/lib/module/renderer/Canvas.d.ts +2 -2
  111. package/lib/module/renderer/Canvas.js +9 -27
  112. package/lib/module/renderer/Canvas.js.map +1 -1
  113. package/lib/module/renderer/Offscreen.d.ts +2 -2
  114. package/lib/module/renderer/Offscreen.js +4 -4
  115. package/lib/module/renderer/Offscreen.js.map +1 -1
  116. package/lib/module/renderer/__tests__/setup.d.ts +5 -5
  117. package/lib/module/skia/core/Vector.js +1 -1
  118. package/lib/module/skia/core/Vector.js.map +1 -1
  119. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js +1 -4
  120. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -1
  121. package/lib/module/skia/web/Host.js +1 -7
  122. package/lib/module/skia/web/Host.js.map +1 -1
  123. package/lib/module/skia/web/JsiSkAnimatedImage.js +3 -6
  124. package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
  125. package/lib/module/skia/web/JsiSkCanvas.js +3 -6
  126. package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
  127. package/lib/module/skia/web/JsiSkColorFilter.js +3 -6
  128. package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
  129. package/lib/module/skia/web/JsiSkContourMeasure.js +3 -6
  130. package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
  131. package/lib/module/skia/web/JsiSkContourMeasureIter.js +3 -6
  132. package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
  133. package/lib/module/skia/web/JsiSkData.js +3 -6
  134. package/lib/module/skia/web/JsiSkData.js.map +1 -1
  135. package/lib/module/skia/web/JsiSkFont.js +3 -6
  136. package/lib/module/skia/web/JsiSkFont.js.map +1 -1
  137. package/lib/module/skia/web/JsiSkImage.js +8 -12
  138. package/lib/module/skia/web/JsiSkImage.js.map +1 -1
  139. package/lib/module/skia/web/JsiSkImageFilter.js +3 -6
  140. package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
  141. package/lib/module/skia/web/JsiSkMaskFilter.js +3 -6
  142. package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
  143. package/lib/module/skia/web/JsiSkMatrix.js +5 -8
  144. package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
  145. package/lib/module/skia/web/JsiSkPaint.js +3 -6
  146. package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
  147. package/lib/module/skia/web/JsiSkParagraphBuilder.js +2 -3
  148. package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -1
  149. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +1 -1
  150. package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
  151. package/lib/module/skia/web/JsiSkParagraphStyle.js +15 -15
  152. package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
  153. package/lib/module/skia/web/JsiSkPath.js +3 -6
  154. package/lib/module/skia/web/JsiSkPath.js.map +1 -1
  155. package/lib/module/skia/web/JsiSkPathEffect.js +3 -6
  156. package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
  157. package/lib/module/skia/web/JsiSkPicture.js +3 -6
  158. package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
  159. package/lib/module/skia/web/JsiSkPictureRecorder.js +3 -6
  160. package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
  161. package/lib/module/skia/web/JsiSkPoint.js +3 -6
  162. package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
  163. package/lib/module/skia/web/JsiSkRRect.js +3 -6
  164. package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
  165. package/lib/module/skia/web/JsiSkRSXform.js +3 -6
  166. package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
  167. package/lib/module/skia/web/JsiSkRect.js +3 -6
  168. package/lib/module/skia/web/JsiSkRect.js.map +1 -1
  169. package/lib/module/skia/web/JsiSkRuntimeEffect.js +3 -6
  170. package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
  171. package/lib/module/skia/web/JsiSkSVG.js +5 -8
  172. package/lib/module/skia/web/JsiSkSVG.js.map +1 -1
  173. package/lib/module/skia/web/JsiSkShader.js +3 -6
  174. package/lib/module/skia/web/JsiSkShader.js.map +1 -1
  175. package/lib/module/skia/web/JsiSkSurface.js +3 -6
  176. package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
  177. package/lib/module/skia/web/JsiSkTextBlob.js +3 -6
  178. package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
  179. package/lib/module/skia/web/JsiSkTypeface.js +3 -6
  180. package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
  181. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +1 -4
  182. package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
  183. package/lib/module/skia/web/JsiSkVertices.js +3 -6
  184. package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
  185. package/lib/module/skia/web/JsiVideo.js +2 -5
  186. package/lib/module/skia/web/JsiVideo.js.map +1 -1
  187. package/lib/module/sksg/Container.d.ts +3 -1
  188. package/lib/module/sksg/Container.js +11 -8
  189. package/lib/module/sksg/Container.js.map +1 -1
  190. package/lib/module/sksg/HostConfig.d.ts +1 -1
  191. package/lib/module/sksg/HostConfig.js +36 -7
  192. package/lib/module/sksg/HostConfig.js.map +1 -1
  193. package/lib/module/sksg/Reconciler.d.ts +3 -2
  194. package/lib/module/sksg/Reconciler.js +16 -11
  195. package/lib/module/sksg/Reconciler.js.map +1 -1
  196. package/lib/module/sksg/Recorder/ReanimatedRecorder.js +1 -5
  197. package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
  198. package/lib/module/sksg/Recorder/Recorder.js +3 -6
  199. package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
  200. package/lib/module/sksg/Recorder/Visitor.js +1 -1
  201. package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
  202. package/lib/module/sksg/Recorder/commands/Drawing.js +2 -4
  203. package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
  204. package/lib/module/sksg/Recorder/commands/Shaders.js +2 -3
  205. package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
  206. package/lib/module/specs/NativeSkiaModule.web.d.ts +2 -0
  207. package/lib/module/specs/NativeSkiaModule.web.js +5 -1
  208. package/lib/module/specs/NativeSkiaModule.web.js.map +1 -1
  209. package/lib/module/views/SkiaBaseWebView.js +9 -12
  210. package/lib/module/views/SkiaBaseWebView.js.map +1 -1
  211. package/lib/module/views/SkiaPictureView.js +1 -5
  212. package/lib/module/views/SkiaPictureView.js.map +1 -1
  213. package/lib/module/views/SkiaPictureView.web.js +1 -4
  214. package/lib/module/views/SkiaPictureView.web.js.map +1 -1
  215. package/lib/module/web/LoadSkiaWeb.js +1 -2
  216. package/lib/module/web/LoadSkiaWeb.js.map +1 -1
  217. package/lib/module/web/WithSkiaWeb.js +1 -1
  218. package/lib/module/web/WithSkiaWeb.js.map +1 -1
  219. package/lib/typescript/lib/commonjs/headless/index.d.ts +1 -1
  220. package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +9 -1
  221. package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
  222. package/lib/typescript/lib/commonjs/sksg/Container.d.ts +3 -0
  223. package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +21 -4
  224. package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +9 -2
  225. package/lib/typescript/lib/commonjs/specs/NativeSkiaModule.web.d.ts +2 -0
  226. package/lib/typescript/lib/module/headless/index.d.ts +1 -1
  227. package/lib/typescript/lib/module/renderer/Canvas.d.ts +9 -1
  228. package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
  229. package/lib/typescript/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +2 -2
  230. package/lib/typescript/lib/module/skia/web/JsiSkAnimatedImage.d.ts +1 -0
  231. package/lib/typescript/lib/module/skia/web/JsiSkCanvas.d.ts +1 -0
  232. package/lib/typescript/lib/module/skia/web/JsiSkColorFilter.d.ts +1 -0
  233. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasure.d.ts +1 -0
  234. package/lib/typescript/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +1 -0
  235. package/lib/typescript/lib/module/skia/web/JsiSkData.d.ts +1 -0
  236. package/lib/typescript/lib/module/skia/web/JsiSkFont.d.ts +1 -0
  237. package/lib/typescript/lib/module/skia/web/JsiSkImage.d.ts +1 -0
  238. package/lib/typescript/lib/module/skia/web/JsiSkImageFilter.d.ts +1 -0
  239. package/lib/typescript/lib/module/skia/web/JsiSkMaskFilter.d.ts +1 -0
  240. package/lib/typescript/lib/module/skia/web/JsiSkMatrix.d.ts +1 -0
  241. package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +1 -0
  242. package/lib/typescript/lib/module/skia/web/JsiSkPath.d.ts +1 -0
  243. package/lib/typescript/lib/module/skia/web/JsiSkPathEffect.d.ts +1 -0
  244. package/lib/typescript/lib/module/skia/web/JsiSkPicture.d.ts +1 -0
  245. package/lib/typescript/lib/module/skia/web/JsiSkPictureRecorder.d.ts +1 -0
  246. package/lib/typescript/lib/module/skia/web/JsiSkPoint.d.ts +1 -0
  247. package/lib/typescript/lib/module/skia/web/JsiSkRRect.d.ts +1 -0
  248. package/lib/typescript/lib/module/skia/web/JsiSkRSXform.d.ts +1 -0
  249. package/lib/typescript/lib/module/skia/web/JsiSkRect.d.ts +1 -0
  250. package/lib/typescript/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +1 -0
  251. package/lib/typescript/lib/module/skia/web/JsiSkSVG.d.ts +1 -0
  252. package/lib/typescript/lib/module/skia/web/JsiSkShader.d.ts +1 -0
  253. package/lib/typescript/lib/module/skia/web/JsiSkSurface.d.ts +1 -0
  254. package/lib/typescript/lib/module/skia/web/JsiSkTextBlob.d.ts +1 -0
  255. package/lib/typescript/lib/module/skia/web/JsiSkTypeface.d.ts +1 -0
  256. package/lib/typescript/lib/module/skia/web/JsiSkTypefaceFontProvider.d.ts +1 -0
  257. package/lib/typescript/lib/module/skia/web/JsiSkVertices.d.ts +1 -0
  258. package/lib/typescript/lib/module/skia/web/JsiVideo.d.ts +2 -2
  259. package/lib/typescript/lib/module/sksg/Container.d.ts +7 -12
  260. package/lib/typescript/lib/module/sksg/HostConfig.d.ts +20 -4
  261. package/lib/typescript/lib/module/sksg/Reconciler.d.ts +18 -17
  262. package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +1 -0
  263. package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +5 -2
  264. package/lib/typescript/lib/module/specs/NativeSkiaModule.web.d.ts +2 -1
  265. package/lib/typescript/lib/module/views/SkiaBaseWebView.d.ts +12 -11
  266. package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +2 -2
  267. package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
  268. package/lib/typescript/src/headless/index.d.ts +1 -1
  269. package/lib/typescript/src/renderer/Canvas.d.ts +2 -2
  270. package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
  271. package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -5
  272. package/lib/typescript/src/sksg/Container.d.ts +3 -1
  273. package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
  274. package/lib/typescript/src/sksg/Reconciler.d.ts +3 -2
  275. package/lib/typescript/src/specs/NativeSkiaModule.web.d.ts +2 -0
  276. package/libs/apple/libskia.xcframework/Info.plist +15 -15
  277. package/libs/apple/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  278. package/libs/apple/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  279. package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
  280. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e/libskia.a +0 -0
  281. package/libs/apple/libskia.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  282. package/libs/apple/libskottie.xcframework/Info.plist +8 -8
  283. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  284. package/libs/apple/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  285. package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
  286. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e/libskottie.a +0 -0
  287. package/libs/apple/libskottie.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  288. package/libs/apple/libskparagraph.xcframework/Info.plist +7 -7
  289. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  290. package/libs/apple/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  291. package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
  292. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e/libskparagraph.a +0 -0
  293. package/libs/apple/libskparagraph.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  294. package/libs/apple/libsksg.xcframework/Info.plist +12 -12
  295. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  296. package/libs/apple/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  297. package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
  298. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e/libsksg.a +0 -0
  299. package/libs/apple/libsksg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  300. package/libs/apple/libskshaper.xcframework/Info.plist +14 -14
  301. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  302. package/libs/apple/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  303. package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
  304. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e/libskshaper.a +0 -0
  305. package/libs/apple/libskshaper.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  306. package/libs/apple/libskunicode_core.xcframework/Info.plist +14 -14
  307. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e/libskunicode_core.a +0 -0
  308. package/libs/apple/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  309. package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
  310. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e/libskunicode_core.a +0 -0
  311. package/libs/apple/libskunicode_core.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
  312. package/libs/apple/libskunicode_libgrapheme.xcframework/Info.plist +13 -13
  313. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  314. package/libs/apple/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  315. package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
  316. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
  317. package/libs/apple/libskunicode_libgrapheme.xcframework/tvos-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
  318. package/libs/apple/libsvg.xcframework/Info.plist +11 -11
  319. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  320. package/libs/apple/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  321. package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
  322. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e/libsvg.a +0 -0
  323. package/libs/apple/libsvg.xcframework/tvos-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  324. package/package.json +10 -9
  325. package/src/external/reanimated/textures.tsx +5 -4
  326. package/src/headless/index.ts +2 -2
  327. package/src/renderer/Canvas.tsx +57 -80
  328. package/src/renderer/Offscreen.tsx +4 -4
  329. package/src/renderer/__tests__/Data.spec.tsx +9 -10
  330. package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
  331. package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
  332. package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
  333. package/src/renderer/__tests__/Image.spec.tsx +2 -2
  334. package/src/renderer/__tests__/Paths.spec.tsx +8 -8
  335. package/src/renderer/__tests__/Picture.spec.tsx +10 -12
  336. package/src/renderer/__tests__/Simple.spec.tsx +6 -6
  337. package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
  338. package/src/renderer/__tests__/Text.spec.tsx +12 -12
  339. package/src/renderer/__tests__/Transform.spec.tsx +8 -8
  340. package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
  341. package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
  342. package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
  343. package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
  344. package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
  345. package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
  346. package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
  347. package/src/renderer/__tests__/setup.tsx +13 -13
  348. package/src/sksg/Container.ts +9 -1
  349. package/src/sksg/HostConfig.ts +37 -7
  350. package/src/sksg/Reconciler.ts +17 -6
  351. package/src/sksg/__tests__/Simple.spec.tsx +8 -8
  352. package/src/specs/NativeSkiaModule.web.ts +4 -0
  353. package/lib/commonjs/sksg/HostConfig2.d.ts +0 -19
  354. package/lib/commonjs/sksg/HostConfig2.js +0 -159
  355. package/lib/commonjs/sksg/HostConfig2.js.map +0 -1
  356. package/lib/module/sksg/HostConfig2.d.ts +0 -19
  357. package/lib/module/sksg/HostConfig2.js +0 -152
  358. package/lib/module/sksg/HostConfig2.js.map +0 -1
  359. package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +0 -44
  360. package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +0 -43
  361. package/lib/typescript/src/sksg/HostConfig2.d.ts +0 -19
  362. package/src/sksg/HostConfig2.ts +0 -247
@@ -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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ACjE2B,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;
@@ -1,43 +0,0 @@
1
- export function debug(...args: any[]): void;
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
- }
@@ -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,247 +0,0 @@
1
- /*global NodeJS*/
2
- import type { Fiber, HostConfig } from "react-reconciler";
3
- import { DefaultEventPriority } from "react-reconciler/constants";
4
-
5
- import type { NodeType } from "../dom/types";
6
- import { shallowEq } from "../renderer/typeddash";
7
-
8
- import type { Container } from "./Container";
9
- import type { Node } from "./Node";
10
-
11
- const DEBUG = false;
12
- export const debug = (...args: Parameters<typeof console.log>) => {
13
- if (DEBUG) {
14
- console.log(...args);
15
- }
16
- };
17
-
18
- type Instance = Node<unknown>;
19
-
20
- type Props = object;
21
- type TextInstance = Node<unknown>;
22
- type SuspenseInstance = Instance;
23
- type HydratableInstance = Instance;
24
- type PublicInstance = Instance;
25
- type HostContext = null;
26
- type UpdatePayload = Container;
27
- type ChildSet = unknown;
28
- type TimeoutHandle = NodeJS.Timeout;
29
- type NoTimeout = -1;
30
-
31
- type SkiaHostConfig = HostConfig<
32
- NodeType,
33
- Props,
34
- Container,
35
- Instance,
36
- TextInstance,
37
- SuspenseInstance,
38
- HydratableInstance,
39
- PublicInstance,
40
- HostContext,
41
- UpdatePayload,
42
- ChildSet,
43
- TimeoutHandle,
44
- NoTimeout
45
- >;
46
-
47
- const appendNode = (parent: Node<unknown>, child: Node<unknown>) => {
48
- parent.children.push(child);
49
- };
50
-
51
- const removeNode = (parent: Node<unknown>, child: Node<unknown>) => {
52
- parent.children.splice(parent.children.indexOf(child), 1);
53
- };
54
-
55
- const insertBefore = (
56
- parent: Node<unknown>,
57
- child: Node<unknown>,
58
- before: Node<unknown>
59
- ) => {
60
- parent.children.splice(parent.children.indexOf(before), 0, child);
61
- };
62
-
63
- export const sksgHostConfig: SkiaHostConfig = {
64
- /**
65
- * This function is used by the reconciler in order to calculate current time for prioritising work.
66
- */
67
- supportsMutation: true,
68
- isPrimaryRenderer: false,
69
- supportsPersistence: false,
70
- supportsHydration: false,
71
- //supportsMicrotask: true,
72
-
73
- scheduleTimeout: setTimeout,
74
- cancelTimeout: clearTimeout,
75
- noTimeout: -1,
76
-
77
- appendChildToContainer(container, child) {
78
- debug("appendChildToContainer");
79
- container.root.push(child);
80
- },
81
-
82
- appendChild(parent, child) {
83
- debug("appendChild", parent, child);
84
- appendNode(parent, child);
85
- },
86
-
87
- getRootHostContext: (_rootContainerInstance: Container) => {
88
- debug("getRootHostContext");
89
- return null;
90
- },
91
-
92
- getChildHostContext(_parentHostContext, _type, _rootContainerInstance) {
93
- debug("getChildHostContext");
94
- return null;
95
- },
96
-
97
- shouldSetTextContent(_type, _props) {
98
- return false;
99
- },
100
-
101
- createTextInstance(
102
- _text,
103
- _rootContainerInstance,
104
- _hostContext,
105
- _internalInstanceHandle
106
- ) {
107
- debug("createTextInstance");
108
- // return SpanNode({}, text) as SkNode;
109
- throw new Error("Text nodes are not supported yet");
110
- },
111
-
112
- createInstance(
113
- type,
114
- propsWithChildren,
115
- _container,
116
- _hostContext,
117
- _internalInstanceHandle
118
- ) {
119
- debug("createInstance", type);
120
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
121
- const { children, ...props } = propsWithChildren as any;
122
- debug("createInstance", type);
123
- const instance = {
124
- type,
125
- props,
126
- children: [],
127
- };
128
- return instance;
129
- },
130
-
131
- appendInitialChild(parentInstance, child) {
132
- debug("appendInitialChild");
133
- appendNode(parentInstance, child);
134
- },
135
-
136
- finalizeInitialChildren(
137
- parentInstance,
138
- _type,
139
- _props,
140
- _rootContainerInstance,
141
- _hostContext
142
- ) {
143
- debug("finalizeInitialChildren", parentInstance);
144
- return false;
145
- },
146
-
147
- commitMount() {
148
- // if finalizeInitialChildren = true
149
- debug("commitMount");
150
- },
151
-
152
- prepareForCommit(_containerInfo) {
153
- debug("prepareForCommit");
154
- return null;
155
- },
156
-
157
- resetAfterCommit(container) {
158
- debug("resetAfterCommit");
159
- container.redraw();
160
- },
161
-
162
- getPublicInstance(node: Instance) {
163
- debug("getPublicInstance");
164
- return node;
165
- },
166
-
167
- prepareUpdate: (
168
- _instance,
169
- type,
170
- oldProps,
171
- newProps,
172
- rootContainerInstance,
173
- _hostContext
174
- ) => {
175
- debug("prepareUpdate");
176
- const propsAreEqual = shallowEq(oldProps, newProps);
177
- if (propsAreEqual) {
178
- return null;
179
- }
180
- debug("update ", type);
181
- return rootContainerInstance;
182
- },
183
-
184
- commitUpdate(
185
- instance,
186
- _updatePayload,
187
- type,
188
- prevProps,
189
- nextProps,
190
- _internalHandle
191
- ) {
192
- debug("commitUpdate: ", type);
193
- if (shallowEq(prevProps, nextProps)) {
194
- return;
195
- }
196
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
197
- const { children, ...props } = nextProps as any;
198
- instance.props = props;
199
- },
200
-
201
- commitTextUpdate: (
202
- _textInstance: TextInstance,
203
- _oldText: string,
204
- _newText: string
205
- ) => {
206
- // textInstance.instance = newText;
207
- },
208
-
209
- clearContainer: (container) => {
210
- debug("clearContainer");
211
- container.root = [];
212
- },
213
-
214
- preparePortalMount: () => {
215
- debug("preparePortalMount");
216
- },
217
-
218
- removeChild: (parent, child) => {
219
- removeNode(parent, child);
220
- },
221
-
222
- removeChildFromContainer: (container, child) => {
223
- container.root.splice(container.root.indexOf(child), 1);
224
- },
225
-
226
- insertInContainerBefore: (container, child, before) => {
227
- container.root.splice(container.root.indexOf(before), 0, child);
228
- },
229
-
230
- insertBefore: (parent, child, before) => {
231
- insertBefore(parent, child, before);
232
- },
233
-
234
- // see https://github.com/pmndrs/react-three-fiber/pull/2360#discussion_r916356874
235
- getCurrentEventPriority: () => DefaultEventPriority,
236
- beforeActiveInstanceBlur: () => {},
237
- afterActiveInstanceBlur: () => {},
238
- detachDeletedInstance: () => {},
239
-
240
- getInstanceFromNode: function (_node): Fiber | null | undefined {
241
- return null;
242
- },
243
- prepareScopeUpdate: function (_scopeInstance, _instance): void {},
244
- getInstanceFromScope: function (_scopeInstance): Instance | null {
245
- return null;
246
- },
247
- };