@dimina-kit/devtools 0.4.0 → 0.5.0-dev.20260908120530
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/README.md +51 -660
- package/dist/main/api.d.ts +2 -1
- package/dist/main/app/app.d.ts +41 -12
- package/dist/main/app/app.js +299 -514
- package/dist/main/app/bootstrap.d.ts +8 -5
- package/dist/main/app/bootstrap.js +15 -15
- package/dist/main/app/editor-view.d.ts +21 -0
- package/dist/main/app/editor-view.js +71 -0
- package/dist/main/app/global-mirrors.d.ts +23 -0
- package/dist/main/app/global-mirrors.js +37 -0
- package/dist/main/app/host-sidebar-default.d.ts +19 -0
- package/dist/main/app/host-sidebar-default.js +44 -0
- package/dist/main/app/lifecycle.d.ts +12 -1
- package/dist/main/app/lifecycle.js +27 -1
- package/dist/main/app/menu-setup.d.ts +13 -0
- package/dist/main/app/menu-setup.js +49 -0
- package/dist/main/app/native-overview.d.ts +1 -1
- package/dist/main/app/open-project-ipc.d.ts +13 -0
- package/dist/main/app/open-project-ipc.js +21 -0
- package/dist/main/app/project-list-surface.d.ts +31 -0
- package/dist/main/app/project-list-surface.js +20 -0
- package/dist/main/app/project-window.d.ts +36 -0
- package/dist/main/app/project-window.js +93 -0
- package/dist/main/app/servers.d.ts +17 -0
- package/dist/main/app/servers.js +60 -0
- package/dist/main/app/ui-extension-targets.d.ts +42 -0
- package/dist/main/app/ui-extension-targets.js +101 -0
- package/dist/main/app/window-close-reveal.harness.d.ts +34 -0
- package/dist/main/app/window-close-reveal.harness.js +65 -0
- package/dist/main/app/window-events.d.ts +15 -0
- package/dist/main/app/window-events.js +45 -0
- package/dist/main/app/window-runtime-services.d.ts +41 -0
- package/dist/main/app/window-runtime-services.js +197 -0
- package/dist/main/app/workbench-modules.d.ts +24 -0
- package/dist/main/app/workbench-modules.js +51 -0
- package/dist/main/app/workbench-window.d.ts +85 -0
- package/dist/main/app/workbench-window.js +310 -0
- package/dist/main/index.bundle.js +11712 -9986
- package/dist/main/index.js +49 -1
- package/dist/main/ipc/app-lifecycle.d.ts +1 -31
- package/dist/main/ipc/app-lifecycle.js +1 -53
- package/dist/main/ipc/app.d.ts +4 -1
- package/dist/main/ipc/app.js +4 -3
- package/dist/main/ipc/bridge-router.d.ts +19 -116
- package/dist/main/ipc/bridge-router.js +28 -2128
- package/dist/main/ipc/device-picker.d.ts +16 -0
- package/dist/main/ipc/device-picker.js +27 -0
- package/dist/main/ipc/index.d.ts +5 -0
- package/dist/main/ipc/index.js +5 -0
- package/dist/main/ipc/internal-devtools.d.ts +16 -0
- package/dist/main/ipc/internal-devtools.js +10 -0
- package/dist/main/ipc/page-scroll.d.ts +1 -13
- package/dist/main/ipc/page-scroll.js +1 -16
- package/dist/main/ipc/popover.d.ts +4 -1
- package/dist/main/ipc/popover.js +26 -19
- package/dist/main/ipc/project-create.d.ts +16 -0
- package/dist/main/ipc/project-create.js +27 -0
- package/dist/main/ipc/project-fs.d.ts +38 -3
- package/dist/main/ipc/project-fs.js +53 -22
- package/dist/main/ipc/projects.d.ts +3 -3
- package/dist/main/ipc/projects.js +47 -11
- package/dist/main/ipc/session-listener-bag.d.ts +1 -40
- package/dist/main/ipc/session-listener-bag.js +1 -39
- package/dist/main/ipc/session.d.ts +4 -1
- package/dist/main/ipc/session.js +26 -26
- package/dist/main/ipc/settings.d.ts +4 -1
- package/dist/main/ipc/settings.js +17 -19
- package/dist/main/ipc/simulator-module.d.ts +9 -3
- package/dist/main/ipc/simulator-module.js +13 -10
- package/dist/main/ipc/simulator.d.ts +4 -1
- package/dist/main/ipc/simulator.js +12 -18
- package/dist/main/ipc/tooltip.d.ts +14 -0
- package/dist/main/ipc/tooltip.js +29 -0
- package/dist/main/ipc/views.d.ts +19 -2
- package/dist/main/ipc/views.js +76 -8
- package/dist/main/runtime/devtools-backend-before-quit.harness.d.ts +43 -0
- package/dist/main/runtime/devtools-backend-before-quit.harness.js +87 -0
- package/dist/main/runtime/devtools-backend.js +60 -4
- package/dist/main/runtime/devtools-runtime-mock.harness.d.ts +21 -0
- package/dist/main/runtime/devtools-runtime-mock.harness.js +313 -0
- package/dist/main/runtime/miniapp-runtime.d.ts +91 -22
- package/dist/main/services/app-services.d.ts +62 -0
- package/dist/main/services/app-services.js +64 -0
- package/dist/main/services/automation/connection-target.d.ts +36 -0
- package/dist/main/services/automation/connection-target.js +29 -0
- package/dist/main/services/automation/console-bridge.d.ts +28 -0
- package/dist/main/services/automation/console-bridge.js +91 -0
- package/dist/main/services/automation/handlers/app.js +4 -4
- package/dist/main/services/automation/handlers/element.js +55 -21
- package/dist/main/services/automation/index.d.ts +12 -1
- package/dist/main/services/automation/index.js +54 -133
- package/dist/main/services/cdp-session/index.d.ts +87 -0
- package/dist/main/services/cdp-session/index.js +173 -0
- package/dist/main/services/compile-standby.js +4 -0
- package/dist/main/services/console-forward/cdp-inject.d.ts +18 -0
- package/dist/main/services/console-forward/cdp-inject.js +30 -0
- package/dist/main/services/console-forward/global-console-mirror.d.ts +33 -0
- package/dist/main/services/console-forward/global-console-mirror.js +71 -0
- package/dist/main/services/console-forward/global-diagnostics-mirror.d.ts +33 -0
- package/dist/main/services/console-forward/global-diagnostics-mirror.js +73 -0
- package/dist/main/services/console-forward/index.d.ts +1 -46
- package/dist/main/services/console-forward/index.js +1 -185
- package/dist/main/services/console-forward/internal-log.d.ts +2 -0
- package/dist/main/services/console-forward/internal-log.js +2 -0
- package/dist/main/services/console-forward/open-gated-relay.d.ts +67 -0
- package/dist/main/services/console-forward/open-gated-relay.js +55 -0
- package/dist/main/services/default-adapter.js +1 -1
- package/dist/main/services/diagnostics/index.d.ts +1 -48
- package/dist/main/services/diagnostics/index.js +1 -60
- package/dist/main/services/dimina-resource-server.d.ts +1 -6
- package/dist/main/services/dimina-resource-server.js +1 -98
- package/dist/main/services/elements-forward/index.d.ts +132 -15
- package/dist/main/services/elements-forward/index.js +155 -304
- package/dist/main/services/fs-bridge-protocol.d.ts +61 -0
- package/dist/main/services/fs-bridge-protocol.js +34 -0
- package/dist/main/services/fs-watch-sse.d.ts +40 -0
- package/dist/main/services/fs-watch-sse.js +113 -0
- package/dist/main/services/http-json.d.ts +9 -0
- package/dist/main/services/http-json.js +6 -0
- package/dist/main/services/layout/index.d.ts +11 -0
- package/dist/main/services/layout/index.js +23 -0
- package/dist/main/services/mcp/connection-owner.d.ts +38 -0
- package/dist/main/services/mcp/connection-owner.js +79 -0
- package/dist/main/services/mcp/index.d.ts +3 -1
- package/dist/main/services/mcp/index.js +4 -3
- package/dist/main/services/mcp/opened-project.d.ts +88 -0
- package/dist/main/services/mcp/opened-project.js +60 -0
- package/dist/main/services/mcp/server.d.ts +2 -1
- package/dist/main/services/mcp/server.js +29 -4
- package/dist/main/services/mcp/target-manager.d.ts +71 -23
- package/dist/main/services/mcp/target-manager.js +269 -138
- package/dist/main/services/mcp/target-selection.d.ts +47 -0
- package/dist/main/services/mcp/target-selection.js +71 -0
- package/dist/main/services/mcp/tools/context-tools.js +20 -5
- package/dist/main/services/mcp/tools/project-tools.d.ts +72 -0
- package/dist/main/services/mcp/tools/project-tools.js +133 -0
- package/dist/main/services/module.d.ts +13 -5
- package/dist/main/services/network-forward/body-cache.d.ts +72 -0
- package/dist/main/services/network-forward/body-cache.js +179 -0
- package/dist/main/services/network-forward/frontend-dispatch.d.ts +91 -0
- package/dist/main/services/network-forward/frontend-dispatch.js +148 -0
- package/dist/main/services/network-forward/global-body-gate.d.ts +46 -0
- package/dist/main/services/network-forward/global-body-gate.js +93 -0
- package/dist/main/services/network-forward/global-mirror-test-fixtures.d.ts +48 -0
- package/dist/main/services/network-forward/global-mirror-test-fixtures.js +96 -0
- package/dist/main/services/network-forward/http.d.ts +47 -0
- package/dist/main/services/network-forward/http.js +162 -0
- package/dist/main/services/network-forward/index.d.ts +135 -15
- package/dist/main/services/network-forward/index.js +854 -224
- package/dist/main/services/network-forward/request-ids.d.ts +5 -0
- package/dist/main/services/network-forward/request-ids.js +5 -0
- package/dist/main/services/network-forward/user-facing.d.ts +21 -0
- package/dist/main/services/network-forward/user-facing.js +50 -0
- package/dist/main/services/network-forward/websocket.d.ts +36 -0
- package/dist/main/services/network-forward/websocket.js +120 -0
- package/dist/main/services/notifications/renderer-notifier.d.ts +71 -9
- package/dist/main/services/notifications/renderer-notifier.js +45 -8
- package/dist/main/services/projects/create-project-service.js +19 -5
- package/dist/main/services/projects/local-provider.js +8 -4
- package/dist/main/services/projects/project-repository.d.ts +59 -7
- package/dist/main/services/projects/project-repository.js +285 -51
- package/dist/main/services/projects/types.d.ts +44 -34
- package/dist/main/services/render-inspect/index.d.ts +12 -2
- package/dist/main/services/render-inspect/index.js +21 -102
- package/dist/main/services/safe-area/index.d.ts +21 -6
- package/dist/main/services/safe-area/index.js +92 -46
- package/dist/main/services/service-host-pool/pool.d.ts +1 -196
- package/dist/main/services/service-host-pool/pool.js +1 -363
- package/dist/main/services/settings/index.d.ts +7 -1
- package/dist/main/services/settings/index.js +22 -2
- package/dist/main/services/simulator/custom-apis.d.ts +1 -42
- package/dist/main/services/simulator/custom-apis.js +1 -46
- package/dist/main/services/simulator/referer.d.ts +1 -9
- package/dist/main/services/simulator/referer.js +1 -19
- package/dist/main/services/simulator/ui-extensions.d.ts +21 -0
- package/dist/main/services/simulator/ui-extensions.js +176 -0
- package/dist/main/services/simulator-appdata/index.d.ts +6 -0
- package/dist/main/services/simulator-appdata/index.js +21 -2
- 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/simulator-storage/index.d.ts +34 -5
- package/dist/main/services/simulator-storage/index.js +73 -71
- package/dist/main/services/simulator-storage/service-storage-ops.d.ts +1 -39
- package/dist/main/services/simulator-storage/service-storage-ops.js +1 -66
- package/dist/main/services/simulator-storage/window-scope.d.ts +20 -0
- package/dist/main/services/simulator-storage/window-scope.js +20 -0
- package/dist/main/services/simulator-temp-files/disk.d.ts +1 -54
- package/dist/main/services/simulator-temp-files/disk.js +1 -237
- package/dist/main/services/simulator-temp-files/fs-channels.d.ts +1 -68
- package/dist/main/services/simulator-temp-files/fs-channels.js +1 -107
- package/dist/main/services/simulator-temp-files/index.d.ts +1 -32
- package/dist/main/services/simulator-temp-files/index.js +1 -181
- package/dist/main/services/simulator-temp-files/request-handler.d.ts +1 -29
- package/dist/main/services/simulator-temp-files/request-handler.js +1 -177
- package/dist/main/services/simulator-temp-files/resolver.d.ts +1 -21
- package/dist/main/services/simulator-temp-files/resolver.js +1 -21
- package/dist/main/services/simulator-temp-files/store.d.ts +1 -13
- package/dist/main/services/simulator-temp-files/store.js +1 -23
- package/dist/main/services/update/github-release-checker.js +22 -3
- package/dist/main/services/update/update-manager.d.ts +21 -4
- package/dist/main/services/update/update-manager.js +55 -11
- 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 +94 -0
- package/dist/main/services/views/console-filter.js +190 -0
- 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/frontend-bootstrap-gate.d.ts +59 -0
- package/dist/main/services/views/frontend-bootstrap-gate.js +117 -0
- package/dist/main/services/views/host-dialog-port-channel.d.ts +18 -0
- package/dist/main/services/views/host-dialog-port-channel.js +15 -0
- package/dist/main/services/views/host-dialog-session-runtime.d.ts +10 -0
- package/dist/main/services/views/host-dialog-session-runtime.js +17 -0
- package/dist/main/services/views/host-dialog-view.d.ts +95 -0
- package/dist/main/services/views/host-dialog-view.js +147 -0
- package/dist/main/services/views/host-sidebar-port-channel.d.ts +18 -0
- package/dist/main/services/views/host-sidebar-port-channel.js +15 -0
- package/dist/main/services/views/host-sidebar-session-runtime.d.ts +10 -0
- package/dist/main/services/views/host-sidebar-session-runtime.js +17 -0
- package/dist/main/services/views/host-sidebar-view.d.ts +59 -0
- package/dist/main/services/views/host-sidebar-view.js +44 -0
- package/dist/main/services/views/host-slot-port-channel.d.ts +124 -0
- package/dist/main/services/views/host-slot-port-channel.js +289 -0
- package/dist/main/services/views/host-slot-session-runtime.d.ts +40 -0
- package/dist/main/services/views/host-slot-session-runtime.js +50 -0
- package/dist/main/services/views/host-slot-view.d.ts +109 -0
- package/dist/main/services/views/host-slot-view.js +147 -0
- package/dist/main/services/views/host-toolbar-port-channel.d.ts +6 -91
- package/dist/main/services/views/host-toolbar-port-channel.js +10 -243
- package/dist/main/services/views/host-toolbar-session-runtime.d.ts +5 -30
- package/dist/main/services/views/host-toolbar-session-runtime.js +9 -47
- package/dist/main/services/views/host-toolbar-view.d.ts +34 -7
- package/dist/main/services/views/host-toolbar-view.js +30 -237
- package/dist/main/services/views/managed-web-contents-view.d.ts +48 -0
- package/dist/main/services/views/managed-web-contents-view.js +143 -0
- package/dist/main/services/views/miniapp-partition.d.ts +1 -89
- package/dist/main/services/views/miniapp-partition.js +1 -158
- package/dist/main/services/views/native-simulator-devtools-host.js +206 -68
- package/dist/main/services/views/native-simulator-view.d.ts +6 -0
- package/dist/main/services/views/native-simulator-view.js +47 -40
- 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 +63 -4
- package/dist/main/services/views/overlay-panels-view.js +257 -108
- package/dist/main/services/views/placement-reconciler.d.ts +18 -18
- package/dist/main/services/views/placement-reconciler.js +91 -29
- package/dist/main/services/views/placement-test-driver.d.ts +27 -0
- package/dist/main/services/views/placement-test-driver.js +29 -0
- package/dist/main/services/views/refresh-styles.d.ts +10 -0
- package/dist/main/services/views/refresh-styles.js +57 -0
- package/dist/main/services/views/simulator-session-policy.d.ts +1 -27
- package/dist/main/services/views/simulator-session-policy.js +1 -98
- package/dist/main/services/views/view-manager-devtools-host-test-fixtures.d.ts +76 -0
- package/dist/main/services/views/view-manager-devtools-host-test-fixtures.js +184 -0
- package/dist/main/services/views/view-manager.d.ts +69 -88
- package/dist/main/services/views/view-manager.js +62 -7
- package/dist/main/services/views/workbench-view.d.ts +2 -0
- package/dist/main/services/views/workbench-view.js +104 -17
- package/dist/main/services/window-contexts/context-router.d.ts +36 -0
- package/dist/main/services/window-contexts/context-router.js +55 -0
- package/dist/main/services/workbench-coi-host.d.ts +52 -0
- package/dist/main/services/workbench-coi-host.js +227 -0
- package/dist/main/services/workbench-coi-server.d.ts +11 -0
- package/dist/main/services/workbench-coi-server.js +126 -126
- package/dist/main/services/workbench-coi-shutdown.d.ts +40 -0
- package/dist/main/services/workbench-coi-shutdown.js +69 -0
- package/dist/main/services/workbench-coi-static.d.ts +23 -0
- package/dist/main/services/workbench-coi-static.js +87 -0
- package/dist/main/services/workbench-context.d.ts +88 -8
- package/dist/main/services/workbench-context.js +54 -6
- package/dist/main/services/workspace/compile-log-buffer.d.ts +40 -0
- package/dist/main/services/workspace/compile-log-buffer.js +41 -0
- package/dist/main/services/workspace/compile-mode-adapter.d.ts +18 -0
- package/dist/main/services/workspace/compile-mode-adapter.js +57 -0
- package/dist/main/services/workspace/compile-mode-store.d.ts +25 -0
- package/dist/main/services/workspace/compile-mode-store.js +71 -0
- package/dist/main/services/workspace/open-project-guards.d.ts +16 -0
- package/dist/main/services/workspace/open-project-guards.js +42 -0
- package/dist/main/services/workspace/rebuild-status.d.ts +37 -0
- package/dist/main/services/workspace/rebuild-status.js +36 -0
- package/dist/main/services/workspace/session-status-store.d.ts +47 -0
- package/dist/main/services/workspace/session-status-store.js +73 -0
- package/dist/main/services/workspace/status-tap.d.ts +20 -0
- package/dist/main/services/workspace/status-tap.js +32 -0
- package/dist/main/services/workspace/workspace-compile-modes.d.ts +59 -0
- package/dist/main/services/workspace/workspace-compile-modes.js +93 -0
- package/dist/main/services/workspace/workspace-lifecycle-race.testutil.d.ts +22 -0
- package/dist/main/services/workspace/workspace-lifecycle-race.testutil.js +62 -0
- package/dist/main/services/workspace/workspace-referer.d.ts +17 -0
- package/dist/main/services/workspace/workspace-referer.js +26 -0
- package/dist/main/services/workspace/workspace-service.d.ts +7 -5
- package/dist/main/services/workspace/workspace-service.js +96 -135
- package/dist/main/services/workspace/workspace-thumbnails.d.ts +22 -0
- package/dist/main/services/workspace/workspace-thumbnails.js +67 -0
- package/dist/main/utils/ipc-context-source.d.ts +40 -0
- package/dist/main/utils/ipc-context-source.js +23 -0
- package/dist/main/utils/ipc-registry.d.ts +46 -21
- package/dist/main/utils/ipc-registry.js +166 -76
- package/dist/main/utils/paths.d.ts +18 -0
- package/dist/main/utils/paths.js +18 -0
- package/dist/main/utils/sender-policy.d.ts +10 -1
- package/dist/main/utils/sender-policy.js +42 -4
- package/dist/main/utils/theme.d.ts +18 -8
- package/dist/main/utils/theme.js +19 -9
- package/dist/main/windows/internal-devtools-window/index.d.ts +66 -0
- package/dist/main/windows/internal-devtools-window/index.js +160 -0
- package/dist/main/windows/main-window/create.d.ts +16 -0
- package/dist/main/windows/main-window/create.js +19 -11
- package/dist/main/windows/main-window/events.d.ts +1 -1
- package/dist/main/windows/main-window/events.js +26 -13
- package/dist/main/windows/main-window/index.d.ts +1 -1
- package/dist/main/windows/main-window/index.js +1 -1
- package/dist/main/windows/service-host-window/create.d.ts +1 -92
- package/dist/main/windows/service-host-window/create.js +1 -154
- package/dist/native-host/common/common.js +173 -53
- package/dist/native-host/container/pageFrame.css +1 -1
- package/dist/native-host/render/render.js +8278 -3659
- package/dist/native-host/service/service.js +2 -2
- package/dist/preload/index.d.ts +2 -0
- package/dist/preload/index.js +1 -0
- package/dist/preload/instrumentation/app-data.d.ts +2 -2
- package/dist/preload/instrumentation/app-data.js +1 -1
- package/dist/preload/instrumentation/wxml.js +1 -1
- package/dist/preload/runtime/bridge.d.ts +3 -3
- package/dist/preload/runtime/bridge.js +2 -2
- package/dist/preload/runtime/clipboard.d.ts +6 -0
- package/dist/preload/runtime/clipboard.js +12 -0
- package/dist/preload/runtime/host-dialog-advertiser.d.ts +22 -0
- package/dist/preload/runtime/host-dialog-advertiser.js +37 -0
- package/dist/preload/runtime/host-dialog-port.d.ts +44 -0
- package/dist/preload/runtime/host-dialog-port.js +53 -0
- package/dist/preload/runtime/host-dialog-runtime.d.ts +28 -0
- package/dist/preload/runtime/host-dialog-runtime.js +36 -0
- package/dist/preload/runtime/host-sidebar-advertiser.d.ts +19 -0
- package/dist/preload/runtime/host-sidebar-advertiser.js +35 -0
- package/dist/preload/runtime/host-sidebar-port.d.ts +44 -0
- package/dist/preload/runtime/host-sidebar-port.js +53 -0
- package/dist/preload/runtime/host-sidebar-runtime.d.ts +28 -0
- package/dist/preload/runtime/host-sidebar-runtime.js +36 -0
- package/dist/preload/runtime/host-slot-port-bridge.d.ts +18 -0
- package/dist/preload/runtime/host-slot-port-bridge.js +112 -0
- package/dist/preload/runtime/host-toolbar-advertiser.d.ts +5 -13
- package/dist/preload/runtime/host-toolbar-advertiser.js +18 -38
- package/dist/preload/runtime/host-toolbar-port.d.ts +9 -0
- package/dist/preload/runtime/host-toolbar-port.js +11 -95
- package/dist/preload/runtime/native-host.d.ts +14 -0
- package/dist/preload/runtime/native-host.js +5 -8
- package/dist/preload/runtime/node-bindings.d.ts +18 -0
- package/dist/preload/runtime/node-bindings.js +44 -0
- package/dist/preload/runtime/temp-files.js +9 -2
- package/dist/preload/runtime/wait-for-slot-root.d.ts +23 -0
- package/dist/preload/runtime/wait-for-slot-root.js +80 -0
- package/dist/preload/shared/api-compat.js +63 -41
- package/dist/preload/windows/host-dialog-runtime.cjs +360 -0
- package/dist/preload/windows/host-dialog-runtime.cjs.map +7 -0
- package/dist/preload/windows/host-dialog-runtime.d.ts +2 -0
- package/dist/preload/windows/host-dialog-runtime.js +13 -0
- package/dist/preload/windows/host-sidebar-runtime.cjs +361 -0
- package/dist/preload/windows/host-sidebar-runtime.cjs.map +7 -0
- package/dist/preload/windows/host-sidebar-runtime.d.ts +2 -0
- package/dist/preload/windows/host-sidebar-runtime.js +13 -0
- package/dist/preload/windows/host-toolbar-runtime.cjs +142 -52
- package/dist/preload/windows/host-toolbar-runtime.cjs.map +3 -3
- package/dist/preload/windows/main.cjs +4922 -1246
- 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 +376 -322
- package/dist/preload/windows/simulator.cjs.map +4 -4
- package/dist/preload/windows/simulator.js +376 -322
- package/dist/render-host/pageFrame.html +4 -4
- package/dist/render-host/preload.cjs +30 -0
- package/dist/render-host/render-inspect.js +184 -115
- package/dist/renderer/assets/button-CB2MWjHY.js +2 -0
- package/dist/renderer/assets/constants-CkoGPQTS.js +2 -0
- package/dist/renderer/assets/constants-zQZ2-y21.js +2 -0
- package/dist/renderer/assets/createLucideIcon-cZ9FlZZw.js +2 -0
- package/dist/renderer/assets/devicePicker-H2eIO4e1.js +2 -0
- package/dist/renderer/assets/dialog-pHzEA8Vx.js +46 -0
- package/dist/renderer/assets/dist-B5HADirS.js +2 -0
- package/dist/renderer/assets/dist-DIFlRMKe.js +2 -0
- package/dist/renderer/assets/hostSidebarDefault-DRWh6OCt.js +2 -0
- package/dist/renderer/assets/index-CEL_XFge.js +2 -0
- package/dist/renderer/assets/input-CAObw95L.js +2 -0
- package/dist/renderer/assets/ipc-channels-overlays-gIPUFnqc.js +2 -0
- package/dist/renderer/assets/jsx-runtime-DICEQH_0.css +1 -0
- package/dist/renderer/assets/jsx-runtime-DIw5wnYl.js +9 -0
- package/dist/renderer/assets/plus-BQ9u5EbL.js +2 -0
- package/dist/renderer/assets/popover-Cw7G2Ctp.js +2 -0
- package/dist/renderer/assets/presets-DMZOb9ay.js +2 -0
- package/dist/renderer/assets/project-api-YTOr_Yvo.js +2 -0
- package/dist/renderer/assets/projectCreateDialog-BmLqiYxn.js +2 -0
- package/dist/renderer/assets/search-BMvuYF48.js +2 -0
- package/dist/renderer/assets/select-nFP95TxM.js +2 -0
- package/dist/renderer/assets/settings-CnpVfSWt.js +2 -0
- package/dist/renderer/assets/settings-api-Ccsf-Nsj.js +2 -0
- package/dist/renderer/assets/settings-tab-bar-CAzrv32m.js +2 -0
- package/dist/renderer/assets/smartphone-Bb2GdIKy.js +2 -0
- package/dist/renderer/assets/tabs-CPKN3Mmq.js +2 -0
- package/dist/renderer/assets/tooltip-D6AxXRk5.js +2 -0
- package/dist/renderer/assets/types-Bh0hA7El.js +2 -0
- package/dist/renderer/assets/updateDialog-CwndJ0Bl.js +2 -0
- package/dist/renderer/assets/utils-sEB5OZEQ.js +2 -0
- package/dist/renderer/assets/view-api-B-2zPBR5.js +2 -0
- package/dist/renderer/assets/view-ids-BfaDVV5P.js +2 -0
- package/dist/renderer/assets/workbench-C0Jkdlps.js +5 -0
- package/dist/renderer/assets/workbenchSettings-YD0Ctbm_.js +8 -0
- package/dist/renderer/entries/device-picker/index.html +28 -0
- package/dist/renderer/entries/host-sidebar-default/index.html +22 -0
- package/dist/renderer/entries/main/index.html +16 -7
- package/dist/renderer/entries/popover/index.html +16 -6
- package/dist/renderer/entries/project-create-dialog/index.html +27 -0
- package/dist/renderer/entries/settings/index.html +10 -5
- package/dist/renderer/entries/tooltip/index.html +21 -0
- package/dist/renderer/entries/update-dialog/index.html +25 -0
- package/dist/renderer/entries/workbench/index.html +49 -0
- package/dist/renderer/entries/workbench-settings/index.html +12 -5
- package/dist/service-host/appdata-set-data.cjs +39 -0
- package/dist/service-host/host-env-update.cjs +23 -0
- package/dist/service-host/preload.cjs +54 -48
- package/dist/service-host/service-message-queue.cjs +71 -0
- package/dist/service-host/sync-impls/menu-button-geometry.js +16 -5
- package/dist/service-host/sync-impls/menu-button.js +5 -3
- package/dist/service-host/sync-impls/system-info.js +31 -9
- package/dist/shared/bridge-channels.d.ts +1 -416
- package/dist/shared/bridge-channels.js +1 -89
- package/dist/shared/compile-mode-state.d.ts +73 -0
- package/dist/shared/compile-mode-state.js +100 -0
- package/dist/shared/compile-modes.d.ts +152 -0
- package/dist/shared/compile-modes.js +237 -0
- package/dist/shared/constants.d.ts +22 -0
- package/dist/shared/constants.js +22 -0
- package/dist/shared/dmb-resource-url.d.ts +2 -0
- package/dist/shared/dmb-resource-url.js +2 -0
- package/dist/shared/ipc-channels-overlays.d.ts +162 -0
- package/dist/shared/ipc-channels-overlays.js +203 -0
- package/dist/shared/ipc-channels.d.ts +24 -154
- package/dist/shared/ipc-channels.js +48 -96
- package/dist/shared/ipc-schemas.d.ts +143 -54
- package/dist/shared/ipc-schemas.js +137 -45
- package/dist/shared/node-bindings.d.ts +2 -0
- package/dist/shared/node-bindings.js +2 -0
- package/dist/shared/project-window-types.d.ts +42 -0
- package/dist/shared/project-window-types.js +2 -0
- package/dist/shared/simulator-route.d.ts +8 -0
- package/dist/shared/simulator-route.js +15 -0
- package/dist/shared/simulator-ui.d.ts +61 -0
- package/dist/shared/simulator-ui.js +12 -0
- package/dist/shared/types.d.ts +126 -41
- package/dist/shared/view-ids.d.ts +10 -0
- package/dist/shared/view-ids.js +23 -0
- package/dist/simulator/assets/bridge-channels-B3JAmRfl.js +2 -0
- package/dist/simulator/assets/device-shell-ATEhHV2_.css +1 -0
- package/dist/simulator/assets/device-shell-DucLepkm.js +431 -0
- package/dist/simulator/assets/simulator-B4rbcOVt.js +10 -0
- package/dist/simulator/assets/simulator-mini-app-DFo7fhi5.js +2 -0
- package/dist/simulator/assets/simulator-ui-BupATgKo.css +1 -0
- package/dist/simulator/assets/simulator-ui-i3GCc7YJ.js +2 -0
- package/dist/simulator/simulator.html +4 -3
- package/dist/simulator/temp-files.d.ts +35 -0
- package/dist/simulator/temp-files.js +121 -0
- package/dist/simulator/types.d.ts +50 -0
- package/dist/simulator/types.js +2 -0
- package/dist/vscode-workbench/assets/__vite-browser-external-JIkWewFf.js +1 -0
- package/dist/vscode-workbench/assets/{dist-TpGpmMGi.js → dist-CXG-u1VB.js} +3 -3
- package/dist/vscode-workbench/assets/fs-core-worker-urls-DZ1nod84.js +1 -0
- package/dist/vscode-workbench/assets/fs-core.worker-Bnmpp6fo.js +1 -0
- package/dist/vscode-workbench/assets/fs-query.worker-cZ-7Fjch.js +2 -0
- package/dist/vscode-workbench/assets/{iconv-lite-umd-C9tiCAJa.js → iconv-lite-umd-Dxx9Qyb4.js} +1 -1
- package/dist/vscode-workbench/assets/{index-DJ1HyMZ7.js → index-6VJMsaWj.js} +475 -475
- package/dist/vscode-workbench/assets/{jschardet-DE1jV513.js → jschardet-Ba3D16vt.js} +1 -1
- package/dist/vscode-workbench/index.html +21 -1
- package/package.json +23 -13
- 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/preload/instrumentation/wxml-extract.d.ts +0 -11
- package/dist/preload/instrumentation/wxml-extract.js +0 -382
- package/dist/preload/shared/sid-registry.d.ts +0 -11
- package/dist/preload/shared/sid-registry.js +0 -38
- package/dist/renderer/assets/constants-EAMiwL9_.js +0 -2
- package/dist/renderer/assets/index-BMqyDx71.js +0 -49
- package/dist/renderer/assets/input-CDAEwpBO.js +0 -2
- package/dist/renderer/assets/ipc-transport-B7eFOR68.css +0 -1
- package/dist/renderer/assets/ipc-transport-_G1k5V1p.js +0 -9
- package/dist/renderer/assets/popover-DEdjK14m.js +0 -2
- package/dist/renderer/assets/select-DpKPCh3y.js +0 -2
- package/dist/renderer/assets/settings-M5q2elUr.js +0 -2
- package/dist/renderer/assets/settings-api-CDlZoHiO.js +0 -2
- package/dist/renderer/assets/workbenchSettings-CT_H1WhV.js +0 -8
- package/dist/shared/appdata-accumulator.d.ts +0 -95
- package/dist/shared/appdata-accumulator.js +0 -218
- package/dist/shared/request-core.d.ts +0 -84
- package/dist/shared/request-core.js +0 -168
- package/dist/shared/simulator-api-metadata.d.ts +0 -26
- package/dist/shared/simulator-api-metadata.js +0 -59
- package/dist/shared/vpath.d.ts +0 -42
- package/dist/shared/vpath.js +0 -105
- package/dist/simulator/assets/bridge-channels-zhsumfky.js +0 -2
- package/dist/simulator/assets/device-shell-C-wcFq3Z.js +0 -2
- package/dist/simulator/assets/device-shell-CS1rqAQz.css +0 -1
- package/dist/simulator/assets/jsx-runtime-BDTY6fEq.js +0 -2
- package/dist/simulator/assets/simulator-DU3-fS3v.js +0 -10
- package/dist/simulator/assets/simulator-mini-app-DzfMfnVM.js +0 -2
- package/dist/simulator/device-shell/menu-button-geometry.js +0 -8
- package/dist/vscode-workbench/assets/__vite-browser-external-CXi6Kz9W.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ipcMain } from 'electron';
|
|
2
|
-
import {
|
|
2
|
+
import { addMuxedInvokeHandler, isMainFrameIpcSender, } from '@dimina-kit/electron-deck/main';
|
|
3
3
|
import { IpcValidationError } from './ipc-schema.js';
|
|
4
4
|
import { createLogger } from './logger.js';
|
|
5
5
|
const log = createLogger('ipc');
|
|
@@ -30,97 +30,154 @@ function summarizeSender(sender) {
|
|
|
30
30
|
const url = sender.getURL();
|
|
31
31
|
return `id=${sender.id} ${url.slice(0, 120)}`;
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Defense-in-depth frame check (sits alongside the sender white-list). A trusted
|
|
35
|
+
* webContents could embed a sub-frame of arbitrary origin; only its top (main)
|
|
36
|
+
* frame should reach gated IPC, so a sub-frame can't spoof the trusted sender.
|
|
37
|
+
*
|
|
38
|
+
* Verified on Electron 41 that `event.senderFrame` is reliably present on
|
|
39
|
+
* invoke / send / sendSync — including the editor's `beforeunload` sendSync
|
|
40
|
+
* write — and equals `sender.mainFrame` for top-frame traffic, so this never
|
|
41
|
+
* mis-rejects legitimate callers.
|
|
42
|
+
*
|
|
43
|
+
* Fail-closed on a null frame for REAL events: a sub-frame can send a message
|
|
44
|
+
* and immediately navigate/destroy itself, so by delivery time `senderFrame`
|
|
45
|
+
* resolves to null — allowing that would let the navigate-after-send trick
|
|
46
|
+
* bypass the boundary. A real Electron event always exposes the `senderFrame`
|
|
47
|
+
* property and `sender.mainFrame`, so we can tell a real event (frame-modeled,
|
|
48
|
+
* possibly null) from a frame-unaware unit-test stub (neither present) and only
|
|
49
|
+
* skip the check for the latter (the sender-id white-list still gates tests).
|
|
50
|
+
*/
|
|
51
|
+
/** Internal marker for "this sender is not allowed on this channel". */
|
|
52
|
+
const REJECT = Symbol('ipc-reject');
|
|
53
|
+
// Channel multiplexing (one real `ipcMain.handle` per channel, dispatched to
|
|
54
|
+
// whichever per-window registration claims the sender — needed because the
|
|
55
|
+
// storage, WXML and AppData panels each register their channels once per
|
|
56
|
+
// window) is shared with dimina-electron-runtime's bridge router; see
|
|
57
|
+
// @dimina-kit/electron-deck/main's ipc-mux.ts for the mux itself.
|
|
50
58
|
/**
|
|
51
59
|
* Tiny fluent helper that wraps every `ipcMain.handle` / `ipcMain.on` with a
|
|
52
60
|
* matching removeHandler/removeListener registered into an internal registry.
|
|
53
61
|
*
|
|
54
|
-
* Each `register*Ipc(
|
|
62
|
+
* Each `register*Ipc(...)` returns one of these as a Disposable so the
|
|
55
63
|
* workbench-level registry can dispose all built-in handlers in one shot.
|
|
56
64
|
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
65
|
+
* The constructor takes either a {@link SenderPolicy} (trust only: is this
|
|
66
|
+
* sender allowed?) or an {@link IpcContextSource} (trust plus ownership: which
|
|
67
|
+
* window context does this sender belong to?). With either, every incoming
|
|
68
|
+
* invocation is gated:
|
|
69
|
+
* - `handle` / `handleRouted`: rejected senders cause the invoke promise to
|
|
70
|
+
* reject with `Error('IPC sender rejected for channel <channel>')`.
|
|
71
|
+
* - `on` / `onRouted`: rejected senders are silently dropped (the original
|
|
72
|
+
* listener is never called).
|
|
73
|
+
* - `handleSync` / `handleSyncRouted`: rejected senders get a structured
|
|
74
|
+
* `{ ok: false, code: 'EREJECTED', … }` returnValue, because sendSync blocks
|
|
75
|
+
* the renderer until one is set.
|
|
76
|
+
* In every case a single `console.warn` is emitted with the channel name and a
|
|
77
|
+
* short sender summary. With no policy — or a source that declares itself
|
|
78
|
+
* `ungated` — the wrapper is a pass-through, preserving backwards
|
|
79
|
+
* compatibility for unit tests and callers that opted out.
|
|
80
|
+
*
|
|
81
|
+
* The `*Routed` variants hand the owning context to the handler as its first
|
|
82
|
+
* argument. `TCtx` is `never` unless the registry was built from a source, so
|
|
83
|
+
* they are unusable (and unreachable) on a policy-only registry.
|
|
66
84
|
*/
|
|
67
85
|
export class IpcRegistry {
|
|
86
|
+
// Every cleanup is a synchronous ipcMain.removeHandler/removeListener call,
|
|
87
|
+
// so dispose() can (and must) run them all before returning: callers
|
|
88
|
+
// `dispose()` without awaiting and rely on every channel being unregistered
|
|
89
|
+
// synchronously — an async registry would leave all but the first handler
|
|
90
|
+
// live until a later microtask.
|
|
91
|
+
cleanups = [];
|
|
92
|
+
_disposed = false;
|
|
68
93
|
policy;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
94
|
+
source;
|
|
95
|
+
/** False reproduces the policy-less pass-through exactly: no main-frame
|
|
96
|
+
* check, and a synchronous handler keeps its synchronous return value. */
|
|
97
|
+
gated;
|
|
98
|
+
constructor(policyOrSource) {
|
|
99
|
+
const isPolicy = typeof policyOrSource === 'function';
|
|
100
|
+
this.policy = isPolicy ? policyOrSource : null;
|
|
101
|
+
this.source = policyOrSource != null && !isPolicy ? policyOrSource : null;
|
|
102
|
+
this.gated = this.policy != null || (this.source != null && !this.source.ungated);
|
|
72
103
|
}
|
|
73
|
-
|
|
74
|
-
|
|
104
|
+
/** Trust gate and owner resolution for one incoming message. */
|
|
105
|
+
admit(event) {
|
|
106
|
+
const source = this.source;
|
|
107
|
+
if (source) {
|
|
108
|
+
// An ungated source always claims the sender, so the frame check — part
|
|
109
|
+
// of the trust gate, not of ownership — stays off with it.
|
|
110
|
+
if (source.ungated)
|
|
111
|
+
return source.resolve(event.sender);
|
|
112
|
+
if (!isMainFrameIpcSender(event))
|
|
113
|
+
return REJECT;
|
|
114
|
+
const ctx = source.resolve(event.sender);
|
|
115
|
+
return ctx == null ? REJECT : ctx;
|
|
116
|
+
}
|
|
117
|
+
// A bare policy answers trust only, so the accepted branch carries no
|
|
118
|
+
// context; `TCtx` is `never` in that mode, so no handler can observe it.
|
|
119
|
+
if (!this.policy)
|
|
120
|
+
return undefined;
|
|
121
|
+
return this.policy(event.sender) && isMainFrameIpcSender(event)
|
|
122
|
+
? undefined
|
|
123
|
+
: REJECT;
|
|
124
|
+
}
|
|
125
|
+
warnRejected(channel, sender) {
|
|
126
|
+
console.warn(`[ipc] sender rejected for channel '${channel}' (${summarizeSender(sender)})`);
|
|
127
|
+
}
|
|
128
|
+
addInvokeHandler(channel, invoke) {
|
|
75
129
|
// The gate is `async` so a rejected sender surfaces as a *rejected
|
|
76
130
|
// promise* (the invoke-result contract) rather than a synchronous throw —
|
|
77
131
|
// synchronous throws can escape callers that wrap the result in
|
|
78
132
|
// `Promise.resolve(...)` instead of `await`-ing it directly.
|
|
79
|
-
const guarded =
|
|
133
|
+
const guarded = this.gated
|
|
80
134
|
? async (event, ...args) => {
|
|
81
|
-
const
|
|
82
|
-
if (
|
|
83
|
-
|
|
135
|
+
const ctx = this.admit(event);
|
|
136
|
+
if (ctx === REJECT) {
|
|
137
|
+
this.warnRejected(channel, event.sender);
|
|
84
138
|
throw new Error(`IPC sender rejected for channel ${channel}`);
|
|
85
139
|
}
|
|
86
|
-
return
|
|
140
|
+
return invoke(ctx, event, args);
|
|
87
141
|
}
|
|
88
|
-
:
|
|
89
|
-
|
|
90
|
-
|
|
142
|
+
: (event, ...args) => invoke(this.admit(event), event, args);
|
|
143
|
+
this.cleanups.push(addMuxedInvokeHandler(ipcMain, channel, {
|
|
144
|
+
claims: (event) => this.admit(event) !== REJECT,
|
|
145
|
+
handle: guarded,
|
|
146
|
+
}));
|
|
91
147
|
return this;
|
|
92
148
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
const policy = this.policy;
|
|
149
|
+
handle(channel, fn) {
|
|
150
|
+
const raw = fn;
|
|
151
|
+
return this.addInvokeHandler(channel, (_ctx, event, args) => raw(event, ...args));
|
|
152
|
+
}
|
|
153
|
+
/** {@link handle} answered by the context that owns the calling sender. */
|
|
154
|
+
handleRouted(channel, fn) {
|
|
155
|
+
return this.addInvokeHandler(channel, (ctx, event, args) => fn(ctx, event, ...args));
|
|
156
|
+
}
|
|
157
|
+
addSyncHandler(channel, invoke) {
|
|
103
158
|
const listener = (event, ...args) => {
|
|
104
|
-
|
|
105
|
-
//
|
|
159
|
+
const syncEvent = event;
|
|
160
|
+
// Everything — including the gate — runs inside the try so EVERY path
|
|
161
|
+
// sets `event.returnValue`. sendSync blocks the renderer until it is
|
|
106
162
|
// set, so an unset value (e.g. a throwing policy fn) would hang the
|
|
107
163
|
// renderer forever; the catch guarantees a sentinel instead.
|
|
108
164
|
try {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
event.
|
|
165
|
+
const ctx = this.admit(event);
|
|
166
|
+
if (ctx === REJECT) {
|
|
167
|
+
this.warnRejected(channel, event.sender);
|
|
168
|
+
syncEvent.returnValue = {
|
|
112
169
|
ok: false,
|
|
113
170
|
code: 'EREJECTED',
|
|
114
171
|
message: `IPC sender rejected for channel ${channel}`,
|
|
115
172
|
};
|
|
116
173
|
return;
|
|
117
174
|
}
|
|
118
|
-
|
|
175
|
+
syncEvent.returnValue = invoke(ctx, event, args);
|
|
119
176
|
}
|
|
120
177
|
catch (err) {
|
|
121
178
|
reportListenerError(channel, err);
|
|
122
179
|
const code = err?.code;
|
|
123
|
-
|
|
180
|
+
syncEvent.returnValue = {
|
|
124
181
|
ok: false,
|
|
125
182
|
code: typeof code === 'string' ? code : 'EUNKNOWN',
|
|
126
183
|
message: err instanceof Error ? err.message : String(err),
|
|
@@ -128,17 +185,25 @@ export class IpcRegistry {
|
|
|
128
185
|
}
|
|
129
186
|
};
|
|
130
187
|
ipcMain.on(channel, listener);
|
|
131
|
-
this.
|
|
132
|
-
ipcMain.removeListener(channel, listener);
|
|
133
|
-
});
|
|
188
|
+
this.cleanups.push(() => ipcMain.removeListener(channel, listener));
|
|
134
189
|
return this;
|
|
135
190
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
191
|
+
/**
|
|
192
|
+
* Register a SYNCHRONOUS `ipcRenderer.sendSync` handler. Unlike {@link on}
|
|
193
|
+
* (fire-and-forget), the renderer is blocked until we set `event.returnValue`,
|
|
194
|
+
* so `fn` MUST be synchronous and return the value to hand back.
|
|
195
|
+
*/
|
|
196
|
+
handleSync(channel, fn) {
|
|
197
|
+
return this.addSyncHandler(channel, (_ctx, event, args) => fn(event, ...args));
|
|
198
|
+
}
|
|
199
|
+
/** {@link handleSync} answered by the context that owns the calling sender. */
|
|
200
|
+
handleSyncRouted(channel, fn) {
|
|
201
|
+
return this.addSyncHandler(channel, (ctx, event, args) => fn(ctx, event, ...args));
|
|
202
|
+
}
|
|
203
|
+
addListener(channel, invoke) {
|
|
204
|
+
const safeInvoke = (ctx, event, args) => {
|
|
140
205
|
try {
|
|
141
|
-
const ret =
|
|
206
|
+
const ret = invoke(ctx, event, args);
|
|
142
207
|
if (isThenable(ret)) {
|
|
143
208
|
// Async listeners would otherwise leak rejections into Electron's
|
|
144
209
|
// event loop as `UnhandledPromiseRejection`. Funnel them into the
|
|
@@ -150,24 +215,49 @@ export class IpcRegistry {
|
|
|
150
215
|
reportListenerError(channel, err);
|
|
151
216
|
}
|
|
152
217
|
};
|
|
153
|
-
const guarded =
|
|
218
|
+
const guarded = this.gated
|
|
154
219
|
? (event, ...args) => {
|
|
155
|
-
const
|
|
156
|
-
if (
|
|
157
|
-
|
|
220
|
+
const ctx = this.admit(event);
|
|
221
|
+
if (ctx === REJECT) {
|
|
222
|
+
this.warnRejected(channel, event.sender);
|
|
158
223
|
return;
|
|
159
224
|
}
|
|
160
|
-
safeInvoke(event, args);
|
|
225
|
+
safeInvoke(ctx, event, args);
|
|
161
226
|
}
|
|
162
|
-
: (event, ...args) => safeInvoke(event, args);
|
|
227
|
+
: (event, ...args) => safeInvoke(this.admit(event), event, args);
|
|
163
228
|
ipcMain.on(channel, guarded);
|
|
164
|
-
this.
|
|
165
|
-
ipcMain.removeListener(channel, guarded);
|
|
166
|
-
});
|
|
229
|
+
this.cleanups.push(() => ipcMain.removeListener(channel, guarded));
|
|
167
230
|
return this;
|
|
168
231
|
}
|
|
232
|
+
on(channel, fn) {
|
|
233
|
+
const raw = fn;
|
|
234
|
+
return this.addListener(channel, (_ctx, event, args) => raw(event, ...args));
|
|
235
|
+
}
|
|
236
|
+
/** {@link on} answered by the context that owns the calling sender. */
|
|
237
|
+
onRouted(channel, fn) {
|
|
238
|
+
return this.addListener(channel, (ctx, event, args) => fn(ctx, event, ...args));
|
|
239
|
+
}
|
|
169
240
|
dispose() {
|
|
170
|
-
|
|
241
|
+
// Synchronous drain (LIFO, idempotent): every channel is unregistered
|
|
242
|
+
// before this returns; the promise only carries aggregated errors.
|
|
243
|
+
if (this._disposed)
|
|
244
|
+
return Promise.resolve();
|
|
245
|
+
this._disposed = true;
|
|
246
|
+
const items = this.cleanups.slice().reverse();
|
|
247
|
+
this.cleanups = [];
|
|
248
|
+
const errors = [];
|
|
249
|
+
for (const cleanup of items) {
|
|
250
|
+
try {
|
|
251
|
+
cleanup();
|
|
252
|
+
}
|
|
253
|
+
catch (e) {
|
|
254
|
+
errors.push(e);
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
if (errors.length > 0) {
|
|
258
|
+
return Promise.reject(new AggregateError(errors, 'IpcRegistry encountered errors during dispose'));
|
|
259
|
+
}
|
|
260
|
+
return Promise.resolve();
|
|
171
261
|
}
|
|
172
262
|
}
|
|
173
263
|
//# sourceMappingURL=ipc-registry.js.map
|
|
@@ -31,7 +31,25 @@ export declare const mainPreloadPath: string;
|
|
|
31
31
|
* npm/pnpm node_modules and ASAR packaging alike get an absolute, correct path.
|
|
32
32
|
*/
|
|
33
33
|
export declare const hostToolbarRuntimePreloadPath: string;
|
|
34
|
+
/** Session-registered sidebar-runtime preload bundle, mirroring {@link hostToolbarRuntimePreloadPath}. */
|
|
35
|
+
export declare const hostSidebarRuntimePreloadPath: string;
|
|
36
|
+
/** Session-registered dialog-runtime preload bundle, mirroring {@link hostToolbarRuntimePreloadPath}. */
|
|
37
|
+
export declare const hostDialogRuntimePreloadPath: string;
|
|
34
38
|
export declare const simulatorDir: string;
|
|
39
|
+
/**
|
|
40
|
+
* DevTools builds its own copy of every native mini-app runtime asset. Pin the
|
|
41
|
+
* shared runtime bridge to that copy so a packaged client never depends on the
|
|
42
|
+
* standalone npm package's optional asset assembly step.
|
|
43
|
+
*/
|
|
44
|
+
export declare const runtimeAssetPaths: {
|
|
45
|
+
root: string;
|
|
46
|
+
simulatorDir: string;
|
|
47
|
+
simulatorPreloadPath: string;
|
|
48
|
+
renderHostHtmlPath: string;
|
|
49
|
+
renderHostPreloadPath: string;
|
|
50
|
+
serviceHostHtmlPath: string;
|
|
51
|
+
serviceHostPreloadPath: string;
|
|
52
|
+
};
|
|
35
53
|
export declare function getRendererDir(): string;
|
|
36
54
|
export declare function getPreloadDir(): string;
|
|
37
55
|
export declare function getRendererHtml(filename: string): string;
|
package/dist/main/utils/paths.js
CHANGED
|
@@ -59,7 +59,25 @@ export const mainPreloadPath = path.join(devtoolsPackageRoot, 'dist/preload/wind
|
|
|
59
59
|
* npm/pnpm node_modules and ASAR packaging alike get an absolute, correct path.
|
|
60
60
|
*/
|
|
61
61
|
export const hostToolbarRuntimePreloadPath = path.join(devtoolsPackageRoot, 'dist/preload/windows/host-toolbar-runtime.cjs');
|
|
62
|
+
/** Session-registered sidebar-runtime preload bundle, mirroring {@link hostToolbarRuntimePreloadPath}. */
|
|
63
|
+
export const hostSidebarRuntimePreloadPath = path.join(devtoolsPackageRoot, 'dist/preload/windows/host-sidebar-runtime.cjs');
|
|
64
|
+
/** Session-registered dialog-runtime preload bundle, mirroring {@link hostToolbarRuntimePreloadPath}. */
|
|
65
|
+
export const hostDialogRuntimePreloadPath = path.join(devtoolsPackageRoot, 'dist/preload/windows/host-dialog-runtime.cjs');
|
|
62
66
|
export const simulatorDir = path.join(devtoolsPackageRoot, 'dist/simulator');
|
|
67
|
+
/**
|
|
68
|
+
* DevTools builds its own copy of every native mini-app runtime asset. Pin the
|
|
69
|
+
* shared runtime bridge to that copy so a packaged client never depends on the
|
|
70
|
+
* standalone npm package's optional asset assembly step.
|
|
71
|
+
*/
|
|
72
|
+
export const runtimeAssetPaths = {
|
|
73
|
+
root: path.join(devtoolsPackageRoot, 'dist'),
|
|
74
|
+
simulatorDir,
|
|
75
|
+
simulatorPreloadPath: path.join(devtoolsPackageRoot, 'dist/preload/windows/simulator.cjs'),
|
|
76
|
+
renderHostHtmlPath: path.join(devtoolsPackageRoot, 'dist/render-host/pageFrame.html'),
|
|
77
|
+
renderHostPreloadPath: path.join(devtoolsPackageRoot, 'dist/render-host/preload.cjs'),
|
|
78
|
+
serviceHostHtmlPath: path.join(devtoolsPackageRoot, 'dist/service-host/service.html'),
|
|
79
|
+
serviceHostPreloadPath: path.join(devtoolsPackageRoot, 'dist/service-host/preload.cjs'),
|
|
80
|
+
};
|
|
63
81
|
export function getRendererDir() {
|
|
64
82
|
return rendererDir;
|
|
65
83
|
}
|
|
@@ -8,7 +8,7 @@ import type { SenderPolicy } from './ipc-registry.js';
|
|
|
8
8
|
* - the main window's renderer
|
|
9
9
|
* - the optional workbench settings BrowserWindow's renderer (when open)
|
|
10
10
|
* - the settings overlay view (when open)
|
|
11
|
-
* - the popover overlay
|
|
11
|
+
* - the popover and tooltip overlay views (when open)
|
|
12
12
|
*
|
|
13
13
|
* The simulator webview is intentionally NOT on this list. Anything it
|
|
14
14
|
* needs from main (currently just the custom-apis bridge — see
|
|
@@ -31,4 +31,13 @@ import type { SenderPolicy } from './ipc-registry.js';
|
|
|
31
31
|
* iframe — is rejected.
|
|
32
32
|
*/
|
|
33
33
|
export declare function createWorkbenchSenderPolicy(ctx: Pick<WorkbenchContext, 'windows' | 'views' | 'trustedWindowSenderIds'>): SenderPolicy;
|
|
34
|
+
/**
|
|
35
|
+
* The senders this context structurally OWNS: its own main-window renderer,
|
|
36
|
+
* its own settings window and the overlay views mounted inside it. Deliberately
|
|
37
|
+
* excludes `trustedWindowSenderIds` — that map is shared by the whole app, so
|
|
38
|
+
* every context would claim the same host window and ownership would stop being
|
|
39
|
+
* unique. `createWindowContextRouter` routes on this check first for exactly
|
|
40
|
+
* that reason.
|
|
41
|
+
*/
|
|
42
|
+
export declare function createWorkbenchOwnedSenderCheck(ctx: Pick<WorkbenchContext, 'windows' | 'views'>): SenderPolicy;
|
|
34
43
|
//# sourceMappingURL=sender-policy.d.ts.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* - the main window's renderer
|
|
7
7
|
* - the optional workbench settings BrowserWindow's renderer (when open)
|
|
8
8
|
* - the settings overlay view (when open)
|
|
9
|
-
* - the popover overlay
|
|
9
|
+
* - the popover and tooltip overlay views (when open)
|
|
10
10
|
*
|
|
11
11
|
* The simulator webview is intentionally NOT on this list. Anything it
|
|
12
12
|
* needs from main (currently just the custom-apis bridge — see
|
|
@@ -29,6 +29,26 @@
|
|
|
29
29
|
* iframe — is rejected.
|
|
30
30
|
*/
|
|
31
31
|
export function createWorkbenchSenderPolicy(ctx) {
|
|
32
|
+
const ownsSender = createWorkbenchOwnedSenderCheck(ctx);
|
|
33
|
+
return (sender) => {
|
|
34
|
+
if (ownsSender(sender))
|
|
35
|
+
return true;
|
|
36
|
+
if (sender.isDestroyed())
|
|
37
|
+
return false;
|
|
38
|
+
// Host-registered trusted windows (registerTrustedWindow). The map is
|
|
39
|
+
// app-wide, so this is the one accepted sender no single context owns.
|
|
40
|
+
return ctx.trustedWindowSenderIds.has(sender.id);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The senders this context structurally OWNS: its own main-window renderer,
|
|
45
|
+
* its own settings window and the overlay views mounted inside it. Deliberately
|
|
46
|
+
* excludes `trustedWindowSenderIds` — that map is shared by the whole app, so
|
|
47
|
+
* every context would claim the same host window and ownership would stop being
|
|
48
|
+
* unique. `createWindowContextRouter` routes on this check first for exactly
|
|
49
|
+
* that reason.
|
|
50
|
+
*/
|
|
51
|
+
export function createWorkbenchOwnedSenderCheck(ctx) {
|
|
32
52
|
return (sender) => {
|
|
33
53
|
if (sender.isDestroyed())
|
|
34
54
|
return false;
|
|
@@ -38,9 +58,6 @@ export function createWorkbenchSenderPolicy(ctx) {
|
|
|
38
58
|
// Standalone settings BrowserWindow renderer
|
|
39
59
|
if (ctx.windows.isSettingsWindowSender(sender.id))
|
|
40
60
|
return true;
|
|
41
|
-
// Host-registered trusted windows (registerTrustedWindow)
|
|
42
|
-
if (ctx.trustedWindowSenderIds.has(sender.id))
|
|
43
|
-
return true;
|
|
44
61
|
// Settings overlay view (mounted inside the main window)
|
|
45
62
|
const settingsViewId = ctx.views.getSettingsWebContentsId();
|
|
46
63
|
if (settingsViewId != null && sender.id === settingsViewId)
|
|
@@ -49,6 +66,27 @@ export function createWorkbenchSenderPolicy(ctx) {
|
|
|
49
66
|
const popoverViewId = ctx.views.getPopoverWebContentsId();
|
|
50
67
|
if (popoverViewId != null && sender.id === popoverViewId)
|
|
51
68
|
return true;
|
|
69
|
+
// Tooltip overlay view. It loads only the bundled local renderer and needs
|
|
70
|
+
// the shared overlay-ready + intrinsic-measurement channels.
|
|
71
|
+
const tooltipViewId = ctx.views.getTooltipWebContentsId();
|
|
72
|
+
if (tooltipViewId != null && sender.id === tooltipViewId)
|
|
73
|
+
return true;
|
|
74
|
+
// Project-create-dialog overlay view. Devtools-owned bundled renderer
|
|
75
|
+
// (the WCV that replaced the Radix DOM-portal dialog), same trust level
|
|
76
|
+
// as settings/popover/tooltip.
|
|
77
|
+
const projectCreateDialogViewId = ctx.views.getProjectCreateDialogWebContentsId();
|
|
78
|
+
if (projectCreateDialogViewId != null && sender.id === projectCreateDialogViewId)
|
|
79
|
+
return true;
|
|
80
|
+
// Update-available overlay view. Same devtools-owned trust level.
|
|
81
|
+
const updateDialogViewId = ctx.views.getUpdateDialogWebContentsId();
|
|
82
|
+
if (updateDialogViewId != null && sender.id === updateDialogViewId)
|
|
83
|
+
return true;
|
|
84
|
+
// Device-picker overlay view. Same devtools-owned trust level — the
|
|
85
|
+
// simulator toolbar's device selector, moved out of the main renderer's
|
|
86
|
+
// DOM so the simulator WCV can't occlude it.
|
|
87
|
+
const devicePickerViewId = ctx.views.getDevicePickerWebContentsId();
|
|
88
|
+
if (devicePickerViewId != null && sender.id === devicePickerViewId)
|
|
89
|
+
return true;
|
|
52
90
|
// The host-toolbar overlay is DELIBERATELY NOT trusted here. The host loads
|
|
53
91
|
// arbitrary content into it, so granting it the global white-list would open
|
|
54
92
|
// all ~72 IpcRegistry channels to that content. Its one channel (the reverse
|
|
@@ -14,8 +14,14 @@ export declare function themeBg(): string;
|
|
|
14
14
|
* the desk is a neutral grey kept a touch off the window so the light-colored
|
|
15
15
|
* phone keeps contrast against it in BOTH schemes.
|
|
16
16
|
*
|
|
17
|
-
* Dark:
|
|
18
|
-
*
|
|
17
|
+
* Dark: #282828 | Light: #f7f7f9 — both match the renderer's --color-surface-2
|
|
18
|
+
* chrome tone (@dimina-kit/design, css/tokens.css). Dark is a package-owned
|
|
19
|
+
* value rather than a Cornetto --qd-muted alias: pixel-verified against Figma
|
|
20
|
+
* node 66:1729 at rgb(40,40,40),
|
|
21
|
+
* which doesn't match any Cornetto dark token (--qd-muted is #383838, off by
|
|
22
|
+
* 16 units — confirmed too light against the app's own dark-mode screenshots).
|
|
23
|
+
* Light's #f7f7f9 IS an exact --qd-muted match (verified against node 25:5),
|
|
24
|
+
* so only dark diverges from the Cornetto alias.
|
|
19
25
|
*
|
|
20
26
|
* MUST stay equal to the renderer's `--color-sim-bg` (design.css) and the
|
|
21
27
|
* simulator page's `.device-shell-root` background (device-shell.css): the WCV,
|
|
@@ -35,12 +41,16 @@ export declare function simDeskBg(): string;
|
|
|
35
41
|
* The defect is platform-agnostic, so the fix is too: one `nativeTheme`
|
|
36
42
|
* `updated` listener re-syncs every current and future BrowserWindow.
|
|
37
43
|
*
|
|
38
|
-
* Known limitation: on Linux
|
|
39
|
-
* system theme
|
|
40
|
-
* `
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
+
* Known limitation: on some Linux desktops (KDE Plasma + Wayland and other
|
|
45
|
+
* wlroots compositors) an OS-level system theme change flips `updated` with
|
|
46
|
+
* a stale/inverted `shouldUseDarkColors` instead of the correct value — a
|
|
47
|
+
* Chromium ≥142 regression (electron/electron#48736, crbug 462191707, open
|
|
48
|
+
* as of 2026-06) distinct from the older #25925 (fixed since Electron 13,
|
|
49
|
+
* 2021). GNOME/GTK-portal desktops are unaffected. In-app theme switches go
|
|
50
|
+
* through `applyTheme()` and are unaffected on every platform; the gap is
|
|
51
|
+
* limited to the affected Linux desktops + `theme: 'system'` + an OS theme
|
|
52
|
+
* change, an upstream Electron limitation that also leaves the renderer's
|
|
53
|
+
* `prefers-color-scheme` stale.
|
|
44
54
|
*
|
|
45
55
|
* Returns a Disposable that detaches the listener. Install it once during
|
|
46
56
|
* app setup and hand the Disposable to the workbench registry.
|
package/dist/main/utils/theme.js
CHANGED
|
@@ -18,8 +18,14 @@ export function themeBg() {
|
|
|
18
18
|
* the desk is a neutral grey kept a touch off the window so the light-colored
|
|
19
19
|
* phone keeps contrast against it in BOTH schemes.
|
|
20
20
|
*
|
|
21
|
-
* Dark:
|
|
22
|
-
*
|
|
21
|
+
* Dark: #282828 | Light: #f7f7f9 — both match the renderer's --color-surface-2
|
|
22
|
+
* chrome tone (@dimina-kit/design, css/tokens.css). Dark is a package-owned
|
|
23
|
+
* value rather than a Cornetto --qd-muted alias: pixel-verified against Figma
|
|
24
|
+
* node 66:1729 at rgb(40,40,40),
|
|
25
|
+
* which doesn't match any Cornetto dark token (--qd-muted is #383838, off by
|
|
26
|
+
* 16 units — confirmed too light against the app's own dark-mode screenshots).
|
|
27
|
+
* Light's #f7f7f9 IS an exact --qd-muted match (verified against node 25:5),
|
|
28
|
+
* so only dark diverges from the Cornetto alias.
|
|
23
29
|
*
|
|
24
30
|
* MUST stay equal to the renderer's `--color-sim-bg` (design.css) and the
|
|
25
31
|
* simulator page's `.device-shell-root` background (device-shell.css): the WCV,
|
|
@@ -27,7 +33,7 @@ export function themeBg() {
|
|
|
27
33
|
* never flashes a mismatched strip. Update all three together.
|
|
28
34
|
*/
|
|
29
35
|
export function simDeskBg() {
|
|
30
|
-
return nativeTheme.shouldUseDarkColors ? '#
|
|
36
|
+
return nativeTheme.shouldUseDarkColors ? '#282828' : '#f7f7f9';
|
|
31
37
|
}
|
|
32
38
|
/**
|
|
33
39
|
* Install a single process-wide listener that keeps every window's native
|
|
@@ -41,12 +47,16 @@ export function simDeskBg() {
|
|
|
41
47
|
* The defect is platform-agnostic, so the fix is too: one `nativeTheme`
|
|
42
48
|
* `updated` listener re-syncs every current and future BrowserWindow.
|
|
43
49
|
*
|
|
44
|
-
* Known limitation: on Linux
|
|
45
|
-
* system theme
|
|
46
|
-
* `
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
+
* Known limitation: on some Linux desktops (KDE Plasma + Wayland and other
|
|
51
|
+
* wlroots compositors) an OS-level system theme change flips `updated` with
|
|
52
|
+
* a stale/inverted `shouldUseDarkColors` instead of the correct value — a
|
|
53
|
+
* Chromium ≥142 regression (electron/electron#48736, crbug 462191707, open
|
|
54
|
+
* as of 2026-06) distinct from the older #25925 (fixed since Electron 13,
|
|
55
|
+
* 2021). GNOME/GTK-portal desktops are unaffected. In-app theme switches go
|
|
56
|
+
* through `applyTheme()` and are unaffected on every platform; the gap is
|
|
57
|
+
* limited to the affected Linux desktops + `theme: 'system'` + an OS theme
|
|
58
|
+
* change, an upstream Electron limitation that also leaves the renderer's
|
|
59
|
+
* `prefers-color-scheme` stale.
|
|
50
60
|
*
|
|
51
61
|
* Returns a Disposable that detaches the listener. Install it once during
|
|
52
62
|
* app setup and hand the Disposable to the workbench registry.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import type { WebContents } from 'electron';
|
|
2
|
+
import { BrowserWindow } from 'electron';
|
|
3
|
+
/**
|
|
4
|
+
* Standalone (non-dock) DevTools window for the whole Electron app — the
|
|
5
|
+
* independent floating CDP debug panel's host window. Unlike the right-panel
|
|
6
|
+
* CDP (`native-simulator-devtools-host.ts`, which re-points at a swappable
|
|
7
|
+
* service-host wc via a reconciler-driven overlay), `target` here is the main
|
|
8
|
+
* window's own webContents and never swaps, so this controller needs none of
|
|
9
|
+
* that machinery: just a plain window with a WebContentsView filling it as
|
|
10
|
+
* the DevTools front-end host.
|
|
11
|
+
*
|
|
12
|
+
* The window + its `setDevToolsWebContents` attachment are built ONCE (on
|
|
13
|
+
* the first `open()`) and never rebuilt afterward — the close button hides
|
|
14
|
+
* rather than destroys. This is deliberate, not an oversight: real-repro
|
|
15
|
+
* diagnostic instrumentation + a source-level Electron/Chromium
|
|
16
|
+
* investigation this session established that destroying and rebuilding
|
|
17
|
+
* this attachment on every close/reopen cycle cannot be made reliable.
|
|
18
|
+
* `closeDevTools()` is effectively a no-op on the `setDevToolsWebContents`
|
|
19
|
+
* external-front-end path (Electron's `InspectableWebContents::CloseDevTools`
|
|
20
|
+
* only does real cleanup when `managed_devtools_web_contents_` is set, which
|
|
21
|
+
* external attachments never populate) — the ONLY authoritative "detached"
|
|
22
|
+
* signal, `'devtools-closed'`, is tied to the OLD front-end host's underlying
|
|
23
|
+
* `content::WebContents` C++ object being destroyed, which was observed
|
|
24
|
+
* (real timestamped log, this session) to take 20+ seconds — the same
|
|
25
|
+
* order of magnitude as this app's own independently-discovered
|
|
26
|
+
* `'close'`-to-`'closed'` BrowserWindow teardown lag. This is a long-standing,
|
|
27
|
+
* unresolved upstream behavior (electron/electron#14095, #17168, #27110,
|
|
28
|
+
* #37356), not something fixable from this module. Electron's own
|
|
29
|
+
* `setDevToolsWebContents` documentation example builds its host window
|
|
30
|
+
* exactly once for the app's lifetime and never rebuilds it — reusing the
|
|
31
|
+
* same host sidesteps the entire bug class instead of chasing a fast
|
|
32
|
+
* "really detached now" signal that does not exist.
|
|
33
|
+
*/
|
|
34
|
+
export interface InternalDevtoolsWindowOptions {
|
|
35
|
+
/** Authority for "the app is quitting right now" (see app/lifecycle.ts).
|
|
36
|
+
* During a real quit every window is closing for real — the controller's
|
|
37
|
+
* habitual close-interception (preventDefault + hide) would CANCEL the
|
|
38
|
+
* quit and leave the process alive with a hidden window nothing will ever
|
|
39
|
+
* show again, so a truthy answer here lets the native close proceed. */
|
|
40
|
+
isAppQuitting?: () => boolean;
|
|
41
|
+
}
|
|
42
|
+
export interface InternalDevtoolsWindow {
|
|
43
|
+
/** Create (on the very first call) and show/focus the window, attaching
|
|
44
|
+
* its DevTools front-end host to `target`'s DevTools exactly once. Every
|
|
45
|
+
* later call just re-shows/focuses the SAME window and host — the
|
|
46
|
+
* underlying DevTools attachment is never rebuilt (see module doc). */
|
|
47
|
+
open(): void;
|
|
48
|
+
/** Actually destroy the window and release the DevTools attachment.
|
|
49
|
+
* Distinct from the user closing the window (which only hides it) — this
|
|
50
|
+
* is for real app-level teardown. Safe to call even if `open()` was never
|
|
51
|
+
* called. */
|
|
52
|
+
dispose(): void;
|
|
53
|
+
/** Subscribe to the front-end host's visibility: fires with the host wc
|
|
54
|
+
* when the window is built (first `open()`) or shown again, and with null
|
|
55
|
+
* when the window is hidden (user close) or destroyed (`dispose()`).
|
|
56
|
+
* Global CDP consumers (network-forward, service-console) gate their
|
|
57
|
+
* dispatch target here — hidden means "stop spending work mirroring into
|
|
58
|
+
* a window nobody can see," not "the attachment is gone." A subscriber
|
|
59
|
+
* registering while the window is ALREADY visible gets the current host
|
|
60
|
+
* replayed one microtask later (same catch-up contract as bridge-router's
|
|
61
|
+
* `onServiceHostReady`) — consumers wired up after `open()` must not stay
|
|
62
|
+
* stuck believing there is no host. Returns an unsubscribe. */
|
|
63
|
+
onHostChanged(handler: (hostWc: WebContents | null) => void): () => void;
|
|
64
|
+
}
|
|
65
|
+
export declare function createInternalDevtoolsWindow(target: BrowserWindow, opts?: InternalDevtoolsWindowOptions): InternalDevtoolsWindow;
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|