@shopify/react-native-skia 0.1.176 → 0.1.180
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +2 -0
- package/cpp/jsi/JsiHostObject.cpp +13 -7
- package/cpp/jsi/JsiHostObject.h +3 -1
- package/cpp/jsi/RuntimeAwareCache.cpp +9 -0
- package/cpp/jsi/RuntimeAwareCache.h +101 -0
- package/cpp/jsi/RuntimeLifecycleMonitor.cpp +57 -0
- package/cpp/jsi/RuntimeLifecycleMonitor.h +32 -0
- package/cpp/rnskia/RNSkManager.cpp +4 -0
- package/cpp/rnskia/RNSkView.h +5 -3
- package/cpp/rnskia/dom/base/JsiDomNode.h +22 -2
- package/cpp/rnskia/dom/nodes/JsiImageFilterNodes.h +10 -9
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js +10 -2
- package/lib/commonjs/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/commonjs/external/reanimated/index.d.ts +1 -0
- package/lib/commonjs/external/reanimated/index.js +13 -0
- package/lib/commonjs/external/reanimated/index.js.map +1 -1
- package/lib/commonjs/external/reanimated/moduleWrapper.d.ts +8 -0
- package/lib/commonjs/external/reanimated/moduleWrapper.js +68 -0
- package/lib/commonjs/external/reanimated/moduleWrapper.js.map +1 -0
- package/lib/commonjs/external/reanimated/renderHelpers.d.ts +5 -0
- package/lib/commonjs/external/reanimated/renderHelpers.js +81 -0
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -0
- package/lib/commonjs/external/reanimated/useSharedValueEffect.d.ts +2 -5
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js +10 -25
- package/lib/commonjs/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/commonjs/headless/index.d.ts +3 -0
- package/lib/commonjs/headless/index.js +57 -0
- package/lib/commonjs/headless/index.js.map +1 -0
- package/lib/commonjs/mock/index.d.ts +1 -2
- package/lib/commonjs/mock/index.js +0 -4
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +7 -1
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.d.ts +2 -1
- package/lib/commonjs/renderer/Container.js +2 -0
- package/lib/commonjs/renderer/Container.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +6 -4
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.d.ts +1 -1
- package/lib/commonjs/renderer/Reconciler.js +2 -1
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +4 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/dom/nodes/paint/ImageFilters.js +10 -2
- package/lib/module/dom/nodes/paint/ImageFilters.js.map +1 -1
- package/lib/module/external/reanimated/index.d.ts +1 -0
- package/lib/module/external/reanimated/index.js +1 -0
- package/lib/module/external/reanimated/index.js.map +1 -1
- package/lib/module/external/reanimated/moduleWrapper.d.ts +8 -0
- package/lib/module/external/reanimated/moduleWrapper.js +50 -0
- package/lib/module/external/reanimated/moduleWrapper.js.map +1 -0
- package/lib/module/external/reanimated/renderHelpers.d.ts +5 -0
- package/lib/module/external/reanimated/renderHelpers.js +72 -0
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -0
- package/lib/module/external/reanimated/useSharedValueEffect.d.ts +2 -5
- package/lib/module/external/reanimated/useSharedValueEffect.js +7 -22
- package/lib/module/external/reanimated/useSharedValueEffect.js.map +1 -1
- package/lib/module/headless/index.d.ts +3 -0
- package/lib/module/headless/index.js +29 -0
- package/lib/module/headless/index.js.map +1 -0
- package/lib/module/mock/index.d.ts +1 -2
- package/lib/module/mock/index.js +0 -3
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +7 -1
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.d.ts +2 -1
- package/lib/module/renderer/Container.js +2 -0
- package/lib/module/renderer/Container.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +5 -4
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Reconciler.d.ts +1 -1
- package/lib/module/renderer/Reconciler.js +2 -1
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.d.ts +4 -1
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/typescript/src/external/reanimated/index.d.ts +1 -0
- package/lib/typescript/src/external/reanimated/moduleWrapper.d.ts +8 -0
- package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +5 -0
- package/lib/typescript/src/external/reanimated/useSharedValueEffect.d.ts +2 -5
- package/lib/typescript/src/headless/index.d.ts +3 -0
- package/lib/typescript/src/mock/index.d.ts +1 -2
- package/lib/typescript/src/renderer/Container.d.ts +2 -1
- package/lib/typescript/src/renderer/Reconciler.d.ts +1 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +4 -1
- package/package.json +1 -1
- package/src/dom/nodes/paint/ImageFilters.ts +8 -2
- package/src/external/reanimated/index.ts +1 -0
- package/src/external/reanimated/moduleWrapper.ts +60 -0
- package/src/external/reanimated/renderHelpers.ts +70 -0
- package/src/external/reanimated/useSharedValueEffect.ts +17 -23
- package/src/headless/index.ts +31 -0
- package/src/mock/index.ts +0 -5
- package/src/renderer/Canvas.tsx +6 -2
- package/src/renderer/Container.tsx +2 -1
- package/src/renderer/HostConfig.ts +8 -2
- package/src/renderer/Reconciler.tsx +3 -2
- package/src/renderer/processors/Animations/Animations.ts +9 -1
@@ -1,5 +1,9 @@
|
|
1
1
|
import type { SkiaSelector, SkiaValue } from "../../../values";
|
2
2
|
|
3
|
+
export type SharedValueType<T = number> = {
|
4
|
+
value: T;
|
5
|
+
};
|
6
|
+
|
3
7
|
export const isValue = (value: unknown): value is SkiaValue<unknown> => {
|
4
8
|
if (value === undefined || value === null) {
|
5
9
|
return false;
|
@@ -44,7 +48,11 @@ export const isAnimated = <T>(props: AnimatedProps<T>) => {
|
|
44
48
|
};
|
45
49
|
|
46
50
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
47
|
-
export type AnimatedProp<T, P = any> =
|
51
|
+
export type AnimatedProp<T, P = any> =
|
52
|
+
| T
|
53
|
+
| SkiaValue<T>
|
54
|
+
| SkiaSelector<T, P>
|
55
|
+
| SharedValueType<T>;
|
48
56
|
|
49
57
|
export type AnimatedProps<T, O extends keyof T | never = never> = {
|
50
58
|
[K in keyof T]: K extends "children"
|