@nativescript/canvas 2.0.0-alpha.5 → 2.0.0-alpha.50
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/Canvas/common.d.ts +213 -25
- package/Canvas/common.js +702 -452
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +12 -1
- package/Canvas/index.android.js +162 -49
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +13 -0
- package/Canvas/index.ios.d.ts +9 -4
- package/Canvas/index.ios.js +166 -103
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasGradient/index.d.ts +1 -3
- package/Canvas2D/CanvasGradient/index.js +1 -10
- package/Canvas2D/CanvasGradient/index.js.map +1 -1
- package/Canvas2D/CanvasPattern/index.d.ts +1 -3
- package/Canvas2D/CanvasPattern/index.js +1 -10
- package/Canvas2D/CanvasPattern/index.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +7 -3
- package/Canvas2D/CanvasRenderingContext2D/index.js +132 -233
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.js +3 -3
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +6 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.d.ts +0 -2
- package/Canvas2D/Path2D/index.js +32 -42
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Paint.js +2 -3
- package/Dom/Paint.js.map +1 -1
- package/Dom/shapes/Circle.js +1 -2
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Points.js +1 -2
- package/Dom/shapes/Points.js.map +1 -1
- package/ImageAsset/index.d.ts +2 -2
- package/ImageAsset/index.js +33 -37
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.d.ts +0 -2
- package/ImageBitmap/index.js +47 -33
- package/ImageBitmap/index.js.map +1 -1
- package/LICENSE +201 -0
- package/SVG/SVG.js +1 -1
- package/SVG/SVG.js.map +1 -1
- package/TextDecoder/index.d.ts +0 -2
- package/TextDecoder/index.js +3 -12
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.d.ts +0 -2
- package/TextEncoder/index.js +4 -13
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.d.ts +4 -12
- package/WebGL/WebGLExtensions/index.js +27 -77
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLProgram.d.ts +0 -1
- package/WebGL/WebGLProgram.js +0 -3
- package/WebGL/WebGLProgram.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.d.ts +1 -3
- package/WebGL/WebGLRenderingContext/common.js +3 -13
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +19 -17
- package/WebGL/WebGLRenderingContext/index.js +354 -728
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/common.d.ts +2 -2
- package/WebGL2/WebGL2RenderingContext/common.js +2 -2
- package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +116 -285
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/angular/esm2020/index.mjs +4 -4
- package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
- package/angular/package.json +2 -2
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/android/include.gradle +15 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +135 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +144 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2774 -70
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +5851 -2555
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +270 -136
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +144 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2774 -70
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +5851 -2555
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5851 -2555
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +44 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/Podfile +5 -2
- package/platforms/ios/build.xcconfig +3 -3
- package/platforms/ios/src/CanvasModule.h +0 -2
- package/platforms/ios/src/CanvasModule.mm +4 -4
- package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
- package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
- package/platforms/ios/src/cpp/Caches.cpp +35 -0
- package/platforms/ios/src/cpp/Caches.h +190 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1593 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.h +16 -34
- package/platforms/ios/src/cpp/Common.h +30 -0
- package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
- package/platforms/ios/src/cpp/Helpers.h +336 -38
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.h +46 -12
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +42 -16
- package/platforms/ios/src/cpp/JSICallback.h +83 -5
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
- package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
- package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
- package/platforms/ios/src/cpp/ObjectWrapperImpl.h +31 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +55 -0
- package/platforms/ios/src/cpp/OneByteStringResource.h +36 -0
- package/platforms/ios/src/cpp/PerIsolateData.cpp +49 -0
- package/platforms/ios/src/cpp/PerIsolateData.h +54 -0
- package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
- package/platforms/ios/src/cpp/RafImpl.h +11 -8
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +193 -0
- package/platforms/ios/src/cpp/TextDecoderImpl.h +23 -13
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
- package/platforms/ios/src/cpp/TextEncoderImpl.h +21 -12
- package/platforms/ios/src/cpp/URLImpl.cpp +464 -0
- package/platforms/ios/src/cpp/URLImpl.h +121 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +29 -13
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +49 -12
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2841 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +1331 -21
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +207 -0
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +27 -13
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +807 -0
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +173 -13
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +499 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +422 -12
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +51 -12
- package/platforms/ios/src/cpp/gl.h +57 -7
- package/platforms/ios/src/cpp/gl3stub.c +425 -0
- package/platforms/ios/src/cpp/gl3stub.h +665 -0
- package/platforms/ios/src/cpp/gles3jni.h +37 -0
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +91 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +42 -7
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +47 -11
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +41 -6
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6845 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +3217 -388
- package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +18 -17
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +16 -36
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +67 -12
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +41 -7
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +45 -9
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +26 -12
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +26 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +26 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +306 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +41 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +39 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +42 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +69 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +131 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -13
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4533 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1427 -342
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +41 -4
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +45 -11
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +43 -4
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +44 -4
- package/platforms/ios/src/module.modulemap +1 -0
- package/{pods → src-native/ios}/NativeScript.podspec +12 -25
- package/typings/objc!CanvasNative.d.ts +2038 -0
- package/typings/objc!CanvasNative.js +1 -0
- package/typings/objc!CanvasNative.js.map +1 -0
- package/utils.d.ts +3 -1
- package/utils.js +7 -20
- package/utils.js.map +1 -1
- package/angular/nativescript-canvas-angular.d.ts +0 -5
- package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
- package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
- package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
- package/platforms/ios/src/cpp/RafImpl.mm +0 -10
- package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
- package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
- package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6132
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2859
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1975
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
- package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
- package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
- package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4556
- package/pods/Headers/jsi/decorator.h +0 -770
- package/pods/Headers/jsi/instrumentation.h +0 -117
- package/pods/Headers/jsi/jsi-inl.h +0 -338
- package/pods/Headers/jsi/jsi.h +0 -1571
- package/pods/Headers/jsi/jsilib.h +0 -59
- package/pods/Headers/jsi/threadsafe.h +0 -79
- package/pods/Headers/v8runtime/HostProxy.h +0 -71
- package/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -74
- package/pods/Headers/v8runtime/V8PointerValue.h +0 -44
- package/pods/Headers/v8runtime/V8Runtime.h +0 -240
- package/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
- package/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
- /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
- /package/{pods → src-native/ios}/Headers/include/APIDesign.md +0 -0
- /package/{pods → src-native/ios}/Headers/include/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/DIR_METADATA +0 -0
- /package/{pods → src-native/ios}/Headers/include/OWNERS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/OWNERS +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/README.md +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/allocation.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/common.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/custom-space.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/default-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/ephemeron-pair.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/explicit-management.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/garbage-collected.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-consistency.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-state.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/heap.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/api-constants.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/gc-info.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/logging.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/name-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/persistent-node.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/internal/write-barrier.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/liveness-broker.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/macros.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/member.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/name-provider.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/object-size-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/persistent.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/prefinalizer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/process-heap-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/sentinel-pointer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/source-location.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/testing.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/trace-trait.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/type-traits.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/cppgc/visitor.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol-1.2.json +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol-1.3.json +0 -0
- /package/{pods → src-native/ios}/Headers/include/js_protocol.pdl +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffitarget.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libffi.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/DEPS +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform-export.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/libplatform/v8-tracing.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-array-buffer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-callbacks.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-container.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-context.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-cppgc.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-data.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-date.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-debug.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-embedder-heap.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-embedder-state-scope.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-exception.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-extension.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-external.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-fast-api-calls.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-forward.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-function-callback.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-function.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-initialization.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-inspector-protocol.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-inspector.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-internal.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-isolate.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-json.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-local-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-locker.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-maybe.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-memory-span.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-message.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-metrics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-microtask-queue.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-microtask.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-object.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-persistent-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-primitive-object.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-primitive.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-profiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-promise.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-proxy.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-regexp.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-snapshot.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-statistics.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-template.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-traced-handle.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-typed-array.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-unwinder-state.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-unwinder.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value-serializer-version.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value-serializer.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-value.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-version-string.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-version.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-wasm.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8-weak-callback-info.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8.h +0 -0
- /package/{pods → src-native/ios}/Headers/include/v8config.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/InspectorServer.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/JsV8InspectorClient.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/base64.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/address-region.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomic-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/base-export.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/bits.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/build_config.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/compiler-specific.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/export-template.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/flags.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/immediate-crash.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/lazy-instance.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/logging.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/macros.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/memory.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/once.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/optional.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/mutex.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/semaphore.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/v8-time.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/wrappers.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/template-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/common/checks.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/common/globals.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/debug/debug-interface.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/debug/interface-types.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/init/v8.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/custom-preview.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/injected-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/inspected-context.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/search-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-16.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-util.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-regex.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/inspector/value-mirror.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/libplatform/default-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/logging/tracing-flags.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/numbers/conversions.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/tracing/trace-event.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/utils/allocation.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/src/utils/vector.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/utils.h +0 -0
- /package/{pods → src-native/ios}/Headers/inspector/v8-inspector-platform.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ArgConverter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ArrayAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Caches.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ClassBuilder.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Common.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ConcurrentMap.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ConcurrentQueue.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Console.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Constants.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/DataWrapper.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/DictionaryAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ExtVector.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FFICall.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FastEnumerationAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/FunctionReference.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Helpers.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/InlineFunctions.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Interop.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/KnownUnknownClassPair.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Metadata.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/MetadataBuilder.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/MetadataInlines.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ModuleInternal.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/NSDataAdapter.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/NativeScriptException.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/ObjectManager.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/OneByteStringResource.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Pointer.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/PromiseProxy.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Reference.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Runtime.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/RuntimeConfig.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SetTimeout.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SimpleAllocator.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/StringHasher.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SymbolIterator.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/SymbolLoader.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/TNSDerivedClass.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/TSHelpers.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Tasks.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/UnmanagedType.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/WeakRef.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/Worker.h +0 -0
- /package/{pods → src-native/ios}/Headers/runtime/robin_hood.h +0 -0
|
@@ -1,417 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Created by Osei Fortune on 22/03/2022.
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
#include "ImageAssetImpl.h"
|
|
6
|
-
#include <string>
|
|
7
|
-
#include "JSICallback.h"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
ImageAssetImpl::ImageAssetImpl(rust::Box<ImageAsset> asset)
|
|
12
|
-
: asset_(std::move(asset)) {
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
std::vector<jsi::PropNameID> ImageAssetImpl::getPropertyNames(jsi::Runtime &rt) {
|
|
16
|
-
std::vector<jsi::PropNameID> ret;
|
|
17
|
-
ret.reserve(12);
|
|
18
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("width")));
|
|
19
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("height")));
|
|
20
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("error")));
|
|
21
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("scale")));
|
|
22
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("fromUrlSync")));
|
|
23
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("fromUrlCb")));
|
|
24
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("fromFileSync")));
|
|
25
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("fromFileCb")));
|
|
26
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("fromBytesSync")));
|
|
27
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("fromBytesCb")));
|
|
28
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("saveSync")));
|
|
29
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("saveCb")));
|
|
30
|
-
return ret;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
jsi::Value ImageAssetImpl::get(jsi::Runtime &runtime, const jsi::PropNameID &name) {
|
|
34
|
-
auto methodName = name.utf8(runtime);
|
|
35
|
-
if (methodName == "width") {
|
|
36
|
-
return {(double) canvas_native_image_asset_width(this->GetImageAsset())};
|
|
37
|
-
} else if (methodName == "height") {
|
|
38
|
-
return {(double) canvas_native_image_asset_height(this->GetImageAsset())};
|
|
39
|
-
} else if (methodName == "error") {
|
|
40
|
-
auto error = canvas_native_image_asset_get_error(this->GetImageAsset());
|
|
41
|
-
return jsi::String::createFromAscii(runtime, error.data(), error.size());
|
|
42
|
-
} else if (methodName == "scale") {
|
|
43
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
44
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
45
|
-
2,
|
|
46
|
-
[this](jsi::Runtime &runtime,
|
|
47
|
-
const jsi::Value &thisValue,
|
|
48
|
-
const jsi::Value *arguments,
|
|
49
|
-
size_t count) -> jsi::Value {
|
|
50
|
-
if (count > 1) {
|
|
51
|
-
auto x = (uint32_t) arguments[0].asNumber();
|
|
52
|
-
auto y = (uint32_t) arguments[1].asNumber();
|
|
53
|
-
if (x > 0 && y > 0) {
|
|
54
|
-
canvas_native_image_asset_scale(
|
|
55
|
-
this->GetImageAsset(), x,
|
|
56
|
-
y);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
return jsi::Value::undefined();
|
|
62
|
-
}
|
|
63
|
-
);
|
|
64
|
-
} else if (methodName == "fromUrlSync") {
|
|
65
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
66
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
67
|
-
1,
|
|
68
|
-
[this](jsi::Runtime &runtime,
|
|
69
|
-
const jsi::Value &thisValue,
|
|
70
|
-
const jsi::Value *arguments,
|
|
71
|
-
size_t count) -> jsi::Value {
|
|
72
|
-
|
|
73
|
-
auto url = arguments[0].asString(
|
|
74
|
-
runtime).utf8(runtime);
|
|
75
|
-
auto done = canvas_native_image_asset_load_from_url(
|
|
76
|
-
this->GetImageAsset(),
|
|
77
|
-
rust::Str(url.c_str()));
|
|
78
|
-
return {done};
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
} else if (methodName == "fromUrlCb") {
|
|
82
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
83
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
84
|
-
2,
|
|
85
|
-
[this](jsi::Runtime &runtime,
|
|
86
|
-
const jsi::Value &thisValue,
|
|
87
|
-
const jsi::Value *arguments,
|
|
88
|
-
size_t count) -> jsi::Value {
|
|
89
|
-
|
|
90
|
-
auto current_queue = NSOperationQueue.currentQueue;
|
|
91
|
-
|
|
92
|
-
if (count < 2) {
|
|
93
|
-
return jsi::Value::undefined();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
auto url = arguments[0].asString(
|
|
98
|
-
runtime).utf8(runtime);
|
|
99
|
-
|
|
100
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
101
|
-
this->GetImageAsset());
|
|
102
|
-
|
|
103
|
-
auto cb = std::make_shared<jsi::Value>(
|
|
104
|
-
runtime, arguments[1]);
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
auto jsi_callback = new JSICallback(
|
|
108
|
-
std::shared_ptr<jsi::Value>(
|
|
109
|
-
cb));
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
auto queue = [NSOperationQueue new];
|
|
113
|
-
[queue addOperationWithBlock:^{
|
|
114
|
-
rust::Str asset_url(url.c_str());
|
|
115
|
-
|
|
116
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
117
|
-
this->GetImageAsset());
|
|
118
|
-
|
|
119
|
-
auto done = canvas_native_image_asset_load_from_url(
|
|
120
|
-
this->GetImageAsset(), asset_url
|
|
121
|
-
);
|
|
122
|
-
[current_queue addOperationWithBlock:^{
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
auto func = jsi_callback->value_->asObject(
|
|
128
|
-
runtime).asFunction(
|
|
129
|
-
runtime);
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
func.call(runtime,
|
|
134
|
-
jsi::Value(
|
|
135
|
-
done));
|
|
136
|
-
|
|
137
|
-
delete static_cast<JSICallback *>(jsi_callback);
|
|
138
|
-
}];
|
|
139
|
-
}];
|
|
140
|
-
return jsi::Value::undefined();
|
|
141
|
-
}
|
|
142
|
-
);
|
|
143
|
-
} else if (methodName == "fromFileSync") {
|
|
144
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
145
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
146
|
-
1,
|
|
147
|
-
[this](jsi::Runtime &runtime,
|
|
148
|
-
const jsi::Value &thisValue,
|
|
149
|
-
const jsi::Value *arguments,
|
|
150
|
-
size_t count) -> jsi::Value {
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
auto path = arguments[0].asString(
|
|
154
|
-
runtime).utf8(runtime);
|
|
155
|
-
|
|
156
|
-
auto done = canvas_native_image_asset_load_from_path(
|
|
157
|
-
this->GetImageAsset(),
|
|
158
|
-
rust::Str(path.c_str()));
|
|
159
|
-
|
|
160
|
-
return {done};
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
} else if (methodName == "fromFileCb") {
|
|
164
|
-
auto current_queue = NSOperationQueue.currentQueue;
|
|
165
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
166
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
167
|
-
2,
|
|
168
|
-
[this, current_queue](jsi::Runtime &runtime,
|
|
169
|
-
const jsi::Value &thisValue,
|
|
170
|
-
const jsi::Value *arguments,
|
|
171
|
-
size_t count) -> jsi::Value {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
auto path = arguments[0].asString(
|
|
175
|
-
runtime).utf8(runtime);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
auto cb = std::make_shared<jsi::Value>(
|
|
180
|
-
runtime, arguments[1]);
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
auto jsi_callback = new JSICallback(
|
|
184
|
-
std::shared_ptr<jsi::Value>(
|
|
185
|
-
cb));
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
auto queue = [NSOperationQueue new];
|
|
191
|
-
[queue addOperationWithBlock:^{
|
|
192
|
-
rust::Str asset_path(path.c_str());
|
|
193
|
-
|
|
194
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
195
|
-
this->GetImageAsset());
|
|
196
|
-
|
|
197
|
-
auto done = canvas_native_image_asset_load_from_path(
|
|
198
|
-
this->GetImageAsset(), asset_path
|
|
199
|
-
);
|
|
200
|
-
[current_queue addOperationWithBlock:^{
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
auto func = jsi_callback->value_->asObject(
|
|
206
|
-
runtime).asFunction(
|
|
207
|
-
runtime);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
func.call(runtime,
|
|
212
|
-
jsi::Value(
|
|
213
|
-
done));
|
|
214
|
-
|
|
215
|
-
delete static_cast<JSICallback *>(jsi_callback);
|
|
216
|
-
}];
|
|
217
|
-
}];
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
return jsi::Value::undefined();
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
} else if (methodName == "fromBytesSync") {
|
|
224
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
225
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
226
|
-
1,
|
|
227
|
-
[this](jsi::Runtime &runtime,
|
|
228
|
-
const jsi::Value &thisValue,
|
|
229
|
-
const jsi::Value *arguments,
|
|
230
|
-
size_t count) -> jsi::Value {
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
if (arguments[0].isObject()) {
|
|
234
|
-
auto object = arguments[0].asObject(
|
|
235
|
-
runtime);
|
|
236
|
-
if (!object.isArrayBuffer(
|
|
237
|
-
runtime)) { return {false}; }
|
|
238
|
-
auto buf = object.getArrayBuffer(
|
|
239
|
-
runtime);
|
|
240
|
-
|
|
241
|
-
auto size = buf.size(runtime);
|
|
242
|
-
auto data = buf.data(runtime);
|
|
243
|
-
auto done = canvas_native_image_asset_load_from_raw(
|
|
244
|
-
this->GetImageAsset(),
|
|
245
|
-
rust::Slice<const uint8_t>(
|
|
246
|
-
data, size));
|
|
247
|
-
return {done};
|
|
248
|
-
}
|
|
249
|
-
return {false};
|
|
250
|
-
}
|
|
251
|
-
);
|
|
252
|
-
} else if (methodName == "fromBytesCb") {
|
|
253
|
-
auto current_queue = NSOperationQueue.currentQueue;
|
|
254
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
255
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
256
|
-
2,
|
|
257
|
-
[this, current_queue](jsi::Runtime &runtime,
|
|
258
|
-
const jsi::Value &thisValue,
|
|
259
|
-
const jsi::Value *arguments,
|
|
260
|
-
size_t count) -> jsi::Value {
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
auto bytes = arguments[0].asObject(
|
|
264
|
-
runtime).getArrayBuffer(runtime);
|
|
265
|
-
|
|
266
|
-
auto size = bytes.size(runtime);
|
|
267
|
-
auto data = bytes.data(runtime);
|
|
268
|
-
auto buf = rust::Slice<const uint8_t>(data,
|
|
269
|
-
size);
|
|
270
|
-
|
|
271
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
272
|
-
this->GetImageAsset());
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
auto cb = std::make_shared<jsi::Value>(
|
|
276
|
-
runtime, arguments[1]);
|
|
277
|
-
|
|
278
|
-
auto jsi_callback = new JSICallback(
|
|
279
|
-
std::shared_ptr<jsi::Value>(
|
|
280
|
-
cb));
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
auto queue = [NSOperationQueue new];
|
|
284
|
-
[queue addOperationWithBlock:^{
|
|
285
|
-
|
|
286
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
287
|
-
this->GetImageAsset());
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
auto done = canvas_native_image_asset_load_from_raw(
|
|
293
|
-
this->GetImageAsset(), buf);
|
|
294
|
-
|
|
295
|
-
[current_queue addOperationWithBlock:^{
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
auto func = jsi_callback->value_->asObject(
|
|
301
|
-
runtime).asFunction(
|
|
302
|
-
runtime);
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
func.call(runtime,
|
|
307
|
-
jsi::Value(
|
|
308
|
-
done));
|
|
309
|
-
|
|
310
|
-
delete static_cast<JSICallback *>(jsi_callback);
|
|
311
|
-
}];
|
|
312
|
-
}];
|
|
313
|
-
|
|
314
|
-
return jsi::Value::undefined();
|
|
315
|
-
}
|
|
316
|
-
);
|
|
317
|
-
} else if (methodName == "saveSync") {
|
|
318
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
319
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
320
|
-
2,
|
|
321
|
-
[this](jsi::Runtime &runtime,
|
|
322
|
-
const jsi::Value &thisValue,
|
|
323
|
-
const jsi::Value *arguments,
|
|
324
|
-
size_t count) -> jsi::Value {
|
|
325
|
-
|
|
326
|
-
if (count < 2) {
|
|
327
|
-
return {false};
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
auto path = arguments[0].asString(
|
|
331
|
-
runtime).utf8(runtime);
|
|
332
|
-
auto format = (uint32_t) arguments[1].asNumber();
|
|
333
|
-
auto done = canvas_native_image_asset_save_path(
|
|
334
|
-
this->GetImageAsset(),
|
|
335
|
-
rust::Str(path.c_str()), format);
|
|
336
|
-
|
|
337
|
-
return {done};
|
|
338
|
-
}
|
|
339
|
-
);
|
|
340
|
-
} else if (methodName == "saveCb") {
|
|
341
|
-
auto current_queue = NSOperationQueue.currentQueue;
|
|
342
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
343
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
344
|
-
3,
|
|
345
|
-
[this, current_queue](jsi::Runtime &runtime,
|
|
346
|
-
const jsi::Value &thisValue,
|
|
347
|
-
const jsi::Value *arguments,
|
|
348
|
-
size_t count) -> jsi::Value {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
auto path = arguments[0].asString(
|
|
352
|
-
runtime).utf8(runtime);
|
|
353
|
-
|
|
354
|
-
auto format = (uint32_t) arguments[1].asNumber();
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
358
|
-
this->GetImageAsset());
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
auto cb = std::make_shared<jsi::Value>(
|
|
362
|
-
runtime, arguments[1]);
|
|
363
|
-
|
|
364
|
-
auto jsi_callback = new JSICallback(
|
|
365
|
-
std::shared_ptr<jsi::Value>(
|
|
366
|
-
cb));
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
auto queue = [NSOperationQueue new];
|
|
370
|
-
[queue addOperationWithBlock:^{
|
|
371
|
-
|
|
372
|
-
rust::Str asset_path(
|
|
373
|
-
path.c_str());
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
auto asset = canvas_native_image_asset_shared_clone(
|
|
377
|
-
this->GetImageAsset());
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
auto done = canvas_native_image_asset_save_path(
|
|
381
|
-
this->GetImageAsset(),
|
|
382
|
-
asset_path,
|
|
383
|
-
format);
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
[current_queue addOperationWithBlock:^{
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
auto func = jsi_callback->value_->asObject(
|
|
393
|
-
runtime).asFunction(
|
|
394
|
-
runtime);
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
func.call(runtime,
|
|
399
|
-
jsi::Value(
|
|
400
|
-
done));
|
|
401
|
-
|
|
402
|
-
delete static_cast<JSICallback *>(jsi_callback);
|
|
403
|
-
}];
|
|
404
|
-
}];
|
|
405
|
-
|
|
406
|
-
return jsi::Value::undefined();
|
|
407
|
-
}
|
|
408
|
-
);
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
return jsi::Value::undefined();
|
|
412
|
-
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
ImageAsset &ImageAssetImpl::GetImageAsset() {
|
|
416
|
-
return *this->asset_;
|
|
417
|
-
}
|
|
@@ -1,126 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Created by Osei Fortune on 22/03/2022.
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
#include "ImageBitmapImpl.h"
|
|
6
|
-
#include "ImageAssetImpl.h"
|
|
7
|
-
#include "rust/cxx.h"
|
|
8
|
-
|
|
9
|
-
ImageBitmapImpl::ImageBitmapImpl(rust::Box<ImageAsset> asset)
|
|
10
|
-
: bitmap_(std::move(asset)) {}
|
|
11
|
-
|
|
12
|
-
jsi::Value ImageBitmapImpl::get(jsi::Runtime &runtime, const jsi::PropNameID &name) {
|
|
13
|
-
auto methodName = name.utf8(runtime);
|
|
14
|
-
if (methodName == "width") {
|
|
15
|
-
if (this->closed_) {
|
|
16
|
-
return {0};
|
|
17
|
-
}
|
|
18
|
-
return {(int32_t) canvas_native_image_asset_width(this->GetImageAsset())};
|
|
19
|
-
} else if (methodName == "height") {
|
|
20
|
-
if (this->closed_) {
|
|
21
|
-
return {0};
|
|
22
|
-
}
|
|
23
|
-
return {(int32_t) canvas_native_image_asset_height(this->GetImageAsset())};
|
|
24
|
-
} else if (methodName == "close") {
|
|
25
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
26
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
27
|
-
0,
|
|
28
|
-
[this](jsi::Runtime &runtime,
|
|
29
|
-
const jsi::Value &thisValue,
|
|
30
|
-
const jsi::Value *arguments,
|
|
31
|
-
size_t count) -> jsi::Value {
|
|
32
|
-
this->closed_ = true;
|
|
33
|
-
return jsi::Value::undefined();
|
|
34
|
-
}
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
return jsi::Value::undefined();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
std::vector<jsi::PropNameID> ImageBitmapImpl::getPropertyNames(jsi::Runtime &rt) {
|
|
42
|
-
std::vector<jsi::PropNameID> ret;
|
|
43
|
-
ret.reserve(3);
|
|
44
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("width")));
|
|
45
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("height")));
|
|
46
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("close")));
|
|
47
|
-
return ret;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
Options
|
|
52
|
-
ImageBitmapImpl::HandleOptions(jsi::Runtime &runtime, const jsi::Value &options) {
|
|
53
|
-
Options ret;
|
|
54
|
-
|
|
55
|
-
if (options.isObject()) {
|
|
56
|
-
auto config = options.asObject(runtime);
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
auto flipYValue = config.getProperty(runtime, "flipY");
|
|
60
|
-
if (flipYValue.isBool()) {
|
|
61
|
-
ret.flipY = flipYValue.asBool();
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
auto premultiplyAlphaValue = config.getProperty(runtime, "premultiplyAlpha");
|
|
65
|
-
|
|
66
|
-
if (premultiplyAlphaValue.isString()) {
|
|
67
|
-
auto premultiplyAlpha = premultiplyAlphaValue.asString(runtime).utf8(runtime);
|
|
68
|
-
|
|
69
|
-
if (premultiplyAlpha == "premultiply") {
|
|
70
|
-
ret.premultiplyAlpha = ImageBitmapPremultiplyAlpha::Premultiply;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (premultiplyAlpha == "none") {
|
|
74
|
-
ret.premultiplyAlpha = ImageBitmapPremultiplyAlpha::None;
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
auto colorSpaceConversionValue = config.getProperty(runtime, "colorSpaceConversion");
|
|
79
|
-
|
|
80
|
-
if (colorSpaceConversionValue.isString()) {
|
|
81
|
-
auto colorSpaceConversion = colorSpaceConversionValue.asString(runtime).utf8(runtime);
|
|
82
|
-
|
|
83
|
-
if (colorSpaceConversion == "none") {
|
|
84
|
-
ret.colorSpaceConversion = ImageBitmapColorSpaceConversion::None;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
auto resizeQualityValue = config.getProperty(runtime, "resizeQuality");
|
|
89
|
-
|
|
90
|
-
if (resizeQualityValue.isString()) {
|
|
91
|
-
auto resizeQuality = resizeQualityValue.asString(runtime).utf8(runtime);
|
|
92
|
-
|
|
93
|
-
if (resizeQuality == "medium") {
|
|
94
|
-
ret.resizeQuality = ImageBitmapResizeQuality::Medium;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
if (resizeQuality == "high") {
|
|
98
|
-
ret.resizeQuality = ImageBitmapResizeQuality::High;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
if (resizeQuality == "pixelated") {
|
|
102
|
-
ret.resizeQuality = ImageBitmapResizeQuality::Pixelated;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
auto resizeWidthValue = config.getProperty(runtime, "resizeWidth");
|
|
107
|
-
|
|
108
|
-
if (resizeWidthValue.isNumber()) {
|
|
109
|
-
auto val = resizeWidthValue.asNumber();
|
|
110
|
-
ret.resizeWidth = (float) val;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
auto resizeHeightValue = config.getProperty(runtime, "resizeHeight");
|
|
114
|
-
|
|
115
|
-
if (resizeHeightValue.isNumber()) {
|
|
116
|
-
auto val = resizeHeightValue.asNumber();
|
|
117
|
-
ret.resizeHeight = (float) val;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
return ret;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
ImageAsset &ImageBitmapImpl::GetImageAsset() {
|
|
125
|
-
return *this->bitmap_;
|
|
126
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Created by Osei Fortune on 20/04/2022.
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
#include "RafImpl.h"
|
|
6
|
-
#include "rust/cxx.h"
|
|
7
|
-
#include "canvas-cxx/src/lib.rs.h"
|
|
8
|
-
|
|
9
|
-
RafImpl::RafImpl(OnRafCallback *rafCallback, intptr_t callback, rust::Box<Raf> raf) : rafCallback_(
|
|
10
|
-
rafCallback), callback_(callback), raf_(std::move(raf)) {}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Created by Osei Fortune on 19/04/2022.
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
#include "TextDecoderImpl.h"
|
|
6
|
-
|
|
7
|
-
TextDecoderImpl::TextDecoderImpl(rust::Box<TextDecoder> decoder) : decoder_(std::move(decoder)) {}
|
|
8
|
-
|
|
9
|
-
std::vector<jsi::PropNameID> TextDecoderImpl::getPropertyNames(jsi::Runtime &rt) {
|
|
10
|
-
std::vector<jsi::PropNameID> ret;
|
|
11
|
-
ret.reserve(2);
|
|
12
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("encoding")));
|
|
13
|
-
ret.push_back(jsi::PropNameID::forUtf8(rt, std::string("decode")));
|
|
14
|
-
return ret;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
jsi::Value TextDecoderImpl::get(jsi::Runtime &runtime, const jsi::PropNameID &name) {
|
|
18
|
-
auto methodName = name.utf8(runtime);
|
|
19
|
-
if (methodName == "encoding") {
|
|
20
|
-
auto encoding = canvas_native_text_decoder_get_encoding(this->GetTextDecoder());
|
|
21
|
-
return jsi::String::createFromAscii(runtime, encoding.data(), encoding.size());
|
|
22
|
-
} else if (methodName == "decode") {
|
|
23
|
-
return jsi::Function::createFromHostFunction(runtime,
|
|
24
|
-
jsi::PropNameID::forAscii(runtime, methodName),
|
|
25
|
-
0,
|
|
26
|
-
[this](jsi::Runtime &runtime,
|
|
27
|
-
const jsi::Value &thisValue,
|
|
28
|
-
const jsi::Value *arguments,
|
|
29
|
-
size_t count) -> jsi::Value {
|
|
30
|
-
|
|
31
|
-
if (count == 1) {
|
|
32
|
-
if (arguments[0].isNull() ||
|
|
33
|
-
arguments[0].isUndefined() ||
|
|
34
|
-
!arguments[0].isObject()) {
|
|
35
|
-
|
|
36
|
-
throw jsi::JSINativeException(
|
|
37
|
-
"Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
auto buf = arguments[0].asObject(
|
|
41
|
-
runtime);
|
|
42
|
-
|
|
43
|
-
if (buf.isArrayBuffer(runtime)) {
|
|
44
|
-
|
|
45
|
-
auto buffer = buf.getArrayBuffer(
|
|
46
|
-
runtime);
|
|
47
|
-
|
|
48
|
-
auto data = buffer.data(runtime);
|
|
49
|
-
auto size = buffer.size(runtime);
|
|
50
|
-
rust::Slice<const uint8_t> slice{
|
|
51
|
-
data,
|
|
52
|
-
size};
|
|
53
|
-
auto decoded = canvas_native_text_decoder_decode(
|
|
54
|
-
this->GetTextDecoder(),
|
|
55
|
-
slice);
|
|
56
|
-
return jsi::String::createFromAscii(
|
|
57
|
-
runtime, decoded.data(),
|
|
58
|
-
decoded.size());
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (buf.isTypedArray(runtime)) {
|
|
63
|
-
|
|
64
|
-
auto buffer = buf.getTypedArray(
|
|
65
|
-
runtime);
|
|
66
|
-
|
|
67
|
-
auto data = GetTypedArrayData<const uint8_t>(
|
|
68
|
-
runtime, buffer);
|
|
69
|
-
|
|
70
|
-
auto decoded = canvas_native_text_decoder_decode(
|
|
71
|
-
this->GetTextDecoder(),
|
|
72
|
-
data);
|
|
73
|
-
|
|
74
|
-
return jsi::String::createFromAscii(
|
|
75
|
-
runtime, decoded.data(),
|
|
76
|
-
decoded.size());
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
throw jsi::JSINativeException(
|
|
81
|
-
"Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
return jsi::String::createFromUtf8(runtime,
|
|
87
|
-
"");
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
return jsi::Value::undefined();
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
TextDecoder &TextDecoderImpl::GetTextDecoder() {
|
|
96
|
-
return *this->decoder_;
|
|
97
|
-
}
|