@dimina-kit/devtools 0.4.0-dev.20260803105710 → 0.4.0-dev.20260824071518
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/app/app.js +12 -1
- package/dist/main/index.bundle.js +584 -323
- package/dist/main/ipc/index.d.ts +1 -0
- package/dist/main/ipc/index.js +1 -0
- package/dist/main/ipc/session.js +11 -0
- package/dist/main/ipc/tooltip.d.ts +13 -0
- package/dist/main/ipc/tooltip.js +28 -0
- package/dist/main/services/layout/index.d.ts +11 -0
- package/dist/main/services/layout/index.js +23 -0
- package/dist/main/services/network-forward/frontend-dispatch.js +2 -1
- package/dist/main/services/notifications/renderer-notifier.d.ts +2 -0
- package/dist/main/services/notifications/renderer-notifier.js +7 -1
- package/dist/main/services/simulator-current-page/index.d.ts +5 -3
- package/dist/main/services/simulator-current-page/index.js +8 -1
- package/dist/main/services/views/clear-console-filter.d.ts +44 -0
- package/dist/main/services/views/clear-console-filter.js +86 -0
- package/dist/main/services/views/console-filter-test-fixtures.d.ts +94 -0
- package/dist/main/services/views/console-filter-test-fixtures.js +82 -0
- package/dist/main/services/views/console-filter.d.ts +79 -130
- package/dist/main/services/views/console-filter.js +140 -183
- package/dist/main/services/views/devtools-tabs.d.ts +24 -4
- package/dist/main/services/views/devtools-tabs.js +40 -21
- package/dist/main/services/views/host-toolbar-view.js +5 -18
- package/dist/main/services/views/native-simulator-devtools-host.js +64 -45
- package/dist/main/services/views/native-simulator-view.js +6 -24
- package/dist/main/services/views/native-view-tree.d.ts +25 -0
- package/dist/main/services/views/native-view-tree.js +69 -0
- package/dist/main/services/views/overlay-panels-view.d.ts +27 -4
- package/dist/main/services/views/overlay-panels-view.js +138 -109
- package/dist/main/services/views/placement-reconciler.d.ts +4 -16
- package/dist/main/services/views/placement-reconciler.js +64 -29
- package/dist/main/services/views/placement-test-driver.d.ts +26 -0
- package/dist/main/services/views/placement-test-driver.js +26 -0
- package/dist/main/services/views/view-manager.d.ts +5 -9
- package/dist/main/services/views/view-manager.js +7 -1
- package/dist/main/services/views/workbench-view.js +27 -20
- package/dist/main/services/workbench-coi-server.d.ts +11 -0
- package/dist/main/services/workbench-coi-server.js +32 -0
- package/dist/main/services/workspace/rebuild-status.d.ts +21 -8
- package/dist/main/services/workspace/rebuild-status.js +24 -8
- package/dist/main/utils/sender-policy.d.ts +1 -1
- package/dist/main/utils/sender-policy.js +6 -1
- package/dist/main/utils/theme.d.ts +7 -2
- package/dist/main/utils/theme.js +8 -3
- package/dist/native-host/container/pageFrame.css +1 -1
- package/dist/native-host/render/render.js +1966 -1816
- package/dist/native-host/service/service.js +1 -1
- package/dist/preload/windows/host-toolbar-runtime.cjs.map +2 -2
- package/dist/preload/windows/main.cjs +3176 -14
- package/dist/preload/windows/main.cjs.map +4 -4
- package/dist/preload/windows/main.css +428 -0
- package/dist/preload/windows/main.css.map +7 -0
- package/dist/preload/windows/simulator.cjs +5 -2
- package/dist/preload/windows/simulator.cjs.map +2 -2
- package/dist/preload/windows/simulator.js +5 -2
- package/dist/renderer/assets/constants-Bdz0LHdy.js +2 -0
- package/dist/renderer/assets/index-CtznrmHR.js +49 -0
- package/dist/renderer/assets/{input-xdmfv-eH.js → input-Dmm6nob5.js} +2 -2
- package/dist/renderer/assets/ipc-transport-BOg0gR9W.js +9 -0
- package/dist/renderer/assets/ipc-transport-DgQhZaE9.css +1 -0
- package/dist/renderer/assets/popover-Cd1FEGOX.js +2 -0
- package/dist/renderer/assets/select-BaYox7If.js +2 -0
- package/dist/renderer/assets/settings-BXvwuFaz.js +2 -0
- package/dist/renderer/assets/settings-api-Bo9GbYqs.js +2 -0
- package/dist/renderer/assets/settings-tab-bar-Beia6lMr.js +2 -0
- package/dist/renderer/assets/tooltip-DfQqK3Sk.js +2 -0
- package/dist/renderer/assets/view-api-nn69je7A.js +2 -0
- package/dist/renderer/assets/workbenchSettings-oq_EyfKf.js +8 -0
- package/dist/renderer/entries/main/index.html +8 -7
- package/dist/renderer/entries/popover/index.html +7 -6
- package/dist/renderer/entries/settings/index.html +7 -5
- package/dist/renderer/entries/tooltip/index.html +20 -0
- package/dist/renderer/entries/workbench-settings/index.html +7 -5
- package/dist/service-host/sync-impls/menu-button-geometry.js +1 -0
- package/dist/shared/ipc-channels.d.ts +11 -0
- package/dist/shared/ipc-channels.js +28 -2
- package/dist/shared/ipc-schemas.d.ts +19 -0
- package/dist/shared/ipc-schemas.js +23 -0
- package/dist/shared/simulator-route.d.ts +8 -0
- package/dist/shared/simulator-route.js +15 -0
- package/dist/shared/types.d.ts +7 -0
- package/dist/shared/view-ids.d.ts +2 -0
- package/dist/shared/view-ids.js +11 -0
- package/dist/simulator/assets/device-shell-CmtM1QxP.js +2 -0
- package/dist/simulator/assets/device-shell-iFZo1igL.css +1 -0
- package/dist/simulator/assets/{simulator-COIE6R49.js → simulator-CIobn3Mh.js} +6 -6
- package/dist/simulator/assets/{simulator-mini-app-BLn7XV8e.js → simulator-mini-app-CRe6n9br.js} +2 -2
- package/dist/simulator/assets/simulator-ui-BupATgKo.css +1 -0
- package/dist/simulator/assets/simulator-ui-C_cP602X.js +2 -0
- package/dist/simulator/simulator.html +3 -2
- package/dist/vscode-workbench/assets/__vite-browser-external-Bc1vizTf.js +1 -0
- package/dist/vscode-workbench/assets/{dist-oHcwN53f.js → dist-CMfmHflW.js} +3 -3
- package/dist/vscode-workbench/assets/{iconv-lite-umd-CLMLpdGm.js → iconv-lite-umd-Bx8CgaZq.js} +1 -1
- package/dist/vscode-workbench/assets/{index-BE3UJdoH.js → index-CdG6YWhW.js} +436 -436
- package/dist/vscode-workbench/assets/{jschardet-BICW8PLJ.js → jschardet-M0qgd2lN.js} +1 -1
- package/dist/vscode-workbench/index.html +21 -1
- package/package.json +7 -6
- package/dist/main/services/views/destroy-child-view.d.ts +0 -9
- package/dist/main/services/views/destroy-child-view.js +0 -23
- package/dist/renderer/assets/constants-EAMiwL9_.js +0 -2
- package/dist/renderer/assets/index-BBg3YI5b.js +0 -49
- package/dist/renderer/assets/ipc-transport-B3EpmfNS.js +0 -9
- package/dist/renderer/assets/ipc-transport-Blac3sOj.css +0 -1
- package/dist/renderer/assets/popover-B88e2hkg.js +0 -2
- package/dist/renderer/assets/select-CD9CJyhI.js +0 -2
- package/dist/renderer/assets/settings-44hf0QtO.js +0 -2
- package/dist/renderer/assets/settings-api-pJKPuP1M.js +0 -2
- package/dist/renderer/assets/workbenchSettings-DKD5U1Ql.js +0 -8
- package/dist/simulator/assets/device-shell-Cw7c-IkG.js +0 -2
- package/dist/simulator/assets/device-shell-DbC5ccs8.css +0 -1
- package/dist/simulator/assets/jsx-runtime-DkKmJyBb.js +0 -2
- package/dist/simulator/device-shell/menu-button-geometry.js +0 -18
- package/dist/vscode-workbench/assets/__vite-browser-external-BON7qP59.js +0 -1
|
@@ -26,13 +26,14 @@
|
|
|
26
26
|
overflow: hidden;
|
|
27
27
|
}
|
|
28
28
|
</style>
|
|
29
|
-
<script type="module" crossorigin src="../../assets/index-
|
|
30
|
-
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-
|
|
31
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
32
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
33
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
34
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
35
|
-
<link rel="
|
|
29
|
+
<script type="module" crossorigin src="../../assets/index-CtznrmHR.js"></script>
|
|
30
|
+
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-BOg0gR9W.js">
|
|
31
|
+
<link rel="modulepreload" crossorigin href="../../assets/settings-api-Bo9GbYqs.js">
|
|
32
|
+
<link rel="modulepreload" crossorigin href="../../assets/input-Dmm6nob5.js">
|
|
33
|
+
<link rel="modulepreload" crossorigin href="../../assets/constants-Bdz0LHdy.js">
|
|
34
|
+
<link rel="modulepreload" crossorigin href="../../assets/view-api-nn69je7A.js">
|
|
35
|
+
<link rel="modulepreload" crossorigin href="../../assets/select-BaYox7If.js">
|
|
36
|
+
<link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DgQhZaE9.css">
|
|
36
37
|
</head>
|
|
37
38
|
<body>
|
|
38
39
|
<div id="root"></div>
|
|
@@ -8,12 +8,13 @@
|
|
|
8
8
|
<style>
|
|
9
9
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: transparent !important; }
|
|
10
10
|
</style>
|
|
11
|
-
<script type="module" crossorigin src="../../assets/popover-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-
|
|
13
|
-
<link rel="modulepreload" crossorigin href="../../assets/input-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
15
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
16
|
-
<link rel="
|
|
11
|
+
<script type="module" crossorigin src="../../assets/popover-Cd1FEGOX.js"></script>
|
|
12
|
+
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-BOg0gR9W.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="../../assets/input-Dmm6nob5.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="../../assets/constants-Bdz0LHdy.js">
|
|
15
|
+
<link rel="modulepreload" crossorigin href="../../assets/view-api-nn69je7A.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="../../assets/select-BaYox7If.js">
|
|
17
|
+
<link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DgQhZaE9.css">
|
|
17
18
|
</head>
|
|
18
19
|
<body>
|
|
19
20
|
<div id="root"></div>
|
|
@@ -11,11 +11,13 @@
|
|
|
11
11
|
closes the overlay — mirrors the popover entry. */
|
|
12
12
|
html, body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; background: transparent !important; }
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="../../assets/settings-
|
|
15
|
-
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-
|
|
16
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
17
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
18
|
-
<link rel="
|
|
14
|
+
<script type="module" crossorigin src="../../assets/settings-BXvwuFaz.js"></script>
|
|
15
|
+
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-BOg0gR9W.js">
|
|
16
|
+
<link rel="modulepreload" crossorigin href="../../assets/settings-api-Bo9GbYqs.js">
|
|
17
|
+
<link rel="modulepreload" crossorigin href="../../assets/input-Dmm6nob5.js">
|
|
18
|
+
<link rel="modulepreload" crossorigin href="../../assets/settings-tab-bar-Beia6lMr.js">
|
|
19
|
+
<link rel="modulepreload" crossorigin href="../../assets/view-api-nn69je7A.js">
|
|
20
|
+
<link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DgQhZaE9.css">
|
|
19
21
|
</head>
|
|
20
22
|
<body>
|
|
21
23
|
<div id="root"></div>
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<!-- See main/index.html for CSP rationale. -->
|
|
6
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; media-src 'self' blob: http: https:; connect-src 'self' http: https: ws: wss:;" />
|
|
7
|
+
<title>Tooltip</title>
|
|
8
|
+
<style>
|
|
9
|
+
html, body { margin: 0; padding: 0; width: -moz-max-content; width: max-content; height: -moz-max-content; height: max-content; overflow: hidden; background: transparent !important; }
|
|
10
|
+
#root { width: -moz-max-content; width: max-content; height: -moz-max-content; height: max-content; display: block; overflow: visible; }
|
|
11
|
+
</style>
|
|
12
|
+
<script type="module" crossorigin src="../../assets/tooltip-DfQqK3Sk.js"></script>
|
|
13
|
+
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-BOg0gR9W.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="../../assets/view-api-nn69je7A.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DgQhZaE9.css">
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<div id="root"></div>
|
|
19
|
+
</body>
|
|
20
|
+
</html>
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
<!-- See entries/main/index.html for CSP rationale. -->
|
|
7
7
|
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: http: https:; font-src 'self' data:; media-src 'self' blob: http: https:; connect-src 'self' http: https: ws: wss:;" />
|
|
8
8
|
<title>开发工具设置</title>
|
|
9
|
-
<script type="module" crossorigin src="../../assets/workbenchSettings-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-
|
|
11
|
-
<link rel="modulepreload" crossorigin href="../../assets/settings-api-
|
|
12
|
-
<link rel="modulepreload" crossorigin href="../../assets/
|
|
13
|
-
<link rel="
|
|
9
|
+
<script type="module" crossorigin src="../../assets/workbenchSettings-oq_EyfKf.js"></script>
|
|
10
|
+
<link rel="modulepreload" crossorigin href="../../assets/ipc-transport-BOg0gR9W.js">
|
|
11
|
+
<link rel="modulepreload" crossorigin href="../../assets/settings-api-Bo9GbYqs.js">
|
|
12
|
+
<link rel="modulepreload" crossorigin href="../../assets/input-Dmm6nob5.js">
|
|
13
|
+
<link rel="modulepreload" crossorigin href="../../assets/settings-tab-bar-Beia6lMr.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="../../assets/constants-Bdz0LHdy.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="../../assets/ipc-transport-DgQhZaE9.css">
|
|
14
16
|
</head>
|
|
15
17
|
<body>
|
|
16
18
|
<div id="root"></div>
|
|
@@ -95,6 +95,7 @@ export declare const WorkbenchSettingsChannel: {
|
|
|
95
95
|
export declare const ProjectChannel: {
|
|
96
96
|
readonly Open: "project:open";
|
|
97
97
|
readonly Close: "project:close";
|
|
98
|
+
readonly Rebuild: "project:rebuild";
|
|
98
99
|
readonly GetPages: "project:getPages";
|
|
99
100
|
readonly GetCompileConfig: "project:getCompileConfig";
|
|
100
101
|
readonly SaveCompileConfig: "project:saveCompileConfig";
|
|
@@ -208,6 +209,16 @@ export declare const PopoverChannel: {
|
|
|
208
209
|
readonly Closed: "popover:closed";
|
|
209
210
|
readonly Init: "popover:init";
|
|
210
211
|
};
|
|
212
|
+
export declare const OverlayChannel: {
|
|
213
|
+
readonly Ready: "overlay:ready";
|
|
214
|
+
};
|
|
215
|
+
export declare const TooltipChannel: {
|
|
216
|
+
readonly Prepare: "tooltip:prepare";
|
|
217
|
+
readonly Show: "tooltip:show";
|
|
218
|
+
readonly Hide: "tooltip:hide";
|
|
219
|
+
readonly Init: "tooltip:init";
|
|
220
|
+
readonly Measured: "tooltip:measured";
|
|
221
|
+
};
|
|
211
222
|
export declare const WindowChannel: {
|
|
212
223
|
readonly NavigateBack: "window:navigateBack";
|
|
213
224
|
readonly OpenProject: "window:openProject";
|
|
@@ -25,8 +25,11 @@ export const SimulatorChannel = {
|
|
|
25
25
|
Detach: 'simulator:detach',
|
|
26
26
|
Console: 'simulator:console',
|
|
27
27
|
// Main → renderer push of the visible top-of-stack page route whenever the
|
|
28
|
-
// mini-app navigates (navigateTo / switchTab / back). Payload: the page
|
|
29
|
-
// string (
|
|
28
|
+
// mini-app navigates (navigateTo / switchTab / back). Payload: the page
|
|
29
|
+
// route string (`pagePath` + `?k=v&…` query, same format as
|
|
30
|
+
// `encodePageSpec`/`decodePageSpec`), or '' when unknown. The query lets the
|
|
31
|
+
// page-path bar show params (WeChat DevTools parity) and a recompile restore
|
|
32
|
+
// the current page's params.
|
|
30
33
|
CurrentPage: 'simulator:current-page',
|
|
31
34
|
};
|
|
32
35
|
// ── Service host (main → hidden service-host window) ─────────────────────
|
|
@@ -128,6 +131,10 @@ export const WorkbenchSettingsChannel = {
|
|
|
128
131
|
export const ProjectChannel = {
|
|
129
132
|
Open: 'project:open',
|
|
130
133
|
Close: 'project:close',
|
|
134
|
+
// Renderer → main invoke: run one real recompile of the active session
|
|
135
|
+
// (the popover 重新编译 button). Resolves `{ supported: boolean }`; rejects
|
|
136
|
+
// on build failure or when no session is active.
|
|
137
|
+
Rebuild: 'project:rebuild',
|
|
131
138
|
GetPages: 'project:getPages',
|
|
132
139
|
GetCompileConfig: 'project:getCompileConfig',
|
|
133
140
|
SaveCompileConfig: 'project:saveCompileConfig',
|
|
@@ -260,6 +267,25 @@ export const PopoverChannel = {
|
|
|
260
267
|
Closed: 'popover:closed',
|
|
261
268
|
Init: 'popover:init',
|
|
262
269
|
};
|
|
270
|
+
// ── Tooltip ──────────────────────────────────────────────────────────────
|
|
271
|
+
//
|
|
272
|
+
// A top-tier overlay WebContentsView (VIEW_LAYER.tooltip — see view-ids.ts),
|
|
273
|
+
// NOT a DOM tooltip in the main renderer: any DOM-portaled floating UI (Radix
|
|
274
|
+
// Tooltip) or the browser-native `title` attribute lives in the main
|
|
275
|
+
// renderer's own paint surface, which every other WCV (simulator, editor,
|
|
276
|
+
// settings, popover) renders on top of — CSS cannot reach across that
|
|
277
|
+
// boundary. A trigger reports its anchor rect + label; main computes the
|
|
278
|
+
// tooltip's screen bounds and shows/repositions/hides this overlay.
|
|
279
|
+
export const OverlayChannel = {
|
|
280
|
+
Ready: 'overlay:ready',
|
|
281
|
+
};
|
|
282
|
+
export const TooltipChannel = {
|
|
283
|
+
Prepare: 'tooltip:prepare',
|
|
284
|
+
Show: 'tooltip:show',
|
|
285
|
+
Hide: 'tooltip:hide',
|
|
286
|
+
Init: 'tooltip:init',
|
|
287
|
+
Measured: 'tooltip:measured',
|
|
288
|
+
};
|
|
263
289
|
// ── Window ───────────────────────────────────────────────────────────────
|
|
264
290
|
export const WindowChannel = {
|
|
265
291
|
NavigateBack: 'window:navigateBack',
|
|
@@ -23,6 +23,25 @@ export declare const ProjectSaveCompileConfigSchema: z.ZodTuple<[z.ZodString, z.
|
|
|
23
23
|
}, z.core.$loose>], null>;
|
|
24
24
|
/** popover:show — must be an object (not undefined/null/string). */
|
|
25
25
|
export declare const PopoverShowSchema: z.ZodTuple<[z.ZodObject<{}, z.core.$loose>], null>;
|
|
26
|
+
/**
|
|
27
|
+
* tooltip:show — the trigger's own bounding rect (CSS px, main-window content
|
|
28
|
+
* coordinates — same space `getBoundingClientRect()` reports, no conversion,
|
|
29
|
+
* mirrors the base-view placement snapshot's Bounds) plus the label text.
|
|
30
|
+
*/
|
|
31
|
+
export declare const TooltipShowSchema: z.ZodTuple<[z.ZodObject<{
|
|
32
|
+
anchor: z.ZodObject<{
|
|
33
|
+
x: z.ZodNumber;
|
|
34
|
+
y: z.ZodNumber;
|
|
35
|
+
width: z.ZodNumber;
|
|
36
|
+
height: z.ZodNumber;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
text: z.ZodString;
|
|
39
|
+
}, z.core.$strip>], null>;
|
|
40
|
+
export declare const TooltipMeasuredSchema: z.ZodTuple<[z.ZodObject<{
|
|
41
|
+
requestId: z.ZodNumber;
|
|
42
|
+
width: z.ZodNumber;
|
|
43
|
+
height: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>], null>;
|
|
26
45
|
/**
|
|
27
46
|
* simulator:attach-native (native-host only) — the simulator URL to load into
|
|
28
47
|
* the top-level WebContentsView + simulator width. The URL is the dev-server
|
|
@@ -43,6 +43,29 @@ export const ProjectSaveCompileConfigSchema = z.tuple([
|
|
|
43
43
|
]);
|
|
44
44
|
/** popover:show — must be an object (not undefined/null/string). */
|
|
45
45
|
export const PopoverShowSchema = z.tuple([z.looseObject({})]);
|
|
46
|
+
/**
|
|
47
|
+
* tooltip:show — the trigger's own bounding rect (CSS px, main-window content
|
|
48
|
+
* coordinates — same space `getBoundingClientRect()` reports, no conversion,
|
|
49
|
+
* mirrors the base-view placement snapshot's Bounds) plus the label text.
|
|
50
|
+
*/
|
|
51
|
+
export const TooltipShowSchema = z.tuple([
|
|
52
|
+
z.object({
|
|
53
|
+
anchor: z.object({
|
|
54
|
+
x: z.number().finite(),
|
|
55
|
+
y: z.number().finite(),
|
|
56
|
+
width: z.number().finite().nonnegative(),
|
|
57
|
+
height: z.number().finite().nonnegative(),
|
|
58
|
+
}),
|
|
59
|
+
text: z.string().min(1).max(200),
|
|
60
|
+
}),
|
|
61
|
+
]);
|
|
62
|
+
export const TooltipMeasuredSchema = z.tuple([
|
|
63
|
+
z.object({
|
|
64
|
+
requestId: z.number().int().positive(),
|
|
65
|
+
width: z.number().finite().positive(),
|
|
66
|
+
height: z.number().finite().positive(),
|
|
67
|
+
}),
|
|
68
|
+
]);
|
|
46
69
|
/**
|
|
47
70
|
* Reasonable simulator width range. Window width is clamped UI-side, but
|
|
48
71
|
* we still reject obvious garbage (negative, zero, absurdly large).
|
|
@@ -63,6 +63,14 @@ export declare function parseLocationRoute(search: string): SimulatorRoute | nul
|
|
|
63
63
|
export declare function parseRoute(url: string): SimulatorRoute | null;
|
|
64
64
|
/** Return the current page path (no query) from a URL, or `''` if unparseable. */
|
|
65
65
|
export declare function getCurrentPagePath(url: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Return the current page as a `pagePath?k=v&…` route string (WeChat DevTools
|
|
68
|
+
* page-path format), with the internal `scene` bookkeeping param stripped so
|
|
69
|
+
* the displayed route matches what the page actually received in `onLoad`.
|
|
70
|
+
* Returns `''` if unparseable. Symmetric with `encodePageSpec`/`decodePageSpec`
|
|
71
|
+
* and with the `SimulatorChannel.CurrentPage` payload.
|
|
72
|
+
*/
|
|
73
|
+
export declare function getCurrentPageRoute(url: string): string;
|
|
66
74
|
/**
|
|
67
75
|
* Rewrite the URL so `entry === current`. Used before a hot-reload so the
|
|
68
76
|
* container boots at just the top page — avoids merged-bundle requests for a
|
|
@@ -133,6 +133,21 @@ export function getCurrentPagePath(url) {
|
|
|
133
133
|
const route = parseRoute(url);
|
|
134
134
|
return route?.current.pagePath ?? '';
|
|
135
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Return the current page as a `pagePath?k=v&…` route string (WeChat DevTools
|
|
138
|
+
* page-path format), with the internal `scene` bookkeeping param stripped so
|
|
139
|
+
* the displayed route matches what the page actually received in `onLoad`.
|
|
140
|
+
* Returns `''` if unparseable. Symmetric with `encodePageSpec`/`decodePageSpec`
|
|
141
|
+
* and with the `SimulatorChannel.CurrentPage` payload.
|
|
142
|
+
*/
|
|
143
|
+
export function getCurrentPageRoute(url) {
|
|
144
|
+
const route = parseRoute(url);
|
|
145
|
+
if (!route)
|
|
146
|
+
return '';
|
|
147
|
+
const query = { ...route.current.query };
|
|
148
|
+
delete query['scene'];
|
|
149
|
+
return encodePageSpec({ pagePath: route.current.pagePath, query });
|
|
150
|
+
}
|
|
136
151
|
/**
|
|
137
152
|
* Rewrite the URL so `entry === current`. Used before a hot-reload so the
|
|
138
153
|
* container boots at just the top page — avoids merged-bundle requests for a
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -54,6 +54,13 @@ export interface ProjectSession {
|
|
|
54
54
|
close: () => Promise<void>;
|
|
55
55
|
port: number;
|
|
56
56
|
appInfo: AppInfo;
|
|
57
|
+
/**
|
|
58
|
+
* Run one real recompile of the session's project. Optional: a host
|
|
59
|
+
* CompilationAdapter predating this capability may omit it — the rebuild
|
|
60
|
+
* IPC then degrades to `{ supported: false }` and the renderer falls back
|
|
61
|
+
* to its reattach-only relaunch.
|
|
62
|
+
*/
|
|
63
|
+
rebuild?: () => Promise<void>;
|
|
57
64
|
}
|
|
58
65
|
export interface CompilationAdapter {
|
|
59
66
|
openProject(opts: Omit<OpenProjectOptions, 'containerDir' | 'outputDir'>): Promise<ProjectSession>;
|
|
@@ -5,6 +5,7 @@ export declare const VIEW_ID: {
|
|
|
5
5
|
readonly hostToolbar: "host-toolbar";
|
|
6
6
|
readonly settings: "settings";
|
|
7
7
|
readonly popover: "popover";
|
|
8
|
+
readonly tooltip: "tooltip";
|
|
8
9
|
};
|
|
9
10
|
export type DevtoolsViewId = (typeof VIEW_ID)[keyof typeof VIEW_ID];
|
|
10
11
|
export interface DevtoolsExtra {
|
|
@@ -15,5 +16,6 @@ export declare const VIEW_LAYER: {
|
|
|
15
16
|
readonly hostToolbar: 5;
|
|
16
17
|
readonly settings: 10;
|
|
17
18
|
readonly popover: 20;
|
|
19
|
+
readonly tooltip: 30;
|
|
18
20
|
};
|
|
19
21
|
//# sourceMappingURL=view-ids.d.ts.map
|
package/dist/shared/view-ids.js
CHANGED
|
@@ -10,16 +10,27 @@ export const VIEW_ID = {
|
|
|
10
10
|
hostToolbar: 'host-toolbar',
|
|
11
11
|
settings: 'settings',
|
|
12
12
|
popover: 'popover',
|
|
13
|
+
tooltip: 'tooltip',
|
|
13
14
|
};
|
|
14
15
|
// z-order layers; larger paints on top. Base overlays share layer 0 (they never
|
|
15
16
|
// overlap each other — the simulator device WCV, the console/DevTools WCV, and
|
|
16
17
|
// the embedded workbench occupy disjoint dock regions). The host-toolbar strip
|
|
17
18
|
// sits above the base row; settings and popover are the top tier (settings below
|
|
18
19
|
// a simultaneously-open popover), replacing the imperative raiseTopOverlays.
|
|
20
|
+
// tooltip sits above ALL of them — it must never be occluded by a popover/
|
|
21
|
+
// settings sheet either, and it's the reason this layer exists at all: a
|
|
22
|
+
// DOM-portaled (Radix) tooltip rendered by the main window's OWN renderer, or
|
|
23
|
+
// even the browser-native `title` attribute, is part of that renderer's paint
|
|
24
|
+
// surface and renders BEHIND every other WCV mounted on top of it (simulator,
|
|
25
|
+
// editor, settings, popover) — CSS z-index cannot reach across that boundary.
|
|
26
|
+
// Routing the tooltip through this same reconciler (a real WCV of its own,
|
|
27
|
+
// placed via `setOverlayDesired`) is what actually fixes that; see
|
|
28
|
+
// `overlay-panels-view.ts`'s tooltip functions.
|
|
19
29
|
export const VIEW_LAYER = {
|
|
20
30
|
base: 0,
|
|
21
31
|
hostToolbar: 5,
|
|
22
32
|
settings: 10,
|
|
23
33
|
popover: 20,
|
|
34
|
+
tooltip: 30,
|
|
24
35
|
};
|
|
25
36
|
//# sourceMappingURL=view-ids.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as e,o as t,r as n,s as r,t as i}from"./simulator-ui-C_cP602X.js";import{t as a}from"./bridge-channels-zhsumfky.js";var o=new Set([`audioListen`]);function s(e){return o.has(e)}var c=e();function l(e,t,n,r){let i=e.apiRegistry[t];if(!i)return r({ok:!1,errMsg:`${t}:fail no handler`}),Promise.resolve();let a=s(t)||(n&&typeof n==`object`&&!Array.isArray(n)?n.keep===!0:!1);return new Promise(o=>{let s=!1,c=e=>{if(s){a&&e.ok&&r({...e,keep:!0});return}s=!0,r(a&&e.ok?{...e,keep:!0}:e),o()},l=Symbol(`sim-cb-success`),u=Symbol(`sim-cb-fail`),d=Symbol(`sim-cb-complete`),f=!1,p=Object.create(e);p.createCallbackFunction=e=>{if(e!=null)return(e===l||e===u)&&(f=!0),(...n)=>{let r=n[0];e===l?c({ok:!0,result:r}):e===u?c({ok:!1,errMsg:r&&typeof r==`object`&&`errMsg`in r?String(r.errMsg):`${t}:fail`,result:r}):e===d&&!a&&c({ok:!0,result:r})}};let m=n&&typeof n==`object`&&!Array.isArray(n)?{...n}:{};m.success=l,m.fail=u,m.complete=d;try{let e=i.call(p,m);if(e&&typeof e.then==`function`){Promise.resolve(e).then(e=>c({ok:!0,result:e}),e=>{c({ok:!1,errMsg:`${t}:fail ${e instanceof Error?e.message:String(e)}`})});return}if(s)return;if(a){o();return}if(f){o();return}c({ok:!0,result:e})}catch(e){c({ok:!1,errMsg:`${t}:fail ${e instanceof Error?e.message:String(e)}`})}})}function u(e){return e.onSessionEvent(a.API_CALL,t=>{e.apiRegistry[t.name]&&e.notifyApiResponse({requestId:t.requestId,ok:!1,ack:!0}),l(e,t.name,t.params,n=>{e.notifyApiResponse({requestId:t.requestId,ok:n.ok,result:n.result,errMsg:n.errMsg,keep:n.keep})})})}var d=n();function f(e){switch(e){case`notch`:return{width:164,height:30,top:0,bottomOnly:!0};case`dynamic-island`:return{width:124,height:36,top:11,bottomOnly:!1};default:return null}}function p({height:e,notchType:t,textStyle:n}){let r=f(t);return(0,d.jsxs)(`div`,{className:`device-statusbar`,style:{height:e,color:n===`black`?`#000000`:`#ffffff`},"aria-hidden":`true`,children:[(0,d.jsx)(`span`,{className:`device-statusbar__time`,children:`9:41`}),r&&(0,d.jsx)(`div`,{className:`device-statusbar__notch`,style:{width:r.width,height:r.height,top:r.top,borderRadius:r.bottomOnly?`0 0 ${Math.round(r.height*.6)}px ${Math.round(r.height*.6)}px`:`${r.height/2}px`}}),(0,d.jsxs)(`div`,{className:`device-statusbar__icons`,children:[(0,d.jsx)(`span`,{className:`device-statusbar__signal`}),(0,d.jsx)(`span`,{className:`device-statusbar__wifi`}),(0,d.jsx)(`span`,{className:`device-statusbar__battery`})]})]})}function m({active:e,appId:n}){let r=(0,c.useRef)(null);return(0,c.useEffect)(()=>{let i=r.current;if(!(!e||!i))return t(i,n)},[e,n]),(0,d.jsx)(`div`,{ref:r,className:`device-shell__extension-layer`,"data-dimina-simulator-overlay-root":!0})}function h(e,t,n){r({name:`capsule.more`,appId:e,appName:t||e,pagePath:n})}var g=44,_=24;function v({miniApp:e,bridgeId:t,platform:n=`ios`,active:r=!0}){let o=new URLSearchParams(window.location.search).get(`embedded`)===`1`,[s,l]=(0,c.useState)(()=>e.getInitialDevice());(0,c.useEffect)(()=>e.onSimulatorEvent(a.DEVICE_CHANGE,l),[e]);let f=o?0:s?.safeAreaInsets.top??(n===`ios`?g:_),v=o?0:s?.safeAreaInsets.bottom??0,y=s?.notchType??`none`;(0,c.useEffect)(()=>u(e),[e]);let b=(0,c.useCallback)(e=>{h(e.appId,e.appName,e.pagePath)},[]);return(0,d.jsx)(`main`,{className:`device-shell-root${o?` device-shell-root--embedded`:``}`,children:(0,d.jsx)(`section`,{className:`device-shell${o?` device-shell--embedded`:``}`,"aria-label":`Dimina simulator`,style:!o&&s?{width:s.screenWidth,height:s.screenHeight}:void 0,children:(0,d.jsx)(i,{host:e,bridgeId:t,platform:n,statusBarHeight:f,bottomInset:v,onMore:b,statusBar:o?void 0:({textStyle:e})=>(0,d.jsx)(p,{height:f,notchType:y,textStyle:e}),deviceOverlay:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(m,{active:r,appId:e.appId}),v>0&&(0,d.jsx)(`div`,{className:`device-shell__home-indicator`,style:{height:v},"aria-hidden":`true`})]})})})})}export{v as DeviceShell};
|
|
2
|
+
//# sourceMappingURL=device-shell-CmtM1QxP.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.device-statusbar{z-index:300;box-sizing:border-box;pointer-events:none;letter-spacing:.2px;justify-content:space-between;align-items:center;padding:0 28px;font:600 14px/1 -apple-system,BlinkMacSystemFont,SF Pro Text,Segoe UI,sans-serif;display:flex;position:absolute;top:0;left:0;right:0}.device-statusbar__time{font-variant-numeric:tabular-nums}.device-statusbar__notch{background:#000;position:absolute;left:50%;transform:translate(-50%)}.device-statusbar__icons{align-items:center;gap:6px;display:inline-flex}.device-statusbar__signal,.device-statusbar__wifi,.device-statusbar__battery{background:currentColor;display:block}.device-statusbar__signal{width:17px;height:11px;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 11'><rect x='0' y='8' width='3' height='3' rx='1'/><rect x='4.5' y='6' width='3' height='5' rx='1'/><rect x='9' y='3' width='3' height='8' rx='1'/><rect x='13.5' y='0' width='3' height='11' rx='1'/></svg>") 50%/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 11'><rect x='0' y='8' width='3' height='3' rx='1'/><rect x='4.5' y='6' width='3' height='5' rx='1'/><rect x='9' y='3' width='3' height='8' rx='1'/><rect x='13.5' y='0' width='3' height='11' rx='1'/></svg>") 50%/contain no-repeat}.device-statusbar__wifi{border-radius:1px;width:16px;height:11px;-webkit-mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 11'><path d='M8 2.2c2.3 0 4.4.9 6 2.4l-1.4 1.5C11.4 4.9 9.8 4.2 8 4.2S4.6 4.9 3.4 6.1L2 4.6C3.6 3.1 5.7 2.2 8 2.2zm0 3.5c1.3 0 2.5.5 3.4 1.4L10 8.6c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8L4.6 7.1C5.5 6.2 6.7 5.7 8 5.7zm0 3.3l1.4 1.4c-.4.4-.9.6-1.4.6s-1-.2-1.4-.6L8 9z'/></svg>") 50%/contain no-repeat;mask:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 11'><path d='M8 2.2c2.3 0 4.4.9 6 2.4l-1.4 1.5C11.4 4.9 9.8 4.2 8 4.2S4.6 4.9 3.4 6.1L2 4.6C3.6 3.1 5.7 2.2 8 2.2zm0 3.5c1.3 0 2.5.5 3.4 1.4L10 8.6c-.5-.5-1.2-.8-2-.8s-1.5.3-2 .8L4.6 7.1C5.5 6.2 6.7 5.7 8 5.7zm0 3.3l1.4 1.4c-.4.4-.9.6-1.4.6s-1-.2-1.4-.6L8 9z'/></svg>") 50%/contain no-repeat}.device-statusbar__battery{background:0 0;border:1px solid;border-radius:3px;width:25px;height:12px;position:relative}.device-statusbar__battery:before{content:"";background:currentColor;border-radius:1px;position:absolute;inset:2px 8px 2px 2px}.device-statusbar__battery:after{content:"";background:currentColor;border-radius:0 1px 1px 0;width:2px;position:absolute;top:3px;bottom:3px;right:-3px}.device-shell-root{color:#101418;box-sizing:border-box;background:#282828;width:100%;height:100vh;padding:24px;display:flex;overflow:auto}.device-shell-root--embedded{background:#fff;padding:0;overflow:hidden}@media (prefers-color-scheme:light){.device-shell-root{background:#f7f7f9}}.device-shell{background:#f8fafc;border:1px solid #1014182e;border-radius:38px;flex-direction:column;flex:none;min-height:0;margin:auto;display:flex;position:relative;overflow:hidden;box-shadow:0 18px 50px #10141838}.device-shell--embedded{width:100%;height:100%;box-shadow:none;border:0;border-radius:0;margin:0}.device-shell__status-bar{letter-spacing:0;color:#111827;background:#f8fafc;flex:0 0 42px;justify-content:space-between;align-items:center;padding:0 28px;font:600 13px/1 system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;display:flex}.device-shell__status-icons{align-items:center;gap:5px;display:inline-flex}.device-shell__status-icons span{background:#111827;display:block}.device-shell__status-icons span:first-child{border-radius:2px;width:16px;height:10px}.device-shell__status-icons span:nth-child(2){border-radius:50%;width:12px;height:12px}.device-shell__status-icons span:nth-child(3){border-radius:3px;width:20px;height:10px}.device-shell__home-indicator{pointer-events:none;z-index:200;position:absolute;bottom:0;left:0;right:0}.device-shell__home-indicator:before{content:"";background:#111827;border-radius:999px;width:118px;height:4px;position:absolute;bottom:8px;left:50%;transform:translate(-50%)}.device-shell__extension-layer{z-index:400;pointer-events:none;position:absolute;inset:0;overflow:hidden}
|