@livx.cc/appwrap 0.61.0 → 0.61.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.
package/package.json
CHANGED
|
@@ -54,6 +54,10 @@ export const SHELL_CONFIG = {
|
|
|
54
54
|
* WebView — regular-native-app behavior. Same-origin SPA navigation is untouched. Off by default.
|
|
55
55
|
* See `externalNavGuardJs`. */
|
|
56
56
|
openNewWindowsInBrowser: false,
|
|
57
|
+
/** Android only. Lock the WebView's text zoom to 100% so the device's system font-size setting
|
|
58
|
+
* doesn't scale text inside the app. Default true (native-app behavior). False = respect the
|
|
59
|
+
* user's OS font-size preference. No effect on iOS (WKWebView ignores Dynamic Type). */
|
|
60
|
+
androidLockTextZoom: true,
|
|
57
61
|
/** Remote push configured, per platform (iOS aps-environment entitlement / Android FCM). Drives the
|
|
58
62
|
* `push` capability flag at runtime by platform — off unless `appwrap.json.push` enables it, so an
|
|
59
63
|
* un-provisioned build honestly reports 'none' (and a personal-team iOS build keeps `pushIos:false`). */
|
|
@@ -168,6 +168,9 @@ export class CustomWebView extends WebView {
|
|
|
168
168
|
settings.setSupportZoom(false);
|
|
169
169
|
settings.setBuiltInZoomControls(false);
|
|
170
170
|
settings.setDisplayZoomControls(false);
|
|
171
|
+
// Lock text zoom to 100% so Android system font scaling doesn't inflate WebView text.
|
|
172
|
+
// Controlled by appwrap config `androidLockTextZoom` (default true — native-app behavior).
|
|
173
|
+
if (SHELL_CONFIG.androidLockTextZoom !== false) settings.setTextZoom(100);
|
|
171
174
|
// No rubber-band overscroll glow.
|
|
172
175
|
wv.setOverScrollMode(android.view.View.OVER_SCROLL_NEVER);
|
|
173
176
|
|
package/src/cli.ts
CHANGED
|
@@ -948,6 +948,7 @@ export const SHELL_CONFIG = {
|
|
|
948
948
|
neutralizeServiceWorker: ${JSON.stringify(cfg.neutralizeServiceWorker ?? true)},
|
|
949
949
|
appBoundDomains: ${JSON.stringify(cfg.appBoundDomains ?? [])} as string[],
|
|
950
950
|
openNewWindowsInBrowser: ${JSON.stringify(cfg.openNewWindowsInBrowser ?? false)},
|
|
951
|
+
androidLockTextZoom: ${JSON.stringify(cfg.androidLockTextZoom ?? true)},
|
|
951
952
|
pushIos: ${JSON.stringify(!!cfg.push?.enabled && cfg.push?.ios !== false)},
|
|
952
953
|
pushAndroid: ${JSON.stringify(!!cfg.push?.enabled && cfg.push?.android !== false)},
|
|
953
954
|
pushRegistrationUrl: ${JSON.stringify(cfg.push?.registrationUrl ?? '')},
|
package/src/config.ts
CHANGED
|
@@ -239,6 +239,11 @@ export interface AppwrapConfig {
|
|
|
239
239
|
* same-origin SPA navigation, subframes/iframes and `tel:`/`mailto:` are left untouched. Default
|
|
240
240
|
* `false` (unchanged in-WebView navigation). See `externalNavGuardJs`. */
|
|
241
241
|
openNewWindowsInBrowser?: boolean;
|
|
242
|
+
/** Android only. Lock the WebView's text zoom to 100% so the device's system font-size setting
|
|
243
|
+
* doesn't scale text inside the app. Default `true` — the app controls its own sizing (native-app
|
|
244
|
+
* behavior). Set `false` to let the WebView respect the user's OS-level font-size preference
|
|
245
|
+
* (accessibility). Has no effect on iOS — WKWebView does not apply Dynamic Type to web content. */
|
|
246
|
+
androidLockTextZoom?: boolean;
|
|
242
247
|
/** Apple Development Team ID for device builds (Xcode → Settings → Accounts). */
|
|
243
248
|
teamId?: string;
|
|
244
249
|
/** Path (relative to the PWA project) to a StoreKit configuration file for LOCAL IAP
|
|
@@ -383,7 +388,7 @@ export function defineConfig(config: AppwrapConfig): AppwrapConfig {
|
|
|
383
388
|
export const KNOWN_CONFIG_KEYS: ReadonlySet<string> = new Set([
|
|
384
389
|
'androidAppLinks', 'appBoundDomains', 'backendOrigin', 'backgroundAudio', 'backgroundColor', 'backgroundTasks', 'buildNumber', 'ci', 'debug',
|
|
385
390
|
'debugLog', 'desktop', 'devMenu', 'edgeToEdge', 'entry', 'icon', 'id', 'iosKeyboardExtraLift', 'loader', 'modules', 'modulePacks', 'name',
|
|
386
|
-
'envSwitcher', 'iosEntitlements', 'neutralizeServiceWorker', 'oauthRedirectSchemes', 'openNewWindowsInBrowser', 'orientation', 'overrides', 'permissions',
|
|
391
|
+
'androidLockTextZoom', 'envSwitcher', 'iosEntitlements', 'neutralizeServiceWorker', 'oauthRedirectSchemes', 'openNewWindowsInBrowser', 'orientation', 'overrides', 'permissions',
|
|
387
392
|
'plugins', 'push', 'pwaDist', 'queryPackages', 'queryUrlSchemes', 'serverUrl', 'shareTarget', 'signing', 'signingProfiles', 'statusBarStyle', 'store',
|
|
388
393
|
'splashIcon', 'storekitConfig', 'targetedDevices', 'teamId', 'themeColor', 'trackingDomains', 'urlScheme',
|
|
389
394
|
'usesNonExemptEncryption', 'vendorPaths', 'version',
|