@quicktvui/web-cli 1.0.0-beta.22 → 1.0.0-beta.23

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": "@quicktvui/web-cli",
3
- "version": "1.0.0-beta.22",
3
+ "version": "1.0.0-beta.23",
4
4
  "description": "CLI tool for QuickTVUI web development - zero configuration",
5
5
  "author": "QuickTVUI Team",
6
6
  "license": "Apache-2.0",
@@ -50,6 +50,7 @@
50
50
  height: 1080px !important;
51
51
  transform-origin: top left;
52
52
  background-color: #26292F;
53
+ visibility: hidden;
53
54
  }
54
55
  /* 返回按钮样式 */
55
56
  #web-back-btn {
@@ -131,6 +132,9 @@
131
132
  var offsetY = (_originalInnerHeight - TV_HEIGHT * scale) / 2;
132
133
  app.style.marginLeft = offsetX + 'px';
133
134
  app.style.marginTop = offsetY + 'px';
135
+
136
+ // Show the app after positioning
137
+ app.style.visibility = 'visible';
134
138
 
135
139
  // 更新返回按钮位置,相对于 #app 左上角
136
140
  var btn = document.getElementById('web-back-btn');
@@ -144,6 +148,13 @@
144
148
  }
145
149
  }
146
150
  }
151
+
152
+ // Execute immediately when DOM is ready (before load event)
153
+ if (document.readyState === 'loading') {
154
+ document.addEventListener('DOMContentLoaded', scaleApp);
155
+ } else {
156
+ scaleApp();
157
+ }
147
158
  window.addEventListener('load', scaleApp);
148
159
  window.addEventListener('resize', scaleApp);
149
160
  </script>