@series-inc/venus-sdk 3.3.0 → 3.4.0-beta.0

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.
Files changed (41) hide show
  1. package/dist/{AdsApi-OXtzPhiB.d.mts → AdsApi-CrobHGGD.d.ts} +2 -1
  2. package/dist/{chunk-QABXMFND.mjs → chunk-3APM3V2M.js} +2 -2
  3. package/dist/chunk-3APM3V2M.js.map +1 -0
  4. package/dist/{chunk-UXY5CKKG.mjs → chunk-3UPXLWK7.js} +3 -3
  5. package/dist/chunk-3UPXLWK7.js.map +1 -0
  6. package/dist/{chunk-FFDRA6ET.mjs → chunk-RUYSUI26.js} +176 -179
  7. package/dist/chunk-RUYSUI26.js.map +1 -0
  8. package/dist/core-NMKO2UFW.js +3 -0
  9. package/dist/{core-62LWDHN7.mjs.map → core-NMKO2UFW.js.map} +1 -1
  10. package/dist/index.d.ts +3 -2
  11. package/dist/{index.mjs → index.js} +5 -6
  12. package/dist/{index.mjs.map → index.js.map} +1 -1
  13. package/dist/venus-api/index.d.ts +2 -2
  14. package/dist/venus-api/{index.mjs → index.js} +20 -34
  15. package/dist/venus-api/index.js.map +1 -0
  16. package/dist/vite/{index.mjs → index.js} +2 -2
  17. package/dist/vite/index.js.map +1 -0
  18. package/dist/webview/index.js +3 -0
  19. package/dist/webview/{index.mjs.map → index.js.map} +1 -1
  20. package/package.json +13 -18
  21. package/dist/AdsApi-OXtzPhiB.d.ts +0 -1551
  22. package/dist/chunk-FFDRA6ET.mjs.map +0 -1
  23. package/dist/chunk-NSSMTXJJ.mjs +0 -7
  24. package/dist/chunk-NSSMTXJJ.mjs.map +0 -1
  25. package/dist/chunk-QABXMFND.mjs.map +0 -1
  26. package/dist/chunk-UXY5CKKG.mjs.map +0 -1
  27. package/dist/core-62LWDHN7.mjs +0 -4
  28. package/dist/index.cjs +0 -5273
  29. package/dist/index.cjs.map +0 -1
  30. package/dist/index.d.mts +0 -904
  31. package/dist/venus-api/index.cjs +0 -7186
  32. package/dist/venus-api/index.cjs.map +0 -1
  33. package/dist/venus-api/index.d.mts +0 -15
  34. package/dist/venus-api/index.mjs.map +0 -1
  35. package/dist/vite/index.cjs +0 -554
  36. package/dist/vite/index.cjs.map +0 -1
  37. package/dist/vite/index.mjs.map +0 -1
  38. package/dist/webview/index.cjs +0 -15
  39. package/dist/webview/index.cjs.map +0 -1
  40. package/dist/webview/index.d.mts +0 -15
  41. package/dist/webview/index.mjs +0 -4
@@ -1,5 +1,4 @@
1
- import { createMockDelay, MOCK_DELAYS, isWebPlatform } from './chunk-QABXMFND.mjs';
2
- import { __publicField } from './chunk-NSSMTXJJ.mjs';
1
+ import { createMockDelay, MOCK_DELAYS, isWebPlatform } from './chunk-3APM3V2M.js';
3
2
 
4
3
  // src/VenusMessageId.ts
5
4
  var VenusMessageId = /* @__PURE__ */ ((VenusMessageId2) => {
@@ -127,8 +126,8 @@ var VenusMessageId = /* @__PURE__ */ ((VenusMessageId2) => {
127
126
 
128
127
  // src/ads/RpcAdsApi.ts
129
128
  var RpcAdsApi = class {
129
+ rpcClient;
130
130
  constructor(rpcClient) {
131
- __publicField(this, "rpcClient");
132
131
  this.rpcClient = rpcClient;
133
132
  }
134
133
  async showInterstitialAd(options) {
@@ -165,8 +164,8 @@ ${resultAsString}`
165
164
 
166
165
  // src/ads/MockAdsApi.ts
167
166
  var MockAdsApi = class {
167
+ mockOverlay;
168
168
  constructor(mockOverlay) {
169
- __publicField(this, "mockOverlay");
170
169
  this.mockOverlay = mockOverlay;
171
170
  }
172
171
  async isRewardedAdReadyAsync() {
@@ -202,8 +201,8 @@ function initializeAds(venusApiInstance, host) {
202
201
 
203
202
  // src/ai/RpcAiApi.ts
204
203
  var RpcAiApi = class {
204
+ rpcClient;
205
205
  constructor(rpcClient) {
206
- __publicField(this, "rpcClient");
207
206
  this.rpcClient = rpcClient;
208
207
  }
209
208
  async requestChatCompletionAsync(request) {
@@ -283,8 +282,8 @@ var MockAnalyticsApi = class {
283
282
 
284
283
  // src/analytics/RpcAnalyticsApi.ts
285
284
  var RpcAnalyticsApi = class {
285
+ rpcClient;
286
286
  constructor(rpcClient) {
287
- __publicField(this, "rpcClient");
288
287
  this.rpcClient = rpcClient;
289
288
  }
290
289
  async recordCustomEvent(eventName, payload) {
@@ -322,10 +321,10 @@ function initializeAnalytics(venusApiInstance, host) {
322
321
 
323
322
  // src/avatar3d/MockAvatarApi.ts
324
323
  var MockAvatarApi = class {
324
+ _venusApi;
325
+ cachedAssets = null;
326
+ cachedVersion = "";
325
327
  constructor(venusApi) {
326
- __publicField(this, "_venusApi");
327
- __publicField(this, "cachedAssets", null);
328
- __publicField(this, "cachedVersion", "");
329
328
  this._venusApi = venusApi;
330
329
  }
331
330
  downloadAssetPaths() {
@@ -690,9 +689,9 @@ var MockAvatarApi = class {
690
689
 
691
690
  // src/avatar3d/RpcAvatarApi.ts
692
691
  var RpcAvatarApi = class {
692
+ venusApi;
693
+ rpcClient;
693
694
  constructor(rpcClient, venusApi) {
694
- __publicField(this, "venusApi");
695
- __publicField(this, "rpcClient");
696
695
  this.rpcClient = rpcClient;
697
696
  this.venusApi = venusApi;
698
697
  }
@@ -828,8 +827,8 @@ function initializeAvatar3d(venusApi, host) {
828
827
 
829
828
  // src/cdn/HostCdnApi.ts
830
829
  var HostCdnApi = class {
830
+ baseUrl;
831
831
  constructor(baseUrl) {
832
- __publicField(this, "baseUrl");
833
832
  this.baseUrl = baseUrl.endsWith("/") ? baseUrl.slice(0, -1) : baseUrl;
834
833
  }
835
834
  async fetchBlob(path, options) {
@@ -899,8 +898,8 @@ var HostCdnApi = class {
899
898
 
900
899
  // src/cdn/MockCdnApi.ts
901
900
  var MockCdnApi = class {
901
+ venusApi;
902
902
  constructor(venusApi) {
903
- __publicField(this, "venusApi");
904
903
  this.venusApi = venusApi;
905
904
  }
906
905
  get baseUrl() {
@@ -1071,8 +1070,8 @@ function initializeCdn(venusApi, host) {
1071
1070
 
1072
1071
  // src/device/HostDeviceApi.ts
1073
1072
  var HostDeviceApi = class {
1073
+ venusApi;
1074
1074
  constructor(venusApi) {
1075
- __publicField(this, "venusApi");
1076
1075
  this.venusApi = venusApi;
1077
1076
  }
1078
1077
  getDevice() {
@@ -1088,8 +1087,8 @@ var HostDeviceApi = class {
1088
1087
 
1089
1088
  // src/device/MockDeviceApi.ts
1090
1089
  var MockDeviceApi = class {
1090
+ venusApi;
1091
1091
  constructor(venusApi) {
1092
- __publicField(this, "venusApi");
1093
1092
  this.venusApi = venusApi;
1094
1093
  }
1095
1094
  getDevice() {
@@ -1114,8 +1113,8 @@ var MockDeviceApi = class {
1114
1113
 
1115
1114
  // src/environment/HostEnvironmentApi.ts
1116
1115
  var HostEnvironmentApi = class {
1116
+ venusApi;
1117
1117
  constructor(venusApi) {
1118
- __publicField(this, "venusApi");
1119
1118
  this.venusApi = venusApi;
1120
1119
  }
1121
1120
  getEnvironment() {
@@ -1131,8 +1130,8 @@ var HostEnvironmentApi = class {
1131
1130
 
1132
1131
  // src/environment/MockEnvironmentApi.ts
1133
1132
  var MockEnvironmentApi = class {
1133
+ venusApi;
1134
1134
  constructor(venusApi) {
1135
- __publicField(this, "venusApi");
1136
1135
  this.venusApi = venusApi;
1137
1136
  }
1138
1137
  getEnvironment() {
@@ -1163,10 +1162,10 @@ var MockEnvironmentApi = class {
1163
1162
 
1164
1163
  // src/system/HostSystemApi.ts
1165
1164
  var HostSystemApi = class {
1165
+ deviceApi;
1166
+ environmentApi;
1167
+ venusApi;
1166
1168
  constructor(deviceApi, environmentApi, venusApi) {
1167
- __publicField(this, "deviceApi");
1168
- __publicField(this, "environmentApi");
1169
- __publicField(this, "venusApi");
1170
1169
  this.deviceApi = deviceApi;
1171
1170
  this.environmentApi = environmentApi;
1172
1171
  this.venusApi = venusApi;
@@ -1210,10 +1209,10 @@ var HostSystemApi = class {
1210
1209
 
1211
1210
  // src/system/MockSystemApi.ts
1212
1211
  var MockSystemApi = class {
1212
+ deviceApi;
1213
+ environmentApi;
1214
+ venusApi;
1213
1215
  constructor(deviceApi, environmentApi, venusApi) {
1214
- __publicField(this, "deviceApi");
1215
- __publicField(this, "environmentApi");
1216
- __publicField(this, "venusApi");
1217
1216
  this.deviceApi = deviceApi;
1218
1217
  this.environmentApi = environmentApi;
1219
1218
  this.venusApi = venusApi;
@@ -1277,8 +1276,8 @@ function initializeSystem(venusApi, host) {
1277
1276
 
1278
1277
  // src/features/RpcFeaturesApi.ts
1279
1278
  var RpcFeaturesApi = class {
1279
+ rpcClient;
1280
1280
  constructor(rcpClient) {
1281
- __publicField(this, "rpcClient");
1282
1281
  this.rpcClient = rcpClient;
1283
1282
  }
1284
1283
  async getExperiment(experimentName) {
@@ -1340,8 +1339,8 @@ var HapticFeedbackStyle = /* @__PURE__ */ ((HapticFeedbackStyle2) => {
1340
1339
 
1341
1340
  // src/haptics/RpcHapticsApi.ts
1342
1341
  var RpcHapticsApi = class {
1342
+ rpcClient;
1343
1343
  constructor(rpcClient) {
1344
- __publicField(this, "rpcClient");
1345
1344
  this.rpcClient = rpcClient;
1346
1345
  }
1347
1346
  async triggerHapticAsync(style) {
@@ -1353,8 +1352,8 @@ var RpcHapticsApi = class {
1353
1352
 
1354
1353
  // src/haptics/MockHapticsApi.ts
1355
1354
  var MockHapticsApi = class {
1355
+ venusApi;
1356
1356
  constructor(venusApi) {
1357
- __publicField(this, "venusApi");
1358
1357
  this.venusApi = venusApi;
1359
1358
  }
1360
1359
  async triggerHapticAsync(style) {
@@ -1374,8 +1373,8 @@ function initializeHaptics(venusApi, host) {
1374
1373
 
1375
1374
  // src/iap/RpcIapApi.ts
1376
1375
  var RpcIapApi = class {
1376
+ rpcClient;
1377
1377
  constructor(rpcClient) {
1378
- __publicField(this, "rpcClient");
1379
1378
  this.rpcClient = rpcClient;
1380
1379
  }
1381
1380
  async getHardCurrencyBalance() {
@@ -1407,9 +1406,7 @@ var mockCurrencyIconBase64 = "iVBORw0KGgoAAAANSUhEUgAAAlgAAAJYCAYAAAC+ZpjcAAEQZE
1407
1406
 
1408
1407
  // src/iap/MockIapApi.ts
1409
1408
  var MockIapApi = class {
1410
- constructor() {
1411
- __publicField(this, "_hardCurrency", 100);
1412
- }
1409
+ _hardCurrency = 100;
1413
1410
  get hardCurrency() {
1414
1411
  return this._hardCurrency;
1415
1412
  }
@@ -1448,13 +1445,11 @@ function initializeIap(venusApiInstance, host) {
1448
1445
 
1449
1446
  // src/lifecycles/MockLifecycleApi.ts
1450
1447
  var MockLifecycleApi = class {
1451
- constructor() {
1452
- __publicField(this, "pauseCallbacks", /* @__PURE__ */ new Set());
1453
- __publicField(this, "resumeCallbacks", /* @__PURE__ */ new Set());
1454
- __publicField(this, "awakeCallbacks", /* @__PURE__ */ new Set());
1455
- __publicField(this, "sleepCallbacks", /* @__PURE__ */ new Set());
1456
- __publicField(this, "quitCallbacks", /* @__PURE__ */ new Set());
1457
- }
1448
+ pauseCallbacks = /* @__PURE__ */ new Set();
1449
+ resumeCallbacks = /* @__PURE__ */ new Set();
1450
+ awakeCallbacks = /* @__PURE__ */ new Set();
1451
+ sleepCallbacks = /* @__PURE__ */ new Set();
1452
+ quitCallbacks = /* @__PURE__ */ new Set();
1458
1453
  onSleep(callback) {
1459
1454
  this.sleepCallbacks.add(callback);
1460
1455
  return {
@@ -1524,8 +1519,8 @@ var MockLifecycleApi = class {
1524
1519
 
1525
1520
  // src/lifecycles/RpcLifecycleApi.ts
1526
1521
  var RpcLifecycleApi = class {
1522
+ rpcClient;
1527
1523
  constructor(rpcClient) {
1528
- __publicField(this, "rpcClient");
1529
1524
  this.rpcClient = rpcClient;
1530
1525
  }
1531
1526
  onQuit(callback) {
@@ -1562,9 +1557,9 @@ var MockLoggingApi = class {
1562
1557
 
1563
1558
  // src/logging/RpcLoggingApi.ts
1564
1559
  var RpcLoggingApi = class {
1560
+ host;
1561
+ rpcClient;
1565
1562
  constructor(host, rpcClient) {
1566
- __publicField(this, "host");
1567
- __publicField(this, "rpcClient");
1568
1563
  this.host = host;
1569
1564
  this.rpcClient = rpcClient;
1570
1565
  }
@@ -1627,8 +1622,8 @@ function initializeLoggingApi(venusApi, host) {
1627
1622
 
1628
1623
  // src/navigation/MockNavigationApi.ts
1629
1624
  var MockNavigationApi = class {
1625
+ venusApi;
1630
1626
  constructor(venusApi) {
1631
- __publicField(this, "venusApi");
1632
1627
  this.venusApi = venusApi;
1633
1628
  }
1634
1629
  async requestPopOrQuit(options) {
@@ -1688,9 +1683,9 @@ var MockNavigationApi = class {
1688
1683
 
1689
1684
  // src/navigation/RpcNavigationApi.ts
1690
1685
  var RpcNavigationApi = class {
1686
+ venusApi;
1687
+ rpcClient;
1691
1688
  constructor(rpcClient, venusApi) {
1692
- __publicField(this, "venusApi");
1693
- __publicField(this, "rpcClient");
1694
1689
  this.rpcClient = rpcClient;
1695
1690
  this.venusApi = venusApi;
1696
1691
  }
@@ -1750,8 +1745,8 @@ function initializeStackNavigation(venusApi, host) {
1750
1745
 
1751
1746
  // src/notifications/MockNotificationsApi.ts
1752
1747
  var MockNotificationsApi = class {
1748
+ venusApi;
1753
1749
  constructor(venusApi) {
1754
- __publicField(this, "venusApi");
1755
1750
  this.venusApi = venusApi;
1756
1751
  }
1757
1752
  async cancelNotification(notificationId) {
@@ -1833,8 +1828,8 @@ var MockNotificationsApi = class {
1833
1828
 
1834
1829
  // src/notifications/RpcNotificationsApi.ts
1835
1830
  var RpcNotificationsApi = class {
1831
+ rpcClient;
1836
1832
  constructor(rpcClient) {
1837
- __publicField(this, "rpcClient");
1838
1833
  this.rpcClient = rpcClient;
1839
1834
  }
1840
1835
  async scheduleAsync(title, body, seconds, notificationId, options) {
@@ -1907,8 +1902,8 @@ function initializeLocalNotifications(venusApi, host) {
1907
1902
 
1908
1903
  // src/popups/RpcPopupsApi.ts
1909
1904
  var RpcPopupsApi = class {
1905
+ rpcClient;
1910
1906
  constructor(rpcClient) {
1911
- __publicField(this, "rpcClient");
1912
1907
  this.rpcClient = rpcClient;
1913
1908
  }
1914
1909
  async showToast(message, options) {
@@ -1930,8 +1925,8 @@ var RpcPopupsApi = class {
1930
1925
 
1931
1926
  // src/popups/MockPopupsApi.ts
1932
1927
  var MockPopupsApi = class {
1928
+ overlay;
1933
1929
  constructor(override) {
1934
- __publicField(this, "overlay");
1935
1930
  this.overlay = override;
1936
1931
  }
1937
1932
  async showToast(message, options) {
@@ -1965,8 +1960,8 @@ function initializePopups(venusApi, host) {
1965
1960
 
1966
1961
  // src/profile/HostProfileApi.ts
1967
1962
  var HostProfileApi = class {
1963
+ venusApi;
1968
1964
  constructor(venusApi) {
1969
- __publicField(this, "venusApi");
1970
1965
  this.venusApi = venusApi;
1971
1966
  }
1972
1967
  getCurrentProfile() {
@@ -1992,8 +1987,8 @@ var HostProfileApi = class {
1992
1987
 
1993
1988
  // src/profile/MockProfileApi.ts
1994
1989
  var MockProfileApi = class {
1990
+ venusApi;
1995
1991
  constructor(venusApi) {
1996
- __publicField(this, "venusApi");
1997
1992
  this.venusApi = venusApi;
1998
1993
  }
1999
1994
  getCurrentProfile() {
@@ -2026,13 +2021,11 @@ function generateId() {
2026
2021
 
2027
2022
  // src/rpc/RpcClient.ts
2028
2023
  var RpcClient = class {
2029
- constructor() {
2030
- __publicField(this, "pendingCalls", /* @__PURE__ */ new Map());
2031
- __publicField(this, "notificationCallbacks", /* @__PURE__ */ new Map());
2032
- __publicField(this, "onResponseSub", null);
2033
- __publicField(this, "onNotificationSub", null);
2034
- __publicField(this, "transport", null);
2035
- }
2024
+ pendingCalls = /* @__PURE__ */ new Map();
2025
+ notificationCallbacks = /* @__PURE__ */ new Map();
2026
+ onResponseSub = null;
2027
+ onNotificationSub = null;
2028
+ transport = null;
2036
2029
  start(transport) {
2037
2030
  this.transport = transport;
2038
2031
  this.onResponseSub = transport.onResponse(async (response) => {
@@ -2126,25 +2119,25 @@ var RpcClient = class {
2126
2119
 
2127
2120
  // src/rooms/VenusRoom.ts
2128
2121
  var VenusRoom = class {
2122
+ id;
2123
+ name;
2124
+ players;
2125
+ maxPlayers;
2126
+ gameType;
2127
+ appId;
2128
+ type;
2129
+ createdBy;
2130
+ createdAt;
2131
+ updatedAt;
2132
+ isPrivate;
2133
+ status;
2134
+ customMetadata;
2135
+ admins;
2136
+ roomCode;
2137
+ description;
2138
+ data;
2139
+ version;
2129
2140
  constructor(roomData) {
2130
- __publicField(this, "id");
2131
- __publicField(this, "name");
2132
- __publicField(this, "players");
2133
- __publicField(this, "maxPlayers");
2134
- __publicField(this, "gameType");
2135
- __publicField(this, "appId");
2136
- __publicField(this, "type");
2137
- __publicField(this, "createdBy");
2138
- __publicField(this, "createdAt");
2139
- __publicField(this, "updatedAt");
2140
- __publicField(this, "isPrivate");
2141
- __publicField(this, "status");
2142
- __publicField(this, "customMetadata");
2143
- __publicField(this, "admins");
2144
- __publicField(this, "roomCode");
2145
- __publicField(this, "description");
2146
- __publicField(this, "data");
2147
- __publicField(this, "version");
2148
2141
  this.id = roomData.id;
2149
2142
  this.name = roomData.name;
2150
2143
  this.players = Array.isArray(roomData.currentPlayers) ? [...roomData.currentPlayers] : [];
@@ -2229,9 +2222,9 @@ function setupRoomNotifications(transport, getSubscriptions) {
2229
2222
 
2230
2223
  // src/rooms/RpcRoomsApi.ts
2231
2224
  var RpcRoomsApi = class {
2225
+ rpcClient;
2226
+ subscriptions;
2232
2227
  constructor(rpcClient) {
2233
- __publicField(this, "rpcClient");
2234
- __publicField(this, "subscriptions");
2235
2228
  this.rpcClient = rpcClient;
2236
2229
  this.subscriptions = {
2237
2230
  data: {},
@@ -2571,10 +2564,10 @@ function createMockStorageApi(storageType, appUrl) {
2571
2564
  return new MockStorageApi(prefix, syncDelay);
2572
2565
  }
2573
2566
  var MockStorageApi = class {
2567
+ prefix;
2568
+ syncDelay;
2569
+ orderStorageKey;
2574
2570
  constructor(prefix, syncDelay) {
2575
- __publicField(this, "prefix");
2576
- __publicField(this, "syncDelay");
2577
- __publicField(this, "orderStorageKey");
2578
2571
  this.prefix = prefix;
2579
2572
  this.syncDelay = syncDelay;
2580
2573
  this.orderStorageKey = `${prefix}__order__`;
@@ -2840,9 +2833,9 @@ function normalizeAppIdentifier(input) {
2840
2833
 
2841
2834
  // src/storage/RpcStorageApi.ts
2842
2835
  var RpcStorageApi = class {
2836
+ rpcClient;
2837
+ methodIds;
2843
2838
  constructor(rpcClient, methodIds) {
2844
- __publicField(this, "rpcClient");
2845
- __publicField(this, "methodIds");
2846
2839
  this.rpcClient = rpcClient;
2847
2840
  this.methodIds = methodIds;
2848
2841
  }
@@ -2906,10 +2899,10 @@ function initializeStorage(venusApiInstance, host) {
2906
2899
 
2907
2900
  // src/simulation/RpcSimulationApi.ts
2908
2901
  var RpcSimulationApi = class {
2902
+ rpcClient;
2903
+ _simulationConfig = null;
2904
+ subscriptionCallbacks = /* @__PURE__ */ new Map();
2909
2905
  constructor(rpcClient) {
2910
- __publicField(this, "rpcClient");
2911
- __publicField(this, "_simulationConfig", null);
2912
- __publicField(this, "subscriptionCallbacks", /* @__PURE__ */ new Map());
2913
2906
  this.rpcClient = rpcClient;
2914
2907
  this.rpcClient.onNotification(
2915
2908
  "H5_SIMULATION_UPDATE" /* H5_SIMULATION_UPDATE */,
@@ -3275,9 +3268,9 @@ function isPacificDaylightTime(date) {
3275
3268
 
3276
3269
  // src/time/HostTimeApi.ts
3277
3270
  var HostTimeApi = class {
3271
+ rpcClient;
3272
+ venusApi;
3278
3273
  constructor(rpcClient, venusApi) {
3279
- __publicField(this, "rpcClient");
3280
- __publicField(this, "venusApi");
3281
3274
  this.rpcClient = rpcClient;
3282
3275
  this.venusApi = venusApi;
3283
3276
  }
@@ -3359,8 +3352,8 @@ var HostTimeApi = class {
3359
3352
 
3360
3353
  // src/time/MockTimeApi.ts
3361
3354
  var MockTimeApi = class {
3355
+ venusApi;
3362
3356
  constructor(venusApi) {
3363
- __publicField(this, "venusApi");
3364
3357
  this.venusApi = venusApi;
3365
3358
  }
3366
3359
  formatNumber(value, options) {
@@ -3463,7 +3456,7 @@ function initializeTime(venusApi, host) {
3463
3456
  }
3464
3457
 
3465
3458
  // src/version.ts
3466
- var SDK_VERSION = "3.3.0";
3459
+ var SDK_VERSION = "3.4.0-beta.0";
3467
3460
 
3468
3461
  // src/shared-assets/base64Utils.ts
3469
3462
  function base64ToArrayBuffer(base64) {
@@ -3495,9 +3488,9 @@ function base64ToUtf8(base64) {
3495
3488
 
3496
3489
  // src/shared-assets/RpcSharedAssetsApi.ts
3497
3490
  var RpcSharedAssetsApi = class {
3491
+ venusApi;
3492
+ rpcClient;
3498
3493
  constructor(rpcClient, venusApi) {
3499
- __publicField(this, "venusApi");
3500
- __publicField(this, "rpcClient");
3501
3494
  this.rpcClient = rpcClient;
3502
3495
  this.venusApi = venusApi;
3503
3496
  }
@@ -3520,8 +3513,8 @@ var RpcSharedAssetsApi = class {
3520
3513
 
3521
3514
  // src/shared-assets/MockSharedAssetsApi.ts
3522
3515
  var MockSharedAssetsApi = class {
3516
+ venusApi;
3523
3517
  constructor(venusApi) {
3524
- __publicField(this, "venusApi");
3525
3518
  this.venusApi = venusApi;
3526
3519
  }
3527
3520
  async loadAssetsBundle(game, bundleKey, fileType = "stow") {
@@ -3693,10 +3686,10 @@ async function computeScoreHash(score, duration, token, sealingNonce, sealingSec
3693
3686
 
3694
3687
  // src/leaderboard/RpcLeaderboardApi.ts
3695
3688
  var RpcLeaderboardApi = class {
3689
+ rpcClient;
3690
+ /** Cache of score tokens for automatic hash computation */
3691
+ tokenCache = /* @__PURE__ */ new Map();
3696
3692
  constructor(rpcClient) {
3697
- __publicField(this, "rpcClient");
3698
- /** Cache of score tokens for automatic hash computation */
3699
- __publicField(this, "tokenCache", /* @__PURE__ */ new Map());
3700
3693
  this.rpcClient = rpcClient;
3701
3694
  }
3702
3695
  /**
@@ -3778,14 +3771,14 @@ var RpcLeaderboardApi = class {
3778
3771
 
3779
3772
  // src/leaderboard/MockLeaderboardApi.ts
3780
3773
  var MockLeaderboardApi = class {
3774
+ tokens = /* @__PURE__ */ new Map();
3775
+ /** Cache of score tokens for automatic hash computation */
3776
+ tokenCache = /* @__PURE__ */ new Map();
3777
+ entriesByMode = /* @__PURE__ */ new Map();
3778
+ tokenCounter = 0;
3779
+ enableScoreSealing = false;
3780
+ scoreSealingSecret = "mock-leaderboard-secret-key";
3781
3781
  constructor(options) {
3782
- __publicField(this, "tokens", /* @__PURE__ */ new Map());
3783
- /** Cache of score tokens for automatic hash computation */
3784
- __publicField(this, "tokenCache", /* @__PURE__ */ new Map());
3785
- __publicField(this, "entriesByMode", /* @__PURE__ */ new Map());
3786
- __publicField(this, "tokenCounter", 0);
3787
- __publicField(this, "enableScoreSealing", false);
3788
- __publicField(this, "scoreSealingSecret", "mock-leaderboard-secret-key");
3789
3782
  if (options?.enableScoreSealing) {
3790
3783
  this.enableScoreSealing = true;
3791
3784
  }
@@ -4060,8 +4053,8 @@ var MockPreloaderApi = class {
4060
4053
 
4061
4054
  // src/game-preloader/RpcPreloaderApi.ts
4062
4055
  var RpcPreloaderApi = class {
4056
+ rpcClient;
4063
4057
  constructor(rpcClient) {
4064
- __publicField(this, "rpcClient");
4065
4058
  this.rpcClient = rpcClient;
4066
4059
  }
4067
4060
  async showLoadScreen() {
@@ -4146,16 +4139,16 @@ var RpcSocialApi = class {
4146
4139
 
4147
4140
  // src/VenusTransport.ts
4148
4141
  var VenusTransport = class {
4142
+ messageHandler;
4143
+ onNotificationCallbacks = [];
4144
+ onNotificationCallbacksToRemove = [];
4145
+ onVenusMessageCallbacks = [];
4146
+ onResponseCallbacks = [];
4147
+ onResponseCallbacksToRemove = [];
4148
+ _instanceId = null;
4149
+ isStarted = false;
4150
+ isProcessingMessage = false;
4149
4151
  constructor() {
4150
- __publicField(this, "messageHandler");
4151
- __publicField(this, "onNotificationCallbacks", []);
4152
- __publicField(this, "onNotificationCallbacksToRemove", []);
4153
- __publicField(this, "onVenusMessageCallbacks", []);
4154
- __publicField(this, "onResponseCallbacks", []);
4155
- __publicField(this, "onResponseCallbacksToRemove", []);
4156
- __publicField(this, "_instanceId", null);
4157
- __publicField(this, "isStarted", false);
4158
- __publicField(this, "isProcessingMessage", false);
4159
4152
  this.messageHandler = async (event) => {
4160
4153
  this.isProcessingMessage = true;
4161
4154
  let message;
@@ -4366,34 +4359,38 @@ var getCdnBaseUrl = () => {
4366
4359
  return "https://venus-static-01293ak.web.app/";
4367
4360
  };
4368
4361
  var RemoteHost = class {
4362
+ ads;
4363
+ analytics;
4364
+ deviceCache;
4365
+ appStorage;
4366
+ globalStorage;
4367
+ avatar3d;
4368
+ navigation;
4369
+ notifications;
4370
+ popups;
4371
+ profile;
4372
+ system;
4373
+ cdn;
4374
+ time;
4375
+ ai;
4376
+ haptics;
4377
+ features;
4378
+ lifecycle;
4379
+ simulation;
4380
+ rooms;
4381
+ logging;
4382
+ iap;
4383
+ leaderboard;
4384
+ preloader;
4385
+ social;
4386
+ context;
4387
+ get isInitialized() {
4388
+ return this._isInitialized;
4389
+ }
4390
+ venusApi;
4391
+ rpcClient;
4392
+ _isInitialized = false;
4369
4393
  constructor(venusApi) {
4370
- __publicField(this, "ads");
4371
- __publicField(this, "analytics");
4372
- __publicField(this, "deviceCache");
4373
- __publicField(this, "appStorage");
4374
- __publicField(this, "globalStorage");
4375
- __publicField(this, "avatar3d");
4376
- __publicField(this, "navigation");
4377
- __publicField(this, "notifications");
4378
- __publicField(this, "popups");
4379
- __publicField(this, "profile");
4380
- __publicField(this, "system");
4381
- __publicField(this, "cdn");
4382
- __publicField(this, "time");
4383
- __publicField(this, "ai");
4384
- __publicField(this, "haptics");
4385
- __publicField(this, "features");
4386
- __publicField(this, "lifecycle");
4387
- __publicField(this, "simulation");
4388
- __publicField(this, "rooms");
4389
- __publicField(this, "logging");
4390
- __publicField(this, "iap");
4391
- __publicField(this, "leaderboard");
4392
- __publicField(this, "preloader");
4393
- __publicField(this, "social");
4394
- __publicField(this, "venusApi");
4395
- __publicField(this, "rpcClient");
4396
- __publicField(this, "_isInitialized", false);
4397
4394
  this.venusApi = venusApi;
4398
4395
  const rpcClient = new RpcClient();
4399
4396
  this.rpcClient = rpcClient;
@@ -4454,9 +4451,6 @@ var RemoteHost = class {
4454
4451
  this.venusApi.sharedAssets = new RpcSharedAssetsApi(rpcClient, venusApi);
4455
4452
  initializeRoomsApi(this.venusApi, this);
4456
4453
  }
4457
- get isInitialized() {
4458
- return this._isInitialized;
4459
- }
4460
4454
  async initialize(options) {
4461
4455
  this.log("Initializing Remote Host...");
4462
4456
  const transport = new VenusTransport();
@@ -4490,10 +4484,11 @@ var RemoteHost = class {
4490
4484
  if (safeArea) {
4491
4485
  this.venusApi._safeAreaData = safeArea;
4492
4486
  }
4493
- return {
4487
+ this.context = {
4494
4488
  safeArea,
4495
4489
  initializeAsleep: response.initializeAsleep
4496
4490
  };
4491
+ return this.context;
4497
4492
  }
4498
4493
  log(message) {
4499
4494
  console.log(`[Venus SDK] [Remote Host] ${message}`);
@@ -4616,37 +4611,41 @@ function createUnavailableSimulationApi() {
4616
4611
  };
4617
4612
  }
4618
4613
  var MockHost = class {
4614
+ ads;
4615
+ analytics;
4616
+ deviceCache;
4617
+ appStorage;
4618
+ globalStorage;
4619
+ avatar3d;
4620
+ navigation;
4621
+ notifications;
4622
+ popups;
4623
+ profile;
4624
+ system;
4625
+ cdn;
4626
+ time;
4627
+ ai;
4628
+ haptics;
4629
+ features;
4630
+ lifecycle;
4631
+ simulation;
4632
+ rooms;
4633
+ logging;
4634
+ iap;
4635
+ leaderboard;
4636
+ preloader;
4637
+ social;
4638
+ context;
4639
+ state = 0 /* PLAYING */;
4640
+ get isInitialized() {
4641
+ return this._isInitialized;
4642
+ }
4643
+ venusApi;
4644
+ _isInitialized = false;
4645
+ _overlay;
4646
+ _mockLifecyclesApi;
4647
+ _mockAdsApi;
4619
4648
  constructor(venusApi) {
4620
- __publicField(this, "ads");
4621
- __publicField(this, "analytics");
4622
- __publicField(this, "deviceCache");
4623
- __publicField(this, "appStorage");
4624
- __publicField(this, "globalStorage");
4625
- __publicField(this, "avatar3d");
4626
- __publicField(this, "navigation");
4627
- __publicField(this, "notifications");
4628
- __publicField(this, "popups");
4629
- __publicField(this, "profile");
4630
- __publicField(this, "system");
4631
- __publicField(this, "cdn");
4632
- __publicField(this, "time");
4633
- __publicField(this, "ai");
4634
- __publicField(this, "haptics");
4635
- __publicField(this, "features");
4636
- __publicField(this, "lifecycle");
4637
- __publicField(this, "simulation");
4638
- __publicField(this, "rooms");
4639
- __publicField(this, "logging");
4640
- __publicField(this, "iap");
4641
- __publicField(this, "leaderboard");
4642
- __publicField(this, "preloader");
4643
- __publicField(this, "social");
4644
- __publicField(this, "state", 0 /* PLAYING */);
4645
- __publicField(this, "venusApi");
4646
- __publicField(this, "_isInitialized", false);
4647
- __publicField(this, "_overlay");
4648
- __publicField(this, "_mockLifecyclesApi");
4649
- __publicField(this, "_mockAdsApi");
4650
4649
  this.venusApi = venusApi;
4651
4650
  this._overlay = this.createOverlay();
4652
4651
  this._mockAdsApi = new MockAdsApi(this._overlay);
@@ -4682,9 +4681,6 @@ var MockHost = class {
4682
4681
  venusApi.isMock = () => true;
4683
4682
  this.venusApi.sharedAssets = new MockSharedAssetsApi(this.venusApi);
4684
4683
  }
4685
- get isInitialized() {
4686
- return this._isInitialized;
4687
- }
4688
4684
  initialize(options) {
4689
4685
  this._isInitialized = true;
4690
4686
  this.venusApi._profileData = this.profile.getCurrentProfile();
@@ -4692,10 +4688,11 @@ var MockHost = class {
4692
4688
  this.venusApi._environmentData = this.system.getEnvironment();
4693
4689
  this.venusApi._localeData = this.venusApi._mock?.locale || "en-US";
4694
4690
  this.venusApi._languageCodeData = this.venusApi._mock?.languageCode || "en";
4695
- return Promise.resolve({
4691
+ this.context = {
4696
4692
  initializeAsleep: false,
4697
4693
  safeArea: this.venusApi._safeAreaData
4698
- });
4694
+ };
4695
+ return Promise.resolve(this.context);
4699
4696
  }
4700
4697
  createOverlay() {
4701
4698
  const overlayContainer = document.createElement("div");
@@ -5154,5 +5151,5 @@ function initializeSocial(venusApi, host) {
5154
5151
  }
5155
5152
 
5156
5153
  export { DEFAULT_SHARED_LIB_CDN_BASE, EMBEDDED_LIBRARIES, EMBEDDED_LIBRARY_BY_KEY, HASH_ALGORITHM_NODE, HASH_ALGORITHM_WEB_CRYPTO, HapticFeedbackStyle, HostCdnApi, HostDeviceApi, HostEnvironmentApi, HostProfileApi, HostSystemApi, HostTimeApi, MODULE_TO_LIBRARY_SPECIFIERS, MockAdsApi, MockAiApi, MockAnalyticsApi, MockAvatarApi, MockCdnApi, MockDeviceApi, MockEnvironmentApi, MockFeaturesApi, MockHapticsApi, MockIapApi, MockLeaderboardApi, MockLifecycleApi, MockLoggingApi, MockNavigationApi, MockNotificationsApi, MockPopupsApi, MockPreloaderApi, MockProfileApi, MockSharedAssetsApi, MockSocialApi, MockStorageApi, MockSystemApi, MockTimeApi, RemoteHost, RpcAdsApi, RpcAiApi, RpcAnalyticsApi, RpcAvatarApi, RpcClient, RpcFeaturesApi, RpcHapticsApi, RpcIapApi, RpcLeaderboardApi, RpcLifecycleApi, RpcLoggingApi, RpcNavigationApi, RpcNotificationsApi, RpcPopupsApi, RpcPreloaderApi, RpcRoomsApi, RpcSharedAssetsApi, RpcSimulationApi, RpcSocialApi, RpcStorageApi, SDK_VERSION, VenusMessageId, VenusRoom, base64ToArrayBuffer, base64ToUtf8, computeScoreHash, createHost, createMockStorageApi, getLibraryDefinition, initializeAds, initializeAi, initializeAnalytics, initializeAvatar3d, initializeCdn, initializeFeaturesApi, initializeHaptics, initializeIap, initializeLeaderboard, initializeLifecycleApi, initializeLocalNotifications, initializeLoggingApi, initializePopups, initializePreloader, initializeProfile, initializeRoomsApi, initializeSimulation, initializeSocial, initializeStackNavigation, initializeStorage, initializeSystem, initializeTime, isPacificDaylightTime, setupRoomNotifications };
5157
- //# sourceMappingURL=chunk-FFDRA6ET.mjs.map
5158
- //# sourceMappingURL=chunk-FFDRA6ET.mjs.map
5154
+ //# sourceMappingURL=chunk-RUYSUI26.js.map
5155
+ //# sourceMappingURL=chunk-RUYSUI26.js.map