vxrn 2.14.0 → 2.14.2

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.
@@ -88,6 +88,29 @@ console.error = console.error || function() {};
88
88
  console.debug = console.debug || function() {};
89
89
  console.trace = console.trace || function() {};
90
90
 
91
+ // forward console to the host's logging hook (logcat, os_log) like react native's console polyfill; levels: trace 0, info 1, warn 2, error 3
92
+ if (globalThis.nativeLoggingHook) {
93
+ var forwardConsole = function(name, level) {
94
+ var original = console[name];
95
+ console[name] = function() {
96
+ var parts = [];
97
+ for (var i = 0; i < arguments.length; i++) {
98
+ var arg = arguments[i];
99
+ try { parts.push(typeof arg === 'string' ? arg : arg instanceof Error ? arg.stack || String(arg) : typeof arg === 'object' && arg !== null ? JSON.stringify(arg) : String(arg)); }
100
+ catch (e) { parts.push(String(arg)); }
101
+ }
102
+ globalThis.nativeLoggingHook(parts.join(' '), level);
103
+ return original.apply(console, arguments);
104
+ };
105
+ };
106
+ forwardConsole('trace', 0);
107
+ forwardConsole('log', 1);
108
+ forwardConsole('info', 1);
109
+ forwardConsole('debug', 1);
110
+ forwardConsole('warn', 2);
111
+ forwardConsole('error', 3);
112
+ }
113
+
91
114
  // reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash
92
115
  console.assert = console.assert || function() {};
93
116
  console.clear = console.clear || function() {};
@@ -1 +1 @@
1
- {"version":3,"file":"native-prelude.js","names":[],"sources":["runtime/native-prelude.js"],"sourcesContent":["function getNativePrelude(options) {\n\treturn `\nvar __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();\n\nvar global = typeof globalThis !== 'undefined' ? globalThis\n : typeof global !== 'undefined' ? global\n : typeof window !== 'undefined' ? window\n : this;\n\nglobalThis.global = global;\nglobalThis.__DEV__ = ${options.dev};\n\n// react native polyfills\nglobal.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;\nglobal.Event = global.Event || function() { return this; };\nglobal.dispatchEvent = global.dispatchEvent || function() {};\nglobal.window = global.window || global;\nglobal.self = global.self || global;\nglobal.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };\nglobal.performance = global.performance || { now: function() { return Date.now(); } };\n\n// hermes can expose addEventListener without the matching removal API. browser\n// libraries use addEventListener as their capability check, then crash during\n// cleanup. keep the incomplete host API from advertising browser event support.\n// the bundle runs at script scope, so a module's own top-level\n// function addEventListener declaration is also this global; only a native host function is cleared.\nif (\n typeof global.addEventListener === 'function' &&\n typeof global.removeEventListener !== 'function' &&\n Function.prototype.toString.call(global.addEventListener).indexOf('[native code]') !== -1\n) {\n global.addEventListener = undefined;\n}\n\n// ErrorUtils - used by RN's error handling system\nif (!global.ErrorUtils) {\n var _handler = null;\n global.ErrorUtils = {\n setGlobalHandler: function(h) { _handler = h; },\n getGlobalHandler: function() { return _handler; },\n reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },\n reportError: function(e) { if (_handler) _handler(e, false); },\n applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },\n };\n}\n\nif (typeof process === 'undefined') {\n globalThis.process = { env: {} };\n}\nprocess.env.NODE_ENV = ${JSON.stringify(options.dev ? \"development\" : \"production\")};\nprocess.env.ONE_PLATFORM = ${JSON.stringify(options.platform)};\nprocess.env.EXPO_OS = ${JSON.stringify(options.platform)};\nprocess.env.TAMAGUI_TARGET = 'native';\n${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : \"\"}\n\n// polyfill setImmediate (used by react-native internals)\nif (typeof globalThis.setImmediate === 'undefined') {\n globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };\n globalThis.clearImmediate = function(id) { clearTimeout(id); };\n}\n\n// polyfill URLSearchParams early (before whatwg-fetch checks for it)\n// RN's polyfillGlobal sets this up later but some modules check at import time\nif (typeof globalThis.URLSearchParams === 'undefined') {\n // minimal URLSearchParams polyfill - will be overridden by RN's proper one\n globalThis.URLSearchParams = function URLSearchParams(init) {\n this._params = {};\n if (typeof init === 'string') {\n init.replace(/^\\\\?/, '').split('&').forEach(function(p) {\n var kv = p.split('=');\n if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');\n }.bind(this));\n }\n };\n globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };\n globalThis.URLSearchParams.prototype.toString = function() {\n return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');\n };\n}\n\n// ensure console exists before any library prelude touches it in release bundles\nglobalThis.console = globalThis.console || {};\nvar console = globalThis.console;\nconsole.log = console.log || function() {};\nconsole.info = console.info || function() {};\nconsole.warn = console.warn || function() {};\nconsole.error = console.error || function() {};\nconsole.debug = console.debug || function() {};\nconsole.trace = console.trace || function() {};\n\n// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash\nconsole.assert = console.assert || function() {};\nconsole.clear = console.clear || function() {};\nconsole.dir = console.dir || function() {};\nconsole.dirxml = console.dirxml || function() {};\nconsole.profile = console.profile || function() {};\nconsole.profileEnd = console.profileEnd || function() {};\nconsole.table = console.table || function() {};\n\n// react refresh stubs (overridden by react-refresh plugin in dev)\n${options.dev ? `\nvar $RefreshReg$ = function() {};\nvar $RefreshSig$ = function() { return function(v) { return v; }; };\n` : \"\"}\n`.trim();\n}\n\nexport { getNativePrelude };"],"mappings":";AAAA,SAAS,iBAAiB,SAAS;CAClC,OAAO;;;;;;;;;uBASe,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAuCV,KAAK,UAAU,QAAQ,MAAM,gBAAgB,YAAY,EAAE;6BACvD,KAAK,UAAU,QAAQ,QAAQ,EAAE;wBACtC,KAAK,UAAU,QAAQ,QAAQ,EAAE;;EAEvD,QAAQ,YAAY,gCAAgC,KAAK,UAAU,QAAQ,SAAS,EAAE,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+C9F,QAAQ,MAAM;;;IAGZ,GAAG;EACL,KAAK;AACP"}
1
+ {"version":3,"file":"native-prelude.js","names":[],"sources":["runtime/native-prelude.js"],"sourcesContent":["function getNativePrelude(options) {\n\treturn `\nvar __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();\n\nvar global = typeof globalThis !== 'undefined' ? globalThis\n : typeof global !== 'undefined' ? global\n : typeof window !== 'undefined' ? window\n : this;\n\nglobalThis.global = global;\nglobalThis.__DEV__ = ${options.dev};\n\n// react native polyfills\nglobal.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;\nglobal.Event = global.Event || function() { return this; };\nglobal.dispatchEvent = global.dispatchEvent || function() {};\nglobal.window = global.window || global;\nglobal.self = global.self || global;\nglobal.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };\nglobal.performance = global.performance || { now: function() { return Date.now(); } };\n\n// hermes can expose addEventListener without the matching removal API. browser\n// libraries use addEventListener as their capability check, then crash during\n// cleanup. keep the incomplete host API from advertising browser event support.\n// the bundle runs at script scope, so a module's own top-level\n// function addEventListener declaration is also this global; only a native host function is cleared.\nif (\n typeof global.addEventListener === 'function' &&\n typeof global.removeEventListener !== 'function' &&\n Function.prototype.toString.call(global.addEventListener).indexOf('[native code]') !== -1\n) {\n global.addEventListener = undefined;\n}\n\n// ErrorUtils - used by RN's error handling system\nif (!global.ErrorUtils) {\n var _handler = null;\n global.ErrorUtils = {\n setGlobalHandler: function(h) { _handler = h; },\n getGlobalHandler: function() { return _handler; },\n reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },\n reportError: function(e) { if (_handler) _handler(e, false); },\n applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },\n };\n}\n\nif (typeof process === 'undefined') {\n globalThis.process = { env: {} };\n}\nprocess.env.NODE_ENV = ${JSON.stringify(options.dev ? \"development\" : \"production\")};\nprocess.env.ONE_PLATFORM = ${JSON.stringify(options.platform)};\nprocess.env.EXPO_OS = ${JSON.stringify(options.platform)};\nprocess.env.TAMAGUI_TARGET = 'native';\n${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : \"\"}\n\n// polyfill setImmediate (used by react-native internals)\nif (typeof globalThis.setImmediate === 'undefined') {\n globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };\n globalThis.clearImmediate = function(id) { clearTimeout(id); };\n}\n\n// polyfill URLSearchParams early (before whatwg-fetch checks for it)\n// RN's polyfillGlobal sets this up later but some modules check at import time\nif (typeof globalThis.URLSearchParams === 'undefined') {\n // minimal URLSearchParams polyfill - will be overridden by RN's proper one\n globalThis.URLSearchParams = function URLSearchParams(init) {\n this._params = {};\n if (typeof init === 'string') {\n init.replace(/^\\\\?/, '').split('&').forEach(function(p) {\n var kv = p.split('=');\n if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');\n }.bind(this));\n }\n };\n globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };\n globalThis.URLSearchParams.prototype.toString = function() {\n return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');\n };\n}\n\n// ensure console exists before any library prelude touches it in release bundles\nglobalThis.console = globalThis.console || {};\nvar console = globalThis.console;\nconsole.log = console.log || function() {};\nconsole.info = console.info || function() {};\nconsole.warn = console.warn || function() {};\nconsole.error = console.error || function() {};\nconsole.debug = console.debug || function() {};\nconsole.trace = console.trace || function() {};\n\n// forward console to the host's logging hook (logcat, os_log) like react native's console polyfill; levels: trace 0, info 1, warn 2, error 3\nif (globalThis.nativeLoggingHook) {\n var forwardConsole = function(name, level) {\n var original = console[name];\n console[name] = function() {\n var parts = [];\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n try { parts.push(typeof arg === 'string' ? arg : arg instanceof Error ? arg.stack || String(arg) : typeof arg === 'object' && arg !== null ? JSON.stringify(arg) : String(arg)); }\n catch (e) { parts.push(String(arg)); }\n }\n globalThis.nativeLoggingHook(parts.join(' '), level);\n return original.apply(console, arguments);\n };\n };\n forwardConsole('trace', 0);\n forwardConsole('log', 1);\n forwardConsole('info', 1);\n forwardConsole('debug', 1);\n forwardConsole('warn', 2);\n forwardConsole('error', 3);\n}\n\n// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash\nconsole.assert = console.assert || function() {};\nconsole.clear = console.clear || function() {};\nconsole.dir = console.dir || function() {};\nconsole.dirxml = console.dirxml || function() {};\nconsole.profile = console.profile || function() {};\nconsole.profileEnd = console.profileEnd || function() {};\nconsole.table = console.table || function() {};\n\n// react refresh stubs (overridden by react-refresh plugin in dev)\n${options.dev ? `\nvar $RefreshReg$ = function() {};\nvar $RefreshSig$ = function() { return function(v) { return v; }; };\n` : \"\"}\n`.trim();\n}\n\nexport { getNativePrelude };"],"mappings":";AAAA,SAAS,iBAAiB,SAAS;CAClC,OAAO;;;;;;;;;uBASe,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAuCV,KAAK,UAAU,QAAQ,MAAM,gBAAgB,YAAY,EAAE;6BACvD,KAAK,UAAU,QAAQ,QAAQ,EAAE;wBACtC,KAAK,UAAU,QAAQ,QAAQ,EAAE;;EAEvD,QAAQ,YAAY,gCAAgC,KAAK,UAAU,QAAQ,SAAS,EAAE,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsE9F,QAAQ,MAAM;;;IAGZ,GAAG;EACL,KAAK;AACP"}
@@ -88,6 +88,29 @@ console.error = console.error || function() {};
88
88
  console.debug = console.debug || function() {};
89
89
  console.trace = console.trace || function() {};
90
90
 
91
+ // forward console to the host's logging hook (logcat, os_log) like react native's console polyfill; levels: trace 0, info 1, warn 2, error 3
92
+ if (globalThis.nativeLoggingHook) {
93
+ var forwardConsole = function(name, level) {
94
+ var original = console[name];
95
+ console[name] = function() {
96
+ var parts = [];
97
+ for (var i = 0; i < arguments.length; i++) {
98
+ var arg = arguments[i];
99
+ try { parts.push(typeof arg === 'string' ? arg : arg instanceof Error ? arg.stack || String(arg) : typeof arg === 'object' && arg !== null ? JSON.stringify(arg) : String(arg)); }
100
+ catch (e) { parts.push(String(arg)); }
101
+ }
102
+ globalThis.nativeLoggingHook(parts.join(' '), level);
103
+ return original.apply(console, arguments);
104
+ };
105
+ };
106
+ forwardConsole('trace', 0);
107
+ forwardConsole('log', 1);
108
+ forwardConsole('info', 1);
109
+ forwardConsole('debug', 1);
110
+ forwardConsole('warn', 2);
111
+ forwardConsole('error', 3);
112
+ }
113
+
91
114
  // reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash
92
115
  console.assert = console.assert || function() {};
93
116
  console.clear = console.clear || function() {};
@@ -1 +1 @@
1
- {"version":3,"file":"native-prelude.native.js","names":[],"sources":["runtime/native-prelude.native.js"],"sourcesContent":["function getNativePrelude(options) {\n\treturn `\nvar __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();\n\nvar global = typeof globalThis !== 'undefined' ? globalThis\n : typeof global !== 'undefined' ? global\n : typeof window !== 'undefined' ? window\n : this;\n\nglobalThis.global = global;\nglobalThis.__DEV__ = ${options.dev};\n\n// react native polyfills\nglobal.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;\nglobal.Event = global.Event || function() { return this; };\nglobal.dispatchEvent = global.dispatchEvent || function() {};\nglobal.window = global.window || global;\nglobal.self = global.self || global;\nglobal.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };\nglobal.performance = global.performance || { now: function() { return Date.now(); } };\n\n// hermes can expose addEventListener without the matching removal API. browser\n// libraries use addEventListener as their capability check, then crash during\n// cleanup. keep the incomplete host API from advertising browser event support.\n// the bundle runs at script scope, so a module's own top-level\n// function addEventListener declaration is also this global; only a native host function is cleared.\nif (\n typeof global.addEventListener === 'function' &&\n typeof global.removeEventListener !== 'function' &&\n Function.prototype.toString.call(global.addEventListener).indexOf('[native code]') !== -1\n) {\n global.addEventListener = undefined;\n}\n\n// ErrorUtils - used by RN's error handling system\nif (!global.ErrorUtils) {\n var _handler = null;\n global.ErrorUtils = {\n setGlobalHandler: function(h) { _handler = h; },\n getGlobalHandler: function() { return _handler; },\n reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },\n reportError: function(e) { if (_handler) _handler(e, false); },\n applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },\n };\n}\n\nif (typeof process === 'undefined') {\n globalThis.process = { env: {} };\n}\nprocess.env.NODE_ENV = ${JSON.stringify(options.dev ? \"development\" : \"production\")};\nprocess.env.ONE_PLATFORM = ${JSON.stringify(options.platform)};\nprocess.env.EXPO_OS = ${JSON.stringify(options.platform)};\nprocess.env.TAMAGUI_TARGET = 'native';\n${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : \"\"}\n\n// polyfill setImmediate (used by react-native internals)\nif (typeof globalThis.setImmediate === 'undefined') {\n globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };\n globalThis.clearImmediate = function(id) { clearTimeout(id); };\n}\n\n// polyfill URLSearchParams early (before whatwg-fetch checks for it)\n// RN's polyfillGlobal sets this up later but some modules check at import time\nif (typeof globalThis.URLSearchParams === 'undefined') {\n // minimal URLSearchParams polyfill - will be overridden by RN's proper one\n globalThis.URLSearchParams = function URLSearchParams(init) {\n this._params = {};\n if (typeof init === 'string') {\n init.replace(/^\\\\?/, '').split('&').forEach(function(p) {\n var kv = p.split('=');\n if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');\n }.bind(this));\n }\n };\n globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };\n globalThis.URLSearchParams.prototype.toString = function() {\n return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');\n };\n}\n\n// ensure console exists before any library prelude touches it in release bundles\nglobalThis.console = globalThis.console || {};\nvar console = globalThis.console;\nconsole.log = console.log || function() {};\nconsole.info = console.info || function() {};\nconsole.warn = console.warn || function() {};\nconsole.error = console.error || function() {};\nconsole.debug = console.debug || function() {};\nconsole.trace = console.trace || function() {};\n\n// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash\nconsole.assert = console.assert || function() {};\nconsole.clear = console.clear || function() {};\nconsole.dir = console.dir || function() {};\nconsole.dirxml = console.dirxml || function() {};\nconsole.profile = console.profile || function() {};\nconsole.profileEnd = console.profileEnd || function() {};\nconsole.table = console.table || function() {};\n\n// react refresh stubs (overridden by react-refresh plugin in dev)\n${options.dev ? `\nvar $RefreshReg$ = function() {};\nvar $RefreshSig$ = function() { return function(v) { return v; }; };\n` : \"\"}\n`.trim();\n}\n\nexport { getNativePrelude };"],"mappings":";AAAA,SAAS,iBAAiB,SAAS;CAClC,OAAO;;;;;;;;;uBASe,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAuCV,KAAK,UAAU,QAAQ,MAAM,gBAAgB,YAAY,EAAE;6BACvD,KAAK,UAAU,QAAQ,QAAQ,EAAE;wBACtC,KAAK,UAAU,QAAQ,QAAQ,EAAE;;EAEvD,QAAQ,YAAY,gCAAgC,KAAK,UAAU,QAAQ,SAAS,EAAE,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+C9F,QAAQ,MAAM;;;IAGZ,GAAG;EACL,KAAK;AACP"}
1
+ {"version":3,"file":"native-prelude.native.js","names":[],"sources":["runtime/native-prelude.native.js"],"sourcesContent":["function getNativePrelude(options) {\n\treturn `\nvar __BUNDLE_START_TIME__ = globalThis.nativePerformanceNow ? nativePerformanceNow() : Date.now();\n\nvar global = typeof globalThis !== 'undefined' ? globalThis\n : typeof global !== 'undefined' ? global\n : typeof window !== 'undefined' ? window\n : this;\n\nglobalThis.global = global;\nglobalThis.__DEV__ = ${options.dev};\n\n// react native polyfills\nglobal.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__ = false;\nglobal.Event = global.Event || function() { return this; };\nglobal.dispatchEvent = global.dispatchEvent || function() {};\nglobal.window = global.window || global;\nglobal.self = global.self || global;\nglobal.navigator = global.navigator || { product: 'ReactNative', userAgent: '' };\nglobal.performance = global.performance || { now: function() { return Date.now(); } };\n\n// hermes can expose addEventListener without the matching removal API. browser\n// libraries use addEventListener as their capability check, then crash during\n// cleanup. keep the incomplete host API from advertising browser event support.\n// the bundle runs at script scope, so a module's own top-level\n// function addEventListener declaration is also this global; only a native host function is cleared.\nif (\n typeof global.addEventListener === 'function' &&\n typeof global.removeEventListener !== 'function' &&\n Function.prototype.toString.call(global.addEventListener).indexOf('[native code]') !== -1\n) {\n global.addEventListener = undefined;\n}\n\n// ErrorUtils - used by RN's error handling system\nif (!global.ErrorUtils) {\n var _handler = null;\n global.ErrorUtils = {\n setGlobalHandler: function(h) { _handler = h; },\n getGlobalHandler: function() { return _handler; },\n reportFatalError: function(e) { if (_handler) _handler(e, true); else throw e; },\n reportError: function(e) { if (_handler) _handler(e, false); },\n applyWithGuard: function(fn, ctx, args) { try { return fn.apply(ctx, args); } catch(e) { this.reportError(e); } },\n };\n}\n\nif (typeof process === 'undefined') {\n globalThis.process = { env: {} };\n}\nprocess.env.NODE_ENV = ${JSON.stringify(options.dev ? \"development\" : \"production\")};\nprocess.env.ONE_PLATFORM = ${JSON.stringify(options.platform)};\nprocess.env.EXPO_OS = ${JSON.stringify(options.platform)};\nprocess.env.TAMAGUI_TARGET = 'native';\n${options.serverUrl ? `process.env.ONE_SERVER_URL = ${JSON.stringify(options.serverUrl)};` : \"\"}\n\n// polyfill setImmediate (used by react-native internals)\nif (typeof globalThis.setImmediate === 'undefined') {\n globalThis.setImmediate = function(fn) { return setTimeout(fn, 0); };\n globalThis.clearImmediate = function(id) { clearTimeout(id); };\n}\n\n// polyfill URLSearchParams early (before whatwg-fetch checks for it)\n// RN's polyfillGlobal sets this up later but some modules check at import time\nif (typeof globalThis.URLSearchParams === 'undefined') {\n // minimal URLSearchParams polyfill - will be overridden by RN's proper one\n globalThis.URLSearchParams = function URLSearchParams(init) {\n this._params = {};\n if (typeof init === 'string') {\n init.replace(/^\\\\?/, '').split('&').forEach(function(p) {\n var kv = p.split('=');\n if (kv[0]) this._params[decodeURIComponent(kv[0])] = decodeURIComponent(kv[1] || '');\n }.bind(this));\n }\n };\n globalThis.URLSearchParams.prototype.get = function(k) { return this._params[k] || null; };\n globalThis.URLSearchParams.prototype.toString = function() {\n return Object.keys(this._params).map(function(k) { return encodeURIComponent(k) + '=' + encodeURIComponent(this._params[k]); }.bind(this)).join('&');\n };\n}\n\n// ensure console exists before any library prelude touches it in release bundles\nglobalThis.console = globalThis.console || {};\nvar console = globalThis.console;\nconsole.log = console.log || function() {};\nconsole.info = console.info || function() {};\nconsole.warn = console.warn || function() {};\nconsole.error = console.error || function() {};\nconsole.debug = console.debug || function() {};\nconsole.trace = console.trace || function() {};\n\n// forward console to the host's logging hook (logcat, os_log) like react native's console polyfill; levels: trace 0, info 1, warn 2, error 3\nif (globalThis.nativeLoggingHook) {\n var forwardConsole = function(name, level) {\n var original = console[name];\n console[name] = function() {\n var parts = [];\n for (var i = 0; i < arguments.length; i++) {\n var arg = arguments[i];\n try { parts.push(typeof arg === 'string' ? arg : arg instanceof Error ? arg.stack || String(arg) : typeof arg === 'object' && arg !== null ? JSON.stringify(arg) : String(arg)); }\n catch (e) { parts.push(String(arg)); }\n }\n globalThis.nativeLoggingHook(parts.join(' '), level);\n return original.apply(console, arguments);\n };\n };\n forwardConsole('trace', 0);\n forwardConsole('log', 1);\n forwardConsole('info', 1);\n forwardConsole('debug', 1);\n forwardConsole('warn', 2);\n forwardConsole('error', 3);\n}\n\n// reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash\nconsole.assert = console.assert || function() {};\nconsole.clear = console.clear || function() {};\nconsole.dir = console.dir || function() {};\nconsole.dirxml = console.dirxml || function() {};\nconsole.profile = console.profile || function() {};\nconsole.profileEnd = console.profileEnd || function() {};\nconsole.table = console.table || function() {};\n\n// react refresh stubs (overridden by react-refresh plugin in dev)\n${options.dev ? `\nvar $RefreshReg$ = function() {};\nvar $RefreshSig$ = function() { return function(v) { return v; }; };\n` : \"\"}\n`.trim();\n}\n\nexport { getNativePrelude };"],"mappings":";AAAA,SAAS,iBAAiB,SAAS;CAClC,OAAO;;;;;;;;;uBASe,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAuCV,KAAK,UAAU,QAAQ,MAAM,gBAAgB,YAAY,EAAE;6BACvD,KAAK,UAAU,QAAQ,QAAQ,EAAE;wBACtC,KAAK,UAAU,QAAQ,QAAQ,EAAE;;EAEvD,QAAQ,YAAY,gCAAgC,KAAK,UAAU,QAAQ,SAAS,EAAE,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAsE9F,QAAQ,MAAM;;;IAGZ,GAAG;EACL,KAAK;AACP"}
@@ -521,6 +521,11 @@ cd -
521
521
  * Ensure patches are applied.
522
522
  */
523
523
  function addDepsPatchToAppBuildGradle(input) {
524
+ // enableEdgeToEdge() in MainActivity needs androidx.activity 1.8+, newer than the template resolves
525
+ const activityDependency = 'implementation "androidx.activity:activity:1.9.3"'
526
+ if (!input.includes(activityDependency)) {
527
+ input += `\ndependencies {\n ${activityDependency}\n}\n`
528
+ }
524
529
  if (input.includes('[vxrn/one] ensure patches are applied')) {
525
530
  return input
526
531
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vxrn",
3
- "version": "2.14.0",
3
+ "version": "2.14.2",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -80,14 +80,14 @@
80
80
  "@react-native-community/cli": "^20.2.0",
81
81
  "@react-native-community/cli-config": "^20.2.0",
82
82
  "@react-native/dev-middleware": "^0.88.0",
83
- "@vxrn/compiler": "2.14.0",
84
- "@vxrn/debug": "2.14.0",
85
- "@vxrn/query-string": "2.14.0",
86
- "@vxrn/resolve": "2.14.0",
87
- "@vxrn/url-parse": "2.14.0",
88
- "@vxrn/utils": "2.14.0",
89
- "@vxrn/vendor": "2.14.0",
90
- "@vxrn/vite-flow": "2.14.0",
83
+ "@vxrn/compiler": "2.14.2",
84
+ "@vxrn/debug": "2.14.2",
85
+ "@vxrn/query-string": "2.14.2",
86
+ "@vxrn/resolve": "2.14.2",
87
+ "@vxrn/url-parse": "2.14.2",
88
+ "@vxrn/utils": "2.14.2",
89
+ "@vxrn/vendor": "2.14.2",
90
+ "@vxrn/vite-flow": "2.14.2",
91
91
  "citty": "^0.1.6",
92
92
  "dotenv": "^17.2.1",
93
93
  "dotenv-expand": "^12.0.2",
@@ -121,20 +121,20 @@
121
121
  "react-native": "0.88.0",
122
122
  "typescript": "7.0.2",
123
123
  "vitest": "^4.1.0",
124
- "@vxrn/vite-plugin-metro": "2.14.0"
124
+ "@vxrn/vite-plugin-metro": "2.14.2"
125
125
  },
126
126
  "publishConfig": {
127
127
  "access": "public"
128
128
  },
129
129
  "peerDependencies": {
130
- "@vxrn/vite-plugin-metro": "2.14.0"
130
+ "@vxrn/vite-plugin-metro": "2.14.2"
131
131
  },
132
132
  "peerDependenciesMeta": {
133
133
  "@vxrn/vite-plugin-metro": {
134
134
  "optional": true
135
135
  }
136
136
  },
137
- "releaseSourceCommit": "283ebc3bc2773b8d31b56b08f4de59dbca26c1d6",
137
+ "releaseSourceCommit": "16175b9a93e540cad20b5a9c625a904f923e4ddd",
138
138
  "repository": {
139
139
  "type": "git",
140
140
  "url": "git+https://github.com/onejs/one.git",
@@ -99,6 +99,29 @@ console.error = console.error || function() {};
99
99
  console.debug = console.debug || function() {};
100
100
  console.trace = console.trace || function() {};
101
101
 
102
+ // forward console to the host's logging hook (logcat, os_log) like react native's console polyfill; levels: trace 0, info 1, warn 2, error 3
103
+ if (globalThis.nativeLoggingHook) {
104
+ var forwardConsole = function(name, level) {
105
+ var original = console[name];
106
+ console[name] = function() {
107
+ var parts = [];
108
+ for (var i = 0; i < arguments.length; i++) {
109
+ var arg = arguments[i];
110
+ try { parts.push(typeof arg === 'string' ? arg : arg instanceof Error ? arg.stack || String(arg) : typeof arg === 'object' && arg !== null ? JSON.stringify(arg) : String(arg)); }
111
+ catch (e) { parts.push(String(arg)); }
112
+ }
113
+ globalThis.nativeLoggingHook(parts.join(' '), level);
114
+ return original.apply(console, arguments);
115
+ };
116
+ };
117
+ forwardConsole('trace', 0);
118
+ forwardConsole('log', 1);
119
+ forwardConsole('info', 1);
120
+ forwardConsole('debug', 1);
121
+ forwardConsole('warn', 2);
122
+ forwardConsole('error', 3);
123
+ }
124
+
102
125
  // reanimated compat - these console methods must exist to avoid EXC_BAD_ACCESS crash
103
126
  console.assert = console.assert || function() {};
104
127
  console.clear = console.clear || function() {};
@@ -1 +1 @@
1
- {"version":3,"file":"native-prelude.d.ts","sourceRoot":"","sources":["../../src/runtime/native-prelude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,GAAG,EAAE,OAAO,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CA6GT"}
1
+ {"version":3,"file":"native-prelude.d.ts","sourceRoot":"","sources":["../../src/runtime/native-prelude.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE;IACxC,GAAG,EAAE,OAAO,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB,GAAG,MAAM,CAoIT"}