@series-inc/venus-sdk 3.1.1-beta.0 → 3.1.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.
Files changed (34) hide show
  1. package/dist/{AdsApi-meVfUcZy.d.mts → AdsApi-BV_VKgMO.d.mts} +467 -269
  2. package/dist/{AdsApi-meVfUcZy.d.ts → AdsApi-BV_VKgMO.d.ts} +467 -269
  3. package/dist/{chunk-EMVTVSGL.mjs → chunk-FTIFUYDL.mjs} +978 -1412
  4. package/dist/chunk-FTIFUYDL.mjs.map +1 -0
  5. package/dist/chunk-NSSMTXJJ.mjs +7 -0
  6. package/dist/{chunk-2PDL7CQK.mjs.map → chunk-NSSMTXJJ.mjs.map} +1 -1
  7. package/dist/chunk-UXY5CKKG.mjs +12 -0
  8. package/dist/chunk-UXY5CKKG.mjs.map +1 -0
  9. package/dist/{core-5JLON75E.mjs → core-62LWDHN7.mjs} +3 -3
  10. package/dist/{core-5JLON75E.mjs.map → core-62LWDHN7.mjs.map} +1 -1
  11. package/dist/index.cjs +1018 -1783
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.mts +142 -68
  14. package/dist/index.d.ts +142 -68
  15. package/dist/index.mjs +3 -7
  16. package/dist/index.mjs.map +1 -1
  17. package/dist/venus-api/index.cjs +1091 -1883
  18. package/dist/venus-api/index.cjs.map +1 -1
  19. package/dist/venus-api/index.d.mts +2 -2
  20. package/dist/venus-api/index.d.ts +2 -2
  21. package/dist/venus-api/index.mjs +76 -418
  22. package/dist/venus-api/index.mjs.map +1 -1
  23. package/dist/vite/index.cjs.map +1 -1
  24. package/dist/vite/index.mjs.map +1 -1
  25. package/dist/webview/index.cjs +4 -335
  26. package/dist/webview/index.cjs.map +1 -1
  27. package/dist/webview/index.d.mts +7 -9
  28. package/dist/webview/index.d.ts +7 -9
  29. package/dist/webview/index.mjs +2 -2
  30. package/package.json +1 -1
  31. package/dist/chunk-2PDL7CQK.mjs +0 -26
  32. package/dist/chunk-EMVTVSGL.mjs.map +0 -1
  33. package/dist/chunk-IZLOB7DV.mjs +0 -343
  34. package/dist/chunk-IZLOB7DV.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import { V as VenusAPI$1 } from '../AdsApi-meVfUcZy.mjs';
2
- export { A as ActionSheetOption, B as BatchRecipeRequirementsResult, P as Profile, e as RecipeRequirementQuery, R as RecipeRequirementResult, g as VenusConfig, i as VenusRoom, h as VenusRoomsConfig, f as VenusSimulationAPI, d as VenusSimulationConfig, b as VenusSimulationEffect, c as VenusSimulationRecipe, a as VenusSimulationState } from '../AdsApi-meVfUcZy.mjs';
1
+ import { V as VenusAPI$1 } from '../AdsApi-BV_VKgMO.mjs';
2
+ export { A as ActionSheetOption, B as BatchRecipeRequirementsResult, P as Profile, k as RecipeRequirementQuery, R as RecipeRequirementResult, d as SimulationActiveRunsUpdate, c as SimulationEntityUpdate, S as SimulationRunSummary, e as SimulationSnapshotUpdate, g as SimulationSubscribeOptions, f as SimulationUpdateData, b as SimulationUpdateType, n as VenusAvailableRecipe, o as VenusCollectRecipeResult, l as VenusExecuteRecipeOptions, p as VenusExecuteRecipeResult, m as VenusExecuteScopedRecipeOptions, q as VenusRoom, j as VenusSimulationConfig, h as VenusSimulationEffect, i as VenusSimulationRecipe, a as VenusSimulationStateResponse } from '../AdsApi-BV_VKgMO.mjs';
3
3
 
4
4
  /**
5
5
  * TypeScript definitions for venus-api
@@ -1,5 +1,5 @@
1
- import { V as VenusAPI$1 } from '../AdsApi-meVfUcZy.js';
2
- export { A as ActionSheetOption, B as BatchRecipeRequirementsResult, P as Profile, e as RecipeRequirementQuery, R as RecipeRequirementResult, g as VenusConfig, i as VenusRoom, h as VenusRoomsConfig, f as VenusSimulationAPI, d as VenusSimulationConfig, b as VenusSimulationEffect, c as VenusSimulationRecipe, a as VenusSimulationState } from '../AdsApi-meVfUcZy.js';
1
+ import { V as VenusAPI$1 } from '../AdsApi-BV_VKgMO.js';
2
+ export { A as ActionSheetOption, B as BatchRecipeRequirementsResult, P as Profile, k as RecipeRequirementQuery, R as RecipeRequirementResult, d as SimulationActiveRunsUpdate, c as SimulationEntityUpdate, S as SimulationRunSummary, e as SimulationSnapshotUpdate, g as SimulationSubscribeOptions, f as SimulationUpdateData, b as SimulationUpdateType, n as VenusAvailableRecipe, o as VenusCollectRecipeResult, l as VenusExecuteRecipeOptions, p as VenusExecuteRecipeResult, m as VenusExecuteScopedRecipeOptions, q as VenusRoom, j as VenusSimulationConfig, h as VenusSimulationEffect, i as VenusSimulationRecipe, a as VenusSimulationStateResponse } from '../AdsApi-BV_VKgMO.js';
3
3
 
4
4
  /**
5
5
  * TypeScript definitions for venus-api
@@ -1,189 +1,6 @@
1
- import { init_rooms, SDK_VERSION, createHost, initializeStorage, initializeRoomsApi, initializeAds, initializePopups, initializeAnalytics, initializeIap, initializeLeaderboard, initializeLocalNotifications, initializePreloader, initializeTime, initializeLifecycleApi, initializeHaptics, initializeCdn, initializeFeaturesApi, initializeLoggingApi, initializeProfile, initializeAvatar3d, initializeStackNavigation, initializePost, initializeAi, initializeSimulation, initializeSocial } from '../chunk-EMVTVSGL.mjs';
1
+ import { SDK_VERSION, createHost, initializeStorage, initializeRoomsApi, initializeAds, initializePopups, initializeAnalytics, initializeIap, initializeLeaderboard, initializeLocalNotifications, initializePreloader, initializeTime, initializeLifecycleApi, initializeHaptics, initializeCdn, initializeFeaturesApi, initializeLoggingApi, initializeProfile, initializeSystem, initializeAvatar3d, initializeStackNavigation, initializeAi, initializeSimulation, initializeSocial } from '../chunk-FTIFUYDL.mjs';
2
2
  import { createProxiedObject, createProxiedMethod } from '../chunk-QABXMFND.mjs';
3
- import '../chunk-2PDL7CQK.mjs';
4
-
5
- // src/venus-api/systems/theme.js
6
- var DEFAULT_TYPOGRAPHY = {
7
- fontFamily: {
8
- base: "Plus Jakarta Sans, Roboto, sans-serif",
9
- heading: "Plus Jakarta Sans, Roboto, sans-serif",
10
- mono: "monospace"
11
- },
12
- fontSize: {
13
- "2xs": "10px",
14
- xs: "12px",
15
- sm: "14px",
16
- md: "16px",
17
- lg: "18px",
18
- xl: "20px",
19
- "2xl": "24px",
20
- "3xl": "30px",
21
- "4xl": "36px",
22
- "5xl": "48px",
23
- "6xl": "60px"
24
- },
25
- fontWeight: {
26
- thin: "100",
27
- extralight: "200",
28
- light: "300",
29
- regular: "400",
30
- medium: "500",
31
- semibold: "600",
32
- bold: "700",
33
- extrabold: "800",
34
- black: "900",
35
- extrablack: "950"
36
- },
37
- lineHeight: {
38
- none: "1",
39
- tight: "1.25",
40
- snug: "1.375",
41
- normal: "1.5",
42
- relaxed: "1.625",
43
- loose: "2"
44
- }
45
- };
46
- var DEFAULT_THEME = {
47
- background: {
48
- default: "#131419",
49
- // Dark background
50
- muted: "#1b1d25",
51
- // Mid-dark background
52
- dark: "#0d0e11"
53
- // Darker background
54
- },
55
- text: {
56
- primary: "#ffffff",
57
- // White
58
- muted: "#808080",
59
- // Gray
60
- inverted: "#000000"
61
- // Black
62
- },
63
- theme: {
64
- primary: "#f6c833",
65
- // Different yellow for testing (slightly lighter)
66
- secondary: "#6366f1",
67
- // Different secondary for testing (purple)
68
- background: "#131419",
69
- // Dark background
70
- border: "#262626",
71
- // Dark border
72
- card: "#1b1d25",
73
- // Dark card
74
- "card-glass": "rgba(27, 29, 37, 0.8)"
75
- // Translucent dark card
76
- },
77
- typography: DEFAULT_TYPOGRAPHY
78
- };
79
- function initializeTheme(venusApiInstance) {
80
- if (!venusApiInstance._mock.theme) {
81
- venusApiInstance._mock.theme = DEFAULT_THEME;
82
- }
83
- if (!venusApiInstance._mock.typography) {
84
- venusApiInstance._mock.typography = DEFAULT_TYPOGRAPHY;
85
- }
86
- if (!venusApiInstance._mock.safeArea) {
87
- venusApiInstance._mock.safeArea = { top: 0, bottom: 0, left: 0, right: 0 };
88
- }
89
- venusApiInstance.applyVenusThemeToCSS = function(theme) {
90
- if (!theme) return;
91
- const root = document.documentElement;
92
- if (theme.background) {
93
- if (theme.background.default)
94
- root.style.setProperty("--color-background", theme.background.default);
95
- if (theme.background.muted)
96
- root.style.setProperty(
97
- "--color-background-muted",
98
- theme.background.muted
99
- );
100
- if (theme.background.dark)
101
- root.style.setProperty(
102
- "--color-background-dark",
103
- theme.background.dark
104
- );
105
- }
106
- if (theme.text) {
107
- if (theme.text.primary)
108
- root.style.setProperty("--color-text-primary", theme.text.primary);
109
- if (theme.text.muted)
110
- root.style.setProperty("--color-text-muted", theme.text.muted);
111
- }
112
- if (theme.theme) {
113
- if (theme.theme.primary)
114
- root.style.setProperty("--color-primary", theme.theme.primary);
115
- if (theme.theme.secondary)
116
- root.style.setProperty("--color-secondary", theme.theme.secondary);
117
- if (theme.theme.border)
118
- root.style.setProperty("--color-border", theme.theme.border);
119
- }
120
- if (theme.typography && theme.typography.fontFamily) {
121
- if (theme.typography.fontFamily.base) {
122
- root.style.setProperty(
123
- "--font-family",
124
- theme.typography.fontFamily.base
125
- );
126
- }
127
- }
128
- document.body.style.backgroundColor = root.style.getPropertyValue(
129
- "--color-background-dark"
130
- );
131
- };
132
- venusApiInstance.applyTheme = createProxiedMethod("applyTheme", function() {
133
- let apiTheme = null;
134
- apiTheme = this.config.theme;
135
- if (apiTheme) {
136
- this.applyVenusThemeToCSS(apiTheme);
137
- this.colors = {
138
- primary: apiTheme.theme?.primary || "#FF2877",
139
- secondary: apiTheme.theme?.secondary || "#4755FF",
140
- dark: apiTheme.background?.dark || "#0D0E11",
141
- darkLight: apiTheme.background?.muted || "#1B1D25",
142
- darkLighter: apiTheme.background?.default || "#23252F",
143
- textPrimary: apiTheme.text?.primary || "#FFFFFF",
144
- textMuted: apiTheme.text?.muted || "#808080",
145
- border: apiTheme.theme?.border || "#262626"
146
- };
147
- } else {
148
- this.colors = {
149
- primary: "#FF2877",
150
- secondary: "#4755FF",
151
- dark: "#0D0E11",
152
- darkLight: "#1B1D25",
153
- darkLighter: "#23252F",
154
- textPrimary: "#FFFFFF",
155
- textMuted: "#808080",
156
- border: "#262626"
157
- };
158
- }
159
- this.log("Theme applied successfully");
160
- });
161
- venusApiInstance.applySafeArea = createProxiedMethod("applySafeArea", function() {
162
- try {
163
- const safeArea = this.config.ui.safeArea;
164
- if (safeArea) {
165
- this.log("Applying safe area insets: " + JSON.stringify(safeArea));
166
- if (this.tapToStartScreen) {
167
- this.tapToStartScreen.style.marginTop = `${safeArea.top}px`;
168
- this.tapToStartScreen.style.marginBottom = `${safeArea.bottom}px`;
169
- }
170
- if (this.gameOverScreen) {
171
- this.gameOverScreen.style.marginTop = `${safeArea.top}px`;
172
- this.gameOverScreen.style.marginBottom = `${safeArea.bottom}px`;
173
- }
174
- if (this.maxScoreContainer) {
175
- this.maxScoreContainer.style.marginTop = `${safeArea.top}px`;
176
- this.maxScoreContainer.style.marginRight = `${safeArea.right}px`;
177
- }
178
- }
179
- } catch (error) {
180
- this.error("Error applying safe area: " + error.message);
181
- console.error("Error applying safe area:", error);
182
- }
183
- });
184
- venusApiInstance.DEFAULT_THEME = DEFAULT_THEME;
185
- venusApiInstance.DEFAULT_TYPOGRAPHY = DEFAULT_TYPOGRAPHY;
186
- }
3
+ import '../chunk-NSSMTXJJ.mjs';
187
4
 
188
5
  // src/venus-api/systems/asset-loader.js
189
6
  var VenusAssetLoader = class {
@@ -196,7 +13,7 @@ var VenusAssetLoader = class {
196
13
  // Set the VenusAPI reference during initialization
197
14
  setVenusAPI(api) {
198
15
  this.venusAPI = api;
199
- this.isWebView = !api.isWeb || !api.isWeb();
16
+ this.isWebView = typeof window !== "undefined" && typeof window.ReactNativeWebView !== "undefined";
200
17
  }
201
18
  /**
202
19
  * Load any asset with automatic optimization
@@ -317,14 +134,11 @@ var VenusAssetLoader = class {
317
134
  }, 1e4);
318
135
  if (type === "image") {
319
136
  const img = new Image();
320
- console.log(`\u{1F5BC}\uFE0F [Asset Verification] Verifying image: ${url}`);
321
137
  img.onload = () => {
322
- console.log(`\u2705 [Asset Verification] Image verified successfully: ${url}`);
323
138
  clearTimeout(timeout);
324
139
  resolve();
325
140
  };
326
141
  img.onerror = (error) => {
327
- console.log(`\u274C [Asset Verification] Image verification failed: ${url}`, error);
328
142
  clearTimeout(timeout);
329
143
  reject(new Error("Failed to load image"));
330
144
  };
@@ -376,7 +190,6 @@ var VenusAssetLoader = class {
376
190
  const CDN_BASE_URL = "https://venus-static-01293ak.web.app/";
377
191
  const cleanUrl = url.startsWith("/") ? url.slice(1) : url;
378
192
  const fullUrl = CDN_BASE_URL + cleanUrl;
379
- console.log(`\u{1F310} [Asset Loader] Force remote CDN: ${url} -> ${fullUrl}`);
380
193
  return fullUrl;
381
194
  }
382
195
  if (this.venusAPI && this.venusAPI.isMock && this.venusAPI.isMock()) {
@@ -1935,7 +1748,7 @@ function createNumbersAPI() {
1935
1748
  return numbersAPI;
1936
1749
  }
1937
1750
  async function initializeNumbers(venusApiInstance) {
1938
- const { createProxiedObject: createProxiedObject2, createProxiedMethod: createProxiedMethod2 } = await import('../core-5JLON75E.mjs');
1751
+ const { createProxiedObject: createProxiedObject2, createProxiedMethod: createProxiedMethod2 } = await import('../core-62LWDHN7.mjs');
1939
1752
  const numbersAPI = createNumbersAPI();
1940
1753
  venusApiInstance.numbers = createProxiedObject2.call(
1941
1754
  venusApiInstance,
@@ -1957,7 +1770,6 @@ async function initializeNumbers(venusApiInstance) {
1957
1770
  }
1958
1771
 
1959
1772
  // src/venus-api/index.js
1960
- init_rooms();
1961
1773
  var HapticStyle = {
1962
1774
  LIGHT: "light",
1963
1775
  MEDIUM: "medium",
@@ -1997,82 +1809,8 @@ var VenusAPI2 = class {
1997
1809
  bottom: 10,
1998
1810
  left: 0
1999
1811
  },
2000
- uiControls: {
2001
- closeButton: { x: 16, y: 16, width: 32, height: 32 },
2002
- menuButton: { x: window.innerWidth - 48, y: 16, width: 32, height: 32 },
2003
- feedHeader: { x: 0, y: 0, width: window.innerWidth, height: 66 },
2004
- playButton: {
2005
- x: 0,
2006
- y: window.innerHeight - 60,
2007
- width: window.innerWidth,
2008
- height: 60
2009
- }
2010
- },
2011
- // Complete theme structure (matching createH5Theme output)
2012
- theme: {
2013
- background: {
2014
- default: "#131419",
2015
- muted: "#1b1d25",
2016
- dark: "#0d0e11"
2017
- },
2018
- text: {
2019
- primary: "#ffffff",
2020
- muted: "#808080",
2021
- inverted: "#000000"
2022
- },
2023
- theme: {
2024
- primary: "#f6c833",
2025
- secondary: "#6366f1",
2026
- background: "#131419",
2027
- border: "#262626",
2028
- card: "#1b1d25",
2029
- "card-glass": "rgba(27, 29, 37, 0.8)"
2030
- },
2031
- typography: {
2032
- fontFamily: {
2033
- base: "Plus Jakarta Sans, Roboto, sans-serif",
2034
- heading: "Plus Jakarta Sans, Roboto, sans-serif",
2035
- mono: "monospace"
2036
- },
2037
- fontSize: {
2038
- "2xs": "10px",
2039
- xs: "12px",
2040
- sm: "14px",
2041
- md: "16px",
2042
- lg: "18px",
2043
- xl: "20px",
2044
- "2xl": "24px",
2045
- "3xl": "30px",
2046
- "4xl": "36px",
2047
- "5xl": "48px",
2048
- "6xl": "60px"
2049
- },
2050
- fontWeight: {
2051
- thin: "100",
2052
- extralight: "200",
2053
- light: "300",
2054
- regular: "400",
2055
- medium: "500",
2056
- semibold: "600",
2057
- bold: "700",
2058
- extrabold: "800",
2059
- black: "900",
2060
- extrablack: "950"
2061
- },
2062
- lineHeight: {
2063
- none: "1",
2064
- tight: "1.25",
2065
- snug: "1.375",
2066
- normal: "1.5",
2067
- relaxed: "1.625",
2068
- loose: "2"
2069
- }
2070
- }
2071
- },
2072
- // Static locale data at top level
2073
- locale: "en-US",
2074
- languageCode: "en",
2075
- // Note: Profile is now separate from config and accessed via getCurrentProfile()
1812
+ // NOTE: locale and languageCode are NOT part of static config
1813
+ // They are delivered via INIT_SDK handshake and accessed via getLocale()/getLanguageCode()
2076
1814
  // Complete environment info (matching buildStaticConfig)
2077
1815
  environment: {
2078
1816
  isDevelopment: true,
@@ -2126,12 +1864,6 @@ var VenusAPI2 = class {
2126
1864
  onHide: null,
2127
1865
  onShow: null
2128
1866
  },
2129
- currentPostInteractions: {
2130
- isLiked: false,
2131
- isFollowing: false,
2132
- likesCount: 42,
2133
- commentsCount: 7
2134
- },
2135
1867
  // Platform overrides for testing different environments
2136
1868
  platformOverrides: {
2137
1869
  isMobile: true,
@@ -2140,137 +1872,74 @@ var VenusAPI2 = class {
2140
1872
  };
2141
1873
  this._detectHostedEnvironment();
2142
1874
  this.launchParams = {};
2143
- this.config = createProxiedObject.call(this, "config", {
2144
- locale: "en-US",
2145
- languageCode: "en",
2146
- // Note: Profile is no longer in config - use getCurrentProfile() instead
2147
- environment: {
2148
- isDevelopment: true,
2149
- platform: typeof navigator !== "undefined" ? navigator.platform : "unknown",
2150
- platformVersion: "unknown",
2151
- browserInfo: {
2152
- browser: "unknown",
2153
- userAgent: typeof navigator !== "undefined" ? navigator.userAgent : "unknown",
2154
- isMobile: true,
2155
- isTablet: false,
2156
- language: typeof navigator !== "undefined" ? navigator.language : "en-US"
2157
- }
2158
- },
2159
- ui: {
2160
- controls: {
2161
- closeButton: { x: 16, y: 16, width: 32, height: 32 },
2162
- menuButton: {
2163
- x: typeof window !== "undefined" ? window.innerWidth - 48 : 352,
2164
- y: 16,
2165
- width: 32,
2166
- height: 32
2167
- },
2168
- feedHeader: {
2169
- x: 0,
2170
- y: 0,
2171
- width: typeof window !== "undefined" ? window.innerWidth : 400,
2172
- height: 66
2173
- },
2174
- playButton: {
2175
- x: 0,
2176
- y: typeof window !== "undefined" ? window.innerHeight - 60 : 740,
2177
- width: typeof window !== "undefined" ? window.innerWidth : 400,
2178
- height: 60
2179
- }
2180
- },
2181
- safeArea: { top: 44, left: 0, right: 0, bottom: 34 },
2182
- hudInsets: {
2183
- preview: { top: 60, left: 0, right: 0, bottom: 40 },
2184
- fullscreen: { top: 44, left: 0, right: 0, bottom: 34 }
2185
- }
2186
- },
2187
- device: {
2188
- screenSize: {
2189
- width: typeof window !== "undefined" ? window.screen?.width || 0 : 0,
2190
- height: typeof window !== "undefined" ? window.screen?.height || 0 : 0
2191
- },
2192
- viewportSize: {
2193
- width: typeof window !== "undefined" ? window.innerWidth : 0,
2194
- height: typeof window !== "undefined" ? window.innerHeight : 0
2195
- },
2196
- orientation: "portrait",
2197
- pixelRatio: typeof window !== "undefined" ? window.devicePixelRatio || 1 : 1,
2198
- fontScale: 1,
2199
- deviceType: "phone",
2200
- hapticsEnabled: false,
2201
- haptics: { supported: false, enabled: false }
2202
- },
2203
- theme: {
2204
- background: { default: "#131419", muted: "#1b1d25", dark: "#0d0e11" },
2205
- text: { primary: "#ffffff", muted: "#808080", inverted: "#000000" },
2206
- theme: {
2207
- primary: "#f6c833",
2208
- secondary: "#6366f1",
2209
- background: "#131419",
2210
- border: "#262626",
2211
- card: "#1b1d25",
2212
- "card-glass": "rgba(27, 29, 37, 0.8)"
2213
- },
2214
- typography: {
2215
- fontFamily: {
2216
- base: "Plus Jakarta Sans, Roboto, sans-serif",
2217
- heading: "Plus Jakarta Sans, Roboto, sans-serif",
2218
- mono: "monospace"
2219
- },
2220
- fontSize: {
2221
- "2xs": "10px",
2222
- xs: "12px",
2223
- sm: "14px",
2224
- md: "16px",
2225
- lg: "18px",
2226
- xl: "20px",
2227
- "2xl": "24px",
2228
- "3xl": "30px",
2229
- "4xl": "36px",
2230
- "5xl": "48px",
2231
- "6xl": "60px"
2232
- },
2233
- fontWeight: {
2234
- thin: "100",
2235
- extralight: "200",
2236
- light: "300",
2237
- regular: "400",
2238
- medium: "500",
2239
- semibold: "600",
2240
- bold: "700",
2241
- extrabold: "800",
2242
- black: "900",
2243
- extrablack: "950"
2244
- },
2245
- lineHeight: {
2246
- none: "1",
2247
- tight: "1.25",
2248
- snug: "1.375",
2249
- normal: "1.5",
2250
- relaxed: "1.625",
2251
- loose: "2"
2252
- }
2253
- }
2254
- }
2255
- });
1875
+ this.config = createProxiedObject.call(this, "config", {});
2256
1876
  const originalConfig = this.config;
2257
1877
  this.config = new Proxy(originalConfig, {
2258
1878
  get(target, prop) {
2259
- if (prop === "locale" || prop === "languageCode") {
2260
- console.error(
2261
- `[Venus SDK] config.${prop} is deprecated and will be removed in v4.0.0. Use VenusAPI.${prop === "locale" ? "getLocale()" : "getLanguageCode()"}() instead.`
2262
- );
1879
+ if (prop === "locale") {
1880
+ throw new Error("Use VenusAPI.getLocale() instead.");
1881
+ }
1882
+ if (prop === "languageCode") {
1883
+ throw new Error("Use VenusAPI.getLanguageCode() instead.");
1884
+ }
1885
+ if (prop === "user") {
1886
+ throw new Error("Use VenusAPI.getLocale() and VenusAPI.getLanguageCode() instead.");
1887
+ }
1888
+ if (prop === "device") {
1889
+ throw new Error("Use VenusAPI.system.getDevice() instead.");
1890
+ }
1891
+ if (prop === "environment") {
1892
+ throw new Error("Use VenusAPI.system.getEnvironment() instead.");
1893
+ }
1894
+ if (prop === "profile") {
1895
+ throw new Error("Use VenusAPI.getProfile() instead.");
1896
+ }
1897
+ if (prop === "rooms") {
1898
+ throw new Error("Rooms configuration is internal. Use VenusAPI.rooms methods instead.");
1899
+ }
1900
+ if (prop === "ui") {
1901
+ return new Proxy({}, {
1902
+ get(uiTarget, uiProp) {
1903
+ if (uiProp === "safeArea") {
1904
+ throw new Error("Use VenusAPI.system.getSafeArea() instead.");
1905
+ }
1906
+ if (uiProp === "hudInsets") {
1907
+ throw new Error("Use VenusAPI.system.getSafeArea() instead.");
1908
+ }
1909
+ if (uiProp === "controls") {
1910
+ throw new Error("UI controls are no longer supported.");
1911
+ }
1912
+ throw new Error(`VenusAPI.config.ui.${uiProp} is not supported.`);
1913
+ }
1914
+ });
2263
1915
  }
2264
1916
  return target[prop];
2265
1917
  },
2266
1918
  set(target, prop, value) {
2267
- if (prop === "locale" || prop === "languageCode") {
2268
- console.error(
2269
- `[Venus SDK] config.${prop} is deprecated and will be removed in v4.0.0. Use VenusAPI.${prop === "locale" ? "getLocale()" : "getLanguageCode()"}() instead.`
2270
- );
1919
+ if (prop === "locale" || prop === "languageCode" || prop === "user" || prop === "device" || prop === "environment" || prop === "profile") {
1920
+ throw new Error(`VenusAPI.config.${prop} cannot be set. Configuration is read-only.`);
1921
+ }
1922
+ if (prop === "ui") {
1923
+ console.warn("[Venus SDK] Cannot set config.ui");
1924
+ return true;
2271
1925
  }
2272
1926
  target[prop] = value;
2273
1927
  return true;
1928
+ },
1929
+ has(target, prop) {
1930
+ if (prop === "ui") {
1931
+ return false;
1932
+ }
1933
+ return prop in target;
1934
+ },
1935
+ ownKeys(target) {
1936
+ return Reflect.ownKeys(target).filter((key) => key !== "ui");
1937
+ },
1938
+ getOwnPropertyDescriptor(target, prop) {
1939
+ if (prop === "ui") {
1940
+ return void 0;
1941
+ }
1942
+ return Reflect.getOwnPropertyDescriptor(target, prop);
2274
1943
  }
2275
1944
  });
2276
1945
  const isInsideHostedEnv = this._bootstrap.isInsideHostedEnvironment;
@@ -2279,7 +1948,6 @@ var VenusAPI2 = class {
2279
1948
  initializeStorage(this, host);
2280
1949
  initializeRoomsApi(this, host);
2281
1950
  initializeAds(this, host);
2282
- initializeTheme(this);
2283
1951
  initializePopups(this, host);
2284
1952
  initializeAnalytics(this, host);
2285
1953
  initializeIap(this, host);
@@ -2294,27 +1962,18 @@ var VenusAPI2 = class {
2294
1962
  initializeLoggingApi(this, host);
2295
1963
  const isAvatar3dDisabled = typeof window !== "undefined" && window.location.search.includes("EXPO_PUBLIC_DISABLE_3D_AVATARS=true");
2296
1964
  initializeProfile(this, host);
1965
+ initializeSystem(this, host);
2297
1966
  if (!isAvatar3dDisabled) {
2298
1967
  initializeAvatar3d(this, host);
2299
1968
  }
2300
1969
  initializeStackNavigation(this, host);
2301
- initializePost(this, host);
2302
1970
  initializeAi(this, host);
2303
1971
  initializeSimulation(this, host);
2304
1972
  initializeSocial(this, host);
2305
1973
  initializeAssetLoader(this, createProxiedMethod);
2306
1974
  this.getLocale = () => {
2307
- if (typeof window !== "undefined" && window.venus) {
2308
- const venus = window.venus;
2309
- if (venus.config && venus.config.locale) {
2310
- return venus.config.locale;
2311
- }
2312
- if (venus._config && venus._config.locale) {
2313
- return venus._config.locale;
2314
- }
2315
- if (venus.config?.environment?.browserInfo?.language) {
2316
- return venus.config.environment.browserInfo.language;
2317
- }
1975
+ if (this._localeData) {
1976
+ return this._localeData;
2318
1977
  }
2319
1978
  if (typeof navigator !== "undefined" && navigator.language) {
2320
1979
  return navigator.language;
@@ -2322,6 +1981,9 @@ var VenusAPI2 = class {
2322
1981
  return "en-US";
2323
1982
  };
2324
1983
  this.getLanguageCode = () => {
1984
+ if (this._languageCodeData) {
1985
+ return this._languageCodeData;
1986
+ }
2325
1987
  const locale = this.getLocale();
2326
1988
  return locale.split("-")[0];
2327
1989
  };
@@ -2361,21 +2023,14 @@ var VenusAPI2 = class {
2361
2023
  // BOOTSTRAP METHODS
2362
2024
  //---------------------------------------
2363
2025
  _detectHostedEnvironment() {
2364
- console.log("[Venus SDK] Detecting host environment...");
2365
2026
  const isInIframe = window.self !== window.top;
2366
2027
  const hasReactNativeWebView = typeof window.ReactNativeWebView !== "undefined";
2367
2028
  this._bootstrap.isInsideHostedEnvironment = isInIframe || hasReactNativeWebView;
2368
- console.log(
2369
- `[Venus SDK] isInIframe: ${isInIframe}, hasReactNativeWebView: ${hasReactNativeWebView}`
2370
- );
2371
- }
2372
- isMobile() {
2373
- return typeof window.ReactNativeWebView !== "undefined";
2374
2029
  }
2375
2030
  _initializeMockMode() {
2376
2031
  if (this._mock.localeOverride) {
2377
- this.config.locale = this._mock.localeOverride;
2378
- this.config.languageCode = this._mock.localeOverride.split("-")[0];
2032
+ this._localeData = this._mock.localeOverride;
2033
+ this._languageCodeData = this._mock.localeOverride.split("-")[0];
2379
2034
  }
2380
2035
  if (this._mock.roomsData) {
2381
2036
  console.warn(
@@ -2395,6 +2050,10 @@ var VenusAPI2 = class {
2395
2050
  }
2396
2051
  this._shared.initPromise = new Promise(async (resolve, reject) => {
2397
2052
  try {
2053
+ if (this.isMock() && options?.mock) {
2054
+ Object.assign(this._mock, options.mock);
2055
+ console.log("[VenusAPI] Mock options applied:", options.mock);
2056
+ }
2398
2057
  const result = await this.host.initialize(options);
2399
2058
  this._shared.initialized = true;
2400
2059
  if (!options || !options.usePreloader) {
@@ -2422,7 +2081,6 @@ instance.isAvailable = function() {
2422
2081
  (async () => {
2423
2082
  try {
2424
2083
  await initializeNumbers(instance);
2425
- console.log("[Venus SDK] Numbers system initialized");
2426
2084
  } catch (error) {
2427
2085
  console.error("[Venus SDK] Failed to initialize numbers system:", error);
2428
2086
  }