@shopify/react-native-skia 0.1.160 → 0.1.163

Sign up to get free protection for your applications and to get access to all the features.
Files changed (124) hide show
  1. package/android/CMakeLists.txt +9 -9
  2. package/android/cpp/rnskia-android/RNSkAndroidPlatformContext.h +2 -0
  3. package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp +2 -2
  4. package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.h +2 -2
  5. package/android/cpp/rnskia-android/SkiaOpenGLRenderer.h +5 -5
  6. package/cpp/api/JsiSkCanvas.h +8 -8
  7. package/cpp/api/JsiSkColor.h +1 -1
  8. package/cpp/api/JsiSkColorFilter.h +1 -1
  9. package/cpp/api/JsiSkColorFilterFactory.h +2 -2
  10. package/cpp/api/JsiSkContourMeasure.h +1 -1
  11. package/cpp/api/JsiSkContourMeasureIter.h +2 -2
  12. package/cpp/api/JsiSkData.h +2 -2
  13. package/cpp/api/JsiSkDataFactory.h +1 -1
  14. package/cpp/api/JsiSkFont.h +2 -2
  15. package/cpp/api/JsiSkImage.h +3 -3
  16. package/cpp/api/JsiSkImageFilter.h +1 -1
  17. package/cpp/api/JsiSkImageFilterFactory.h +1 -1
  18. package/cpp/api/JsiSkImageInfo.h +1 -1
  19. package/cpp/api/JsiSkMaskFilter.h +1 -1
  20. package/cpp/api/JsiSkMaskFilterFactory.h +1 -1
  21. package/cpp/api/JsiSkMatrix.h +1 -1
  22. package/cpp/api/JsiSkPaint.h +1 -1
  23. package/cpp/api/JsiSkPath.h +15 -15
  24. package/cpp/api/JsiSkPathEffect.h +1 -1
  25. package/cpp/api/JsiSkPathEffectFactory.h +4 -4
  26. package/cpp/api/JsiSkPathFactory.h +2 -2
  27. package/cpp/api/JsiSkPicture.h +1 -1
  28. package/cpp/api/JsiSkPictureFactory.h +2 -2
  29. package/cpp/api/JsiSkPictureRecorder.h +2 -2
  30. package/cpp/api/JsiSkPoint.h +1 -1
  31. package/cpp/api/JsiSkRRect.h +1 -1
  32. package/cpp/api/JsiSkRSXform.h +1 -1
  33. package/cpp/api/JsiSkRect.h +1 -1
  34. package/cpp/api/JsiSkRuntimeEffect.h +1 -1
  35. package/cpp/api/JsiSkRuntimeShaderBuilder.h +1 -1
  36. package/cpp/api/JsiSkSVGFactory.h +1 -1
  37. package/cpp/api/JsiSkShader.h +2 -2
  38. package/cpp/api/JsiSkShaderFactory.h +3 -3
  39. package/cpp/api/JsiSkSurface.h +1 -1
  40. package/cpp/api/JsiSkSurfaceFactory.h +2 -2
  41. package/cpp/api/JsiSkTextBlob.h +1 -1
  42. package/cpp/api/JsiSkTextBlobFactory.h +1 -1
  43. package/cpp/api/JsiSkTypeface.h +2 -2
  44. package/cpp/api/JsiSkVertices.h +1 -1
  45. package/cpp/rnskia/RNSkDomView.cpp +1 -2
  46. package/cpp/rnskia/RNSkJsView.h +3 -3
  47. package/cpp/rnskia/RNSkPictureView.h +3 -3
  48. package/cpp/rnskia/RNSkPlatformContext.h +5 -3
  49. package/cpp/rnskia/RNSkView.h +2 -2
  50. package/cpp/rnskia/dom/nodes/JsiBlendNode.h +6 -7
  51. package/cpp/rnskia/dom/nodes/JsiColorFilterNodes.h +1 -1
  52. package/cpp/rnskia/dom/nodes/JsiPathNode.h +10 -8
  53. package/cpp/rnskia/dom/props/BlendModeProp.h +2 -2
  54. package/cpp/rnskia/dom/props/PaintProps.h +5 -1
  55. package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +8 -7
  56. package/ios/RNSkia-iOS/RNSkiOSPlatformContext.h +2 -1
  57. package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +4 -4
  58. package/ios/RNSkia-iOS/SkiaManager.mm +5 -5
  59. package/ios/RNSkia-iOS/SkiaPictureViewManager.mm +3 -3
  60. package/ios/RNSkia-iOS/SkiaUIView.mm +10 -10
  61. package/lib/commonjs/renderer/Canvas.js +2 -11
  62. package/lib/commonjs/renderer/Canvas.js.map +1 -1
  63. package/lib/commonjs/renderer/Container.js +2 -1
  64. package/lib/commonjs/renderer/Container.js.map +1 -1
  65. package/lib/commonjs/renderer/components/Mask.js +11 -25
  66. package/lib/commonjs/renderer/components/Mask.js.map +1 -1
  67. package/lib/commonjs/renderer/index.js +0 -13
  68. package/lib/commonjs/renderer/index.js.map +1 -1
  69. package/lib/module/renderer/Canvas.js +3 -10
  70. package/lib/module/renderer/Canvas.js.map +1 -1
  71. package/lib/module/renderer/Container.js +2 -1
  72. package/lib/module/renderer/Container.js.map +1 -1
  73. package/lib/module/renderer/components/Mask.js +9 -21
  74. package/lib/module/renderer/components/Mask.js.map +1 -1
  75. package/lib/module/renderer/index.js +0 -1
  76. package/lib/module/renderer/index.js.map +1 -1
  77. package/lib/typescript/src/renderer/Container.d.ts +1 -1
  78. package/lib/typescript/src/renderer/index.d.ts +0 -1
  79. package/libs/android/arm64-v8a/libskottie.a +0 -0
  80. package/libs/android/arm64-v8a/libskshaper.a +0 -0
  81. package/libs/android/armeabi-v7a/libskottie.a +0 -0
  82. package/libs/android/armeabi-v7a/libskshaper.a +0 -0
  83. package/libs/android/x86/libskottie.a +0 -0
  84. package/libs/android/x86/libskshaper.a +0 -0
  85. package/libs/android/x86_64/libskottie.a +0 -0
  86. package/libs/android/x86_64/libskshaper.a +0 -0
  87. package/libs/ios/libskia.xcframework/Info.plist +5 -5
  88. package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
  89. package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
  90. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
  91. package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
  92. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
  93. package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
  94. package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
  95. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
  96. package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
  97. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
  98. package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
  99. package/package.json +9 -4
  100. package/react-native-skia.podspec +2 -2
  101. package/src/renderer/Canvas.tsx +2 -12
  102. package/src/renderer/Container.tsx +1 -1
  103. package/src/renderer/components/Mask.tsx +11 -20
  104. package/src/renderer/index.ts +0 -1
  105. package/lib/commonjs/renderer/useCanvas.js +0 -32
  106. package/lib/commonjs/renderer/useCanvas.js.map +0 -1
  107. package/lib/module/renderer/useCanvas.js +0 -15
  108. package/lib/module/renderer/useCanvas.js.map +0 -1
  109. package/lib/typescript/src/renderer/useCanvas.d.ts +0 -9
  110. package/libs/android/arm64-v8a/libskparagraph.a +0 -0
  111. package/libs/android/arm64-v8a/libskunicode.a +0 -0
  112. package/libs/android/armeabi-v7a/libskparagraph.a +0 -0
  113. package/libs/android/armeabi-v7a/libskunicode.a +0 -0
  114. package/libs/android/x86/libskparagraph.a +0 -0
  115. package/libs/android/x86/libskunicode.a +0 -0
  116. package/libs/android/x86_64/libskparagraph.a +0 -0
  117. package/libs/android/x86_64/libskunicode.a +0 -0
  118. package/libs/ios/libskparagraph.xcframework/Info.plist +0 -42
  119. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
  120. package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
  121. package/libs/ios/libskunicode.xcframework/Info.plist +0 -42
  122. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
  123. package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
  124. package/src/renderer/useCanvas.ts +0 -21
@@ -1,42 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>AvailableLibraries</key>
6
- <array>
7
- <dict>
8
- <key>LibraryIdentifier</key>
9
- <string>ios-arm64_arm64e</string>
10
- <key>LibraryPath</key>
11
- <string>libskunicode.a</string>
12
- <key>SupportedArchitectures</key>
13
- <array>
14
- <string>arm64</string>
15
- <string>arm64e</string>
16
- </array>
17
- <key>SupportedPlatform</key>
18
- <string>ios</string>
19
- </dict>
20
- <dict>
21
- <key>LibraryIdentifier</key>
22
- <string>ios-arm64_arm64e_x86_64-simulator</string>
23
- <key>LibraryPath</key>
24
- <string>libskunicode.a</string>
25
- <key>SupportedArchitectures</key>
26
- <array>
27
- <string>arm64</string>
28
- <string>arm64e</string>
29
- <string>x86_64</string>
30
- </array>
31
- <key>SupportedPlatform</key>
32
- <string>ios</string>
33
- <key>SupportedPlatformVariant</key>
34
- <string>simulator</string>
35
- </dict>
36
- </array>
37
- <key>CFBundlePackageType</key>
38
- <string>XFWK</string>
39
- <key>XCFrameworkFormatVersion</key>
40
- <string>1.0</string>
41
- </dict>
42
- </plist>
@@ -1,21 +0,0 @@
1
- import React, { useContext } from "react";
2
-
3
- import type { Skia } from "../skia/types";
4
-
5
- interface CanvasContext {
6
- Skia: Skia;
7
- }
8
-
9
- const CanvasContext = React.createContext<CanvasContext | null>(null);
10
-
11
- export const CanvasProvider = CanvasContext.Provider;
12
-
13
- // This private function will be removed once we remove the useCanvas hook and
14
- // implement the Mask component as a node (will be faster too)
15
- export const useSkiaPrivate = () => {
16
- const ctx = useContext(CanvasContext);
17
- if (!ctx) {
18
- throw new Error("Skia Canvas context is not available");
19
- }
20
- return ctx.Skia;
21
- };