@shopify/react-native-skia 0.1.180 → 0.1.182
Sign up to get free protection for your applications and to get access to all the features.
- package/android/build.gradle +6 -1
- package/cpp/api/JsiSkData.h +7 -0
- package/cpp/api/JsiSkImage.h +7 -1
- package/cpp/api/JsiSkSVG.h +7 -0
- package/cpp/api/JsiSkTypeface.h +7 -0
- package/cpp/jsi/RuntimeAwareCache.cpp +0 -2
- package/cpp/rnskia/RNSkDomView.cpp +2 -2
- package/cpp/rnskia/RNSkPlatformContext.h +2 -2
- package/cpp/rnskia/dom/base/DerivedNodeProp.h +1 -1
- package/cpp/rnskia/dom/base/JsiDependencyManager.h +10 -6
- package/cpp/rnskia/dom/base/JsiDomNode.h +133 -78
- package/cpp/rnskia/dom/base/JsiDomRenderNode.h +17 -5
- package/cpp/rnskia/dom/base/NodeProp.h +5 -5
- package/cpp/rnskia/dom/base/NodePropsContainer.h +8 -2
- package/cpp/rnskia/dom/props/ClipProp.h +13 -20
- package/cpp/rnskia/dom/props/PathProp.h +16 -14
- package/cpp/rnskia/dom/props/PointProp.h +1 -1
- package/cpp/rnskia/dom/props/RRectProp.h +39 -61
- package/cpp/rnskia/dom/props/RectProp.h +27 -25
- package/ios/RNSkia-iOS/RNSkiOSPlatformContext.mm +0 -2
- package/lib/commonjs/dom/nodes/JsiSkDOM.js +56 -54
- package/lib/commonjs/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.js +30 -9
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/HostComponents.d.ts +1 -0
- package/lib/commonjs/renderer/HostComponents.js +6 -1
- package/lib/commonjs/renderer/HostComponents.js.map +1 -1
- package/lib/commonjs/renderer/Reconciler.js +3 -1
- package/lib/commonjs/renderer/Reconciler.js.map +1 -1
- package/lib/commonjs/skia/core/Data.d.ts +2 -2
- package/lib/commonjs/skia/core/Data.js +5 -0
- package/lib/commonjs/skia/core/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Data/Data.d.ts +2 -2
- package/lib/commonjs/skia/types/Data/Data.js.map +1 -1
- package/lib/commonjs/skia/types/Image/Image.d.ts +2 -2
- package/lib/commonjs/skia/types/Image/Image.js.map +1 -1
- package/lib/commonjs/skia/types/JsiInstance.d.ts +3 -0
- package/lib/commonjs/skia/types/JsiInstance.js.map +1 -1
- package/lib/commonjs/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/commonjs/skia/types/SVG/SVG.js.map +1 -1
- package/lib/commonjs/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/commonjs/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkData.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkData.js +3 -0
- package/lib/commonjs/skia/web/JsiSkData.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkImage.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkImage.js +4 -0
- package/lib/commonjs/skia/web/JsiSkImage.js.map +1 -1
- package/lib/commonjs/skia/web/JsiSkTypeface.d.ts +1 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js +4 -0
- package/lib/commonjs/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/commonjs/views/SkiaBaseWebView.js +5 -1
- package/lib/commonjs/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/dom/nodes/JsiSkDOM.js +55 -54
- package/lib/module/dom/nodes/JsiSkDOM.js.map +1 -1
- package/lib/module/renderer/Canvas.js +29 -10
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/HostComponents.d.ts +1 -0
- package/lib/module/renderer/HostComponents.js +3 -0
- package/lib/module/renderer/HostComponents.js.map +1 -1
- package/lib/module/renderer/Reconciler.js +2 -1
- package/lib/module/renderer/Reconciler.js.map +1 -1
- package/lib/module/skia/core/Data.d.ts +2 -2
- package/lib/module/skia/core/Data.js +5 -0
- package/lib/module/skia/core/Data.js.map +1 -1
- package/lib/module/skia/types/Data/Data.d.ts +2 -2
- package/lib/module/skia/types/Data/Data.js.map +1 -1
- package/lib/module/skia/types/Image/Image.d.ts +2 -2
- package/lib/module/skia/types/Image/Image.js.map +1 -1
- package/lib/module/skia/types/JsiInstance.d.ts +3 -0
- package/lib/module/skia/types/JsiInstance.js.map +1 -1
- package/lib/module/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/module/skia/types/SVG/SVG.js.map +1 -1
- package/lib/module/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/module/skia/types/Typeface/Typeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.d.ts +1 -0
- package/lib/module/skia/web/JsiSkData.js +3 -0
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.d.ts +1 -0
- package/lib/module/skia/web/JsiSkImage.js +4 -0
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.d.ts +1 -0
- package/lib/module/skia/web/JsiSkTypeface.js +4 -0
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.js +5 -1
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/typescript/src/renderer/HostComponents.d.ts +1 -0
- package/lib/typescript/src/skia/core/Data.d.ts +2 -2
- package/lib/typescript/src/skia/types/Data/Data.d.ts +2 -2
- package/lib/typescript/src/skia/types/Image/Image.d.ts +2 -2
- package/lib/typescript/src/skia/types/JsiInstance.d.ts +3 -0
- package/lib/typescript/src/skia/types/SVG/SVG.d.ts +2 -2
- package/lib/typescript/src/skia/types/Typeface/Typeface.d.ts +2 -2
- package/lib/typescript/src/skia/web/JsiSkData.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkImage.d.ts +1 -0
- package/lib/typescript/src/skia/web/JsiSkTypeface.d.ts +1 -0
- package/package.json +1 -1
- package/src/dom/nodes/JsiSkDOM.ts +55 -54
- package/src/renderer/Canvas.tsx +34 -14
- package/src/renderer/HostComponents.ts +4 -0
- package/src/renderer/Reconciler.tsx +2 -1
- package/src/skia/core/Data.ts +14 -6
- package/src/skia/types/Data/Data.ts +2 -2
- package/src/skia/types/Image/Image.ts +2 -2
- package/src/skia/types/JsiInstance.ts +4 -0
- package/src/skia/types/SVG/SVG.ts +2 -2
- package/src/skia/types/Typeface/Typeface.ts +2 -2
- package/src/skia/web/JsiSkData.ts +4 -0
- package/src/skia/web/JsiSkImage.ts +4 -0
- package/src/skia/web/JsiSkTypeface.ts +4 -0
- package/src/views/SkiaBaseWebView.tsx +5 -0
@@ -1,3 +1,3 @@
|
|
1
|
-
import type { SkJSIInstance } from "../JsiInstance";
|
1
|
+
import type { JsiDisposable, SkJSIInstance } from "../JsiInstance";
|
2
2
|
|
3
|
-
export type SkSVG = SkJSIInstance<"SVG"
|
3
|
+
export type SkSVG = SkJSIInstance<"SVG"> & JsiDisposable;
|
@@ -1,3 +1,3 @@
|
|
1
|
-
import type { SkJSIInstance } from "../JsiInstance";
|
1
|
+
import type { JsiDisposable, SkJSIInstance } from "../JsiInstance";
|
2
2
|
|
3
|
-
export type SkTypeface = SkJSIInstance<"Typeface"
|
3
|
+
export type SkTypeface = SkJSIInstance<"Typeface"> & JsiDisposable;
|
@@ -78,6 +78,11 @@ export abstract class SkiaBaseWebView<
|
|
78
78
|
componentWillUnmount() {
|
79
79
|
this.unsubscribeAll();
|
80
80
|
cancelAnimationFrame(this.requestId);
|
81
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_lose_context
|
82
|
+
this._canvasRef.current
|
83
|
+
?.getContext("webgl2")
|
84
|
+
?.getExtension("WEBGL_lose_context")
|
85
|
+
?.loseContext();
|
81
86
|
}
|
82
87
|
|
83
88
|
/**
|