@rive-app/canvas-advanced-single 2.37.8 → 2.38.1
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_advanced_single.mjs +11 -11
- package/package.json +1 -1
- package/rive_advanced.mjs.d.ts +24 -0
package/package.json
CHANGED
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -755,6 +755,18 @@ export interface RiveEventCustomProperties {
|
|
|
755
755
|
[key: string]: number | boolean | string;
|
|
756
756
|
}
|
|
757
757
|
|
|
758
|
+
/**
|
|
759
|
+
* Snapshot of the focus state returned by StateMachineInstance.focusState().
|
|
760
|
+
* Poll this each frame after advanceAndApply() to detect focus changes and
|
|
761
|
+
* determine whether a virtual keyboard should be shown or hidden.
|
|
762
|
+
*/
|
|
763
|
+
export interface FocusState {
|
|
764
|
+
/** True if any element currently holds focus in this state machine's active focus manager. */
|
|
765
|
+
hasFocus: boolean;
|
|
766
|
+
/** True if the focused element accepts keyboard input (e.g. a TextInput node). */
|
|
767
|
+
expectsKeyboardInput: boolean;
|
|
768
|
+
}
|
|
769
|
+
|
|
758
770
|
export declare class LinearAnimation {
|
|
759
771
|
/**
|
|
760
772
|
* The animation's loop type
|
|
@@ -894,6 +906,18 @@ export declare class StateMachineInstance {
|
|
|
894
906
|
*/
|
|
895
907
|
focusPrevious(): boolean;
|
|
896
908
|
|
|
909
|
+
/**
|
|
910
|
+
* Clear focus from the Rive focus tree.
|
|
911
|
+
*/
|
|
912
|
+
clearFocus(): void;
|
|
913
|
+
|
|
914
|
+
/**
|
|
915
|
+
* Returns metadata about current focus state:
|
|
916
|
+
* 1. Whether any node in the focus tree is currently focused
|
|
917
|
+
* 2. Whether the currently focused node expects keyboard input (i.e. keyboard/text input listener)
|
|
918
|
+
*/
|
|
919
|
+
focusState(): FocusState;
|
|
920
|
+
|
|
897
921
|
/**
|
|
898
922
|
* Deletes the underlying instance created via the WASM. It's important to clean up this instance
|
|
899
923
|
* when no longer in use
|