@dimina-kit/devtools 0.4.0-dev.20260616024534 → 0.4.0-dev.20260616102751
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/dist/main/index.bundle.js +22 -15
- package/dist/main/runtime/devtools-backend.d.ts +5 -0
- package/dist/main/runtime/devtools-backend.js +10 -3
- package/dist/main/services/views/view-manager.js +9 -2
- package/dist/main/services/workspace/workspace-service.js +9 -1
- package/dist/main/windows/main-window/create.js +17 -14
- package/dist/native-host/render/render.js +6 -6
- package/dist/renderer/assets/index-Z4Rh52G8.js +50 -0
- package/dist/renderer/assets/{input-hGF71bn3.js → input-B8NDCYv3.js} +2 -2
- package/dist/renderer/assets/ipc-transport-9agi76dX.css +1 -0
- package/dist/renderer/assets/{ipc-transport-BKWkvwKK.js → ipc-transport-DhrajiC5.js} +1 -1
- package/dist/renderer/assets/{popover-NNQNyjgI.js → popover-DbZOg03s.js} +2 -2
- package/dist/renderer/assets/{select-Bb1AKeSq.js → select-pW3Ysc9T.js} +2 -2
- package/dist/renderer/assets/{settings-7uwimev-.js → settings-CZJOHt8b.js} +2 -2
- package/dist/renderer/assets/{settings-api-DkrPHroq.js → settings-api-BSKzKiWd.js} +2 -2
- package/dist/renderer/assets/{workbenchSettings-EaMYvKHG.js → workbenchSettings-BGxjl25x.js} +2 -2
- package/dist/renderer/entries/main/index.html +6 -6
- package/dist/renderer/entries/popover/index.html +5 -5
- package/dist/renderer/entries/settings/index.html +5 -5
- package/dist/renderer/entries/workbench-settings/index.html +4 -4
- package/dist/shared/types.d.ts +13 -3
- package/package.json +4 -4
- package/dist/renderer/assets/index-BFwsvw4p.js +0 -50
- package/dist/renderer/assets/ipc-transport-Cg1q1gwD.css +0 -1
|
@@ -885,15 +885,13 @@ function createMainWindow(opts) {
|
|
|
885
885
|
}
|
|
886
886
|
});
|
|
887
887
|
mainWindow.once("ready-to-show", () => {
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
mainWindow.webContents.openDevTools({ mode: "detach" });
|
|
896
|
-
}
|
|
888
|
+
const isTest = process.env.NODE_ENV === "test";
|
|
889
|
+
if (opts.autoShow !== false) {
|
|
890
|
+
if (isTest) mainWindow.showInactive();
|
|
891
|
+
else mainWindow.show();
|
|
892
|
+
}
|
|
893
|
+
if (!isTest && !app3.isPackaged && process.env.DIMINA_DEVTOOLS_MAIN_INSPECTOR === "1") {
|
|
894
|
+
mainWindow.webContents.openDevTools({ mode: "detach" });
|
|
897
895
|
}
|
|
898
896
|
});
|
|
899
897
|
const rendererDir2 = path5.dirname(opts.indexHtml);
|
|
@@ -2000,6 +1998,8 @@ function createViewManager(ctx) {
|
|
|
2000
1998
|
function notifyHostToolbarHeight(height) {
|
|
2001
1999
|
hostToolbarLastHeight = height;
|
|
2002
2000
|
ctx.notify.hostToolbarHeightChanged(height);
|
|
2001
|
+
if (settingsViewAdded) applySettingsBounds();
|
|
2002
|
+
if (popoverView) applyPopoverBounds();
|
|
2003
2003
|
}
|
|
2004
2004
|
function setHostToolbarHeight(extent) {
|
|
2005
2005
|
if (hostToolbarHeightMode !== "auto") return;
|
|
@@ -2056,15 +2056,18 @@ function createViewManager(ctx) {
|
|
|
2056
2056
|
return hostToolbarPort.send(channel, payload);
|
|
2057
2057
|
}
|
|
2058
2058
|
};
|
|
2059
|
+
function overlayHeaderHeight() {
|
|
2060
|
+
return HEADER_H + hostToolbarLastHeight;
|
|
2061
|
+
}
|
|
2059
2062
|
function applySettingsBounds() {
|
|
2060
2063
|
if (!settingsView || ctx.windows.mainWindow.isDestroyed()) return;
|
|
2061
2064
|
const [w = 0, h = 0] = ctx.windows.mainWindow.getContentSize();
|
|
2062
|
-
settingsView.setBounds(computeSettingsBounds(w, h,
|
|
2065
|
+
settingsView.setBounds(computeSettingsBounds(w, h, overlayHeaderHeight()));
|
|
2063
2066
|
}
|
|
2064
2067
|
function applyPopoverBounds() {
|
|
2065
2068
|
if (!popoverView || ctx.windows.mainWindow.isDestroyed()) return;
|
|
2066
2069
|
const [w = 0, h = 0] = ctx.windows.mainWindow.getContentSize();
|
|
2067
|
-
popoverView.setBounds(computePopoverBounds(w, h,
|
|
2070
|
+
popoverView.setBounds(computePopoverBounds(w, h, overlayHeaderHeight()));
|
|
2068
2071
|
}
|
|
2069
2072
|
function clearNativeDevtoolsRetry() {
|
|
2070
2073
|
nativeDevtoolsRetryToken++;
|
|
@@ -2950,7 +2953,9 @@ function createWorkspaceService(ctx) {
|
|
|
2950
2953
|
try {
|
|
2951
2954
|
await ctx.onBeforeOpenProject(projectPath);
|
|
2952
2955
|
} catch (err) {
|
|
2953
|
-
|
|
2956
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
2957
|
+
sendStatus("error", error);
|
|
2958
|
+
return { success: false, error };
|
|
2954
2959
|
}
|
|
2955
2960
|
}
|
|
2956
2961
|
clearSimulatorServicewechatReferer();
|
|
@@ -9151,9 +9156,11 @@ function createDevtoolsBackend(config = {}) {
|
|
|
9151
9156
|
// NOTE: `ownsWindows` is NOT structurally required — the framework's
|
|
9152
9157
|
// `mainWindowWebPreferences()` + `onMainWindowCreated()` hooks can supply both,
|
|
9153
9158
|
// and the project close→back lifecycle maps onto the Window facade's
|
|
9154
|
-
// `onClose`/`newSession` (probe-validated).
|
|
9155
|
-
// `runtime.windows.main`
|
|
9156
|
-
//
|
|
9159
|
+
// `onClose`/`newSession` (probe-validated). It is RETAINED BY DECISION, not
|
|
9160
|
+
// inertia: migrating to `runtime.windows.main` buys no user value at high
|
|
9161
|
+
// regression cost (see docs/deck-adoption-decision.md, F1). (The
|
|
9162
|
+
// `persist:simulator` partition is a fixed session used by child WCVs, not
|
|
9163
|
+
// main-window state.)
|
|
9157
9164
|
ownsWindows: true,
|
|
9158
9165
|
// Pre-ready: app name / CDP port / CSP / privileged scheme — must run before
|
|
9159
9166
|
// the framework awaits app.whenReady().
|
|
@@ -12,6 +12,11 @@ import type { WorkbenchAppConfig } from '../../shared/types.js';
|
|
|
12
12
|
* backend is present), so `assemble` ignores the framework `runtime` and builds
|
|
13
13
|
* the real devtools main window itself. Trust/frame unification and surfacing
|
|
14
14
|
* the runtime facade are deferred (see framework-extraction-v2.md §7).
|
|
15
|
+
*
|
|
16
|
+
* NOT migrating onto deck's high-level host API (Window facade / runtime.view /
|
|
17
|
+
* DeckSession / grants) is a DELIBERATE, reviewed decision — not a backlog item.
|
|
18
|
+
* The ROI matrix (every candidate NO-GO) + revisit conditions live in
|
|
19
|
+
* docs/deck-adoption-decision.md. Read it before re-proposing such a migration.
|
|
15
20
|
*/
|
|
16
21
|
export declare function createDevtoolsBackend(config?: WorkbenchAppConfig): RuntimeBackend;
|
|
17
22
|
//# sourceMappingURL=devtools-backend.d.ts.map
|
|
@@ -12,6 +12,11 @@ import { registerAppLifecycle } from '../app/lifecycle.js';
|
|
|
12
12
|
* backend is present), so `assemble` ignores the framework `runtime` and builds
|
|
13
13
|
* the real devtools main window itself. Trust/frame unification and surfacing
|
|
14
14
|
* the runtime facade are deferred (see framework-extraction-v2.md §7).
|
|
15
|
+
*
|
|
16
|
+
* NOT migrating onto deck's high-level host API (Window facade / runtime.view /
|
|
17
|
+
* DeckSession / grants) is a DELIBERATE, reviewed decision — not a backlog item.
|
|
18
|
+
* The ROI matrix (every candidate NO-GO) + revisit conditions live in
|
|
19
|
+
* docs/deck-adoption-decision.md. Read it before re-proposing such a migration.
|
|
15
20
|
*/
|
|
16
21
|
export function createDevtoolsBackend(config = {}) {
|
|
17
22
|
// Hoisted so `onShutdown` can reach the assembled context (assigned by `assemble`).
|
|
@@ -23,9 +28,11 @@ export function createDevtoolsBackend(config = {}) {
|
|
|
23
28
|
// NOTE: `ownsWindows` is NOT structurally required — the framework's
|
|
24
29
|
// `mainWindowWebPreferences()` + `onMainWindowCreated()` hooks can supply both,
|
|
25
30
|
// and the project close→back lifecycle maps onto the Window facade's
|
|
26
|
-
// `onClose`/`newSession` (probe-validated).
|
|
27
|
-
// `runtime.windows.main`
|
|
28
|
-
//
|
|
31
|
+
// `onClose`/`newSession` (probe-validated). It is RETAINED BY DECISION, not
|
|
32
|
+
// inertia: migrating to `runtime.windows.main` buys no user value at high
|
|
33
|
+
// regression cost (see docs/deck-adoption-decision.md, F1). (The
|
|
34
|
+
// `persist:simulator` partition is a fixed session used by child WCVs, not
|
|
35
|
+
// main-window state.)
|
|
29
36
|
ownsWindows: true,
|
|
30
37
|
// Pre-ready: app name / CDP port / CSP / privileged scheme — must run before
|
|
31
38
|
// the framework awaits app.whenReady().
|
|
@@ -264,6 +264,10 @@ export function createViewManager(ctx) {
|
|
|
264
264
|
function notifyHostToolbarHeight(height) {
|
|
265
265
|
hostToolbarLastHeight = height;
|
|
266
266
|
ctx.notify.hostToolbarHeightChanged(height);
|
|
267
|
+
if (settingsViewAdded)
|
|
268
|
+
applySettingsBounds();
|
|
269
|
+
if (popoverView)
|
|
270
|
+
applyPopoverBounds();
|
|
267
271
|
}
|
|
268
272
|
function setHostToolbarHeight(extent) {
|
|
269
273
|
// While the host pins a fixed height, drop advertiser reports entirely —
|
|
@@ -357,17 +361,20 @@ export function createViewManager(ctx) {
|
|
|
357
361
|
return hostToolbarPort.send(channel, payload);
|
|
358
362
|
},
|
|
359
363
|
};
|
|
364
|
+
function overlayHeaderHeight() {
|
|
365
|
+
return HEADER_H + hostToolbarLastHeight;
|
|
366
|
+
}
|
|
360
367
|
function applySettingsBounds() {
|
|
361
368
|
if (!settingsView || ctx.windows.mainWindow.isDestroyed())
|
|
362
369
|
return;
|
|
363
370
|
const [w = 0, h = 0] = ctx.windows.mainWindow.getContentSize();
|
|
364
|
-
settingsView.setBounds(layout.computeSettingsBounds(w, h,
|
|
371
|
+
settingsView.setBounds(layout.computeSettingsBounds(w, h, overlayHeaderHeight()));
|
|
365
372
|
}
|
|
366
373
|
function applyPopoverBounds() {
|
|
367
374
|
if (!popoverView || ctx.windows.mainWindow.isDestroyed())
|
|
368
375
|
return;
|
|
369
376
|
const [w = 0, h = 0] = ctx.windows.mainWindow.getContentSize();
|
|
370
|
-
popoverView.setBounds(layout.computePopoverBounds(w, h,
|
|
377
|
+
popoverView.setBounds(layout.computePopoverBounds(w, h, overlayHeaderHeight()));
|
|
371
378
|
}
|
|
372
379
|
function clearNativeDevtoolsRetry() {
|
|
373
380
|
nativeDevtoolsRetryToken++;
|
|
@@ -90,7 +90,15 @@ export function createWorkspaceService(ctx) {
|
|
|
90
90
|
await ctx.onBeforeOpenProject(projectPath);
|
|
91
91
|
}
|
|
92
92
|
catch (err) {
|
|
93
|
-
|
|
93
|
+
// Surface the veto to the status bar — symmetric with the
|
|
94
|
+
// validateProjectDir rejection below (which already emits an error
|
|
95
|
+
// status). The framework caught the error, so it owns the minimal
|
|
96
|
+
// user-visible feedback; a host gate must not have to thread
|
|
97
|
+
// `notify` through a singleton just to report why the open was
|
|
98
|
+
// denied. The host can still layer richer UX (e.g. a dialog).
|
|
99
|
+
const error = err instanceof Error ? err.message : String(err);
|
|
100
|
+
sendStatus('error', error);
|
|
101
|
+
return { success: false, error };
|
|
94
102
|
}
|
|
95
103
|
}
|
|
96
104
|
clearSimulatorServicewechatReferer();
|
|
@@ -22,21 +22,24 @@ export function createMainWindow(opts) {
|
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
mainWindow.once('ready-to-show', () => {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
const isTest = process.env.NODE_ENV === 'test';
|
|
26
|
+
// Visibility is governed by `autoShow` in BOTH envs. A login-gating host
|
|
27
|
+
// opts out via `autoShow: false` and reveals the window itself once auth
|
|
28
|
+
// passes — don't flash an un-authed window. The env only chooses HOW to
|
|
29
|
+
// show: test uses showInactive() so e2e windows don't steal focus, prod
|
|
30
|
+
// uses show(). The framework must never force-show when the host opted
|
|
31
|
+
// out, in test env either (that would fight the host's own reveal handler).
|
|
32
|
+
if (opts.autoShow !== false) {
|
|
33
|
+
if (isTest)
|
|
34
|
+
mainWindow.showInactive();
|
|
35
|
+
else
|
|
32
36
|
mainWindow.show();
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
37
|
+
}
|
|
38
|
+
// Don't auto-open a detached DevTools for the devtools UI shell itself —
|
|
39
|
+
// it's noise for normal use (the mini-app's Console lives in the embedded
|
|
40
|
+
// right-panel DevTools, not here). Opt in via env for debugging the shell.
|
|
41
|
+
if (!isTest && !app.isPackaged && process.env.DIMINA_DEVTOOLS_MAIN_INSPECTOR === '1') {
|
|
42
|
+
mainWindow.webContents.openDevTools({ mode: 'detach' });
|
|
40
43
|
}
|
|
41
44
|
});
|
|
42
45
|
const rendererDir = path.dirname(opts.indexHtml);
|
|
@@ -364,7 +364,7 @@ var T = new class e {
|
|
|
364
364
|
}
|
|
365
365
|
}();
|
|
366
366
|
//#endregion
|
|
367
|
-
//#region ../../node_modules/.pnpm/@vue+shared@3.5.
|
|
367
|
+
//#region ../../node_modules/.pnpm/@vue+shared@3.5.38/node_modules/@vue/shared/dist/shared.esm-bundler.js
|
|
368
368
|
// @__NO_SIDE_EFFECTS__
|
|
369
369
|
function le(e) {
|
|
370
370
|
let t = /* @__PURE__ */ Object.create(null);
|
|
@@ -459,7 +459,7 @@ function ut(e) {
|
|
|
459
459
|
return e == null ? "initial" : typeof e == "string" ? e === "" ? " " : e : ((typeof e != "number" || !Number.isFinite(e)) && process.env.NODE_ENV !== "production" && console.warn("[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:", e), String(e));
|
|
460
460
|
}
|
|
461
461
|
//#endregion
|
|
462
|
-
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.
|
|
462
|
+
//#region ../../node_modules/.pnpm/@vue+reactivity@3.5.38/node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
|
|
463
463
|
function dt(e, ...t) {
|
|
464
464
|
console.warn(`[Vue warn] ${e}`, ...t);
|
|
465
465
|
}
|
|
@@ -1289,7 +1289,7 @@ function Zn(e, t = Infinity, n) {
|
|
|
1289
1289
|
return e;
|
|
1290
1290
|
}
|
|
1291
1291
|
//#endregion
|
|
1292
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.
|
|
1292
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-core@3.5.38/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
|
|
1293
1293
|
var Qn = [];
|
|
1294
1294
|
function $n(e) {
|
|
1295
1295
|
Qn.push(e);
|
|
@@ -3959,10 +3959,10 @@ function bc() {
|
|
|
3959
3959
|
}
|
|
3960
3960
|
window.devtoolsFormatters ? window.devtoolsFormatters.push(i) : window.devtoolsFormatters = [i];
|
|
3961
3961
|
}
|
|
3962
|
-
var xc = "3.5.
|
|
3962
|
+
var xc = "3.5.38", Sc = process.env.NODE_ENV === "production" ? de : z;
|
|
3963
3963
|
process.env.NODE_ENV, process.env.NODE_ENV;
|
|
3964
3964
|
//#endregion
|
|
3965
|
-
//#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.
|
|
3965
|
+
//#region ../../node_modules/.pnpm/@vue+runtime-dom@3.5.38/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js
|
|
3966
3966
|
var Cc = void 0, wc = typeof window < "u" && window.trustedTypes;
|
|
3967
3967
|
if (wc) try {
|
|
3968
3968
|
Cc = /* @__PURE__ */ wc.createPolicy("vue", { createHTML: (e) => e });
|
|
@@ -4313,7 +4313,7 @@ function wl(e) {
|
|
|
4313
4313
|
return process.env.NODE_ENV !== "production" && window.ShadowRoot && e instanceof window.ShadowRoot && e.mode === "closed" && Sc("mounting on a ShadowRoot with `{mode: \"closed\"}` may lead to unpredictable bugs"), e;
|
|
4314
4314
|
}
|
|
4315
4315
|
//#endregion
|
|
4316
|
-
//#region ../../node_modules/.pnpm/vue@3.5.
|
|
4316
|
+
//#region ../../node_modules/.pnpm/vue@3.5.38_typescript@6.0.3/node_modules/vue/dist/vue.runtime.esm-bundler.js
|
|
4317
4317
|
function Tl() {
|
|
4318
4318
|
bc();
|
|
4319
4319
|
}
|