@nativescript/canvas 2.0.0-rc.21 → 2.0.0-rc.22

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.
Files changed (34) hide show
  1. package/package.json +1 -1
  2. package/platforms/android/canvas-release.aar +0 -0
  3. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  4. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +10 -27
  5. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +1 -1
  6. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +27 -1
  7. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  8. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  9. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +12474 -11317
  10. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +9 -7
  11. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  12. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +9 -7
  13. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  14. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +965 -954
  15. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  16. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +20 -54
  17. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +1 -1
  18. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +27 -1
  19. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  20. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  21. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  22. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +12474 -11317
  23. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +9 -7
  24. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  25. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +9 -7
  26. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +12474 -11317
  27. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +9 -7
  28. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  29. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +9 -7
  30. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +31 -31
  31. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  32. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +962 -955
  33. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +832 -824
  34. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nativescript/canvas",
3
- "version": "2.0.0-rc.21",
3
+ "version": "2.0.0-rc.22",
4
4
  "description": "DOM Canvas API for NativeScript",
5
5
  "main": "index",
6
6
  "typings": "index.d.ts",
@@ -1,6 +1,6 @@
1
1
  #if 0
2
2
  #elif defined(__arm64__) && __arm64__
3
- // Generated by Apple Swift version 6.0.2 effective-5.10 (swiftlang-6.0.2.1.2 clang-1600.0.26.4)
3
+ // Generated by Apple Swift version 6.1.2 effective-5.10 (swiftlang-6.1.2.1.2 clang-1700.0.13.5)
4
4
  #ifndef CANVASNATIVE_SWIFT_H
5
5
  #define CANVASNATIVE_SWIFT_H
6
6
  #pragma clang diagnostic push
@@ -65,6 +65,7 @@
65
65
  # if __has_include(<uchar.h>)
66
66
  # include <uchar.h>
67
67
  # elif !defined(__cplusplus)
68
+ typedef unsigned char char8_t;
68
69
  typedef uint_least16_t char16_t;
69
70
  typedef uint_least32_t char32_t;
70
71
  # endif
@@ -287,7 +288,6 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
287
288
  @import Foundation;
288
289
  @import GLKit;
289
290
  @import ObjectiveC;
290
- @import OpenGLES;
291
291
  @import UIKit;
292
292
  #endif
293
293
 
@@ -310,9 +310,9 @@ typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4)));
310
310
  #endif
311
311
 
312
312
  #if defined(__OBJC__)
313
+
313
314
  @class NSMutableData;
314
315
  @class NSCoder;
315
-
316
316
  SWIFT_CLASS_NAMED("CanvasCPUView")
317
317
  @interface CanvasCPUView : UIView
318
318
  @property (nonatomic) BOOL ignorePixelScaling;
@@ -324,7 +324,6 @@ SWIFT_CLASS_NAMED("CanvasCPUView")
324
324
 
325
325
  @class NSCCanvas;
326
326
  @class EAGLContext;
327
-
328
327
  SWIFT_CLASS_NAMED("CanvasGLKView")
329
328
  @interface CanvasGLKView : GLKView <GLKViewDelegate>
330
329
  @property (nonatomic, readonly, weak) NSCCanvas * _Nullable canvas;
@@ -341,7 +340,6 @@ SWIFT_CLASS_NAMED("CanvasGLKView")
341
340
  @class NSString;
342
341
  @class NSData;
343
342
  @class NSError;
344
-
345
343
  SWIFT_CLASS_NAMED("CanvasHelpers")
346
344
  @interface NSSCanvasHelpers : NSObject
347
345
  + (NSMutableData * _Nonnull)getBytesFromUIImage:(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
@@ -373,7 +371,6 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
373
371
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
374
372
  @end
375
373
 
376
-
377
374
  @interface GLKView (SWIFT_EXTENSION(CanvasNative))
378
375
  - (void)snapshotWithData:(NSData * _Nonnull)data;
379
376
  @end
@@ -382,7 +379,6 @@ enum CanvasFit : NSInteger;
382
379
  @class NSMutableDictionary;
383
380
  @class UIGestureRecognizer;
384
381
  @protocol NSCCanvasListener;
385
-
386
382
  SWIFT_CLASS_NAMED("NSCCanvas")
387
383
  @interface NSCCanvas : UIView
388
384
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL forceGL;)
@@ -433,19 +429,16 @@ typedef SWIFT_ENUM_NAMED(NSInteger, CanvasFit, "CanvasFit", open) {
433
429
  CanvasFitScaleDown = 4,
434
430
  };
435
431
 
436
-
437
432
  SWIFT_PROTOCOL_NAMED("NSCCanvasListener")
438
433
  @protocol NSCCanvasListener
439
434
  - (void)contextReady;
440
435
  @end
441
436
 
442
-
443
437
  SWIFT_CLASS_NAMED("NSCCanvasRenderingContext")
444
438
  @interface NSCCanvasRenderingContext : NSObject
445
439
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
446
440
  @end
447
441
 
448
-
449
442
  SWIFT_CLASS_NAMED("NSCCanvasRenderingContext2D")
450
443
  @interface NSCCanvasRenderingContext2D : NSCCanvasRenderingContext
451
444
  + (int64_t)createPattern:(int64_t)context :(UIImage * _Nonnull)src :(NSString * _Nonnull)repetition SWIFT_WARN_UNUSED_RESULT;
@@ -455,21 +448,12 @@ SWIFT_CLASS_NAMED("NSCCanvasRenderingContext2D")
455
448
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
456
449
  @end
457
450
 
458
- @class NSCRender;
459
- @class AVPlayer;
460
- @class AVPlayerItemVideoOutput;
461
-
462
451
  SWIFT_CLASS_NAMED("NSCCanvasUtils")
463
452
  @interface NSCCanvasUtils : NSObject
464
- + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT;
465
- + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT;
466
- + (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT;
467
- + (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
468
453
  + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error;
469
454
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
470
455
  @end
471
456
 
472
-
473
457
  SWIFT_CLASS_NAMED("NSCFontDescriptors")
474
458
  @interface NSCFontDescriptors : NSObject
475
459
  - (nonnull instancetype)initWithFamily:(NSString * _Nonnull)family OBJC_DESIGNATED_INITIALIZER;
@@ -490,7 +474,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontDisplay, "NSCFontDisplay", open) {
490
474
 
491
475
  enum NSCFontFaceStatus : NSInteger;
492
476
  enum NSCFontWeight : NSInteger;
493
-
494
477
  SWIFT_CLASS_NAMED("NSCFontFace")
495
478
  @interface NSCFontFace : NSObject
496
479
  @property (nonatomic, readonly) CGFontRef _Nullable font;
@@ -520,7 +503,6 @@ SWIFT_CLASS_NAMED("NSCFontFace")
520
503
 
521
504
  enum NSCFontFaceSetStatus : NSInteger;
522
505
  @class NSEnumerator;
523
-
524
506
  SWIFT_CLASS_NAMED("NSCFontFaceSet")
525
507
  @interface NSCFontFaceSet : NSObject
526
508
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSCFontFaceSet * _Nonnull instance;)
@@ -562,9 +544,11 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCFontWeight, "NSCFontWeight", open) {
562
544
  NSCFontWeightBlack = 8,
563
545
  };
564
546
 
565
-
547
+ @class AVPlayer;
548
+ @class AVPlayerItemVideoOutput;
566
549
  SWIFT_CLASS_NAMED("NSCImageAsset")
567
550
  @interface NSCImageAsset : NSObject
551
+ + (void)getImageFromPlayer:(int64_t)context :(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(BOOL)flipX :(BOOL)flipY :(void (^ _Nonnull)(BOOL))callback;
568
552
  + (BOOL)loadImageFromImageSync:(int64_t)context :(UIImage * _Nonnull)image SWIFT_WARN_UNUSED_RESULT;
569
553
  + (void)loadImageFromImage:(int64_t)context :(UIImage * _Nonnull)image :(void (^ _Nonnull)(BOOL))callback;
570
554
  + (BOOL)loadImageFromPathSync:(int64_t)asset :(NSString * _Nonnull)path SWIFT_WARN_UNUSED_RESULT;
@@ -572,7 +556,6 @@ SWIFT_CLASS_NAMED("NSCImageAsset")
572
556
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
573
557
  @end
574
558
 
575
-
576
559
  SWIFT_CLASS_NAMED("NSCImageBitmap")
577
560
  @interface NSCImageBitmap : NSObject
578
561
  SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_queue_t _Nonnull queue;)
@@ -580,13 +563,15 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que
580
563
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
581
564
  @end
582
565
 
583
-
566
+ @protocol MTLDevice;
584
567
  SWIFT_CLASS_NAMED("NSCRender")
585
568
  @interface NSCRender : NSObject
586
569
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
570
+ - (nonnull instancetype)initWithDevice:(id <MTLDevice> _Nonnull)device OBJC_DESIGNATED_INITIALIZER;
571
+ - (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
572
+ - (void)drawFrameWithBuffer:(CVPixelBufferRef _Nonnull)buffer width:(NSInteger)width height:(NSInteger)height internalFormat:(int32_t)internalFormat format:(int32_t)format flipYWebGL:(BOOL)flipYWebGL;
587
573
  @end
588
574
 
589
-
590
575
  SWIFT_CLASS_NAMED("NSCVideoFrame")
591
576
  @interface NSCVideoFrame : NSObject
592
577
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
@@ -605,7 +590,6 @@ typedef SWIFT_ENUM_NAMED(NSInteger, NSCVideoFrameFormat, "NSCVideoFrameFormat",
605
590
  NSCVideoFrameFormatBGRX = 8,
606
591
  };
607
592
 
608
-
609
593
  SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
610
594
  @interface NSCWebGLRenderingContext : NSObject
611
595
  + (void)texImage2D:(int64_t)context :(int32_t)target :(int32_t)level :(int32_t)internalformat :(int32_t)format :(int32_t)type :(uint8_t * _Nonnull)data :(NSUInteger)size :(CGSize)dimensions :(BOOL)flipY;
@@ -613,7 +597,6 @@ SWIFT_CLASS_NAMED("NSCWebGLRenderingContext")
613
597
  - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
614
598
  @end
615
599
 
616
-
617
600
  @interface UIView (SWIFT_EXTENSION(CanvasNative))
618
601
  - (void)getBoundingClientRect:(void * _Nonnull)buffer;
619
602
  @end
@@ -181,4 +181,4 @@ void canvas_native_resize_ios_webgpu_uiview(int64_t context,
181
181
  uint32_t height);
182
182
  #endif
183
183
 
184
- #endif /* CANVAS_IOS_H */
184
+ #endif /* CANVAS_IOS_H */
@@ -1082,6 +1082,24 @@ typedef enum CanvasGPUTextureFormat_Tag {
1082
1082
  * [`Features::TEXTURE_FORMAT_NV12`] must be enabled to use this texture format.
1083
1083
  */
1084
1084
  CanvasGPUTextureFormatNV12,
1085
+ /**
1086
+ * YUV 4:2:0 chroma subsampled format.
1087
+ *
1088
+ * Contains two planes:
1089
+ * - 0: Single 16 bit channel luminance, of which only the high 10 bits
1090
+ * are used.
1091
+ * - 1: Dual 16 bit channel chrominance at half width and half height, of
1092
+ * which only the high 10 bits are used.
1093
+ *
1094
+ * Valid view formats for luminance are [`TextureFormat::R16Unorm`].
1095
+ *
1096
+ * Valid view formats for chrominance are [`TextureFormat::Rg16Unorm`].
1097
+ *
1098
+ * Width and height must be even.
1099
+ *
1100
+ * [`Features::TEXTURE_FORMAT_P010`] must be enabled to use this texture format.
1101
+ */
1102
+ CanvasGPUTextureFormatP010,
1085
1103
  /**
1086
1104
  * 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha.
1087
1105
  * [0, 63] ([0, 1] for alpha) converted to/from float [0, 1] in shader.
@@ -1362,6 +1380,14 @@ typedef struct CanvasGPUSupportedLimits {
1362
1380
  uint32_t max_subgroup_size;
1363
1381
  uint32_t max_push_constant_size;
1364
1382
  uint32_t max_non_sampler_bindings;
1383
+ uint32_t max_task_workgroup_total_count;
1384
+ uint32_t max_task_workgroups_per_dimension;
1385
+ uint32_t max_mesh_output_layers;
1386
+ uint32_t max_mesh_multiview_count;
1387
+ uint32_t max_blas_primitive_count;
1388
+ uint32_t max_blas_geometry_count;
1389
+ uint32_t max_tlas_instance_count;
1390
+ uint32_t max_acceleration_structures_per_shader_stage;
1365
1391
  } CanvasGPUSupportedLimits;
1366
1392
 
1367
1393
  typedef struct CanvasExtent3d {
@@ -5620,4 +5646,4 @@ void canvas_native_webgl2_tex_image2d_image_data(int32_t target,
5620
5646
  const struct ImageData *image_data,
5621
5647
  struct WebGLState *state);
5622
5648
 
5623
- #endif /* CANVAS_C_H */
5649
+ #endif /* CANVAS_C_H */