@shopify/react-native-skia 0.1.127 → 0.1.130

Sign up to get free protection for your applications and to get access to all the features.
Files changed (945) hide show
  1. package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +1 -0
  2. package/cpp/api/JsiSkRuntimeEffect.h +7 -9
  3. package/cpp/api/JsiSkVertices.h +0 -2
  4. package/cpp/rnskia/values/RNSkValue.h +1 -1
  5. package/cpp/skia/include/codec/SkCodec.h +7 -1
  6. package/cpp/skia/include/core/SkAlphaType.h +45 -0
  7. package/cpp/skia/include/core/SkBitmap.h +4 -2
  8. package/cpp/skia/include/core/SkCanvas.h +31 -20
  9. package/cpp/skia/include/core/SkColor.h +1 -1
  10. package/cpp/skia/include/core/SkColorFilter.h +1 -0
  11. package/cpp/skia/include/core/SkColorType.h +66 -0
  12. package/cpp/skia/include/core/SkDeferredDisplayListRecorder.h +1 -1
  13. package/cpp/skia/include/core/SkDrawable.h +7 -0
  14. package/cpp/skia/include/core/SkEncodedImageFormat.h +1 -0
  15. package/cpp/skia/include/core/SkFont.h +4 -3
  16. package/cpp/skia/include/core/SkFontArguments.h +33 -1
  17. package/cpp/skia/include/core/SkGraphics.h +13 -0
  18. package/cpp/skia/include/core/SkImage.h +67 -22
  19. package/cpp/skia/include/core/SkImageEncoder.h +0 -3
  20. package/cpp/skia/include/core/SkImageGenerator.h +4 -3
  21. package/cpp/skia/include/core/SkImageInfo.h +35 -142
  22. package/cpp/skia/include/core/SkMesh.h +303 -0
  23. package/cpp/skia/include/core/SkMilestone.h +1 -1
  24. package/cpp/skia/include/core/SkOpenTypeSVGDecoder.h +30 -0
  25. package/cpp/skia/include/core/SkPaint.h +4 -19
  26. package/cpp/skia/include/core/SkPath.h +20 -33
  27. package/cpp/skia/include/core/SkPathBuilder.h +1 -6
  28. package/cpp/skia/include/core/SkPixelRef.h +1 -1
  29. package/cpp/skia/include/core/SkPixmap.h +3 -2
  30. package/cpp/skia/include/core/SkRSXform.h +1 -1
  31. package/cpp/skia/include/core/SkSamplingOptions.h +16 -5
  32. package/cpp/skia/include/core/SkSpan.h +5 -5
  33. package/cpp/skia/include/core/SkString.h +5 -8
  34. package/cpp/skia/include/core/SkSurface.h +21 -0
  35. package/cpp/skia/include/core/SkTypeface.h +20 -4
  36. package/cpp/skia/include/core/SkTypes.h +9 -5
  37. package/cpp/skia/include/effects/SkGradientShader.h +9 -18
  38. package/cpp/skia/include/effects/SkRuntimeEffect.h +16 -12
  39. package/cpp/skia/include/gpu/GpuTypes.h +32 -0
  40. package/cpp/skia/include/gpu/GrBackendSemaphore.h +1 -1
  41. package/cpp/skia/include/gpu/GrBackendSurface.h +6 -5
  42. package/cpp/skia/include/gpu/GrBackendSurfaceMutableState.h +1 -1
  43. package/cpp/skia/include/gpu/GrContextOptions.h +11 -20
  44. package/cpp/skia/include/gpu/GrContextThreadSafeProxy.h +7 -0
  45. package/cpp/skia/include/gpu/GrDirectContext.h +16 -11
  46. package/cpp/skia/include/gpu/GrDriverBugWorkaroundsAutogen.h +0 -2
  47. package/cpp/skia/include/gpu/GrRecordingContext.h +14 -7
  48. package/cpp/skia/include/gpu/GrSurfaceInfo.h +6 -6
  49. package/cpp/skia/include/gpu/dawn/GrDawnTypes.h +1 -1
  50. package/cpp/skia/include/gpu/gl/GrGLFunctions.h +3 -1
  51. package/cpp/skia/include/gpu/gl/GrGLInterface.h +2 -2
  52. package/cpp/skia/include/gpu/graphite/BackendTexture.h +64 -0
  53. package/cpp/skia/include/gpu/graphite/Context.h +124 -0
  54. package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +71 -0
  55. package/cpp/skia/include/gpu/graphite/Recorder.h +104 -0
  56. package/cpp/skia/include/gpu/graphite/Recording.h +39 -0
  57. package/cpp/skia/include/gpu/graphite/SkStuff.h +47 -0
  58. package/cpp/skia/include/gpu/graphite/TextureInfo.h +91 -0
  59. package/cpp/skia/include/gpu/graphite/mtl/MtlBackendContext.h +24 -0
  60. package/cpp/skia/include/gpu/graphite/mtl/MtlTypes.h +68 -0
  61. package/cpp/skia/include/gpu/mock/GrMockTypes.h +1 -2
  62. package/cpp/skia/include/ports/SkCFObject.h +0 -4
  63. package/cpp/skia/include/ports/SkTypeface_win.h +2 -2
  64. package/cpp/skia/include/private/{GrSingleOwner.h → SingleOwner.h} +17 -10
  65. package/cpp/skia/include/private/SkChecksum.h +11 -0
  66. package/cpp/skia/include/private/SkEncodedInfo.h +22 -5
  67. package/cpp/skia/include/private/SkFloatingPoint.h +0 -53
  68. package/cpp/skia/include/private/SkImageInfoPriv.h +8 -2
  69. package/cpp/skia/include/private/SkMacros.h +13 -18
  70. package/cpp/skia/include/private/SkMutex.h +8 -0
  71. package/cpp/skia/include/private/SkPathRef.h +2 -16
  72. package/cpp/skia/include/private/SkSLDefines.h +9 -1
  73. package/cpp/skia/include/private/SkSLIRNode.h +6 -5
  74. package/cpp/skia/include/private/SkSLLayout.h +11 -10
  75. package/cpp/skia/include/private/SkSLModifiers.h +4 -3
  76. package/cpp/skia/include/private/SkSLProgramElement.h +2 -2
  77. package/cpp/skia/include/private/SkSLProgramKind.h +8 -5
  78. package/cpp/skia/include/private/SkSLStatement.h +2 -3
  79. package/cpp/skia/include/private/SkSLString.h +17 -56
  80. package/cpp/skia/include/private/SkSLSymbol.h +4 -4
  81. package/cpp/skia/include/private/SkShadowFlags.h +3 -1
  82. package/cpp/skia/include/private/SkStringView.h +47 -0
  83. package/cpp/skia/include/private/SkTArray.h +4 -3
  84. package/cpp/skia/include/private/SkTHash.h +66 -24
  85. package/cpp/skia/include/private/SkTLogic.h +2 -32
  86. package/cpp/skia/include/private/SkTemplates.h +2 -2
  87. package/cpp/skia/include/private/SkThreadAnnotations.h +4 -4
  88. package/cpp/skia/include/private/SkVx.h +28 -28
  89. package/cpp/skia/include/private/chromium/GrSlug.h +40 -3
  90. package/cpp/skia/include/private/chromium/SkChromeRemoteGlyphCache.h +12 -6
  91. package/cpp/skia/include/private/{GrContext_Base.h → gpu/ganesh/GrContext_Base.h} +7 -0
  92. package/cpp/skia/include/private/{GrD3DTypesMinimal.h → gpu/ganesh/GrD3DTypesMinimal.h} +0 -0
  93. package/cpp/skia/include/private/{GrDawnTypesPriv.h → gpu/ganesh/GrDawnTypesPriv.h} +0 -0
  94. package/cpp/skia/include/private/{GrGLTypesPriv.h → gpu/ganesh/GrGLTypesPriv.h} +1 -0
  95. package/cpp/skia/include/private/{GrImageContext.h → gpu/ganesh/GrImageContext.h} +4 -4
  96. package/cpp/skia/include/private/{GrMockTypesPriv.h → gpu/ganesh/GrMockTypesPriv.h} +0 -0
  97. package/cpp/skia/include/private/{GrMtlTypesPriv.h → gpu/ganesh/GrMtlTypesPriv.h} +0 -0
  98. package/cpp/skia/include/private/{GrTypesPriv.h → gpu/ganesh/GrTypesPriv.h} +25 -367
  99. package/cpp/skia/include/private/{GrVkTypesPriv.h → gpu/ganesh/GrVkTypesPriv.h} +0 -0
  100. package/cpp/skia/include/private/gpu/graphite/MtlTypesPriv.h +74 -0
  101. package/cpp/skia/include/sksl/DSL.h +4 -0
  102. package/cpp/skia/include/sksl/DSLBlock.h +8 -3
  103. package/cpp/skia/include/sksl/DSLCase.h +6 -6
  104. package/cpp/skia/include/sksl/DSLCore.h +89 -78
  105. package/cpp/skia/include/sksl/DSLExpression.h +78 -45
  106. package/cpp/skia/include/sksl/DSLFunction.h +23 -18
  107. package/cpp/skia/include/sksl/DSLLayout.h +14 -16
  108. package/cpp/skia/include/sksl/DSLModifiers.h +7 -5
  109. package/cpp/skia/include/sksl/DSLRuntimeEffects.h +1 -1
  110. package/cpp/skia/include/sksl/DSLStatement.h +16 -10
  111. package/cpp/skia/include/sksl/DSLSymbols.h +7 -7
  112. package/cpp/skia/include/sksl/DSLType.h +27 -23
  113. package/cpp/skia/include/sksl/DSLVar.h +72 -61
  114. package/cpp/skia/include/sksl/SkSLErrorReporter.h +12 -49
  115. package/cpp/skia/include/sksl/SkSLOperator.h +151 -0
  116. package/cpp/skia/include/sksl/SkSLPosition.h +102 -0
  117. package/cpp/skia/include/svg/SkSVGCanvas.h +5 -1
  118. package/cpp/skia/include/utils/SkAnimCodecPlayer.h +7 -0
  119. package/cpp/skia/include/utils/SkCamera.h +2 -0
  120. package/cpp/skia/include/utils/SkCanvasStateUtils.h +4 -1
  121. package/cpp/skia/include/utils/SkCustomTypeface.h +6 -4
  122. package/cpp/skia/include/utils/SkNWayCanvas.h +34 -0
  123. package/cpp/skia/include/utils/SkNullCanvas.h +5 -1
  124. package/cpp/skia/include/utils/SkOrderedFontMgr.h +12 -0
  125. package/cpp/skia/include/utils/SkPaintFilterCanvas.h +30 -1
  126. package/cpp/skia/include/utils/SkParse.h +2 -0
  127. package/cpp/skia/include/utils/SkShadowUtils.h +3 -2
  128. package/cpp/skia/include/utils/SkTextUtils.h +8 -4
  129. package/cpp/skia/modules/svg/include/SkSVGAttributeParser.h +27 -1
  130. package/cpp/skia/modules/svg/include/SkSVGDOM.h +4 -0
  131. package/cpp/skia/modules/svg/include/SkSVGOpenTypeSVGDecoder.h +32 -0
  132. package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +3 -3
  133. package/cpp/skia/modules/svg/include/SkSVGSVG.h +2 -0
  134. package/cpp/skia/modules/svg/include/SkSVGTypes.h +48 -9
  135. package/ios/RNSkia-iOS/PlatformContext.h +1 -1
  136. package/ios/RNSkia-iOS/RNSkDrawViewImpl.mm +1 -0
  137. package/ios/RNSkia-iOS/SkiaDrawView.mm +1 -1
  138. package/lib/commonjs/animation/decay/runDecay.js.map +1 -1
  139. package/lib/commonjs/animation/functions/interpolateColors.js.map +1 -1
  140. package/lib/commonjs/animation/spring/runSpring.js.map +1 -1
  141. package/lib/commonjs/animation/spring/useSpring.js.map +1 -1
  142. package/lib/commonjs/animation/timing/createTiming.js.map +1 -1
  143. package/lib/commonjs/animation/timing/runTiming.js.map +1 -1
  144. package/lib/commonjs/animation/timing/useTiming.js.map +1 -1
  145. package/lib/commonjs/index.js.map +1 -1
  146. package/lib/commonjs/renderer/Canvas.js +1 -3
  147. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  148. package/lib/commonjs/renderer/DependencyManager.js.map +1 -1
  149. package/lib/commonjs/renderer/components/Blend.js +1 -3
  150. package/lib/commonjs/renderer/components/Blend.js.map +1 -1
  151. package/lib/commonjs/renderer/components/Compose.js +2 -6
  152. package/lib/commonjs/renderer/components/Compose.js.map +1 -1
  153. package/lib/commonjs/renderer/components/colorFilters/Lerp.js +1 -3
  154. package/lib/commonjs/renderer/components/colorFilters/Lerp.js.map +1 -1
  155. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js +2 -4
  156. package/lib/commonjs/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  157. package/lib/commonjs/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  158. package/lib/commonjs/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  159. package/lib/commonjs/renderer/components/imageFilters/Shadow.js +1 -3
  160. package/lib/commonjs/renderer/components/imageFilters/Shadow.js.map +1 -1
  161. package/lib/commonjs/renderer/components/maskFilters/Blur.js +1 -3
  162. package/lib/commonjs/renderer/components/maskFilters/Blur.js.map +1 -1
  163. package/lib/commonjs/renderer/components/pathEffects/Corner.js +1 -3
  164. package/lib/commonjs/renderer/components/pathEffects/Corner.js.map +1 -1
  165. package/lib/commonjs/renderer/components/pathEffects/Dash.js +1 -3
  166. package/lib/commonjs/renderer/components/pathEffects/Dash.js.map +1 -1
  167. package/lib/commonjs/renderer/components/pathEffects/Discrete.js +1 -3
  168. package/lib/commonjs/renderer/components/pathEffects/Discrete.js.map +1 -1
  169. package/lib/commonjs/renderer/components/pathEffects/Line2D.js +1 -3
  170. package/lib/commonjs/renderer/components/pathEffects/Line2D.js.map +1 -1
  171. package/lib/commonjs/renderer/components/pathEffects/Path1D.js +2 -4
  172. package/lib/commonjs/renderer/components/pathEffects/Path1D.js.map +1 -1
  173. package/lib/commonjs/renderer/components/pathEffects/Path2D.js +1 -3
  174. package/lib/commonjs/renderer/components/pathEffects/Path2D.js.map +1 -1
  175. package/lib/commonjs/renderer/components/pathEffects/Sum.js +1 -3
  176. package/lib/commonjs/renderer/components/pathEffects/Sum.js.map +1 -1
  177. package/lib/commonjs/renderer/components/shaders/Gradient.js.map +1 -1
  178. package/lib/commonjs/renderer/components/shaders/Shader.js +1 -2
  179. package/lib/commonjs/renderer/components/shaders/Shader.js.map +1 -1
  180. package/lib/commonjs/renderer/components/shapes/Box.js.map +1 -1
  181. package/lib/commonjs/renderer/components/shapes/DiffRect.js.map +1 -1
  182. package/lib/commonjs/renderer/components/shapes/Patch.js +1 -3
  183. package/lib/commonjs/renderer/components/shapes/Patch.js.map +1 -1
  184. package/lib/commonjs/renderer/components/text/TextBlob.js.map +1 -1
  185. package/lib/commonjs/renderer/components/text/TextPath.js.map +1 -1
  186. package/lib/commonjs/renderer/index.js +13 -0
  187. package/lib/commonjs/renderer/index.js.map +1 -1
  188. package/lib/commonjs/renderer/nodes/Declaration.js.map +1 -1
  189. package/lib/commonjs/renderer/nodes/Node.js.map +1 -1
  190. package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
  191. package/lib/commonjs/renderer/processors/Clips.js.map +1 -1
  192. package/lib/commonjs/renderer/processors/Font.js.map +1 -1
  193. package/lib/commonjs/renderer/processors/Rects.js +5 -1
  194. package/lib/commonjs/renderer/processors/Rects.js.map +1 -1
  195. package/lib/commonjs/renderer/processors/Transform.js.map +1 -1
  196. package/lib/commonjs/skia/Skia.js +2 -36
  197. package/lib/commonjs/skia/Skia.js.map +1 -1
  198. package/lib/commonjs/skia/{Color.js → core/Color.js} +1 -1
  199. package/lib/commonjs/skia/core/Color.js.map +1 -0
  200. package/lib/commonjs/skia/{Data → core}/Data.js +29 -8
  201. package/lib/commonjs/skia/core/Data.js.map +1 -0
  202. package/lib/commonjs/skia/{Font/useFont.js → core/Font.js} +4 -4
  203. package/lib/commonjs/skia/core/Font.js.map +1 -0
  204. package/lib/commonjs/skia/{Image/useImage.js → core/Image.js} +4 -4
  205. package/lib/commonjs/skia/core/Image.js.map +1 -0
  206. package/lib/commonjs/skia/{Paint/usePaint.js → core/Paint.js} +14 -4
  207. package/lib/commonjs/skia/core/Paint.js.map +1 -0
  208. package/lib/commonjs/skia/{Path/usePath.js → core/Path.js} +1 -1
  209. package/lib/commonjs/skia/core/Path.js.map +1 -0
  210. package/lib/commonjs/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
  211. package/lib/commonjs/skia/core/Picture.js.map +1 -0
  212. package/lib/commonjs/skia/core/SVG.js +15 -0
  213. package/lib/commonjs/skia/core/SVG.js.map +1 -0
  214. package/lib/commonjs/skia/{Shader/useShader.js → core/Shader.js} +1 -1
  215. package/lib/commonjs/skia/core/Shader.js.map +1 -0
  216. package/lib/commonjs/skia/{Typeface/useTypeface.js → core/Typeface.js} +3 -3
  217. package/lib/commonjs/skia/core/Typeface.js.map +1 -0
  218. package/lib/commonjs/skia/core/index.js +136 -0
  219. package/lib/commonjs/skia/core/index.js.map +1 -0
  220. package/lib/commonjs/skia/index.js +8 -302
  221. package/lib/commonjs/skia/index.js.map +1 -1
  222. package/lib/commonjs/skia/{Canvas.js → types/Canvas.js} +0 -0
  223. package/lib/commonjs/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
  224. package/lib/commonjs/skia/types/Color.js +2 -0
  225. package/lib/commonjs/skia/{ColorFilter/ColorFilterFactory.js.map → types/Color.js.map} +0 -0
  226. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
  227. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
  228. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
  229. package/lib/{module/skia → commonjs/skia/types}/ColorFilter/ColorFilterFactory.js.map +0 -0
  230. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
  231. package/lib/commonjs/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
  232. package/lib/commonjs/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
  233. package/lib/commonjs/skia/{ContourMeasure.js.map → types/ContourMeasure.js.map} +0 -0
  234. package/lib/commonjs/skia/types/Data/Data.js +6 -0
  235. package/lib/commonjs/skia/{Data/DataFactory.js.map → types/Data/Data.js.map} +0 -0
  236. package/lib/commonjs/skia/{Data → types/Data}/DataFactory.js +0 -0
  237. package/lib/{module/skia → commonjs/skia/types}/Data/DataFactory.js.map +0 -0
  238. package/lib/commonjs/skia/{Data → types/Data}/index.js +0 -0
  239. package/lib/commonjs/skia/{Data → types/Data}/index.js.map +0 -0
  240. package/lib/commonjs/skia/{Font → types/Font}/Font.js +0 -0
  241. package/lib/commonjs/skia/types/Font/Font.js.map +1 -0
  242. package/lib/commonjs/skia/{Font → types/Font}/index.js +0 -13
  243. package/lib/commonjs/skia/{FontMgr → types/Font}/index.js.map +1 -1
  244. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
  245. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgr.js.map +0 -0
  246. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
  247. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js.map +0 -0
  248. package/lib/commonjs/skia/{FontMgr → types/FontMgr}/index.js +13 -0
  249. package/lib/commonjs/skia/types/FontMgr/index.js.map +1 -0
  250. package/lib/commonjs/skia/{Image → types/Image}/Image.js +0 -0
  251. package/lib/commonjs/skia/{Image → types/Image}/Image.js.map +1 -1
  252. package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js +0 -0
  253. package/lib/commonjs/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
  254. package/lib/commonjs/skia/{Image → types/Image}/index.js +0 -13
  255. package/lib/commonjs/skia/types/Image/index.js.map +1 -0
  256. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
  257. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
  258. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
  259. package/lib/commonjs/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
  260. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
  261. package/lib/commonjs/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
  262. package/lib/commonjs/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
  263. package/lib/commonjs/skia/{JsiInstance.js.map → types/JsiInstance.js.map} +0 -0
  264. package/lib/commonjs/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
  265. package/lib/commonjs/skia/types/MaskFilter.js.map +1 -0
  266. package/lib/commonjs/skia/{Matrix.js → types/Matrix.js} +0 -0
  267. package/lib/commonjs/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
  268. package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js +0 -0
  269. package/lib/commonjs/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
  270. package/lib/commonjs/skia/{Paint → types/Paint}/Paint.js +1 -13
  271. package/lib/commonjs/skia/types/Paint/Paint.js.map +1 -0
  272. package/lib/commonjs/skia/{Paint → types/Paint}/index.js +0 -13
  273. package/lib/commonjs/skia/types/Paint/index.js.map +1 -0
  274. package/lib/commonjs/skia/{Path → types/Path}/Path.js +0 -0
  275. package/lib/commonjs/skia/{Path → types/Path}/Path.js.map +0 -0
  276. package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js +0 -0
  277. package/lib/commonjs/skia/{Path → types/Path}/PathFactory.js.map +0 -0
  278. package/lib/commonjs/skia/{Path → types/Path}/index.js +0 -13
  279. package/lib/commonjs/skia/types/Path/index.js.map +1 -0
  280. package/lib/commonjs/skia/{PathEffect.js → types/PathEffect.js} +0 -0
  281. package/lib/commonjs/skia/types/PathEffect.js.map +1 -0
  282. package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js +0 -0
  283. package/lib/commonjs/skia/{Picture → types/Picture}/Picture.js.map +0 -0
  284. package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
  285. package/lib/commonjs/skia/{Picture → types/Picture}/PictureFactory.js.map +0 -0
  286. package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
  287. package/lib/commonjs/skia/{Picture → types/Picture}/PictureRecorder.js.map +0 -0
  288. package/lib/commonjs/skia/{Picture → types/Picture}/index.js +0 -13
  289. package/lib/commonjs/skia/{Paint → types/Picture}/index.js.map +1 -1
  290. package/lib/commonjs/skia/{Point.js → types/Point.js} +0 -0
  291. package/lib/commonjs/skia/{Point.js.map → types/Point.js.map} +0 -0
  292. package/lib/commonjs/skia/{RRect.js → types/RRect.js} +0 -0
  293. package/lib/commonjs/skia/{RRect.js.map → types/RRect.js.map} +0 -0
  294. package/lib/commonjs/skia/{RSXform.js → types/RSXform.js} +0 -0
  295. package/lib/commonjs/skia/{RSXform.js.map → types/RSXform.js.map} +0 -0
  296. package/lib/commonjs/skia/{Rect.js → types/Rect.js} +0 -0
  297. package/lib/commonjs/skia/{Rect.js.map → types/Rect.js.map} +0 -0
  298. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
  299. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js.map +0 -0
  300. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
  301. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js.map +0 -0
  302. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
  303. package/lib/commonjs/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
  304. package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js +0 -0
  305. package/lib/commonjs/skia/{SVG → types/SVG}/SVG.js.map +0 -0
  306. package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
  307. package/lib/commonjs/skia/{SVG → types/SVG}/SVGFactory.js.map +0 -0
  308. package/lib/commonjs/skia/{SVG → types/SVG}/index.js +0 -13
  309. package/lib/commonjs/skia/{Font → types/SVG}/index.js.map +1 -1
  310. package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js +0 -0
  311. package/lib/commonjs/skia/{Shader → types/Shader}/Shader.js.map +0 -0
  312. package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
  313. package/lib/commonjs/skia/{Shader → types/Shader}/ShaderFactory.js.map +0 -0
  314. package/lib/commonjs/skia/{Shader → types/Shader}/index.js +0 -13
  315. package/lib/commonjs/skia/types/Shader/index.js.map +1 -0
  316. package/lib/commonjs/skia/types/Skia.js +6 -0
  317. package/lib/commonjs/skia/{Surface/Surface.js.map → types/Skia.js.map} +0 -0
  318. package/lib/commonjs/skia/{Surface → types/Surface}/Surface.js +0 -0
  319. package/lib/{module/skia → commonjs/skia/types}/Surface/Surface.js.map +0 -0
  320. package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
  321. package/lib/commonjs/skia/{Surface → types/Surface}/SurfaceFactory.js.map +0 -0
  322. package/lib/commonjs/skia/{Surface → types/Surface}/index.js +0 -0
  323. package/lib/commonjs/skia/{Surface → types/Surface}/index.js.map +0 -0
  324. package/lib/commonjs/skia/{TextBlob.js → types/TextBlob.js} +0 -0
  325. package/lib/commonjs/skia/{TextBlob.js.map → types/TextBlob.js.map} +0 -0
  326. package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
  327. package/lib/commonjs/skia/{Typeface → types/Typeface}/Typeface.js.map +0 -0
  328. package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
  329. package/lib/commonjs/skia/{Typeface → types/Typeface}/TypefaceFactory.js.map +0 -0
  330. package/lib/commonjs/skia/{Typeface → types/Typeface}/index.js +0 -13
  331. package/lib/commonjs/skia/types/Typeface/index.js.map +1 -0
  332. package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
  333. package/lib/commonjs/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
  334. package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js +0 -0
  335. package/lib/commonjs/skia/{Vertices → types/Vertices}/index.js.map +0 -0
  336. package/lib/commonjs/skia/types/index.js +370 -0
  337. package/lib/commonjs/skia/types/index.js.map +1 -0
  338. package/lib/commonjs/skia/web/api/Host.js +66 -0
  339. package/lib/commonjs/skia/web/api/Host.js.map +1 -0
  340. package/lib/commonjs/skia/web/api/JsiSkCanvas.js +170 -0
  341. package/lib/commonjs/skia/web/api/JsiSkCanvas.js.map +1 -0
  342. package/lib/commonjs/skia/web/api/JsiSkColor.js +180 -0
  343. package/lib/commonjs/skia/web/api/JsiSkColor.js.map +1 -0
  344. package/lib/commonjs/skia/web/api/JsiSkColorFilter.js +18 -0
  345. package/lib/commonjs/skia/web/api/JsiSkColorFilter.js.map +1 -0
  346. package/lib/commonjs/skia/web/api/JsiSkImage.js +56 -0
  347. package/lib/commonjs/skia/web/api/JsiSkImage.js.map +1 -0
  348. package/lib/commonjs/skia/web/api/JsiSkPaint.js +106 -0
  349. package/lib/commonjs/skia/web/api/JsiSkPaint.js.map +1 -0
  350. package/lib/commonjs/skia/web/api/JsiSkRect.js +34 -0
  351. package/lib/commonjs/skia/web/api/JsiSkRect.js.map +1 -0
  352. package/lib/commonjs/skia/web/api/JsiSkSurface.js +31 -0
  353. package/lib/commonjs/skia/web/api/JsiSkSurface.js.map +1 -0
  354. package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js +30 -0
  355. package/lib/commonjs/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
  356. package/lib/commonjs/skia/web/api/index.js +26 -0
  357. package/lib/commonjs/skia/web/api/index.js.map +1 -0
  358. package/lib/commonjs/skia/web/index.js +19 -0
  359. package/lib/commonjs/skia/web/index.js.map +1 -0
  360. package/lib/commonjs/values/hooks/useValue.js.map +1 -1
  361. package/lib/commonjs/values/hooks/useValueEffect.js.map +1 -1
  362. package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +1 -1
  363. package/lib/commonjs/values/web/api.js.map +1 -1
  364. package/lib/commonjs/views/SkiaView.js.map +1 -1
  365. package/lib/commonjs/views/types.js.map +1 -1
  366. package/lib/module/animation/decay/runDecay.js.map +1 -1
  367. package/lib/module/animation/functions/interpolateColors.js.map +1 -1
  368. package/lib/module/animation/spring/runSpring.js.map +1 -1
  369. package/lib/module/animation/spring/useSpring.js.map +1 -1
  370. package/lib/module/animation/timing/createTiming.js.map +1 -1
  371. package/lib/module/animation/timing/runTiming.js.map +1 -1
  372. package/lib/module/animation/timing/useTiming.js.map +1 -1
  373. package/lib/module/index.js.map +1 -1
  374. package/lib/module/renderer/Canvas.js +1 -2
  375. package/lib/module/renderer/Canvas.js.map +1 -1
  376. package/lib/module/renderer/DependencyManager.js.map +1 -1
  377. package/lib/module/renderer/components/Blend.js +1 -2
  378. package/lib/module/renderer/components/Blend.js.map +1 -1
  379. package/lib/module/renderer/components/Compose.js +1 -3
  380. package/lib/module/renderer/components/Compose.js.map +1 -1
  381. package/lib/module/renderer/components/colorFilters/Lerp.js +1 -2
  382. package/lib/module/renderer/components/colorFilters/Lerp.js.map +1 -1
  383. package/lib/module/renderer/components/imageFilters/DisplacementMap.js +1 -2
  384. package/lib/module/renderer/components/imageFilters/DisplacementMap.js.map +1 -1
  385. package/lib/module/renderer/components/imageFilters/InnerShadow.js.map +1 -1
  386. package/lib/module/renderer/components/imageFilters/RuntimeShader.js.map +1 -1
  387. package/lib/module/renderer/components/imageFilters/Shadow.js +1 -2
  388. package/lib/module/renderer/components/imageFilters/Shadow.js.map +1 -1
  389. package/lib/module/renderer/components/maskFilters/Blur.js +1 -2
  390. package/lib/module/renderer/components/maskFilters/Blur.js.map +1 -1
  391. package/lib/module/renderer/components/pathEffects/Corner.js +1 -2
  392. package/lib/module/renderer/components/pathEffects/Corner.js.map +1 -1
  393. package/lib/module/renderer/components/pathEffects/Dash.js +1 -2
  394. package/lib/module/renderer/components/pathEffects/Dash.js.map +1 -1
  395. package/lib/module/renderer/components/pathEffects/Discrete.js +1 -2
  396. package/lib/module/renderer/components/pathEffects/Discrete.js.map +1 -1
  397. package/lib/module/renderer/components/pathEffects/Line2D.js +1 -2
  398. package/lib/module/renderer/components/pathEffects/Line2D.js.map +1 -1
  399. package/lib/module/renderer/components/pathEffects/Path1D.js +1 -2
  400. package/lib/module/renderer/components/pathEffects/Path1D.js.map +1 -1
  401. package/lib/module/renderer/components/pathEffects/Path2D.js +1 -2
  402. package/lib/module/renderer/components/pathEffects/Path2D.js.map +1 -1
  403. package/lib/module/renderer/components/pathEffects/Sum.js +1 -2
  404. package/lib/module/renderer/components/pathEffects/Sum.js.map +1 -1
  405. package/lib/module/renderer/components/shaders/Gradient.js.map +1 -1
  406. package/lib/module/renderer/components/shaders/Shader.js +1 -2
  407. package/lib/module/renderer/components/shaders/Shader.js.map +1 -1
  408. package/lib/module/renderer/components/shapes/Box.js.map +1 -1
  409. package/lib/module/renderer/components/shapes/DiffRect.js.map +1 -1
  410. package/lib/module/renderer/components/shapes/Patch.js +1 -2
  411. package/lib/module/renderer/components/shapes/Patch.js.map +1 -1
  412. package/lib/module/renderer/components/text/TextBlob.js.map +1 -1
  413. package/lib/module/renderer/components/text/TextPath.js.map +1 -1
  414. package/lib/module/renderer/index.js +1 -0
  415. package/lib/module/renderer/index.js.map +1 -1
  416. package/lib/module/renderer/nodes/Declaration.js.map +1 -1
  417. package/lib/module/renderer/nodes/Node.js.map +1 -1
  418. package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
  419. package/lib/module/renderer/processors/Clips.js.map +1 -1
  420. package/lib/module/renderer/processors/Font.js.map +1 -1
  421. package/lib/module/renderer/processors/Rects.js +1 -0
  422. package/lib/module/renderer/processors/Rects.js.map +1 -1
  423. package/lib/module/renderer/processors/Transform.js.map +1 -1
  424. package/lib/module/skia/Skia.js +2 -35
  425. package/lib/module/skia/Skia.js.map +1 -1
  426. package/lib/module/skia/{Color.js → core/Color.js} +1 -2
  427. package/lib/module/skia/core/Color.js.map +1 -0
  428. package/lib/module/skia/core/Data.js +56 -0
  429. package/lib/module/skia/core/Data.js.map +1 -0
  430. package/lib/module/skia/{Font/useFont.js → core/Font.js} +5 -5
  431. package/lib/module/skia/core/Font.js.map +1 -0
  432. package/lib/module/skia/core/Image.js +8 -0
  433. package/lib/module/skia/core/Image.js.map +1 -0
  434. package/lib/module/skia/{Paint/usePaint.js → core/Paint.js} +8 -3
  435. package/lib/module/skia/core/Paint.js.map +1 -0
  436. package/lib/module/skia/{Path/usePath.js → core/Path.js} +1 -1
  437. package/lib/module/skia/core/Path.js.map +1 -0
  438. package/lib/module/skia/{Picture/usePicture.js → core/Picture.js} +1 -1
  439. package/lib/module/skia/core/Picture.js.map +1 -0
  440. package/lib/module/skia/core/SVG.js +4 -0
  441. package/lib/module/skia/core/SVG.js.map +1 -0
  442. package/lib/module/skia/{Shader/useShader.js → core/Shader.js} +1 -1
  443. package/lib/module/skia/core/Shader.js.map +1 -0
  444. package/lib/module/skia/core/Typeface.js +8 -0
  445. package/lib/module/skia/core/Typeface.js.map +1 -0
  446. package/lib/module/skia/core/index.js +11 -0
  447. package/lib/module/skia/core/index.js.map +1 -0
  448. package/lib/module/skia/index.js +2 -23
  449. package/lib/module/skia/index.js.map +1 -1
  450. package/lib/module/skia/{Canvas.js → types/Canvas.js} +0 -0
  451. package/lib/module/skia/{Canvas.js.map → types/Canvas.js.map} +0 -0
  452. package/lib/module/skia/types/Color.js +2 -0
  453. package/lib/module/skia/{ContourMeasure.js.map → types/Color.js.map} +0 -0
  454. package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js +0 -0
  455. package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilter.js.map +0 -0
  456. package/lib/module/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.js +0 -0
  457. package/lib/module/skia/{FontMgr/FontMgr.js.map → types/ColorFilter/ColorFilterFactory.js.map} +0 -0
  458. package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js +0 -0
  459. package/lib/module/skia/{ColorFilter → types/ColorFilter}/index.js.map +0 -0
  460. package/lib/module/skia/{ContourMeasure.js → types/ContourMeasure.js} +0 -0
  461. package/lib/module/skia/{FontMgr/FontMgrFactory.js.map → types/ContourMeasure.js.map} +0 -0
  462. package/lib/module/skia/types/Data/Data.js +2 -0
  463. package/lib/module/skia/{JsiInstance.js.map → types/Data/Data.js.map} +0 -0
  464. package/lib/module/skia/{Data → types/Data}/DataFactory.js +0 -0
  465. package/lib/module/skia/{Path/PathFactory.js.map → types/Data/DataFactory.js.map} +0 -0
  466. package/lib/module/skia/{Data → types/Data}/index.js +0 -0
  467. package/lib/module/skia/{Data → types/Data}/index.js.map +0 -0
  468. package/lib/module/skia/{Font → types/Font}/Font.js +0 -0
  469. package/lib/module/skia/types/Font/Font.js.map +1 -0
  470. package/lib/module/skia/types/Font/index.js +2 -0
  471. package/lib/module/skia/types/Font/index.js.map +1 -0
  472. package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgr.js +0 -0
  473. package/lib/module/skia/{Picture/Picture.js.map → types/FontMgr/FontMgr.js.map} +0 -0
  474. package/lib/module/skia/{FontMgr → types/FontMgr}/FontMgrFactory.js +0 -0
  475. package/lib/module/skia/{Picture/PictureFactory.js.map → types/FontMgr/FontMgrFactory.js.map} +0 -0
  476. package/lib/module/skia/types/FontMgr/index.js +3 -0
  477. package/lib/module/skia/types/FontMgr/index.js.map +1 -0
  478. package/lib/module/skia/{Image → types/Image}/Image.js +0 -0
  479. package/lib/module/skia/{Image → types/Image}/Image.js.map +1 -1
  480. package/lib/module/skia/{Image → types/Image}/ImageFactory.js +0 -0
  481. package/lib/module/skia/{Image → types/Image}/ImageFactory.js.map +0 -0
  482. package/lib/module/skia/types/Image/index.js +3 -0
  483. package/lib/module/skia/types/Image/index.js.map +1 -0
  484. package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js +0 -0
  485. package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilter.js.map +0 -0
  486. package/lib/module/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.js +0 -0
  487. package/lib/module/skia/types/ImageFilter/ImageFilterFactory.js.map +1 -0
  488. package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js +0 -0
  489. package/lib/module/skia/{ImageFilter → types/ImageFilter}/index.js.map +0 -0
  490. package/lib/module/skia/{JsiInstance.js → types/JsiInstance.js} +0 -0
  491. package/lib/module/skia/{Picture/PictureRecorder.js.map → types/JsiInstance.js.map} +0 -0
  492. package/lib/module/skia/{MaskFilter.js → types/MaskFilter.js} +0 -0
  493. package/lib/module/skia/types/MaskFilter.js.map +1 -0
  494. package/lib/module/skia/{Matrix.js → types/Matrix.js} +0 -0
  495. package/lib/module/skia/{Matrix.js.map → types/Matrix.js.map} +0 -0
  496. package/lib/module/skia/{Paint → types/Paint}/BlendMode.js +0 -0
  497. package/lib/module/skia/{Paint → types/Paint}/BlendMode.js.map +0 -0
  498. package/lib/module/skia/{Paint → types/Paint}/Paint.js +0 -6
  499. package/lib/module/skia/types/Paint/Paint.js.map +1 -0
  500. package/lib/module/skia/types/Paint/index.js +3 -0
  501. package/lib/module/skia/types/Paint/index.js.map +1 -0
  502. package/lib/module/skia/{Path → types/Path}/Path.js +0 -0
  503. package/lib/module/skia/{Path → types/Path}/Path.js.map +0 -0
  504. package/lib/module/skia/{Path → types/Path}/PathFactory.js +0 -0
  505. package/lib/module/skia/{RRect.js.map → types/Path/PathFactory.js.map} +0 -0
  506. package/lib/module/skia/types/Path/index.js +3 -0
  507. package/lib/module/skia/types/Path/index.js.map +1 -0
  508. package/lib/module/skia/{PathEffect.js → types/PathEffect.js} +0 -0
  509. package/lib/module/skia/types/PathEffect.js.map +1 -0
  510. package/lib/module/skia/{Picture → types/Picture}/Picture.js +0 -0
  511. package/lib/module/skia/{RSXform.js.map → types/Picture/Picture.js.map} +0 -0
  512. package/lib/module/skia/{Picture → types/Picture}/PictureFactory.js +0 -0
  513. package/lib/module/skia/{Rect.js.map → types/Picture/PictureFactory.js.map} +0 -0
  514. package/lib/module/skia/{Picture → types/Picture}/PictureRecorder.js +0 -0
  515. package/lib/module/skia/{RuntimeEffect/RuntimeEffect.js.map → types/Picture/PictureRecorder.js.map} +0 -0
  516. package/lib/module/skia/{Picture → types/Picture}/index.js +0 -1
  517. package/lib/module/skia/types/Picture/index.js.map +1 -0
  518. package/lib/module/skia/{Point.js → types/Point.js} +0 -0
  519. package/lib/module/skia/{Point.js.map → types/Point.js.map} +0 -0
  520. package/lib/module/skia/{RRect.js → types/RRect.js} +0 -0
  521. package/lib/module/skia/{RuntimeEffect/RuntimeEffectFactory.js.map → types/RRect.js.map} +0 -0
  522. package/lib/module/skia/{RSXform.js → types/RSXform.js} +0 -0
  523. package/lib/module/skia/{SVG/SVG.js.map → types/RSXform.js.map} +0 -0
  524. package/lib/module/skia/{Rect.js → types/Rect.js} +0 -0
  525. package/lib/module/skia/{SVG/SVGFactory.js.map → types/Rect.js.map} +0 -0
  526. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.js +0 -0
  527. package/lib/module/skia/{Shader/ShaderFactory.js.map → types/RuntimeEffect/RuntimeEffect.js.map} +0 -0
  528. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.js +0 -0
  529. package/lib/module/skia/{Surface/SurfaceFactory.js.map → types/RuntimeEffect/RuntimeEffectFactory.js.map} +0 -0
  530. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js +0 -0
  531. package/lib/module/skia/{RuntimeEffect → types/RuntimeEffect}/index.js.map +0 -0
  532. package/lib/module/skia/{SVG → types/SVG}/SVG.js +0 -0
  533. package/lib/module/skia/{TextBlob.js.map → types/SVG/SVG.js.map} +0 -0
  534. package/lib/module/skia/{SVG → types/SVG}/SVGFactory.js +0 -0
  535. package/lib/module/skia/{Typeface/Typeface.js.map → types/SVG/SVGFactory.js.map} +0 -0
  536. package/lib/module/skia/types/SVG/index.js +3 -0
  537. package/lib/module/skia/types/SVG/index.js.map +1 -0
  538. package/lib/module/skia/{Shader → types/Shader}/Shader.js +0 -0
  539. package/lib/module/skia/{Shader → types/Shader}/Shader.js.map +0 -0
  540. package/lib/module/skia/{Shader → types/Shader}/ShaderFactory.js +0 -0
  541. package/lib/module/skia/{Typeface/TypefaceFactory.js.map → types/Shader/ShaderFactory.js.map} +0 -0
  542. package/lib/module/skia/types/Shader/index.js +3 -0
  543. package/lib/module/skia/types/Shader/index.js.map +1 -0
  544. package/lib/module/skia/types/Skia.js +2 -0
  545. package/lib/module/skia/types/Skia.js.map +1 -0
  546. package/lib/module/skia/{Surface → types/Surface}/Surface.js +0 -0
  547. package/lib/module/skia/types/Surface/Surface.js.map +1 -0
  548. package/lib/module/skia/{Surface → types/Surface}/SurfaceFactory.js +0 -0
  549. package/lib/module/skia/types/Surface/SurfaceFactory.js.map +1 -0
  550. package/lib/module/skia/{Surface → types/Surface}/index.js +0 -0
  551. package/lib/module/skia/{Surface → types/Surface}/index.js.map +0 -0
  552. package/lib/module/skia/{TextBlob.js → types/TextBlob.js} +0 -0
  553. package/lib/module/skia/types/TextBlob.js.map +1 -0
  554. package/lib/module/skia/{Typeface → types/Typeface}/Typeface.js +0 -0
  555. package/lib/module/skia/types/Typeface/Typeface.js.map +1 -0
  556. package/lib/module/skia/{Typeface → types/Typeface}/TypefaceFactory.js +0 -0
  557. package/lib/module/skia/types/Typeface/TypefaceFactory.js.map +1 -0
  558. package/lib/module/skia/types/Typeface/index.js +3 -0
  559. package/lib/module/skia/types/Typeface/index.js.map +1 -0
  560. package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js +0 -0
  561. package/lib/module/skia/{Vertices → types/Vertices}/Vertices.js.map +0 -0
  562. package/lib/module/skia/{Vertices → types/Vertices}/index.js +0 -0
  563. package/lib/module/skia/{Vertices → types/Vertices}/index.js.map +0 -0
  564. package/lib/module/skia/types/index.js +29 -0
  565. package/lib/module/skia/types/index.js.map +1 -0
  566. package/lib/module/skia/web/api/Host.js +36 -0
  567. package/lib/module/skia/web/api/Host.js.map +1 -0
  568. package/lib/module/skia/web/api/JsiSkCanvas.js +160 -0
  569. package/lib/module/skia/web/api/JsiSkCanvas.js.map +1 -0
  570. package/lib/module/skia/web/api/JsiSkColor.js +170 -0
  571. package/lib/module/skia/web/api/JsiSkColor.js.map +1 -0
  572. package/lib/module/skia/web/api/JsiSkColorFilter.js +8 -0
  573. package/lib/module/skia/web/api/JsiSkColorFilter.js.map +1 -0
  574. package/lib/module/skia/web/api/JsiSkImage.js +46 -0
  575. package/lib/module/skia/web/api/JsiSkImage.js.map +1 -0
  576. package/lib/module/skia/web/api/JsiSkPaint.js +96 -0
  577. package/lib/module/skia/web/api/JsiSkPaint.js.map +1 -0
  578. package/lib/module/skia/web/api/JsiSkRect.js +24 -0
  579. package/lib/module/skia/web/api/JsiSkRect.js.map +1 -0
  580. package/lib/module/skia/web/api/JsiSkSurface.js +19 -0
  581. package/lib/module/skia/web/api/JsiSkSurface.js.map +1 -0
  582. package/lib/module/skia/web/api/JsiSkSurfaceFactory.js +19 -0
  583. package/lib/module/skia/web/api/JsiSkSurfaceFactory.js.map +1 -0
  584. package/lib/module/skia/web/api/index.js +13 -0
  585. package/lib/module/skia/web/api/index.js.map +1 -0
  586. package/lib/module/skia/web/index.js +2 -0
  587. package/lib/module/skia/web/index.js.map +1 -0
  588. package/lib/module/values/hooks/useValue.js.map +1 -1
  589. package/lib/module/values/hooks/useValueEffect.js.map +1 -1
  590. package/lib/module/values/web/RNSkReadonlyValue.js.map +1 -1
  591. package/lib/module/values/web/api.js.map +1 -1
  592. package/lib/module/views/SkiaView.js.map +1 -1
  593. package/lib/module/views/types.js.map +1 -1
  594. package/lib/typescript/src/animation/decay/runDecay.d.ts +2 -2
  595. package/lib/typescript/src/animation/spring/runSpring.d.ts +2 -2
  596. package/lib/typescript/src/animation/spring/useSpring.d.ts +2 -2
  597. package/lib/typescript/src/animation/timing/createTiming.d.ts +2 -2
  598. package/lib/typescript/src/animation/timing/runTiming.d.ts +2 -2
  599. package/lib/typescript/src/animation/timing/useLoop.d.ts +1 -1
  600. package/lib/typescript/src/animation/timing/useTiming.d.ts +2 -2
  601. package/lib/typescript/src/renderer/Canvas.d.ts +4 -4
  602. package/lib/typescript/src/renderer/DependencyManager.d.ts +2 -2
  603. package/lib/typescript/src/renderer/DrawingContext.d.ts +1 -2
  604. package/lib/typescript/src/renderer/components/colorFilters/Compose.d.ts +1 -1
  605. package/lib/typescript/src/renderer/components/imageFilters/DisplacementMap.d.ts +1 -1
  606. package/lib/typescript/src/renderer/components/imageFilters/InnerShadow.d.ts +1 -2
  607. package/lib/typescript/src/renderer/components/imageFilters/RuntimeShader.d.ts +1 -1
  608. package/lib/typescript/src/renderer/components/imageFilters/Shadow.d.ts +1 -1
  609. package/lib/typescript/src/renderer/components/maskFilters/Blur.d.ts +1 -1
  610. package/lib/typescript/src/renderer/components/pathEffects/Line2D.d.ts +1 -1
  611. package/lib/typescript/src/renderer/components/pathEffects/Path1D.d.ts +1 -1
  612. package/lib/typescript/src/renderer/components/pathEffects/Path2D.d.ts +1 -1
  613. package/lib/typescript/src/renderer/components/shaders/Gradient.d.ts +1 -1
  614. package/lib/typescript/src/renderer/components/shaders/Shader.d.ts +0 -1
  615. package/lib/typescript/src/renderer/components/shapes/Box.d.ts +1 -2
  616. package/lib/typescript/src/renderer/components/shapes/DiffRect.d.ts +1 -1
  617. package/lib/typescript/src/renderer/components/text/TextBlob.d.ts +1 -1
  618. package/lib/typescript/src/renderer/components/text/TextPath.d.ts +1 -1
  619. package/lib/typescript/src/renderer/index.d.ts +1 -0
  620. package/lib/typescript/src/renderer/nodes/Declaration.d.ts +1 -1
  621. package/lib/typescript/src/renderer/nodes/Node.d.ts +1 -1
  622. package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +3 -3
  623. package/lib/typescript/src/renderer/processors/Clips.d.ts +1 -2
  624. package/lib/typescript/src/renderer/processors/Font.d.ts +1 -2
  625. package/lib/typescript/src/renderer/processors/Rects.d.ts +2 -0
  626. package/lib/typescript/src/renderer/processors/Transform.d.ts +1 -1
  627. package/lib/typescript/src/skia/Skia.d.ts +2 -35
  628. package/lib/typescript/src/skia/{Color.d.ts → core/Color.d.ts} +1 -2
  629. package/lib/typescript/src/skia/core/Data.d.ts +5 -0
  630. package/lib/typescript/src/skia/core/Font.d.ts +5 -0
  631. package/lib/typescript/src/skia/core/Image.d.ts +5 -0
  632. package/lib/typescript/src/skia/{Paint/usePaint.d.ts → core/Paint.d.ts} +2 -1
  633. package/lib/typescript/src/skia/{Path/usePath.d.ts → core/Path.d.ts} +1 -2
  634. package/lib/typescript/src/skia/{Picture/usePicture.d.ts → core/Picture.d.ts} +1 -3
  635. package/lib/typescript/src/skia/core/SVG.d.ts +2 -0
  636. package/lib/typescript/src/skia/{Shader/useShader.d.ts → core/Shader.d.ts} +0 -0
  637. package/lib/typescript/src/skia/core/Typeface.d.ts +5 -0
  638. package/lib/typescript/src/skia/core/index.d.ts +10 -0
  639. package/lib/typescript/src/skia/index.d.ts +2 -23
  640. package/lib/typescript/src/skia/{Canvas.d.ts → types/Canvas.d.ts} +0 -0
  641. package/lib/typescript/src/skia/types/Color.d.ts +2 -0
  642. package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.d.ts +0 -0
  643. package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.d.ts +1 -1
  644. package/lib/typescript/src/skia/{ColorFilter → types/ColorFilter}/index.d.ts +0 -0
  645. package/lib/typescript/src/skia/{ContourMeasure.d.ts → types/ContourMeasure.d.ts} +0 -0
  646. package/lib/typescript/src/skia/types/Data/Data.d.ts +5 -0
  647. package/lib/typescript/src/skia/{Data → types/Data}/DataFactory.d.ts +0 -0
  648. package/lib/typescript/src/skia/{Data → types/Data}/index.d.ts +0 -0
  649. package/lib/typescript/src/skia/{Font → types/Font}/Font.d.ts +1 -1
  650. package/lib/typescript/src/skia/types/Font/index.d.ts +1 -0
  651. package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgr.d.ts +1 -1
  652. package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.d.ts +0 -0
  653. package/lib/typescript/src/skia/{FontMgr → types/FontMgr}/index.d.ts +1 -0
  654. package/lib/typescript/src/skia/{Image → types/Image}/Image.d.ts +2 -2
  655. package/lib/typescript/src/skia/{Image → types/Image}/ImageFactory.d.ts +0 -0
  656. package/lib/typescript/src/skia/{Image → types/Image}/index.d.ts +0 -1
  657. package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.d.ts +0 -0
  658. package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.d.ts +2 -2
  659. package/lib/typescript/src/skia/{ImageFilter → types/ImageFilter}/index.d.ts +0 -0
  660. package/lib/typescript/src/skia/{JsiInstance.d.ts → types/JsiInstance.d.ts} +0 -0
  661. package/lib/typescript/src/skia/{MaskFilter.d.ts → types/MaskFilter.d.ts} +3 -3
  662. package/lib/typescript/src/skia/{Matrix.d.ts → types/Matrix.d.ts} +0 -0
  663. package/lib/typescript/src/skia/{Paint → types/Paint}/BlendMode.d.ts +0 -0
  664. package/lib/typescript/src/skia/{Paint → types/Paint}/Paint.d.ts +5 -6
  665. package/lib/typescript/src/skia/{Paint → types/Paint}/index.d.ts +0 -1
  666. package/lib/typescript/src/skia/{Path → types/Path}/Path.d.ts +0 -0
  667. package/lib/typescript/src/skia/{Path → types/Path}/PathFactory.d.ts +0 -0
  668. package/lib/typescript/src/skia/{Path → types/Path}/index.d.ts +0 -1
  669. package/lib/typescript/src/skia/{PathEffect.d.ts → types/PathEffect.d.ts} +10 -10
  670. package/lib/typescript/src/skia/{Picture → types/Picture}/Picture.d.ts +0 -0
  671. package/lib/typescript/src/skia/{Picture → types/Picture}/PictureFactory.d.ts +0 -0
  672. package/lib/typescript/src/skia/{Picture → types/Picture}/PictureRecorder.d.ts +0 -0
  673. package/lib/typescript/src/skia/{Picture → types/Picture}/index.d.ts +0 -1
  674. package/lib/typescript/src/skia/{Point.d.ts → types/Point.d.ts} +0 -0
  675. package/lib/typescript/src/skia/{RRect.d.ts → types/RRect.d.ts} +0 -0
  676. package/lib/typescript/src/skia/{RSXform.d.ts → types/RSXform.d.ts} +0 -0
  677. package/lib/typescript/src/skia/{Rect.d.ts → types/Rect.d.ts} +0 -0
  678. package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.d.ts +2 -4
  679. package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.d.ts +0 -0
  680. package/lib/typescript/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.d.ts +0 -0
  681. package/lib/typescript/src/skia/{SVG → types/SVG}/SVG.d.ts +0 -0
  682. package/lib/typescript/src/skia/{SVG → types/SVG}/SVGFactory.d.ts +1 -1
  683. package/lib/typescript/src/skia/{SVG → types/SVG}/index.d.ts +0 -1
  684. package/lib/typescript/src/skia/{Shader → types/Shader}/Shader.d.ts +0 -0
  685. package/lib/typescript/src/skia/{Shader → types/Shader}/ShaderFactory.d.ts +0 -0
  686. package/lib/typescript/src/skia/{Shader → types/Shader}/index.d.ts +0 -1
  687. package/lib/typescript/src/skia/{SkiaApi.d.ts → types/Skia.d.ts} +2 -5
  688. package/lib/typescript/src/skia/{Surface → types/Surface}/Surface.d.ts +0 -0
  689. package/lib/typescript/src/skia/{Surface → types/Surface}/SurfaceFactory.d.ts +0 -0
  690. package/lib/typescript/src/skia/{Surface → types/Surface}/index.d.ts +0 -0
  691. package/lib/typescript/src/skia/{TextBlob.d.ts → types/TextBlob.d.ts} +0 -0
  692. package/lib/typescript/src/skia/{Typeface → types/Typeface}/Typeface.d.ts +0 -0
  693. package/lib/typescript/src/skia/{Typeface → types/Typeface}/TypefaceFactory.d.ts +1 -1
  694. package/lib/typescript/src/skia/{Typeface → types/Typeface}/index.d.ts +0 -1
  695. package/lib/typescript/src/skia/{Vertices → types/Vertices}/Vertices.d.ts +0 -0
  696. package/lib/typescript/src/skia/{Vertices → types/Vertices}/index.d.ts +0 -0
  697. package/lib/typescript/src/skia/types/index.d.ts +28 -0
  698. package/lib/typescript/src/skia/web/api/Host.d.ts +18 -0
  699. package/lib/typescript/src/skia/web/api/JsiSkCanvas.d.ts +44 -0
  700. package/lib/typescript/src/skia/web/api/JsiSkColor.d.ts +3 -0
  701. package/lib/typescript/src/skia/web/api/JsiSkColorFilter.d.ts +6 -0
  702. package/lib/typescript/src/skia/web/api/JsiSkImage.d.ts +12 -0
  703. package/lib/typescript/src/skia/web/api/JsiSkPaint.d.ts +26 -0
  704. package/lib/typescript/src/skia/web/api/JsiSkRect.d.ts +10 -0
  705. package/lib/typescript/src/skia/web/api/JsiSkSurface.d.ts +8 -0
  706. package/lib/typescript/src/skia/web/api/JsiSkSurfaceFactory.d.ts +8 -0
  707. package/lib/typescript/src/skia/web/api/index.d.ts +10 -0
  708. package/lib/typescript/src/skia/web/index.d.ts +1 -0
  709. package/lib/typescript/src/values/api.d.ts +1 -1
  710. package/lib/typescript/src/values/api.web.d.ts +1 -1
  711. package/lib/typescript/src/values/hooks/useDerivedValue.d.ts +1 -1
  712. package/lib/typescript/src/values/hooks/useValue.d.ts +2 -2
  713. package/lib/typescript/src/values/hooks/useValueEffect.d.ts +2 -2
  714. package/lib/typescript/src/values/types.d.ts +5 -5
  715. package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +2 -2
  716. package/lib/typescript/src/views/SkiaView.d.ts +4 -4
  717. package/lib/typescript/src/views/types.d.ts +3 -4
  718. package/libs/android/arm64-v8a/libskia.a +0 -0
  719. package/libs/android/arm64-v8a/libsvg.a +0 -0
  720. package/libs/android/armeabi-v7a/libskia.a +0 -0
  721. package/libs/android/armeabi-v7a/libsvg.a +0 -0
  722. package/libs/android/x86/libskia.a +0 -0
  723. package/libs/android/x86/libsvg.a +0 -0
  724. package/libs/android/x86_64/libskia.a +0 -0
  725. package/libs/android/x86_64/libsvg.a +0 -0
  726. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  727. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  728. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  729. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  730. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  731. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  732. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  733. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  734. package/package.json +4 -2
  735. package/react-native-skia.podspec +1 -1
  736. package/src/animation/decay/runDecay.ts +5 -2
  737. package/src/animation/functions/interpolateColors.ts +1 -2
  738. package/src/animation/spring/runSpring.ts +2 -2
  739. package/src/animation/spring/useSpring.ts +2 -2
  740. package/src/animation/timing/createTiming.ts +2 -2
  741. package/src/animation/timing/runTiming.ts +2 -2
  742. package/src/animation/timing/useTiming.ts +2 -2
  743. package/src/index.ts +0 -1
  744. package/src/renderer/Canvas.tsx +4 -5
  745. package/src/renderer/DependencyManager.tsx +2 -2
  746. package/src/renderer/DrawingContext.ts +1 -2
  747. package/src/renderer/components/Blend.tsx +1 -2
  748. package/src/renderer/components/Compose.tsx +1 -3
  749. package/src/renderer/components/colorFilters/Lerp.tsx +1 -2
  750. package/src/renderer/components/imageFilters/DisplacementMap.tsx +1 -2
  751. package/src/renderer/components/imageFilters/InnerShadow.tsx +1 -2
  752. package/src/renderer/components/imageFilters/RuntimeShader.tsx +1 -1
  753. package/src/renderer/components/imageFilters/Shadow.tsx +2 -3
  754. package/src/renderer/components/maskFilters/Blur.tsx +1 -2
  755. package/src/renderer/components/pathEffects/Corner.tsx +1 -2
  756. package/src/renderer/components/pathEffects/Dash.tsx +1 -2
  757. package/src/renderer/components/pathEffects/Discrete.tsx +1 -2
  758. package/src/renderer/components/pathEffects/Line2D.tsx +2 -3
  759. package/src/renderer/components/pathEffects/Path1D.tsx +1 -2
  760. package/src/renderer/components/pathEffects/Path2D.tsx +2 -3
  761. package/src/renderer/components/pathEffects/Sum.tsx +1 -2
  762. package/src/renderer/components/shaders/Gradient.ts +1 -1
  763. package/src/renderer/components/shaders/Shader.tsx +1 -3
  764. package/src/renderer/components/shapes/Box.tsx +1 -3
  765. package/src/renderer/components/shapes/DiffRect.tsx +1 -1
  766. package/src/renderer/components/shapes/Patch.tsx +1 -2
  767. package/src/renderer/components/text/TextBlob.tsx +1 -1
  768. package/src/renderer/components/text/TextPath.tsx +1 -2
  769. package/src/renderer/index.ts +1 -0
  770. package/src/renderer/nodes/Declaration.tsx +1 -1
  771. package/src/renderer/nodes/Node.ts +1 -1
  772. package/src/renderer/processors/Animations/Animations.ts +5 -8
  773. package/src/renderer/processors/Clips.ts +1 -2
  774. package/src/renderer/processors/Font.ts +1 -2
  775. package/src/renderer/processors/Rects.ts +4 -0
  776. package/src/renderer/processors/Transform.ts +1 -1
  777. package/src/skia/Skia.ts +2 -38
  778. package/src/skia/__tests__/Rects.spec.ts +40 -0
  779. package/src/skia/__tests__/snapshots/lightblue-rect.png +0 -0
  780. package/src/skia/{Color.ts → core/Color.ts} +2 -6
  781. package/src/skia/core/Data.ts +78 -0
  782. package/src/skia/{Font/useFont.ts → core/Font.ts} +8 -5
  783. package/src/skia/core/Image.ts +12 -0
  784. package/src/skia/{Paint/usePaint.ts → core/Paint.ts} +7 -2
  785. package/src/skia/{Path/usePath.ts → core/Path.ts} +1 -3
  786. package/src/skia/{Picture/usePicture.ts → core/Picture.ts} +1 -4
  787. package/src/skia/core/SVG.ts +9 -0
  788. package/src/skia/{Shader/useShader.ts → core/Shader.ts} +0 -0
  789. package/src/skia/core/Typeface.ts +11 -0
  790. package/src/skia/core/index.ts +10 -0
  791. package/src/skia/index.ts +2 -23
  792. package/src/skia/{Canvas.ts → types/Canvas.ts} +0 -0
  793. package/src/skia/types/Color.ts +4 -0
  794. package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilter.ts +0 -0
  795. package/src/skia/{ColorFilter → types/ColorFilter}/ColorFilterFactory.ts +1 -1
  796. package/src/skia/{ColorFilter → types/ColorFilter}/index.ts +0 -0
  797. package/src/skia/{ContourMeasure.tsx → types/ContourMeasure.tsx} +0 -0
  798. package/src/skia/types/Data/Data.ts +5 -0
  799. package/src/skia/{Data → types/Data}/DataFactory.ts +0 -0
  800. package/src/skia/{Data → types/Data}/index.ts +0 -0
  801. package/src/skia/{Font → types/Font}/Font.ts +1 -1
  802. package/src/skia/types/Font/index.ts +1 -0
  803. package/src/skia/{FontMgr → types/FontMgr}/FontMgr.ts +1 -1
  804. package/src/skia/{FontMgr → types/FontMgr}/FontMgrFactory.ts +1 -6
  805. package/src/skia/{FontMgr → types/FontMgr}/index.ts +1 -0
  806. package/src/skia/{Image → types/Image}/Image.ts +2 -2
  807. package/src/skia/{Image → types/Image}/ImageFactory.ts +0 -0
  808. package/src/skia/{Image → types/Image}/index.ts +0 -1
  809. package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilter.ts +0 -0
  810. package/src/skia/{ImageFilter → types/ImageFilter}/ImageFilterFactory.ts +2 -2
  811. package/src/skia/{ImageFilter → types/ImageFilter}/index.ts +0 -0
  812. package/src/skia/{JsiInstance.ts → types/JsiInstance.ts} +0 -0
  813. package/src/skia/{MaskFilter.ts → types/MaskFilter.ts} +3 -3
  814. package/src/skia/{Matrix.ts → types/Matrix.ts} +0 -0
  815. package/src/skia/{Paint → types/Paint}/BlendMode.ts +0 -0
  816. package/src/skia/{Paint → types/Paint}/Paint.ts +5 -12
  817. package/src/skia/{Paint → types/Paint}/index.ts +0 -1
  818. package/src/skia/{Path → types/Path}/Path.ts +0 -0
  819. package/src/skia/{Path → types/Path}/PathFactory.ts +0 -0
  820. package/src/skia/{Path → types/Path}/index.ts +0 -1
  821. package/src/skia/{PathEffect.ts → types/PathEffect.ts} +14 -10
  822. package/src/skia/{Picture → types/Picture}/Picture.ts +0 -0
  823. package/src/skia/{Picture → types/Picture}/PictureFactory.ts +0 -0
  824. package/src/skia/{Picture → types/Picture}/PictureRecorder.ts +0 -0
  825. package/src/skia/{Picture → types/Picture}/index.ts +0 -1
  826. package/src/skia/{Point.ts → types/Point.ts} +0 -0
  827. package/src/skia/{RRect.ts → types/RRect.ts} +0 -0
  828. package/src/skia/{RSXform.ts → types/RSXform.ts} +0 -0
  829. package/src/skia/{Rect.ts → types/Rect.ts} +0 -0
  830. package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffect.ts +1 -8
  831. package/src/skia/{RuntimeEffect → types/RuntimeEffect}/RuntimeEffectFactory.ts +0 -0
  832. package/src/skia/{RuntimeEffect → types/RuntimeEffect}/index.ts +0 -0
  833. package/src/skia/{SVG → types/SVG}/SVG.ts +0 -0
  834. package/src/skia/{SVG → types/SVG}/SVGFactory.ts +1 -1
  835. package/src/skia/{SVG → types/SVG}/index.ts +0 -1
  836. package/src/skia/{Shader → types/Shader}/Shader.ts +0 -0
  837. package/src/skia/{Shader → types/Shader}/ShaderFactory.ts +0 -0
  838. package/src/skia/{Shader → types/Shader}/index.ts +0 -1
  839. package/src/skia/{SkiaApi.ts → types/Skia.ts} +6 -8
  840. package/src/skia/{Surface → types/Surface}/Surface.ts +0 -0
  841. package/src/skia/{Surface → types/Surface}/SurfaceFactory.ts +0 -0
  842. package/src/skia/{Surface → types/Surface}/index.ts +0 -0
  843. package/src/skia/{TextBlob.ts → types/TextBlob.ts} +0 -0
  844. package/src/skia/{Typeface → types/Typeface}/Typeface.ts +0 -0
  845. package/src/skia/{Typeface → types/Typeface}/TypefaceFactory.ts +1 -1
  846. package/src/skia/{Typeface → types/Typeface}/index.ts +0 -1
  847. package/src/skia/{Vertices → types/Vertices}/Vertices.tsx +0 -0
  848. package/src/skia/{Vertices → types/Vertices}/index.ts +0 -0
  849. package/src/skia/types/index.ts +28 -0
  850. package/src/skia/web/api/Host.ts +50 -0
  851. package/src/skia/web/api/JsiSkCanvas.ts +322 -0
  852. package/src/skia/web/api/JsiSkColor.ts +181 -0
  853. package/src/skia/web/api/JsiSkColorFilter.ts +14 -0
  854. package/src/skia/web/api/JsiSkImage.ts +66 -0
  855. package/src/skia/web/api/JsiSkPaint.ts +103 -0
  856. package/src/skia/web/api/JsiSkRect.ts +27 -0
  857. package/src/skia/web/api/JsiSkSurface.ts +25 -0
  858. package/src/skia/web/api/JsiSkSurfaceFactory.ts +20 -0
  859. package/src/skia/web/api/index.ts +15 -0
  860. package/src/skia/web/index.ts +1 -0
  861. package/src/values/hooks/useValue.ts +2 -2
  862. package/src/values/hooks/useValueEffect.ts +2 -5
  863. package/src/values/types.ts +6 -6
  864. package/src/values/web/RNSkReadonlyValue.ts +2 -2
  865. package/src/values/web/api.ts +4 -4
  866. package/src/views/SkiaView.tsx +3 -3
  867. package/src/views/types.ts +3 -4
  868. package/cpp/skia/include/core/SkCustomMesh.h +0 -202
  869. package/cpp/skia/include/core/SkStringView.h +0 -185
  870. package/cpp/skia/include/private/SkPaintParamsKey.h +0 -110
  871. package/cpp/skia/include/private/SkShaderCodeDictionary.h +0 -63
  872. package/cpp/skia/include/private/SkTOptional.h +0 -362
  873. package/lib/commonjs/skia/Color.js.map +0 -1
  874. package/lib/commonjs/skia/Data/Data.js.map +0 -1
  875. package/lib/commonjs/skia/Font/Font.js.map +0 -1
  876. package/lib/commonjs/skia/Font/useFont.js.map +0 -1
  877. package/lib/commonjs/skia/Image/index.js.map +0 -1
  878. package/lib/commonjs/skia/Image/useImage.js.map +0 -1
  879. package/lib/commonjs/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
  880. package/lib/commonjs/skia/MaskFilter.js.map +0 -1
  881. package/lib/commonjs/skia/Paint/Paint.js.map +0 -1
  882. package/lib/commonjs/skia/Paint/usePaint.js.map +0 -1
  883. package/lib/commonjs/skia/Path/index.js.map +0 -1
  884. package/lib/commonjs/skia/Path/usePath.js.map +0 -1
  885. package/lib/commonjs/skia/PathEffect.js.map +0 -1
  886. package/lib/commonjs/skia/Picture/index.js.map +0 -1
  887. package/lib/commonjs/skia/Picture/usePicture.js.map +0 -1
  888. package/lib/commonjs/skia/SVG/index.js.map +0 -1
  889. package/lib/commonjs/skia/SVG/useSvg.js +0 -15
  890. package/lib/commonjs/skia/SVG/useSvg.js.map +0 -1
  891. package/lib/commonjs/skia/Shader/index.js.map +0 -1
  892. package/lib/commonjs/skia/Shader/useShader.js.map +0 -1
  893. package/lib/commonjs/skia/SkiaApi.js +0 -4
  894. package/lib/commonjs/skia/SkiaApi.js.map +0 -1
  895. package/lib/commonjs/skia/Typeface/index.js.map +0 -1
  896. package/lib/commonjs/skia/Typeface/useTypeface.js.map +0 -1
  897. package/lib/module/skia/Color.js.map +0 -1
  898. package/lib/module/skia/Data/Data.js +0 -35
  899. package/lib/module/skia/Data/Data.js.map +0 -1
  900. package/lib/module/skia/Font/Font.js.map +0 -1
  901. package/lib/module/skia/Font/index.js +0 -3
  902. package/lib/module/skia/Font/index.js.map +0 -1
  903. package/lib/module/skia/Font/useFont.js.map +0 -1
  904. package/lib/module/skia/FontMgr/index.js +0 -2
  905. package/lib/module/skia/FontMgr/index.js.map +0 -1
  906. package/lib/module/skia/Image/index.js +0 -4
  907. package/lib/module/skia/Image/index.js.map +0 -1
  908. package/lib/module/skia/Image/useImage.js +0 -8
  909. package/lib/module/skia/Image/useImage.js.map +0 -1
  910. package/lib/module/skia/ImageFilter/ImageFilterFactory.js.map +0 -1
  911. package/lib/module/skia/MaskFilter.js.map +0 -1
  912. package/lib/module/skia/Paint/Paint.js.map +0 -1
  913. package/lib/module/skia/Paint/index.js +0 -4
  914. package/lib/module/skia/Paint/index.js.map +0 -1
  915. package/lib/module/skia/Paint/usePaint.js.map +0 -1
  916. package/lib/module/skia/Path/index.js +0 -4
  917. package/lib/module/skia/Path/index.js.map +0 -1
  918. package/lib/module/skia/Path/usePath.js.map +0 -1
  919. package/lib/module/skia/PathEffect.js.map +0 -1
  920. package/lib/module/skia/Picture/index.js.map +0 -1
  921. package/lib/module/skia/Picture/usePicture.js.map +0 -1
  922. package/lib/module/skia/SVG/index.js +0 -4
  923. package/lib/module/skia/SVG/index.js.map +0 -1
  924. package/lib/module/skia/SVG/useSvg.js +0 -4
  925. package/lib/module/skia/SVG/useSvg.js.map +0 -1
  926. package/lib/module/skia/Shader/index.js +0 -4
  927. package/lib/module/skia/Shader/index.js.map +0 -1
  928. package/lib/module/skia/Shader/useShader.js.map +0 -1
  929. package/lib/module/skia/SkiaApi.js +0 -2
  930. package/lib/module/skia/SkiaApi.js.map +0 -1
  931. package/lib/module/skia/Typeface/index.js +0 -4
  932. package/lib/module/skia/Typeface/index.js.map +0 -1
  933. package/lib/module/skia/Typeface/useTypeface.js +0 -8
  934. package/lib/module/skia/Typeface/useTypeface.js.map +0 -1
  935. package/lib/typescript/src/skia/Data/Data.d.ts +0 -9
  936. package/lib/typescript/src/skia/Font/index.d.ts +0 -2
  937. package/lib/typescript/src/skia/Font/useFont.d.ts +0 -6
  938. package/lib/typescript/src/skia/Image/useImage.d.ts +0 -5
  939. package/lib/typescript/src/skia/SVG/useSvg.d.ts +0 -2
  940. package/lib/typescript/src/skia/Typeface/useTypeface.d.ts +0 -5
  941. package/src/skia/Data/Data.ts +0 -61
  942. package/src/skia/Font/index.ts +0 -2
  943. package/src/skia/Image/useImage.ts +0 -9
  944. package/src/skia/SVG/useSvg.ts +0 -6
  945. package/src/skia/Typeface/useTypeface.ts +0 -9
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useFont.ts"],"names":["useMemo","Skia","useTypeface","useFont","font","size","typeface","Font"],"mappings":"AAAA;AACA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,IAAT,QAAqB,SAArB;AACA,SAASC,WAAT,QAA4B,aAA5B;;AAIA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,CAACC,IAAD,EAAmBC,IAAnB,KAAoD;AACzE,QAAMC,QAAQ,GAAGJ,WAAW,CAACE,IAAD,CAA5B;AACA,SAAOJ,OAAO,CAAC,MAAM;AACnB,QAAIM,QAAQ,KAAK,IAAjB,EAAuB;AACrB,aAAO,IAAP;AACD,KAFD,MAEO,IAAIA,QAAQ,IAAID,IAAhB,EAAsB;AAC3B,aAAOJ,IAAI,CAACM,IAAL,CAAUD,QAAV,EAAoBD,IAApB,CAAP;AACD,KAFM,MAEA,IAAIC,QAAQ,IAAI,CAACD,IAAjB,EAAuB;AAC5B,aAAOJ,IAAI,CAACM,IAAL,CAAUD,QAAV,CAAP;AACD,KAFM,MAEA;AACL,aAAOL,IAAI,CAACM,IAAL,EAAP;AACD,KATkB,CAUnB;;AACD,GAXa,EAWX,CAACD,QAAD,CAXW,CAAd;AAYD,CAdM","sourcesContent":["/*global SkiaApi*/\nimport { useMemo } from \"react\";\n\nimport type { DataSource } from \"../Data\";\nimport { Skia } from \"../Skia\";\nimport { useTypeface } from \"../Typeface\";\n\nimport type { SkFont } from \"./Font\";\n\n/**\n * Returns a Skia Font object\n * */\nexport const useFont = (font: DataSource, size?: number): SkFont | null => {\n const typeface = useTypeface(font);\n return useMemo(() => {\n if (typeface === null) {\n return null;\n } else if (typeface && size) {\n return Skia.Font(typeface, size);\n } else if (typeface && !size) {\n return Skia.Font(typeface);\n } else {\n return Skia.Font();\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [typeface]);\n};\n"]}
@@ -1,2 +0,0 @@
1
- export * from "./FontMgrFactory";
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAd","sourcesContent":["export * from \"./FontMgrFactory\";\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./Image";
2
- export * from "./ImageFactory";
3
- export * from "./useImage";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAd;AACA,cAAc,gBAAd;AACA,cAAc,YAAd","sourcesContent":["export * from \"./Image\";\nexport * from \"./ImageFactory\";\nexport * from \"./useImage\";\n"]}
@@ -1,8 +0,0 @@
1
- import { useRawData } from "../Data/Data";
2
- import { Skia } from "../Skia";
3
- /**
4
- * Returns a Skia Image object
5
- * */
6
-
7
- export const useImage = source => useRawData(source, Skia.MakeImageFromEncoded);
8
- //# sourceMappingURL=useImage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useImage.ts"],"names":["useRawData","Skia","useImage","source","MakeImageFromEncoded"],"mappings":"AACA,SAASA,UAAT,QAA2B,cAA3B;AACA,SAASC,IAAT,QAAqB,SAArB;AAEA;AACA;AACA;;AACA,OAAO,MAAMC,QAAQ,GAAIC,MAAD,IACtBH,UAAU,CAACG,MAAD,EAASF,IAAI,CAACG,oBAAd,CADL","sourcesContent":["import type { DataSource } from \"../Data/Data\";\nimport { useRawData } from \"../Data/Data\";\nimport { Skia } from \"../Skia\";\n\n/**\n * Returns a Skia Image object\n * */\nexport const useImage = (source: DataSource) =>\n useRawData(source, Skia.MakeImageFromEncoded);\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ImageFilterFactory.ts"],"names":["ColorChannel"],"mappings":"AASA,WAAYA,YAAZ;;WAAYA,Y;AAAAA,EAAAA,Y,CAAAA,Y;AAAAA,EAAAA,Y,CAAAA,Y;AAAAA,EAAAA,Y,CAAAA,Y;AAAAA,EAAAA,Y,CAAAA,Y;GAAAA,Y,KAAAA,Y","sourcesContent":["import type { SkColor } from \"../Color\";\nimport type { SkColorFilter } from \"../ColorFilter/ColorFilter\";\nimport type { SkShader } from \"../Shader/Shader\";\nimport type { SkRect } from \"../Rect\";\nimport type { BlendMode } from \"../Paint/BlendMode\";\nimport type { SkRuntimeShaderBuilder } from \"../RuntimeEffect\";\n\nimport type { SkImageFilter, TileMode } from \"./ImageFilter\";\n\nexport enum ColorChannel {\n R,\n G,\n B,\n A,\n}\n\nexport interface ImageFilterFactory {\n /**\n * Offsets the input image\n *\n * @param dx - Offset along the X axis\n * @param dy - Offset along the X axis\n * @param input - if null, it will use the dynamic source image\n */\n MakeOffset(\n dx: number,\n dy: number,\n input: SkImageFilter | null\n ): SkImageFilter;\n /**\n * Spatially displace pixel values of the filtered image\n *\n * @param channelX - Color channel to be used along the X axis\n * @param channelY - Color channel to be used along the Y axis\n * @param scale - Scale factor to be used in the displacement\n * @param in1 - Source image filter to use for the displacement\n * @param input - if null, it will use the dynamic source image\n */\n MakeDisplacementMap(\n channelX: ColorChannel,\n channelY: ColorChannel,\n scale: number,\n in1: SkImageFilter,\n input: SkImageFilter | null\n ): SkImageFilter;\n /**\n * Transforms a shader into an impage filter\n *\n * @param shader - The Shader to be transformed\n * @param input - if null, it will use the dynamic source image\n */\n MakeShader(shader: SkShader, input: SkImageFilter | null): SkImageFilter;\n /**\n * Create a filter that blurs its input by the separate X and Y sigmas. The provided tile mode\n * is used when the blur kernel goes outside the input image.\n *\n * @param sigmaX - The Gaussian sigma value for blurring along the X axis.\n * @param sigmaY - The Gaussian sigma value for blurring along the Y axis.\n * @param mode\n * @param input - if null, it will use the dynamic source image (e.g. a saved layer)\n */\n MakeBlur(\n sigmaX: number,\n sigmaY: number,\n mode: TileMode,\n input: SkImageFilter | null\n ): SkImageFilter;\n\n /**\n * Create a filter that applies the color filter to the input filter results.\n * @param cf\n * @param input - if null, it will use the dynamic source image (e.g. a saved layer)\n */\n MakeColorFilter(\n cf: SkColorFilter,\n input: SkImageFilter | null\n ): SkImageFilter;\n\n /**\n * Create a filter that composes 'inner' with 'outer', such that the results of 'inner' are\n * treated as the source bitmap passed to 'outer'.\n * If either param is null, the other param will be returned.\n * @param outer\n * @param inner - if null, it will use the dynamic source image (e.g. a saved layer)\n */\n MakeCompose(\n outer: SkImageFilter | null,\n inner: SkImageFilter | null\n ): SkImageFilter;\n\n /**\n * Create a filter that draws a drop shadow under the input content.\n * This filter produces an image that includes the inputs' content.\n * @param dx The X offset of the shadow.\n * @param dy\tThe Y offset of the shadow.\n * @param sigmaX\tThe blur radius for the shadow, along the X axis.\n * @param sigmaY\tThe blur radius for the shadow, along the Y axis.\n * @param color\tThe color of the drop shadow.\n * @param input\tThe input filter, or will use the source bitmap if this is null.\n * @param cropRect\tOptional rectangle that crops the input and output.\n */\n MakeDropShadow: (\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ) => SkImageFilter;\n /**\n * Create a filter that renders a drop shadow, in exactly the same manner as ::DropShadow, except\n * that the resulting image does not include the input content.\n * This allows the shadow and input to be composed by a filter DAG in a more flexible manner.\n * @param dx The X offset of the shadow.\n * @param dy\tThe Y offset of the shadow.\n * @param sigmaX\tThe blur radius for the shadow, along the X axis.\n * @param sigmaY\tThe blur radius for the shadow, along the Y axis.\n * @param color\tThe color of the drop shadow.\n * @param input\tThe input filter, or will use the source bitmap if this is null.\n * @param cropRect\tOptional rectangle that crops the input and output.\n */\n MakeDropShadowOnly: (\n dx: number,\n dy: number,\n sigmaX: number,\n sigmaY: number,\n color: SkColor,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ) => SkImageFilter;\n /**\n * Create a filter that erodes each input pixel's channel values to the minimum channel value\n * within the given radii along the x and y axes.\n * @param radiusX The distance to erode along the x axis to either side of each pixel.\n * @param radiusY The distance to erode along the y axis to either side of each pixel.\n * @param input The image filter that is eroded, using source bitmap if this is null.\n * @param cropRect Optional rectangle that crops the input and output.\n */\n MakeErode: (\n rx: number,\n ry: number,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ) => SkImageFilter;\n /**\n * Create a filter that dilates each input pixel's channel values to the max value within the\n * given radii along the x and y axes.\n * @param radiusX The distance to dilate along the x axis to either side of each pixel.\n * @param radiusY The distance to dilate along the y axis to either side of each pixel.\n * @param input The image filter that is dilated, using source bitmap if this is null.\n * @param cropRect Optional rectangle that crops the input and output.\n */\n MakeDilate: (\n rx: number,\n ry: number,\n input: SkImageFilter | null,\n cropRect?: SkRect\n ) => SkImageFilter;\n /**\n * This filter takes an SkBlendMode and uses it to composite the two filters together.\n * @param mode The blend mode that defines the compositing operation\n * @param background The Dst pixels used in blending, if null the source bitmap is used.\n * @param foreground The Src pixels used in blending, if null the source bitmap is used.\n * @cropRect Optional rectangle to crop input and output.\n */\n MakeBlend: (\n mode: BlendMode,\n background: SkImageFilter,\n foreground: SkImageFilter | null,\n cropRect?: SkRect\n ) => SkImageFilter;\n /**\n * Create a filter that fills the output with the per-pixel evaluation of the SkShader produced\n * by the SkRuntimeShaderBuilder. The shader is defined in the image filter's local coordinate\n * system, so it will automatically be affected by SkCanvas' transform.\n *\n * @param builder The builder used to produce the runtime shader, that will in turn\n * fill the result image\n * @param childShaderName The name of the child shader defined in the builder that will be\n * bound to the input param (or the source image if the input param\n * is null). If null the builder can have exactly one child shader,\n * which automatically binds the input param.\n * @param input The image filter that will be provided as input to the runtime\n * shader. If null the implicit source image is used instead\n */\n MakeRuntimeShader: (\n builder: SkRuntimeShaderBuilder,\n childShaderName: string | null,\n input: SkImageFilter | null\n ) => SkImageFilter;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["MaskFilter.ts"],"names":["BlurStyle","isMaskFilter","obj","__typename__"],"mappings":"AAEA,WAAYA,SAAZ;;WAAYA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,KAAAA,S;;AAOZ,OAAO,MAAMC,YAAY,GACvBC,GAD0B,IAEHA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,YAFvD","sourcesContent":["import type { SkJSIInstance } from \"./JsiInstance\";\n\nexport enum BlurStyle {\n Normal, //!< fuzzy inside and outside\n Solid, //!< solid inside, fuzzy outside\n Outer, //!< nothing inside, fuzzy outside\n Inner, //!< fuzzy inside, nothing outside\n}\n\nexport const isMaskFilter = (\n obj: SkJSIInstance<string> | null\n): obj is IMaskFilter => obj !== null && obj.__typename__ === \"MaskFilter\";\n\nexport type IMaskFilter = SkJSIInstance<\"MaskFilter\">;\n\n/**\n * See SkMaskFilter.h for more details.\n */\nexport interface MaskFilterFactory {\n /**\n * Create a blur maskfilter\n * @param style\n * @param sigma - Standard deviation of the Gaussian blur to apply. Must be > 0.\n * @param respectCTM - if true the blur's sigma is modified by the CTM.\n */\n MakeBlur(style: BlurStyle, sigma: number, respectCTM: boolean): IMaskFilter;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["Paint.ts"],"names":["Skia","PaintStyle","StrokeCap","StrokeJoin","SkiaPaint","paint","Paint","setAntiAlias","isPaint","obj","__typename__"],"mappings":"AAOA,SAASA,IAAT,QAAqB,SAArB;AAIA,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAKZ,WAAYC,SAAZ;;WAAYA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;GAAAA,S,KAAAA,S;;AAMZ,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAMZ,OAAO,MAAMC,SAAS,GAAG,MAAM;AAC7B,QAAMC,KAAK,GAAGL,IAAI,CAACM,KAAL,EAAd;AACAD,EAAAA,KAAK,CAACE,YAAN,CAAmB,IAAnB;AACA,SAAOF,KAAP;AACD,CAJM;AAMP,OAAO,MAAMG,OAAO,GAAIC,GAAD,IACrBA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,OADhC","sourcesContent":["import type { SkImageFilter } from \"../ImageFilter\";\nimport type { IMaskFilter } from \"../MaskFilter\";\nimport type { SkColorFilter } from \"../ColorFilter\";\nimport type { SkShader } from \"../Shader\";\nimport type { SkColor } from \"../Color\";\nimport type { IPathEffect } from \"../PathEffect\";\nimport type { SkJSIInstance } from \"../JsiInstance\";\nimport { Skia } from \"../Skia\";\n\nimport type { BlendMode } from \"./BlendMode\";\n\nexport enum PaintStyle {\n Fill,\n Stroke,\n}\n\nexport enum StrokeCap {\n Butt,\n Round,\n Square,\n}\n\nexport enum StrokeJoin {\n Bevel,\n Miter,\n Round,\n}\n\nexport const SkiaPaint = () => {\n const paint = Skia.Paint();\n paint.setAntiAlias(true);\n return paint;\n};\n\nexport const isPaint = (obj: SkJSIInstance<string> | null): obj is SkPaint =>\n obj !== null && obj.__typename__ === \"Paint\";\n\nexport interface SkPaint extends SkJSIInstance<\"Paint\"> {\n /**\n * Returns a copy of this paint.\n */\n copy(): SkPaint;\n\n /**\n * Retrieves the alpha and RGB unpremultiplied. RGB are extended sRGB values\n * (sRGB gamut, and encoded with the sRGB transfer function).\n */\n getColor(): SkColor;\n\n /**\n * Returns the geometry drawn at the beginning and end of strokes.\n */\n getStrokeCap(): StrokeCap;\n\n /**\n * Returns the geometry drawn at the corners of strokes.\n */\n getStrokeJoin(): StrokeJoin;\n\n /**\n * Returns the limit at which a sharp corner is drawn beveled.\n */\n getStrokeMiter(): number;\n\n /**\n * Returns the thickness of the pen used to outline the shape.\n */\n getStrokeWidth(): number;\n\n /**\n * Replaces alpha, leaving RGBA unchanged. 0 means fully transparent, 1.0 means opaque.\n * @param alpha\n */\n setAlphaf(alpha: number): void;\n\n /**\n * Requests, but does not require, that edge pixels draw opaque or with\n * partial transparency.\n * @param aa\n */\n setAntiAlias: (aa: boolean) => void;\n\n /**\n * Sets the blend mode that is, the mode used to combine source color\n * with destination color.\n * @param mode\n */\n setBlendMode: (blendMode: BlendMode) => void;\n\n /**\n * Sets alpha and RGB used when stroking and filling. The color is a 32-bit\n * value, unpremultiplied, packing 8-bit components for alpha, red, blue,\n * and green.\n *\n * @param color unpremultiplied ARGB\n *\n * example: https://fiddle.skia.org/c/@Paint_setColor\n */\n setColor(color: SkColor): void;\n\n /**\n * Sets the current color filter, replacing the existing one if there was one.\n * @param filter\n */\n setColorFilter(filter: SkColorFilter | null): void;\n\n /**\n * Sets the current image filter, replacing the existing one if there was one.\n * @param filter\n */\n setImageFilter(filter: SkImageFilter | null): void;\n\n /**\n * Sets the current mask filter, replacing the existing one if there was one.\n * @param filter\n */\n setMaskFilter(filter: IMaskFilter | null): void;\n\n /**\n * Sets the current path effect, replacing the existing one if there was one.\n * @param effect\n */\n setPathEffect(effect: IPathEffect | null): void;\n\n /**\n * Sets the current shader, replacing the existing one if there was one.\n * @param shader\n */\n setShader(shader: SkShader | null): void;\n\n /**\n * Sets the geometry drawn at the beginning and end of strokes.\n * @param cap\n */\n setStrokeCap(cap: StrokeCap): void;\n\n /**\n * Sets the geometry drawn at the corners of strokes.\n * @param join\n */\n setStrokeJoin(join: StrokeJoin): void;\n\n /**\n * Sets the limit at which a sharp corner is drawn beveled.\n * @param limit\n */\n setStrokeMiter(limit: number): void;\n\n /**\n * Sets the thickness of the pen used to outline the shape.\n * @param width\n */\n setStrokeWidth(width: number): void;\n\n /**\n * Sets whether the geometry is filled or stroked.\n * @param style\n */\n setStyle(style: PaintStyle): void;\n}\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./Paint";
2
- export * from "./BlendMode";
3
- export * from "./usePaint";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAd;AACA,cAAc,aAAd;AACA,cAAc,YAAd","sourcesContent":["export * from \"./Paint\";\nexport * from \"./BlendMode\";\nexport * from \"./usePaint\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["usePaint.ts"],"names":["useMemo","SkiaPaint","usePaint","initializer","deps","p"],"mappings":"AACA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,SAAT,QAA0B,SAA1B;;AAGA;AACA;AACA;AACA,OAAO,MAAMC,QAAQ,GAAG,CACtBC,WADsB,EAEtBC,IAFsB,KAItBJ,OAAO,CAAC,MAAM;AACZ,QAAMK,CAAC,GAAGJ,SAAS,EAAnB;;AACA,MAAIE,WAAJ,EAAiB;AACfA,IAAAA,WAAW,CAACE,CAAD,CAAX;AACD;;AACD,SAAOA,CAAP,CALY,CAMZ;AACD,CAPM,EAOJD,IAPI,CAJF","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport { SkiaPaint } from \"./Paint\";\nimport type { SkPaint } from \"./Paint\";\n\n/**\n * Returns a Skia Paint object\n * */\nexport const usePaint = (\n initializer?: (paint: SkPaint) => void,\n deps?: DependencyList\n) =>\n useMemo(() => {\n const p = SkiaPaint();\n if (initializer) {\n initializer(p);\n }\n return p;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./Path";
2
- export * from "./PathFactory";
3
- export * from "./usePath";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAd;AACA,cAAc,eAAd;AACA,cAAc,WAAd","sourcesContent":["export * from \"./Path\";\nexport * from \"./PathFactory\";\nexport * from \"./usePath\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["usePath.ts"],"names":["useMemo","Skia","usePath","initializer","deps","p","Path","Make","useSvgPath","svgpath","MakeFromSVGString","Error","useTextPath","text","x","y","font","fromText"],"mappings":"AACA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,IAAT,QAAqB,SAArB;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,OAAO,GAAG,CACrBC,WADqB,EAErBC,IAFqB,KAIrBJ,OAAO,CAAC,MAAM;AACZ,QAAMK,CAAC,GAAGJ,IAAI,CAACK,IAAL,CAAUC,IAAV,EAAV;;AACA,MAAIJ,WAAJ,EAAiB;AACfA,IAAAA,WAAW,CAACE,CAAD,CAAX;AACD;;AACD,SAAOA,CAAP,CALY,CAMZ;AACD,CAPM,EAOJ,CAACF,WAAD,EAAcC,IAAd,CAPI,CAJF;AAaP;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMI,UAAU,GAAIC,OAAD,IACxBT,OAAO,CAAC,MAAM;AACZ,QAAMK,CAAC,GAAGJ,IAAI,CAACK,IAAL,CAAUI,iBAAV,CAA4BD,OAA5B,CAAV;;AACA,MAAIJ,CAAC,KAAK,IAAV,EAAgB;AACd,UAAM,IAAIM,KAAJ,CAAW,qBAAoBF,OAAQ,EAAvC,CAAN;AACD;;AACD,SAAOJ,CAAP;AACD,CANM,EAMJ,CAACI,OAAD,CANI,CADF;AASP;AACA;AACA;AACA;AACA;;AACA,OAAO,MAAMG,WAAW,GAAG,CAACC,IAAD,EAAeC,CAAf,EAA0BC,CAA1B,EAAqCC,IAArC,KACzBd,OAAO,CACJG,CAAD,IAAO;AACLA,EAAAA,CAAC,CAACY,QAAF,CAAWJ,IAAX,EAAiBC,CAAjB,EAAoBC,CAApB,EAAuBC,IAAvB;AACD,CAHI,EAIL,CAACH,IAAD,EAAOC,CAAP,EAAUC,CAAV,EAAaC,IAAb,CAJK,CADF","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport type { SkFont } from \"../Font\";\nimport { Skia } from \"../Skia\";\n\nimport type { SkPath } from \"./Path\";\n\n/**\n * Memoizes and returns a Skia Path object with optional initializer\n * @param initializer\n * @param deps\n * @returns\n */\nexport const usePath = (\n initializer?: (path: SkPath) => void,\n deps?: DependencyList\n) =>\n useMemo(() => {\n const p = Skia.Path.Make();\n if (initializer) {\n initializer(p);\n }\n return p;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [initializer, deps]);\n\n/**\n * Initializes a Skia Path from an svg path string\n * @param svgpath\n * @returns\n */\n// MakeFromSVGString\nexport const useSvgPath = (svgpath: string) =>\n useMemo(() => {\n const p = Skia.Path.MakeFromSVGString(svgpath);\n if (p === null) {\n throw new Error(`Invalid SVG path: ${svgpath}`);\n }\n return p;\n }, [svgpath]);\n\n/**\n * Initializes a Skia Path from a text string\n * @param svgpath\n * @returns\n */\nexport const useTextPath = (text: string, x: number, y: number, font: SkFont) =>\n usePath(\n (p) => {\n p.fromText(text, x, y, font);\n },\n [text, x, y, font]\n );\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["PathEffect.ts"],"names":["isPathEffect","obj","__typename__","Path1DEffectStyle"],"mappings":"AAMA,OAAO,MAAMA,YAAY,GACvBC,GAD0B,IAEHA,GAAG,KAAK,IAAR,IAAgBA,GAAG,CAACC,YAAJ,KAAqB,YAFvD;AAIP,WAAYC,iBAAZ;;WAAYA,iB;AAAAA,EAAAA,iB,CAAAA,iB;AAAAA,EAAAA,iB,CAAAA,iB;AAAAA,EAAAA,iB,CAAAA,iB;GAAAA,iB,KAAAA,iB","sourcesContent":["import type { SkJSIInstance } from \"./JsiInstance\";\nimport type { SkPath } from \"./Path/Path\";\nimport type { SkMatrix } from \"./Matrix\";\n\nexport type IPathEffect = SkJSIInstance<\"PathEffect\">;\n\nexport const isPathEffect = (\n obj: SkJSIInstance<string> | null\n): obj is IPathEffect => obj !== null && obj.__typename__ === \"PathEffect\";\n\nexport enum Path1DEffectStyle {\n Translate,\n Rotate,\n Morph,\n}\n\nexport interface PathEffectFactory {\n /**\n * Returns a PathEffect that can turn sharp corners into rounded corners.\n * @param radius - if <=0, returns null\n */\n MakeCorner(radius: number): IPathEffect | null;\n\n /**\n * Returns a PathEffect that add dashes to the path.\n *\n * See SkDashPathEffect.h for more details.\n *\n * @param intervals - even number of entries with even indicies specifying the length of\n * the \"on\" intervals, and the odd indices specifying the length of \"off\".\n * @param phase - offset length into the intervals array. Defaults to 0.\n */\n MakeDash(intervals: number[], phase?: number): IPathEffect;\n\n /**\n * Returns a PathEffect that breaks path into segments of segLength length, and randomly move\n * the endpoints away from the original path by a maximum of deviation.\n * @param segLength - length of the subsegments.\n * @param dev - limit of the movement of the endpoints.\n * @param seedAssist - modifies the randomness. See SkDiscretePathEffect.h for more.\n */\n MakeDiscrete(segLength: number, dev: number, seedAssist: number): IPathEffect;\n\n /**\n *\n * A pathEffect whose effect is to apply first the inner pathEffect and the the\n * outer pathEffect (i.e. outer(inner(path))).\n *\n */\n MakeCompose(outer: IPathEffect, inner: IPathEffect): IPathEffect;\n\n /**\n *\n * A pathEffect pathEffect whose effect is to apply two effects,\n * in sequence (i.e. first(path) + second(path)).\n *\n */\n MakeSum(outer: IPathEffect, inner: IPathEffect): IPathEffect;\n\n /**\n * Returns a PathEffect that will fill the drawing path with a pattern made by applying\n * the given matrix to a repeating set of infinitely long lines of the given width.\n * For example, the scale of the provided matrix will determine how far apart the lines\n * should be drawn its rotation affects the lines' orientation.\n * @param width - must be >= 0\n * @param matrix\n */\n MakeLine2D(width: number, matrix: SkMatrix): IPathEffect | null;\n\n /**\n * Returns a PathEffect which implements dashing by replicating the specified path.\n * @param path The path to replicate (dash)\n * @param advance The space between instances of path\n * @param phase distance (mod advance) along path for its initial position\n * @param style how to transform path at each point (based on the current\n * position and tangent)\n */\n MakePath1D(\n path: SkPath,\n advance: number,\n phase: number,\n style: Path1DEffectStyle\n ): IPathEffect | null;\n\n /**\n * Returns a PathEffect that will fill the drawing path with a pattern by repeating the\n * given path according to the provided matrix. For example, the scale of the matrix\n * determines how far apart the path instances should be drawn.\n * @param matrix\n * @param path\n */\n MakePath2D(matrix: SkMatrix, path: SkPath): IPathEffect | null;\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAd;AACA,cAAc,mBAAd;AACA,cAAc,cAAd;AACA,cAAc,kBAAd","sourcesContent":["export * from \"./Picture\";\nexport * from \"./PictureRecorder\";\nexport * from \"./usePicture\";\nexport * from \"./PictureFactory\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["usePicture.ts"],"names":["useMemo","Skia","usePicture","rect","cb","deps","recorder","PictureRecorder","canvas","beginRecording","finishRecordingAsPicture"],"mappings":"AACA,SAASA,OAAT,QAAwB,OAAxB;AAIA,SAASC,IAAT,QAAqB,SAArB;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,UAAU,GAAG,UACxBC,IADwB,EAExBC,EAFwB,EAIV;AAAA,MADdC,IACc,uEADS,EACT;AACd,SAAOL,OAAO,CAAC,MAAM;AACnB,UAAMM,QAAQ,GAAGL,IAAI,CAACM,eAAL,EAAjB;AACA,UAAMC,MAAM,GAAGF,QAAQ,CAACG,cAAT,CAAwBN,IAAxB,CAAf;AACAC,IAAAA,EAAE,CAACI,MAAD,CAAF;AACA,WAAOF,QAAQ,CAACI,wBAAT,EAAP,CAJmB,CAKnB;AACD,GANa,EAMX,CAACN,EAAD,EAAKD,IAAL,EAAWE,IAAX,CANW,CAAd;AAOD,CAZM","sourcesContent":["import type { DependencyList } from \"react\";\nimport { useMemo } from \"react\";\n\nimport type { SkCanvas } from \"../Canvas\";\nimport type { SkRect } from \"../Rect\";\nimport { Skia } from \"../Skia\";\n\nimport type { SkPicture } from \"./Picture\";\n\n/**\n * Memoizes and returns an SkPicture that can be drawn to another canvas.\n * @param rect Picture bounds\n * @param cb Callback for drawing to the canvas\n * @returns SkPicture\n */\nexport const usePicture = (\n rect: SkRect,\n cb: (canvas: SkCanvas) => void,\n deps: DependencyList = []\n): SkPicture => {\n return useMemo(() => {\n const recorder = Skia.PictureRecorder();\n const canvas = recorder.beginRecording(rect);\n cb(canvas);\n return recorder.finishRecordingAsPicture();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [cb, rect, deps]);\n};\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./SVG";
2
- export * from "./SVGFactory";
3
- export * from "./useSvg";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,OAAd;AACA,cAAc,cAAd;AACA,cAAc,UAAd","sourcesContent":["export * from \"./SVG\";\nexport * from \"./SVGFactory\";\nexport * from \"./useSvg\";\n"]}
@@ -1,4 +0,0 @@
1
- import { Skia } from "../Skia";
2
- import { useRawData } from "../Data/Data";
3
- export const useSVG = source => useRawData(source, Skia.SVG.MakeFromData);
4
- //# sourceMappingURL=useSvg.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useSvg.ts"],"names":["Skia","useRawData","useSVG","source","SVG","MakeFromData"],"mappings":"AAAA,SAASA,IAAT,QAAqB,SAArB;AAEA,SAASC,UAAT,QAA2B,cAA3B;AAEA,OAAO,MAAMC,MAAM,GAAIC,MAAD,IACpBF,UAAU,CAACE,MAAD,EAASH,IAAI,CAACI,GAAL,CAASC,YAAlB,CADL","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { DataSource } from \"../Data/Data\";\nimport { useRawData } from \"../Data/Data\";\n\nexport const useSVG = (source: DataSource) =>\n useRawData(source, Skia.SVG.MakeFromData);\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./Shader";
2
- export * from "./ShaderFactory";
3
- export * from "./useShader";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAd;AACA,cAAc,iBAAd;AACA,cAAc,aAAd","sourcesContent":["export * from \"./Shader\";\nexport * from \"./ShaderFactory\";\nexport * from \"./useShader\";\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useShader.ts"],"names":["useMemo","Skia","useShader","sksl","console","warn","RuntimeEffect","Make"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,IAAT,QAAqB,SAArB;AAEA,OAAO,MAAMC,SAAS,GAAIC,IAAD,IACvBH,OAAO,CAAC,MAAM;AACZI,EAAAA,OAAO,CAACC,IAAR,CAAa,gCAAb;AACA,SAAOJ,IAAI,CAACK,aAAL,CAAmBC,IAAnB,CAAwBJ,IAAxB,CAAP;AACD,CAHM,EAGJ,CAACA,IAAD,CAHI,CADF","sourcesContent":["import { useMemo } from \"react\";\n\nimport { Skia } from \"../Skia\";\n\nexport const useShader = (sksl: string) =>\n useMemo(() => {\n console.warn(\"Use shader will be deprecated.\");\n return Skia.RuntimeEffect.Make(sksl);\n }, [sksl]);\n"]}
@@ -1,2 +0,0 @@
1
- import "./NativeSetup";
2
- //# sourceMappingURL=SkiaApi.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["SkiaApi.ts"],"names":[],"mappings":"AAqBA,OAAO,eAAP","sourcesContent":["import type { ImageFilterFactory } from \"./ImageFilter\";\nimport type { PathFactory } from \"./Path\";\nimport type { ColorFilterFactory } from \"./ColorFilter\";\nimport type { SkFont } from \"./Font\";\nimport type { SkTypeface, TypefaceFactory } from \"./Typeface\";\nimport type { ImageFactory } from \"./Image\";\nimport type { MaskFilterFactory } from \"./MaskFilter\";\nimport type { SkPaint } from \"./Paint\";\nimport type { SkRect } from \"./Rect\";\nimport type { SkRRect } from \"./RRect\";\nimport type { RuntimeEffectFactory } from \"./RuntimeEffect\";\nimport type { ShaderFactory } from \"./Shader\";\nimport type { SkMatrix } from \"./Matrix\";\nimport type { PathEffectFactory } from \"./PathEffect\";\nimport type { SkPoint } from \"./Point\";\nimport type { SkVertices, VertexMode } from \"./Vertices/Vertices\";\nimport type { DataFactory } from \"./Data\";\nimport type { SVGFactory } from \"./SVG\";\nimport type { TextBlobFactory } from \"./TextBlob\";\nimport type { FontMgrFactory } from \"./FontMgr/FontMgrFactory\";\nimport type { SurfaceFactory } from \"./Surface\";\nimport \"./NativeSetup\";\nimport type { SkRSXform } from \"./RSXform\";\nimport type { SkPath } from \"./Path/Path\";\nimport type { SkContourMeasureIter } from \"./ContourMeasure\";\nimport type { PictureFactory, SkPictureRecorder } from \"./Picture\";\nimport type { Color, SkColor } from \"./Color\";\nimport type {\n SkRuntimeShaderBuilder,\n SkRuntimeEffect,\n} from \"./RuntimeEffect/RuntimeEffect\";\n\n/**\n * Declares the interface for the native Skia API\n */\nexport interface SkiaApi {\n Point: (x: number, y: number) => SkPoint;\n XYWHRect: (x: number, y: number, width: number, height: number) => SkRect;\n RuntimeShaderBuilder: (rt: SkRuntimeEffect) => SkRuntimeShaderBuilder;\n RRectXY: (rect: SkRect, rx: number, ry: number) => SkRRect;\n RSXform: (scos: number, ssin: number, tx: number, ty: number) => SkRSXform;\n Color: (color: Color) => SkColor;\n parseColorString: (color: string) => SkColor | undefined;\n ContourMeasureIter: (\n path: SkPath,\n forceClosed: boolean,\n resScale: number\n ) => SkContourMeasureIter;\n Paint: () => SkPaint;\n PictureRecorder: () => SkPictureRecorder;\n Picture: PictureFactory;\n Path: PathFactory;\n Matrix: () => SkMatrix;\n ColorFilter: ColorFilterFactory;\n Font: (typeface?: SkTypeface, size?: number) => SkFont;\n Typeface: TypefaceFactory;\n MaskFilter: MaskFilterFactory;\n RuntimeEffect: RuntimeEffectFactory;\n ImageFilter: ImageFilterFactory;\n Shader: ShaderFactory;\n PathEffect: PathEffectFactory;\n /**\n * Returns an Vertices based on the given positions and optional parameters.\n * See SkVertices.h (especially the Builder) for more details.\n * @param mode\n * @param positions\n * @param textureCoordinates\n * @param colors - either a list of int colors or a flattened color array.\n * @param indices\n * @param isVolatile\n */\n MakeVertices(\n mode: VertexMode,\n positions: SkPoint[],\n textureCoordinates?: SkPoint[] | null,\n colors?: SkColor[],\n indices?: number[] | null,\n isVolatile?: boolean\n ): SkVertices;\n Data: DataFactory;\n Image: ImageFactory;\n SVG: SVGFactory;\n FontMgr: FontMgrFactory;\n TextBlob: TextBlobFactory;\n Surface: SurfaceFactory;\n}\n"]}
@@ -1,4 +0,0 @@
1
- export * from "./Typeface";
2
- export * from "./useTypeface";
3
- export * from "./TypefaceFactory";
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAd;AACA,cAAc,eAAd;AACA,cAAc,mBAAd","sourcesContent":["export * from \"./Typeface\";\nexport * from \"./useTypeface\";\nexport * from \"./TypefaceFactory\";\n"]}
@@ -1,8 +0,0 @@
1
- import { Skia } from "../Skia";
2
- import { useRawData } from "../Data/Data";
3
- /**
4
- * Returns a Skia Typeface object
5
- * */
6
-
7
- export const useTypeface = source => useRawData(source, Skia.Typeface.MakeFreeTypeFaceFromData);
8
- //# sourceMappingURL=useTypeface.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["useTypeface.ts"],"names":["Skia","useRawData","useTypeface","source","Typeface","MakeFreeTypeFaceFromData"],"mappings":"AAAA,SAASA,IAAT,QAAqB,SAArB;AAEA,SAASC,UAAT,QAA2B,cAA3B;AAEA;AACA;AACA;;AACA,OAAO,MAAMC,WAAW,GAAIC,MAAD,IACzBF,UAAU,CAACE,MAAD,EAASH,IAAI,CAACI,QAAL,CAAcC,wBAAvB,CADL","sourcesContent":["import { Skia } from \"../Skia\";\nimport type { DataSource } from \"../Data/Data\";\nimport { useRawData } from \"../Data/Data\";\n\n/**\n * Returns a Skia Typeface object\n * */\nexport const useTypeface = (source: DataSource) =>\n useRawData(source, Skia.Typeface.MakeFreeTypeFaceFromData);\n"]}
@@ -1,9 +0,0 @@
1
- import type { DependencyList } from "react";
2
- import type { SkJSIInstance } from "../JsiInstance";
3
- export declare type Data = SkJSIInstance<"Data">;
4
- declare type Require = number;
5
- export declare type DataSource = Require | string | Uint8Array;
6
- export declare const useDataCollection: <T>(sources: DataSource[], factory: (data: Data[]) => T, deps?: DependencyList) => T | null;
7
- export declare const useRawData: <T>(source: DataSource, factory: (data: Data) => T) => T | null;
8
- export declare const useData: (source: DataSource) => Data | null;
9
- export {};
@@ -1,2 +0,0 @@
1
- export * from "./Font";
2
- export * from "./useFont";
@@ -1,6 +0,0 @@
1
- import type { DataSource } from "../Data";
2
- import type { SkFont } from "./Font";
3
- /**
4
- * Returns a Skia Font object
5
- * */
6
- export declare const useFont: (font: DataSource, size?: number | undefined) => SkFont | null;
@@ -1,5 +0,0 @@
1
- import type { DataSource } from "../Data/Data";
2
- /**
3
- * Returns a Skia Image object
4
- * */
5
- export declare const useImage: (source: DataSource) => import("./Image").SkImage | null;
@@ -1,2 +0,0 @@
1
- import type { DataSource } from "../Data/Data";
2
- export declare const useSVG: (source: DataSource) => import("./SVG").SkSVG | null;
@@ -1,5 +0,0 @@
1
- import type { DataSource } from "../Data/Data";
2
- /**
3
- * Returns a Skia Typeface object
4
- * */
5
- export declare const useTypeface: (source: DataSource) => import("./Typeface").SkTypeface | null;
@@ -1,61 +0,0 @@
1
- import type { DependencyList } from "react";
2
- import { useEffect, useState } from "react";
3
- import { Image } from "react-native";
4
-
5
- import type { SkJSIInstance } from "../JsiInstance";
6
- import { Skia } from "../Skia";
7
-
8
- export type Data = SkJSIInstance<"Data">;
9
-
10
- type Require = number;
11
- export type DataSource = Require | string | Uint8Array;
12
-
13
- export const useDataCollection = <T>(
14
- sources: DataSource[],
15
- factory: (data: Data[]) => T,
16
- deps: DependencyList = []
17
- ) => {
18
- const [data, setData] = useState<T | null>(null);
19
- useEffect(() => {
20
- const bytesOrURIs = sources.map((source) => {
21
- if (source instanceof Uint8Array) {
22
- return source;
23
- }
24
- return typeof source === "string"
25
- ? source
26
- : Image.resolveAssetSource(source).uri;
27
- });
28
- Promise.all(
29
- bytesOrURIs.map((bytesOrURI) =>
30
- bytesOrURI instanceof Uint8Array
31
- ? Skia.Data.fromBytes(bytesOrURI)
32
- : Skia.Data.fromURI(bytesOrURI)
33
- )
34
- ).then((d) => setData(factory(d)));
35
- // eslint-disable-next-line react-hooks/exhaustive-deps
36
- }, deps);
37
- return data;
38
- };
39
-
40
- export const useRawData = <T>(
41
- source: DataSource,
42
- factory: (data: Data) => T
43
- ) => {
44
- const [data, setData] = useState<T | null>(null);
45
- useEffect(() => {
46
- if (source instanceof Uint8Array) {
47
- setData(factory(Skia.Data.fromBytes(source)));
48
- } else {
49
- const uri =
50
- typeof source === "string"
51
- ? source
52
- : Image.resolveAssetSource(source).uri;
53
- Skia.Data.fromURI(uri).then((d) => setData(factory(d)));
54
- }
55
- }, [factory, source]);
56
- return data;
57
- };
58
-
59
- const identity = (data: Data) => data;
60
-
61
- export const useData = (source: DataSource) => useRawData(source, identity);
@@ -1,2 +0,0 @@
1
- export * from "./Font";
2
- export * from "./useFont";
@@ -1,9 +0,0 @@
1
- import type { DataSource } from "../Data/Data";
2
- import { useRawData } from "../Data/Data";
3
- import { Skia } from "../Skia";
4
-
5
- /**
6
- * Returns a Skia Image object
7
- * */
8
- export const useImage = (source: DataSource) =>
9
- useRawData(source, Skia.MakeImageFromEncoded);
@@ -1,6 +0,0 @@
1
- import { Skia } from "../Skia";
2
- import type { DataSource } from "../Data/Data";
3
- import { useRawData } from "../Data/Data";
4
-
5
- export const useSVG = (source: DataSource) =>
6
- useRawData(source, Skia.SVG.MakeFromData);
@@ -1,9 +0,0 @@
1
- import { Skia } from "../Skia";
2
- import type { DataSource } from "../Data/Data";
3
- import { useRawData } from "../Data/Data";
4
-
5
- /**
6
- * Returns a Skia Typeface object
7
- * */
8
- export const useTypeface = (source: DataSource) =>
9
- useRawData(source, Skia.Typeface.MakeFreeTypeFaceFromData);