@livx.cc/appwrap 0.61.16 → 0.61.17

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/appwrap",
3
- "version": "0.61.16",
3
+ "version": "0.61.17",
4
4
  "description": "Wrap any PWA into a native app with native capabilities (appwrap runtime + @livx.cc/native-kit).",
5
5
  "license": "MIT",
6
6
  "author": "Elya Livshitz",
@@ -93,7 +93,14 @@ function registerIos(): void {
93
93
  ] as any);
94
94
 
95
95
  ObserverClass ??= (NSObject as any).extend(
96
- { observeValueForKeyPathOfObjectChangeContext() { emitState(); } },
96
+ {
97
+ observeValueForKeyPathOfObjectChangeContext() {
98
+ // Shell-coloured + non-opaque only to avoid a white flash before the first load; after it, WebKit
99
+ // must paint the page's own canvas, or a page with no background shows the (dark) shell through.
100
+ if (wv && !wv.opaque && !wv.loading && wv.URL) wv.opaque = true;
101
+ emitState();
102
+ },
103
+ },
97
104
  { name: 'AppwrapWebViewOverlayObserver' }
98
105
  );
99
106
  observer = ObserverClass.new();