@shopify/react-native-skia 1.3.3 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/android/cpp/jni/JniPlatformContext.cpp +4 -3
  2. package/cpp/rnskia/RNSkJsiViewApi.h +25 -67
  3. package/cpp/rnskia/RNSkManager.cpp +1 -1
  4. package/cpp/rnskia/RNSkView.h +0 -11
  5. package/lib/commonjs/external/reanimated/useAnimatedImageValue.d.ts +1 -1
  6. package/lib/commonjs/external/reanimated/useAnimatedImageValue.js.map +1 -1
  7. package/lib/commonjs/external/reanimated/useVideo.js +22 -9
  8. package/lib/commonjs/external/reanimated/useVideo.js.map +1 -1
  9. package/lib/commonjs/external/reanimated/useVideoLoading.d.ts +4 -0
  10. package/lib/commonjs/external/reanimated/useVideoLoading.js +28 -0
  11. package/lib/commonjs/external/reanimated/useVideoLoading.js.map +1 -0
  12. package/lib/commonjs/external/reanimated/useVideoLoading.web.d.ts +4 -0
  13. package/lib/commonjs/external/reanimated/useVideoLoading.web.js +20 -0
  14. package/lib/commonjs/external/reanimated/useVideoLoading.web.js.map +1 -0
  15. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.d.ts +3 -1
  16. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.js +4 -2
  17. package/lib/commonjs/skia/types/NativeBuffer/NativeBufferFactory.js.map +1 -1
  18. package/lib/commonjs/skia/types/Skia.d.ts +1 -1
  19. package/lib/commonjs/skia/types/Skia.js.map +1 -1
  20. package/lib/commonjs/skia/web/CanvasKitWebGLBufferImpl.d.ts +9 -0
  21. package/lib/commonjs/skia/web/CanvasKitWebGLBufferImpl.js +30 -0
  22. package/lib/commonjs/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -0
  23. package/lib/commonjs/skia/web/JsiSkImageFactory.js +8 -2
  24. package/lib/commonjs/skia/web/JsiSkImageFactory.js.map +1 -1
  25. package/lib/commonjs/skia/web/JsiSkia.js +2 -3
  26. package/lib/commonjs/skia/web/JsiSkia.js.map +1 -1
  27. package/lib/commonjs/skia/web/JsiVideo.d.ts +24 -0
  28. package/lib/commonjs/skia/web/JsiVideo.js +83 -0
  29. package/lib/commonjs/skia/web/JsiVideo.js.map +1 -0
  30. package/lib/commonjs/views/SkiaDomView.js +3 -1
  31. package/lib/commonjs/views/SkiaDomView.js.map +1 -1
  32. package/lib/commonjs/views/SkiaDomView.web.js +2 -0
  33. package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
  34. package/lib/commonjs/views/SkiaJSDomView.js +3 -1
  35. package/lib/commonjs/views/SkiaJSDomView.js.map +1 -1
  36. package/lib/commonjs/views/SkiaPictureView.js +1 -1
  37. package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
  38. package/lib/commonjs/views/types.d.ts +0 -8
  39. package/lib/commonjs/views/types.js +0 -3
  40. package/lib/commonjs/views/types.js.map +1 -1
  41. package/lib/module/external/reanimated/useAnimatedImageValue.d.ts +1 -1
  42. package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
  43. package/lib/module/external/reanimated/useVideo.js +22 -9
  44. package/lib/module/external/reanimated/useVideo.js.map +1 -1
  45. package/lib/module/external/reanimated/useVideoLoading.d.ts +4 -0
  46. package/lib/module/external/reanimated/useVideoLoading.js +20 -0
  47. package/lib/module/external/reanimated/useVideoLoading.js.map +1 -0
  48. package/lib/module/external/reanimated/useVideoLoading.web.d.ts +4 -0
  49. package/lib/module/external/reanimated/useVideoLoading.web.js +13 -0
  50. package/lib/module/external/reanimated/useVideoLoading.web.js.map +1 -0
  51. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.d.ts +3 -1
  52. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.js +2 -1
  53. package/lib/module/skia/types/NativeBuffer/NativeBufferFactory.js.map +1 -1
  54. package/lib/module/skia/types/Skia.d.ts +1 -1
  55. package/lib/module/skia/types/Skia.js.map +1 -1
  56. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +9 -0
  57. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js +23 -0
  58. package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -0
  59. package/lib/module/skia/web/JsiSkImageFactory.js +9 -3
  60. package/lib/module/skia/web/JsiSkImageFactory.js.map +1 -1
  61. package/lib/module/skia/web/JsiSkia.js +2 -3
  62. package/lib/module/skia/web/JsiSkia.js.map +1 -1
  63. package/lib/module/skia/web/JsiVideo.d.ts +24 -0
  64. package/lib/module/skia/web/JsiVideo.js +75 -0
  65. package/lib/module/skia/web/JsiVideo.js.map +1 -0
  66. package/lib/module/views/SkiaDomView.js +3 -1
  67. package/lib/module/views/SkiaDomView.js.map +1 -1
  68. package/lib/module/views/SkiaDomView.web.js +2 -0
  69. package/lib/module/views/SkiaDomView.web.js.map +1 -1
  70. package/lib/module/views/SkiaJSDomView.js +3 -1
  71. package/lib/module/views/SkiaJSDomView.js.map +1 -1
  72. package/lib/module/views/SkiaPictureView.js +1 -1
  73. package/lib/module/views/SkiaPictureView.js.map +1 -1
  74. package/lib/module/views/types.d.ts +0 -8
  75. package/lib/module/views/types.js +0 -4
  76. package/lib/module/views/types.js.map +1 -1
  77. package/lib/typescript/src/external/reanimated/useAnimatedImageValue.d.ts +1 -1
  78. package/lib/typescript/src/external/reanimated/useVideoLoading.d.ts +4 -0
  79. package/lib/typescript/src/external/reanimated/useVideoLoading.web.d.ts +4 -0
  80. package/lib/typescript/src/skia/types/NativeBuffer/NativeBufferFactory.d.ts +3 -1
  81. package/lib/typescript/src/skia/types/Skia.d.ts +1 -1
  82. package/lib/typescript/src/skia/web/CanvasKitWebGLBufferImpl.d.ts +9 -0
  83. package/lib/typescript/src/skia/web/JsiVideo.d.ts +24 -0
  84. package/lib/typescript/src/views/types.d.ts +0 -8
  85. package/package.json +1 -1
  86. package/src/external/reanimated/useAnimatedImageValue.ts +1 -1
  87. package/src/external/reanimated/useVideo.ts +25 -9
  88. package/src/external/reanimated/useVideoLoading.ts +25 -0
  89. package/src/external/reanimated/useVideoLoading.web.ts +17 -0
  90. package/src/skia/types/NativeBuffer/NativeBufferFactory.ts +10 -2
  91. package/src/skia/types/Skia.ts +1 -1
  92. package/src/skia/web/CanvasKitWebGLBufferImpl.ts +22 -0
  93. package/src/skia/web/JsiSkImageFactory.ts +16 -3
  94. package/src/skia/web/JsiSkia.ts +2 -3
  95. package/src/skia/web/JsiVideo.ts +96 -0
  96. package/src/views/SkiaDomView.tsx +4 -1
  97. package/src/views/SkiaDomView.web.tsx +4 -0
  98. package/src/views/SkiaJSDomView.tsx +4 -1
  99. package/src/views/SkiaPictureView.tsx +0 -1
  100. package/src/views/types.ts +0 -13
@@ -48,21 +48,8 @@ export type TouchHandlers = {
48
48
 
49
49
  export type TouchHandler = (touchInfo: Array<Array<TouchInfo>>) => void;
50
50
 
51
- /**
52
- * Listener interface for value changes
53
- */
54
- export interface ValueListener {
55
- addListener: (callback: () => void) => number;
56
- removeListener: (id: number) => void;
57
- }
58
-
59
51
  export interface ISkiaViewApi {
60
52
  setJsiProperty: <T>(nativeId: number, name: string, value: T) => void;
61
- callJsiMethod: <T extends Array<unknown>>(
62
- nativeId: number,
63
- name: string,
64
- ...args: T
65
- ) => void;
66
53
  requestRedraw: (nativeId: number) => void;
67
54
  makeImageSnapshot: (nativeId: number, rect?: SkRect) => SkImage;
68
55
  makeImageSnapshotAsync: (nativeId: number, rect?: SkRect) => Promise<SkImage>;