@shopify/react-native-skia 0.1.229 → 0.1.231
Sign up to get free protection for your applications and to get access to all the features.
- package/android/CMakeLists.txt +1 -0
- package/android/cpp/jni/JniLoad.cpp +0 -2
- package/android/cpp/rnskia-android/SkiaOpenGLSurfaceFactory.cpp +2 -2
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaModule.java +0 -1
- package/android/src/main/java/com/shopify/reactnative/skia/RNSkiaPackage.java +1 -2
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +7 -12
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDomView.java +1 -1
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaPictureView.java +1 -1
- package/cpp/api/JsiSkAnimatedImage.h +1 -1
- package/cpp/api/JsiSkApi.h +4 -1
- package/cpp/api/JsiSkDataFactory.h +6 -6
- package/cpp/api/JsiSkImage.h +4 -4
- package/cpp/api/JsiSkParagraph.h +15 -0
- package/cpp/api/JsiSkParagraphBuilder.h +3 -32
- package/cpp/api/JsiSkParagraphBuilderFactory.h +54 -0
- package/cpp/api/JsiSkPath.h +1 -1
- package/cpp/api/JsiSkRRect.h +30 -3
- package/cpp/api/third_party/base64.cpp +153 -0
- package/cpp/api/third_party/base64.h +50 -0
- package/cpp/jsi/JsiPromises.h +1 -1
- package/cpp/rnskia/RNSkJsiViewApi.h +0 -52
- package/cpp/rnskia/RNSkManager.cpp +0 -6
- package/cpp/rnskia/RNSkView.h +2 -91
- package/cpp/rnskia/dom/JsiDomApi.h +0 -9
- package/cpp/rnskia/dom/props/FontProp.h +4 -1
- package/cpp/rnskia/dom/props/RRectProp.h +50 -0
- package/ios/RNSkia-iOS/SkiaMetalSurfaceFactory.mm +1 -1
- package/lib/commonjs/animation/index.d.ts +0 -3
- package/lib/commonjs/animation/index.js +0 -39
- package/lib/commonjs/animation/index.js.map +1 -1
- package/lib/commonjs/dom/nodes/JsiSkDOM.d.ts +3 -3
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +0 -6
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/Node.d.ts +0 -3
- package/lib/commonjs/dom/nodes/Node.js +0 -5
- package/lib/commonjs/dom/nodes/Node.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +1 -1
- package/lib/commonjs/dom/nodes/drawings/RRectNode.d.ts +3 -3
- package/lib/commonjs/dom/nodes/drawings/RRectNode.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/index.d.ts +0 -1
- package/lib/commonjs/dom/nodes/drawings/index.js +0 -13
- package/lib/commonjs/dom/nodes/drawings/index.js.map +1 -1
- package/lib/commonjs/dom/types/Common.d.ts +2 -2
- package/lib/commonjs/dom/types/Common.js.map +1 -1
- package/lib/commonjs/dom/types/Drawings.d.ts +0 -4
- package/lib/commonjs/dom/types/Drawings.js.map +1 -1
- package/lib/commonjs/dom/types/NodeType.d.ts +0 -1
- package/lib/commonjs/dom/types/NodeType.js +0 -1
- package/lib/commonjs/dom/types/NodeType.js.map +1 -1
- package/lib/commonjs/dom/types/SkDOM.d.ts +1 -2
- package/lib/commonjs/dom/types/SkDOM.js.map +1 -1
- package/lib/commonjs/headless/index.d.ts +3 -1
- package/lib/commonjs/headless/index.js +12 -6
- package/lib/commonjs/headless/index.js.map +1 -1
- package/lib/commonjs/index.d.ts +0 -1
- package/lib/commonjs/index.js +0 -14
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock/index.js +0 -4
- package/lib/commonjs/mock/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +2 -21
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Container.d.ts +1 -3
- package/lib/commonjs/renderer/Container.js +4 -6
- package/lib/commonjs/renderer/Container.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +1 -6
- package/lib/commonjs/renderer/HostComponents.js +0 -3
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +2 -23
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.d.ts +1 -5
- package/lib/commonjs/renderer/Reconciler.js +3 -18
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/renderer/components/index.d.ts +0 -1
- package/lib/commonjs/renderer/components/index.js +0 -13
- package/lib/commonjs/renderer/components/index.js.map +1 -1
- package/lib/commonjs/renderer/index.d.ts +0 -1
- package/lib/commonjs/renderer/index.js +0 -13
- package/lib/commonjs/renderer/index.js.map +1 -1
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -8
- package/lib/commonjs/renderer/processors/Animations/Animations.js +0 -44
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/skia/types/Canvas.d.ts +4 -4
- package/lib/commonjs/skia/types/Canvas.js.map +1 -1
- package/lib/commonjs/skia/types/Paragraph/Paragraph.d.ts +23 -0
- package/lib/commonjs/skia/types/Paragraph/Paragraph.js.map +1 -1
- package/lib/commonjs/skia/types/Path/Path.d.ts +2 -2
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/RRect.d.ts +9 -0
- package/lib/commonjs/skia/types/RRect.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkCanvas.d.ts +4 -4
- package/lib/commonjs/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraph.d.ts +3 -0
- package/lib/commonjs/skia/web/JsiSkParagraph.js +12 -0
- package/lib/commonjs/skia/web/JsiSkParagraph.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
- package/lib/commonjs/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkPath.d.ts +2 -2
- package/lib/commonjs/skia/web/JsiSkPath.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkRRect.d.ts +2 -2
- package/lib/commonjs/skia/web/JsiSkRRect.js +4 -0
- package/lib/commonjs/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.d.ts +0 -7
- package/lib/commonjs/views/SkiaBaseWebView.js +0 -17
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.d.ts +0 -7
- package/lib/commonjs/views/SkiaDomView.js +3 -14
- package/lib/commonjs/views/SkiaDomView.js.map +1 -1
- package/lib/commonjs/views/SkiaDomView.web.js +4 -14
- package/lib/commonjs/views/SkiaDomView.web.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.d.ts +0 -7
- package/lib/commonjs/views/SkiaPictureView.js +3 -14
- package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
- package/lib/commonjs/views/SkiaViewNativeId.d.ts +3 -0
- package/lib/commonjs/views/SkiaViewNativeId.js +11 -0
- package/lib/commonjs/views/SkiaViewNativeId.js.map +1 -0
- package/lib/commonjs/views/index.d.ts +0 -2
- package/lib/commonjs/views/index.js +0 -26
- package/lib/commonjs/views/index.js.map +1 -1
- package/lib/commonjs/views/types.d.ts +2 -15
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/animation/index.d.ts +0 -3
- package/lib/module/animation/index.js +0 -3
- package/lib/module/animation/index.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.d.ts +3 -3
- package/lib/module/dom/nodes/JsiSkDOM.js +1 -7
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/Node.d.ts +0 -3
- package/lib/module/dom/nodes/Node.js +0 -5
- package/lib/module/dom/nodes/Node.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.d.ts +1 -1
- package/lib/module/dom/nodes/drawings/RRectNode.d.ts +3 -3
- package/lib/module/dom/nodes/drawings/RRectNode.js.map +1 -1
- package/lib/module/dom/nodes/drawings/index.d.ts +0 -1
- package/lib/module/dom/nodes/drawings/index.js +0 -1
- package/lib/module/dom/nodes/drawings/index.js.map +1 -1
- package/lib/module/dom/types/Common.d.ts +2 -2
- package/lib/module/dom/types/Common.js.map +1 -1
- package/lib/module/dom/types/Drawings.d.ts +0 -4
- package/lib/module/dom/types/Drawings.js.map +1 -1
- package/lib/module/dom/types/NodeType.d.ts +0 -1
- package/lib/module/dom/types/NodeType.js +0 -1
- package/lib/module/dom/types/NodeType.js.map +1 -1
- package/lib/module/dom/types/SkDOM.d.ts +1 -2
- package/lib/module/dom/types/SkDOM.js.map +1 -1
- package/lib/module/headless/index.d.ts +3 -1
- package/lib/module/headless/index.js +5 -3
- package/lib/module/headless/index.js.map +1 -1
- package/lib/module/index.d.ts +0 -1
- package/lib/module/index.js +0 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock/index.js +1 -4
- package/lib/module/mock/index.js.map +1 -1
- package/lib/module/renderer/Canvas.js +2 -20
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Container.d.ts +1 -3
- package/lib/module/renderer/Container.js +4 -6
- package/lib/module/renderer/Container.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +1 -6
- package/lib/module/renderer/HostComponents.js +0 -3
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +3 -23
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/Reconciler.d.ts +1 -5
- package/lib/module/renderer/Reconciler.js +3 -16
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/renderer/components/index.d.ts +0 -1
- package/lib/module/renderer/components/index.js +0 -1
- package/lib/module/renderer/components/index.js.map +1 -1
- package/lib/module/renderer/index.d.ts +0 -1
- package/lib/module/renderer/index.js +0 -1
- package/lib/module/renderer/index.js.map +1 -1
- package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -8
- package/lib/module/renderer/processors/Animations/Animations.js +0 -28
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/skia/types/Canvas.d.ts +4 -4
- package/lib/module/skia/types/Canvas.js.map +1 -1
- package/lib/module/skia/types/Paragraph/Paragraph.d.ts +23 -0
- package/lib/module/skia/types/Paragraph/Paragraph.js.map +1 -1
- package/lib/module/skia/types/Path/Path.d.ts +2 -2
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/RRect.d.ts +9 -0
- package/lib/module/skia/types/RRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.d.ts +4 -4
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraph.d.ts +3 -0
- package/lib/module/skia/web/JsiSkParagraph.js +12 -0
- package/lib/module/skia/web/JsiSkParagraph.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +5 -2
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.d.ts +2 -2
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkRRect.d.ts +2 -2
- package/lib/module/skia/web/JsiSkRRect.js +4 -0
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.d.ts +0 -7
- package/lib/module/views/SkiaBaseWebView.js +0 -17
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaDomView.d.ts +0 -7
- package/lib/module/views/SkiaDomView.js +2 -13
- package/lib/module/views/SkiaDomView.js.map +1 -1
- package/lib/module/views/SkiaDomView.web.js +4 -13
- package/lib/module/views/SkiaDomView.web.js.map +1 -1
- package/lib/module/views/SkiaPictureView.d.ts +0 -7
- package/lib/module/views/SkiaPictureView.js +2 -13
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/SkiaViewNativeId.d.ts +3 -0
- package/lib/module/views/SkiaViewNativeId.js +4 -0
- package/lib/module/views/SkiaViewNativeId.js.map +1 -0
- package/lib/module/views/index.d.ts +0 -2
- package/lib/module/views/index.js +0 -2
- package/lib/module/views/index.js.map +1 -1
- package/lib/module/views/types.d.ts +2 -15
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/src/animation/index.d.ts +0 -3
- package/lib/typescript/src/dom/nodes/JsiSkDOM.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/Node.d.ts +0 -3
- package/lib/typescript/src/dom/nodes/datatypes/Rect.d.ts +1 -1
- package/lib/typescript/src/dom/nodes/drawings/RRectNode.d.ts +3 -3
- package/lib/typescript/src/dom/nodes/drawings/index.d.ts +0 -1
- package/lib/typescript/src/dom/types/Common.d.ts +2 -2
- package/lib/typescript/src/dom/types/Drawings.d.ts +0 -4
- package/lib/typescript/src/dom/types/NodeType.d.ts +0 -1
- package/lib/typescript/src/dom/types/SkDOM.d.ts +1 -2
- package/lib/typescript/src/headless/index.d.ts +3 -1
- package/lib/typescript/src/index.d.ts +0 -1
- package/lib/typescript/src/renderer/Container.d.ts +1 -3
- package/lib/typescript/src/renderer/HostComponents.d.ts +1 -6
- package/lib/typescript/src/renderer/Reconciler.d.ts +1 -5
- package/lib/typescript/src/renderer/components/index.d.ts +0 -1
- package/lib/typescript/src/renderer/index.d.ts +0 -1
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -8
- package/lib/typescript/src/skia/types/Canvas.d.ts +4 -4
- package/lib/typescript/src/skia/types/Paragraph/Paragraph.d.ts +23 -0
- package/lib/typescript/src/skia/types/Path/Path.d.ts +2 -2
- package/lib/typescript/src/skia/types/RRect.d.ts +9 -0
- package/lib/typescript/src/skia/web/JsiSkCanvas.d.ts +4 -4
- package/lib/typescript/src/skia/web/JsiSkParagraph.d.ts +3 -0
- package/lib/typescript/src/skia/web/JsiSkPath.d.ts +2 -2
- package/lib/typescript/src/skia/web/JsiSkRRect.d.ts +2 -2
- package/lib/typescript/src/views/SkiaBaseWebView.d.ts +0 -7
- package/lib/typescript/src/views/SkiaDomView.d.ts +0 -7
- package/lib/typescript/src/views/SkiaPictureView.d.ts +0 -7
- package/lib/typescript/src/views/SkiaViewNativeId.d.ts +3 -0
- package/lib/typescript/src/views/index.d.ts +0 -2
- package/lib/typescript/src/views/types.d.ts +2 -15
- package/libs/android/arm64-v8a/libskia.a +0 -0
- package/libs/android/armeabi-v7a/libskia.a +0 -0
- package/libs/android/x86/libskia.a +0 -0
- package/libs/android/x86_64/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/ios/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/ios/libskottie.xcframework/Info.plist +5 -5
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/ios/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/ios/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/ios/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/ios/libskshaper.xcframework/Info.plist +5 -5
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/ios/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e/libskunicode.a +0 -0
- package/libs/ios/libskunicode.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode.a +0 -0
- package/libs/ios/libsvg.xcframework/Info.plist +5 -5
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/ios/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/package.json +1 -1
- package/src/animation/index.ts +0 -3
- package/src/dom/nodes/JsiSkDOM.ts +0 -12
- package/src/dom/nodes/Node.ts +0 -5
- package/src/dom/nodes/drawings/RRectNode.ts +2 -2
- package/src/dom/nodes/drawings/index.ts +0 -1
- package/src/dom/types/Common.ts +2 -1
- package/src/dom/types/Drawings.ts +0 -5
- package/src/dom/types/NodeType.ts +0 -1
- package/src/dom/types/SkDOM.ts +0 -4
- package/src/headless/index.ts +7 -3
- package/src/index.ts +0 -1
- package/src/mock/index.ts +0 -3
- package/src/renderer/Canvas.tsx +3 -21
- package/src/renderer/Container.tsx +1 -4
- package/src/renderer/HostComponents.ts +0 -13
- package/src/renderer/HostConfig.ts +3 -24
- package/src/renderer/Reconciler.tsx +1 -19
- package/src/renderer/components/index.ts +0 -1
- package/src/renderer/index.ts +0 -1
- package/src/renderer/processors/Animations/Animations.ts +1 -51
- package/src/skia/types/Canvas.ts +4 -4
- package/src/skia/types/Paragraph/Paragraph.ts +25 -0
- package/src/skia/types/Path/Path.ts +2 -2
- package/src/skia/types/RRect.ts +11 -0
- package/src/skia/web/JsiSkCanvas.ts +4 -4
- package/src/skia/web/JsiSkParagraph.ts +11 -0
- package/src/skia/web/JsiSkParagraphBuilderFactory.ts +9 -3
- package/src/skia/web/JsiSkPath.ts +2 -2
- package/src/skia/web/JsiSkRRect.ts +23 -2
- package/src/views/SkiaBaseWebView.tsx +0 -19
- package/src/views/SkiaDomView.tsx +1 -13
- package/src/views/SkiaDomView.web.tsx +1 -6
- package/src/views/SkiaPictureView.tsx +1 -13
- package/src/views/SkiaViewNativeId.ts +1 -0
- package/src/views/index.ts +0 -2
- package/src/views/types.ts +2 -26
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawView.java +0 -44
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaDrawViewManager.java +0 -34
- package/cpp/rnskia/RNSkAnimation.h +0 -65
- package/cpp/rnskia/RNSkValueApi.h +0 -72
- package/cpp/rnskia/dom/base/JsiDependencyManager.h +0 -297
- package/cpp/rnskia/dom/nodes/JsiCustomDrawingNode.h +0 -127
- package/cpp/rnskia/dom/props/DrawingProp.h +0 -35
- package/cpp/rnskia/values/RNSkClockValue.h +0 -140
- package/cpp/rnskia/values/RNSkComputedValue.h +0 -104
- package/cpp/rnskia/values/RNSkReadonlyValue.h +0 -166
- package/cpp/rnskia/values/RNSkValue.h +0 -116
- package/ios/RNSkia-iOS/SkiaDrawView.h +0 -7
- package/ios/RNSkia-iOS/SkiaDrawView.mm +0 -72
- package/ios/RNSkia-iOS/SkiaDrawViewManager.h +0 -7
- package/ios/RNSkia-iOS/SkiaDrawViewManager.mm +0 -50
- package/lib/commonjs/animation/decay/decay.d.ts +0 -2
- package/lib/commonjs/animation/decay/decay.js +0 -42
- package/lib/commonjs/animation/decay/decay.js.map +0 -1
- package/lib/commonjs/animation/decay/index.d.ts +0 -1
- package/lib/commonjs/animation/decay/index.js +0 -14
- package/lib/commonjs/animation/decay/index.js.map +0 -1
- package/lib/commonjs/animation/decay/runDecay.d.ts +0 -10
- package/lib/commonjs/animation/decay/runDecay.js +0 -48
- package/lib/commonjs/animation/decay/runDecay.js.map +0 -1
- package/lib/commonjs/animation/decay/types.d.ts +0 -21
- package/lib/commonjs/animation/decay/types.js +0 -6
- package/lib/commonjs/animation/decay/types.js.map +0 -1
- package/lib/commonjs/animation/spring/Spring.d.ts +0 -65
- package/lib/commonjs/animation/spring/Spring.js +0 -77
- package/lib/commonjs/animation/spring/Spring.js.map +0 -1
- package/lib/commonjs/animation/spring/functions/index.d.ts +0 -1
- package/lib/commonjs/animation/spring/functions/index.js +0 -14
- package/lib/commonjs/animation/spring/functions/index.js.map +0 -1
- package/lib/commonjs/animation/spring/functions/spring.d.ts +0 -10
- package/lib/commonjs/animation/spring/functions/spring.js +0 -94
- package/lib/commonjs/animation/spring/functions/spring.js.map +0 -1
- package/lib/commonjs/animation/spring/index.d.ts +0 -3
- package/lib/commonjs/animation/spring/index.js +0 -30
- package/lib/commonjs/animation/spring/index.js.map +0 -1
- package/lib/commonjs/animation/spring/runSpring.d.ts +0 -19
- package/lib/commonjs/animation/spring/runSpring.js +0 -35
- package/lib/commonjs/animation/spring/runSpring.js.map +0 -1
- package/lib/commonjs/animation/spring/types.d.ts +0 -6
- package/lib/commonjs/animation/spring/types.js +0 -2
- package/lib/commonjs/animation/spring/types.js.map +0 -1
- package/lib/commonjs/animation/spring/useSpring.d.ts +0 -13
- package/lib/commonjs/animation/spring/useSpring.js +0 -27
- package/lib/commonjs/animation/spring/useSpring.js.map +0 -1
- package/lib/commonjs/animation/timing/Easing.d.ts +0 -19
- package/lib/commonjs/animation/timing/Easing.js +0 -108
- package/lib/commonjs/animation/timing/Easing.js.map +0 -1
- package/lib/commonjs/animation/timing/createTiming.d.ts +0 -17
- package/lib/commonjs/animation/timing/createTiming.js +0 -55
- package/lib/commonjs/animation/timing/createTiming.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/bezier.d.ts +0 -1
- package/lib/commonjs/animation/timing/functions/bezier.js +0 -147
- package/lib/commonjs/animation/timing/functions/bezier.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/getResolvedParams.d.ts +0 -7
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js +0 -52
- package/lib/commonjs/animation/timing/functions/getResolvedParams.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/index.d.ts +0 -4
- package/lib/commonjs/animation/timing/functions/index.js +0 -54
- package/lib/commonjs/animation/timing/functions/index.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/timing.d.ts +0 -17
- package/lib/commonjs/animation/timing/functions/timing.js +0 -50
- package/lib/commonjs/animation/timing/functions/timing.js.map +0 -1
- package/lib/commonjs/animation/timing/functions/types.d.ts +0 -7
- package/lib/commonjs/animation/timing/functions/types.js +0 -2
- package/lib/commonjs/animation/timing/functions/types.js.map +0 -1
- package/lib/commonjs/animation/timing/index.d.ts +0 -4
- package/lib/commonjs/animation/timing/index.js +0 -38
- package/lib/commonjs/animation/timing/index.js.map +0 -1
- package/lib/commonjs/animation/timing/runTiming.d.ts +0 -19
- package/lib/commonjs/animation/timing/runTiming.js +0 -36
- package/lib/commonjs/animation/timing/runTiming.js.map +0 -1
- package/lib/commonjs/animation/timing/useLoop.d.ts +0 -11
- package/lib/commonjs/animation/timing/useLoop.js +0 -25
- package/lib/commonjs/animation/timing/useLoop.js.map +0 -1
- package/lib/commonjs/animation/timing/useTiming.d.ts +0 -13
- package/lib/commonjs/animation/timing/useTiming.js +0 -67
- package/lib/commonjs/animation/timing/useTiming.js.map +0 -1
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js +0 -28
- package/lib/commonjs/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
- package/lib/commonjs/renderer/DependencyManager.d.ts +0 -46
- package/lib/commonjs/renderer/DependencyManager.js +0 -185
- package/lib/commonjs/renderer/DependencyManager.js.map +0 -1
- package/lib/commonjs/renderer/components/Drawing.d.ts +0 -8
- package/lib/commonjs/renderer/components/Drawing.js +0 -22
- package/lib/commonjs/renderer/components/Drawing.js.map +0 -1
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js +0 -16
- package/lib/commonjs/specs/SkiaDrawViewNativeComponent.js.map +0 -1
- package/lib/commonjs/values/api.d.ts +0 -26
- package/lib/commonjs/values/api.js +0 -55
- package/lib/commonjs/values/api.js.map +0 -1
- package/lib/commonjs/values/api.web.d.ts +0 -2
- package/lib/commonjs/values/api.web.js +0 -18
- package/lib/commonjs/values/api.web.js.map +0 -1
- package/lib/commonjs/values/hooks/index.d.ts +0 -4
- package/lib/commonjs/values/hooks/index.js +0 -58
- package/lib/commonjs/values/hooks/index.js.map +0 -1
- package/lib/commonjs/values/hooks/useClockValue.d.ts +0 -9
- package/lib/commonjs/values/hooks/useClockValue.js +0 -30
- package/lib/commonjs/values/hooks/useClockValue.js.map +0 -1
- package/lib/commonjs/values/hooks/useComputedValue.d.ts +0 -11
- package/lib/commonjs/values/hooks/useComputedValue.js +0 -32
- package/lib/commonjs/values/hooks/useComputedValue.js.map +0 -1
- package/lib/commonjs/values/hooks/useValue.d.ts +0 -10
- package/lib/commonjs/values/hooks/useValue.js +0 -26
- package/lib/commonjs/values/hooks/useValue.js.map +0 -1
- package/lib/commonjs/values/hooks/useValueEffect.d.ts +0 -10
- package/lib/commonjs/values/hooks/useValueEffect.js +0 -25
- package/lib/commonjs/values/hooks/useValueEffect.js.map +0 -1
- package/lib/commonjs/values/index.d.ts +0 -4
- package/lib/commonjs/values/index.js +0 -58
- package/lib/commonjs/values/index.js.map +0 -1
- package/lib/commonjs/values/selector.d.ts +0 -14
- package/lib/commonjs/values/selector.js +0 -24
- package/lib/commonjs/values/selector.js.map +0 -1
- package/lib/commonjs/values/types.d.ts +0 -63
- package/lib/commonjs/values/types.js +0 -2
- package/lib/commonjs/values/types.js.map +0 -1
- package/lib/commonjs/values/web/RNSkAnimation.d.ts +0 -9
- package/lib/commonjs/values/web/RNSkAnimation.js +0 -46
- package/lib/commonjs/values/web/RNSkAnimation.js.map +0 -1
- package/lib/commonjs/values/web/RNSkClockValue.d.ts +0 -13
- package/lib/commonjs/values/web/RNSkClockValue.js +0 -75
- package/lib/commonjs/values/web/RNSkClockValue.js.map +0 -1
- package/lib/commonjs/values/web/RNSkComputedValue.d.ts +0 -10
- package/lib/commonjs/values/web/RNSkComputedValue.js +0 -59
- package/lib/commonjs/values/web/RNSkComputedValue.js.map +0 -1
- package/lib/commonjs/values/web/RNSkReadonlyValue.d.ts +0 -12
- package/lib/commonjs/values/web/RNSkReadonlyValue.js +0 -51
- package/lib/commonjs/values/web/RNSkReadonlyValue.js.map +0 -1
- package/lib/commonjs/values/web/RNSkValue.d.ts +0 -14
- package/lib/commonjs/values/web/RNSkValue.js +0 -73
- package/lib/commonjs/values/web/RNSkValue.js.map +0 -1
- package/lib/commonjs/values/web/api.d.ts +0 -2
- package/lib/commonjs/values/web/api.js +0 -31
- package/lib/commonjs/values/web/api.js.map +0 -1
- package/lib/commonjs/values/web/index.d.ts +0 -1
- package/lib/commonjs/values/web/index.js +0 -19
- package/lib/commonjs/values/web/index.js.map +0 -1
- package/lib/commonjs/views/SkiaView.d.ts +0 -35
- package/lib/commonjs/views/SkiaView.js +0 -139
- package/lib/commonjs/views/SkiaView.js.map +0 -1
- package/lib/commonjs/views/SkiaView.web.d.ts +0 -7
- package/lib/commonjs/views/SkiaView.web.js +0 -30
- package/lib/commonjs/views/SkiaView.web.js.map +0 -1
- package/lib/commonjs/views/useDrawCallback.d.ts +0 -8
- package/lib/commonjs/views/useDrawCallback.js +0 -23
- package/lib/commonjs/views/useDrawCallback.js.map +0 -1
- package/lib/module/animation/decay/decay.d.ts +0 -2
- package/lib/module/animation/decay/decay.js +0 -33
- package/lib/module/animation/decay/decay.js.map +0 -1
- package/lib/module/animation/decay/index.d.ts +0 -1
- package/lib/module/animation/decay/index.js +0 -2
- package/lib/module/animation/decay/index.js.map +0 -1
- package/lib/module/animation/decay/runDecay.d.ts +0 -10
- package/lib/module/animation/decay/runDecay.js +0 -38
- package/lib/module/animation/decay/runDecay.js.map +0 -1
- package/lib/module/animation/decay/types.d.ts +0 -21
- package/lib/module/animation/decay/types.js +0 -2
- package/lib/module/animation/decay/types.js.map +0 -1
- package/lib/module/animation/spring/Spring.d.ts +0 -65
- package/lib/module/animation/spring/Spring.js +0 -69
- package/lib/module/animation/spring/Spring.js.map +0 -1
- package/lib/module/animation/spring/functions/index.d.ts +0 -1
- package/lib/module/animation/spring/functions/index.js +0 -2
- package/lib/module/animation/spring/functions/index.js.map +0 -1
- package/lib/module/animation/spring/functions/spring.d.ts +0 -10
- package/lib/module/animation/spring/functions/spring.js +0 -85
- package/lib/module/animation/spring/functions/spring.js.map +0 -1
- package/lib/module/animation/spring/index.d.ts +0 -3
- package/lib/module/animation/spring/index.js +0 -4
- package/lib/module/animation/spring/index.js.map +0 -1
- package/lib/module/animation/spring/runSpring.d.ts +0 -19
- package/lib/module/animation/spring/runSpring.js +0 -24
- package/lib/module/animation/spring/runSpring.js.map +0 -1
- package/lib/module/animation/spring/types.d.ts +0 -6
- package/lib/module/animation/spring/types.js +0 -2
- package/lib/module/animation/spring/types.js.map +0 -1
- package/lib/module/animation/spring/useSpring.d.ts +0 -13
- package/lib/module/animation/spring/useSpring.js +0 -16
- package/lib/module/animation/spring/useSpring.js.map +0 -1
- package/lib/module/animation/timing/Easing.d.ts +0 -19
- package/lib/module/animation/timing/Easing.js +0 -98
- package/lib/module/animation/timing/Easing.js.map +0 -1
- package/lib/module/animation/timing/createTiming.d.ts +0 -17
- package/lib/module/animation/timing/createTiming.js +0 -49
- package/lib/module/animation/timing/createTiming.js.map +0 -1
- package/lib/module/animation/timing/functions/bezier.d.ts +0 -1
- package/lib/module/animation/timing/functions/bezier.js +0 -141
- package/lib/module/animation/timing/functions/bezier.js.map +0 -1
- package/lib/module/animation/timing/functions/getResolvedParams.d.ts +0 -7
- package/lib/module/animation/timing/functions/getResolvedParams.js +0 -48
- package/lib/module/animation/timing/functions/getResolvedParams.js.map +0 -1
- package/lib/module/animation/timing/functions/index.d.ts +0 -4
- package/lib/module/animation/timing/functions/index.js +0 -5
- package/lib/module/animation/timing/functions/index.js.map +0 -1
- package/lib/module/animation/timing/functions/timing.d.ts +0 -17
- package/lib/module/animation/timing/functions/timing.js +0 -41
- package/lib/module/animation/timing/functions/timing.js.map +0 -1
- package/lib/module/animation/timing/functions/types.d.ts +0 -7
- package/lib/module/animation/timing/functions/types.js +0 -2
- package/lib/module/animation/timing/functions/types.js.map +0 -1
- package/lib/module/animation/timing/index.d.ts +0 -4
- package/lib/module/animation/timing/index.js +0 -5
- package/lib/module/animation/timing/index.js.map +0 -1
- package/lib/module/animation/timing/runTiming.d.ts +0 -19
- package/lib/module/animation/timing/runTiming.js +0 -26
- package/lib/module/animation/timing/runTiming.js.map +0 -1
- package/lib/module/animation/timing/useLoop.d.ts +0 -11
- package/lib/module/animation/timing/useLoop.js +0 -16
- package/lib/module/animation/timing/useLoop.js.map +0 -1
- package/lib/module/animation/timing/useTiming.d.ts +0 -13
- package/lib/module/animation/timing/useTiming.js +0 -57
- package/lib/module/animation/timing/useTiming.js.map +0 -1
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js +0 -17
- package/lib/module/dom/nodes/drawings/CustomDrawingNode.js.map +0 -1
- package/lib/module/renderer/DependencyManager.d.ts +0 -46
- package/lib/module/renderer/DependencyManager.js +0 -174
- package/lib/module/renderer/DependencyManager.js.map +0 -1
- package/lib/module/renderer/components/Drawing.d.ts +0 -8
- package/lib/module/renderer/components/Drawing.js +0 -11
- package/lib/module/renderer/components/Drawing.js.map +0 -1
- package/lib/module/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
- package/lib/module/specs/SkiaDrawViewNativeComponent.js +0 -4
- package/lib/module/specs/SkiaDrawViewNativeComponent.js.map +0 -1
- package/lib/module/values/api.d.ts +0 -26
- package/lib/module/values/api.js +0 -48
- package/lib/module/values/api.js.map +0 -1
- package/lib/module/values/api.web.d.ts +0 -2
- package/lib/module/values/api.web.js +0 -7
- package/lib/module/values/api.web.js.map +0 -1
- package/lib/module/values/hooks/index.d.ts +0 -4
- package/lib/module/values/hooks/index.js +0 -5
- package/lib/module/values/hooks/index.js.map +0 -1
- package/lib/module/values/hooks/useClockValue.d.ts +0 -9
- package/lib/module/values/hooks/useClockValue.js +0 -20
- package/lib/module/values/hooks/useClockValue.js.map +0 -1
- package/lib/module/values/hooks/useComputedValue.d.ts +0 -11
- package/lib/module/values/hooks/useComputedValue.js +0 -21
- package/lib/module/values/hooks/useComputedValue.js.map +0 -1
- package/lib/module/values/hooks/useValue.d.ts +0 -10
- package/lib/module/values/hooks/useValue.js +0 -16
- package/lib/module/values/hooks/useValue.js.map +0 -1
- package/lib/module/values/hooks/useValueEffect.d.ts +0 -10
- package/lib/module/values/hooks/useValueEffect.js +0 -16
- package/lib/module/values/hooks/useValueEffect.js.map +0 -1
- package/lib/module/values/index.d.ts +0 -4
- package/lib/module/values/index.js +0 -5
- package/lib/module/values/index.js.map +0 -1
- package/lib/module/values/selector.d.ts +0 -14
- package/lib/module/values/selector.js +0 -15
- package/lib/module/values/selector.js.map +0 -1
- package/lib/module/values/types.d.ts +0 -63
- package/lib/module/values/types.js +0 -2
- package/lib/module/values/types.js.map +0 -1
- package/lib/module/values/web/RNSkAnimation.d.ts +0 -9
- package/lib/module/values/web/RNSkAnimation.js +0 -36
- package/lib/module/values/web/RNSkAnimation.js.map +0 -1
- package/lib/module/values/web/RNSkClockValue.d.ts +0 -13
- package/lib/module/values/web/RNSkClockValue.js +0 -65
- package/lib/module/values/web/RNSkClockValue.js.map +0 -1
- package/lib/module/values/web/RNSkComputedValue.d.ts +0 -10
- package/lib/module/values/web/RNSkComputedValue.js +0 -49
- package/lib/module/values/web/RNSkComputedValue.js.map +0 -1
- package/lib/module/values/web/RNSkReadonlyValue.d.ts +0 -12
- package/lib/module/values/web/RNSkReadonlyValue.js +0 -42
- package/lib/module/values/web/RNSkReadonlyValue.js.map +0 -1
- package/lib/module/values/web/RNSkValue.d.ts +0 -14
- package/lib/module/values/web/RNSkValue.js +0 -63
- package/lib/module/values/web/RNSkValue.js.map +0 -1
- package/lib/module/values/web/api.d.ts +0 -2
- package/lib/module/values/web/api.js +0 -19
- package/lib/module/values/web/api.js.map +0 -1
- package/lib/module/values/web/index.d.ts +0 -1
- package/lib/module/values/web/index.js +0 -2
- package/lib/module/values/web/index.js.map +0 -1
- package/lib/module/views/SkiaView.d.ts +0 -35
- package/lib/module/views/SkiaView.js +0 -119
- package/lib/module/views/SkiaView.js.map +0 -1
- package/lib/module/views/SkiaView.web.d.ts +0 -7
- package/lib/module/views/SkiaView.web.js +0 -20
- package/lib/module/views/SkiaView.web.js.map +0 -1
- package/lib/module/views/useDrawCallback.d.ts +0 -8
- package/lib/module/views/useDrawCallback.js +0 -14
- package/lib/module/views/useDrawCallback.js.map +0 -1
- package/lib/typescript/src/animation/decay/decay.d.ts +0 -2
- package/lib/typescript/src/animation/decay/index.d.ts +0 -1
- package/lib/typescript/src/animation/decay/runDecay.d.ts +0 -10
- package/lib/typescript/src/animation/decay/types.d.ts +0 -21
- package/lib/typescript/src/animation/spring/Spring.d.ts +0 -65
- package/lib/typescript/src/animation/spring/functions/index.d.ts +0 -1
- package/lib/typescript/src/animation/spring/functions/spring.d.ts +0 -10
- package/lib/typescript/src/animation/spring/index.d.ts +0 -3
- package/lib/typescript/src/animation/spring/runSpring.d.ts +0 -19
- package/lib/typescript/src/animation/spring/types.d.ts +0 -6
- package/lib/typescript/src/animation/spring/useSpring.d.ts +0 -13
- package/lib/typescript/src/animation/timing/Easing.d.ts +0 -19
- package/lib/typescript/src/animation/timing/createTiming.d.ts +0 -17
- package/lib/typescript/src/animation/timing/functions/bezier.d.ts +0 -1
- package/lib/typescript/src/animation/timing/functions/getResolvedParams.d.ts +0 -7
- package/lib/typescript/src/animation/timing/functions/index.d.ts +0 -4
- package/lib/typescript/src/animation/timing/functions/timing.d.ts +0 -17
- package/lib/typescript/src/animation/timing/functions/types.d.ts +0 -7
- package/lib/typescript/src/animation/timing/index.d.ts +0 -4
- package/lib/typescript/src/animation/timing/runTiming.d.ts +0 -19
- package/lib/typescript/src/animation/timing/useLoop.d.ts +0 -11
- package/lib/typescript/src/animation/timing/useTiming.d.ts +0 -13
- package/lib/typescript/src/dom/nodes/drawings/CustomDrawingNode.d.ts +0 -8
- package/lib/typescript/src/renderer/DependencyManager.d.ts +0 -46
- package/lib/typescript/src/renderer/components/Drawing.d.ts +0 -8
- package/lib/typescript/src/specs/SkiaDrawViewNativeComponent.d.ts +0 -8
- package/lib/typescript/src/values/api.d.ts +0 -26
- package/lib/typescript/src/values/api.web.d.ts +0 -2
- package/lib/typescript/src/values/hooks/index.d.ts +0 -4
- package/lib/typescript/src/values/hooks/useClockValue.d.ts +0 -9
- package/lib/typescript/src/values/hooks/useComputedValue.d.ts +0 -11
- package/lib/typescript/src/values/hooks/useValue.d.ts +0 -10
- package/lib/typescript/src/values/hooks/useValueEffect.d.ts +0 -10
- package/lib/typescript/src/values/index.d.ts +0 -4
- package/lib/typescript/src/values/selector.d.ts +0 -14
- package/lib/typescript/src/values/types.d.ts +0 -63
- package/lib/typescript/src/values/web/RNSkAnimation.d.ts +0 -9
- package/lib/typescript/src/values/web/RNSkClockValue.d.ts +0 -13
- package/lib/typescript/src/values/web/RNSkComputedValue.d.ts +0 -10
- package/lib/typescript/src/values/web/RNSkReadonlyValue.d.ts +0 -12
- package/lib/typescript/src/values/web/RNSkValue.d.ts +0 -14
- package/lib/typescript/src/values/web/api.d.ts +0 -2
- package/lib/typescript/src/values/web/index.d.ts +0 -1
- package/lib/typescript/src/views/SkiaView.d.ts +0 -35
- package/lib/typescript/src/views/SkiaView.web.d.ts +0 -7
- package/lib/typescript/src/views/useDrawCallback.d.ts +0 -8
- package/src/animation/decay/decay.ts +0 -35
- package/src/animation/decay/index.ts +0 -1
- package/src/animation/decay/runDecay.ts +0 -40
- package/src/animation/decay/types.ts +0 -24
- package/src/animation/spring/Spring.ts +0 -61
- package/src/animation/spring/functions/index.ts +0 -1
- package/src/animation/spring/functions/spring.ts +0 -86
- package/src/animation/spring/index.ts +0 -3
- package/src/animation/spring/runSpring.ts +0 -40
- package/src/animation/spring/types.ts +0 -6
- package/src/animation/spring/useSpring.ts +0 -31
- package/src/animation/timing/Easing.ts +0 -102
- package/src/animation/timing/createTiming.ts +0 -62
- package/src/animation/timing/functions/bezier.ts +0 -165
- package/src/animation/timing/functions/getResolvedParams.ts +0 -50
- package/src/animation/timing/functions/index.ts +0 -4
- package/src/animation/timing/functions/timing.ts +0 -44
- package/src/animation/timing/functions/types.ts +0 -8
- package/src/animation/timing/index.ts +0 -4
- package/src/animation/timing/runTiming.ts +0 -36
- package/src/animation/timing/useLoop.ts +0 -21
- package/src/animation/timing/useTiming.ts +0 -71
- package/src/dom/nodes/drawings/CustomDrawingNode.ts +0 -21
- package/src/renderer/DependencyManager.tsx +0 -196
- package/src/renderer/components/Drawing.tsx +0 -12
- package/src/specs/SkiaDrawViewNativeComponent.ts +0 -10
- package/src/values/api.ts +0 -61
- package/src/values/api.web.ts +0 -5
- package/src/values/hooks/index.ts +0 -4
- package/src/values/hooks/useClockValue.ts +0 -21
- package/src/values/hooks/useComputedValue.ts +0 -24
- package/src/values/hooks/useValue.ts +0 -17
- package/src/values/hooks/useValueEffect.ts +0 -18
- package/src/values/index.ts +0 -4
- package/src/values/selector.ts +0 -24
- package/src/values/types.ts +0 -73
- package/src/values/web/RNSkAnimation.ts +0 -33
- package/src/values/web/RNSkClockValue.ts +0 -58
- package/src/values/web/RNSkComputedValue.ts +0 -49
- package/src/values/web/RNSkReadonlyValue.ts +0 -38
- package/src/values/web/RNSkValue.ts +0 -57
- package/src/values/web/api.ts +0 -33
- package/src/values/web/index.ts +0 -1
- package/src/views/SkiaView.tsx +0 -111
- package/src/views/SkiaView.web.tsx +0 -22
- package/src/views/useDrawCallback.ts +0 -19
@@ -6,32 +6,32 @@
|
|
6
6
|
<array>
|
7
7
|
<dict>
|
8
8
|
<key>LibraryIdentifier</key>
|
9
|
-
<string>ios-
|
9
|
+
<string>ios-arm64_arm64e</string>
|
10
10
|
<key>LibraryPath</key>
|
11
11
|
<string>libskshaper.a</string>
|
12
12
|
<key>SupportedArchitectures</key>
|
13
13
|
<array>
|
14
14
|
<string>arm64</string>
|
15
15
|
<string>arm64e</string>
|
16
|
-
<string>x86_64</string>
|
17
16
|
</array>
|
18
17
|
<key>SupportedPlatform</key>
|
19
18
|
<string>ios</string>
|
20
|
-
<key>SupportedPlatformVariant</key>
|
21
|
-
<string>simulator</string>
|
22
19
|
</dict>
|
23
20
|
<dict>
|
24
21
|
<key>LibraryIdentifier</key>
|
25
|
-
<string>ios-
|
22
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
26
23
|
<key>LibraryPath</key>
|
27
24
|
<string>libskshaper.a</string>
|
28
25
|
<key>SupportedArchitectures</key>
|
29
26
|
<array>
|
30
27
|
<string>arm64</string>
|
31
28
|
<string>arm64e</string>
|
29
|
+
<string>x86_64</string>
|
32
30
|
</array>
|
33
31
|
<key>SupportedPlatform</key>
|
34
32
|
<string>ios</string>
|
33
|
+
<key>SupportedPlatformVariant</key>
|
34
|
+
<string>simulator</string>
|
35
35
|
</dict>
|
36
36
|
</array>
|
37
37
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -6,32 +6,32 @@
|
|
6
6
|
<array>
|
7
7
|
<dict>
|
8
8
|
<key>LibraryIdentifier</key>
|
9
|
-
<string>ios-
|
9
|
+
<string>ios-arm64_arm64e</string>
|
10
10
|
<key>LibraryPath</key>
|
11
11
|
<string>libsvg.a</string>
|
12
12
|
<key>SupportedArchitectures</key>
|
13
13
|
<array>
|
14
14
|
<string>arm64</string>
|
15
15
|
<string>arm64e</string>
|
16
|
-
<string>x86_64</string>
|
17
16
|
</array>
|
18
17
|
<key>SupportedPlatform</key>
|
19
18
|
<string>ios</string>
|
20
|
-
<key>SupportedPlatformVariant</key>
|
21
|
-
<string>simulator</string>
|
22
19
|
</dict>
|
23
20
|
<dict>
|
24
21
|
<key>LibraryIdentifier</key>
|
25
|
-
<string>ios-
|
22
|
+
<string>ios-arm64_arm64e_x86_64-simulator</string>
|
26
23
|
<key>LibraryPath</key>
|
27
24
|
<string>libsvg.a</string>
|
28
25
|
<key>SupportedArchitectures</key>
|
29
26
|
<array>
|
30
27
|
<string>arm64</string>
|
31
28
|
<string>arm64e</string>
|
29
|
+
<string>x86_64</string>
|
32
30
|
</array>
|
33
31
|
<key>SupportedPlatform</key>
|
34
32
|
<string>ios</string>
|
33
|
+
<key>SupportedPlatformVariant</key>
|
34
|
+
<string>simulator</string>
|
35
35
|
</dict>
|
36
36
|
</array>
|
37
37
|
<key>CFBundlePackageType</key>
|
Binary file
|
Binary file
|
package/package.json
CHANGED
package/src/animation/index.ts
CHANGED
@@ -11,7 +11,6 @@ import type {
|
|
11
11
|
PaintProps,
|
12
12
|
ShaderProps,
|
13
13
|
ImageShaderProps,
|
14
|
-
CustomDrawingNodeProps,
|
15
14
|
LineProps,
|
16
15
|
OvalProps,
|
17
16
|
PatchProps,
|
@@ -72,7 +71,6 @@ import {
|
|
72
71
|
VerticesNode,
|
73
72
|
TextNode,
|
74
73
|
OvalNode,
|
75
|
-
CustomDrawingNode,
|
76
74
|
TextPathNode,
|
77
75
|
TextBlobNode,
|
78
76
|
GlyphsNode,
|
@@ -172,16 +170,6 @@ export class JsiSkDOM implements SkDOM {
|
|
172
170
|
: new PathNode(this.ctx, props);
|
173
171
|
}
|
174
172
|
|
175
|
-
CustomDrawing(props: CustomDrawingNodeProps) {
|
176
|
-
console.warn(
|
177
|
-
// eslint-disable-next-line max-len
|
178
|
-
"The <Drawing /> component is deprecated and will be removed in the next release. For custom drawings, please sure the <Picture /> component: https://shopify.github.io/react-native-skia/docs/shapes/pictures/"
|
179
|
-
);
|
180
|
-
return NATIVE_DOM
|
181
|
-
? global.SkiaDomApi.CustomDrawingNode(props ?? {})
|
182
|
-
: new CustomDrawingNode(this.ctx, props);
|
183
|
-
}
|
184
|
-
|
185
173
|
Line(props: LineProps) {
|
186
174
|
return NATIVE_DOM
|
187
175
|
? global.SkiaDomApi.LineNode(props ?? {})
|
package/src/dom/nodes/Node.ts
CHANGED
@@ -5,22 +5,18 @@ import type {
|
|
5
5
|
NodeType,
|
6
6
|
DeclarationType,
|
7
7
|
} from "../types";
|
8
|
-
import type { DependencyManager } from "../../renderer/DependencyManager";
|
9
8
|
import type { DeclarationContext } from "../types/DeclarationContext";
|
10
9
|
|
11
10
|
export interface NodeContext {
|
12
11
|
Skia: Skia;
|
13
|
-
depMgr: DependencyManager;
|
14
12
|
}
|
15
13
|
|
16
14
|
export abstract class JsiNode<P> implements Node<P> {
|
17
15
|
protected _children: JsiNode<unknown>[] = [];
|
18
16
|
protected Skia: Skia;
|
19
|
-
protected depMgr: DependencyManager;
|
20
17
|
|
21
18
|
constructor(ctx: NodeContext, public type: NodeType, protected props: P) {
|
22
19
|
this.Skia = ctx.Skia;
|
23
|
-
this.depMgr = ctx.depMgr;
|
24
20
|
}
|
25
21
|
|
26
22
|
setProps(props: P) {
|
@@ -46,7 +42,6 @@ export abstract class JsiNode<P> implements Node<P> {
|
|
46
42
|
}
|
47
43
|
|
48
44
|
dispose() {
|
49
|
-
this.depMgr.unsubscribeNode(this);
|
50
45
|
this._children.forEach((child) => child.dispose());
|
51
46
|
}
|
52
47
|
|
@@ -1,11 +1,11 @@
|
|
1
|
-
import type { SkRRect } from "../../../skia/types";
|
1
|
+
import type { InputRRect, SkRRect } from "../../../skia/types";
|
2
2
|
import type { DrawingContext, RoundedRectProps } from "../../types";
|
3
3
|
import { NodeType } from "../../types";
|
4
4
|
import { processRRect } from "../datatypes";
|
5
5
|
import { JsiDrawingNode } from "../DrawingNode";
|
6
6
|
import type { NodeContext } from "../Node";
|
7
7
|
|
8
|
-
export class RRectNode extends JsiDrawingNode<RoundedRectProps,
|
8
|
+
export class RRectNode extends JsiDrawingNode<RoundedRectProps, InputRRect> {
|
9
9
|
rect?: SkRRect;
|
10
10
|
|
11
11
|
constructor(ctx: NodeContext, props: RoundedRectProps) {
|
package/src/dom/types/Common.ts
CHANGED
@@ -4,6 +4,7 @@ import type {
|
|
4
4
|
BlendMode,
|
5
5
|
Color,
|
6
6
|
InputMatrix,
|
7
|
+
InputRRect,
|
7
8
|
PaintStyle,
|
8
9
|
SkPaint,
|
9
10
|
SkPath,
|
@@ -48,7 +49,7 @@ export interface RRectCtor extends RectCtor {
|
|
48
49
|
}
|
49
50
|
|
50
51
|
export type RectDef = RectCtor | { rect: SkRect };
|
51
|
-
export type RRectDef = RRectCtor | { rect:
|
52
|
+
export type RRectDef = RRectCtor | { rect: InputRRect };
|
52
53
|
|
53
54
|
export interface PointCircleDef {
|
54
55
|
c?: Vector;
|
@@ -26,7 +26,6 @@ import type {
|
|
26
26
|
RRectDef,
|
27
27
|
SkEnum,
|
28
28
|
} from "./Common";
|
29
|
-
import type { DrawingContext } from "./DrawingContext";
|
30
29
|
|
31
30
|
export interface DrawingNodeProps extends GroupProps {
|
32
31
|
paint?: SkPaint;
|
@@ -48,10 +47,6 @@ export interface PathProps extends DrawingNodeProps {
|
|
48
47
|
fillType?: SkEnum<typeof FillType>;
|
49
48
|
}
|
50
49
|
|
51
|
-
export interface CustomDrawingNodeProps extends DrawingNodeProps {
|
52
|
-
drawing: (ctx: DrawingContext) => void;
|
53
|
-
}
|
54
|
-
|
55
50
|
export interface LineProps extends DrawingNodeProps {
|
56
51
|
p1: Vector;
|
57
52
|
p2: Vector;
|
package/src/dom/types/SkDOM.ts
CHANGED
@@ -19,7 +19,6 @@ import type {
|
|
19
19
|
ImageProps,
|
20
20
|
CircleProps,
|
21
21
|
PathProps,
|
22
|
-
CustomDrawingNodeProps,
|
23
22
|
LineProps,
|
24
23
|
OvalProps,
|
25
24
|
PatchProps,
|
@@ -77,9 +76,6 @@ export interface SkDOM {
|
|
77
76
|
Image(props: ImageProps): DrawingNode<ImageProps>;
|
78
77
|
Circle(props: CircleProps): DrawingNode<CircleProps>;
|
79
78
|
Path(props: PathProps): DrawingNode<PathProps>;
|
80
|
-
CustomDrawing(
|
81
|
-
props: CustomDrawingNodeProps
|
82
|
-
): DrawingNode<CustomDrawingNodeProps>;
|
83
79
|
Line(props: LineProps): DrawingNode<LineProps>;
|
84
80
|
Oval(props: OvalProps): DrawingNode<OvalProps>;
|
85
81
|
Patch(props: PatchProps): DrawingNode<PatchProps>;
|
package/src/headless/index.ts
CHANGED
@@ -6,13 +6,14 @@ import type { ReactNode } from "react";
|
|
6
6
|
import { JsiSkApi } from "../skia/web";
|
7
7
|
import { SkiaRoot } from "../renderer/Reconciler";
|
8
8
|
import { JsiDrawingContext } from "../dom/types";
|
9
|
+
import type { SkSurface } from "../skia";
|
9
10
|
|
10
11
|
export * from "../renderer/components";
|
11
12
|
|
12
13
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
13
14
|
let Skia: any;
|
14
15
|
|
15
|
-
export const
|
16
|
+
export const makeOffscreenSurface = (width: number, height: number) => {
|
16
17
|
if (!Skia) {
|
17
18
|
Skia = JsiSkApi(CanvasKit);
|
18
19
|
}
|
@@ -20,12 +21,15 @@ export const draw = (element: ReactNode, width: number, height: number) => {
|
|
20
21
|
if (surface === null) {
|
21
22
|
throw new Error("Couldn't create surface!");
|
22
23
|
}
|
24
|
+
return surface;
|
25
|
+
};
|
26
|
+
|
27
|
+
export const drawOffscreen = (surface: SkSurface, element: ReactNode) => {
|
23
28
|
const root = new SkiaRoot(Skia);
|
24
29
|
root.render(element);
|
25
30
|
const canvas = surface.getCanvas();
|
26
31
|
const ctx = new JsiDrawingContext(Skia, canvas);
|
27
32
|
root.dom.render(ctx);
|
28
33
|
surface.flush();
|
29
|
-
|
30
|
-
return image;
|
34
|
+
return surface.makeImageSnapshot();
|
31
35
|
};
|
package/src/index.ts
CHANGED
package/src/mock/index.ts
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
import type { CanvasKit } from "canvaskit-wasm";
|
2
2
|
|
3
3
|
import { JsiSkApi } from "../skia/web";
|
4
|
-
import { ValueApi } from "../values/web";
|
5
4
|
|
6
5
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
7
6
|
const Noop: () => any = () => undefined;
|
@@ -10,13 +9,11 @@ const NoopSharedValue = () => ({ value: 0 });
|
|
10
9
|
|
11
10
|
export const Mock = (CanvasKit: CanvasKit) => {
|
12
11
|
global.SkiaApi = JsiSkApi(CanvasKit);
|
13
|
-
global.SkiaValueApi = ValueApi;
|
14
12
|
const Skia = global.SkiaApi;
|
15
13
|
return {
|
16
14
|
Skia,
|
17
15
|
...require("../renderer/components"),
|
18
16
|
...require("../skia"),
|
19
|
-
...require("../values"),
|
20
17
|
...require("../animation"),
|
21
18
|
...require("../dom/types"),
|
22
19
|
...require("../dom/nodes"),
|
package/src/renderer/Canvas.tsx
CHANGED
@@ -18,11 +18,9 @@ import { SkiaDomView } from "../views";
|
|
18
18
|
import { SkiaDomView as SkiaDomViewWeb } from "../views/SkiaDomView.web";
|
19
19
|
import { Skia } from "../skia/Skia";
|
20
20
|
import type { TouchHandler, SkiaBaseViewProps } from "../views";
|
21
|
-
import type { SkiaValue } from "../values/types";
|
22
21
|
|
23
22
|
import { SkiaRoot } from "./Reconciler";
|
24
23
|
import { NATIVE_DOM } from "./HostComponents";
|
25
|
-
import { isValue } from "./processors";
|
26
24
|
|
27
25
|
export const useCanvasRef = () => useRef<SkiaDomView>(null);
|
28
26
|
|
@@ -43,9 +41,7 @@ const useOnSizeEvent = (
|
|
43
41
|
}
|
44
42
|
const { width, height } = event.nativeEvent.layout;
|
45
43
|
|
46
|
-
if (
|
47
|
-
resultValue.current = { width, height };
|
48
|
-
} else if (resultValue) {
|
44
|
+
if (resultValue) {
|
49
45
|
resultValue.value = { width, height };
|
50
46
|
}
|
51
47
|
},
|
@@ -78,18 +74,9 @@ export const Canvas = forwardRef<SkiaDomView, CanvasProps>(
|
|
78
74
|
return id;
|
79
75
|
}, [innerRef]);
|
80
76
|
|
81
|
-
const registerValues = useCallback(
|
82
|
-
(values: Array<SkiaValue<unknown>>) => {
|
83
|
-
if (ref.current !== null) {
|
84
|
-
return ref.current.registerValues(values);
|
85
|
-
}
|
86
|
-
return () => {};
|
87
|
-
},
|
88
|
-
[ref]
|
89
|
-
);
|
90
77
|
const root = useMemo(
|
91
|
-
() => new SkiaRoot(Skia,
|
92
|
-
[redraw,
|
78
|
+
() => new SkiaRoot(Skia, redraw, getNativeId),
|
79
|
+
[redraw, getNativeId]
|
93
80
|
);
|
94
81
|
|
95
82
|
// Render effect
|
@@ -97,11 +84,6 @@ export const Canvas = forwardRef<SkiaDomView, CanvasProps>(
|
|
97
84
|
root.render(children);
|
98
85
|
}, [children, root, redraw]);
|
99
86
|
|
100
|
-
useEffect(() => {
|
101
|
-
return () => {
|
102
|
-
root.unmount();
|
103
|
-
};
|
104
|
-
}, [root]);
|
105
87
|
if (NATIVE_DOM) {
|
106
88
|
return (
|
107
89
|
<SkiaDomView
|
@@ -7,18 +7,15 @@ import type {
|
|
7
7
|
} from "../dom/types";
|
8
8
|
import type { Skia } from "../skia/types";
|
9
9
|
|
10
|
-
import type { DependencyManager } from "./DependencyManager";
|
11
|
-
|
12
10
|
export class Container {
|
13
11
|
private _root: RenderNode<GroupProps>;
|
14
12
|
public Sk: SkDOM;
|
15
13
|
constructor(
|
16
14
|
Skia: Skia,
|
17
|
-
public depMgr: DependencyManager,
|
18
15
|
public redraw: () => void = () => {},
|
19
16
|
public getNativeId: () => number = () => 0
|
20
17
|
) {
|
21
|
-
this.Sk = new JsiSkDOM({ Skia
|
18
|
+
this.Sk = new JsiSkDOM({ Skia });
|
22
19
|
this._root = this.Sk.Group();
|
23
20
|
}
|
24
21
|
|
@@ -8,7 +8,6 @@ import type {
|
|
8
8
|
ImageProps,
|
9
9
|
PaintProps,
|
10
10
|
PathProps,
|
11
|
-
CustomDrawingNodeProps,
|
12
11
|
LineProps,
|
13
12
|
OvalProps,
|
14
13
|
DiffRectProps,
|
@@ -59,12 +58,10 @@ import type {
|
|
59
58
|
} from "../dom/types/ImageFilters";
|
60
59
|
import type { SkRect, SkRRect } from "../skia/types";
|
61
60
|
import type { JsiDrawingNode } from "../dom/nodes/DrawingNode";
|
62
|
-
import type { SkiaValue } from "../values";
|
63
61
|
|
64
62
|
import type { Container } from "./Container";
|
65
63
|
import { exhaustiveCheck } from "./typeddash";
|
66
64
|
import type { SkiaProps } from "./processors";
|
67
|
-
import type { DependencyManager } from "./DependencyManager";
|
68
65
|
|
69
66
|
// This flag should only be turned on for debugging/testing
|
70
67
|
const shouldUseJSDomOnNative = false;
|
@@ -72,10 +69,6 @@ export const NATIVE_DOM = shouldUseJSDomOnNative ? false : !!global.SkiaDomApi;
|
|
72
69
|
|
73
70
|
declare global {
|
74
71
|
var SkiaDomApi: {
|
75
|
-
DependencyManager: (
|
76
|
-
registerValues: (values: Array<SkiaValue<unknown>>) => () => void
|
77
|
-
) => DependencyManager;
|
78
|
-
|
79
72
|
// FIXME: We need a better type for this
|
80
73
|
RectNode: (props: RectProps) => JsiDrawingNode<RectProps, SkRect>;
|
81
74
|
RRectNode: (
|
@@ -86,9 +79,6 @@ declare global {
|
|
86
79
|
FillNode: (props: PaintProps) => RenderNode<PaintProps>;
|
87
80
|
CircleNode: (props: CircleProps) => RenderNode<CircleProps>;
|
88
81
|
PathNode: (props: PathProps) => RenderNode<PathProps>;
|
89
|
-
CustomDrawingNode: (
|
90
|
-
props: CustomDrawingNodeProps
|
91
|
-
) => RenderNode<CustomDrawingNodeProps>;
|
92
82
|
LineNode: (props: LineProps) => RenderNode<LineProps>;
|
93
83
|
ImageNode: (props: ImageProps) => RenderNode<ImageProps>;
|
94
84
|
OvalNode: (props: OvalProps) => RenderNode<OvalProps>;
|
@@ -211,7 +201,6 @@ declare global {
|
|
211
201
|
skImage: SkiaProps<ImageProps>;
|
212
202
|
skCircle: SkiaProps<CircleProps>;
|
213
203
|
skPath: SkiaProps<PathProps>;
|
214
|
-
skDrawing: SkiaProps<CustomDrawingNodeProps>;
|
215
204
|
skLine: SkiaProps<LineProps>;
|
216
205
|
skOval: SkiaProps<OvalProps>;
|
217
206
|
skPatch: SkiaProps<PatchProps>;
|
@@ -302,8 +291,6 @@ export const createNode = (
|
|
302
291
|
return Sk.Circle(props);
|
303
292
|
case NodeType.Path:
|
304
293
|
return Sk.Path(props);
|
305
|
-
case NodeType.Drawing:
|
306
|
-
return Sk.CustomDrawing(props);
|
307
294
|
case NodeType.Line:
|
308
295
|
return Sk.Line(props);
|
309
296
|
case NodeType.Oval:
|
@@ -3,7 +3,6 @@ import type { HostConfig } from "react-reconciler";
|
|
3
3
|
import { DefaultEventPriority } from "react-reconciler/constants";
|
4
4
|
|
5
5
|
import type { NodeType, Node } from "../dom/types";
|
6
|
-
import type { SkiaValue } from "../values";
|
7
6
|
import {
|
8
7
|
bindReanimatedProps,
|
9
8
|
extractReanimatedProps,
|
@@ -12,9 +11,7 @@ import {
|
|
12
11
|
|
13
12
|
import type { Container } from "./Container";
|
14
13
|
import { createNode } from "./HostComponents";
|
15
|
-
import
|
16
|
-
import { isSelector, isValue } from "./processors";
|
17
|
-
import { mapKeys, shallowEq } from "./typeddash";
|
14
|
+
import { shallowEq } from "./typeddash";
|
18
15
|
|
19
16
|
const DEBUG = false;
|
20
17
|
export const debug = (...args: Parameters<typeof console.log>) => {
|
@@ -128,9 +125,8 @@ export const skHostConfig: SkiaHostConfig = {
|
|
128
125
|
) {
|
129
126
|
debug("createInstance", type);
|
130
127
|
const [props, reanimatedProps] = extractReanimatedProps(pristineProps);
|
131
|
-
const node = createNode(container, type,
|
128
|
+
const node = createNode(container, type, props);
|
132
129
|
bindReanimatedProps(container, node, reanimatedProps);
|
133
|
-
container.depMgr.subscribeNode(node, props);
|
134
130
|
return node;
|
135
131
|
},
|
136
132
|
|
@@ -162,7 +158,6 @@ export const skHostConfig: SkiaHostConfig = {
|
|
162
158
|
|
163
159
|
resetAfterCommit(container) {
|
164
160
|
debug("resetAfterCommit");
|
165
|
-
container.depMgr.update();
|
166
161
|
container.redraw();
|
167
162
|
},
|
168
163
|
|
@@ -201,10 +196,8 @@ export const skHostConfig: SkiaHostConfig = {
|
|
201
196
|
return;
|
202
197
|
}
|
203
198
|
const [props, reanimatedProps] = extractReanimatedProps(nextProps);
|
204
|
-
|
205
|
-
instance.setProps(materialize(props));
|
199
|
+
instance.setProps(props);
|
206
200
|
bindReanimatedProps(updatePayload, instance, reanimatedProps);
|
207
|
-
updatePayload.depMgr.subscribeNode(instance, props);
|
208
201
|
},
|
209
202
|
|
210
203
|
commitTextUpdate: (
|
@@ -249,17 +242,3 @@ export const skHostConfig: SkiaHostConfig = {
|
|
249
242
|
afterActiveInstanceBlur: () => {},
|
250
243
|
detachDeletedInstance: () => {},
|
251
244
|
};
|
252
|
-
|
253
|
-
const materialize = <P>(props: AnimatedProps<P>) => {
|
254
|
-
const result = { ...props } as P;
|
255
|
-
mapKeys(props).forEach((key) => {
|
256
|
-
const prop = props[key];
|
257
|
-
if (isValue(prop)) {
|
258
|
-
result[key] = (prop as SkiaValue<P[typeof key]>).current;
|
259
|
-
} else if (isSelector(prop)) {
|
260
|
-
result[key] = prop.selector(prop.value.current) as P[typeof key];
|
261
|
-
}
|
262
|
-
});
|
263
|
-
|
264
|
-
return result;
|
265
|
-
};
|
@@ -3,22 +3,12 @@ import type { OpaqueRoot } from "react-reconciler";
|
|
3
3
|
import ReactReconciler from "react-reconciler";
|
4
4
|
|
5
5
|
import type { Skia } from "../skia/types";
|
6
|
-
import type { SkiaValue } from "../values/types";
|
7
6
|
|
8
|
-
import { DependencyManager } from "./DependencyManager";
|
9
7
|
import { skHostConfig, debug as hostDebug } from "./HostConfig";
|
10
8
|
import { Container } from "./Container";
|
11
|
-
import { NATIVE_DOM } from "./HostComponents";
|
12
9
|
|
13
10
|
const skiaReconciler = ReactReconciler(skHostConfig);
|
14
11
|
|
15
|
-
type RegisterValues = (values: Array<SkiaValue<unknown>>) => () => void;
|
16
|
-
|
17
|
-
const createDependencyManager = (registerValues: RegisterValues) =>
|
18
|
-
NATIVE_DOM
|
19
|
-
? global.SkiaDomApi.DependencyManager(registerValues)
|
20
|
-
: new DependencyManager(registerValues);
|
21
|
-
|
22
12
|
skiaReconciler.injectIntoDevTools({
|
23
13
|
bundleType: 1,
|
24
14
|
version: "0.0.1",
|
@@ -31,12 +21,10 @@ export class SkiaRoot {
|
|
31
21
|
|
32
22
|
constructor(
|
33
23
|
Skia: Skia,
|
34
|
-
registerValues: RegisterValues = () => () => {},
|
35
24
|
redraw: () => void = () => {},
|
36
25
|
getNativeId: () => number = () => 0
|
37
26
|
) {
|
38
|
-
|
39
|
-
this.container = new Container(Skia, depMgr, redraw, getNativeId);
|
27
|
+
this.container = new Container(Skia, redraw, getNativeId);
|
40
28
|
this.root = skiaReconciler.createContainer(
|
41
29
|
this.container,
|
42
30
|
0,
|
@@ -56,12 +44,6 @@ export class SkiaRoot {
|
|
56
44
|
});
|
57
45
|
}
|
58
46
|
|
59
|
-
unmount() {
|
60
|
-
skiaReconciler.updateContainer(null, this.root, null, () => {
|
61
|
-
this.container.depMgr.remove();
|
62
|
-
});
|
63
|
-
}
|
64
|
-
|
65
47
|
get dom() {
|
66
48
|
return this.container.root;
|
67
49
|
}
|
package/src/renderer/index.ts
CHANGED
@@ -1,58 +1,8 @@
|
|
1
|
-
import type { SkiaSelector, SkiaValue } from "../../../values";
|
2
|
-
|
3
1
|
export type SharedValueType<T = number> = {
|
4
2
|
value: T;
|
5
3
|
};
|
6
4
|
|
7
|
-
export
|
8
|
-
if (value === undefined || value === null) {
|
9
|
-
return false;
|
10
|
-
}
|
11
|
-
try {
|
12
|
-
if (
|
13
|
-
typeof value === "object" &&
|
14
|
-
"__typename__" in value &&
|
15
|
-
(value as unknown as SkiaValue<unknown>).__typename__ === "RNSkValue"
|
16
|
-
) {
|
17
|
-
return true;
|
18
|
-
}
|
19
|
-
} catch {}
|
20
|
-
return false;
|
21
|
-
};
|
22
|
-
|
23
|
-
export const isSelector = <T, R>(
|
24
|
-
value: unknown
|
25
|
-
): value is {
|
26
|
-
selector: (v: T) => R;
|
27
|
-
value: SkiaValue<T>;
|
28
|
-
} => {
|
29
|
-
if (value) {
|
30
|
-
return (
|
31
|
-
typeof value === "object" &&
|
32
|
-
"selector" in value &&
|
33
|
-
"value" in value &&
|
34
|
-
(value as Record<string, unknown>).selector !== undefined &&
|
35
|
-
(value as Record<string, unknown>).value !== undefined
|
36
|
-
);
|
37
|
-
}
|
38
|
-
return false;
|
39
|
-
};
|
40
|
-
|
41
|
-
export const isAnimated = <T>(props: AnimatedProps<T>) => {
|
42
|
-
for (const value of Object.values(props)) {
|
43
|
-
if (isValue(value) || isSelector(value)) {
|
44
|
-
return true;
|
45
|
-
}
|
46
|
-
}
|
47
|
-
return false;
|
48
|
-
};
|
49
|
-
|
50
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
51
|
-
export type AnimatedProp<T, P = any> =
|
52
|
-
| T
|
53
|
-
| SkiaValue<T>
|
54
|
-
| SkiaSelector<T, P>
|
55
|
-
| SharedValueType<T>;
|
5
|
+
export type AnimatedProp<T> = T | SharedValueType<T>;
|
56
6
|
|
57
7
|
export type AnimatedProps<T, O extends keyof T | never = never> = {
|
58
8
|
[K in keyof T]: K extends "children"
|