@rive-app/canvas-single 2.30.1 → 2.30.3

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.1",
3
+ "version": "2.30.3",
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
  */
@@ -340,6 +344,7 @@ export declare class RiveFile {
340
344
  removeAllRiveEventListeners(type?: EventType): void;
341
345
  getInstance(): rc.File;
342
346
  destroyIfUnused(): void;
347
+ getArtboard(name: string): Artboard | null;
343
348
  }
344
349
  export declare class Rive {
345
350
  private readonly canvas;
@@ -725,6 +730,7 @@ export declare class Rive {
725
730
  viewModelByName(name: string): ViewModel | null;
726
731
  enums(): DataEnum[];
727
732
  defaultViewModel(): ViewModel | null;
733
+ getArtboard(name: string): Artboard | null;
728
734
  }
729
735
  export declare class ViewModel {
730
736
  private _viewModel;
@@ -813,6 +819,12 @@ export declare class ViewModelInstance {
813
819
  * @param path - path to the image property
814
820
  */
815
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;
816
828
  /**
817
829
  * method to access a view model property instance belonging
818
830
  * to the view model instance or to a nested view model instance
@@ -904,6 +916,11 @@ export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue
904
916
  set value(image: rc.Image | null);
905
917
  internalHandleCallback(callback: Function): void;
906
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
+ }
907
924
  /**
908
925
  * Contents of a state machine input
909
926
  */