@rive-app/canvas-single 2.30.0 → 2.30.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rive-app/canvas-single",
3
- "version": "2.30.0",
3
+ "version": "2.30.2",
4
4
  "description": "Rive's high-level canvas based web api all in one js file.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.d.ts CHANGED
@@ -112,6 +112,10 @@ export declare enum RiveEventType {
112
112
  General = 128,
113
113
  OpenUrl = 131
114
114
  }
115
+ declare class Artboard {
116
+ nativeArtboard: rc.Artboard;
117
+ constructor(artboard: rc.Artboard);
118
+ }
115
119
  /**
116
120
  * Supported event types triggered in Rive
117
121
  */
@@ -339,6 +343,8 @@ export declare class RiveFile {
339
343
  */
340
344
  removeAllRiveEventListeners(type?: EventType): void;
341
345
  getInstance(): rc.File;
346
+ destroyIfUnused(): void;
347
+ getArtboard(name: string): Artboard | null;
342
348
  }
343
349
  export declare class Rive {
344
350
  private readonly canvas;
@@ -724,6 +730,7 @@ export declare class Rive {
724
730
  viewModelByName(name: string): ViewModel | null;
725
731
  enums(): DataEnum[];
726
732
  defaultViewModel(): ViewModel | null;
733
+ getArtboard(name: string): Artboard | null;
727
734
  }
728
735
  export declare class ViewModel {
729
736
  private _viewModel;
@@ -812,6 +819,12 @@ export declare class ViewModelInstance {
812
819
  * @param path - path to the image property
813
820
  */
814
821
  image(path: string): ViewModelInstanceAssetImage | null;
822
+ /**
823
+ * method to access an artboard property instance belonging
824
+ * to the view model instance or to a nested view model instance
825
+ * @param path - path to the image property
826
+ */
827
+ artboard(path: string): ViewModelInstanceArtboard | null;
815
828
  /**
816
829
  * method to access a view model property instance belonging
817
830
  * to the view model instance or to a nested view model instance
@@ -903,6 +916,11 @@ export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue
903
916
  set value(image: rc.Image | null);
904
917
  internalHandleCallback(callback: Function): void;
905
918
  }
919
+ export declare class ViewModelInstanceArtboard extends ViewModelInstanceValue {
920
+ constructor(instance: rc.ViewModelInstanceArtboard, root: ViewModelInstance);
921
+ set value(artboard: Artboard | null);
922
+ internalHandleCallback(callback: Function): void;
923
+ }
906
924
  /**
907
925
  * Contents of a state machine input
908
926
  */