@dimina-kit/devtools 0.4.0-dev.20260803105710 → 0.4.0-dev.20260828092243

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.
Files changed (208) hide show
  1. package/dist/main/api.d.ts +1 -1
  2. package/dist/main/app/app.js +66 -2
  3. package/dist/main/index.bundle.js +1454 -540
  4. package/dist/main/ipc/index.d.ts +3 -0
  5. package/dist/main/ipc/index.js +3 -0
  6. package/dist/main/ipc/popover.js +1 -1
  7. package/dist/main/ipc/project-create.d.ts +15 -0
  8. package/dist/main/ipc/project-create.js +26 -0
  9. package/dist/main/ipc/projects.d.ts +1 -1
  10. package/dist/main/ipc/projects.js +11 -0
  11. package/dist/main/ipc/session.js +11 -0
  12. package/dist/main/ipc/settings.js +2 -1
  13. package/dist/main/ipc/simulator-module.d.ts +4 -3
  14. package/dist/main/ipc/simulator-module.js +4 -5
  15. package/dist/main/ipc/tooltip.d.ts +13 -0
  16. package/dist/main/ipc/tooltip.js +28 -0
  17. package/dist/main/ipc/views.d.ts +15 -1
  18. package/dist/main/ipc/views.js +61 -4
  19. package/dist/main/runtime/miniapp-runtime.d.ts +87 -19
  20. package/dist/main/services/layout/index.d.ts +11 -0
  21. package/dist/main/services/layout/index.js +23 -0
  22. package/dist/main/services/network-forward/frontend-dispatch.js +2 -1
  23. package/dist/main/services/notifications/renderer-notifier.d.ts +32 -1
  24. package/dist/main/services/notifications/renderer-notifier.js +29 -1
  25. package/dist/main/services/projects/project-repository.d.ts +4 -1
  26. package/dist/main/services/projects/project-repository.js +63 -5
  27. package/dist/main/services/simulator-current-page/index.d.ts +5 -3
  28. package/dist/main/services/simulator-current-page/index.js +8 -1
  29. package/dist/main/services/update/update-manager.d.ts +17 -3
  30. package/dist/main/services/update/update-manager.js +25 -6
  31. package/dist/main/services/views/clear-console-filter.d.ts +44 -0
  32. package/dist/main/services/views/clear-console-filter.js +86 -0
  33. package/dist/main/services/views/console-filter-test-fixtures.d.ts +94 -0
  34. package/dist/main/services/views/console-filter-test-fixtures.js +82 -0
  35. package/dist/main/services/views/console-filter.d.ts +79 -130
  36. package/dist/main/services/views/console-filter.js +140 -183
  37. package/dist/main/services/views/devtools-tabs.d.ts +24 -4
  38. package/dist/main/services/views/devtools-tabs.js +40 -21
  39. package/dist/main/services/views/host-dialog-port-channel.d.ts +18 -0
  40. package/dist/main/services/views/host-dialog-port-channel.js +15 -0
  41. package/dist/main/services/views/host-dialog-session-runtime.d.ts +10 -0
  42. package/dist/main/services/views/host-dialog-session-runtime.js +17 -0
  43. package/dist/main/services/views/host-dialog-view.d.ts +95 -0
  44. package/dist/main/services/views/host-dialog-view.js +147 -0
  45. package/dist/main/services/views/host-sidebar-port-channel.d.ts +18 -0
  46. package/dist/main/services/views/host-sidebar-port-channel.js +15 -0
  47. package/dist/main/services/views/host-sidebar-session-runtime.d.ts +10 -0
  48. package/dist/main/services/views/host-sidebar-session-runtime.js +17 -0
  49. package/dist/main/services/views/host-sidebar-view.d.ts +59 -0
  50. package/dist/main/services/views/host-sidebar-view.js +44 -0
  51. package/dist/main/services/views/host-slot-port-channel.d.ts +107 -0
  52. package/dist/main/services/views/host-slot-port-channel.js +261 -0
  53. package/dist/main/services/views/host-slot-session-runtime.d.ts +40 -0
  54. package/dist/main/services/views/host-slot-session-runtime.js +50 -0
  55. package/dist/main/services/views/host-slot-view.d.ts +109 -0
  56. package/dist/main/services/views/host-slot-view.js +147 -0
  57. package/dist/main/services/views/host-toolbar-port-channel.d.ts +6 -91
  58. package/dist/main/services/views/host-toolbar-port-channel.js +10 -243
  59. package/dist/main/services/views/host-toolbar-session-runtime.d.ts +5 -30
  60. package/dist/main/services/views/host-toolbar-session-runtime.js +9 -47
  61. package/dist/main/services/views/host-toolbar-view.d.ts +34 -7
  62. package/dist/main/services/views/host-toolbar-view.js +30 -237
  63. package/dist/main/services/views/managed-web-contents-view.d.ts +48 -0
  64. package/dist/main/services/views/managed-web-contents-view.js +123 -0
  65. package/dist/main/services/views/native-simulator-devtools-host.js +64 -45
  66. package/dist/main/services/views/native-simulator-view.js +6 -24
  67. package/dist/main/services/views/native-view-tree.d.ts +25 -0
  68. package/dist/main/services/views/native-view-tree.js +69 -0
  69. package/dist/main/services/views/overlay-panels-view.d.ts +50 -4
  70. package/dist/main/services/views/overlay-panels-view.js +226 -108
  71. package/dist/main/services/views/placement-reconciler.d.ts +18 -18
  72. package/dist/main/services/views/placement-reconciler.js +91 -29
  73. package/dist/main/services/views/placement-test-driver.d.ts +27 -0
  74. package/dist/main/services/views/placement-test-driver.js +29 -0
  75. package/dist/main/services/views/view-manager-devtools-host-test-fixtures.js +3 -1
  76. package/dist/main/services/views/view-manager.d.ts +14 -86
  77. package/dist/main/services/views/view-manager.js +41 -4
  78. package/dist/main/services/views/workbench-view.js +27 -20
  79. package/dist/main/services/workbench-coi-server.d.ts +11 -0
  80. package/dist/main/services/workbench-coi-server.js +32 -0
  81. package/dist/main/services/workspace/rebuild-status.d.ts +21 -8
  82. package/dist/main/services/workspace/rebuild-status.js +24 -8
  83. package/dist/main/utils/paths.d.ts +4 -0
  84. package/dist/main/utils/paths.js +4 -0
  85. package/dist/main/utils/sender-policy.d.ts +1 -1
  86. package/dist/main/utils/sender-policy.js +16 -1
  87. package/dist/main/utils/theme.d.ts +7 -2
  88. package/dist/main/utils/theme.js +8 -3
  89. package/dist/native-host/common/common.js +65 -62
  90. package/dist/native-host/container/pageFrame.css +1 -1
  91. package/dist/native-host/render/render.js +3226 -2898
  92. package/dist/native-host/service/service.js +2 -2
  93. package/dist/preload/runtime/host-dialog-advertiser.d.ts +22 -0
  94. package/dist/preload/runtime/host-dialog-advertiser.js +37 -0
  95. package/dist/preload/runtime/host-dialog-port.d.ts +44 -0
  96. package/dist/preload/runtime/host-dialog-port.js +53 -0
  97. package/dist/preload/runtime/host-dialog-runtime.d.ts +28 -0
  98. package/dist/preload/runtime/host-dialog-runtime.js +36 -0
  99. package/dist/preload/runtime/host-sidebar-advertiser.d.ts +19 -0
  100. package/dist/preload/runtime/host-sidebar-advertiser.js +35 -0
  101. package/dist/preload/runtime/host-sidebar-port.d.ts +44 -0
  102. package/dist/preload/runtime/host-sidebar-port.js +53 -0
  103. package/dist/preload/runtime/host-sidebar-runtime.d.ts +28 -0
  104. package/dist/preload/runtime/host-sidebar-runtime.js +36 -0
  105. package/dist/preload/runtime/host-slot-port-bridge.d.ts +18 -0
  106. package/dist/preload/runtime/host-slot-port-bridge.js +112 -0
  107. package/dist/preload/runtime/host-toolbar-advertiser.d.ts +5 -13
  108. package/dist/preload/runtime/host-toolbar-advertiser.js +18 -38
  109. package/dist/preload/runtime/host-toolbar-port.d.ts +9 -0
  110. package/dist/preload/runtime/host-toolbar-port.js +11 -95
  111. package/dist/preload/runtime/wait-for-slot-root.d.ts +20 -0
  112. package/dist/preload/runtime/wait-for-slot-root.js +52 -0
  113. package/dist/preload/windows/host-dialog-runtime.cjs +353 -0
  114. package/dist/preload/windows/host-dialog-runtime.cjs.map +7 -0
  115. package/dist/preload/windows/host-dialog-runtime.d.ts +2 -0
  116. package/dist/preload/windows/host-dialog-runtime.js +13 -0
  117. package/dist/preload/windows/host-sidebar-runtime.cjs +354 -0
  118. package/dist/preload/windows/host-sidebar-runtime.cjs.map +7 -0
  119. package/dist/preload/windows/host-sidebar-runtime.d.ts +2 -0
  120. package/dist/preload/windows/host-sidebar-runtime.js +13 -0
  121. package/dist/preload/windows/host-toolbar-runtime.cjs +134 -51
  122. package/dist/preload/windows/host-toolbar-runtime.cjs.map +3 -3
  123. package/dist/preload/windows/main.cjs +3176 -14
  124. package/dist/preload/windows/main.cjs.map +4 -4
  125. package/dist/preload/windows/main.css +428 -0
  126. package/dist/preload/windows/main.css.map +7 -0
  127. package/dist/preload/windows/simulator.cjs +5 -2
  128. package/dist/preload/windows/simulator.cjs.map +2 -2
  129. package/dist/preload/windows/simulator.js +5 -2
  130. package/dist/renderer/assets/button-DsNqZm7o.js +2 -0
  131. package/dist/renderer/assets/constants-D7DfVqMp.js +2 -0
  132. package/dist/renderer/assets/constants-D8zsejFq.js +2 -0
  133. package/dist/renderer/assets/createLucideIcon-CYJeT1ji.js +2 -0
  134. package/dist/renderer/assets/dialog-pT4qWmka.js +46 -0
  135. package/dist/renderer/assets/dist-o70xmpc1.js +2 -0
  136. package/dist/renderer/assets/hostSidebarDefault-NvGZlE9O.js +2 -0
  137. package/dist/renderer/assets/index-zErhG3ta.js +5 -0
  138. package/dist/renderer/assets/input-4QxTXMZN.js +2 -0
  139. package/dist/renderer/assets/ipc-channels-overlays-Blr5TNoB.js +2 -0
  140. package/dist/renderer/assets/jsx-runtime-B-3rq1y5.css +1 -0
  141. package/dist/renderer/assets/jsx-runtime-CqVdW3eg.js +9 -0
  142. package/dist/renderer/assets/popover-CJiSWwuE.js +2 -0
  143. package/dist/renderer/assets/project-api-DZ1Zi6EC.js +2 -0
  144. package/dist/renderer/assets/projectCreateDialog-DMWNhw_1.js +2 -0
  145. package/dist/renderer/assets/select-C86pNcsu.js +2 -0
  146. package/dist/renderer/assets/settings-BoI8mLT1.js +2 -0
  147. package/dist/renderer/assets/settings-api-Bs_g4NHs.js +2 -0
  148. package/dist/renderer/assets/settings-tab-bar-DHLLygqv.js +2 -0
  149. package/dist/renderer/assets/tooltip-BhAyY0T4.js +2 -0
  150. package/dist/renderer/assets/types-YYjkvane.js +2 -0
  151. package/dist/renderer/assets/updateDialog-DPum3wx1.js +2 -0
  152. package/dist/renderer/assets/utils-kfQov6Pa.js +2 -0
  153. package/dist/renderer/assets/view-api-DFhb2R8-.js +2 -0
  154. package/dist/renderer/assets/workbenchSettings-DrajRQUk.js +8 -0
  155. package/dist/renderer/entries/host-sidebar-default/index.html +21 -0
  156. package/dist/renderer/entries/main/index.html +15 -7
  157. package/dist/renderer/entries/popover/index.html +10 -6
  158. package/dist/renderer/entries/project-create-dialog/index.html +27 -0
  159. package/dist/renderer/entries/settings/index.html +10 -5
  160. package/dist/renderer/entries/tooltip/index.html +21 -0
  161. package/dist/renderer/entries/update-dialog/index.html +25 -0
  162. package/dist/renderer/entries/workbench-settings/index.html +11 -5
  163. package/dist/service-host/preload.cjs +10 -0
  164. package/dist/service-host/sync-impls/menu-button-geometry.js +1 -0
  165. package/dist/shared/constants.d.ts +22 -0
  166. package/dist/shared/constants.js +22 -0
  167. package/dist/shared/ipc-channels-overlays.d.ts +156 -0
  168. package/dist/shared/ipc-channels-overlays.js +186 -0
  169. package/dist/shared/ipc-channels.d.ts +1 -67
  170. package/dist/shared/ipc-channels.js +9 -81
  171. package/dist/shared/ipc-schemas.d.ts +52 -0
  172. package/dist/shared/ipc-schemas.js +64 -0
  173. package/dist/shared/simulator-route.d.ts +8 -0
  174. package/dist/shared/simulator-route.js +15 -0
  175. package/dist/shared/types.d.ts +17 -0
  176. package/dist/shared/view-ids.d.ts +9 -0
  177. package/dist/shared/view-ids.js +21 -0
  178. package/dist/simulator/assets/device-shell-CmtM1QxP.js +2 -0
  179. package/dist/simulator/assets/device-shell-iFZo1igL.css +1 -0
  180. package/dist/simulator/assets/{simulator-COIE6R49.js → simulator-CIobn3Mh.js} +6 -6
  181. package/dist/simulator/assets/{simulator-mini-app-BLn7XV8e.js → simulator-mini-app-CRe6n9br.js} +2 -2
  182. package/dist/simulator/assets/simulator-ui-BupATgKo.css +1 -0
  183. package/dist/simulator/assets/simulator-ui-C_cP602X.js +2 -0
  184. package/dist/simulator/simulator.html +3 -2
  185. package/dist/vscode-workbench/assets/__vite-browser-external-Bc1vizTf.js +1 -0
  186. package/dist/vscode-workbench/assets/{dist-oHcwN53f.js → dist-CMfmHflW.js} +3 -3
  187. package/dist/vscode-workbench/assets/{iconv-lite-umd-CLMLpdGm.js → iconv-lite-umd-Bx8CgaZq.js} +1 -1
  188. package/dist/vscode-workbench/assets/{index-BE3UJdoH.js → index-CdG6YWhW.js} +436 -436
  189. package/dist/vscode-workbench/assets/{jschardet-BICW8PLJ.js → jschardet-M0qgd2lN.js} +1 -1
  190. package/dist/vscode-workbench/index.html +21 -1
  191. package/package.json +9 -8
  192. package/dist/main/services/views/destroy-child-view.d.ts +0 -9
  193. package/dist/main/services/views/destroy-child-view.js +0 -23
  194. package/dist/renderer/assets/constants-EAMiwL9_.js +0 -2
  195. package/dist/renderer/assets/index-BBg3YI5b.js +0 -49
  196. package/dist/renderer/assets/input-xdmfv-eH.js +0 -2
  197. package/dist/renderer/assets/ipc-transport-B3EpmfNS.js +0 -9
  198. package/dist/renderer/assets/ipc-transport-Blac3sOj.css +0 -1
  199. package/dist/renderer/assets/popover-B88e2hkg.js +0 -2
  200. package/dist/renderer/assets/select-CD9CJyhI.js +0 -2
  201. package/dist/renderer/assets/settings-44hf0QtO.js +0 -2
  202. package/dist/renderer/assets/settings-api-pJKPuP1M.js +0 -2
  203. package/dist/renderer/assets/workbenchSettings-DKD5U1Ql.js +0 -8
  204. package/dist/simulator/assets/device-shell-Cw7c-IkG.js +0 -2
  205. package/dist/simulator/assets/device-shell-DbC5ccs8.css +0 -1
  206. package/dist/simulator/assets/jsx-runtime-DkKmJyBb.js +0 -2
  207. package/dist/simulator/device-shell/menu-button-geometry.js +0 -18
  208. package/dist/vscode-workbench/assets/__vite-browser-external-BON7qP59.js +0 -1
@@ -1,9 +1,12 @@
1
1
  export { registerAppIpc } from './app.js';
2
2
  export { registerSimulatorIpc } from './simulator.js';
3
3
  export { registerPopoverIpc, popoverModule } from './popover.js';
4
+ export { registerTooltipIpc, tooltipModule } from './tooltip.js';
5
+ export { registerProjectCreateIpc, projectCreateModule } from './project-create.js';
4
6
  export { registerProjectsIpc, projectsModule } from './projects.js';
5
7
  export { registerSessionIpc, sessionModule } from './session.js';
6
8
  export { registerSettingsIpc, settingsModule } from './settings.js';
7
9
  export { registerInternalDevtoolsIpc } from './internal-devtools.js';
10
+ export { registerViewsIpc } from './views.js';
8
11
  export { simulatorModule } from './simulator-module.js';
9
12
  //# sourceMappingURL=index.d.ts.map
@@ -1,9 +1,12 @@
1
1
  export { registerAppIpc } from './app.js';
2
2
  export { registerSimulatorIpc } from './simulator.js';
3
3
  export { registerPopoverIpc, popoverModule } from './popover.js';
4
+ export { registerTooltipIpc, tooltipModule } from './tooltip.js';
5
+ export { registerProjectCreateIpc, projectCreateModule } from './project-create.js';
4
6
  export { registerProjectsIpc, projectsModule } from './projects.js';
5
7
  export { registerSessionIpc, sessionModule } from './session.js';
6
8
  export { registerSettingsIpc, settingsModule } from './settings.js';
7
9
  export { registerInternalDevtoolsIpc } from './internal-devtools.js';
10
+ export { registerViewsIpc } from './views.js';
8
11
  export { simulatorModule } from './simulator-module.js';
9
12
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import { PopoverChannel } from '../../shared/ipc-channels.js';
1
+ import { PopoverChannel } from '../../shared/ipc-channels-overlays.js';
2
2
  import { PopoverShowSchema, PopoverRelaunchSchema, } from '../../shared/ipc-schemas.js';
3
3
  import { validate } from '../utils/ipc-schema.js';
4
4
  import { IpcRegistry } from '../utils/ipc-registry.js';
@@ -0,0 +1,15 @@
1
+ import type { WorkbenchModule } from '../services/module.js';
2
+ import type { ViewManager } from '../services/views/view-manager.js';
3
+ import type { RendererNotifier } from '../services/notifications/renderer-notifier.js';
4
+ import type { Disposable } from '@dimina-kit/electron-deck/main';
5
+ import { type SenderPolicy } from '../utils/ipc-registry.js';
6
+ /** Module-local narrow deps — deliberately NOT `Pick<WorkbenchContext, ...>`
7
+ * (the gate in eslint.config.* is shrink-only; see its message). */
8
+ export interface ProjectCreateIpcDeps {
9
+ views: Pick<ViewManager, 'showProjectCreateDialog' | 'hideProjectCreateDialog'>;
10
+ notify: Pick<RendererNotifier, 'projectCreateSubmitted'>;
11
+ senderPolicy?: SenderPolicy;
12
+ }
13
+ export declare function registerProjectCreateIpc(ctx: ProjectCreateIpcDeps): Disposable;
14
+ export declare const projectCreateModule: WorkbenchModule;
15
+ //# sourceMappingURL=project-create.d.ts.map
@@ -0,0 +1,26 @@
1
+ import { ProjectCreateChannel } from '../../shared/ipc-channels-overlays.js';
2
+ import { ProjectCreateShowSchema, ProjectCreateSubmitSchema } from '../../shared/ipc-schemas.js';
3
+ import { validate } from '../utils/ipc-schema.js';
4
+ import { IpcRegistry } from '../utils/ipc-registry.js';
5
+ export function registerProjectCreateIpc(ctx) {
6
+ return new IpcRegistry(ctx.senderPolicy)
7
+ .on(ProjectCreateChannel.Show, (_event, ...args) => {
8
+ const [data] = validate(ProjectCreateChannel.Show, ProjectCreateShowSchema, args);
9
+ ctx.views.showProjectCreateDialog(data);
10
+ })
11
+ .on(ProjectCreateChannel.Cancel, () => {
12
+ ctx.views.hideProjectCreateDialog();
13
+ })
14
+ .on(ProjectCreateChannel.Submit, (_event, ...args) => {
15
+ const [input] = validate(ProjectCreateChannel.Submit, ProjectCreateSubmitSchema, args);
16
+ ctx.views.hideProjectCreateDialog();
17
+ ctx.notify.projectCreateSubmitted(input);
18
+ });
19
+ // OverlayChannel.Ready is registered once, in tooltip.ts — every overlay
20
+ // renderer (this one included) funnels readiness through that single
21
+ // listener, so a second registration here would double-fire markOverlayReady.
22
+ }
23
+ export const projectCreateModule = {
24
+ setup: (ctx) => registerProjectCreateIpc(ctx),
25
+ };
26
+ //# sourceMappingURL=project-create.js.map
@@ -1,7 +1,7 @@
1
1
  import type { WorkbenchContext } from '../services/workbench-context.js';
2
2
  import type { WorkbenchModule } from '../services/module.js';
3
3
  import type { Disposable } from '@dimina-kit/electron-deck/main';
4
- type ProjectsIpcCtx = Pick<WorkbenchContext, 'workspace' | 'windows' | 'senderPolicy' | 'projectsProvider' | 'projectTemplates' | 'customCreateProjectDialog'>;
4
+ type ProjectsIpcCtx = Pick<WorkbenchContext, 'workspace' | 'windows' | 'senderPolicy' | 'projectsProvider' | 'projectTemplates' | 'customCreateProjectDialog' | 'notify' | 'views'>;
5
5
  export declare function registerProjectsIpc(ctx: ProjectsIpcCtx): Disposable;
6
6
  export declare const projectsModule: WorkbenchModule;
7
7
  export {};
@@ -43,6 +43,17 @@ export function registerProjectsIpc(ctx) {
43
43
  buttons: ['确定'],
44
44
  });
45
45
  }
46
+ // Imported project's own detected type wins over whatever category the
47
+ // sidebar happened to be showing — the list would otherwise stay on
48
+ // the old category and hide the project that was just added. Drives
49
+ // both halves: the main-window list filter (existing notify channel,
50
+ // same one the sidebar's own click uses) and the sidebar rail's own
51
+ // highlight (a push down through its narrow bridge — the rail has no
52
+ // other way to learn about a selection that didn't originate from its
53
+ // own click).
54
+ const importedCategory = project.type ?? 'miniprogram';
55
+ ctx.notify.hostSidebarCategorySelected(importedCategory);
56
+ ctx.views.hostSidebar.send('project-category-forced', { category: importedCategory });
46
57
  return project;
47
58
  })
48
59
  .handle(ProjectsChannel.Remove, (_event, ...args) => {
@@ -22,6 +22,17 @@ export function registerSessionIpc(ctx) {
22
22
  })
23
23
  .handle(ProjectChannel.Close, () => {
24
24
  return ctx.workspace.closeProject();
25
+ })
26
+ .handle(ProjectChannel.Rebuild, async () => {
27
+ const session = ctx.workspace.getSession();
28
+ if (!session)
29
+ throw new Error('project:rebuild — no active project session');
30
+ // A host CompilationAdapter predating session.rebuild must not break:
31
+ // degrade discernibly so the renderer falls back to reattach-only.
32
+ if (typeof session.rebuild !== 'function')
33
+ return { supported: false };
34
+ await session.rebuild();
35
+ return { supported: true };
25
36
  })
26
37
  .handle(ProjectChannel.CaptureThumbnail, (_, ...args) => {
27
38
  const [projectPath] = validate(ProjectChannel.CaptureThumbnail, ProjectCaptureThumbnailSchema, args);
@@ -1,6 +1,7 @@
1
1
  import { app } from 'electron';
2
2
  import { loadWorkbenchSettings, saveWorkbenchSettings, applyTheme, } from '../services/settings/index.js';
3
- import { WorkbenchSettingsChannel, SettingsChannel } from '../../shared/ipc-channels.js';
3
+ import { WorkbenchSettingsChannel } from '../../shared/ipc-channels.js';
4
+ import { SettingsChannel } from '../../shared/ipc-channels-overlays.js';
4
5
  import { DEFAULT_CDP_PORT } from '../../shared/constants.js';
5
6
  import { getMcpStatus } from '../services/mcp/status.js';
6
7
  import { SettingsConfigChangedSchema, SettingsProjectSettingsChangedSchema, SettingsSetVisibleSchema, WorkbenchSettingsSaveSchema, WorkbenchSettingsSetThemeSchema, } from '../../shared/ipc-schemas.js';
@@ -1,8 +1,9 @@
1
1
  import type { WorkbenchModule } from '../services/module.js';
2
2
  /**
3
- * The 'simulator' built-in module fans out into the simulator + views IPC
4
- * registrars. Bundle them under a single module so app.ts only sees one
5
- * entry per BuiltinModuleId.
3
+ * The 'simulator' built-in module. views.ts's `registerViewsIpc` is NOT
4
+ * bundled in here it's registered unconditionally by app.ts (see that call
5
+ * site's comment for why: host-sidebar/host-toolbar placement has no real
6
+ * dependency on the simulator module).
6
7
  *
7
8
  * Bridge router (native-host PAGE_OPEN / NAV_ACTION / TAB_ACTION etc.) hooks
8
9
  * up unconditionally — the `__diminaNativeHost.enabled` flag in the simulator
@@ -1,11 +1,11 @@
1
1
  import { DisposableRegistry } from '@dimina-kit/electron-deck/main';
2
2
  import { registerSimulatorIpc } from './simulator.js';
3
3
  import { installBridgeRouter } from './bridge-router.js';
4
- import { registerViewsIpc } from './views.js';
5
4
  /**
6
- * The 'simulator' built-in module fans out into the simulator + views IPC
7
- * registrars. Bundle them under a single module so app.ts only sees one
8
- * entry per BuiltinModuleId.
5
+ * The 'simulator' built-in module. views.ts's `registerViewsIpc` is NOT
6
+ * bundled in here it's registered unconditionally by app.ts (see that call
7
+ * site's comment for why: host-sidebar/host-toolbar placement has no real
8
+ * dependency on the simulator module).
9
9
  *
10
10
  * Bridge router (native-host PAGE_OPEN / NAV_ACTION / TAB_ACTION etc.) hooks
11
11
  * up unconditionally — the `__diminaNativeHost.enabled` flag in the simulator
@@ -17,7 +17,6 @@ export const simulatorModule = {
17
17
  setup: (ctx) => {
18
18
  const reg = new DisposableRegistry();
19
19
  reg.add(registerSimulatorIpc(ctx));
20
- reg.add(registerViewsIpc(ctx));
21
20
  installBridgeRouter(ctx);
22
21
  return reg;
23
22
  },
@@ -0,0 +1,13 @@
1
+ import type { WorkbenchModule } from '../services/module.js';
2
+ import type { ViewManager } from '../services/views/view-manager.js';
3
+ import type { Disposable } from '@dimina-kit/electron-deck/main';
4
+ import { type SenderPolicy } from '../utils/ipc-registry.js';
5
+ /** Module-local narrow deps — deliberately NOT `Pick<WorkbenchContext, ...>`
6
+ * (the gate in eslint.config.* is shrink-only; see its message). */
7
+ export interface TooltipIpcDeps {
8
+ views: Pick<ViewManager, 'prepareTooltip' | 'showTooltip' | 'hideTooltip' | 'markOverlayReady' | 'applyTooltipMeasurement'>;
9
+ senderPolicy?: SenderPolicy;
10
+ }
11
+ export declare function registerTooltipIpc(ctx: TooltipIpcDeps): Disposable;
12
+ export declare const tooltipModule: WorkbenchModule;
13
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1,28 @@
1
+ import { OverlayChannel, TooltipChannel } from '../../shared/ipc-channels-overlays.js';
2
+ import { TooltipMeasuredSchema, TooltipShowSchema } from '../../shared/ipc-schemas.js';
3
+ import { validate } from '../utils/ipc-schema.js';
4
+ import { IpcRegistry } from '../utils/ipc-registry.js';
5
+ export function registerTooltipIpc(ctx) {
6
+ return new IpcRegistry(ctx.senderPolicy)
7
+ .on(TooltipChannel.Prepare, () => {
8
+ ctx.views.prepareTooltip();
9
+ })
10
+ .on(TooltipChannel.Show, (_event, ...args) => {
11
+ const [data] = validate(TooltipChannel.Show, TooltipShowSchema, args);
12
+ ctx.views.showTooltip(data);
13
+ })
14
+ .on(TooltipChannel.Hide, () => {
15
+ ctx.views.hideTooltip();
16
+ })
17
+ .on(OverlayChannel.Ready, (event) => {
18
+ ctx.views.markOverlayReady(event.sender.id);
19
+ })
20
+ .on(TooltipChannel.Measured, (event, ...args) => {
21
+ const [measurement] = validate(TooltipChannel.Measured, TooltipMeasuredSchema, args);
22
+ ctx.views.applyTooltipMeasurement(event.sender.id, measurement);
23
+ });
24
+ }
25
+ export const tooltipModule = {
26
+ setup: (ctx) => registerTooltipIpc(ctx),
27
+ };
28
+ //# sourceMappingURL=tooltip.js.map
@@ -1,7 +1,8 @@
1
1
  import type { WorkbenchContext } from '../services/workbench-context.js';
2
2
  import type { Disposable } from '@dimina-kit/electron-deck/main';
3
3
  /**
4
- * Renderer-driven overlay bounds.
4
+ * Renderer-driven overlay bounds, plus the renderer bootstrap's
5
+ * placement-generation seed pull.
5
6
  *
6
7
  * The main window's React layout is the source of truth for where the
7
8
  * editor view and the simulator's Chromium DevTools overlay live on
@@ -14,6 +15,19 @@ import type { Disposable } from '@dimina-kit/electron-deck/main';
14
15
  * panel is collapsed or the tab is not selected. The view manager removes
15
16
  * the child view from the contentView but keeps the WebContents alive so
16
17
  * subsequent re-shows skip the OpenSumi DI bootstrap.
18
+ *
19
+ * Registered UNCONDITIONALLY by app.ts — NOT gated behind `modules.simulator`
20
+ * (`WorkbenchAppConfig.modules`). None of `ctx.views` (`ViewManager`) is
21
+ * itself conditional on that toggle — it's constructed unconditionally in
22
+ * `createContext` and used unconditionally elsewhere (onResize, the
23
+ * update-dialog panel, workbench detach) — and host-sidebar in particular
24
+ * lives on the project-list page, wholly unrelated to the mini-program
25
+ * simulator webview a disabled `modules.simulator` would actually skip. Every
26
+ * renderer entry point also blocks its first render on
27
+ * `AllocatePlacementGeneration` (see renderer-placement-generation.ts) —
28
+ * gating any of this behind the simulator toggle would strand a host that
29
+ * disables it on the fatal boot-failure page, or leave placement silently
30
+ * non-functional. See disabled-module.test.ts for the end-to-end guard.
17
31
  */
18
32
  export declare function registerViewsIpc(ctx: Pick<WorkbenchContext, 'views' | 'senderPolicy'>): Disposable;
19
33
  //# sourceMappingURL=views.d.ts.map
@@ -1,10 +1,11 @@
1
1
  import { ipcMain } from 'electron';
2
- import { ViewChannel } from '../../shared/ipc-channels.js';
3
- import { PlacementSnapshotSchema, HostToolbarAdvertiseHeightSchema, } from '../../shared/ipc-schemas.js';
2
+ import { ViewChannel } from '../../shared/ipc-channels-overlays.js';
3
+ import { PlacementSnapshotSchema, HostToolbarAdvertiseHeightSchema, HostSidebarAdvertiseWidthSchema, HostDialogAdvertiseSizeSchema, } from '../../shared/ipc-schemas.js';
4
4
  import { validate } from '../utils/ipc-schema.js';
5
5
  import { IpcRegistry } from '../utils/ipc-registry.js';
6
6
  /**
7
- * Renderer-driven overlay bounds.
7
+ * Renderer-driven overlay bounds, plus the renderer bootstrap's
8
+ * placement-generation seed pull.
8
9
  *
9
10
  * The main window's React layout is the source of truth for where the
10
11
  * editor view and the simulator's Chromium DevTools overlay live on
@@ -17,9 +18,25 @@ import { IpcRegistry } from '../utils/ipc-registry.js';
17
18
  * panel is collapsed or the tab is not selected. The view manager removes
18
19
  * the child view from the contentView but keeps the WebContents alive so
19
20
  * subsequent re-shows skip the OpenSumi DI bootstrap.
21
+ *
22
+ * Registered UNCONDITIONALLY by app.ts — NOT gated behind `modules.simulator`
23
+ * (`WorkbenchAppConfig.modules`). None of `ctx.views` (`ViewManager`) is
24
+ * itself conditional on that toggle — it's constructed unconditionally in
25
+ * `createContext` and used unconditionally elsewhere (onResize, the
26
+ * update-dialog panel, workbench detach) — and host-sidebar in particular
27
+ * lives on the project-list page, wholly unrelated to the mini-program
28
+ * simulator webview a disabled `modules.simulator` would actually skip. Every
29
+ * renderer entry point also blocks its first render on
30
+ * `AllocatePlacementGeneration` (see renderer-placement-generation.ts) —
31
+ * gating any of this behind the simulator toggle would strand a host that
32
+ * disables it on the fatal boot-failure page, or leave placement silently
33
+ * non-functional. See disabled-module.test.ts for the end-to-end guard.
20
34
  */
21
35
  export function registerViewsIpc(ctx) {
22
36
  const registry = new IpcRegistry(ctx.senderPolicy)
37
+ // Renderer bootstrap: allocate this session's placement-generation seed
38
+ // (see renderer-placement-generation.ts / PlacementReconciler.allocateGeneration).
39
+ .handle(ViewChannel.AllocatePlacementGeneration, () => ctx.views.allocatePlacementGeneration())
23
40
  // Window-level placement snapshot: the single source of truth for every
24
41
  // managed native view's bounds/visibility/z-order. The renderer's central
25
42
  // publisher coalesces one snapshot per frame; the reconciler diffs it
@@ -36,7 +53,10 @@ export function registerViewsIpc(ctx) {
36
53
  // senderPolicy-gated registry as HostToolbarBounds: the toolbar WCV's
37
54
  // arbitrary host content must not reach this — only the trusted main
38
55
  // renderer pulls. Live delegation, not a registration-time snapshot.
39
- .handle(ViewChannel.HostToolbarGetHeight, () => ctx.views.getHostToolbarHeight());
56
+ .handle(ViewChannel.HostToolbarGetHeight, () => ctx.views.getHostToolbarHeight())
57
+ // Same mount-time replay role as HostToolbarGetHeight, on the sidebar's
58
+ // inline (width) axis.
59
+ .handle(ViewChannel.HostSidebarGetWidth, () => ctx.views.getHostSidebarWidth());
40
60
  // Reverse size-advertiser: the toolbar WCV's OWN renderer sends this, and the
41
61
  // host loads ARBITRARY content into that WCV. We DELIBERATELY do NOT add the
42
62
  // toolbar wc to the global sender policy — that would trust it for ALL ~72
@@ -61,10 +81,47 @@ export function registerViewsIpc(ctx) {
61
81
  ctx.views.setHostToolbarHeight(extent);
62
82
  };
63
83
  ipcMain.on(ViewChannel.HostToolbarAdvertiseHeight, onAdvertiseHeight);
84
+ // Same precise-sender-id trust model as onAdvertiseHeight, on the
85
+ // sidebar's inline (width) axis.
86
+ const onAdvertiseWidth = (event, ...args) => {
87
+ if (event.sender.id !== ctx.views.getHostSidebarWebContentsId())
88
+ return;
89
+ let extent;
90
+ try {
91
+ ;
92
+ [{ extent }] = validate(ViewChannel.HostSidebarAdvertiseWidth, HostSidebarAdvertiseWidthSchema, args);
93
+ }
94
+ catch {
95
+ return; // malformed payload from the host's own content — drop it
96
+ }
97
+ ctx.views.setHostSidebarWidth(extent);
98
+ };
99
+ ipcMain.on(ViewChannel.HostSidebarAdvertiseWidth, onAdvertiseWidth);
100
+ // Same precise-sender-id trust model as onAdvertiseHeight/onAdvertiseWidth,
101
+ // but the dialog is a single by-demand overlay rather than a persistent
102
+ // slot: either axis may arrive, and the view manager re-centers using
103
+ // whichever axes it has measured so far.
104
+ const onAdvertiseDialogSize = (event, ...args) => {
105
+ if (event.sender.id !== ctx.views.getHostDialogWebContentsId())
106
+ return;
107
+ let axis;
108
+ let extent;
109
+ try {
110
+ ;
111
+ [{ axis, extent }] = validate(ViewChannel.HostDialogAdvertiseSize, HostDialogAdvertiseSizeSchema, args);
112
+ }
113
+ catch {
114
+ return; // malformed payload from the host's own content — drop it
115
+ }
116
+ ctx.views.reportHostDialogMeasuredExtent(axis, extent);
117
+ };
118
+ ipcMain.on(ViewChannel.HostDialogAdvertiseSize, onAdvertiseDialogSize);
64
119
  return {
65
120
  dispose() {
66
121
  void registry.dispose();
67
122
  ipcMain.removeListener(ViewChannel.HostToolbarAdvertiseHeight, onAdvertiseHeight);
123
+ ipcMain.removeListener(ViewChannel.HostSidebarAdvertiseWidth, onAdvertiseWidth);
124
+ ipcMain.removeListener(ViewChannel.HostDialogAdvertiseSize, onAdvertiseDialogSize);
68
125
  },
69
126
  };
70
127
  }
@@ -73,6 +73,25 @@ export interface DiminaHostToolbarPageBridge {
73
73
  send: (channel: string, payload: unknown) => void;
74
74
  onMessage: (channel: string, handler: (payload: unknown) => void) => () => void;
75
75
  }
76
+ /**
77
+ * The page-side bridge injected into the host-sidebar WCV as
78
+ * `window.diminaHostSidebar` (see src/preload/runtime/host-sidebar-port.ts).
79
+ * Shape identical to `DiminaHostToolbarPageBridge` — the port-channel
80
+ * envelope and queueing/guard behaviour don't vary by slot.
81
+ */
82
+ export interface DiminaHostSidebarPageBridge {
83
+ send: (channel: string, payload: unknown) => void;
84
+ onMessage: (channel: string, handler: (payload: unknown) => void) => () => void;
85
+ }
86
+ /**
87
+ * The page-side bridge injected into the host-dialog WCV as
88
+ * `window.diminaHostDialog` (see src/preload/runtime/host-dialog-port.ts).
89
+ * Shape identical to `DiminaHostToolbarPageBridge`.
90
+ */
91
+ export interface DiminaHostDialogPageBridge {
92
+ send: (channel: string, payload: unknown) => void;
93
+ onMessage: (channel: string, handler: (payload: unknown) => void) => () => void;
94
+ }
76
95
  declare global {
77
96
  interface Window {
78
97
  /**
@@ -81,51 +100,68 @@ declare global {
81
100
  * else, so page code must runtime-guard before use.
82
101
  */
83
102
  diminaHostToolbar?: DiminaHostToolbarPageBridge;
103
+ /**
104
+ * Present ONLY inside the host-sidebar WebContentsView's main frame
105
+ * (guarded injection — see host-sidebar-runtime.ts); optional everywhere
106
+ * else, so page code must runtime-guard before use.
107
+ */
108
+ diminaHostSidebar?: DiminaHostSidebarPageBridge;
109
+ /**
110
+ * Present ONLY inside the host-dialog WebContentsView's main frame
111
+ * (guarded injection — see host-dialog-runtime.ts); optional everywhere
112
+ * else, so page code must runtime-guard before use.
113
+ */
114
+ diminaHostDialog?: DiminaHostDialogPageBridge;
84
115
  }
85
116
  }
86
117
  /**
87
- * Host-facing control surface for the toolbar WebContentsView — a
88
- * message-channel surface (`send`/`onMessage`), with no `webContents` escape
89
- * hatch (that would put Electron types on the contract).
118
+ * Shared message-channel surface for every downstream-controllable host slot
119
+ * (toolbar/sidebar/dialog) `send`/`onMessage`/`onReady` plus preload and
120
+ * content loading, with no `webContents` escape hatch (that would put
121
+ * Electron types on the contract). Each slot extends this with its own
122
+ * extent/visibility members.
90
123
  */
91
- export interface MiniappHostToolbar {
124
+ export interface MiniappHostSlotChannel {
92
125
  /**
93
- * The host's own `webPreferences.preload` for the toolbar view (purely
94
- * additive — never replaces the framework's session-resident height
126
+ * The host's own `webPreferences.preload` for this slot's view (purely
127
+ * additive — never replaces the framework's session-resident size
95
128
  * advertiser). Must be set before the view is (re)created; `null` (default)
96
129
  * means "no host preload".
97
130
  */
98
131
  setPreloadPath: (path: string | null) => void;
99
- /** Load a local file into the toolbar view (lazy-creates the view). */
132
+ /** Load a local file into the slot's view (lazy-creates the view). */
100
133
  loadFile: (path: string) => Promise<void>;
101
- /** Load a URL into the toolbar view (lazy-creates the view). */
134
+ /** Load a URL into the slot's view (lazy-creates the view). */
102
135
  loadURL: (url: string) => Promise<void>;
103
136
  /**
104
- * Post `{ channel, payload }` to the toolbar page. Gated and non-queueing:
137
+ * Post `{ channel, payload }` to the slot's page. Gated and non-queueing:
105
138
  * returns false (delivering nothing, creating no view) while there is no
106
- * live toolbar webContents or the current load's MessagePort handshake
107
- * hasn't completed; true once the envelope went out.
139
+ * live webContents or the current load's MessagePort handshake hasn't
140
+ * completed; true once the envelope went out.
108
141
  */
109
142
  send: (channel: string, payload: unknown) => boolean;
110
143
  /**
111
- * Register a host-side handler for messages the toolbar page sends via
112
- * `window.diminaHostToolbar.send(channel, payload)`. May be called before
113
- * the view exists; survives page reloads. `dispose()` detaches (idempotent).
144
+ * Register a host-side handler for messages the slot's page sends via
145
+ * `window.dimina*.send(channel, payload)`. May be called before the view
146
+ * exists; survives page reloads. `dispose()` detaches (idempotent).
114
147
  */
115
148
  onMessage: (channel: string, handler: (payload: unknown) => void) => {
116
149
  dispose: () => void;
117
150
  };
118
151
  /**
119
152
  * Observe handshake readiness. Fires the handler once per load generation,
120
- * exactly when the toolbar page's MessagePort handshake completes (i.e.
121
- * when `send` flips to true). Registering while the channel is already
122
- * ready fires once asynchronously on a microtask (missed-signal guard);
123
- * a reload / re-handshake fires registered handlers again. `dispose()`
153
+ * exactly when the slot page's MessagePort handshake completes (i.e. when
154
+ * `send` flips to true). Registering while the channel is already ready
155
+ * fires once asynchronously on a microtask (missed-signal guard); a
156
+ * reload / re-handshake fires registered handlers again. `dispose()`
124
157
  * detaches (idempotent).
125
158
  */
126
159
  onReady: (handler: () => void) => {
127
160
  dispose: () => void;
128
161
  };
162
+ }
163
+ /** Host-facing control surface for the toolbar WebContentsView. */
164
+ export interface MiniappHostToolbar extends MiniappHostSlotChannel {
129
165
  /**
130
166
  * Pin (`{ fixed }`) or unpin (`'auto'`) the toolbar strip height. `'auto'`
131
167
  * (default) lets the in-page height advertiser drive the placeholder.
@@ -136,6 +172,36 @@ export interface MiniappHostToolbar {
136
172
  fixed: number;
137
173
  }) => void;
138
174
  }
175
+ /** Host-facing control surface for the sidebar WebContentsView. */
176
+ export interface MiniappHostSidebar extends MiniappHostSlotChannel {
177
+ /**
178
+ * Pin (`{ fixed }`) or unpin (`'auto'`) the sidebar strip width. `'auto'`
179
+ * (default) lets the in-page width advertiser drive the placeholder.
180
+ * `{ fixed }` values must be finite and non-negative — anything else throws
181
+ * a `TypeError` synchronously and leaves the standing mode untouched.
182
+ */
183
+ setWidthMode: (mode: 'auto' | {
184
+ fixed: number;
185
+ }) => void;
186
+ }
187
+ /**
188
+ * Host-facing control surface for the by-demand, dual-axis-autosized dialog
189
+ * WebContentsView. Unlike the persistent toolbar/sidebar strips, the dialog
190
+ * is shown/hidden explicitly — there is no extent-mode setter (both axes
191
+ * always self-size from the page's own measured content).
192
+ */
193
+ export interface MiniappHostDialog extends MiniappHostSlotChannel {
194
+ /**
195
+ * Show the dialog, centered in the main window using its self-advertised
196
+ * size on both axes. Creates the view's placement if needed; does not
197
+ * (re)load content — the host must `loadURL`/`loadFile` first.
198
+ */
199
+ show: () => void;
200
+ /** Hide the dialog (kept alive, content preserved) without destroying the view. */
201
+ hide: () => void;
202
+ /** Whether the dialog is currently shown. */
203
+ isVisible: () => boolean;
204
+ }
139
205
  /**
140
206
  * The audited workspace surface: project list membership, session lifecycle,
141
207
  * and minimal session state. Thumbnails / per-project settings / providers
@@ -177,9 +243,11 @@ export interface MiniappWorkspace {
177
243
  * plumbing is a deliberate semver decision, not an accident of projection.
178
244
  */
179
245
  export interface MiniappRuntime {
180
- /** View layer — only the host-owned toolbar control is public. */
246
+ /** View layer — only the host-owned slot controls are public. */
181
247
  views: {
182
248
  readonly hostToolbar: MiniappHostToolbar;
249
+ readonly hostSidebar: MiniappHostSidebar;
250
+ readonly hostDialog: MiniappHostDialog;
183
251
  };
184
252
  /** Project + session workspace (see {@link MiniappWorkspace}). */
185
253
  workspace: MiniappWorkspace;
@@ -41,4 +41,15 @@ export declare const SETTINGS_W = 320;
41
41
  */
42
42
  export declare function computeSettingsBounds(contentWidth: number, contentHeight: number, headerHeight: number): Bounds;
43
43
  export declare function computePopoverBounds(contentWidth: number, contentHeight: number, headerHeight: number): Bounds;
44
+ export declare function computeTooltipMaxWidth(contentWidth: number): number;
45
+ /**
46
+ * Position the tooltip overlay relative to its trigger's own bounding rect
47
+ * (both in main-window content coordinates). Prefers directly below the
48
+ * anchor, flips above when there isn't room; always clamped horizontally
49
+ * inside the content area.
50
+ */
51
+ export declare function computeTooltipBounds(anchor: Bounds, contentWidth: number, contentHeight: number, measured: {
52
+ width: number;
53
+ height: number;
54
+ }): Bounds;
44
55
  //# sourceMappingURL=index.d.ts.map
@@ -52,4 +52,27 @@ export function computePopoverBounds(contentWidth, contentHeight, headerHeight)
52
52
  height: contentHeight - headerHeight,
53
53
  };
54
54
  }
55
+ const TOOLTIP_GAP = 6;
56
+ const TOOLTIP_EDGE_MARGIN = 4;
57
+ export function computeTooltipMaxWidth(contentWidth) {
58
+ return Math.max(1, contentWidth - TOOLTIP_EDGE_MARGIN * 2);
59
+ }
60
+ /**
61
+ * Position the tooltip overlay relative to its trigger's own bounding rect
62
+ * (both in main-window content coordinates). Prefers directly below the
63
+ * anchor, flips above when there isn't room; always clamped horizontally
64
+ * inside the content area.
65
+ */
66
+ export function computeTooltipBounds(anchor, contentWidth, contentHeight, measured) {
67
+ const availableWidth = computeTooltipMaxWidth(contentWidth);
68
+ const width = Math.min(availableWidth, Math.max(1, Math.ceil(measured.width)));
69
+ const height = Math.max(1, Math.ceil(measured.height));
70
+ const below = anchor.y + anchor.height + TOOLTIP_GAP;
71
+ const fitsBelow = below + height <= contentHeight;
72
+ const y = fitsBelow ? below : Math.max(0, anchor.y - TOOLTIP_GAP - height);
73
+ const centeredX = anchor.x + anchor.width / 2 - width / 2;
74
+ const maxX = Math.max(TOOLTIP_EDGE_MARGIN, contentWidth - width - TOOLTIP_EDGE_MARGIN);
75
+ const x = Math.min(maxX, Math.max(TOOLTIP_EDGE_MARGIN, centeredX));
76
+ return { x, y, width, height };
77
+ }
55
78
  //# sourceMappingURL=index.js.map
@@ -113,7 +113,8 @@ export function createFrontendReplyChannel(hostWc, isDisposed) {
113
113
  export function drainOutboundBatch(batch, handle) {
114
114
  if (!Array.isArray(batch))
115
115
  return;
116
- for (const raw of batch) {
116
+ const entries = batch;
117
+ for (const raw of entries) {
117
118
  if (!raw || typeof raw !== 'object')
118
119
  continue;
119
120
  const cmd = raw;
@@ -2,7 +2,8 @@ import type { BrowserWindow, WebContents, WebContentsView } from 'electron';
2
2
  import type { CompileConfig } from '../../../shared/types.js';
3
3
  import { type EditorOpenFilePayload } from '../../../shared/ipc-channels.js';
4
4
  import type { WorkbenchSettings } from '../settings/index.js';
5
- import type { ProjectSettings } from '../projects/project-repository.js';
5
+ import type { ProjectSettings, ProjectType } from '../projects/project-repository.js';
6
+ import type { UpdateInfo } from '../../../shared/types.js';
6
7
  /**
7
8
  * Payload for the `project:status` event sent whenever compile status changes.
8
9
  */
@@ -114,15 +115,45 @@ export interface RendererNotifier {
114
115
  * placeholder div resizes (closes the host-toolbar dynamic-height loop).
115
116
  */
116
117
  hostToolbarHeightChanged(height: number): void;
118
+ /**
119
+ * Push the reserved host-sidebar width to the main renderer so its sidebar
120
+ * placeholder div resizes, mirroring `hostToolbarHeightChanged` on the
121
+ * inline axis.
122
+ */
123
+ hostSidebarWidthChanged(width: number): void;
124
+ /**
125
+ * Push the project category selected in the host-sidebar's content to the
126
+ * main renderer so `ProjectListScreen` filters `ProjectList` accordingly.
127
+ */
128
+ hostSidebarCategorySelected(category: ProjectType): void;
117
129
  /**
118
130
  * Ask the main renderer's Monaco editor to open a project file at a position.
119
131
  * Drives the "click a console file link → open in editor" pipeline.
120
132
  */
121
133
  editorOpenFile(payload: EditorOpenFilePayload): void;
134
+ /**
135
+ * Relay a project-create-dialog submission from the overlay panel back to
136
+ * the main renderer, which owns the scaffold flow (createProject + list
137
+ * refresh) — the panel only collects the form and hands it off.
138
+ */
139
+ projectCreateSubmitted(payload: {
140
+ name: string;
141
+ path: string;
142
+ templateId: string;
143
+ }): void;
122
144
  /** Initialise the currently shown compile popover overlay. */
123
145
  popoverInit(popoverView: WebContentsView, payload: unknown): void;
124
146
  /** Initialise the currently shown settings overlay (no-op if hidden). */
125
147
  settingsInit(payload: SettingsInitPayload): void;
148
+ /** Push the label text (+ anchor) into the tooltip overlay's own renderer. */
149
+ tooltipInit(tooltipView: WebContentsView, payload: unknown): void;
150
+ /** Push the template catalog + base-dir defaults into the project-create overlay. */
151
+ projectCreateInit(dialogView: WebContentsView, payload: {
152
+ templates: unknown[];
153
+ defaultBaseDir: string;
154
+ }): void;
155
+ /** Push a discovered update's info into the update overlay. */
156
+ updateAvailable(dialogView: WebContentsView, payload: UpdateInfo): void;
126
157
  /** Initialise the standalone workbench-settings window. */
127
158
  workbenchSettingsInit(window: BrowserWindow, payload: WorkbenchSettingsInitPayload): void;
128
159
  }