@shopify/react-native-skia 1.11.9-next.1 → 2.0.0-next.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/android/CMakeLists.txt +153 -30
- package/cpp/skia/include/codec/SkCodec.h +2 -7
- package/cpp/skia/include/config/SkUserConfig.h +0 -11
- package/cpp/skia/include/core/SkCanvas.h +7 -11
- package/cpp/skia/include/core/SkColor.h +0 -10
- package/cpp/skia/include/core/SkColorSpace.h +2 -184
- package/cpp/skia/include/core/SkColorType.h +32 -114
- package/cpp/skia/include/core/SkFontScanner.h +8 -5
- package/cpp/skia/include/core/SkFontStyle.h +1 -1
- package/cpp/skia/include/core/SkMaskFilter.h +8 -0
- package/cpp/skia/include/core/SkMilestone.h +1 -1
- package/cpp/skia/include/core/SkPath.h +1 -1
- package/cpp/skia/include/core/SkRRect.h +1 -3
- package/cpp/skia/include/core/SkShader.h +3 -3
- package/cpp/skia/include/core/SkString.h +8 -8
- package/cpp/skia/include/core/SkSurface.h +0 -14
- package/cpp/skia/include/core/SkTypeface.h +7 -24
- package/cpp/skia/include/effects/SkGradientShader.h +1 -6
- package/cpp/skia/include/effects/SkRuntimeEffect.h +0 -1
- package/cpp/skia/include/encode/SkPngEncoder.h +0 -14
- package/cpp/skia/include/gpu/GpuTypes.h +0 -9
- package/cpp/skia/include/gpu/ganesh/GrContextOptions.h +133 -135
- package/cpp/skia/include/gpu/ganesh/GrDirectContext.h +0 -5
- package/cpp/skia/include/gpu/ganesh/GrDriverBugWorkarounds.h +3 -3
- package/cpp/skia/include/gpu/ganesh/GrTypes.h +9 -14
- package/cpp/skia/include/gpu/graphite/Context.h +2 -25
- package/cpp/skia/include/gpu/graphite/ContextOptions.h +5 -23
- package/cpp/skia/include/gpu/graphite/GraphiteTypes.h +1 -20
- package/cpp/skia/include/gpu/graphite/Image.h +0 -1
- package/cpp/skia/include/gpu/graphite/Recorder.h +0 -6
- package/cpp/skia/include/gpu/graphite/Recording.h +1 -3
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypes.h +36 -4
- package/cpp/skia/include/gpu/graphite/precompile/Precompile.h +2 -3
- package/cpp/skia/include/pathops/SkPathOps.h +1 -9
- package/cpp/skia/include/ports/SkFontMgr_FontConfigInterface.h +0 -3
- package/cpp/skia/include/private/SkPathRef.h +21 -15
- package/cpp/skia/include/private/base/SkAttributes.h +10 -16
- package/cpp/skia/include/private/base/SkMutex.h +0 -8
- package/cpp/skia/include/private/base/SkTArray.h +1 -1
- package/cpp/skia/include/private/base/SkTDArray.h +1 -1
- package/cpp/skia/include/private/base/SkTemplates.h +11 -24
- package/cpp/skia/include/private/gpu/ganesh/GrTypesPriv.h +1 -1
- package/cpp/skia/include/sksl/SkSLDebugTrace.h +3 -0
- package/cpp/skia/modules/skcms/src/Transform_inl.h +20 -20
- package/cpp/skia/modules/skcms/src/skcms_Transform.h +3 -4
- package/cpp/skia/modules/skcms/src/skcms_public.h +15 -19
- package/cpp/skia/modules/skresources/include/SkResources.h +1 -3
- package/cpp/skia/modules/svg/include/SkSVGCircle.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGContainer.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGFeLightSource.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGImage.h +2 -2
- package/cpp/skia/modules/svg/include/SkSVGPath.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGPoly.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRect.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGRenderContext.h +0 -2
- package/cpp/skia/modules/svg/include/SkSVGShape.h +0 -1
- package/cpp/skia/modules/svg/include/SkSVGText.h +1 -1
- package/cpp/skia/modules/svg/include/SkSVGTransformableNode.h +0 -4
- package/cpp/skia/modules/svg/include/SkSVGUse.h +1 -1
- package/cpp/skia/src/core/SkLRUCache.h +13 -19
- package/cpp/skia/src/core/SkTHash.h +4 -50
- package/cpp/skia/src/gpu/ganesh/gl/GrGLDefines.h +0 -1
- package/lib/commonjs/Platform/Platform.web.js +1 -0
- package/lib/commonjs/Platform/Platform.web.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.d.ts +1 -1
- package/lib/commonjs/renderer/Canvas.js +2 -4
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/__tests__/setup.d.ts +1 -0
- package/lib/commonjs/sksg/Elements.d.ts +1 -1
- package/lib/commonjs/sksg/Elements.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.d.ts +1 -1
- package/lib/commonjs/sksg/Reconciler.js +0 -1
- package/lib/commonjs/sksg/Reconciler.js.map +1 -1
- package/lib/module/Platform/Platform.web.js +2 -1
- package/lib/module/Platform/Platform.web.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Circle.js +2 -1
- package/lib/module/dom/nodes/datatypes/Circle.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Gradient.js +3 -3
- package/lib/module/dom/nodes/datatypes/Gradient.js.map +1 -1
- package/lib/module/dom/nodes/datatypes/Rect.js +5 -3
- package/lib/module/dom/nodes/datatypes/Rect.js.map +1 -1
- package/lib/module/external/reanimated/buffers.js +2 -1
- package/lib/module/external/reanimated/buffers.js.map +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.js +1 -1
- package/lib/module/external/reanimated/useAnimatedImageValue.js.map +1 -1
- package/lib/module/external/reanimated/useVideo.js +23 -10
- package/lib/module/external/reanimated/useVideo.js.map +1 -1
- package/lib/module/renderer/Canvas.d.ts +1 -1
- package/lib/module/renderer/Canvas.js +3 -5
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/__tests__/setup.d.ts +1 -0
- package/lib/module/skia/core/Vector.js +1 -1
- package/lib/module/skia/core/Vector.js.map +1 -1
- package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js +4 -1
- package/lib/module/skia/web/CanvasKitWebGLBufferImpl.js.map +1 -1
- package/lib/module/skia/web/Host.js +7 -1
- package/lib/module/skia/web/Host.js.map +1 -1
- package/lib/module/skia/web/JsiSkAnimatedImage.js +6 -3
- package/lib/module/skia/web/JsiSkAnimatedImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkCanvas.js +6 -3
- package/lib/module/skia/web/JsiSkCanvas.js.map +1 -1
- package/lib/module/skia/web/JsiSkColorFilter.js +6 -3
- package/lib/module/skia/web/JsiSkColorFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasure.js +6 -3
- package/lib/module/skia/web/JsiSkContourMeasure.js.map +1 -1
- package/lib/module/skia/web/JsiSkContourMeasureIter.js +6 -3
- package/lib/module/skia/web/JsiSkContourMeasureIter.js.map +1 -1
- package/lib/module/skia/web/JsiSkData.js +6 -3
- package/lib/module/skia/web/JsiSkData.js.map +1 -1
- package/lib/module/skia/web/JsiSkFont.js +6 -3
- package/lib/module/skia/web/JsiSkFont.js.map +1 -1
- package/lib/module/skia/web/JsiSkImage.js +12 -8
- package/lib/module/skia/web/JsiSkImage.js.map +1 -1
- package/lib/module/skia/web/JsiSkImageFilter.js +6 -3
- package/lib/module/skia/web/JsiSkImageFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMaskFilter.js +6 -3
- package/lib/module/skia/web/JsiSkMaskFilter.js.map +1 -1
- package/lib/module/skia/web/JsiSkMatrix.js +8 -5
- package/lib/module/skia/web/JsiSkMatrix.js.map +1 -1
- package/lib/module/skia/web/JsiSkPaint.js +6 -3
- package/lib/module/skia/web/JsiSkPaint.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilder.js +3 -2
- package/lib/module/skia/web/JsiSkParagraphBuilder.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js +1 -1
- package/lib/module/skia/web/JsiSkParagraphBuilderFactory.js.map +1 -1
- package/lib/module/skia/web/JsiSkParagraphStyle.js +15 -15
- package/lib/module/skia/web/JsiSkParagraphStyle.js.map +1 -1
- package/lib/module/skia/web/JsiSkPath.js +6 -3
- package/lib/module/skia/web/JsiSkPath.js.map +1 -1
- package/lib/module/skia/web/JsiSkPathEffect.js +6 -3
- package/lib/module/skia/web/JsiSkPathEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkPicture.js +6 -3
- package/lib/module/skia/web/JsiSkPicture.js.map +1 -1
- package/lib/module/skia/web/JsiSkPictureRecorder.js +6 -3
- package/lib/module/skia/web/JsiSkPictureRecorder.js.map +1 -1
- package/lib/module/skia/web/JsiSkPoint.js +6 -3
- package/lib/module/skia/web/JsiSkPoint.js.map +1 -1
- package/lib/module/skia/web/JsiSkRRect.js +6 -3
- package/lib/module/skia/web/JsiSkRRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRSXform.js +6 -3
- package/lib/module/skia/web/JsiSkRSXform.js.map +1 -1
- package/lib/module/skia/web/JsiSkRect.js +6 -3
- package/lib/module/skia/web/JsiSkRect.js.map +1 -1
- package/lib/module/skia/web/JsiSkRuntimeEffect.js +6 -3
- package/lib/module/skia/web/JsiSkRuntimeEffect.js.map +1 -1
- package/lib/module/skia/web/JsiSkSVG.js +8 -5
- package/lib/module/skia/web/JsiSkSVG.js.map +1 -1
- package/lib/module/skia/web/JsiSkShader.js +6 -3
- package/lib/module/skia/web/JsiSkShader.js.map +1 -1
- package/lib/module/skia/web/JsiSkSurface.js +6 -3
- package/lib/module/skia/web/JsiSkSurface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTextBlob.js +6 -3
- package/lib/module/skia/web/JsiSkTextBlob.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypeface.js +6 -3
- package/lib/module/skia/web/JsiSkTypeface.js.map +1 -1
- package/lib/module/skia/web/JsiSkTypefaceFontProvider.js +4 -1
- package/lib/module/skia/web/JsiSkTypefaceFontProvider.js.map +1 -1
- package/lib/module/skia/web/JsiSkVertices.js +6 -3
- package/lib/module/skia/web/JsiSkVertices.js.map +1 -1
- package/lib/module/skia/web/JsiVideo.js +5 -2
- package/lib/module/skia/web/JsiVideo.js.map +1 -1
- package/lib/module/sksg/Container.js +8 -5
- package/lib/module/sksg/Container.js.map +1 -1
- package/lib/module/sksg/Elements.d.ts +1 -1
- package/lib/module/sksg/Elements.js.map +1 -1
- package/lib/module/sksg/HostConfig.d.ts +1 -1
- package/lib/module/sksg/Reconciler.js +5 -1
- package/lib/module/sksg/Reconciler.js.map +1 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js +5 -1
- package/lib/module/sksg/Recorder/ReanimatedRecorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Recorder.js +6 -3
- package/lib/module/sksg/Recorder/Recorder.js.map +1 -1
- package/lib/module/sksg/Recorder/Visitor.js +1 -1
- package/lib/module/sksg/Recorder/Visitor.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Drawing.js +4 -2
- package/lib/module/sksg/Recorder/commands/Drawing.js.map +1 -1
- package/lib/module/sksg/Recorder/commands/Shaders.js +3 -2
- package/lib/module/sksg/Recorder/commands/Shaders.js.map +1 -1
- package/lib/module/views/SkiaBaseWebView.js +12 -9
- package/lib/module/views/SkiaBaseWebView.js.map +1 -1
- package/lib/module/views/SkiaPictureView.js +5 -1
- package/lib/module/views/SkiaPictureView.js.map +1 -1
- package/lib/module/views/SkiaPictureView.web.js +4 -1
- package/lib/module/views/SkiaPictureView.web.js.map +1 -1
- package/lib/module/web/LoadSkiaWeb.js +2 -1
- package/lib/module/web/LoadSkiaWeb.js.map +1 -1
- package/lib/module/web/WithSkiaWeb.js +1 -1
- package/lib/module/web/WithSkiaWeb.js.map +1 -1
- package/lib/typescript/lib/module/Platform/Platform.web.d.ts +1 -1
- package/lib/typescript/lib/module/mock/index.d.ts +22 -11
- package/lib/typescript/lib/module/renderer/Canvas.d.ts +1 -1
- package/lib/typescript/lib/module/skia/web/CanvasKitWebGLBufferImpl.d.ts +2 -2
- package/lib/typescript/lib/module/skia/web/JsiSkAnimatedImage.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkCanvas.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkColorFilter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkContourMeasure.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkContourMeasureIter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkData.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkFont.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkImage.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkImageFilter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkMaskFilter.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkMatrix.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPaint.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPath.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPathEffect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPicture.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPictureRecorder.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkPoint.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRRect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRSXform.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkRuntimeEffect.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkSVG.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkShader.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkSurface.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkTextBlob.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkTypeface.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkTypefaceFontProvider.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiSkVertices.d.ts +0 -1
- package/lib/typescript/lib/module/skia/web/JsiVideo.d.ts +2 -2
- package/lib/typescript/lib/module/sksg/Container.d.ts +15 -7
- package/lib/typescript/lib/module/sksg/Reconciler.d.ts +21 -15
- package/lib/typescript/lib/module/sksg/Recorder/ReanimatedRecorder.d.ts +0 -1
- package/lib/typescript/lib/module/sksg/Recorder/Recorder.d.ts +2 -5
- package/lib/typescript/lib/module/views/SkiaBaseWebView.d.ts +11 -12
- package/lib/typescript/lib/module/views/SkiaPictureView.d.ts +1 -1
- package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +1 -1
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +1 -0
- package/lib/typescript/src/sksg/Elements.d.ts +1 -1
- package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
- package/package.json +3 -3
- package/src/Platform/Platform.web.tsx +2 -1
- package/src/__tests__/snapshots/screens/snapshot2-android-ci.png +0 -0
- package/src/__tests__/snapshots/screens/snapshot3-android-ci.png +0 -0
- package/src/renderer/Canvas.tsx +3 -3
- package/src/renderer/__tests__/setup.tsx +5 -1
- package/src/sksg/Elements.tsx +1 -1
- package/src/sksg/Reconciler.ts +1 -2
- package/cpp/skia/include/gpu/graphite/LogPriority.h +0 -36
- package/cpp/skia/include/gpu/graphite/PrecompileContext.h +0 -52
- package/cpp/skia/include/gpu/graphite/mtl/MtlGraphiteTypesUtils.h +0 -48
@@ -10,7 +10,7 @@ declare function View({ children, onLayout, style: rawStyle }: {
|
|
10
10
|
onLayout: any;
|
11
11
|
style: any;
|
12
12
|
}): React.DetailedReactHTMLElement<{
|
13
|
-
ref: React.
|
13
|
+
ref: React.RefObject<null>;
|
14
14
|
style: any;
|
15
15
|
}, HTMLElement>;
|
16
16
|
import React from "react";
|
@@ -154,12 +154,14 @@ export function Mock(CanvasKit: any): {
|
|
154
154
|
matchFont: (inputStyle?: {}, fontMgr?: import("../../..").SkFontMgr) => import("../../..").SkFont;
|
155
155
|
listFontFamilies: (fontMgr?: import("../../..").SkFontMgr) => string[];
|
156
156
|
makeImageFromView: (viewRef: any, callback?: null) => any;
|
157
|
-
useAnimatedImage: (source: any,
|
157
|
+
useAnimatedImage: (source: any, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
158
|
+
onError: any) => null;
|
158
159
|
createPicture: (cb: any, rect: any) => import("../../..").SkPicture;
|
159
160
|
vec: (x: number | undefined, y: any) => import("../../..").SkPoint;
|
160
161
|
point: (x: number | undefined, y: any) => import("../../..").SkPoint;
|
161
162
|
neg: (a: any) => import("../../..").SkPoint;
|
162
|
-
add: (a: any,
|
163
|
+
add: (a: any, // eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
164
|
+
b: any) => import("../../..").SkPoint;
|
163
165
|
sub: (a: any, b: any) => import("../../..").SkPoint;
|
164
166
|
dist: (a: any, b: any) => number;
|
165
167
|
rect: (x: any, y: any, width: any, height: any) => import("../../..").SkHostRect;
|
@@ -191,7 +193,8 @@ export function Mock(CanvasKit: any): {
|
|
191
193
|
B: number;
|
192
194
|
C: number;
|
193
195
|
};
|
194
|
-
MakeCubic: (B: any,
|
196
|
+
MakeCubic: (B: any, // Reanimated hooks
|
197
|
+
C: any) => {
|
195
198
|
B: any;
|
196
199
|
C: any;
|
197
200
|
};
|
@@ -281,13 +284,15 @@ export function Mock(CanvasKit: any): {
|
|
281
284
|
RoundedRect: (props: any) => import("react").DOMElement<any, Element>;
|
282
285
|
DiffRect: (props: any) => import("react").DOMElement<any, Element>;
|
283
286
|
Line: (props: any) => import("react").DOMElement<any, Element>;
|
284
|
-
Path: (
|
287
|
+
Path: (// @ts-ignore
|
288
|
+
{ start, end, ...props }: {
|
285
289
|
[x: string]: any;
|
286
290
|
start?: number | undefined;
|
287
291
|
end?: number | undefined;
|
288
292
|
}) => import("react").DOMElement<any, Element>;
|
289
293
|
Oval: (props: any) => import("react").DOMElement<any, Element>;
|
290
|
-
Points: (
|
294
|
+
Points: (// @ts-ignore
|
295
|
+
{ mode, ...props }: {
|
291
296
|
[x: string]: any;
|
292
297
|
mode?: string | undefined;
|
293
298
|
}) => import("react").DOMElement<any, Element>;
|
@@ -347,7 +352,8 @@ export function Mock(CanvasKit: any): {
|
|
347
352
|
filter: any;
|
348
353
|
children: any;
|
349
354
|
}>;
|
350
|
-
Image: (
|
355
|
+
Image: (// @ts-ignore
|
356
|
+
{ fit, ...props }: {
|
351
357
|
[x: string]: any;
|
352
358
|
fit?: string | undefined;
|
353
359
|
}) => import("react").DOMElement<any, Element>;
|
@@ -376,7 +382,8 @@ export function Mock(CanvasKit: any): {
|
|
376
382
|
tileWidth?: number | undefined;
|
377
383
|
tileHeight?: number | undefined;
|
378
384
|
}) => import("react").DOMElement<any, Element>;
|
379
|
-
Shader: (
|
385
|
+
Shader: (// @ts-ignore
|
386
|
+
{ uniforms, ...props }: {
|
380
387
|
[x: string]: any;
|
381
388
|
uniforms?: {} | undefined;
|
382
389
|
}) => import("react").DOMElement<any, Element>;
|
@@ -384,12 +391,14 @@ export function Mock(CanvasKit: any): {
|
|
384
391
|
Math: string;
|
385
392
|
Colors: string;
|
386
393
|
};
|
387
|
-
Text: (
|
394
|
+
Text: (// @ts-ignore
|
395
|
+
{ x, y, ...props }: {
|
388
396
|
[x: string]: any;
|
389
397
|
x?: number | undefined;
|
390
398
|
y?: number | undefined;
|
391
399
|
}) => import("react").DOMElement<any, Element>;
|
392
|
-
Glyphs: (
|
400
|
+
Glyphs: (// @ts-ignore
|
401
|
+
{ x, y, ...props }: {
|
393
402
|
[x: string]: any;
|
394
403
|
x?: number | undefined;
|
395
404
|
y?: number | undefined;
|
@@ -415,11 +424,13 @@ export function Mock(CanvasKit: any): {
|
|
415
424
|
style?: string | undefined;
|
416
425
|
respectCTM?: boolean | undefined;
|
417
426
|
}) => import("react").DOMElement<any, Element>;
|
418
|
-
Blur: (
|
427
|
+
Blur: (// @ts-ignore
|
428
|
+
{ mode, ...props }: {
|
419
429
|
[x: string]: any;
|
420
430
|
mode?: string | undefined;
|
421
431
|
}) => import("react").DOMElement<any, Element>;
|
422
|
-
Offset: (
|
432
|
+
Offset: (// @ts-ignore
|
433
|
+
{ x, y, ...props }: {
|
423
434
|
[x: string]: any;
|
424
435
|
x?: number | undefined;
|
425
436
|
y?: number | undefined;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
export class CanvasKitWebGLBufferImpl extends CanvasKitWebGLBuffer {
|
2
2
|
constructor(surface: any, source: any);
|
3
|
-
image: null;
|
4
3
|
surface: any;
|
5
4
|
source: any;
|
6
|
-
toImage():
|
5
|
+
toImage(): any;
|
6
|
+
image: any;
|
7
7
|
}
|
8
8
|
import { CanvasKitWebGLBuffer } from "../types";
|
@@ -1,6 +1,5 @@
|
|
1
1
|
export class JsiSkCanvas extends HostObject {
|
2
2
|
constructor(CanvasKit: any, ref: any);
|
3
|
-
dispose: () => void;
|
4
3
|
drawRect(rect: any, paint: any): void;
|
5
4
|
drawImage(image: any, x: any, y: any, paint: any): void;
|
6
5
|
drawImageRect(img: any, src: any, dest: any, paint: any, fastSample: any): void;
|
@@ -4,7 +4,6 @@ export class JsiSkContourMeasure extends HostObject {
|
|
4
4
|
getSegment(startD: any, stopD: any, startWithMoveTo: any): JsiSkPath;
|
5
5
|
isClosed(): any;
|
6
6
|
length(): any;
|
7
|
-
dispose: () => void;
|
8
7
|
}
|
9
8
|
import { HostObject } from "./Host";
|
10
9
|
import { JsiSkPoint } from "./JsiSkPoint";
|
@@ -14,7 +14,6 @@ export class JsiSkImage extends HostObject {
|
|
14
14
|
encodeToBytes(fmt: any, quality: any): any;
|
15
15
|
encodeToBase64(fmt: any, quality: any): string;
|
16
16
|
readPixels(srcX: any, srcY: any, imageInfo: any): any;
|
17
|
-
dispose: () => void;
|
18
17
|
makeNonTextureImage(): JsiSkImage;
|
19
18
|
getNativeTextureUnstable(): null;
|
20
19
|
}
|
@@ -2,7 +2,6 @@ export class JsiSkMatrix extends HostObject {
|
|
2
2
|
constructor(CanvasKit: any, ref: any);
|
3
3
|
preMultiply(matrix: any): void;
|
4
4
|
postMultiply(matrix: any): void;
|
5
|
-
dispose: () => void;
|
6
5
|
concat(matrix: any): this;
|
7
6
|
translate(x: any, y: any): this;
|
8
7
|
postTranslate(x: any, y: any): this;
|
@@ -1,6 +1,5 @@
|
|
1
1
|
export class JsiSkPath extends HostObject {
|
2
2
|
constructor(CanvasKit: any, ref: any);
|
3
|
-
dispose: () => void;
|
4
3
|
addPath(src: any, matrix: any, extend?: boolean): this;
|
5
4
|
addArc(oval: any, startAngleInDegrees: any, sweepAngleInDegrees: any): this;
|
6
5
|
addOval(oval: any, isCCW: any, startIndex: any): this;
|
@@ -1,13 +1,12 @@
|
|
1
1
|
export function createVideo(CanvasKit: any, url: any): Promise<any>;
|
2
2
|
export class JsiVideo {
|
3
3
|
constructor(ImageFactory: any, videoElement: any);
|
4
|
-
__typename__: string;
|
5
|
-
webglBuffer: null;
|
6
4
|
ImageFactory: any;
|
7
5
|
videoElement: any;
|
8
6
|
duration(): number;
|
9
7
|
framerate(): void;
|
10
8
|
setSurface(surface: any): void;
|
9
|
+
webglBuffer: CanvasKitWebGLBufferImpl | undefined;
|
11
10
|
nextImage(): any;
|
12
11
|
seek(time: any): void;
|
13
12
|
rotation(): number;
|
@@ -20,3 +19,4 @@ export class JsiVideo {
|
|
20
19
|
setVolume(volume: any): void;
|
21
20
|
dispose(): void;
|
22
21
|
}
|
22
|
+
import { CanvasKitWebGLBufferImpl } from "./CanvasKitWebGLBufferImpl";
|
@@ -1,25 +1,33 @@
|
|
1
1
|
export class Container {
|
2
2
|
constructor(Skia: any, nativeId: any);
|
3
|
-
_root: any[];
|
4
|
-
recording: null;
|
5
|
-
unmounted: boolean;
|
6
3
|
Skia: any;
|
7
4
|
nativeId: any;
|
8
|
-
set root(value: any
|
9
|
-
get root(): any
|
5
|
+
set root(value: any);
|
6
|
+
get root(): any;
|
7
|
+
_root: any;
|
10
8
|
unmount(): void;
|
9
|
+
unmounted: boolean | undefined;
|
11
10
|
drawOnCanvas(canvas: any): void;
|
12
11
|
}
|
13
12
|
export function createContainer(Skia: any, nativeId: any): StaticContainer | ReanimatedContainer | NativeReanimatedContainer;
|
14
13
|
declare class StaticContainer extends Container {
|
15
14
|
redraw(): void;
|
15
|
+
recording: {
|
16
|
+
commands: any;
|
17
|
+
paintPool: never[];
|
18
|
+
animationValues: any;
|
19
|
+
} | undefined;
|
16
20
|
}
|
17
21
|
declare class ReanimatedContainer extends Container {
|
18
|
-
mapperId: null;
|
19
22
|
redraw(): void;
|
23
|
+
recording: {
|
24
|
+
commands: any;
|
25
|
+
paintPool: never[];
|
26
|
+
} | undefined;
|
27
|
+
mapperId: any;
|
20
28
|
}
|
21
29
|
declare class NativeReanimatedContainer extends Container {
|
22
|
-
mapperId: null;
|
23
30
|
redraw(): void;
|
31
|
+
mapperId: any;
|
24
32
|
}
|
25
33
|
export {};
|
@@ -3,42 +3,48 @@ export class SkiaSGRoot {
|
|
3
3
|
Skia: any;
|
4
4
|
container: {
|
5
5
|
redraw(): void;
|
6
|
-
recording:
|
7
|
-
|
8
|
-
|
6
|
+
recording: {
|
7
|
+
commands: any;
|
8
|
+
paintPool: never[];
|
9
|
+
animationValues: any;
|
10
|
+
} | undefined;
|
9
11
|
Skia: any;
|
10
12
|
nativeId: any;
|
11
|
-
root: any
|
13
|
+
root: any;
|
14
|
+
_root: any;
|
12
15
|
unmount(): void;
|
16
|
+
unmounted: boolean | undefined;
|
13
17
|
drawOnCanvas(canvas: any): void;
|
14
18
|
} | {
|
15
|
-
mapperId: null;
|
16
19
|
redraw(): void;
|
17
|
-
recording:
|
18
|
-
|
19
|
-
|
20
|
+
recording: {
|
21
|
+
commands: any;
|
22
|
+
paintPool: never[];
|
23
|
+
} | undefined;
|
24
|
+
mapperId: any;
|
20
25
|
Skia: any;
|
21
26
|
nativeId: any;
|
22
|
-
root: any
|
27
|
+
root: any;
|
28
|
+
_root: any;
|
23
29
|
unmount(): void;
|
30
|
+
unmounted: boolean | undefined;
|
24
31
|
drawOnCanvas(canvas: any): void;
|
25
32
|
} | {
|
26
|
-
mapperId: null;
|
27
33
|
redraw(): void;
|
28
|
-
|
29
|
-
recording: null;
|
30
|
-
unmounted: boolean;
|
34
|
+
mapperId: any;
|
31
35
|
Skia: any;
|
32
36
|
nativeId: any;
|
33
|
-
root: any
|
37
|
+
root: any;
|
38
|
+
_root: any;
|
34
39
|
unmount(): void;
|
40
|
+
unmounted: boolean | undefined;
|
35
41
|
drawOnCanvas(canvas: any): void;
|
36
42
|
};
|
37
43
|
root: any;
|
38
44
|
get sg(): {
|
39
45
|
type: any;
|
40
46
|
props: {};
|
41
|
-
children: any
|
47
|
+
children: any;
|
42
48
|
isDeclaration: boolean;
|
43
49
|
};
|
44
50
|
updateContainer(element: any): Promise<any>;
|
@@ -1,11 +1,8 @@
|
|
1
1
|
export class Recorder {
|
2
|
-
commands: any[];
|
3
|
-
cursors: any[];
|
4
|
-
animationValues: Set<any>;
|
5
2
|
getRecording(): {
|
6
|
-
commands: any
|
3
|
+
commands: any;
|
7
4
|
paintPool: never[];
|
8
|
-
animationValues:
|
5
|
+
animationValues: any;
|
9
6
|
};
|
10
7
|
processProps(props: any): {
|
11
8
|
props: any;
|
@@ -1,18 +1,15 @@
|
|
1
1
|
export class SkiaBaseWebView extends React.Component<any, any, any> {
|
2
2
|
constructor(props: any);
|
3
|
-
_surface: null;
|
4
|
-
_unsubscriptions: any[];
|
5
|
-
_canvas: null;
|
6
|
-
_canvasRef: React.RefObject<any>;
|
7
|
-
_redrawRequests: number;
|
8
|
-
requestId: number;
|
9
|
-
width: number;
|
10
|
-
height: number;
|
11
3
|
unsubscribeAll(): void;
|
4
|
+
_unsubscriptions: any[] | undefined;
|
12
5
|
onLayoutEvent(evt: any): void;
|
6
|
+
width: any;
|
7
|
+
height: any;
|
8
|
+
_surface: JsiSkSurface | undefined;
|
9
|
+
_canvas: import("../skia/web/JsiSkCanvas").JsiSkCanvas | undefined;
|
13
10
|
getSize(): {
|
14
|
-
width:
|
15
|
-
height:
|
11
|
+
width: any;
|
12
|
+
height: any;
|
16
13
|
};
|
17
14
|
componentDidMount(): void;
|
18
15
|
componentDidUpdate(): void;
|
@@ -22,7 +19,7 @@ export class SkiaBaseWebView extends React.Component<any, any, any> {
|
|
22
19
|
* @param rect Rect to use as bounds. Optional.
|
23
20
|
* @returns An Image object.
|
24
21
|
*/
|
25
|
-
makeImageSnapshot(rect: any):
|
22
|
+
makeImageSnapshot(rect: any): import("..").JsiSkImage | undefined;
|
26
23
|
/**
|
27
24
|
* Override to render
|
28
25
|
*/
|
@@ -30,8 +27,10 @@ export class SkiaBaseWebView extends React.Component<any, any, any> {
|
|
30
27
|
* Sends a redraw request to the native SkiaView.
|
31
28
|
*/
|
32
29
|
tick(): void;
|
30
|
+
_redrawRequests: number | undefined;
|
31
|
+
requestId: number | undefined;
|
33
32
|
redraw(): void;
|
34
|
-
onLayout: (evt: any) => void;
|
35
33
|
render(): React.CElement<import("react-native").ViewProps, import("react-native").View>;
|
36
34
|
}
|
37
35
|
import React from "react";
|
36
|
+
import { JsiSkSurface } from "../skia/web/JsiSkSurface";
|
@@ -1,11 +1,11 @@
|
|
1
1
|
export class SkiaPictureView extends React.Component<any, any, any> {
|
2
2
|
constructor(props: any);
|
3
|
-
requestId: number;
|
4
3
|
_nativeId: number;
|
5
4
|
get nativeId(): number;
|
6
5
|
componentDidUpdate(prevProps: any): void;
|
7
6
|
componentWillUnmount(): void;
|
8
7
|
tick(): void;
|
8
|
+
requestId: number | undefined;
|
9
9
|
/**
|
10
10
|
* Creates a snapshot from the canvas in the surface
|
11
11
|
* @param rect Rect to use as bounds. Optional.
|
@@ -9,7 +9,7 @@ interface CanvasRef extends FC<CanvasProps> {
|
|
9
9
|
redraw(): void;
|
10
10
|
getNativeId(): number;
|
11
11
|
}
|
12
|
-
export declare const useCanvasRef: () => React.RefObject<CanvasRef>;
|
12
|
+
export declare const useCanvasRef: () => React.RefObject<CanvasRef | null>;
|
13
13
|
export interface CanvasProps extends ViewProps {
|
14
14
|
debug?: boolean;
|
15
15
|
opaque?: boolean;
|
@@ -47,6 +47,7 @@ export declare const drawOnNode: (element: ReactNode) => Promise<SkiaExports.SkS
|
|
47
47
|
export declare const mountCanvas: (element: ReactNode) => Promise<{
|
48
48
|
surface: SkiaExports.SkSurface;
|
49
49
|
root: SkiaSGRoot;
|
50
|
+
render: () => Promise<void>;
|
50
51
|
draw: () => Promise<void>;
|
51
52
|
}>;
|
52
53
|
export declare const serialize: (element: ReactNode) => Promise<string>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import type { FractalNoiseProps, CircleProps, DrawingNodeProps, ImageProps, PaintProps, PathProps, LineProps, OvalProps, DiffRectProps, PointsProps, RectProps, RoundedRectProps, TextProps, VerticesProps, BlurMaskFilterProps, BlendImageFilterProps, BlurImageFilterProps, DisplacementMapImageFilterProps, DropShadowImageFilterProps, OffsetImageFilterProps, RuntimeShaderImageFilterProps, MatrixColorFilterProps, ShaderProps, ImageShaderProps, LinearGradientProps, GroupProps, PatchProps, BlendColorFilterProps, DashPathEffectProps, DiscretePathEffectProps, CornerPathEffectProps, Line2DPathEffectProps, Path1DPathEffectProps, Path2DPathEffectProps, TextPathProps, TextBlobProps, GlyphsProps, TwoPointConicalGradientProps, TurbulenceProps, SweepGradientProps, RadialGradientProps, ColorProps, PictureProps, ImageSVGProps, LerpColorFilterProps, BoxProps, BoxShadowProps, ParagraphProps, AtlasProps, ChildrenProps, MorphologyImageFilterProps, BlendProps } from "../dom/types";
|
2
2
|
import type { SkiaProps } from "../renderer";
|
3
|
-
declare
|
3
|
+
declare module "react" {
|
4
4
|
namespace JSX {
|
5
5
|
interface IntrinsicElements {
|
6
6
|
skGroup: SkiaProps<GroupProps>;
|
@@ -2,7 +2,7 @@ import type { HostConfig } from "react-reconciler";
|
|
2
2
|
import type { NodeType } from "../dom/types";
|
3
3
|
import type { Node } from "./Node";
|
4
4
|
import type { Container } from "./Container";
|
5
|
-
export declare const debug: (
|
5
|
+
export declare const debug: (...args: Parameters<typeof console.log>) => void;
|
6
6
|
type Instance = Node;
|
7
7
|
type Props = object;
|
8
8
|
type TextInstance = Node;
|
package/package.json
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
"setup-skia-web": "./scripts/setup-canvaskit.js"
|
9
9
|
},
|
10
10
|
"title": "React Native Skia",
|
11
|
-
"version": "
|
11
|
+
"version": "2.0.0-next.1",
|
12
12
|
"description": "High-performance React Native Graphics using Skia",
|
13
13
|
"main": "lib/module/index.js",
|
14
14
|
"react-native": "src/index.ts",
|
@@ -96,7 +96,7 @@
|
|
96
96
|
"@types/jest": "29.5.6",
|
97
97
|
"@types/pixelmatch": "5.2.4",
|
98
98
|
"@types/pngjs": "6.0.1",
|
99
|
-
"@types/react": "^
|
99
|
+
"@types/react": "^19.0.0",
|
100
100
|
"@types/react-reconciler": "0.28.9",
|
101
101
|
"@types/ws": "8.5.3",
|
102
102
|
"eslint": "8",
|
@@ -111,7 +111,7 @@
|
|
111
111
|
"react": "19.0.0",
|
112
112
|
"react-native": "0.78.0",
|
113
113
|
"react-native-builder-bob": "0.18.2",
|
114
|
-
"react-native-reanimated": "
|
114
|
+
"react-native-reanimated": "3.17.1",
|
115
115
|
"rimraf": "3.0.2",
|
116
116
|
"semantic-release": "^24.1.0",
|
117
117
|
"semantic-release-yarn": "^3.0.2",
|