@rive-app/canvas 2.27.3 → 2.27.5

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",
3
- "version": "2.27.3",
3
+ "version": "2.27.5",
4
4
  "description": "Rive's canvas based web api.",
5
5
  "main": "rive.js",
6
6
  "homepage": "https://rive.app",
package/rive.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import * as rc from "./rive_advanced.mjs";
2
+ export type AssetLoadCallback = (asset: rc.FileAsset, bytes: Uint8Array) => Boolean;
2
3
  export type { FileAsset, AudioAsset, FontAsset, ImageAsset, } from "./rive_advanced.mjs";
3
4
  /**
4
5
  * Generic type for a parameterless void callback
5
6
  */
6
7
  export type VoidCallback = () => void;
7
- export type AssetLoadCallback = (asset: rc.FileAsset, bytes: Uint8Array) => Boolean;
8
8
  interface SetupRiveListenersOptions {
9
9
  isTouchScrollEnabled?: boolean;
10
10
  }
@@ -805,6 +805,12 @@ export declare class ViewModelInstance {
805
805
  * @param path - path to the list property
806
806
  */
807
807
  list(path: string): ViewModelInstanceList | null;
808
+ /**
809
+ * method to access a view model property instance belonging
810
+ * to the view model instance or to a nested view model instance
811
+ * @param path - path to the image property
812
+ */
813
+ image(path: string): ViewModelInstanceAssetImage | null;
808
814
  /**
809
815
  * method to access a view model property instance belonging
810
816
  * to the view model instance or to a nested view model instance
@@ -889,6 +895,11 @@ export declare class ViewModelInstanceColor extends ViewModelInstanceValue {
889
895
  opacity(o: number): void;
890
896
  internalHandleCallback(callback: Function): void;
891
897
  }
898
+ export declare class ViewModelInstanceAssetImage extends ViewModelInstanceValue {
899
+ constructor(instance: rc.ViewModelInstanceAssetImage, root: ViewModelInstance);
900
+ set value(image: rc.Image);
901
+ internalHandleCallback(callback: Function): void;
902
+ }
892
903
  /**
893
904
  * Contents of a state machine input
894
905
  */