@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
|
@@ -22,10 +22,9 @@ export const ProjectsAddSchema = z.tuple([AbsolutePath]);
|
|
|
22
22
|
/** project:open — absolute project path. */
|
|
23
23
|
export const ProjectOpenSchema = z.tuple([AbsolutePath]);
|
|
24
24
|
/**
|
|
25
|
-
* Shared shape for CompileConfig payloads
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* keys are validated to catch wrong types early.
|
|
25
|
+
* Shared shape for CompileConfig payloads. Permissive on the outer object so
|
|
26
|
+
* we stay forward-compatible with new fields; the known top-level keys are
|
|
27
|
+
* validated to catch wrong types early.
|
|
29
28
|
*/
|
|
30
29
|
const CompileConfigShape = z.looseObject({
|
|
31
30
|
startPage: z.string().optional(),
|
|
@@ -41,8 +40,100 @@ export const ProjectSaveCompileConfigSchema = z.tuple([
|
|
|
41
40
|
AbsolutePath,
|
|
42
41
|
CompileConfigShape,
|
|
43
42
|
]);
|
|
43
|
+
/**
|
|
44
|
+
* Shared shape for the stored compile-mode list (`condition.miniprogram` in
|
|
45
|
+
* project.config.json). Loose because WeChat writes fields we carry through
|
|
46
|
+
* untouched; `normalizeCompileModes` does the semantic coercion after this
|
|
47
|
+
* structural check.
|
|
48
|
+
*/
|
|
49
|
+
// `.default('')` (not `.optional()`) so the parsed type matches CompileMode's
|
|
50
|
+
// required `name`/`query` strings — a command's mode is always a complete
|
|
51
|
+
// CompileMode, never a partial patch.
|
|
52
|
+
const CompileModeShape = z.looseObject({
|
|
53
|
+
name: z.string().default(''),
|
|
54
|
+
pathName: z.string(),
|
|
55
|
+
query: z.string().default(''),
|
|
56
|
+
scene: z.number().nullable().default(null),
|
|
57
|
+
});
|
|
58
|
+
/** project:getCompileModeState — absolute project path. */
|
|
59
|
+
export const ProjectGetCompileModeStateSchema = z.tuple([AbsolutePath]);
|
|
60
|
+
/**
|
|
61
|
+
* A compile-mode id: minted by the store, never empty. `select` alone also
|
|
62
|
+
* allows `null` (普通编译), so it is not part of this shape.
|
|
63
|
+
*/
|
|
64
|
+
const CompileModeId = z.string().min(1);
|
|
65
|
+
/**
|
|
66
|
+
* The single command shape the popover sends instead of a whole new list —
|
|
67
|
+
* main is the only thing that interprets it against the live store. Mirrors
|
|
68
|
+
* `CompileModeCommand` in `compile-mode-state.ts`.
|
|
69
|
+
*/
|
|
70
|
+
export const CompileModeCommandSchema = z.discriminatedUnion('type', [
|
|
71
|
+
z.object({ type: z.literal('select'), id: CompileModeId.nullable() }),
|
|
72
|
+
z.object({ type: z.literal('add'), mode: CompileModeShape }),
|
|
73
|
+
z.object({ type: z.literal('update'), id: CompileModeId, mode: CompileModeShape }),
|
|
74
|
+
z.object({ type: z.literal('remove'), id: CompileModeId }),
|
|
75
|
+
]);
|
|
76
|
+
/** popover:apply — the command to interpret against the open project's store. */
|
|
77
|
+
export const PopoverApplySchema = z.tuple([
|
|
78
|
+
z.object({
|
|
79
|
+
command: CompileModeCommandSchema,
|
|
80
|
+
}),
|
|
81
|
+
]);
|
|
44
82
|
/** popover:show — must be an object (not undefined/null/string). */
|
|
45
83
|
export const PopoverShowSchema = z.tuple([z.looseObject({})]);
|
|
84
|
+
/**
|
|
85
|
+
* tooltip:show — the trigger's own bounding rect (CSS px, main-window content
|
|
86
|
+
* coordinates — same space `getBoundingClientRect()` reports, no conversion,
|
|
87
|
+
* mirrors the base-view placement snapshot's Bounds) plus the label text.
|
|
88
|
+
*/
|
|
89
|
+
export const TooltipShowSchema = z.tuple([
|
|
90
|
+
z.object({
|
|
91
|
+
anchor: z.object({
|
|
92
|
+
x: z.number().finite(),
|
|
93
|
+
y: z.number().finite(),
|
|
94
|
+
width: z.number().finite().nonnegative(),
|
|
95
|
+
height: z.number().finite().nonnegative(),
|
|
96
|
+
}),
|
|
97
|
+
text: z.string().min(1).max(200),
|
|
98
|
+
}),
|
|
99
|
+
]);
|
|
100
|
+
export const TooltipMeasuredSchema = z.tuple([
|
|
101
|
+
z.object({
|
|
102
|
+
requestId: z.number().int().positive(),
|
|
103
|
+
width: z.number().finite().positive(),
|
|
104
|
+
height: z.number().finite().positive(),
|
|
105
|
+
}),
|
|
106
|
+
]);
|
|
107
|
+
/**
|
|
108
|
+
* projectCreate:show — the merged template catalog + suggested base dir
|
|
109
|
+
* main.tsx already resolved before asking main to show the overlay panel.
|
|
110
|
+
* Templates are re-validated loosely (they only round-trip back into the
|
|
111
|
+
* panel's own render, never interpreted main-side).
|
|
112
|
+
*/
|
|
113
|
+
export const ProjectCreateShowSchema = z.tuple([
|
|
114
|
+
z.object({
|
|
115
|
+
templates: z.array(z.looseObject({})),
|
|
116
|
+
defaultBaseDir: z.string(),
|
|
117
|
+
}),
|
|
118
|
+
]);
|
|
119
|
+
/** projectCreate:submit — the collected create-project form. */
|
|
120
|
+
export const ProjectCreateSubmitSchema = z.tuple([
|
|
121
|
+
z.object({
|
|
122
|
+
name: z.string().min(1),
|
|
123
|
+
path: AbsolutePath,
|
|
124
|
+
templateId: z.string().min(1),
|
|
125
|
+
}),
|
|
126
|
+
]);
|
|
127
|
+
/**
|
|
128
|
+
* devicePicker:show / devicePicker:select — the device name only. The panel
|
|
129
|
+
* reads the device table from `@devicekit/devices` itself, the same source the
|
|
130
|
+
* toolbar reads, so the catalog never crosses IPC.
|
|
131
|
+
*/
|
|
132
|
+
export const DevicePickerDeviceSchema = z.tuple([
|
|
133
|
+
z.object({
|
|
134
|
+
deviceName: z.string().min(1),
|
|
135
|
+
}),
|
|
136
|
+
]);
|
|
46
137
|
/**
|
|
47
138
|
* Reasonable simulator width range. Window width is clamped UI-side, but
|
|
48
139
|
* we still reject obvious garbage (negative, zero, absurdly large).
|
|
@@ -79,15 +170,16 @@ export const SimulatorSoftReloadSchema = z.tuple([
|
|
|
79
170
|
*/
|
|
80
171
|
export const SimulatorSetDeviceInfoSchema = z.tuple([
|
|
81
172
|
z.object({
|
|
173
|
+
device: z.string().max(64).optional(),
|
|
82
174
|
brand: z.string().max(64),
|
|
83
175
|
model: z.string().max(64),
|
|
84
176
|
system: z.string().max(64),
|
|
85
|
-
platform: z.
|
|
177
|
+
platform: z.enum(['ios', 'android', 'harmony']),
|
|
178
|
+
orientation: z.enum(['portrait', 'landscape']),
|
|
86
179
|
pixelRatio: z.number().finite().positive(),
|
|
87
180
|
screenWidth: z.number().int().min(100).max(4000),
|
|
88
181
|
screenHeight: z.number().int().min(100).max(4000),
|
|
89
182
|
statusBarHeight: z.number().finite().min(0).max(400),
|
|
90
|
-
notchType: z.enum(['none', 'notch', 'dynamic-island']),
|
|
91
183
|
safeAreaInsets: z.object({
|
|
92
184
|
top: z.number().finite().min(0).max(400),
|
|
93
185
|
right: z.number().finite().min(0).max(400),
|
|
@@ -144,6 +236,27 @@ export const HostToolbarAdvertiseHeightSchema = z.tuple([
|
|
|
144
236
|
extent: NonNegInt,
|
|
145
237
|
}),
|
|
146
238
|
]);
|
|
239
|
+
/**
|
|
240
|
+
* host-sidebar reverse size-advertiser payload — mirrors
|
|
241
|
+
* `HostToolbarAdvertiseHeightSchema` on the inline (width) axis.
|
|
242
|
+
*/
|
|
243
|
+
export const HostSidebarAdvertiseWidthSchema = z.tuple([
|
|
244
|
+
z.object({
|
|
245
|
+
axis: z.literal('inline'),
|
|
246
|
+
extent: NonNegInt,
|
|
247
|
+
}),
|
|
248
|
+
]);
|
|
249
|
+
/**
|
|
250
|
+
* host-dialog reverse size-advertiser payload. Unlike the single-axis
|
|
251
|
+
* toolbar/sidebar, the dialog's content advertises BOTH axes over the same
|
|
252
|
+
* channel — `axis` distinguishes which report this is.
|
|
253
|
+
*/
|
|
254
|
+
export const HostDialogAdvertiseSizeSchema = z.tuple([
|
|
255
|
+
z.object({
|
|
256
|
+
axis: z.union([z.literal('block'), z.literal('inline')]),
|
|
257
|
+
extent: NonNegInt,
|
|
258
|
+
}),
|
|
259
|
+
]);
|
|
147
260
|
/**
|
|
148
261
|
* simulator:custom-apis:invoke — API name + arbitrary JSON-serialisable params.
|
|
149
262
|
*
|
|
@@ -158,8 +271,22 @@ export const SimulatorCustomApiInvokeSchema = z.tuple([
|
|
|
158
271
|
export const ProjectGetPagesSchema = z.tuple([AbsolutePath]);
|
|
159
272
|
/** project:getCompileConfig — absolute project path. */
|
|
160
273
|
export const ProjectGetCompileConfigSchema = z.tuple([AbsolutePath]);
|
|
274
|
+
/**
|
|
275
|
+
* projects:update — absolute project directory path + the editable subset of
|
|
276
|
+
* its record. The path is the identity of the record being edited, never a
|
|
277
|
+
* field of the patch.
|
|
278
|
+
*/
|
|
279
|
+
export const ProjectsUpdateSchema = z.tuple([
|
|
280
|
+
AbsolutePath,
|
|
281
|
+
z.object({
|
|
282
|
+
name: z.string().min(1).max(200).optional(),
|
|
283
|
+
iconUrl: z.string().max(2048).optional(),
|
|
284
|
+
}),
|
|
285
|
+
]);
|
|
161
286
|
/** projects:remove — absolute project directory path. */
|
|
162
287
|
export const ProjectsRemoveSchema = z.tuple([AbsolutePath]);
|
|
288
|
+
/** projects:openEditDialog — absolute project directory path. */
|
|
289
|
+
export const ProjectsOpenEditDialogSchema = z.tuple([AbsolutePath]);
|
|
163
290
|
/**
|
|
164
291
|
* workbenchSettings:save — full WorkbenchSettings object.
|
|
165
292
|
*
|
|
@@ -179,7 +306,10 @@ export const WorkbenchSettingsSaveSchema = z.tuple([
|
|
|
179
306
|
port: z.number().int().min(0).max(65535),
|
|
180
307
|
}),
|
|
181
308
|
compile: z.looseObject({
|
|
182
|
-
|
|
309
|
+
autoBuild: z.boolean(),
|
|
310
|
+
}),
|
|
311
|
+
preview: z.looseObject({
|
|
312
|
+
autoReload: z.boolean(),
|
|
183
313
|
}),
|
|
184
314
|
theme: z.enum(['system', 'light', 'dark']),
|
|
185
315
|
lastCreateBaseDir: z.union([z.string(), z.null()]),
|
|
@@ -191,10 +321,6 @@ export const WorkbenchSettingsSetThemeSchema = z.tuple([
|
|
|
191
321
|
]);
|
|
192
322
|
/** settings:setVisible — boolean. */
|
|
193
323
|
export const SettingsSetVisibleSchema = z.tuple([z.boolean()]);
|
|
194
|
-
/** settings:configChanged — full CompileConfig object (see shared/types.ts). */
|
|
195
|
-
export const SettingsConfigChangedSchema = z.tuple([CompileConfigShape]);
|
|
196
|
-
/** popover:relaunch — full CompileConfig object pushed back to main on relaunch. */
|
|
197
|
-
export const PopoverRelaunchSchema = z.tuple([CompileConfigShape]);
|
|
198
324
|
/**
|
|
199
325
|
* settings:projectSettingsChanged — Partial<ProjectSettings>.
|
|
200
326
|
*
|
|
@@ -211,38 +337,4 @@ export const SettingsProjectSettingsChangedSchema = z.tuple([
|
|
|
211
337
|
export const ProjectCaptureThumbnailSchema = z.tuple([AbsolutePath]);
|
|
212
338
|
/** project:getThumbnail — absolute project path. */
|
|
213
339
|
export const ProjectGetThumbnailSchema = z.tuple([AbsolutePath]);
|
|
214
|
-
/** project:getLaunchConfigs — absolute project path. */
|
|
215
|
-
export const ProjectGetLaunchConfigsSchema = z.tuple([AbsolutePath]);
|
|
216
|
-
/**
|
|
217
|
-
* project:saveLaunchConfigs — absolute path + array of launch configs.
|
|
218
|
-
* Each config extends CompileConfig with `id` and `name`.
|
|
219
|
-
*/
|
|
220
|
-
const LaunchConfigShape = z.looseObject({
|
|
221
|
-
id: z.string().min(1),
|
|
222
|
-
name: z.string(),
|
|
223
|
-
startPage: z.string().optional(),
|
|
224
|
-
scene: z.number().optional(),
|
|
225
|
-
queryParams: z
|
|
226
|
-
.array(z.looseObject({ key: z.string(), value: z.string() }))
|
|
227
|
-
.optional(),
|
|
228
|
-
});
|
|
229
|
-
export const ProjectSaveLaunchConfigsSchema = z.tuple([
|
|
230
|
-
AbsolutePath,
|
|
231
|
-
z.array(LaunchConfigShape),
|
|
232
|
-
]);
|
|
233
|
-
/** project:getActiveLaunchConfigId — absolute project path. */
|
|
234
|
-
export const ProjectGetActiveLaunchConfigIdSchema = z.tuple([AbsolutePath]);
|
|
235
|
-
/** project:saveActiveLaunchConfigId — absolute path + id (string or null). */
|
|
236
|
-
export const ProjectSaveActiveLaunchConfigIdSchema = z.tuple([
|
|
237
|
-
AbsolutePath,
|
|
238
|
-
z.union([z.string(), z.null()]),
|
|
239
|
-
]);
|
|
240
|
-
/** popover:switchLaunchConfig — id (string) or null for normal mode. */
|
|
241
|
-
export const PopoverSwitchLaunchConfigSchema = z.tuple([
|
|
242
|
-
z.union([z.string(), z.null()]),
|
|
243
|
-
]);
|
|
244
|
-
/** popover:updateLaunchConfigs — full launch config array. */
|
|
245
|
-
export const PopoverUpdateLaunchConfigsSchema = z.tuple([
|
|
246
|
-
z.array(LaunchConfigShape),
|
|
247
|
-
]);
|
|
248
340
|
//# sourceMappingURL=ipc-schemas.js.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { WorkbenchHostInstance } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* One project window, handed to the host hooks that act on a single project:
|
|
4
|
+
* `setupProjectWindow` on the way in and `onBeforeClose` on the way out.
|
|
5
|
+
*/
|
|
6
|
+
export interface ProjectWindowRef {
|
|
7
|
+
/** Absolute path of the project this window was opened for. */
|
|
8
|
+
path: string;
|
|
9
|
+
/** Display name the open supplied, when it supplied one. */
|
|
10
|
+
name?: string;
|
|
11
|
+
/** The window itself. */
|
|
12
|
+
window: import('electron').BrowserWindow;
|
|
13
|
+
/**
|
|
14
|
+
* This window's own context — the one holding its session and views. Same
|
|
15
|
+
* type as {@link WorkbenchHostInstance.context}, borrowed from there rather
|
|
16
|
+
* than named again so this file keeps its single WorkbenchContext reference.
|
|
17
|
+
*/
|
|
18
|
+
context: WorkbenchHostInstance['context'];
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The project window being closed. Named separately from
|
|
22
|
+
* {@link ProjectWindowRef} because `onBeforeClose` documents it under this
|
|
23
|
+
* name; the shape is the same.
|
|
24
|
+
*/
|
|
25
|
+
export type ClosingProjectWindow = ProjectWindowRef;
|
|
26
|
+
/** Overrides for the windows opened projects get, not for the project list. */
|
|
27
|
+
export interface ProjectWindowConfig {
|
|
28
|
+
/**
|
|
29
|
+
* Whether the framework shows a project window on its own. Defaults to
|
|
30
|
+
* `true`: once `setupProjectWindow` has resolved AND the window's own
|
|
31
|
+
* `ready-to-show` has fired (whichever finishes second), the framework
|
|
32
|
+
* reveals it. `false` is a permanent opt-out — the framework never shows
|
|
33
|
+
* that window on its own, no matter what the hook does or how many times
|
|
34
|
+
* `ready-to-show` fires; the host must call `show()` itself.
|
|
35
|
+
*
|
|
36
|
+
* Independent of `window.autoShow`, which governs only the project-list
|
|
37
|
+
* window: a host that keeps the list hidden behind its own startup flow
|
|
38
|
+
* still wants the project windows opened afterwards to appear on screen.
|
|
39
|
+
*/
|
|
40
|
+
autoShow?: boolean;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=project-window-types.d.ts.map
|
|
@@ -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
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Main-process registration supplied by a downstream host. The script must be
|
|
3
|
+
* a built renderer bundle that calls {@link registerSimulatorUiExtension}.
|
|
4
|
+
*/
|
|
5
|
+
export interface SimulatorUiExtensionRegistration {
|
|
6
|
+
/** Stable, context-unique extension identifier. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Absolute path to a trusted renderer JavaScript bundle. */
|
|
9
|
+
rendererScriptPath: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Handle returned to the host that registered an extension. `invoke` crosses
|
|
13
|
+
* into the live simulator renderer and calls the extension's renderer-side
|
|
14
|
+
* method.
|
|
15
|
+
*/
|
|
16
|
+
export interface SimulatorUiExtensionHandle {
|
|
17
|
+
dispose(): void | Promise<void>;
|
|
18
|
+
invoke<T = unknown>(method: string, params?: unknown): Promise<T>;
|
|
19
|
+
}
|
|
20
|
+
export interface SimulatorUiMountContext {
|
|
21
|
+
/** Stable host-owned layer inside the active device frame. */
|
|
22
|
+
overlayRoot: HTMLElement;
|
|
23
|
+
/** App currently represented by this DeviceShell. */
|
|
24
|
+
appId: string;
|
|
25
|
+
/** Aborted before the mount is disposed or moved to another shell. */
|
|
26
|
+
signal: AbortSignal;
|
|
27
|
+
}
|
|
28
|
+
export interface SimulatorChromeAction {
|
|
29
|
+
name: 'capsule.more';
|
|
30
|
+
appId: string;
|
|
31
|
+
appName: string;
|
|
32
|
+
pagePath: string;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Renderer-side half of a simulator UI extension.
|
|
36
|
+
*
|
|
37
|
+
* The extension owns its DOM and business semantics. Dimina owns the device
|
|
38
|
+
* layer, active-shell selection, reload lifecycle, and chrome-action delivery.
|
|
39
|
+
*/
|
|
40
|
+
export interface SimulatorUiRendererExtension {
|
|
41
|
+
id: string;
|
|
42
|
+
mount?(context: SimulatorUiMountContext): void | (() => void);
|
|
43
|
+
invoke?(method: string, params: unknown): unknown | Promise<unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Return `false` to let another extension handle the action. Any other
|
|
46
|
+
* resolved value marks it handled.
|
|
47
|
+
*/
|
|
48
|
+
onChromeAction?(action: SimulatorChromeAction): boolean | void | Promise<boolean | void>;
|
|
49
|
+
}
|
|
50
|
+
export interface SimulatorUiRuntimeBridge {
|
|
51
|
+
register(extension: SimulatorUiRendererExtension): () => void;
|
|
52
|
+
unregister(id: string): void;
|
|
53
|
+
has(id: string): boolean;
|
|
54
|
+
invoke(id: string, method: string, params: unknown): Promise<unknown>;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Register the renderer-side implementation from a host bundle loaded through
|
|
58
|
+
* `instance.registerSimulatorUiExtension`.
|
|
59
|
+
*/
|
|
60
|
+
export declare function registerSimulatorUiExtension(extension: SimulatorUiRendererExtension): () => void;
|
|
61
|
+
//# sourceMappingURL=simulator-ui.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Register the renderer-side implementation from a host bundle loaded through
|
|
3
|
+
* `instance.registerSimulatorUiExtension`.
|
|
4
|
+
*/
|
|
5
|
+
export function registerSimulatorUiExtension(extension) {
|
|
6
|
+
const bridge = globalThis.__diminaSimulatorUi;
|
|
7
|
+
if (!bridge) {
|
|
8
|
+
throw new Error('Dimina simulator UI runtime is not available');
|
|
9
|
+
}
|
|
10
|
+
return bridge.register(extension);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=simulator-ui.js.map
|
package/dist/shared/types.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import type { OpenProjectOptions } from '@dimina-kit/devkit';
|
|
2
2
|
import type { SimulatorApiHandler } from '../main/services/simulator/custom-apis.js';
|
|
3
3
|
import type { MiniappSessionAppInfo } from '../main/runtime/miniapp-runtime.js';
|
|
4
|
+
import type { ClosingProjectWindow, ProjectWindowConfig, ProjectWindowRef } from './project-window-types.js';
|
|
5
|
+
import type { CompileConfig, CompileMode, CompileModes } from './compile-modes.js';
|
|
6
|
+
export type { ClosingProjectWindow, ProjectWindowConfig, ProjectWindowRef };
|
|
7
|
+
/**
|
|
8
|
+
* The compile-mode model lives next to its resolver in `compile-modes.ts` —
|
|
9
|
+
* the types and the rules that read them stay in one file. Re-exported here
|
|
10
|
+
* so the existing `shared/types.js` import sites keep working.
|
|
11
|
+
*/
|
|
12
|
+
export type { CompileConfig, CompileMode, CompileModes };
|
|
4
13
|
/**
|
|
5
14
|
* The HAND-WRITTEN narrow contract handed to a host `menuBuilder` — the
|
|
6
15
|
* audited menu consumption surface only, same posture as `MiniappRuntime`.
|
|
@@ -38,7 +47,7 @@ export interface MenuContext {
|
|
|
38
47
|
message: string;
|
|
39
48
|
hotReload?: boolean;
|
|
40
49
|
}) => void;
|
|
41
|
-
/**
|
|
50
|
+
/** Bring the project-list window forward and refresh it (打开项目). */
|
|
42
51
|
windowNavigateBack: () => void;
|
|
43
52
|
};
|
|
44
53
|
}
|
|
@@ -54,9 +63,16 @@ export interface ProjectSession {
|
|
|
54
63
|
close: () => Promise<void>;
|
|
55
64
|
port: number;
|
|
56
65
|
appInfo: AppInfo;
|
|
66
|
+
/**
|
|
67
|
+
* Run one real recompile of the session's project. Optional: a host
|
|
68
|
+
* CompilationAdapter predating this capability may omit it — the rebuild
|
|
69
|
+
* IPC then degrades to `{ supported: false }` and the renderer falls back
|
|
70
|
+
* to its reattach-only relaunch.
|
|
71
|
+
*/
|
|
72
|
+
rebuild?: () => Promise<void>;
|
|
57
73
|
}
|
|
58
74
|
export interface CompilationAdapter {
|
|
59
|
-
openProject(opts: Omit<OpenProjectOptions, 'containerDir' | 'outputDir'>): Promise<ProjectSession>;
|
|
75
|
+
openProject(opts: Omit<OpenProjectOptions, 'containerDir' | 'outputDir' | 'outputRoot'>): Promise<ProjectSession>;
|
|
60
76
|
}
|
|
61
77
|
export type BuiltinPanelId = 'wxml' | 'console' | 'appdata' | 'storage';
|
|
62
78
|
export type BuiltinModuleId = 'projects' | 'session' | 'simulator' | 'popover' | 'settings';
|
|
@@ -108,24 +124,16 @@ export interface WorkbenchConfig {
|
|
|
108
124
|
*/
|
|
109
125
|
headerHeight?: number;
|
|
110
126
|
}
|
|
111
|
-
export interface CompileConfig {
|
|
112
|
-
startPage: string;
|
|
113
|
-
scene: number;
|
|
114
|
-
queryParams: {
|
|
115
|
-
key: string;
|
|
116
|
-
value: string;
|
|
117
|
-
}[];
|
|
118
|
-
}
|
|
119
127
|
/**
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
*
|
|
128
|
+
* A project's runtime kind, detected from its source layout (see
|
|
129
|
+
* `detectRuntimeType` in main's `project-repository.ts`). Lives here because
|
|
130
|
+
* the value crosses the process boundary — main detects it and pushes it to
|
|
131
|
+
* the renderer over `ViewChannel.HostSidebarCategorySelected`, and the
|
|
132
|
+
* renderer's `Project.type` carries it back in the project list. Two
|
|
133
|
+
* structurally identical unions declared on either side would type-check
|
|
134
|
+
* against each other today and silently diverge the moment one gains a member.
|
|
124
135
|
*/
|
|
125
|
-
export
|
|
126
|
-
id: string;
|
|
127
|
-
name: string;
|
|
128
|
-
}
|
|
136
|
+
export type ProjectType = 'miniprogram' | 'minigame';
|
|
129
137
|
export interface IpcResult<T = unknown> {
|
|
130
138
|
success: boolean;
|
|
131
139
|
data?: T;
|
|
@@ -187,26 +195,22 @@ export interface WorkbenchHostInstance {
|
|
|
187
195
|
*/
|
|
188
196
|
registerTrustedWindow(win: import('electron').BrowserWindow): import('@dimina-kit/electron-deck/main').Disposable;
|
|
189
197
|
/**
|
|
190
|
-
* Registers a simulator custom API
|
|
191
|
-
*
|
|
192
|
-
*
|
|
193
|
-
*
|
|
198
|
+
* Registers a simulator custom API, callable from mini-program code as
|
|
199
|
+
* `wx.<name>(params)`. The registry is app-level: one registration serves
|
|
200
|
+
* every project window, including windows opened afterwards, and no window
|
|
201
|
+
* closing revokes it. It lives until the app is disposed or the returned
|
|
202
|
+
* Disposable revokes it — which removes only the registration it created.
|
|
203
|
+
* The handler's optional second argument identifies the calling window's
|
|
204
|
+
* project; it is supplied by the main process, separately from miniapp params.
|
|
194
205
|
*/
|
|
195
206
|
registerSimulatorApi(name: string, handler: SimulatorApiHandler): import('@dimina-kit/electron-deck/main').Disposable;
|
|
196
207
|
/**
|
|
197
|
-
*
|
|
198
|
-
*
|
|
208
|
+
* Installs a trusted downstream renderer bundle into this context's
|
|
209
|
+
* simulator UI runtime. Dimina owns the active DeviceShell mount point and
|
|
210
|
+
* reload/dispose lifecycle; the host owns the rendered DOM and business
|
|
211
|
+
* semantics.
|
|
199
212
|
*/
|
|
200
|
-
|
|
201
|
-
/**
|
|
202
|
-
* Persist the full list of launch configs for the active project.
|
|
203
|
-
*/
|
|
204
|
-
setLaunchConfigs(configs: LaunchConfig[]): Promise<void>;
|
|
205
|
-
/**
|
|
206
|
-
* Activate a named launch config (by id) or revert to normal mode (null).
|
|
207
|
-
* Persists the selection and notifies the renderer to relaunch.
|
|
208
|
-
*/
|
|
209
|
-
setActiveLaunchConfig(id: string | null): Promise<void>;
|
|
213
|
+
registerSimulatorUiExtension(registration: import('./simulator-ui.js').SimulatorUiExtensionRegistration): import('./simulator-ui.js').SimulatorUiExtensionHandle;
|
|
210
214
|
}
|
|
211
215
|
/**
|
|
212
216
|
* Pluggable backend for the project-list panel. Hosts may supply this to
|
|
@@ -222,13 +226,12 @@ export interface ProjectsProvider {
|
|
|
222
226
|
validateProjectDir?(dirPath: string): string | null;
|
|
223
227
|
addProject(dirPath: string): unknown;
|
|
224
228
|
removeProject(dirPath: string): void | Promise<void>;
|
|
229
|
+
updateProject?(dirPath: string, patch: unknown): unknown;
|
|
225
230
|
updateLastOpened?(dirPath: string): void | Promise<void>;
|
|
226
231
|
getCompileConfig?(dirPath: string): unknown;
|
|
227
232
|
saveCompileConfig?(dirPath: string, cfg: unknown): void | Promise<void>;
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
getActiveLaunchConfigId?(dirPath: string): string | null | Promise<string | null>;
|
|
231
|
-
saveActiveLaunchConfigId?(dirPath: string, id: string | null): void | Promise<void>;
|
|
233
|
+
getCompileModes?(dirPath: string): CompileModes | Promise<CompileModes>;
|
|
234
|
+
saveCompileModes?(dirPath: string, modes: CompileModes): void | Promise<void>;
|
|
232
235
|
}
|
|
233
236
|
/**
|
|
234
237
|
* A template the user can pick from in the "新建项目" dialog. Exactly one of
|
|
@@ -288,16 +291,38 @@ export interface WorkbenchAppConfig extends WorkbenchConfig {
|
|
|
288
291
|
rendererDir?: string;
|
|
289
292
|
/** Enable or disable built-in IPC module groups. Defaults to all enabled. */
|
|
290
293
|
modules?: Partial<Record<BuiltinModuleId, boolean>>;
|
|
291
|
-
/** Window sizing overrides for the
|
|
294
|
+
/** Window sizing overrides for the project-list window. */
|
|
292
295
|
window?: WorkbenchWindowConfig;
|
|
296
|
+
/** Overrides for the windows opened projects get. */
|
|
297
|
+
projectWindow?: ProjectWindowConfig;
|
|
293
298
|
/** Absolute path to a window/taskbar icon (png or ico). macOS uses the app bundle icon. */
|
|
294
299
|
icon?: string;
|
|
295
300
|
/** Custom menu builder. Should call Menu.setApplicationMenu(). If omitted, the default dimina-devtools menu is installed. */
|
|
296
301
|
menuBuilder?: (mainWindow: import('electron').BrowserWindow, menuContext: MenuContext) => void;
|
|
297
302
|
/** Called after window and context are created but before start() resolves. Use to register custom IPC handlers. */
|
|
298
303
|
onSetup?: (instance: WorkbenchHostInstance) => void | Promise<void>;
|
|
299
|
-
/**
|
|
300
|
-
|
|
304
|
+
/**
|
|
305
|
+
* Called once per project window, after the framework has wired that window
|
|
306
|
+
* up and before the open resolves. `opened.context` is THAT window's own
|
|
307
|
+
* context, which is why per-project registration belongs here: `onSetup`
|
|
308
|
+
* only ever sees `instance.context`, the project list's, so a registration
|
|
309
|
+
* made there reaches no project window.
|
|
310
|
+
*
|
|
311
|
+
* Awaited, and unlike `onBeforeClose` it can fail the open: a rejection
|
|
312
|
+
* tears the half-built window down and reaches whoever asked for it.
|
|
313
|
+
*/
|
|
314
|
+
setupProjectWindow?: (instance: WorkbenchHostInstance, opened: ProjectWindowRef) => void | Promise<void>;
|
|
315
|
+
/**
|
|
316
|
+
* Called when a project window is closing, before the framework disposes it.
|
|
317
|
+
* `closing` says WHICH project is going away and carries that window's own
|
|
318
|
+
* context — `instance.context` is always the project list's, which owns no
|
|
319
|
+
* session, so with several windows open it cannot tell them apart. A hook
|
|
320
|
+
* that only declares `instance` still type-checks.
|
|
321
|
+
*
|
|
322
|
+
* Awaited, but not a veto: a rejection is logged and the window is disposed
|
|
323
|
+
* regardless.
|
|
324
|
+
*/
|
|
325
|
+
onBeforeClose?: (instance: WorkbenchHostInstance, closing: ClosingProjectWindow) => void | Promise<void>;
|
|
301
326
|
/**
|
|
302
327
|
* Called before a project is opened, BEFORE any side effect (session
|
|
303
328
|
* teardown, compile, dev-server). Use to gate the open on login/permission
|
|
@@ -359,6 +384,32 @@ export interface WorkbenchAppConfig extends WorkbenchConfig {
|
|
|
359
384
|
parentWindow: import('electron').BrowserWindow;
|
|
360
385
|
templates: ProjectTemplate[];
|
|
361
386
|
}) => Promise<CustomCreateProjectDialogResult>;
|
|
387
|
+
/**
|
|
388
|
+
* Host-supplied "编辑项目" dialog. When provided, the renderer routes the
|
|
389
|
+
* project card's edit action through IPC into this main-process hook
|
|
390
|
+
* instead of showing the built-in dialog. `project` is read from the
|
|
391
|
+
* current project-list record (not whatever the renderer happened to have
|
|
392
|
+
* in state), so the host always sees devtools' own authoritative record.
|
|
393
|
+
*
|
|
394
|
+
* Return either:
|
|
395
|
+
* - `null` — user cancelled; devtools does nothing.
|
|
396
|
+
* - `{ name?, iconUrl? }` — the host collected an edit; devtools applies
|
|
397
|
+
* it via `workspace.updateProject`, the same path the built-in dialog's
|
|
398
|
+
* submit uses.
|
|
399
|
+
* - `{ updated: EditableProject }` — the host has ALREADY persisted the
|
|
400
|
+
* change itself; devtools just refreshes the list.
|
|
401
|
+
*
|
|
402
|
+
* Unlike `customCreateProjectDialog`, "no hook configured" and "user
|
|
403
|
+
* cancelled" are NOT both collapsed to `null` on the wire: the create flow
|
|
404
|
+
* does that and it means a cancelled host dialog falls through into the
|
|
405
|
+
* built-in one right after. The `projects:openEditDialog` IPC instead
|
|
406
|
+
* returns `null` only when no hook is configured, and wraps the hook's
|
|
407
|
+
* result as `{ result }` otherwise — see `OpenEditProjectDialogReply`.
|
|
408
|
+
*/
|
|
409
|
+
customEditProjectDialog?: (ctx: {
|
|
410
|
+
parentWindow: import('electron').BrowserWindow;
|
|
411
|
+
project: EditableProject;
|
|
412
|
+
}) => Promise<CustomEditProjectDialogResult>;
|
|
362
413
|
}
|
|
363
414
|
/**
|
|
364
415
|
* Discriminated return of `customCreateProjectDialog`. `null` = cancelled.
|
|
@@ -376,4 +427,38 @@ export type CustomCreateProjectDialogResult = null | {
|
|
|
376
427
|
lastOpened?: string | null;
|
|
377
428
|
};
|
|
378
429
|
} | CreateProjectInput;
|
|
430
|
+
/**
|
|
431
|
+
* Structural minimum devtools needs to render a project-list card, passed to
|
|
432
|
+
* `customEditProjectDialog` and returned as its `updated` variant. Mirrors
|
|
433
|
+
* `Project` in `./projects-provider`.
|
|
434
|
+
*/
|
|
435
|
+
export interface EditableProject {
|
|
436
|
+
name: string;
|
|
437
|
+
path: string;
|
|
438
|
+
iconUrl?: string;
|
|
439
|
+
lastOpened?: string | null;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* Discriminated return of `customEditProjectDialog`. `null` = cancelled.
|
|
443
|
+
* `{ updated }` = the host already persisted the edit; devtools just
|
|
444
|
+
* refreshes. Otherwise a `{ name?, iconUrl? }` patch devtools applies via
|
|
445
|
+
* `workspace.updateProject`.
|
|
446
|
+
*/
|
|
447
|
+
export type CustomEditProjectDialogResult = null | {
|
|
448
|
+
updated: EditableProject;
|
|
449
|
+
} | {
|
|
450
|
+
name?: string;
|
|
451
|
+
iconUrl?: string;
|
|
452
|
+
};
|
|
453
|
+
/**
|
|
454
|
+
* Wire reply for `projects:openEditDialog`. `null` means the host configured
|
|
455
|
+
* no `customEditProjectDialog` hook at all — the renderer should show the
|
|
456
|
+
* built-in dialog. When a hook IS configured, the IPC always resolves
|
|
457
|
+
* `{ result }` even if `result` is `null` (user cancelled the host dialog),
|
|
458
|
+
* so the renderer can tell "no hook" apart from "hook ran, user cancelled"
|
|
459
|
+
* and skip the built-in fallback in the latter case.
|
|
460
|
+
*/
|
|
461
|
+
export type OpenEditProjectDialogReply = null | {
|
|
462
|
+
result: CustomEditProjectDialogResult;
|
|
463
|
+
};
|
|
379
464
|
//# sourceMappingURL=types.d.ts.map
|