@shopify/react-native-skia 1.11.9-next.1 → 1.11.10
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/android/build.gradle +1 -1
- 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/external/reanimated/textures.js +3 -4
- package/lib/commonjs/external/reanimated/textures.js.map +1 -1
- package/lib/commonjs/headless/index.d.ts +1 -1
- package/lib/commonjs/headless/index.js +2 -2
- package/lib/commonjs/headless/index.js.map +1 -1
- package/lib/commonjs/renderer/Canvas.d.ts +2 -2
- package/lib/commonjs/renderer/Canvas.js +28 -11
- package/lib/commonjs/renderer/Canvas.js.map +1 -1
- package/lib/commonjs/renderer/Offscreen.d.ts +2 -2
- package/lib/commonjs/renderer/Offscreen.js +4 -4
- package/lib/commonjs/renderer/Offscreen.js.map +1 -1
- package/lib/commonjs/renderer/__tests__/setup.d.ts +5 -5
- package/lib/commonjs/sksg/Container.d.ts +1 -3
- package/lib/commonjs/sksg/Container.js +1 -7
- package/lib/commonjs/sksg/Container.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig.d.ts +1 -1
- package/lib/commonjs/sksg/HostConfig.js +6 -36
- package/lib/commonjs/sksg/HostConfig.js.map +1 -1
- package/lib/commonjs/sksg/HostConfig2.d.ts +19 -0
- package/lib/commonjs/sksg/HostConfig2.js +159 -0
- package/lib/commonjs/sksg/HostConfig2.js.map +1 -0
- package/lib/commonjs/sksg/Reconciler.d.ts +2 -3
- package/lib/commonjs/sksg/Reconciler.js +6 -16
- package/lib/commonjs/sksg/Reconciler.js.map +1 -1
- package/lib/module/Platform/Platform.web.js +1 -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/textures.js +4 -5
- package/lib/module/external/reanimated/textures.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/headless/index.d.ts +1 -1
- package/lib/module/headless/index.js +2 -2
- package/lib/module/headless/index.js.map +1 -1
- package/lib/module/renderer/Canvas.d.ts +2 -2
- package/lib/module/renderer/Canvas.js +28 -10
- package/lib/module/renderer/Canvas.js.map +1 -1
- package/lib/module/renderer/Offscreen.d.ts +2 -2
- package/lib/module/renderer/Offscreen.js +4 -4
- package/lib/module/renderer/Offscreen.js.map +1 -1
- package/lib/module/renderer/__tests__/setup.d.ts +5 -5
- 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.d.ts +1 -3
- package/lib/module/sksg/Container.js +8 -11
- package/lib/module/sksg/Container.js.map +1 -1
- package/lib/module/sksg/HostConfig.d.ts +1 -1
- package/lib/module/sksg/HostConfig.js +7 -36
- package/lib/module/sksg/HostConfig.js.map +1 -1
- package/lib/module/sksg/HostConfig2.d.ts +19 -0
- package/lib/module/sksg/HostConfig2.js +152 -0
- package/lib/module/sksg/HostConfig2.js.map +1 -0
- package/lib/module/sksg/Reconciler.d.ts +2 -3
- package/lib/module/sksg/Reconciler.js +11 -16
- 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/commonjs/headless/index.d.ts +1 -1
- package/lib/typescript/lib/commonjs/renderer/Canvas.d.ts +1 -9
- package/lib/typescript/lib/commonjs/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/lib/commonjs/sksg/Container.d.ts +0 -3
- package/lib/typescript/lib/commonjs/sksg/HostConfig.d.ts +4 -21
- package/lib/typescript/lib/commonjs/sksg/HostConfig2.d.ts +44 -0
- package/lib/typescript/lib/commonjs/sksg/Reconciler.d.ts +2 -9
- package/lib/typescript/lib/module/headless/index.d.ts +1 -1
- package/lib/typescript/lib/module/renderer/Canvas.d.ts +1 -9
- package/lib/typescript/lib/module/renderer/Offscreen.d.ts +2 -2
- 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 +12 -7
- package/lib/typescript/lib/module/sksg/HostConfig.d.ts +4 -20
- package/lib/typescript/lib/module/sksg/HostConfig2.d.ts +43 -0
- package/lib/typescript/lib/module/sksg/Reconciler.d.ts +17 -18
- 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 +2 -2
- package/lib/typescript/lib/module/views/SkiaPictureView.web.d.ts +1 -1
- package/lib/typescript/src/headless/index.d.ts +1 -1
- package/lib/typescript/src/renderer/Canvas.d.ts +2 -2
- package/lib/typescript/src/renderer/Offscreen.d.ts +2 -2
- package/lib/typescript/src/renderer/__tests__/setup.d.ts +5 -5
- package/lib/typescript/src/sksg/Container.d.ts +1 -3
- package/lib/typescript/src/sksg/HostConfig.d.ts +1 -1
- package/lib/typescript/src/sksg/HostConfig2.d.ts +19 -0
- package/lib/typescript/src/sksg/Reconciler.d.ts +2 -3
- package/package.json +9 -10
- package/src/external/reanimated/textures.tsx +4 -5
- package/src/headless/index.ts +2 -2
- package/src/renderer/Canvas.tsx +81 -57
- package/src/renderer/Offscreen.tsx +4 -4
- package/src/renderer/__tests__/Data.spec.tsx +10 -9
- package/src/renderer/__tests__/Drawings.spec.tsx +11 -11
- package/src/renderer/__tests__/FitBox.spec.tsx +10 -10
- package/src/renderer/__tests__/Glyphs.spec.tsx +2 -2
- package/src/renderer/__tests__/Image.spec.tsx +2 -2
- package/src/renderer/__tests__/Paths.spec.tsx +8 -8
- package/src/renderer/__tests__/Picture.spec.tsx +12 -10
- package/src/renderer/__tests__/Simple.spec.tsx +6 -6
- package/src/renderer/__tests__/Surfaces.spec.tsx +2 -2
- package/src/renderer/__tests__/Text.spec.tsx +12 -12
- package/src/renderer/__tests__/Transform.spec.tsx +8 -8
- package/src/renderer/__tests__/documentation/Group.spec.tsx +12 -12
- package/src/renderer/__tests__/documentation/getting-started/HelloWorld.spec.tsx +2 -2
- package/src/renderer/__tests__/documentation/paint/Overview.spec.tsx +8 -8
- package/src/renderer/__tests__/documentation/shapes/Box.spec.tsx +4 -4
- package/src/renderer/__tests__/e2e/Atlas.spec.tsx +3 -3
- package/src/renderer/__tests__/e2e/Offscreen.spec.tsx +1 -1
- package/src/renderer/__tests__/examples/BlendModes.spec.tsx +4 -4
- package/src/renderer/__tests__/setup.tsx +13 -13
- package/src/sksg/Container.ts +1 -9
- package/src/sksg/HostConfig.ts +7 -37
- package/src/sksg/HostConfig2.ts +247 -0
- package/src/sksg/Reconciler.ts +6 -17
- package/src/sksg/__tests__/Simple.spec.tsx +8 -8
- 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
@@ -1,3 +1,6 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { BaseHostObject } from "./Host";
|
2
5
|
export class JsiSkRSXform extends BaseHostObject {
|
3
6
|
static fromValue(rsxform) {
|
@@ -8,6 +11,9 @@ export class JsiSkRSXform extends BaseHostObject {
|
|
8
11
|
}
|
9
12
|
constructor(CanvasKit, ref) {
|
10
13
|
super(CanvasKit, ref, "RSXform");
|
14
|
+
_defineProperty(this, "dispose", () => {
|
15
|
+
// nothing to do here, RSXform is a Float32Array
|
16
|
+
});
|
11
17
|
}
|
12
18
|
set(scos, ssin, tx, ty) {
|
13
19
|
this.ref[0] = scos;
|
@@ -27,8 +33,5 @@ export class JsiSkRSXform extends BaseHostObject {
|
|
27
33
|
get ty() {
|
28
34
|
return this.ref[3];
|
29
35
|
}
|
30
|
-
dispose = () => {
|
31
|
-
// nothing to do here, RSXform is a Float32Array
|
32
|
-
};
|
33
36
|
}
|
34
37
|
//# sourceMappingURL=JsiSkRSXform.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseHostObject","JsiSkRSXform","fromValue","rsxform","ref","Float32Array","of","scos","ssin","tx","ty","constructor","CanvasKit","
|
1
|
+
{"version":3,"names":["BaseHostObject","JsiSkRSXform","fromValue","rsxform","ref","Float32Array","of","scos","ssin","tx","ty","constructor","CanvasKit","_defineProperty","set"],"sources":["JsiSkRSXform.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkRSXform } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\n\nexport type RSXform = Float32Array;\n\nexport class JsiSkRSXform\n extends BaseHostObject<RSXform, \"RSXform\">\n implements SkRSXform\n{\n static fromValue(rsxform: SkRSXform) {\n if (rsxform instanceof JsiSkRSXform) {\n return rsxform.ref;\n }\n return Float32Array.of(rsxform.scos, rsxform.ssin, rsxform.tx, rsxform.ty);\n }\n\n constructor(CanvasKit: CanvasKit, ref: RSXform) {\n super(CanvasKit, ref, \"RSXform\");\n }\n set(scos: number, ssin: number, tx: number, ty: number) {\n this.ref[0] = scos;\n this.ref[1] = ssin;\n this.ref[2] = tx;\n this.ref[3] = ty;\n }\n get scos() {\n return this.ref[0];\n }\n get ssin() {\n return this.ref[1];\n }\n get tx() {\n return this.ref[2];\n }\n get ty() {\n return this.ref[3];\n }\n dispose = () => {\n // nothing to do here, RSXform is a Float32Array\n };\n}\n"],"mappings":";;;AAIA,SAASA,cAAc,QAAQ,QAAQ;AAIvC,OAAO,MAAMC,YAAY,SACfD,cAAc,CAExB;EACE,OAAOE,SAASA,CAACC,OAAkB,EAAE;IACnC,IAAIA,OAAO,YAAYF,YAAY,EAAE;MACnC,OAAOE,OAAO,CAACC,GAAG;IACpB;IACA,OAAOC,YAAY,CAACC,EAAE,CAACH,OAAO,CAACI,IAAI,EAAEJ,OAAO,CAACK,IAAI,EAAEL,OAAO,CAACM,EAAE,EAAEN,OAAO,CAACO,EAAE,CAAC;EAC5E;EAEAC,WAAWA,CAACC,SAAoB,EAAER,GAAY,EAAE;IAC9C,KAAK,CAACQ,SAAS,EAAER,GAAG,EAAE,SAAS,CAAC;IAACS,eAAA,kBAoBzB,MAAM;MACd;IAAA,CACD;EArBD;EACAC,GAAGA,CAACP,IAAY,EAAEC,IAAY,EAAEC,EAAU,EAAEC,EAAU,EAAE;IACtD,IAAI,CAACN,GAAG,CAAC,CAAC,CAAC,GAAGG,IAAI;IAClB,IAAI,CAACH,GAAG,CAAC,CAAC,CAAC,GAAGI,IAAI;IAClB,IAAI,CAACJ,GAAG,CAAC,CAAC,CAAC,GAAGK,EAAE;IAChB,IAAI,CAACL,GAAG,CAAC,CAAC,CAAC,GAAGM,EAAE;EAClB;EACA,IAAIH,IAAIA,CAAA,EAAG;IACT,OAAO,IAAI,CAACH,GAAG,CAAC,CAAC,CAAC;EACpB;EACA,IAAII,IAAIA,CAAA,EAAG;IACT,OAAO,IAAI,CAACJ,GAAG,CAAC,CAAC,CAAC;EACpB;EACA,IAAIK,EAAEA,CAAA,EAAG;IACP,OAAO,IAAI,CAACL,GAAG,CAAC,CAAC,CAAC;EACpB;EACA,IAAIM,EAAEA,CAAA,EAAG;IACP,OAAO,IAAI,CAACN,GAAG,CAAC,CAAC,CAAC;EACpB;AAIF","ignoreList":[]}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { BaseHostObject } from "./Host";
|
2
5
|
export class JsiSkRect extends BaseHostObject {
|
3
6
|
static fromValue(CanvasKit, rect) {
|
@@ -6,11 +9,11 @@ export class JsiSkRect extends BaseHostObject {
|
|
6
9
|
}
|
7
10
|
return CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height);
|
8
11
|
}
|
9
|
-
dispose = () => {
|
10
|
-
// Float32Array
|
11
|
-
};
|
12
12
|
constructor(CanvasKit, ref) {
|
13
13
|
super(CanvasKit, ref, "Rect");
|
14
|
+
_defineProperty(this, "dispose", () => {
|
15
|
+
// Float32Array
|
16
|
+
});
|
14
17
|
}
|
15
18
|
setXYWH(x, y, width, height) {
|
16
19
|
this.ref[0] = x;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["BaseHostObject","JsiSkRect","fromValue","CanvasKit","rect","ref","XYWHRect","x","y","width","height","
|
1
|
+
{"version":3,"names":["BaseHostObject","JsiSkRect","fromValue","CanvasKit","rect","ref","XYWHRect","x","y","width","height","constructor","_defineProperty","setXYWH"],"sources":["JsiSkRect.ts"],"sourcesContent":["import type { CanvasKit, Rect } from \"canvaskit-wasm\";\n\nimport type { SkHostRect, SkRect } from \"../types\";\n\nimport { BaseHostObject } from \"./Host\";\n\nexport class JsiSkRect\n extends BaseHostObject<Rect, \"Rect\">\n implements SkHostRect\n{\n static fromValue(CanvasKit: CanvasKit, rect: SkRect) {\n if (rect instanceof JsiSkRect) {\n return rect.ref;\n }\n return CanvasKit.XYWHRect(rect.x, rect.y, rect.width, rect.height);\n }\n\n dispose = () => {\n // Float32Array\n };\n\n constructor(CanvasKit: CanvasKit, ref: Rect) {\n super(CanvasKit, ref, \"Rect\");\n }\n\n setXYWH(x: number, y: number, width: number, height: number): void {\n this.ref[0] = x;\n this.ref[1] = y;\n this.ref[2] = x + width;\n this.ref[3] = y + height;\n }\n\n get x() {\n return this.ref[0];\n }\n\n get y() {\n return this.ref[1];\n }\n\n get width() {\n return this.ref[2] - this.ref[0];\n }\n\n get height() {\n return this.ref[3] - this.ref[1];\n }\n}\n"],"mappings":";;;AAIA,SAASA,cAAc,QAAQ,QAAQ;AAEvC,OAAO,MAAMC,SAAS,SACZD,cAAc,CAExB;EACE,OAAOE,SAASA,CAACC,SAAoB,EAAEC,IAAY,EAAE;IACnD,IAAIA,IAAI,YAAYH,SAAS,EAAE;MAC7B,OAAOG,IAAI,CAACC,GAAG;IACjB;IACA,OAAOF,SAAS,CAACG,QAAQ,CAACF,IAAI,CAACG,CAAC,EAAEH,IAAI,CAACI,CAAC,EAAEJ,IAAI,CAACK,KAAK,EAAEL,IAAI,CAACM,MAAM,CAAC;EACpE;EAMAC,WAAWA,CAACR,SAAoB,EAAEE,GAAS,EAAE;IAC3C,KAAK,CAACF,SAAS,EAAEE,GAAG,EAAE,MAAM,CAAC;IAACO,eAAA,kBALtB,MAAM;MACd;IAAA,CACD;EAID;EAEAC,OAAOA,CAACN,CAAS,EAAEC,CAAS,EAAEC,KAAa,EAAEC,MAAc,EAAQ;IACjE,IAAI,CAACL,GAAG,CAAC,CAAC,CAAC,GAAGE,CAAC;IACf,IAAI,CAACF,GAAG,CAAC,CAAC,CAAC,GAAGG,CAAC;IACf,IAAI,CAACH,GAAG,CAAC,CAAC,CAAC,GAAGE,CAAC,GAAGE,KAAK;IACvB,IAAI,CAACJ,GAAG,CAAC,CAAC,CAAC,GAAGG,CAAC,GAAGE,MAAM;EAC1B;EAEA,IAAIH,CAACA,CAAA,EAAG;IACN,OAAO,IAAI,CAACF,GAAG,CAAC,CAAC,CAAC;EACpB;EAEA,IAAIG,CAACA,CAAA,EAAG;IACN,OAAO,IAAI,CAACH,GAAG,CAAC,CAAC,CAAC;EACpB;EAEA,IAAII,KAAKA,CAAA,EAAG;IACV,OAAO,IAAI,CAACJ,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC,CAAC;EAClC;EAEA,IAAIK,MAAMA,CAAA,EAAG;IACX,OAAO,IAAI,CAACL,GAAG,CAAC,CAAC,CAAC,GAAG,IAAI,CAACA,GAAG,CAAC,CAAC,CAAC;EAClC;AACF","ignoreList":[]}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
import { JsiSkMatrix } from "./JsiSkMatrix";
|
3
6
|
import { JsiSkShader } from "./JsiSkShader";
|
@@ -5,10 +8,10 @@ export class JsiSkRuntimeEffect extends HostObject {
|
|
5
8
|
constructor(CanvasKit, ref, sksl) {
|
6
9
|
super(CanvasKit, ref, "RuntimeEffect");
|
7
10
|
this.sksl = sksl;
|
11
|
+
_defineProperty(this, "dispose", () => {
|
12
|
+
this.ref.delete();
|
13
|
+
});
|
8
14
|
}
|
9
|
-
dispose = () => {
|
10
|
-
this.ref.delete();
|
11
|
-
};
|
12
15
|
source() {
|
13
16
|
return this.sksl;
|
14
17
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkMatrix","JsiSkShader","JsiSkRuntimeEffect","constructor","CanvasKit","ref","sksl","
|
1
|
+
{"version":3,"names":["HostObject","JsiSkMatrix","JsiSkShader","JsiSkRuntimeEffect","constructor","CanvasKit","ref","sksl","_defineProperty","delete","source","makeShader","uniforms","localMatrix","undefined","fromValue","makeShaderWithChildren","children","map","child","getUniform","index","getUniformCount","getUniformFloatCount","getUniformName"],"sources":["JsiSkRuntimeEffect.ts"],"sourcesContent":["import type { CanvasKit, RuntimeEffect } from \"canvaskit-wasm\";\n\nimport type { SkMatrix, SkShader } from \"../types\";\nimport type { SkRuntimeEffect } from \"../types/RuntimeEffect/RuntimeEffect\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkMatrix } from \"./JsiSkMatrix\";\nimport { JsiSkShader } from \"./JsiSkShader\";\n\nexport class JsiSkRuntimeEffect\n extends HostObject<RuntimeEffect, \"RuntimeEffect\">\n implements SkRuntimeEffect\n{\n constructor(CanvasKit: CanvasKit, ref: RuntimeEffect, private sksl: string) {\n super(CanvasKit, ref, \"RuntimeEffect\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n source() {\n return this.sksl;\n }\n\n makeShader(uniforms: number[], localMatrix?: SkMatrix) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShader(\n uniforms,\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n makeShaderWithChildren(\n uniforms: number[],\n children?: SkShader[],\n localMatrix?: SkMatrix\n ) {\n return new JsiSkShader(\n this.CanvasKit,\n this.ref.makeShaderWithChildren(\n uniforms,\n children?.map((child) => JsiSkShader.fromValue(child)),\n localMatrix !== undefined\n ? JsiSkMatrix.fromValue(localMatrix)\n : localMatrix\n )\n );\n }\n\n getUniform(index: number) {\n return this.ref.getUniform(index);\n }\n\n getUniformCount() {\n return this.ref.getUniformCount();\n }\n\n getUniformFloatCount() {\n return this.ref.getUniformFloatCount();\n }\n\n getUniformName(index: number) {\n return this.ref.getUniformName(index);\n }\n}\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I,CAAChB,GAAG,CAACgB,eAAe,CAAC,CAAC;EACnC;EAEAC,oBAAoBA,CAAA,EAAG;IACrB,OAAO,IAAI,CAACjB,GAAG,CAACiB,oBAAoB,CAAC,CAAC;EACxC;EAEAC,cAAcA,CAACH,KAAa,EAAE;IAC5B,OAAO,IAAI,CAACf,GAAG,CAACkB,cAAc,CAACH,KAAK,CAAC;EACvC;AACF","ignoreList":[]}
|
@@ -1,7 +1,15 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
export class JsiSkSVG extends HostObject {
|
3
6
|
constructor(CanvasKit, ref) {
|
4
7
|
super(CanvasKit, ref, "SVG");
|
8
|
+
_defineProperty(this, "dispose", () => {
|
9
|
+
if (this.ref.parentNode) {
|
10
|
+
this.ref.parentNode.removeChild(this.ref);
|
11
|
+
}
|
12
|
+
});
|
5
13
|
}
|
6
14
|
width() {
|
7
15
|
return this.ref.width;
|
@@ -9,10 +17,5 @@ export class JsiSkSVG extends HostObject {
|
|
9
17
|
height() {
|
10
18
|
return this.ref.height;
|
11
19
|
}
|
12
|
-
dispose = () => {
|
13
|
-
if (this.ref.parentNode) {
|
14
|
-
this.ref.parentNode.removeChild(this.ref);
|
15
|
-
}
|
16
|
-
};
|
17
20
|
}
|
18
21
|
//# sourceMappingURL=JsiSkSVG.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkSVG","constructor","CanvasKit","ref","
|
1
|
+
{"version":3,"names":["HostObject","JsiSkSVG","constructor","CanvasKit","ref","_defineProperty","parentNode","removeChild","width","height"],"sources":["JsiSkSVG.ts"],"sourcesContent":["import type { CanvasKit } from \"canvaskit-wasm\";\n\nimport type { SkSVG } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkSVG\n extends HostObject<HTMLImageElement, \"SVG\">\n implements SkSVG\n{\n constructor(CanvasKit: CanvasKit, ref: HTMLImageElement) {\n super(CanvasKit, ref, \"SVG\");\n }\n\n width(): number {\n return this.ref.width;\n }\n height(): number {\n return this.ref.height;\n }\n\n dispose = () => {\n if (this.ref.parentNode) {\n this.ref.parentNode.removeChild(this.ref);\n }\n };\n}\n"],"mappings":";;;AAIA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,OAAO,MAAMC,QAAQ,SACXD,UAAU,CAEpB;EACEE,WAAWA,CAACC,SAAoB,EAAEC,GAAqB,EAAE;IACvD,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,KAAK,CAAC;IAACC,eAAA,kBAUrB,MAAM;MACd,IAAI,IAAI,CAACD,GAAG,CAACE,UAAU,EAAE;QACvB,IAAI,CAACF,GAAG,CAACE,UAAU,CAACC,WAAW,CAAC,IAAI,CAACH,GAAG,CAAC;MAC3C;IACF,CAAC;EAbD;EAEAI,KAAKA,CAAA,EAAW;IACd,OAAO,IAAI,CAACJ,GAAG,CAACI,KAAK;EACvB;EACAC,MAAMA,CAAA,EAAW;IACf,OAAO,IAAI,CAACL,GAAG,CAACK,MAAM;EACxB;AAOF","ignoreList":[]}
|
@@ -1,10 +1,13 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
export class JsiSkShader extends HostObject {
|
3
6
|
constructor(CanvasKit, ref) {
|
4
7
|
super(CanvasKit, ref, "Shader");
|
8
|
+
_defineProperty(this, "dispose", () => {
|
9
|
+
this.ref.delete();
|
10
|
+
});
|
5
11
|
}
|
6
|
-
dispose = () => {
|
7
|
-
this.ref.delete();
|
8
|
-
};
|
9
12
|
}
|
10
13
|
//# sourceMappingURL=JsiSkShader.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkShader","constructor","CanvasKit","ref","
|
1
|
+
{"version":3,"names":["HostObject","JsiSkShader","constructor","CanvasKit","ref","_defineProperty","delete"],"sources":["JsiSkShader.ts"],"sourcesContent":["import type { CanvasKit, Shader } from \"canvaskit-wasm\";\n\nimport type { SkShader } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkShader\n extends HostObject<Shader, \"Shader\">\n implements SkShader\n{\n constructor(CanvasKit: CanvasKit, ref: Shader) {\n super(CanvasKit, ref, \"Shader\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;;AAIA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,OAAO,MAAMC,WAAW,SACdD,UAAU,CAEpB;EACEE,WAAWA,CAACC,SAAoB,EAAEC,GAAW,EAAE;IAC7C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,QAAQ,CAAC;IAACC,eAAA,kBAGxB,MAAM;MACd,IAAI,CAACD,GAAG,CAACE,MAAM,CAAC,CAAC;IACnB,CAAC;EAJD;AAKF","ignoreList":[]}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
import { JsiSkCanvas } from "./JsiSkCanvas";
|
3
6
|
import { JsiSkImage } from "./JsiSkImage";
|
@@ -5,10 +8,10 @@ import { JsiSkRect } from "./JsiSkRect";
|
|
5
8
|
export class JsiSkSurface extends HostObject {
|
6
9
|
constructor(CanvasKit, ref) {
|
7
10
|
super(CanvasKit, ref, "Surface");
|
11
|
+
_defineProperty(this, "dispose", () => {
|
12
|
+
this.ref.dispose();
|
13
|
+
});
|
8
14
|
}
|
9
|
-
dispose = () => {
|
10
|
-
this.ref.dispose();
|
11
|
-
};
|
12
15
|
flush() {
|
13
16
|
this.ref.flush();
|
14
17
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkCanvas","JsiSkImage","JsiSkRect","JsiSkSurface","constructor","CanvasKit","ref","dispose","flush","width","height","getCanvas","makeImageSnapshot","bounds","image","Array","from","fromValue","undefined","getNativeTextureUnstable","console","warn"],"sources":["JsiSkSurface.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SkCanvas, SkImage, SkRect, SkSurface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkSurface\n extends HostObject<Surface, \"Surface\">\n implements SkSurface\n{\n constructor(CanvasKit: CanvasKit, ref: Surface) {\n super(CanvasKit, ref, \"Surface\");\n }\n\n dispose = () => {\n this.ref.dispose();\n };\n\n flush() {\n this.ref.flush();\n }\n\n width() {\n return this.ref.width();\n }\n\n height() {\n return this.ref.height();\n }\n\n getCanvas(): SkCanvas {\n return new JsiSkCanvas(this.CanvasKit, this.ref.getCanvas());\n }\n\n makeImageSnapshot(bounds?: SkRect): SkImage {\n const image = this.ref.makeImageSnapshot(\n bounds\n ? Array.from(JsiSkRect.fromValue(this.CanvasKit, bounds))\n : undefined\n );\n return new JsiSkImage(this.CanvasKit, image);\n }\n\n getNativeTextureUnstable(): unknown {\n console.warn(\"getBackendTexture is not implemented on Web\");\n return null;\n }\n}\n"],"mappings":"AAIA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AAEvC,OAAO,MAAMC,YAAY,SACfJ,UAAU,CAEpB;EACEK,WAAWA,CAACC,SAAoB,EAAEC,GAAY,EAAE;IAC9C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,SAAS,CAAC;
|
1
|
+
{"version":3,"names":["HostObject","JsiSkCanvas","JsiSkImage","JsiSkRect","JsiSkSurface","constructor","CanvasKit","ref","_defineProperty","dispose","flush","width","height","getCanvas","makeImageSnapshot","bounds","image","Array","from","fromValue","undefined","getNativeTextureUnstable","console","warn"],"sources":["JsiSkSurface.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { SkCanvas, SkImage, SkRect, SkSurface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkCanvas } from \"./JsiSkCanvas\";\nimport { JsiSkImage } from \"./JsiSkImage\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkSurface\n extends HostObject<Surface, \"Surface\">\n implements SkSurface\n{\n constructor(CanvasKit: CanvasKit, ref: Surface) {\n super(CanvasKit, ref, \"Surface\");\n }\n\n dispose = () => {\n this.ref.dispose();\n };\n\n flush() {\n this.ref.flush();\n }\n\n width() {\n return this.ref.width();\n }\n\n height() {\n return this.ref.height();\n }\n\n getCanvas(): SkCanvas {\n return new JsiSkCanvas(this.CanvasKit, this.ref.getCanvas());\n }\n\n makeImageSnapshot(bounds?: SkRect): SkImage {\n const image = this.ref.makeImageSnapshot(\n bounds\n ? Array.from(JsiSkRect.fromValue(this.CanvasKit, bounds))\n : undefined\n );\n return new JsiSkImage(this.CanvasKit, image);\n }\n\n getNativeTextureUnstable(): unknown {\n console.warn(\"getBackendTexture is not implemented on Web\");\n return null;\n }\n}\n"],"mappings":";;;AAIA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,WAAW,QAAQ,eAAe;AAC3C,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,aAAa;AAEvC,OAAO,MAAMC,YAAY,SACfJ,UAAU,CAEpB;EACEK,WAAWA,CAACC,SAAoB,EAAEC,GAAY,EAAE;IAC9C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,SAAS,CAAC;IAACC,eAAA,kBAGzB,MAAM;MACd,IAAI,CAACD,GAAG,CAACE,OAAO,CAAC,CAAC;IACpB,CAAC;EAJD;EAMAC,KAAKA,CAAA,EAAG;IACN,IAAI,CAACH,GAAG,CAACG,KAAK,CAAC,CAAC;EAClB;EAEAC,KAAKA,CAAA,EAAG;IACN,OAAO,IAAI,CAACJ,GAAG,CAACI,KAAK,CAAC,CAAC;EACzB;EAEAC,MAAMA,CAAA,EAAG;IACP,OAAO,IAAI,CAACL,GAAG,CAACK,MAAM,CAAC,CAAC;EAC1B;EAEAC,SAASA,CAAA,EAAa;IACpB,OAAO,IAAIZ,WAAW,CAAC,IAAI,CAACK,SAAS,EAAE,IAAI,CAACC,GAAG,CAACM,SAAS,CAAC,CAAC,CAAC;EAC9D;EAEAC,iBAAiBA,CAACC,MAAe,EAAW;IAC1C,MAAMC,KAAK,GAAG,IAAI,CAACT,GAAG,CAACO,iBAAiB,CACtCC,MAAM,GACFE,KAAK,CAACC,IAAI,CAACf,SAAS,CAACgB,SAAS,CAAC,IAAI,CAACb,SAAS,EAAES,MAAM,CAAC,CAAC,GACvDK,SACN,CAAC;IACD,OAAO,IAAIlB,UAAU,CAAC,IAAI,CAACI,SAAS,EAAEU,KAAK,CAAC;EAC9C;EAEAK,wBAAwBA,CAAA,EAAY;IAClCC,OAAO,CAACC,IAAI,CAAC,6CAA6C,CAAC;IAC3D,OAAO,IAAI;EACb;AACF","ignoreList":[]}
|
@@ -1,10 +1,13 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
export class JsiSkTextBlob extends HostObject {
|
3
6
|
constructor(CanvasKit, ref) {
|
4
7
|
super(CanvasKit, ref, "TextBlob");
|
8
|
+
_defineProperty(this, "dispose", () => {
|
9
|
+
this.ref.delete();
|
10
|
+
});
|
5
11
|
}
|
6
|
-
dispose = () => {
|
7
|
-
this.ref.delete();
|
8
|
-
};
|
9
12
|
}
|
10
13
|
//# sourceMappingURL=JsiSkTextBlob.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkTextBlob","constructor","CanvasKit","ref","
|
1
|
+
{"version":3,"names":["HostObject","JsiSkTextBlob","constructor","CanvasKit","ref","_defineProperty","delete"],"sources":["JsiSkTextBlob.ts"],"sourcesContent":["import type { CanvasKit, TextBlob } from \"canvaskit-wasm\";\n\nimport type { SkTextBlob } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkTextBlob\n extends HostObject<TextBlob, \"TextBlob\">\n implements SkTextBlob\n{\n constructor(CanvasKit: CanvasKit, ref: TextBlob) {\n super(CanvasKit, ref, \"TextBlob\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;;AAIA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,OAAO,MAAMC,aAAa,SAChBD,UAAU,CAEpB;EACEE,WAAWA,CAACC,SAAoB,EAAEC,GAAa,EAAE;IAC/C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,UAAU,CAAC;IAACC,eAAA,kBAG1B,MAAM;MACd,IAAI,CAACD,GAAG,CAACE,MAAM,CAAC,CAAC;IACnB,CAAC;EAJD;AAKF","ignoreList":[]}
|
@@ -1,7 +1,13 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
export class JsiSkTypeface extends HostObject {
|
3
6
|
constructor(CanvasKit, ref) {
|
4
7
|
super(CanvasKit, ref, "Typeface");
|
8
|
+
_defineProperty(this, "dispose", () => {
|
9
|
+
this.ref.delete();
|
10
|
+
});
|
5
11
|
}
|
6
12
|
get bold() {
|
7
13
|
console.warn("Typeface.bold is deprecated and will be removed in a future release. The property will return false.");
|
@@ -14,8 +20,5 @@ export class JsiSkTypeface extends HostObject {
|
|
14
20
|
getGlyphIDs(str, numCodePoints) {
|
15
21
|
return Array.from(this.ref.getGlyphIDs(str, numCodePoints));
|
16
22
|
}
|
17
|
-
dispose = () => {
|
18
|
-
this.ref.delete();
|
19
|
-
};
|
20
23
|
}
|
21
24
|
//# sourceMappingURL=JsiSkTypeface.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkTypeface","constructor","CanvasKit","ref","bold","console","warn","italic","getGlyphIDs","str","numCodePoints","Array","from"
|
1
|
+
{"version":3,"names":["HostObject","JsiSkTypeface","constructor","CanvasKit","ref","_defineProperty","delete","bold","console","warn","italic","getGlyphIDs","str","numCodePoints","Array","from"],"sources":["JsiSkTypeface.ts"],"sourcesContent":["import type { CanvasKit, Typeface } from \"canvaskit-wasm\";\n\nimport type { SkTypeface } from \"../types\";\n\nimport { HostObject } from \"./Host\";\n\nexport class JsiSkTypeface\n extends HostObject<Typeface, \"Typeface\">\n implements SkTypeface\n{\n constructor(CanvasKit: CanvasKit, ref: Typeface) {\n super(CanvasKit, ref, \"Typeface\");\n }\n\n get bold(): boolean {\n console.warn(\n \"Typeface.bold is deprecated and will be removed in a future release. The property will return false.\"\n );\n return false;\n }\n\n get italic(): boolean {\n console.warn(\n \"Typeface.italic is deprecated and will be removed in a future release. The property will return false.\"\n );\n return false;\n }\n\n getGlyphIDs(str: string, numCodePoints?: number) {\n return Array.from(this.ref.getGlyphIDs(str, numCodePoints));\n }\n\n dispose = () => {\n this.ref.delete();\n };\n}\n"],"mappings":";;;AAIA,SAASA,UAAU,QAAQ,QAAQ;AAEnC,OAAO,MAAMC,aAAa,SAChBD,UAAU,CAEpB;EACEE,WAAWA,CAACC,SAAoB,EAAEC,GAAa,EAAE;IAC/C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,UAAU,CAAC;IAACC,eAAA,kBAqB1B,MAAM;MACd,IAAI,CAACD,GAAG,CAACE,MAAM,CAAC,CAAC;IACnB,CAAC;EAtBD;EAEA,IAAIC,IAAIA,CAAA,EAAY;IAClBC,OAAO,CAACC,IAAI,CACV,sGACF,CAAC;IACD,OAAO,KAAK;EACd;EAEA,IAAIC,MAAMA,CAAA,EAAY;IACpBF,OAAO,CAACC,IAAI,CACV,wGACF,CAAC;IACD,OAAO,KAAK;EACd;EAEAE,WAAWA,CAACC,GAAW,EAAEC,aAAsB,EAAE;IAC/C,OAAOC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACX,GAAG,CAACO,WAAW,CAACC,GAAG,EAAEC,aAAa,CAAC,CAAC;EAC7D;AAKF","ignoreList":[]}
|
@@ -1,8 +1,11 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject, NotImplementedOnRNWeb } from "./Host";
|
2
5
|
export class JsiSkTypefaceFontProvider extends HostObject {
|
3
|
-
allocatedPointers = [];
|
4
6
|
constructor(CanvasKit, ref) {
|
5
7
|
super(CanvasKit, ref, "FontMgr");
|
8
|
+
_defineProperty(this, "allocatedPointers", []);
|
6
9
|
}
|
7
10
|
matchFamilyStyle(_name, _style) {
|
8
11
|
throw new NotImplementedOnRNWeb();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","NotImplementedOnRNWeb","JsiSkTypefaceFontProvider","
|
1
|
+
{"version":3,"names":["HostObject","NotImplementedOnRNWeb","JsiSkTypefaceFontProvider","constructor","CanvasKit","ref","_defineProperty","matchFamilyStyle","_name","_style","countFamilies","getFamilyName","index","registerFont","typeface","familyName","strLen","lengthBytesUTF8","strPtr","_malloc","stringToUTF8","_registerFont","dispose","ptr","allocatedPointers","_free","delete","str","encoder","TextEncoder","utf8","encode","length","outPtr","maxBytesToWrite","heap","HEAPU8","Error","i"],"sources":["JsiSkTypefaceFontProvider.ts"],"sourcesContent":["import type { CanvasKit, TypefaceFontProvider } from \"canvaskit-wasm\";\n\nimport type { SkTypefaceFontProvider } from \"../types/Paragraph/TypefaceFontProvider\";\nimport type { FontStyle, SkTypeface } from \"../types\";\n\nimport { HostObject, NotImplementedOnRNWeb } from \"./Host\";\n\nexport class JsiSkTypefaceFontProvider\n extends HostObject<TypefaceFontProvider, \"FontMgr\">\n implements SkTypefaceFontProvider\n{\n private allocatedPointers: number[] = [];\n\n constructor(CanvasKit: CanvasKit, ref: TypefaceFontProvider) {\n super(CanvasKit, ref, \"FontMgr\");\n }\n\n matchFamilyStyle(_name: string, _style: FontStyle): SkTypeface {\n throw new NotImplementedOnRNWeb();\n }\n countFamilies() {\n return this.ref.countFamilies();\n }\n getFamilyName(index: number) {\n return this.ref.getFamilyName(index);\n }\n registerFont(typeface: SkTypeface, familyName: string) {\n const strLen = lengthBytesUTF8(familyName) + 1;\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n const strPtr = this.CanvasKit._malloc(strLen);\n stringToUTF8(this.CanvasKit, familyName, strPtr, strLen);\n\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.ref._registerFont(typeface.ref, strPtr);\n }\n\n dispose() {\n for (const ptr of this.allocatedPointers) {\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n this.CanvasKit._free(ptr);\n }\n\n this.ref.delete();\n }\n}\n\nconst lengthBytesUTF8 = (str: string) => {\n // TextEncoder will give us the byte length in UTF8 form\n const encoder = new TextEncoder();\n const utf8 = encoder.encode(str);\n return utf8.length;\n};\n\nconst stringToUTF8 = (\n CanvasKit: CanvasKit,\n str: string,\n outPtr: number,\n maxBytesToWrite: number\n) => {\n // TextEncoder will give us the byte array in UTF8 form\n const encoder = new TextEncoder();\n const utf8 = encoder.encode(str);\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-expect-error\n const heap: Int8Array = CanvasKit.HEAPU8;\n\n // Check if there's enough space\n if (utf8.length > maxBytesToWrite) {\n throw new Error(\"Not enough space to write UTF8 encoded string\");\n }\n\n // Copy the bytes\n for (let i = 0; i < utf8.length; i++) {\n heap[outPtr + i] = utf8[i];\n }\n\n // Null terminate\n if (utf8.length < maxBytesToWrite) {\n heap[outPtr + utf8.length] = 0;\n }\n};\n"],"mappings":";;;AAKA,SAASA,UAAU,EAAEC,qBAAqB,QAAQ,QAAQ;AAE1D,OAAO,MAAMC,yBAAyB,SAC5BF,UAAU,CAEpB;EAGEG,WAAWA,CAACC,SAAoB,EAAEC,GAAyB,EAAE;IAC3D,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,SAAS,CAAC;IAACC,eAAA,4BAHG,EAAE;EAIxC;EAEAC,gBAAgBA,CAACC,KAAa,EAAEC,MAAiB,EAAc;IAC7D,MAAM,IAAIR,qBAAqB,CAAC,CAAC;EACnC;EACAS,aAAaA,CAAA,EAAG;IACd,OAAO,IAAI,CAACL,GAAG,CAACK,aAAa,CAAC,CAAC;EACjC;EACAC,aAAaA,CAACC,KAAa,EAAE;IAC3B,OAAO,IAAI,CAACP,GAAG,CAACM,aAAa,CAACC,KAAK,CAAC;EACtC;EACAC,YAAYA,CAACC,QAAoB,EAAEC,UAAkB,EAAE;IACrD,MAAMC,MAAM,GAAGC,eAAe,CAACF,UAAU,CAAC,GAAG,CAAC;;IAE9C;IACA;IACA,MAAMG,MAAM,GAAG,IAAI,CAACd,SAAS,CAACe,OAAO,CAACH,MAAM,CAAC;IAC7CI,YAAY,CAAC,IAAI,CAAChB,SAAS,EAAEW,UAAU,EAAEG,MAAM,EAAEF,MAAM,CAAC;;IAExD;IACA;IACA,IAAI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@@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { HostObject } from "./Host";
|
2
5
|
import { JsiSkRect } from "./JsiSkRect";
|
3
6
|
export class JsiSkVertices extends HostObject {
|
4
7
|
constructor(CanvasKit, ref) {
|
5
8
|
super(CanvasKit, ref, "Vertices");
|
9
|
+
_defineProperty(this, "dispose", () => {
|
10
|
+
this.ref.delete();
|
11
|
+
});
|
6
12
|
}
|
7
|
-
dispose = () => {
|
8
|
-
this.ref.delete();
|
9
|
-
};
|
10
13
|
bounds() {
|
11
14
|
return new JsiSkRect(this.CanvasKit, this.ref.bounds());
|
12
15
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["HostObject","JsiSkRect","JsiSkVertices","constructor","CanvasKit","ref","
|
1
|
+
{"version":3,"names":["HostObject","JsiSkRect","JsiSkVertices","constructor","CanvasKit","ref","_defineProperty","delete","bounds","uniqueID"],"sources":["JsiSkVertices.ts"],"sourcesContent":["import type { CanvasKit, Vertices } from \"canvaskit-wasm\";\n\nimport type { SkVertices } from \"../types\";\n\nimport { HostObject } from \"./Host\";\nimport { JsiSkRect } from \"./JsiSkRect\";\n\nexport class JsiSkVertices\n extends HostObject<Vertices, \"Vertices\">\n implements SkVertices\n{\n constructor(CanvasKit: CanvasKit, ref: Vertices) {\n super(CanvasKit, ref, \"Vertices\");\n }\n\n dispose = () => {\n this.ref.delete();\n };\n\n bounds() {\n return new JsiSkRect(this.CanvasKit, this.ref.bounds());\n }\n\n uniqueID() {\n return this.ref.uniqueID();\n }\n}\n"],"mappings":";;;AAIA,SAASA,UAAU,QAAQ,QAAQ;AACnC,SAASC,SAAS,QAAQ,aAAa;AAEvC,OAAO,MAAMC,aAAa,SAChBF,UAAU,CAEpB;EACEG,WAAWA,CAACC,SAAoB,EAAEC,GAAa,EAAE;IAC/C,KAAK,CAACD,SAAS,EAAEC,GAAG,EAAE,UAAU,CAAC;IAACC,eAAA,kBAG1B,MAAM;MACd,IAAI,CAACD,GAAG,CAACE,MAAM,CAAC,CAAC;IACnB,CAAC;EAJD;EAMAC,MAAMA,CAAA,EAAG;IACP,OAAO,IAAIP,SAAS,CAAC,IAAI,CAACG,SAAS,EAAE,IAAI,CAACC,GAAG,CAACG,MAAM,CAAC,CAAC,CAAC;EACzD;EAEAC,QAAQA,CAAA,EAAG;IACT,OAAO,IAAI,CAACJ,GAAG,CAACI,QAAQ,CAAC,CAAC;EAC5B;AACF","ignoreList":[]}
|
@@ -1,3 +1,6 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import { CanvasKitWebGLBufferImpl } from "./CanvasKitWebGLBufferImpl";
|
2
5
|
import { JsiSkImageFactory } from "./JsiSkImageFactory";
|
3
6
|
export const createVideo = async (CanvasKit, url) => {
|
@@ -17,11 +20,11 @@ export const createVideo = async (CanvasKit, url) => {
|
|
17
20
|
});
|
18
21
|
};
|
19
22
|
export class JsiVideo {
|
20
|
-
__typename__ = "Video";
|
21
|
-
webglBuffer = null;
|
22
23
|
constructor(ImageFactory, videoElement) {
|
23
24
|
this.ImageFactory = ImageFactory;
|
24
25
|
this.videoElement = videoElement;
|
26
|
+
_defineProperty(this, "__typename__", "Video");
|
27
|
+
_defineProperty(this, "webglBuffer", null);
|
25
28
|
document.body.appendChild(this.videoElement);
|
26
29
|
}
|
27
30
|
duration() {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["CanvasKitWebGLBufferImpl","JsiSkImageFactory","createVideo","CanvasKit","url","video","document","createElement","Promise","resolve","reject","src","style","display","crossOrigin","volume","addEventListener","body","appendChild","JsiVideo","Error","
|
1
|
+
{"version":3,"names":["CanvasKitWebGLBufferImpl","JsiSkImageFactory","createVideo","CanvasKit","url","video","document","createElement","Promise","resolve","reject","src","style","display","crossOrigin","volume","addEventListener","body","appendChild","JsiVideo","Error","constructor","ImageFactory","videoElement","_defineProperty","duration","framerate","setSurface","surface","webglBuffer","nextImage","MakeImageFromNativeBuffer","seek","time","isNaN","currentTime","rotation","size","width","videoWidth","height","videoHeight","pause","play","setVolume","dispose","parentNode","removeChild"],"sources":["JsiVideo.ts"],"sourcesContent":["import type { CanvasKit, Surface } from \"canvaskit-wasm\";\n\nimport type { CanvasKitWebGLBuffer, Video, ImageFactory } from \"../types\";\n\nimport { CanvasKitWebGLBufferImpl } from \"./CanvasKitWebGLBufferImpl\";\nimport { JsiSkImageFactory } from \"./JsiSkImageFactory\";\n\nexport const createVideo = async (\n CanvasKit: CanvasKit,\n url: string\n): Promise<Video> => {\n const video = document.createElement(\"video\");\n return new Promise((resolve, reject) => {\n video.src = url;\n video.style.display = \"none\";\n video.crossOrigin = \"anonymous\";\n video.volume = 0;\n video.addEventListener(\"loadedmetadata\", () => {\n document.body.appendChild(video);\n resolve(new JsiVideo(new JsiSkImageFactory(CanvasKit), video));\n });\n video.addEventListener(\"error\", () => {\n reject(new Error(`Failed to load video from URL: ${url}`));\n });\n });\n};\n\nexport class JsiVideo implements Video {\n __typename__ = \"Video\" as const;\n\n private webglBuffer: CanvasKitWebGLBuffer | null = null;\n\n constructor(\n private ImageFactory: ImageFactory,\n private videoElement: HTMLVideoElement\n ) {\n document.body.appendChild(this.videoElement);\n }\n\n duration() {\n return this.videoElement.duration * 1000;\n }\n\n framerate(): number {\n throw new Error(\"Video.frame is not available on React Native Web\");\n }\n\n setSurface(surface: Surface) {\n // If we have the surface, we can use the WebGL buffer which is slightly faster\n // This is because WebGL cannot be shared across contextes.\n // This can be removed with WebGPU\n this.webglBuffer = new CanvasKitWebGLBufferImpl(surface, this.videoElement);\n }\n\n nextImage() {\n return this.ImageFactory.MakeImageFromNativeBuffer(\n this.webglBuffer ? this.webglBuffer : this.videoElement\n );\n }\n\n seek(time: number) {\n if (isNaN(time)) {\n throw new Error(`Invalid time: ${time}`);\n }\n this.videoElement.currentTime = time / 1000;\n }\n\n rotation() {\n return 0 as const;\n }\n\n size() {\n return {\n width: this.videoElement.videoWidth,\n height: this.videoElement.videoHeight,\n };\n }\n\n pause() {\n this.videoElement.pause();\n }\n\n play() {\n this.videoElement.play();\n }\n\n setVolume(volume: number) {\n this.videoElement.volume = volume;\n }\n\n dispose() {\n if (this.videoElement.parentNode) {\n this.videoElement.parentNode.removeChild(this.videoElement);\n }\n }\n}\n"],"mappings":";;;AAIA,SAASA,wBAAwB,QAAQ,4BAA4B;AACrE,SAASC,iBAAiB,QAAQ,qBAAqB;AAEvD,OAAO,MAAMC,WAAW,GAAG,MAAAA,CACzBC,SAAoB,EACpBC,GAAW,KACQ;EACnB,MAAMC,KAAK,GAAGC,QAAQ,CAACC,aAAa,CAAC,OAAO,CAAC;EAC7C,OAAO,IAAIC,OAAO,CAAC,CAACC,OAAO,EAAEC,MAAM,KAAK;IACtCL,KAAK,CAACM,GAAG,GAAGP,GAAG;IACfC,KAAK,CAACO,KAAK,CAACC,OAAO,GAAG,MAAM;IAC5BR,KAAK,CAACS,WAAW,GAAG,WAAW;IAC/BT,KAAK,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CAACD,IAAI,CAAC,EAAE;MACf,MAAM,IAAIb,KAAK,CAAC,iBAAiBa,IAAI,EAAE,CAAC;IAC1C;IACA,IAAI,CAACV,YAAY,CAACY,WAAW,GAAGF,IAAI,GAAG,IAAI;EAC7C;EAEAG,QAAQA,CAAA,EAAG;IACT,OAAO,CAAC;EACV;EAEAC,IAAIA,CAAA,EAAG;IACL,OAAO;MACLC,KAAK,EAAE,IAAI,CAACf,YAAY,CAACgB,UAAU;MACnCC,MAAM,EAAE,IAAI,CAACjB,YAAY,CAACkB;IAC5B,CAAC;EACH;EAEAC,KAAKA,CAAA,EAAG;IACN,IAAI,CAACnB,YAAY,CAACmB,KAAK,CAAC,CAAC;EAC3B;EAEAC,IAAIA,CAAA,EAAG;IACL,IAAI,CAACpB,YAAY,CAACoB,IAAI,CAAC,CAAC;EAC1B;EAEAC,SAASA,CAAC7B,MAAc,EAAE;IACxB,IAAI,CAACQ,YAAY,CAACR,MAAM,GAAGA,MAAM;EACnC;EAEA8B,OAAOA,CAAA,EAAG;IACR,IAAI,IAAI,CAACtB,YAAY,CAACuB,UAAU,EAAE;MAChC,IAAI,CAACvB,YAAY,CAACuB,UAAU,CAACC,WAAW,CAAC,IAAI,CAACxB,YAAY,CAAC;IAC7D;EACF;AACF","ignoreList":[]}
|
@@ -5,12 +5,10 @@ import "../views/api";
|
|
5
5
|
export declare abstract class Container {
|
6
6
|
protected Skia: Skia;
|
7
7
|
protected nativeId: number;
|
8
|
-
|
8
|
+
root: Node[];
|
9
9
|
protected recording: Recording | null;
|
10
10
|
protected unmounted: boolean;
|
11
11
|
constructor(Skia: Skia, nativeId: number);
|
12
|
-
get root(): Node[];
|
13
|
-
set root(value: Node[]);
|
14
12
|
unmount(): void;
|
15
13
|
drawOnCanvas(canvas: SkCanvas): void;
|
16
14
|
abstract redraw(): void;
|
@@ -1,3 +1,6 @@
|
|
1
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
2
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
3
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
1
4
|
import Rea from "../external/reanimated/ReanimatedProxy";
|
2
5
|
import { HAS_REANIMATED_3 } from "../external/reanimated/renderHelpers";
|
3
6
|
import { Recorder } from "./Recorder/Recorder";
|
@@ -30,18 +33,12 @@ const nativeDrawOnscreen = (nativeId, recorder) => {
|
|
30
33
|
SkiaViewApi.setJsiProperty(nativeId, "picture", picture);
|
31
34
|
};
|
32
35
|
export class Container {
|
33
|
-
_root = [];
|
34
|
-
recording = null;
|
35
|
-
unmounted = false;
|
36
36
|
constructor(Skia, nativeId) {
|
37
37
|
this.Skia = Skia;
|
38
38
|
this.nativeId = nativeId;
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
}
|
43
|
-
set root(value) {
|
44
|
-
this._root = value;
|
39
|
+
_defineProperty(this, "root", []);
|
40
|
+
_defineProperty(this, "recording", null);
|
41
|
+
_defineProperty(this, "unmounted", false);
|
45
42
|
}
|
46
43
|
unmount() {
|
47
44
|
this.unmounted = true;
|
@@ -73,9 +70,9 @@ class StaticContainer extends Container {
|
|
73
70
|
}
|
74
71
|
}
|
75
72
|
class ReanimatedContainer extends Container {
|
76
|
-
mapperId = null;
|
77
73
|
constructor(Skia, nativeId) {
|
78
74
|
super(Skia, nativeId);
|
75
|
+
_defineProperty(this, "mapperId", null);
|
79
76
|
}
|
80
77
|
redraw() {
|
81
78
|
if (this.mapperId !== null) {
|
@@ -114,9 +111,9 @@ class ReanimatedContainer extends Container {
|
|
114
111
|
}
|
115
112
|
}
|
116
113
|
class NativeReanimatedContainer extends Container {
|
117
|
-
mapperId = null;
|
118
114
|
constructor(Skia, nativeId) {
|
119
115
|
super(Skia, nativeId);
|
116
|
+
_defineProperty(this, "mapperId", null);
|
120
117
|
}
|
121
118
|
redraw() {
|
122
119
|
if (this.mapperId !== null) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Rea","HAS_REANIMATED_3","Recorder","visit","replay","createDrawingContext","ReanimatedRecorder","drawOnscreen","Skia","nativeId","recording","rec","PictureRecorder","canvas","beginRecording","ctx","paintPool","commands","picture","finishRecordingAsPicture","SkiaViewApi","setJsiProperty","nativeDrawOnscreen","recorder","play","Container","_root","unmounted","constructor","root","value","unmount","drawOnCanvas","Error","StaticContainer","redraw","getRecording","isOnScreen","ReanimatedContainer","mapperId","stopMapper","record","animationValues","size","startMapper","Array","from","runOnUI","NativeReanimatedContainer","sharedValues","getSharedValues","sharedRecorder","getRecorder","length","applyUpdates","createContainer","web","global"],"sources":["Container.ts"],"sourcesContent":["import Rea from \"../external/reanimated/ReanimatedProxy\";\nimport type { Skia, SkCanvas } from \"../skia/types\";\nimport { HAS_REANIMATED_3 } from \"../external/reanimated/renderHelpers\";\nimport type { JsiRecorder } from \"../skia/types/Recorder\";\n\nimport type { Node } from \"./Node\";\nimport type { Recording } from \"./Recorder/Recorder\";\nimport { Recorder } from \"./Recorder/Recorder\";\nimport { visit } from \"./Recorder/Visitor\";\nimport { replay } from \"./Recorder/Player\";\nimport { createDrawingContext } from \"./Recorder/DrawingContext\";\nimport { ReanimatedRecorder } from \"./Recorder/ReanimatedRecorder\";\n\nimport \"../views/api\";\n\nconst drawOnscreen = (Skia: Skia, nativeId: number, recording: Recording) => {\n \"worklet\";\n\n const rec = Skia.PictureRecorder();\n const canvas = rec.beginRecording();\n //const start = performance.now();\n\n const ctx = createDrawingContext(Skia, recording.paintPool, canvas);\n replay(ctx, recording.commands);\n const picture = rec.finishRecordingAsPicture();\n //const end = performance.now();\n //console.log(\"Recording time: \", end - start);\n SkiaViewApi.setJsiProperty(nativeId, \"picture\", picture);\n};\n\nconst nativeDrawOnscreen = (nativeId: number, recorder: JsiRecorder) => {\n \"worklet\";\n\n //const start = performance.now();\n\n const picture = recorder.play();\n //const end = performance.now();\n //console.log(\"Recording time: \", end - start);\n SkiaViewApi.setJsiProperty(nativeId, \"picture\", picture);\n};\n\nexport abstract class Container {\n private _root: Node[] = [];\n protected recording: Recording | null = null;\n protected unmounted = false;\n\n constructor(protected Skia: Skia, protected nativeId: number) {}\n\n get root() {\n return this._root;\n }\n\n set root(value: Node[]) {\n this._root = value;\n }\n\n unmount() {\n this.unmounted = true;\n }\n\n drawOnCanvas(canvas: SkCanvas) {\n if (!this.recording) {\n throw new Error(\"No recording to draw\");\n }\n const ctx = createDrawingContext(\n this.Skia,\n this.recording.paintPool,\n canvas\n );\n replay(ctx, this.recording.commands);\n }\n\n abstract redraw(): void;\n}\n\nclass StaticContainer extends Container {\n constructor(Skia: Skia, nativeId: number) {\n super(Skia, nativeId);\n }\n\n redraw() {\n const recorder = new Recorder();\n visit(recorder, this.root);\n this.recording = recorder.getRecording();\n const isOnScreen = this.nativeId !== -1;\n if (isOnScreen) {\n const rec = this.Skia.PictureRecorder();\n const canvas = rec.beginRecording();\n this.drawOnCanvas(canvas);\n const picture = rec.finishRecordingAsPicture();\n SkiaViewApi.setJsiProperty(this.nativeId, \"picture\", picture);\n }\n }\n}\n\nclass ReanimatedContainer extends Container {\n private mapperId: number | null = null;\n\n constructor(Skia: Skia, nativeId: number) {\n super(Skia, nativeId);\n }\n\n redraw() {\n if (this.mapperId !== null) {\n Rea.stopMapper(this.mapperId);\n }\n if (this.unmounted) {\n return;\n }\n const recorder = new Recorder();\n visit(recorder, this.root);\n const record = recorder.getRecording();\n const { animationValues } = record;\n this.recording = {\n commands: record.commands,\n paintPool: record.paintPool,\n };\n const { nativeId, Skia, recording } = this;\n if (animationValues.size > 0) {\n this.mapperId = Rea.startMapper(() => {\n \"worklet\";\n drawOnscreen(Skia, nativeId, recording!);\n }, Array.from(animationValues));\n }\n Rea.runOnUI(() => {\n \"worklet\";\n drawOnscreen(Skia, nativeId, recording!);\n })();\n }\n}\n\nclass NativeReanimatedContainer extends Container {\n private mapperId: number | null = null;\n\n constructor(Skia: Skia, nativeId: number) {\n super(Skia, nativeId);\n }\n\n redraw() {\n if (this.mapperId !== null) {\n Rea.stopMapper(this.mapperId);\n }\n if (this.unmounted) {\n return;\n }\n const { nativeId, Skia } = this;\n const recorder = new ReanimatedRecorder(Skia);\n visit(recorder, this.root);\n const sharedValues = recorder.getSharedValues();\n const sharedRecorder = recorder.getRecorder();\n Rea.runOnUI(() => {\n \"worklet\";\n nativeDrawOnscreen(nativeId, sharedRecorder);\n })();\n if (sharedValues.length > 0) {\n this.mapperId = Rea.startMapper(() => {\n \"worklet\";\n sharedRecorder.applyUpdates(sharedValues);\n nativeDrawOnscreen(nativeId, sharedRecorder);\n }, sharedValues);\n }\n }\n}\n\nexport const createContainer = (Skia: Skia, nativeId: number) => {\n const web = global.SkiaViewApi && global.SkiaViewApi.web;\n if (HAS_REANIMATED_3 && nativeId !== -1) {\n if (!web) {\n return new NativeReanimatedContainer(Skia, nativeId);\n } else {\n return new ReanimatedContainer(Skia, nativeId);\n }\n } else {\n return new StaticContainer(Skia, nativeId);\n }\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,wCAAwC;AAExD,SAASC,gBAAgB,QAAQ,sCAAsC;AAKvE,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,kBAAkB,QAAQ,+BAA+B;AAElE,OAAO,cAAc;AAErB,MAAMC,YAAY,GAAGA,CAACC,IAAU,EAAEC,QAAgB,EAAEC,SAAoB,KAAK;EAC3E,SAAS;;EAET,MAAMC,GAAG,GAAGH,IAAI,CAACI,eAAe,CAAC,CAAC;EAClC,MAAMC,MAAM,GAAGF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ay","createDrawingContext","ReanimatedRecorder","drawOnscreen","Skia","nativeId","recording","rec","PictureRecorder","canvas","beginRecording","ctx","paintPool","commands","picture","finishRecordingAsPicture","SkiaViewApi","setJsiProperty","nativeDrawOnscreen","recorder","play","Container","constructor","_defineProperty","unmount","unmounted","drawOnCanvas","Error","StaticContainer","redraw","root","getRecording","isOnScreen","ReanimatedContainer","mapperId","stopMapper","record","animationValues","size","startMapper","Array","from","runOnUI","NativeReanimatedContainer","sharedValues","getSharedValues","sharedRecorder","getRecorder","length","applyUpdates","createContainer","web","global"],"sources":["Container.ts"],"sourcesContent":["import Rea from \"../external/reanimated/ReanimatedProxy\";\nimport type { Skia, SkCanvas } from \"../skia/types\";\nimport { HAS_REANIMATED_3 } from \"../external/reanimated/renderHelpers\";\nimport type { JsiRecorder } from \"../skia/types/Recorder\";\n\nimport type { Node } from \"./Node\";\nimport type { Recording } from \"./Recorder/Recorder\";\nimport { Recorder } from \"./Recorder/Recorder\";\nimport { visit } from \"./Recorder/Visitor\";\nimport { replay } from \"./Recorder/Player\";\nimport { createDrawingContext } from \"./Recorder/DrawingContext\";\nimport { ReanimatedRecorder } from \"./Recorder/ReanimatedRecorder\";\n\nimport \"../views/api\";\n\nconst drawOnscreen = (Skia: Skia, nativeId: number, recording: Recording) => {\n \"worklet\";\n\n const rec = Skia.PictureRecorder();\n const canvas = rec.beginRecording();\n //const start = performance.now();\n\n const ctx = createDrawingContext(Skia, recording.paintPool, canvas);\n replay(ctx, recording.commands);\n const picture = rec.finishRecordingAsPicture();\n //const end = performance.now();\n //console.log(\"Recording time: \", end - start);\n SkiaViewApi.setJsiProperty(nativeId, \"picture\", picture);\n};\n\nconst nativeDrawOnscreen = (nativeId: number, recorder: JsiRecorder) => {\n \"worklet\";\n\n //const start = performance.now();\n\n const picture = recorder.play();\n //const end = performance.now();\n //console.log(\"Recording time: \", end - start);\n SkiaViewApi.setJsiProperty(nativeId, \"picture\", picture);\n};\n\nexport abstract class Container {\n public root: Node[] = [];\n protected recording: Recording | null = null;\n protected unmounted = false;\n\n constructor(protected Skia: Skia, protected nativeId: number) {}\n\n unmount() {\n this.unmounted = true;\n }\n\n drawOnCanvas(canvas: SkCanvas) {\n if (!this.recording) {\n throw new Error(\"No recording to draw\");\n }\n const ctx = createDrawingContext(\n this.Skia,\n this.recording.paintPool,\n canvas\n );\n replay(ctx, this.recording.commands);\n }\n\n abstract redraw(): void;\n}\n\nclass StaticContainer extends Container {\n constructor(Skia: Skia, nativeId: number) {\n super(Skia, nativeId);\n }\n\n redraw() {\n const recorder = new Recorder();\n visit(recorder, this.root);\n this.recording = recorder.getRecording();\n const isOnScreen = this.nativeId !== -1;\n if (isOnScreen) {\n const rec = this.Skia.PictureRecorder();\n const canvas = rec.beginRecording();\n this.drawOnCanvas(canvas);\n const picture = rec.finishRecordingAsPicture();\n SkiaViewApi.setJsiProperty(this.nativeId, \"picture\", picture);\n }\n }\n}\n\nclass ReanimatedContainer extends Container {\n private mapperId: number | null = null;\n\n constructor(Skia: Skia, nativeId: number) {\n super(Skia, nativeId);\n }\n\n redraw() {\n if (this.mapperId !== null) {\n Rea.stopMapper(this.mapperId);\n }\n if (this.unmounted) {\n return;\n }\n const recorder = new Recorder();\n visit(recorder, this.root);\n const record = recorder.getRecording();\n const { animationValues } = record;\n this.recording = {\n commands: record.commands,\n paintPool: record.paintPool,\n };\n const { nativeId, Skia, recording } = this;\n if (animationValues.size > 0) {\n this.mapperId = Rea.startMapper(() => {\n \"worklet\";\n drawOnscreen(Skia, nativeId, recording!);\n }, Array.from(animationValues));\n }\n Rea.runOnUI(() => {\n \"worklet\";\n drawOnscreen(Skia, nativeId, recording!);\n })();\n }\n}\n\nclass NativeReanimatedContainer extends Container {\n private mapperId: number | null = null;\n\n constructor(Skia: Skia, nativeId: number) {\n super(Skia, nativeId);\n }\n\n redraw() {\n if (this.mapperId !== null) {\n Rea.stopMapper(this.mapperId);\n }\n if (this.unmounted) {\n return;\n }\n const { nativeId, Skia } = this;\n const recorder = new ReanimatedRecorder(Skia);\n visit(recorder, this.root);\n const sharedValues = recorder.getSharedValues();\n const sharedRecorder = recorder.getRecorder();\n Rea.runOnUI(() => {\n \"worklet\";\n nativeDrawOnscreen(nativeId, sharedRecorder);\n })();\n if (sharedValues.length > 0) {\n this.mapperId = Rea.startMapper(() => {\n \"worklet\";\n sharedRecorder.applyUpdates(sharedValues);\n nativeDrawOnscreen(nativeId, sharedRecorder);\n }, sharedValues);\n }\n }\n}\n\nexport const createContainer = (Skia: Skia, nativeId: number) => {\n const web = global.SkiaViewApi && global.SkiaViewApi.web;\n if (HAS_REANIMATED_3 && nativeId !== -1) {\n if (!web) {\n return new NativeReanimatedContainer(Skia, nativeId);\n } else {\n return new ReanimatedContainer(Skia, nativeId);\n }\n } else {\n return new StaticContainer(Skia, nativeId);\n }\n};\n"],"mappings":";;;AAAA,OAAOA,GAAG,MAAM,wCAAwC;AAExD,SAASC,gBAAgB,QAAQ,sCAAsC;AAKvE,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,KAAK,QAAQ,oBAAoB;AAC1C,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,oBAAoB,QAAQ,2BAA2B;AAChE,SAASC,kBAAkB,QAAQ,+BAA+B;AAElE,OAAO,cAAc;AAErB,MAAMC,YAAY,GAAGA,CAACC,IAAU,EAAEC,QAAgB,EAAEC,SAAoB,KAAK;EAC3E,SAAS;;EAET,MAAMC,GAAG,GAAGH,IAAI,CAACI,eAAe,CAAC,CAAC;EAClC,MAAMC,MAAM,GAAGF,GAAG,CAACG,cAAc,CAAC,CAAC;EACnC;;EAEA,MAAMC,GAAG,GAAGV,oBAAoB,CAACG,IAAI,EAAEE,SAAS,CAACM,SAAS,EAAEH,MAAM,CAAC;EACnET,MAAM,CAACW,GAAG,EAAEL,SAAS,CAACO,QAAQ,CAAC;EAC/B,MAAMC,OAAO,GAAGP,GAAG,CAACQ,wBAAwB,CAAC,CAAC;EAC9C;EACA;EACAC,WAAW,CAACC,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G,CAAC,EAAE;MAC3B,IAAI,CAACd,QAAQ,GAAGtC,GAAG,CAAC2C,WAAW,CAAC,MAAM;QACpC,SAAS;;QACTO,cAAc,CAACG,YAAY,CAACL,YAAY,CAAC;QACzC1B,kBAAkB,CAACb,QAAQ,EAAEyC,cAAc,CAAC;MAC9C,CAAC,EAAEF,YAAY,CAAC;IAClB;EACF;AACF;AAEA,OAAO,MAAMM,eAAe,GAAGA,CAAC9C,IAAU,EAAEC,QAAgB,KAAK;EAC/D,MAAM8C,GAAG,GAAGC,MAAM,CAACpC,WAAW,IAAIoC,MAAM,CAACpC,WAAW,CAACmC,GAAG;EACxD,IAAItD,gBAAgB,IAAIQ,QAAQ,KAAK,CAAC,CAAC,EAAE;IACvC,IAAI,CAAC8C,GAAG,EAAE;MACR,OAAO,IAAIR,yBAAyB,CAACvC,IAAI,EAAEC,QAAQ,CAAC;IACtD,CAAC,MAAM;MACL,OAAO,IAAI4B,mBAAmB,CAAC7B,IAAI,EAAEC,QAAQ,CAAC;IAChD;EACF,CAAC,MAAM;IACL,OAAO,IAAIuB,eAAe,CAACxB,IAAI,EAAEC,QAAQ,CAAC;EAC5C;AACF,CAAC","ignoreList":[]}
|
@@ -9,7 +9,7 @@ type TextInstance = Node;
|
|
9
9
|
type SuspenseInstance = Instance;
|
10
10
|
type HydratableInstance = Instance;
|
11
11
|
type PublicInstance = Instance;
|
12
|
-
type HostContext =
|
12
|
+
type HostContext = null;
|
13
13
|
type UpdatePayload = Container;
|
14
14
|
type ChildSet = Node[];
|
15
15
|
type TimeoutHandle = NodeJS.Timeout;
|