@reactvision/react-viro 2.43.3 → 2.43.4
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/README.md +18 -13
- package/android/react_viro/react_viro-release.aar +0 -0
- package/android/viro_renderer/viro_renderer-release.aar +0 -0
- package/components/AR/ViroARPlaneSelector.tsx +1 -1
- package/components/AR/ViroARSceneNavigator.tsx +16 -17
- package/components/Utilities/ViroVersion.ts +1 -1
- package/components/ViroVRSceneNavigator.tsx +1 -1
- package/dist/components/AR/ViroARPlaneSelector.d.ts +1 -1
- package/dist/components/AR/ViroARSceneNavigator.d.ts +9 -9
- package/dist/components/AR/ViroARSceneNavigator.js +11 -11
- package/dist/components/Utilities/ViroVersion.d.ts +1 -1
- package/dist/components/Utilities/ViroVersion.js +1 -1
- package/dist/components/ViroVRSceneNavigator.d.ts +1 -1
- package/dist/dynamic-index.d.ts +11 -0
- package/dist/dynamic-index.js +28 -0
- package/dist/plugins/withViro.d.ts +3 -0
- package/dist/plugins/withViro.js +19 -0
- package/dist/plugins/withViroAndroid.js +33 -69
- package/dist/plugins/withViroIos.js +20 -2
- package/ios/ViroReact.podspec +49 -11
- package/ios/dist/ViroRenderer/ViroKit.framework/Headers/VROBodyMesher.h +1 -0
- package/ios/dist/ViroRenderer/ViroKit.framework/Headers/VROVideoTextureCache.h +1 -0
- package/ios/dist/ViroRenderer/ViroKit.framework/Headers/ViroKit.h +11 -0
- package/ios/dist/ViroRenderer/ViroKit.framework/Info.plist +0 -0
- package/ios/dist/ViroRenderer/ViroKit.framework/ViroKit +0 -0
- package/ios/dist/ViroRenderer/ViroKit.framework/bodymesh.mlmodelc/metadata.json +14 -11
- package/ios/dist/ViroRenderer/ViroKit.framework/hourglass_2_1.mlmodelc/metadata.json +12 -9
- package/ios/dist/ViroRenderer/ViroKit.framework/hourglass_2_1_ds_t.mlmodelc/metadata.json +12 -9
- package/ios/dist/ViroRenderer/ViroKit.framework/hourglass_2_1_t.mlmodelc/metadata.json +12 -9
- package/ios/dist/ViroRenderer/ViroKit.podspec +4 -4
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/Headers/VROBodyMesher.h +1 -0
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/Headers/VROVideoTextureCache.h +1 -0
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/Headers/ViroKit.h +11 -0
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/Info.plist +0 -0
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/ViroKit +0 -0
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/bodymesh.mlmodelc/metadata.json +14 -11
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/hourglass_2_1.mlmodelc/metadata.json +12 -9
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/hourglass_2_1_ds_t.mlmodelc/metadata.json +12 -9
- package/ios/dist/ViroRenderer/armv7_arm64/ViroKit.framework/hourglass_2_1_t.mlmodelc/metadata.json +12 -9
- package/ios/dist/armv7_arm64/libViroReact.a +0 -0
- package/ios/dist/lib/libViroReact.a +0 -0
- package/package.json +15 -9
- package/scripts/copy-types.js +46 -0
- package/dist/components/Telemetry/ViroTelemetry.d.ts +0 -16
- package/dist/components/Telemetry/ViroTelemetry.js +0 -87
- package/dist/components/Telemetry/index.d.ts +0 -16
- package/dist/components/Telemetry/index.js +0 -97
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare class ViroTelemetry {
|
|
2
|
-
private static _isDisabled;
|
|
3
|
-
private static _isDebugging;
|
|
4
|
-
private static _telemetryUrl;
|
|
5
|
-
private static _timeout;
|
|
6
|
-
/**
|
|
7
|
-
* Allow a user to start debugging the telemetry to see what is sent.
|
|
8
|
-
*/
|
|
9
|
-
static setDebugging(): void;
|
|
10
|
-
/**
|
|
11
|
-
* Allow a user to opt out of telemetry.
|
|
12
|
-
*/
|
|
13
|
-
static optOutTelemetry(): void;
|
|
14
|
-
static recordTelemetry(eventName: string, payload?: any): void;
|
|
15
|
-
private static getAnonymousMeta;
|
|
16
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ViroTelemetry = void 0;
|
|
4
|
-
const ViroVersion_1 = require("../Utilities/ViroVersion");
|
|
5
|
-
const react_native_1 = require("react-native");
|
|
6
|
-
class ViroTelemetry {
|
|
7
|
-
static _isDisabled = false;
|
|
8
|
-
static _isDebugging = false;
|
|
9
|
-
// TODO: use custom domain
|
|
10
|
-
// private static _telemetryUrl = "https://telemetry.reactvision.org";
|
|
11
|
-
static _telemetryUrl = "https://telemetry.reactvision.org";
|
|
12
|
-
static _timeout = 8000;
|
|
13
|
-
/**
|
|
14
|
-
* Allow a user to start debugging the telemetry to see what is sent.
|
|
15
|
-
*/
|
|
16
|
-
static setDebugging() {
|
|
17
|
-
this._isDebugging = true;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Allow a user to opt out of telemetry.
|
|
21
|
-
*/
|
|
22
|
-
static optOutTelemetry() {
|
|
23
|
-
this._isDisabled = true;
|
|
24
|
-
}
|
|
25
|
-
static recordTelemetry(eventName, payload = {}) {
|
|
26
|
-
// Skip recording telemetry if the feature is disabled
|
|
27
|
-
if (this._isDisabled) return;
|
|
28
|
-
// Do not send the telemetry data if debugging. Users may use this feature
|
|
29
|
-
// to preview what data would be sent.
|
|
30
|
-
if (this._isDebugging) {
|
|
31
|
-
console.log(
|
|
32
|
-
`[telemetry] ` + JSON.stringify({ eventName, payload }, null, 2)
|
|
33
|
-
);
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
const controller = new AbortController();
|
|
37
|
-
const timeoutId = setTimeout(() => controller.abort(), this._timeout);
|
|
38
|
-
payload = { ...payload, ...this.getAnonymousMeta() };
|
|
39
|
-
fetch(`${this._telemetryUrl}/api/v1/record`, {
|
|
40
|
-
method: "PUT",
|
|
41
|
-
body: JSON.stringify({ eventName, payload }),
|
|
42
|
-
headers: { "content-type": "application/json" },
|
|
43
|
-
signal: controller.signal,
|
|
44
|
-
})
|
|
45
|
-
.catch((e) => console.error(e))
|
|
46
|
-
.finally(() => clearTimeout(timeoutId));
|
|
47
|
-
}
|
|
48
|
-
static getAnonymousMeta() {
|
|
49
|
-
let isExpo = false;
|
|
50
|
-
try {
|
|
51
|
-
const myModule = require("expo");
|
|
52
|
-
isExpo = true;
|
|
53
|
-
} catch (err) {
|
|
54
|
-
// send error to log file
|
|
55
|
-
}
|
|
56
|
-
try {
|
|
57
|
-
const traits = {
|
|
58
|
-
// expo
|
|
59
|
-
isExpo:
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
Boolean(window?.expo) || false,
|
|
62
|
-
sdkVersion:
|
|
63
|
-
// @ts-ignore
|
|
64
|
-
window?.expo?.modules?.ExponentConstants?.sdkVersion || undefined,
|
|
65
|
-
androidPackage:
|
|
66
|
-
// @ts-ignore
|
|
67
|
-
window?.expo?.modules?.ExponentConstants?.android?.package ||
|
|
68
|
-
undefined,
|
|
69
|
-
iosBundleIdentifier:
|
|
70
|
-
// @ts-ignore
|
|
71
|
-
window?.expo?.modules?.ExponentConstants?.ios?.bundleIdentifier ||
|
|
72
|
-
undefined,
|
|
73
|
-
expoDebugMode:
|
|
74
|
-
// @ts-ignore
|
|
75
|
-
window?.expo?.modules?.ExponentConstants?.debugMode || undefined,
|
|
76
|
-
isDevice:
|
|
77
|
-
// @ts-ignore
|
|
78
|
-
window?.expo?.modules?.ExponentConstants?.isDevice || undefined,
|
|
79
|
-
// library version
|
|
80
|
-
viroVersion: ViroVersion_1.VIRO_VERSION,
|
|
81
|
-
platform: react_native_1.Platform.OS,
|
|
82
|
-
deviceOsVersion: react_native_1.Platform.Version,
|
|
83
|
-
reactNativeVersion:
|
|
84
|
-
react_native_1.Platform.constants.reactNativeVersion.major +
|
|
85
|
-
"." +
|
|
86
|
-
react_native_1.Platform.constants.reactNativeVersion.minor +
|
|
87
|
-
"." +
|
|
88
|
-
react_native_1.Platform.constants.reactNativeVersion.patch,
|
|
89
|
-
};
|
|
90
|
-
return traits;
|
|
91
|
-
} catch (e) {
|
|
92
|
-
console.error(e);
|
|
93
|
-
}
|
|
94
|
-
return {};
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
exports.ViroTelemetry = ViroTelemetry;
|