@rive-app/canvas-lite 2.37.7 → 2.37.8
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 +1 -1
- package/rive.d.ts +16 -0
- package/rive.js +184 -24
- package/rive.js.map +1 -1
- package/rive.wasm +0 -0
- package/rive_advanced.mjs.d.ts +17 -0
- package/rive_fallback.wasm +0 -0
- package/utils/index.d.ts +2 -0
- package/utils/registerKeyboardInteractions.d.ts +22 -0
package/rive.wasm
CHANGED
|
Binary file
|
package/rive_advanced.mjs.d.ts
CHANGED
|
@@ -877,6 +877,23 @@ export declare class StateMachineInstance {
|
|
|
877
877
|
*/
|
|
878
878
|
pointerExit(x: number, y: number, id: number): void;
|
|
879
879
|
|
|
880
|
+
/**
|
|
881
|
+
* Returns true if this state machine has any focus nodes registered in its focus tree.
|
|
882
|
+
* Since the focus tree is unified across nested artboards, this covers the full scene.
|
|
883
|
+
* Use this to gate whether tab/focus traversal DOM listeners should be attached.
|
|
884
|
+
*/
|
|
885
|
+
hasFocusNodes(): boolean;
|
|
886
|
+
|
|
887
|
+
/**
|
|
888
|
+
* Move focus to the next focusable node in the focus tree via the state machine's focus manager.
|
|
889
|
+
*/
|
|
890
|
+
focusNext(): boolean;
|
|
891
|
+
|
|
892
|
+
/**
|
|
893
|
+
* Move focus to the previous focusable node in the focus tree via the state machine's focus manager.
|
|
894
|
+
*/
|
|
895
|
+
focusPrevious(): boolean;
|
|
896
|
+
|
|
880
897
|
/**
|
|
881
898
|
* Deletes the underlying instance created via the WASM. It's important to clean up this instance
|
|
882
899
|
* when no longer in use
|
package/rive_fallback.wasm
CHANGED
|
Binary file
|
package/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export { registerTouchInteractions } from "./registerTouchInteractions";
|
|
2
|
+
export { registerKeyboardInteractions } from "./registerKeyboardInteractions";
|
|
3
|
+
export type { KeyboardInteractionsParams } from "./registerKeyboardInteractions";
|
|
2
4
|
export { BLANK_URL, sanitizeUrl } from "./sanitizeUrl";
|
|
3
5
|
export { Finalizable, ImageWrapper, AudioWrapper, FontWrapper, FileAssetWrapper, ImageAssetWrapper, AudioAssetWrapper, FontAssetWrapper, finalizationRegistry, CustomFileAssetLoaderWrapper, AssetLoadCallbackWrapper, FileFinalizer, createFinalization, } from "./finalizationRegistry";
|
|
4
6
|
export { RiveFont } from "./riveFont";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as rc from "../rive_advanced.mjs";
|
|
2
|
+
export interface KeyboardInteractionsParams {
|
|
3
|
+
canvas: HTMLCanvasElement;
|
|
4
|
+
stateMachine: rc.StateMachineInstance;
|
|
5
|
+
rive: rc.RiveCanvas;
|
|
6
|
+
/**
|
|
7
|
+
* Whether this canvas has focus nodes that should participate in tab traversal.
|
|
8
|
+
* When true, Tab/Shift+Tab will be intercepted and routed to the Rive focus manager.
|
|
9
|
+
* focusNext() returning false means no more traversable nodes — tab is released to the page.
|
|
10
|
+
*/
|
|
11
|
+
hasFocusNodes: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Registers focus and tab-traversal event handlers on the canvas to route
|
|
15
|
+
* Tab/Shift+Tab to the active Rive state machine's focus manager.
|
|
16
|
+
*
|
|
17
|
+
* Mirrors registerTouchInteractions for pointer events.
|
|
18
|
+
*
|
|
19
|
+
* Returns a cleanup function that removes all registered event listeners,
|
|
20
|
+
* or null if the setup conditions are not met.
|
|
21
|
+
*/
|
|
22
|
+
export declare const registerKeyboardInteractions: ({ canvas, stateMachine, rive, hasFocusNodes, }: KeyboardInteractionsParams) => (() => void) | null;
|