@dimina-kit/devtools 0.4.0-dev.20260828161241 → 0.4.0-dev.20260831134112

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.
@@ -25,5 +25,5 @@
25
25
  await import('/__sdk__/native-host/render/render.js')
26
26
  </script>
27
27
  </head>
28
- <body></body>
28
+ <body class="dd-page"></body>
29
29
  </html>
@@ -19,17 +19,29 @@ if (!bridgeId) {
19
19
  }
20
20
 
21
21
  // WeChat parity: prime the page's OWN document with its configured
22
- // `window.backgroundColor` before pageFrame.css / @dimina/render load — mirrors
23
- // the real dimina/fe container's `webview.js` (`applyPageStyle()` sets
24
- // `root.style.backgroundColor` before the inner iframe navigates). Without
22
+ // `window.backgroundColor` before pageFrame.css / @dimina/render load. Without
25
23
  // this the guest's document background is UA-default white until the page's
26
24
  // own CSS paints, which is the white flash on every page transition. Applied
27
25
  // as early as the preload can reach `document.documentElement` and again on
28
26
  // DOMContentLoaded in case the element wasn't attached yet.
27
+ //
28
+ // `documentElement` only — never `body`. `body` carries the `.dd-page` class
29
+ // that `installPageFrameStyleScopes` (dimina/fe render runtime) gates the page's
30
+ // own `data-v-*` scope attributes on, which makes `body` the element that
31
+ // `page { ... }` rules from the app's wxss compile down to. An inline
32
+ // background-color there outranks any stylesheet rule, so it would silently
33
+ // override the app's own `page { background-color: ... }` with this
34
+ // window-config default.
35
+ //
36
+ // Upstream's `applyPageStyle()` (container-sdk webview.ts) is NOT a precedent
37
+ // for touching the guest's body: the `root` it colors is
38
+ // `.dimina-native-webview__root`, the container element OUTSIDE the guest
39
+ // iframe. Our equivalent of that layer is the host-side `<webview>` element's
40
+ // own CSS (see miniapp-frame.tsx), which stays as the first white-flash
41
+ // primer; this `documentElement` write is the second.
29
42
  if (bgColor) {
30
43
  const applyBackgroundColor = () => {
31
44
  if (document.documentElement) document.documentElement.style.backgroundColor = bgColor
32
- if (document.body) document.body.style.backgroundColor = bgColor
33
45
  }
34
46
  applyBackgroundColor()
35
47
  globalThis.addEventListener('DOMContentLoaded', applyBackgroundColor)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dimina-kit/devtools",
3
- "version": "0.4.0-dev.20260828161241",
3
+ "version": "0.4.0-dev.20260831134112",
4
4
  "description": "Dimina DevTools - modular developer tools for mini app debugging",
5
5
  "keywords": [
6
6
  "dimina",
@@ -90,11 +90,11 @@
90
90
  "chrome-remote-interface": "^0.34.0",
91
91
  "ws": "^8.20.0",
92
92
  "zod": "^4.3.6",
93
- "@dimina-kit/devkit": "0.1.2-dev.20260828161241",
94
- "@dimina-kit/electron-runtime": "0.1.0-dev.20260828161241",
95
- "@dimina-kit/inspect": "0.4.0-dev.20260828161241",
96
- "@dimina-kit/electron-deck": "0.1.0-dev.20260828161241",
97
- "@dimina-kit/view-anchor": "0.1.0-dev.20260828161241"
93
+ "@dimina-kit/electron-deck": "0.1.0-dev.20260831134112",
94
+ "@dimina-kit/devkit": "0.1.2-dev.20260831134112",
95
+ "@dimina-kit/electron-runtime": "0.1.0-dev.20260831134112",
96
+ "@dimina-kit/inspect": "0.4.0-dev.20260831134112",
97
+ "@dimina-kit/view-anchor": "0.1.0-dev.20260831134112"
98
98
  },
99
99
  "devDependencies": {
100
100
  "@playwright/test": "^1.59.1",
@@ -138,9 +138,9 @@
138
138
  "typescript": "5.9.2",
139
139
  "vite": "^8.0.8",
140
140
  "vitest": "^4.1.4",
141
+ "@dimina-kit/workbench": "0.1.0",
141
142
  "@dimina-kit/eslint-config": "0.1.0",
142
- "@dimina-kit/typescript-config": "0.1.0",
143
- "@dimina-kit/workbench": "0.1.0"
143
+ "@dimina-kit/typescript-config": "0.1.0"
144
144
  },
145
145
  "peerDependencies": {
146
146
  "electron": "^43.2.0"