Skip to content

Commit f52f5df

Browse files
v2.43.1 -> v2.43.2 (#360)
* update: fix ViroReact.podspec * update: fix expo plugin for Android * update: generate dist and fix broken events * Update withViroAndroid.ts * update: fix android building issues
1 parent ac4f416 commit f52f5df

File tree

17 files changed

+786
-410
lines changed

17 files changed

+786
-410
lines changed

android/settings.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@ pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
22
plugins { id("com.facebook.react.settings") }
33
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
44
includeBuild("../node_modules/@react-native/gradle-plugin")
5-
include ':gvr_common', ':viro_bridge', ':viro_renderer', ':arcore_client', ':fabric-interop'
6-
project(':fabric-interop').projectDir = new File(rootProject.projectDir, '../fabric-interop/android')
5+
include ':gvr_common', ':viro_bridge', ':viro_renderer', ':arcore_client'
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VIRO_VERSION = "2.43.1";
1+
export const VIRO_VERSION = "2.43.2";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export declare const VIRO_VERSION = "2.43.1";
1+
export declare const VIRO_VERSION = "2.43.2";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
"use strict";
22
Object.defineProperty(exports, "__esModule", { value: true });
33
exports.VIRO_VERSION = void 0;
4-
exports.VIRO_VERSION = "2.43.1";
4+
exports.VIRO_VERSION = "2.43.2";
Lines changed: 63 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,102 @@
1-
declare const _default: ViroEventsManager;
2-
export default _default;
1+
/**
2+
* ViroEventsManager.ts
3+
* TypeScript integration for ViroEventsTurboModule
4+
*
5+
* This module provides the TypeScript interface for handling
6+
* Viro JSI events through the TurboModule system
7+
*/
8+
interface EventData {
9+
[key: string]: any;
10+
}
11+
type EventCallback = (data: EventData) => void;
12+
type JSICallback = (data?: EventData) => void;
313
declare class ViroEventsManager {
4-
eventEmitter: NativeEventEmitter;
5-
listeners: Map<any, any>;
6-
callbackRegistry: Map<any, any>;
7-
setupEventListeners(): void;
14+
private eventEmitter;
15+
private listeners;
16+
private callbackRegistry;
17+
constructor();
18+
private setupEventListeners;
819
/**
920
* Register a callback for JSI events
10-
* @param {string} callbackId - The callback ID from JSI
11-
* @param {function} callback - The JavaScript callback function
21+
* @param callbackId - The callback ID from JSI
22+
* @param callback - The JavaScript callback function
1223
*/
13-
registerJSICallback(callbackId: string, callback: Function): void;
24+
registerJSICallback(callbackId: string, callback: JSICallback): void;
1425
/**
1526
* Unregister a JSI callback
16-
* @param {string} callbackId - The callback ID to remove
27+
* @param callbackId - The callback ID to unregister
1728
*/
1829
unregisterJSICallback(callbackId: string): void;
1930
/**
20-
* Register a listener for node events
21-
* @param {string} nodeId - The node ID
22-
* @param {string} eventName - The event name
23-
* @param {function} callback - The callback function
31+
* Handle incoming JSI callbacks
32+
* @param event - The callback event
2433
*/
25-
registerNodeEventListener(nodeId: string, eventName: string, callback: Function): void;
34+
private handleJSICallback;
2635
/**
27-
* Register a listener for scene events
28-
* @param {string} sceneId - The scene ID
29-
* @param {string} eventName - The event name
30-
* @param {function} callback - The callback function
36+
* Register an event listener for a specific node
37+
* @param nodeId - The node ID
38+
* @param eventName - The event name
39+
* @param callback - The callback function
40+
* @returns The listener key for removal
3141
*/
32-
registerSceneEventListener(sceneId: string, eventName: string, callback: Function): void;
42+
registerNodeEventListener(nodeId: string, eventName: string, callback: EventCallback): string;
3343
/**
34-
* Handle JSI callback events
35-
* @private
44+
* Unregister a node event listener
45+
* @param listenerKey - The listener key returned from registration
3646
*/
37-
private handleJSICallback;
47+
unregisterNodeEventListener(listenerKey: string): void;
3848
/**
39-
* Handle node events
40-
* @private
49+
* Handle incoming node events
50+
* @param event - The node event
4151
*/
4252
private handleNodeEvent;
4353
/**
44-
* Handle scene events
45-
* @private
54+
* Register an event listener for a specific scene
55+
* @param sceneId - The scene ID
56+
* @param eventName - The event name
57+
* @param callback - The callback function
58+
* @returns The listener key for removal
4659
*/
47-
private handleSceneEvent;
60+
registerSceneEventListener(sceneId: string, eventName: string, callback: EventCallback): string;
4861
/**
49-
* Check if the event system is ready
50-
* @returns {boolean}
62+
* Unregister a scene event listener
63+
* @param listenerKey - The listener key returned from registration
5164
*/
52-
isEventSystemReady(): boolean;
65+
unregisterSceneEventListener(listenerKey: string): void;
66+
/**
67+
* Handle incoming scene events
68+
* @param event - The scene event
69+
*/
70+
private handleSceneEvent;
5371
/**
5472
* Get the number of active listeners
55-
* @returns {number}
73+
* @returns The count of active listeners
5674
*/
5775
getActiveListenerCount(): number;
5876
/**
5977
* Manually emit a JSI callback (for testing)
60-
* @param {string} callbackId - The callback ID
61-
* @param {object} eventData - The event data
78+
* @param callbackId - The callback ID
79+
* @param eventData - The event data
6280
*/
63-
emitJSICallback(callbackId: string, eventData?: object): void;
81+
emitJSICallback(callbackId: string, eventData?: EventData): void;
6482
/**
6583
* Manually emit a node event (for testing)
66-
* @param {string} nodeId - The node ID
67-
* @param {string} eventName - The event name
68-
* @param {object} eventData - The event data
84+
* @param nodeId - The node ID
85+
* @param eventName - The event name
86+
* @param eventData - The event data
6987
*/
70-
emitNodeEvent(nodeId: string, eventName: string, eventData?: object): void;
88+
emitNodeEvent(nodeId: string, eventName: string, eventData?: EventData): void;
7189
/**
7290
* Manually emit a scene event (for testing)
73-
* @param {string} sceneId - The scene ID
74-
* @param {string} eventName - The event name
75-
* @param {object} eventData - The event data
91+
* @param sceneId - The scene ID
92+
* @param eventName - The event name
93+
* @param eventData - The event data
7694
*/
77-
emitSceneEvent(sceneId: string, eventName: string, eventData?: object): void;
95+
emitSceneEvent(sceneId: string, eventName: string, eventData?: EventData): void;
7896
/**
7997
* Clean up all listeners and callbacks
8098
*/
8199
cleanup(): void;
82100
}
83-
import { NativeEventEmitter } from "react-native";
101+
declare const _default: ViroEventsManager;
102+
export default _default;

0 commit comments

Comments
 (0)