@shopify/react-native-skia 1.7.5 → 1.7.7
Sign up to get free protection for your applications and to get access to all the features.
- package/android/cpp/rnskia-android/OpenGLWindowContext.h +8 -1
- package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.cpp +4 -4
- package/android/cpp/rnskia-android/RNSkOpenGLCanvasProvider.h +2 -2
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaBaseView.java +13 -0
- package/android/src/main/java/com/shopify/reactnative/skia/SkiaTextureView.java +24 -1
- package/cpp/rnskia/RNSkJsiViewApi.h +0 -3
- package/cpp/rnskia/RNSkView.h +6 -6
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.h +2 -2
- package/ios/RNSkia-iOS/RNSkMetalCanvasProvider.mm +2 -2
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +2 -2
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Circle.d.ts +2 -3
- package/lib/commonjs/dom/nodes/datatypes/Circle.js +11 -6
- package/lib/commonjs/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Enum.js +1 -0
- package/lib/commonjs/dom/nodes/datatypes/Enum.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Fitting.js +1 -10
- package/lib/commonjs/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js +3 -2
- package/lib/commonjs/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Path.js +4 -1
- package/lib/commonjs/dom/nodes/datatypes/Path.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Radius.js +1 -0
- package/lib/commonjs/dom/nodes/datatypes/Radius.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +3 -1
- package/lib/commonjs/dom/nodes/datatypes/Rect.js +17 -7
- package/lib/commonjs/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/commonjs/dom/nodes/datatypes/Transform.d.ts +2 -1
- package/lib/commonjs/dom/nodes/datatypes/Transform.js +32 -1
- package/lib/commonjs/dom/nodes/datatypes/Transform.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/Box.js +4 -5
- package/lib/commonjs/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/commonjs/dom/nodes/drawings/CircleNode.js +1 -1
- package/lib/commonjs/dom/nodes/drawings/CircleNode.js.map +1 -1
- package/lib/commonjs/dom/types/DeclarationContext.d.ts +4 -4
- package/lib/commonjs/dom/types/DeclarationContext.js +8 -2
- package/lib/commonjs/dom/types/DeclarationContext.js.map +1 -1
- package/lib/commonjs/external/reanimated/renderHelpers.d.ts +2 -0
- package/lib/commonjs/external/reanimated/renderHelpers.js +11 -6
- package/lib/commonjs/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/commonjs/renderer/HostConfig.js +8 -4
- package/lib/commonjs/renderer/HostConfig.js.map +1 -1
- package/lib/commonjs/renderer/__tests__/setup.d.ts +2 -3
- package/lib/commonjs/renderer/processors/Animations/Animations.d.ts +1 -2
- package/lib/commonjs/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/commonjs/renderer/typeddash.js +5 -1
- package/lib/commonjs/renderer/typeddash.js.map +1 -1
- package/lib/commonjs/skia/__tests__/setup.d.ts +0 -3
- package/lib/commonjs/skia/types/Path/Path.js +5 -1
- package/lib/commonjs/skia/types/Path/Path.js.map +1 -1
- package/lib/commonjs/skia/types/RRect.d.ts +1 -1
- package/lib/commonjs/skia/types/RRect.js +7 -3
- package/lib/commonjs/skia/types/RRect.js.map +1 -1
- package/lib/commonjs/skia/types/Shader/Shader.js +8 -6
- package/lib/commonjs/skia/types/Shader/Shader.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraphStyle.js +1 -1
- package/lib/commonjs/skia/web/JsiSkParagraphStyle.js.map +1 -1
- package/lib/commonjs/sksg/Container.d.ts +19 -0
- package/lib/commonjs/sksg/Container.js +102 -0
- package/lib/commonjs/sksg/Container.js.map +1 -0
- package/lib/commonjs/sksg/DrawingContext.d.ts +16 -0
- package/lib/commonjs/sksg/DrawingContext.js +186 -0
- package/lib/commonjs/sksg/DrawingContext.js.map +1 -0
- package/lib/commonjs/sksg/HostConfig.d.ts +19 -0
- package/lib/commonjs/sksg/HostConfig.js +168 -0
- package/lib/commonjs/sksg/HostConfig.js.map +1 -0
- package/lib/commonjs/sksg/Reconciler.d.ts +17 -0
- package/lib/commonjs/sksg/Reconciler.js +54 -0
- package/lib/commonjs/sksg/Reconciler.js.map +1 -0
- package/lib/commonjs/sksg/__tests__/MockDeclaration.d.ts +57 -0
- package/lib/commonjs/sksg/nodes/Node.d.ts +7 -0
- package/lib/commonjs/sksg/nodes/Node.js +6 -0
- package/lib/commonjs/sksg/nodes/Node.js.map +1 -0
- package/lib/commonjs/sksg/nodes/colorFilters.d.ts +7 -0
- package/lib/commonjs/sksg/nodes/colorFilters.js +55 -0
- package/lib/commonjs/sksg/nodes/colorFilters.js.map +1 -0
- package/lib/commonjs/sksg/nodes/context.d.ts +3 -0
- package/lib/commonjs/sksg/nodes/context.js +448 -0
- package/lib/commonjs/sksg/nodes/context.js.map +1 -0
- package/lib/commonjs/sksg/nodes/drawings.d.ts +31 -0
- package/lib/commonjs/sksg/nodes/drawings.js +361 -0
- package/lib/commonjs/sksg/nodes/drawings.js.map +1 -0
- package/lib/commonjs/sksg/nodes/imageFilters.d.ts +14 -0
- package/lib/commonjs/sksg/nodes/imageFilters.js +135 -0
- package/lib/commonjs/sksg/nodes/imageFilters.js.map +1 -0
- package/lib/commonjs/sksg/nodes/index.d.ts +3 -0
- package/lib/commonjs/sksg/nodes/index.js +39 -0
- package/lib/commonjs/sksg/nodes/index.js.map +1 -0
- package/lib/commonjs/sksg/nodes/paint.d.ts +2 -0
- package/lib/commonjs/sksg/nodes/paint.js +80 -0
- package/lib/commonjs/sksg/nodes/paint.js.map +1 -0
- package/lib/commonjs/sksg/nodes/pathEffects.d.ts +8 -0
- package/lib/commonjs/sksg/nodes/pathEffects.js +84 -0
- package/lib/commonjs/sksg/nodes/pathEffects.js.map +1 -0
- package/lib/commonjs/sksg/nodes/shaders.d.ts +10 -0
- package/lib/commonjs/sksg/nodes/shaders.js +156 -0
- package/lib/commonjs/sksg/nodes/shaders.js.map +1 -0
- package/lib/commonjs/sksg/nodes/utils.d.ts +3 -0
- package/lib/commonjs/sksg/nodes/utils.js +25 -0
- package/lib/commonjs/sksg/nodes/utils.js.map +1 -0
- package/lib/commonjs/views/SkiaDomView.js +3 -1
- package/lib/commonjs/views/SkiaDomView.js.map +1 -1
- package/lib/commonjs/views/SkiaPictureView.js +0 -2
- package/lib/commonjs/views/SkiaPictureView.js.map +1 -1
- package/lib/commonjs/views/types.d.ts +2 -2
- package/lib/commonjs/views/types.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +2 -2
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.d.ts +2 -3
- package/lib/module/dom/nodes/datatypes/Circle.js +12 -6
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Enum.js +2 -0
- package/lib/module/dom/nodes/datatypes/Enum.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Fitting.js +2 -10
- package/lib/module/dom/nodes/datatypes/Fitting.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.js +4 -2
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Path.js +5 -1
- package/lib/module/dom/nodes/datatypes/Path.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Radius.js +2 -0
- package/lib/module/dom/nodes/datatypes/Radius.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.d.ts +3 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +14 -5
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Transform.d.ts +2 -1
- package/lib/module/dom/nodes/datatypes/Transform.js +31 -0
- package/lib/module/dom/nodes/datatypes/Transform.js.map +1 -1
- package/lib/module/dom/nodes/drawings/Box.js +1 -2
- package/lib/module/dom/nodes/drawings/Box.js.map +1 -1
- package/lib/module/dom/nodes/drawings/CircleNode.js +1 -1
- package/lib/module/dom/nodes/drawings/CircleNode.js.map +1 -1
- package/lib/module/dom/types/DeclarationContext.d.ts +4 -4
- package/lib/module/dom/types/DeclarationContext.js +9 -2
- package/lib/module/dom/types/DeclarationContext.js.map +1 -1
- package/lib/module/external/reanimated/renderHelpers.d.ts +2 -0
- package/lib/module/external/reanimated/renderHelpers.js +8 -4
- package/lib/module/external/reanimated/renderHelpers.js.map +1 -1
- package/lib/module/renderer/HostConfig.js +8 -4
- package/lib/module/renderer/HostConfig.js.map +1 -1
- package/lib/module/renderer/__tests__/setup.d.ts +2 -3
- package/lib/module/renderer/processors/Animations/Animations.d.ts +1 -2
- package/lib/module/renderer/processors/Animations/Animations.js.map +1 -1
- package/lib/module/renderer/typeddash.js +5 -1
- package/lib/module/renderer/typeddash.js.map +1 -1
- package/lib/module/skia/__tests__/setup.d.ts +0 -3
- package/lib/module/skia/types/Path/Path.js +5 -1
- package/lib/module/skia/types/Path/Path.js.map +1 -1
- package/lib/module/skia/types/RRect.d.ts +1 -1
- package/lib/module/skia/types/RRect.js +7 -3
- package/lib/module/skia/types/RRect.js.map +1 -1
- package/lib/module/skia/types/Shader/Shader.js +9 -6
- package/lib/module/skia/types/Shader/Shader.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphStyle.js +1 -1
- package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
- package/lib/module/sksg/Container.d.ts +19 -0
- package/lib/module/sksg/Container.js +94 -0
- package/lib/module/sksg/Container.js.map +1 -0
- package/lib/module/sksg/DrawingContext.d.ts +16 -0
- package/lib/module/sksg/DrawingContext.js +180 -0
- package/lib/module/sksg/DrawingContext.js.map +1 -0
- package/lib/module/sksg/HostConfig.d.ts +19 -0
- package/lib/module/sksg/HostConfig.js +161 -0
- package/lib/module/sksg/HostConfig.js.map +1 -0
- package/lib/module/sksg/Reconciler.d.ts +17 -0
- package/lib/module/sksg/Reconciler.js +46 -0
- package/lib/module/sksg/Reconciler.js.map +1 -0
- package/lib/module/sksg/__tests__/MockDeclaration.d.ts +57 -0
- package/lib/module/sksg/nodes/Node.d.ts +7 -0
- package/lib/module/sksg/nodes/Node.js +2 -0
- package/lib/module/sksg/nodes/Node.js.map +1 -0
- package/lib/module/sksg/nodes/colorFilters.d.ts +7 -0
- package/lib/module/sksg/nodes/colorFilters.js +44 -0
- package/lib/module/sksg/nodes/colorFilters.js.map +1 -0
- package/lib/module/sksg/nodes/context.d.ts +3 -0
- package/lib/module/sksg/nodes/context.js +443 -0
- package/lib/module/sksg/nodes/context.js.map +1 -0
- package/lib/module/sksg/nodes/drawings.d.ts +31 -0
- package/lib/module/sksg/nodes/drawings.js +334 -0
- package/lib/module/sksg/nodes/drawings.js.map +1 -0
- package/lib/module/sksg/nodes/imageFilters.d.ts +14 -0
- package/lib/module/sksg/nodes/imageFilters.js +122 -0
- package/lib/module/sksg/nodes/imageFilters.js.map +1 -0
- package/lib/module/sksg/nodes/index.d.ts +3 -0
- package/lib/module/sksg/nodes/index.js +4 -0
- package/lib/module/sksg/nodes/index.js.map +1 -0
- package/lib/module/sksg/nodes/paint.d.ts +2 -0
- package/lib/module/sksg/nodes/paint.js +74 -0
- package/lib/module/sksg/nodes/paint.js.map +1 -0
- package/lib/module/sksg/nodes/pathEffects.d.ts +8 -0
- package/lib/module/sksg/nodes/pathEffects.js +72 -0
- package/lib/module/sksg/nodes/pathEffects.js.map +1 -0
- package/lib/module/sksg/nodes/shaders.d.ts +10 -0
- package/lib/module/sksg/nodes/shaders.js +142 -0
- package/lib/module/sksg/nodes/shaders.js.map +1 -0
- package/lib/module/sksg/nodes/utils.d.ts +3 -0
- package/lib/module/sksg/nodes/utils.js +18 -0
- package/lib/module/sksg/nodes/utils.js.map +1 -0
- package/lib/module/views/SkiaDomView.js +3 -1
- package/lib/module/views/SkiaDomView.js.map +1 -1
- package/lib/module/views/SkiaPictureView.js +0 -2
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/types.d.ts +2 -2
- package/lib/module/views/types.js.map +1 -1
- package/lib/typescript/lib/commonjs/dom/nodes/datatypes/Circle.d.ts +1 -1
- package/lib/typescript/lib/commonjs/dom/nodes/datatypes/Rect.d.ts +2 -0
- package/lib/typescript/lib/commonjs/dom/nodes/datatypes/Transform.d.ts +1 -0
- package/lib/typescript/lib/commonjs/external/reanimated/renderHelpers.d.ts +2 -0
- package/lib/typescript/lib/commonjs/renderer/HostConfig.d.ts +3 -1
- package/lib/typescript/lib/commonjs/sksg/Container.d.ts +16 -0
- package/lib/typescript/lib/commonjs/sksg/DrawingContext.d.ts +26 -0
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +50 -0
- package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +16 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/Node.d.ts +1 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/colorFilters.d.ts +7 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/context.d.ts +2 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/drawings.d.ts +23 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/imageFilters.d.ts +10 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/index.d.ts +1 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/paint.d.ts +2 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/pathEffects.d.ts +8 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/shaders.d.ts +10 -0
- package/lib/typescript/lib/commonjs/sksg/nodes/utils.d.ts +3 -0
- package/lib/typescript/lib/module/dom/nodes/datatypes/Circle.d.ts +1 -1
- package/lib/typescript/lib/module/dom/nodes/datatypes/Rect.d.ts +2 -0
- package/lib/typescript/lib/module/dom/nodes/datatypes/Transform.d.ts +1 -0
- package/lib/typescript/lib/module/external/reanimated/renderHelpers.d.ts +2 -0
- package/lib/typescript/lib/module/mock/index.d.ts +4 -1
- package/lib/typescript/lib/module/renderer/HostConfig.d.ts +3 -1
- package/lib/typescript/lib/module/sksg/Container.d.ts +15 -0
- package/lib/typescript/lib/module/sksg/DrawingContext.d.ts +26 -0
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +49 -0
- package/lib/typescript/lib/module/sksg/Reconciler.d.ts +15 -0
- package/lib/typescript/lib/module/sksg/nodes/colorFilters.d.ts +6 -0
- package/lib/typescript/lib/module/sksg/nodes/context.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/nodes/drawings.d.ts +22 -0
- package/lib/typescript/lib/module/sksg/nodes/imageFilters.d.ts +9 -0
- package/lib/typescript/lib/module/sksg/nodes/index.d.ts +3 -0
- package/lib/typescript/lib/module/sksg/nodes/paint.d.ts +1 -0
- package/lib/typescript/lib/module/sksg/nodes/pathEffects.d.ts +7 -0
- package/lib/typescript/lib/module/sksg/nodes/shaders.d.ts +9 -0
- package/lib/typescript/lib/module/sksg/nodes/utils.d.ts +2 -0
- package/lib/typescript/src/dom/nodes/datatypes/Circle.d.ts +2 -3
- package/lib/typescript/src/dom/nodes/datatypes/Rect.d.ts +3 -1
- package/lib/typescript/src/dom/nodes/datatypes/Transform.d.ts +2 -1
- package/lib/typescript/src/dom/types/DeclarationContext.d.ts +4 -4
- package/lib/typescript/src/external/reanimated/renderHelpers.d.ts +2 -0
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +2 -3
- package/lib/typescript/src/renderer/processors/Animations/Animations.d.ts +1 -2
- package/lib/typescript/src/skia/__tests__/setup.d.ts +0 -3
- package/lib/typescript/src/skia/types/RRect.d.ts +1 -1
- package/lib/typescript/src/sksg/Container.d.ts +19 -0
- package/lib/typescript/src/sksg/DrawingContext.d.ts +16 -0
- package/lib/typescript/src/sksg/HostConfig.d.ts +19 -0
- package/lib/typescript/src/sksg/Reconciler.d.ts +17 -0
- package/lib/typescript/src/sksg/__tests__/MockDeclaration.d.ts +57 -0
- package/lib/typescript/src/sksg/nodes/Node.d.ts +7 -0
- package/lib/typescript/src/sksg/nodes/colorFilters.d.ts +7 -0
- package/lib/typescript/src/sksg/nodes/context.d.ts +3 -0
- package/lib/typescript/src/sksg/nodes/drawings.d.ts +31 -0
- package/lib/typescript/src/sksg/nodes/imageFilters.d.ts +14 -0
- package/lib/typescript/src/sksg/nodes/index.d.ts +3 -0
- package/lib/typescript/src/sksg/nodes/paint.d.ts +2 -0
- package/lib/typescript/src/sksg/nodes/pathEffects.d.ts +8 -0
- package/lib/typescript/src/sksg/nodes/shaders.d.ts +10 -0
- package/lib/typescript/src/sksg/nodes/utils.d.ts +3 -0
- package/lib/typescript/src/views/types.d.ts +2 -2
- package/libs/{ios → apple}/libskia.xcframework/Info.plist +15 -0
- package/libs/{ios → apple}/libskia.xcframework/ios-arm64_arm64e/libskia.a +0 -0
- package/libs/{ios → apple}/libskia.xcframework/ios-arm64_arm64e_x86_64-simulator/libskia.a +0 -0
- package/libs/apple/libskia.xcframework/macos-arm64_x86_64/libskia.a +0 -0
- package/libs/{ios → apple}/libskottie.xcframework/Info.plist +20 -5
- package/libs/{ios → apple}/libskottie.xcframework/ios-arm64_arm64e/libskottie.a +0 -0
- package/libs/{ios → apple}/libskottie.xcframework/ios-arm64_arm64e_x86_64-simulator/libskottie.a +0 -0
- package/libs/apple/libskottie.xcframework/macos-arm64_x86_64/libskottie.a +0 -0
- package/libs/{ios → apple}/libskparagraph.xcframework/Info.plist +20 -5
- package/libs/{ios → apple}/libskparagraph.xcframework/ios-arm64_arm64e/libskparagraph.a +0 -0
- package/libs/{ios → apple}/libskparagraph.xcframework/ios-arm64_arm64e_x86_64-simulator/libskparagraph.a +0 -0
- package/libs/apple/libskparagraph.xcframework/macos-arm64_x86_64/libskparagraph.a +0 -0
- package/libs/{ios → apple}/libsksg.xcframework/Info.plist +15 -0
- package/libs/{ios → apple}/libsksg.xcframework/ios-arm64_arm64e/libsksg.a +0 -0
- package/libs/{ios → apple}/libsksg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsksg.a +0 -0
- package/libs/apple/libsksg.xcframework/macos-arm64_x86_64/libsksg.a +0 -0
- package/libs/{ios → apple}/libskshaper.xcframework/Info.plist +20 -5
- package/libs/{ios → apple}/libskshaper.xcframework/ios-arm64_arm64e/libskshaper.a +0 -0
- package/libs/{ios → apple}/libskshaper.xcframework/ios-arm64_arm64e_x86_64-simulator/libskshaper.a +0 -0
- package/libs/apple/libskshaper.xcframework/macos-arm64_x86_64/libskshaper.a +0 -0
- package/libs/{ios → apple}/libskunicode_core.xcframework/Info.plist +18 -3
- package/libs/{ios → apple}/libskunicode_core.xcframework/ios-arm64_arm64e/libskunicode_core.a +0 -0
- package/libs/{ios → apple}/libskunicode_core.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_core.a +0 -0
- package/libs/apple/libskunicode_core.xcframework/macos-arm64_x86_64/libskunicode_core.a +0 -0
- package/libs/{ios → apple}/libskunicode_libgrapheme.xcframework/Info.plist +15 -0
- package/libs/{ios → apple}/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e/libskunicode_libgrapheme.a +0 -0
- package/libs/{ios → apple}/libskunicode_libgrapheme.xcframework/ios-arm64_arm64e_x86_64-simulator/libskunicode_libgrapheme.a +0 -0
- package/libs/apple/libskunicode_libgrapheme.xcframework/macos-arm64_x86_64/libskunicode_libgrapheme.a +0 -0
- package/libs/{ios → apple}/libsvg.xcframework/Info.plist +15 -0
- package/libs/{ios → apple}/libsvg.xcframework/ios-arm64_arm64e/libsvg.a +0 -0
- package/libs/{ios → apple}/libsvg.xcframework/ios-arm64_arm64e_x86_64-simulator/libsvg.a +0 -0
- package/libs/apple/libsvg.xcframework/macos-arm64_x86_64/libsvg.a +0 -0
- package/package.json +3 -3
- package/react-native-skia.podspec +9 -9
- package/src/__tests__/setup.ts +1 -1
- package/src/__tests__/snapshots/sksg/breathe-0.png +0 -0
- package/src/__tests__/snapshots/sksg/breathe.png +0 -0
- package/src/__tests__/snapshots/sksg/simple.png +0 -0
- package/src/__tests__/snapshots/sksg/simple2.png +0 -0
- package/src/dom/nodes/JsiSkDOM.ts +2 -4
- package/src/dom/nodes/datatypes/Circle.ts +7 -5
- package/src/dom/nodes/datatypes/Enum.ts +2 -0
- package/src/dom/nodes/datatypes/Fitting.ts +2 -5
- package/src/dom/nodes/datatypes/Gradient.ts +4 -7
- package/src/dom/nodes/datatypes/Path.ts +5 -2
- package/src/dom/nodes/datatypes/Radius.ts +2 -0
- package/src/dom/nodes/datatypes/Rect.ts +40 -6
- package/src/dom/nodes/datatypes/Transform.ts +29 -1
- package/src/dom/nodes/drawings/Box.ts +1 -29
- package/src/dom/nodes/drawings/CircleNode.ts +1 -1
- package/src/dom/types/DeclarationContext.ts +12 -2
- package/src/external/reanimated/renderHelpers.ts +8 -4
- package/src/renderer/HostConfig.ts +10 -4
- package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +2 -2
- package/src/renderer/__tests__/setup.tsx +17 -15
- package/src/renderer/processors/Animations/Animations.ts +1 -5
- package/src/renderer/typeddash.ts +4 -2
- package/src/skia/__tests__/setup.ts +1 -51
- package/src/skia/types/Path/Path.ts +4 -2
- package/src/skia/types/RRect.ts +9 -3
- package/src/skia/types/Shader/Shader.ts +7 -4
- package/src/skia/web/JsiSkParagraphStyle.ts +1 -3
- package/src/sksg/Container.ts +102 -0
- package/src/sksg/DrawingContext.ts +221 -0
- package/src/sksg/HostConfig.ts +287 -0
- package/src/sksg/Reconciler.ts +59 -0
- package/src/sksg/__tests__/Declarations.spec.tsx +235 -0
- package/src/sksg/__tests__/MockDeclaration.ts +140 -0
- package/src/sksg/__tests__/Simple.spec.tsx +148 -0
- package/src/sksg/nodes/Node.ts +8 -0
- package/src/sksg/nodes/colorFilters.ts +60 -0
- package/src/sksg/nodes/context.ts +489 -0
- package/src/sksg/nodes/drawings.ts +393 -0
- package/src/sksg/nodes/imageFilters.ts +183 -0
- package/src/sksg/nodes/index.ts +3 -0
- package/src/sksg/nodes/paint.ts +75 -0
- package/src/sksg/nodes/pathEffects.ts +95 -0
- package/src/sksg/nodes/shaders.ts +203 -0
- package/src/sksg/nodes/utils.ts +23 -0
- package/src/views/SkiaDomView.tsx +3 -1
- package/src/views/SkiaPictureView.tsx +0 -2
- package/src/views/types.ts +2 -2
- package/lib/commonjs/dom/__tests__/Shaders.spec.d.ts +0 -1
- package/lib/commonjs/renderer/__tests__/SkiaDOM.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/Compose.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/Demos.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/DrawingContext.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/Drawings.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/Group.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/Paint.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/RenderNodes.spec.d.ts +0 -1
- package/lib/module/dom/__tests__/Shaders.spec.d.ts +0 -1
- package/lib/module/renderer/__tests__/SkiaDOM.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/Compose.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/Demos.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/DrawingContext.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/Drawings.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/Group.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/Paint.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/RenderNodes.spec.d.ts +0 -1
- package/lib/typescript/src/dom/__tests__/Shaders.spec.d.ts +0 -1
- package/lib/typescript/src/renderer/__tests__/SkiaDOM.spec.d.ts +0 -1
- package/src/dom/__tests__/Compose.spec.tsx +0 -42
- package/src/dom/__tests__/Demos.spec.tsx +0 -145
- package/src/dom/__tests__/DrawingContext.spec.tsx +0 -99
- package/src/dom/__tests__/Drawings.spec.tsx +0 -95
- package/src/dom/__tests__/Group.spec.tsx +0 -132
- package/src/dom/__tests__/Paint.spec.tsx +0 -100
- package/src/dom/__tests__/RenderNodes.spec.tsx +0 -44
- package/src/dom/__tests__/Shaders.spec.tsx +0 -123
- package/src/renderer/__tests__/SkiaDOM.spec.tsx +0 -46
- /package/lib/commonjs/{dom/__tests__/Compose.spec.d.ts → sksg/__tests__/Declarations.spec.d.ts} +0 -0
- /package/lib/commonjs/{dom/__tests__/Demos.spec.d.ts → sksg/__tests__/Simple.spec.d.ts} +0 -0
- /package/lib/{commonjs/dom/__tests__/DrawingContext.spec.d.ts → module/sksg/__tests__/Declarations.spec.d.ts} +0 -0
- /package/lib/{commonjs/dom/__tests__/Drawings.spec.d.ts → module/sksg/__tests__/Simple.spec.d.ts} +0 -0
- /package/lib/{commonjs/dom/__tests__/Group.spec.d.ts → typescript/lib/module/sksg/nodes/Node.d.ts} +0 -0
- /package/lib/{commonjs/dom/__tests__/Paint.spec.d.ts → typescript/src/sksg/__tests__/Declarations.spec.d.ts} +0 -0
- /package/lib/{commonjs/dom/__tests__/RenderNodes.spec.d.ts → typescript/src/sksg/__tests__/Simple.spec.d.ts} +0 -0
@@ -0,0 +1,50 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export namespace sksgHostConfig {
|
3
|
+
let supportsMutation: boolean;
|
4
|
+
let isPrimaryRenderer: boolean;
|
5
|
+
let supportsPersistence: boolean;
|
6
|
+
let supportsHydration: boolean;
|
7
|
+
let scheduleTimeout: typeof setTimeout;
|
8
|
+
let cancelTimeout: typeof clearTimeout;
|
9
|
+
let noTimeout: number;
|
10
|
+
function getRootHostContext(_rootContainerInstance: any): null;
|
11
|
+
function getChildHostContext(_parentHostContext: any, _type: any, _rootContainerInstance: any): null;
|
12
|
+
function shouldSetTextContent(_type: any, _props: any): boolean;
|
13
|
+
function createTextInstance(_text: any, _rootContainerInstance: any, _hostContext: any, _internalInstanceHandle: any): never;
|
14
|
+
function createInstance(type: any, props: any, container: any, _hostContext: any, _internalInstanceHandle: any): {
|
15
|
+
type: any;
|
16
|
+
isDeclaration: boolean;
|
17
|
+
props: any;
|
18
|
+
children: never[];
|
19
|
+
};
|
20
|
+
function appendInitialChild(parentInstance: any, child: any): void;
|
21
|
+
function finalizeInitialChildren(parentInstance: any, _type: any, _props: any, _rootContainerInstance: any, _hostContext: any): boolean;
|
22
|
+
function commitMount(): void;
|
23
|
+
function prepareForCommit(_containerInfo: any): null;
|
24
|
+
function resetAfterCommit(container: any): void;
|
25
|
+
function getPublicInstance(node: any): any;
|
26
|
+
function commitTextUpdate(_textInstance: any, _oldText: any, _newText: any): void;
|
27
|
+
function clearContainer(container: any): void;
|
28
|
+
function prepareUpdate(_instance: any, _type: any, oldProps: any, newProps: any, container: any, _hostContext: any): any;
|
29
|
+
function preparePortalMount(): void;
|
30
|
+
function cloneInstance(instance: any, _updatePayload: any, _type: any, _oldProps: any, newProps: any, _internalInstanceHandle: any, keepChildren: any, _recyclableInstance: any): {
|
31
|
+
type: any;
|
32
|
+
props: any;
|
33
|
+
children: any[];
|
34
|
+
isDeclaration: any;
|
35
|
+
};
|
36
|
+
function createContainerChildSet(): never[];
|
37
|
+
function appendChildToContainerChildSet(childSet: any, child: any): void;
|
38
|
+
function finalizeContainerChildren(container: any, newChildren: any): void;
|
39
|
+
function replaceContainerChildren(container: any, newChildren: any): void;
|
40
|
+
function cloneHiddenInstance(_instance: any, _type: any, _props: any): never;
|
41
|
+
function cloneHiddenTextInstance(_instance: any, _text: any): never;
|
42
|
+
function getCurrentEventPriority(): number;
|
43
|
+
function beforeActiveInstanceBlur(): void;
|
44
|
+
function afterActiveInstanceBlur(): void;
|
45
|
+
function detachDeletedInstance(): void;
|
46
|
+
function getInstanceFromNode(_node: any): never;
|
47
|
+
function prepareScopeUpdate(_scopeInstance: any, _instance: any): never;
|
48
|
+
function getInstanceFromScope(_scopeInstance: any): never;
|
49
|
+
}
|
50
|
+
export function debug(...args: any[]): void;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export class SkiaSGRoot {
|
3
|
+
constructor(Skia: any, nativeId?: number);
|
4
|
+
container: _Container.Container;
|
5
|
+
root: any;
|
6
|
+
get sg(): {
|
7
|
+
type: any;
|
8
|
+
props: {};
|
9
|
+
children: any;
|
10
|
+
isDeclaration: boolean;
|
11
|
+
};
|
12
|
+
render(element: any): void;
|
13
|
+
drawOnCanvas(canvas: any): void;
|
14
|
+
unmount(): void;
|
15
|
+
}
|
16
|
+
import _Container = require("./Container");
|
@@ -0,0 +1 @@
|
|
1
|
+
export const __esModule: boolean;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export function makeBlendColorFilter(ctx: any, props: any): any;
|
3
|
+
export function makeSRGBToLinearGammaColorFilter(ctx: any): any;
|
4
|
+
export function makeLinearToSRGBGammaColorFilter(ctx: any): any;
|
5
|
+
export function declareLerpColorFilter(ctx: any, props: any): void;
|
6
|
+
export function makeMatrixColorFilter(ctx: any, props: any): any;
|
7
|
+
export function makeLumaColorFilter(ctx: any): any;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export function drawLine(ctx: any, props: any): void;
|
3
|
+
export function drawOval(ctx: any, props: any): void;
|
4
|
+
export function drawBox(ctx: any, props: any, children: any): void;
|
5
|
+
export function drawBoxShadow(_ctx: any, _props: any): void;
|
6
|
+
export function drawImage(ctx: any, props: any): void;
|
7
|
+
export function drawPoints(ctx: any, props: any): void;
|
8
|
+
export function drawVertices(ctx: any, props: any): void;
|
9
|
+
export function drawDiffRect(ctx: any, props: any): void;
|
10
|
+
export function drawTextPath(ctx: any, props: any): void;
|
11
|
+
export function drawText(ctx: any, props: any): void;
|
12
|
+
export function drawPatch(ctx: any, props: any): void;
|
13
|
+
export function drawPath(ctx: any, props: any): void;
|
14
|
+
export function drawRect(ctx: any, props: any): void;
|
15
|
+
export function drawRRect(ctx: any, props: any): void;
|
16
|
+
export function drawTextBlob(ctx: any, props: any): void;
|
17
|
+
export function drawGlyphs(ctx: any, props: any): void;
|
18
|
+
export function drawImageSVG(ctx: any, props: any): void;
|
19
|
+
export function drawParagraph(ctx: any, props: any): void;
|
20
|
+
export function drawPicture(ctx: any, props: any): void;
|
21
|
+
export function drawAtlas(ctx: any, props: any): void;
|
22
|
+
export function drawCircle(ctx: any, props: any): void;
|
23
|
+
export function drawFill(ctx: any, _props: any): void;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export const MorphologyOperator: {};
|
3
|
+
export function makeOffsetImageFilter(ctx: any, props: any): any;
|
4
|
+
export function declareDisplacementMapImageFilter(ctx: any, props: any): void;
|
5
|
+
export function makeBlurImageFilter(ctx: any, props: any): any;
|
6
|
+
export function makeDropShadowImageFilter(ctx: any, props: any): any;
|
7
|
+
export function makeMorphologyImageFilter(ctx: any, props: any): any;
|
8
|
+
export function makeRuntimeShaderImageFilter(ctx: any, props: any): any;
|
9
|
+
export function declareBlendImageFilter(ctx: any, props: any): void;
|
10
|
+
export function declareBlurMaskFilter(ctx: any, props: any): void;
|
@@ -0,0 +1 @@
|
|
1
|
+
export const __esModule: boolean;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export function makeDiscretePathEffect(ctx: any, props: any): any;
|
3
|
+
export function makePath2DPathEffect(ctx: any, props: any): any;
|
4
|
+
export function makeDashPathEffect(ctx: any, props: any): any;
|
5
|
+
export function makeCornerPathEffect(ctx: any, props: any): any;
|
6
|
+
export function declareSumPathEffect(ctx: any): void;
|
7
|
+
export function makeLine2DPathEffect(ctx: any, props: any): any;
|
8
|
+
export function makePath1DPathEffect(ctx: any, props: any): any;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export const __esModule: boolean;
|
2
|
+
export function declareShader(ctx: any, props: any): void;
|
3
|
+
export function declareColorShader(ctx: any, props: any): void;
|
4
|
+
export function declareFractalNoiseShader(ctx: any, props: any): void;
|
5
|
+
export function declareTwoPointConicalGradientShader(ctx: any, props: any): void;
|
6
|
+
export function declareRadialGradientShader(ctx: any, props: any): void;
|
7
|
+
export function declareSweepGradientShader(ctx: any, props: any): void;
|
8
|
+
export function declareLinearGradientShader(ctx: any, props: any): void;
|
9
|
+
export function declareTurbulenceShader(ctx: any, props: any): void;
|
10
|
+
export function declareImageShader(ctx: any, props: any): void;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
export function isCircleScalarDef(def: any): boolean;
|
2
|
-
export function processCircle(
|
2
|
+
export function processCircle(def: any): any;
|
@@ -1,3 +1,5 @@
|
|
1
1
|
export function isEdge(pos: any, b: any): boolean;
|
2
2
|
export function processRect(Skia: any, def: any): any;
|
3
3
|
export function processRRect(Skia: any, def: any): any;
|
4
|
+
export function inflate(Skia: any, box: any, dx: any, dy: any, tx?: number, ty?: number): any;
|
5
|
+
export function deflate(Skia: any, box: any, dx: any, dy: any, tx?: number, ty?: number): any;
|
@@ -1,3 +1,5 @@
|
|
1
1
|
export function extractReanimatedProps(props: any): any[];
|
2
2
|
export function bindReanimatedProps(container: any, node: any, reanimatedProps: any): void;
|
3
|
+
export let HAS_REANIMATED: boolean;
|
4
|
+
export let HAS_REANIMATED_3: boolean;
|
3
5
|
export function unbindReanimatedNode(node: any): void;
|
@@ -112,9 +112,11 @@ export function Mock(CanvasKit: any): {
|
|
112
112
|
isEdge: (pos: any, b: any) => boolean;
|
113
113
|
processRect: (Skia: any, def: any) => any;
|
114
114
|
processRRect: (Skia: any, def: any) => any;
|
115
|
+
inflate: (Skia: any, box: any, dx: any, dy: any, tx?: number, ty?: number) => any;
|
116
|
+
deflate: (Skia: any, box: any, dx: any, dy: any, tx?: number, ty?: number) => any;
|
115
117
|
processRadius: (Skia: any, radius: any) => any;
|
116
118
|
isCircleScalarDef: (def: any) => boolean;
|
117
|
-
processCircle: (
|
119
|
+
processCircle: (def: any) => any;
|
118
120
|
transformOrigin: (origin: any, transform: any) => any[];
|
119
121
|
processGradientProps: (Skia: any, { colors, positions, mode, flags, ...transform }: {
|
120
122
|
[x: string]: any;
|
@@ -131,6 +133,7 @@ export function Mock(CanvasKit: any): {
|
|
131
133
|
};
|
132
134
|
getRect: (Skia: any, props: any) => any;
|
133
135
|
processTransformProps: (m3: any, props: any) => void;
|
136
|
+
processTransformProps2: (Skia: any, props: any) => any;
|
134
137
|
validateInterpolationOptions(type: any): {
|
135
138
|
extrapolateLeft: any;
|
136
139
|
extrapolateRight: any;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
export function debug(...args: any[]): void;
|
2
2
|
export namespace skHostConfig {
|
3
|
-
let now: () => number;
|
4
3
|
let supportsMutation: boolean;
|
5
4
|
let isPrimaryRenderer: boolean;
|
6
5
|
let supportsPersistence: boolean;
|
@@ -34,4 +33,7 @@ export namespace skHostConfig {
|
|
34
33
|
function beforeActiveInstanceBlur(): void;
|
35
34
|
function afterActiveInstanceBlur(): void;
|
36
35
|
function detachDeletedInstance(): void;
|
36
|
+
function getInstanceFromNode(_node: any): null;
|
37
|
+
function prepareScopeUpdate(_scopeInstance: any, _instance: any): void;
|
38
|
+
function getInstanceFromScope(_scopeInstance: any): null;
|
37
39
|
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export class Container {
|
2
|
+
constructor(Skia: any, nativeId: any);
|
3
|
+
Skia: any;
|
4
|
+
nativeId: any;
|
5
|
+
set root(root: any);
|
6
|
+
get root(): any;
|
7
|
+
mapperId: any;
|
8
|
+
_root: any;
|
9
|
+
clear(): void;
|
10
|
+
redraw(): void;
|
11
|
+
getNativeId(): any;
|
12
|
+
unregisterValues(values: any): void;
|
13
|
+
registerValues(values: any): void;
|
14
|
+
drawOnCanvas(canvas: any): void;
|
15
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export class DrawingContext {
|
2
|
+
constructor(Skia: any, canvas: any);
|
3
|
+
Skia: any;
|
4
|
+
canvas: any;
|
5
|
+
paints: any[];
|
6
|
+
declCtx: DeclarationContext;
|
7
|
+
save(): void;
|
8
|
+
restore(): void;
|
9
|
+
get paint(): any;
|
10
|
+
getLocalPaints(): any[];
|
11
|
+
processPaint({ opacity, color, strokeWidth, blendMode, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither, paint: paintProp }: {
|
12
|
+
opacity: any;
|
13
|
+
color: any;
|
14
|
+
strokeWidth: any;
|
15
|
+
blendMode: any;
|
16
|
+
style: any;
|
17
|
+
strokeJoin: any;
|
18
|
+
strokeCap: any;
|
19
|
+
strokeMiter: any;
|
20
|
+
antiAlias: any;
|
21
|
+
dither: any;
|
22
|
+
paint: any;
|
23
|
+
}): boolean;
|
24
|
+
processMatrixAndClipping(props: any, layer: any): boolean;
|
25
|
+
}
|
26
|
+
import { DeclarationContext } from "../dom/types";
|
@@ -0,0 +1,49 @@
|
|
1
|
+
export function debug(...args: any[]): void;
|
2
|
+
export namespace sksgHostConfig {
|
3
|
+
let supportsMutation: boolean;
|
4
|
+
let isPrimaryRenderer: boolean;
|
5
|
+
let supportsPersistence: boolean;
|
6
|
+
let supportsHydration: boolean;
|
7
|
+
let scheduleTimeout: typeof setTimeout;
|
8
|
+
let cancelTimeout: typeof clearTimeout;
|
9
|
+
let noTimeout: number;
|
10
|
+
function getRootHostContext(_rootContainerInstance: any): null;
|
11
|
+
function getChildHostContext(_parentHostContext: any, _type: any, _rootContainerInstance: any): null;
|
12
|
+
function shouldSetTextContent(_type: any, _props: any): boolean;
|
13
|
+
function createTextInstance(_text: any, _rootContainerInstance: any, _hostContext: any, _internalInstanceHandle: any): never;
|
14
|
+
function createInstance(type: any, props: any, container: any, _hostContext: any, _internalInstanceHandle: any): {
|
15
|
+
type: any;
|
16
|
+
isDeclaration: boolean;
|
17
|
+
props: any;
|
18
|
+
children: never[];
|
19
|
+
};
|
20
|
+
function appendInitialChild(parentInstance: any, child: any): void;
|
21
|
+
function finalizeInitialChildren(parentInstance: any, _type: any, _props: any, _rootContainerInstance: any, _hostContext: any): boolean;
|
22
|
+
function commitMount(): void;
|
23
|
+
function prepareForCommit(_containerInfo: any): null;
|
24
|
+
function resetAfterCommit(container: any): void;
|
25
|
+
function getPublicInstance(node: any): any;
|
26
|
+
function commitTextUpdate(_textInstance: any, _oldText: any, _newText: any): void;
|
27
|
+
function clearContainer(container: any): void;
|
28
|
+
function prepareUpdate(_instance: any, _type: any, oldProps: any, newProps: any, container: any, _hostContext: any): any;
|
29
|
+
function preparePortalMount(): void;
|
30
|
+
function cloneInstance(instance: any, _updatePayload: any, _type: any, _oldProps: any, newProps: any, _internalInstanceHandle: any, keepChildren: any, _recyclableInstance: any): {
|
31
|
+
type: any;
|
32
|
+
props: any;
|
33
|
+
children: any[];
|
34
|
+
isDeclaration: any;
|
35
|
+
};
|
36
|
+
function createContainerChildSet(): never[];
|
37
|
+
function appendChildToContainerChildSet(childSet: any, child: any): void;
|
38
|
+
function finalizeContainerChildren(container: any, newChildren: any): void;
|
39
|
+
function replaceContainerChildren(container: any, newChildren: any): void;
|
40
|
+
function cloneHiddenInstance(_instance: any, _type: any, _props: any): never;
|
41
|
+
function cloneHiddenTextInstance(_instance: any, _text: any): never;
|
42
|
+
function getCurrentEventPriority(): number;
|
43
|
+
function beforeActiveInstanceBlur(): void;
|
44
|
+
function afterActiveInstanceBlur(): void;
|
45
|
+
function detachDeletedInstance(): void;
|
46
|
+
function getInstanceFromNode(_node: any): never;
|
47
|
+
function prepareScopeUpdate(_scopeInstance: any, _instance: any): never;
|
48
|
+
function getInstanceFromScope(_scopeInstance: any): never;
|
49
|
+
}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export class SkiaSGRoot {
|
2
|
+
constructor(Skia: any, nativeId?: number);
|
3
|
+
container: Container;
|
4
|
+
root: any;
|
5
|
+
get sg(): {
|
6
|
+
type: any;
|
7
|
+
props: {};
|
8
|
+
children: any;
|
9
|
+
isDeclaration: boolean;
|
10
|
+
};
|
11
|
+
render(element: any): void;
|
12
|
+
drawOnCanvas(canvas: any): void;
|
13
|
+
unmount(): void;
|
14
|
+
}
|
15
|
+
import { Container } from "./Container";
|
@@ -0,0 +1,6 @@
|
|
1
|
+
export function makeBlendColorFilter(ctx: any, props: any): any;
|
2
|
+
export function makeSRGBToLinearGammaColorFilter(ctx: any): any;
|
3
|
+
export function makeLinearToSRGBGammaColorFilter(ctx: any): any;
|
4
|
+
export function declareLerpColorFilter(ctx: any, props: any): void;
|
5
|
+
export function makeMatrixColorFilter(ctx: any, props: any): any;
|
6
|
+
export function makeLumaColorFilter(ctx: any): any;
|
@@ -0,0 +1 @@
|
|
1
|
+
export function draw(ctx: any, node: any): void;
|
@@ -0,0 +1,22 @@
|
|
1
|
+
export function drawLine(ctx: any, props: any): void;
|
2
|
+
export function drawOval(ctx: any, props: any): void;
|
3
|
+
export function drawBox(ctx: any, props: any, children: any): void;
|
4
|
+
export function drawBoxShadow(_ctx: any, _props: any): void;
|
5
|
+
export function drawImage(ctx: any, props: any): void;
|
6
|
+
export function drawPoints(ctx: any, props: any): void;
|
7
|
+
export function drawVertices(ctx: any, props: any): void;
|
8
|
+
export function drawDiffRect(ctx: any, props: any): void;
|
9
|
+
export function drawTextPath(ctx: any, props: any): void;
|
10
|
+
export function drawText(ctx: any, props: any): void;
|
11
|
+
export function drawPatch(ctx: any, props: any): void;
|
12
|
+
export function drawPath(ctx: any, props: any): void;
|
13
|
+
export function drawRect(ctx: any, props: any): void;
|
14
|
+
export function drawRRect(ctx: any, props: any): void;
|
15
|
+
export function drawTextBlob(ctx: any, props: any): void;
|
16
|
+
export function drawGlyphs(ctx: any, props: any): void;
|
17
|
+
export function drawImageSVG(ctx: any, props: any): void;
|
18
|
+
export function drawParagraph(ctx: any, props: any): void;
|
19
|
+
export function drawPicture(ctx: any, props: any): void;
|
20
|
+
export function drawAtlas(ctx: any, props: any): void;
|
21
|
+
export function drawCircle(ctx: any, props: any): void;
|
22
|
+
export function drawFill(ctx: any, _props: any): void;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export let MorphologyOperator: {};
|
2
|
+
export function makeOffsetImageFilter(ctx: any, props: any): any;
|
3
|
+
export function declareDisplacementMapImageFilter(ctx: any, props: any): void;
|
4
|
+
export function makeBlurImageFilter(ctx: any, props: any): any;
|
5
|
+
export function makeDropShadowImageFilter(ctx: any, props: any): any;
|
6
|
+
export function makeMorphologyImageFilter(ctx: any, props: any): any;
|
7
|
+
export function makeRuntimeShaderImageFilter(ctx: any, props: any): any;
|
8
|
+
export function declareBlendImageFilter(ctx: any, props: any): void;
|
9
|
+
export function declareBlurMaskFilter(ctx: any, props: any): void;
|
@@ -0,0 +1 @@
|
|
1
|
+
export function declarePaint(ctx: any, props: any): void;
|
@@ -0,0 +1,7 @@
|
|
1
|
+
export function makeDiscretePathEffect(ctx: any, props: any): any;
|
2
|
+
export function makePath2DPathEffect(ctx: any, props: any): any;
|
3
|
+
export function makeDashPathEffect(ctx: any, props: any): any;
|
4
|
+
export function makeCornerPathEffect(ctx: any, props: any): any;
|
5
|
+
export function declareSumPathEffect(ctx: any): void;
|
6
|
+
export function makeLine2DPathEffect(ctx: any, props: any): any;
|
7
|
+
export function makePath1DPathEffect(ctx: any, props: any): any;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
export function declareShader(ctx: any, props: any): void;
|
2
|
+
export function declareColorShader(ctx: any, props: any): void;
|
3
|
+
export function declareFractalNoiseShader(ctx: any, props: any): void;
|
4
|
+
export function declareTwoPointConicalGradientShader(ctx: any, props: any): void;
|
5
|
+
export function declareRadialGradientShader(ctx: any, props: any): void;
|
6
|
+
export function declareSweepGradientShader(ctx: any, props: any): void;
|
7
|
+
export function declareLinearGradientShader(ctx: any, props: any): void;
|
8
|
+
export function declareTurbulenceShader(ctx: any, props: any): void;
|
9
|
+
export function declareImageShader(ctx: any, props: any): void;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
import type { Skia } from "../../../skia/types";
|
2
1
|
import type { CircleDef, ScalarCircleDef } from "../../types";
|
3
2
|
export declare const isCircleScalarDef: (def: CircleDef) => def is ScalarCircleDef;
|
4
|
-
export declare const processCircle: (
|
5
|
-
c: import("
|
3
|
+
export declare const processCircle: (def: CircleDef) => {
|
4
|
+
c: import("../../..").SkPoint;
|
6
5
|
r: number;
|
7
6
|
};
|
@@ -1,5 +1,7 @@
|
|
1
|
-
import type { Skia, SkRect, Vector } from "../../../skia/types";
|
1
|
+
import type { Skia, SkRect, SkRRect, Vector } from "../../../skia/types";
|
2
2
|
import type { RectDef, RRectDef } from "../../types";
|
3
3
|
export declare const isEdge: (pos: Vector, b: SkRect) => boolean;
|
4
4
|
export declare const processRect: (Skia: Skia, def: RectDef) => SkRect;
|
5
5
|
export declare const processRRect: (Skia: Skia, def: RRectDef) => import("../../../skia/types").InputRRect;
|
6
|
+
export declare const inflate: (Skia: Skia, box: SkRRect, dx: number, dy: number, tx?: number, ty?: number) => SkRRect;
|
7
|
+
export declare const deflate: (Skia: Skia, box: SkRRect, dx: number, dy: number, tx?: number, ty?: number) => SkRRect;
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import type { TransformProps } from "../../types";
|
2
|
-
import type { SkMatrix } from "../../../skia/types";
|
2
|
+
import type { Skia, SkMatrix } from "../../../skia/types";
|
3
3
|
export declare const processTransformProps: (m3: SkMatrix, props: TransformProps) => void;
|
4
|
+
export declare const processTransformProps2: (Skia: Skia, props: TransformProps) => SkMatrix | null;
|
@@ -2,20 +2,20 @@ import type { SkShader, SkPaint, SkImageFilter, SkMaskFilter, SkPathEffect, Skia
|
|
2
2
|
type Composer<T> = (outer: T, inner: T) => T;
|
3
3
|
export declare const composeDeclarations: <T>(filters: T[], composer: Composer<T>) => T;
|
4
4
|
declare class Declaration<T> {
|
5
|
-
private composer?;
|
6
5
|
private decls;
|
7
6
|
private indexes;
|
8
|
-
|
7
|
+
private composer?;
|
8
|
+
constructor(composer?: Composer<T>);
|
9
9
|
private get index();
|
10
10
|
save(): void;
|
11
11
|
restore(): void;
|
12
12
|
pop(): T | undefined;
|
13
13
|
push(decl: T): void;
|
14
14
|
popAll(): T[];
|
15
|
-
popAllAsOne(): T;
|
15
|
+
popAllAsOne(): T | undefined;
|
16
16
|
}
|
17
17
|
export declare class DeclarationContext {
|
18
|
-
|
18
|
+
Skia: Skia;
|
19
19
|
readonly paints: Declaration<SkPaint>;
|
20
20
|
readonly maskFilters: Declaration<SkMaskFilter>;
|
21
21
|
readonly shaders: Declaration<SkShader>;
|
@@ -1,6 +1,8 @@
|
|
1
1
|
import type { Container } from "../../renderer/Container";
|
2
2
|
import type { AnimatedProps } from "../../renderer/processors";
|
3
3
|
import type { Node } from "../../dom/types";
|
4
|
+
export declare let HAS_REANIMATED: boolean;
|
5
|
+
export declare let HAS_REANIMATED_3: boolean;
|
4
6
|
export declare const unbindReanimatedNode: (node: Node<unknown>) => void;
|
5
7
|
export declare function extractReanimatedProps(props: AnimatedProps<any>): AnimatedProps<any, never>[];
|
6
8
|
export declare function bindReanimatedProps(container: Container, node: Node<any>, reanimatedProps: AnimatedProps<any>): void;
|
@@ -2,7 +2,7 @@ import type { ReactNode } from "react";
|
|
2
2
|
import type { Server, WebSocket } from "ws";
|
3
3
|
import type * as SkiaExports from "../../index";
|
4
4
|
import type { SkImage, SkFont, Skia, SkCanvas } from "../../skia/types";
|
5
|
-
import {
|
5
|
+
import { SkiaSGRoot } from "../../sksg/Reconciler";
|
6
6
|
type TestOS = "ios" | "android" | "web" | "node";
|
7
7
|
declare global {
|
8
8
|
var testServer: Server;
|
@@ -35,7 +35,6 @@ export declare const BirdGIF: string;
|
|
35
35
|
export declare const loadImage: (uri: string) => SkiaExports.SkImage;
|
36
36
|
export declare const loadFont: (uri: string, ftSize?: number) => SkiaExports.SkFont;
|
37
37
|
export declare const importSkia: () => typeof SkiaExports;
|
38
|
-
export declare const getSkDOM: () => SkiaExports.JsiSkDOM;
|
39
38
|
export declare const PIXEL_RATIO = 3;
|
40
39
|
export declare const fontSize: number;
|
41
40
|
export declare const width: number;
|
@@ -47,7 +46,7 @@ export declare const center: {
|
|
47
46
|
export declare const drawOnNode: (element: ReactNode) => SkiaExports.SkSurface;
|
48
47
|
export declare const mountCanvas: (element: ReactNode) => {
|
49
48
|
surface: SkiaExports.SkSurface;
|
50
|
-
root:
|
49
|
+
root: SkiaSGRoot;
|
51
50
|
draw: () => void;
|
52
51
|
};
|
53
52
|
export declare const serialize: (element: ReactNode) => string;
|
@@ -1,7 +1,6 @@
|
|
1
|
-
export type
|
1
|
+
export type AnimatedProp<T> = T | {
|
2
2
|
value: T;
|
3
3
|
};
|
4
|
-
export type AnimatedProp<T> = T | SharedValueType<T>;
|
5
4
|
export type AnimatedProps<T, O extends keyof T | never = never> = {
|
6
5
|
[K in keyof T]: K extends "children" ? T[K] : K extends O ? T[K] : AnimatedProp<T[K]>;
|
7
6
|
};
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import type { Node } from "../../dom/types";
|
2
1
|
import { Skia } from "../types";
|
3
2
|
import { JsiSkApi } from "../web";
|
4
3
|
declare let Skia: ReturnType<typeof JsiSkApi>;
|
@@ -14,6 +13,4 @@ export declare const setupSkia: (width?: number, height?: number) => {
|
|
14
13
|
Skia: Skia;
|
15
14
|
CanvasKit: import("canvaskit-wasm").CanvasKit;
|
16
15
|
};
|
17
|
-
export declare const printAsXML: (node: Node<unknown>) => void;
|
18
|
-
export declare const asXML: (node: Node<unknown>, indent?: number) => string;
|
19
16
|
export {};
|
@@ -13,4 +13,4 @@ export interface NonUniformRRect {
|
|
13
13
|
readonly bottomLeft: SkPoint;
|
14
14
|
}
|
15
15
|
export type InputRRect = SkRRect | NonUniformRRect;
|
16
|
-
export declare const isRRect: (def:
|
16
|
+
export declare const isRRect: (def: unknown) => def is SkRRect;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { Skia, SkCanvas } from "../skia/types";
|
2
|
+
import type { Node } from "./nodes";
|
3
|
+
export declare class Container {
|
4
|
+
Skia: Skia;
|
5
|
+
private nativeId;
|
6
|
+
_root: Node[];
|
7
|
+
unmounted: boolean;
|
8
|
+
private values;
|
9
|
+
private mapperId;
|
10
|
+
constructor(Skia: Skia, nativeId: number);
|
11
|
+
get root(): Node[];
|
12
|
+
set root(root: Node[]);
|
13
|
+
clear(): void;
|
14
|
+
redraw(): void;
|
15
|
+
getNativeId(): number;
|
16
|
+
unregisterValues(values: object): void;
|
17
|
+
registerValues(values: object): void;
|
18
|
+
drawOnCanvas(canvas: SkCanvas): void;
|
19
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import type { DrawingNodeProps, GroupProps } from "../dom/types";
|
2
|
+
import { DeclarationContext } from "../dom/types";
|
3
|
+
import type { SkCanvas, Skia, SkPaint } from "../skia/types";
|
4
|
+
export declare class DrawingContext {
|
5
|
+
private paints;
|
6
|
+
declCtx: DeclarationContext;
|
7
|
+
Skia: Skia;
|
8
|
+
canvas: SkCanvas;
|
9
|
+
constructor(Skia: Skia, canvas: SkCanvas);
|
10
|
+
save(): void;
|
11
|
+
restore(): void;
|
12
|
+
get paint(): SkPaint;
|
13
|
+
getLocalPaints(): SkPaint[];
|
14
|
+
processPaint({ opacity, color, strokeWidth, blendMode, style, strokeJoin, strokeCap, strokeMiter, antiAlias, dither, paint: paintProp, }: DrawingNodeProps): boolean;
|
15
|
+
processMatrixAndClipping(props: GroupProps, layer?: boolean | SkPaint): boolean;
|
16
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import type { HostConfig } from "react-reconciler";
|
2
|
+
import { NodeType } from "../dom/types";
|
3
|
+
import type { Node } from "./nodes/Node";
|
4
|
+
import type { Container } from "./Container";
|
5
|
+
export declare const debug: (message?: any, ...optionalParams: any[]) => void;
|
6
|
+
type Instance = Node;
|
7
|
+
type Props = object;
|
8
|
+
type TextInstance = Node;
|
9
|
+
type SuspenseInstance = Instance;
|
10
|
+
type HydratableInstance = Instance;
|
11
|
+
type PublicInstance = Instance;
|
12
|
+
type HostContext = null;
|
13
|
+
type UpdatePayload = Container;
|
14
|
+
type ChildSet = Node[];
|
15
|
+
type TimeoutHandle = NodeJS.Timeout;
|
16
|
+
type NoTimeout = -1;
|
17
|
+
type SkiaHostConfig = HostConfig<NodeType, Props, Container, Instance, TextInstance, SuspenseInstance, HydratableInstance, PublicInstance, HostContext, UpdatePayload, ChildSet, TimeoutHandle, NoTimeout>;
|
18
|
+
export declare const sksgHostConfig: SkiaHostConfig;
|
19
|
+
export {};
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import type { ReactNode } from "react";
|
2
|
+
import type { SkCanvas, Skia } from "../skia/types";
|
3
|
+
import { NodeType } from "../dom/types";
|
4
|
+
export declare class SkiaSGRoot {
|
5
|
+
private root;
|
6
|
+
private container;
|
7
|
+
constructor(Skia: Skia, nativeId?: number);
|
8
|
+
get sg(): {
|
9
|
+
type: NodeType;
|
10
|
+
props: {};
|
11
|
+
children: import("./nodes").Node<unknown>[];
|
12
|
+
isDeclaration: boolean;
|
13
|
+
};
|
14
|
+
render(element: ReactNode): void;
|
15
|
+
drawOnCanvas(canvas: SkCanvas): void;
|
16
|
+
unmount(): void;
|
17
|
+
}
|