@workbench-kit/react 0.0.2-prototype.0.2.4 → 0.0.2-prototype.0.2.40

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 (221) hide show
  1. package/README.md +172 -0
  2. package/package.json +38 -21
  3. package/src/index.ts +74 -34
  4. package/src/jdw/JsonCodeEditorPane.tsx +7 -6
  5. package/src/jdw/builtins/renderBuiltinWidgetLeaf.tsx +1 -3
  6. package/src/jdw/createBuiltinJdwRegistry.ts +1 -4
  7. package/src/jdw/cssRenderBackend.tsx +1 -4
  8. package/src/jdw/fixtures/jdw-fixtures.ts +0 -15
  9. package/src/json-config/JsonConfigWorkbench.tsx +1 -1
  10. package/src/layout/index.ts +11 -2
  11. package/src/layout/panel/Panel.tsx +0 -3
  12. package/src/layout/panel/index.ts +0 -2
  13. package/src/layout/sidebar/SideBarTree.tsx +301 -0
  14. package/src/layout/sidebar/SidebarActionIconBar.tsx +3 -3
  15. package/src/layout/sidebar/WorkbenchSidebarActions.tsx +1 -1
  16. package/src/layout/sidebar/index.ts +13 -0
  17. package/src/modal/Modal.tsx +55 -25
  18. package/src/modal/ModalTitlebar.tsx +8 -8
  19. package/src/modal/modalPosition.ts +3 -6
  20. package/src/modal/useModalFocusTrap.ts +142 -0
  21. package/src/modal/useModalWindowFrame.ts +2 -2
  22. package/src/overlay/ContextMenu.tsx +133 -21
  23. package/src/overlay/context-menu-density.css +22 -0
  24. package/src/overlay/context-menu-item.ts +17 -0
  25. package/src/overlay/context-menu.css +6 -2
  26. package/src/overlay/index.ts +6 -1
  27. package/src/overlay/measureAnchoredOverlayPanel.ts +4 -6
  28. package/src/overlay/pointerPassthroughRegion.ts +17 -1
  29. package/src/overlay/usePointerPassthroughRegion.ts +35 -6
  30. package/src/primitives/absolute-box/AbsoluteBox.tsx +4 -4
  31. package/src/primitives/app-icon/AppIcon.tsx +33 -0
  32. package/src/primitives/app-icon/app-icon.css +28 -0
  33. package/src/primitives/button/Button.tsx +4 -4
  34. package/src/primitives/catalog-browse-card/CatalogBrowseCard.tsx +6 -6
  35. package/src/primitives/catalog-browse-pane/CatalogBrowsePane.tsx +39 -32
  36. package/src/primitives/catalog-browse-pane/catalog-browse-pane.css +4 -0
  37. package/src/primitives/catalog-filter-overlay/CatalogFilterOverlay.tsx +2 -2
  38. package/src/primitives/checkbox/Checkbox.tsx +1 -1
  39. package/src/primitives/chip/Chip.tsx +3 -12
  40. package/src/primitives/chip/index.ts +2 -2
  41. package/src/primitives/codicon/Codicon.tsx +1 -1
  42. package/src/primitives/file-icon/FileIcon.tsx +1 -1
  43. package/src/primitives/icon-button/IconButton.tsx +1 -1
  44. package/src/primitives/index.ts +7 -2
  45. package/src/primitives/library-detail-layout/LibraryDetailLayout.tsx +123 -9
  46. package/src/primitives/library-detail-layout/library-detail-layout.css +57 -0
  47. package/src/primitives/library-detail-layout/resolve-hero-cover-media.ts +80 -0
  48. package/src/primitives/library-facet-filter-panel/LibraryFacetFilterPanel.tsx +12 -12
  49. package/src/primitives/library-facet-filter-strip/LibraryFacetFilterStrip.tsx +4 -4
  50. package/src/primitives/number-input/NumberInput.tsx +5 -5
  51. package/src/primitives/primitives.css +1 -0
  52. package/src/primitives/record-media-hero/RecordMediaHero.tsx +10 -6
  53. package/src/primitives/scroll-area/ScrollArea.tsx +5 -5
  54. package/src/primitives/scroll-area-infinite-load/useScrollAreaInfiniteLoad.ts +5 -5
  55. package/src/primitives/searchable-multi-select/SearchableMultiSelect.tsx +7 -7
  56. package/src/primitives/select/Select.tsx +1 -13
  57. package/src/primitives/text-area/TextArea.tsx +1 -1
  58. package/src/primitives/text-input/TextInput.tsx +1 -1
  59. package/src/primitives/workbench-media-slot/WorkbenchMediaPlaceholder.tsx +2 -2
  60. package/src/primitives/workbench-media-slot/WorkbenchMediaSlot.tsx +16 -10
  61. package/src/primitives/workbench-thumbnail/WorkbenchThumbnail.tsx +4 -4
  62. package/src/scrollbars.css +2 -6
  63. package/src/styles/core.css +16 -0
  64. package/src/styles/foundation.css +4 -0
  65. package/src/styles/overlay.css +2 -0
  66. package/src/styles.css +1 -15
  67. package/src/utils/clamp.ts +4 -0
  68. package/src/utils/normalizeKeyToken.ts +13 -0
  69. package/src/utils/readNumber.ts +4 -0
  70. package/src/widget-tree/WidgetSourceEditor.tsx +0 -14
  71. package/src/widget-tree/WidgetTreeCanvasPreview.tsx +3 -10
  72. package/src/widget-tree/WidgetTreeLab.tsx +2 -23
  73. package/src/widget-tree/WidgetTreeSidePanel.tsx +0 -5
  74. package/src/widget-tree/WidgetTreeWorkspaceShell.tsx +2 -2
  75. package/src/widget-tree/index.ts +1 -5
  76. package/src/workbench/auth/WorkbenchLoginView.tsx +1 -2
  77. package/src/workbench/auth/auth-flows.css +14 -0
  78. package/src/workbench/chat/ChatCommandProposalCard.tsx +4 -4
  79. package/src/workbench/chat/ChatConversationBar.tsx +3 -3
  80. package/src/workbench/chat/ChatHistoryMenu.tsx +1 -1
  81. package/src/workbench/chat/ChatMessageCollapsible.tsx +4 -0
  82. package/src/workbench/chat/ChatMessageItem.tsx +68 -10
  83. package/src/workbench/chat/ChatMessageList.tsx +1 -1
  84. package/src/workbench/chat/ChatPanel.tsx +32 -23
  85. package/src/workbench/chat/ChatPhasedRunProgress.tsx +86 -13
  86. package/src/workbench/chat/ChatRenameDialog.tsx +1 -1
  87. package/src/workbench/chat/chat-conversation.css +2 -2
  88. package/src/workbench/chat/chat-ui.css +8 -0
  89. package/src/workbench/chat/chatConversation.ts +2 -2
  90. package/src/workbench/chat/chatMessageMeta.tsx +4 -4
  91. package/src/workbench/chat/index.ts +1 -0
  92. package/src/workbench/chat/types.ts +7 -7
  93. package/src/workbench/chat/useCancelRuntimeOnUnmount.ts +4 -4
  94. package/src/workbench/chat/useChatPrependPagination.ts +10 -10
  95. package/src/workbench/chat/useSlashCommandSuggest.ts +1 -1
  96. package/src/workbench/{WorkbenchModalPortal.tsx → chrome/WorkbenchModalPortal.tsx} +1 -1
  97. package/src/workbench/chrome/workbench-chrome.css +4 -0
  98. package/src/workbench/chrome/workbench-layout-regions.css +13 -0
  99. package/src/workbench/chrome/workbench-shell-titlebar.css +0 -8
  100. package/src/workbench/{CommandGroupShell.tsx → commands/CommandGroupShell.tsx} +2 -2
  101. package/src/workbench/{CommandList.tsx → commands/CommandList.tsx} +6 -5
  102. package/src/workbench/{CommandPalette.tsx → commands/CommandPalette.tsx} +16 -42
  103. package/src/workbench/{ConfirmationFlow.tsx → commands/ConfirmationFlow.tsx} +5 -5
  104. package/src/workbench/{ShortcutCommandBridge.tsx → commands/ShortcutCommandBridge.tsx} +17 -13
  105. package/src/workbench/commands/WorkbenchQuickOpen.tsx +462 -0
  106. package/src/workbench/{command-model.ts → commands/command-model.ts} +5 -1
  107. package/src/workbench/commands/command-ui.ts +3 -0
  108. package/src/workbench/{commands.ts → commands/commands.ts} +45 -1
  109. package/src/workbench/commands/createWorkspaceFilesQuickOpenProvider.ts +86 -0
  110. package/src/workbench/commands/quick-open-model.ts +66 -0
  111. package/src/workbench/{WorkbenchEditorTabs.tsx → editor/WorkbenchEditorTabs.tsx} +13 -3
  112. package/src/workbench/{editor-tabs-dnd.ts → editor/editor-tabs-dnd.ts} +1 -1
  113. package/src/workbench/{editorTabContextMenu.ts → editor/editorTabContextMenu.ts} +43 -4
  114. package/src/workbench/{useEditorTabsStripDnd.ts → editor/useEditorTabsStripDnd.ts} +1 -1
  115. package/src/workbench/{useWorkbenchEditorTabContextMenu.tsx → editor/useWorkbenchEditorTabContextMenu.tsx} +16 -2
  116. package/src/workbench/editor-tabs/index.ts +10 -9
  117. package/src/workbench/index.ts +114 -74
  118. package/src/workbench/management/CommandManagementSidebar.tsx +16 -30
  119. package/src/workbench/management/ExtensionManagementPanel.tsx +84 -46
  120. package/src/workbench/management/ExtensionManagementSidebar.tsx +79 -45
  121. package/src/workbench/management/IntegrationCommandActions.tsx +8 -1
  122. package/src/workbench/management/IntegrationSettingsSurface.tsx +2 -5
  123. package/src/workbench/management/IntegrationsShell.tsx +1 -1
  124. package/src/workbench/management/KeybindingCaptureField.tsx +1 -9
  125. package/src/workbench/management/WorkbenchDialogFrame.tsx +2 -2
  126. package/src/workbench/management/WorkbenchNotice.tsx +17 -12
  127. package/src/workbench/management/createWorkbenchNotify.tsx +88 -0
  128. package/src/workbench/management/extension-install-approval.ts +72 -0
  129. package/src/workbench/management/extension-management-filters.ts +38 -0
  130. package/src/workbench/management/index.ts +18 -3
  131. package/src/workbench/management/management.css +28 -0
  132. package/src/workbench/management/types.ts +23 -1
  133. package/src/workbench/management/useWorkbenchNotify.ts +10 -0
  134. package/src/workbench/{MarkdownPreview.tsx → markdown/MarkdownPreview.tsx} +22 -7
  135. package/src/workbench/markdown/markdownRemarkPlugins.ts +12 -0
  136. package/src/workbench/markdown/sanitizeMarkdownHref.ts +29 -0
  137. package/src/workbench/schema/workbenchDocumentRenderer.tsx +48 -121
  138. package/src/workbench/settings/StructuredDataForm.tsx +1 -4
  139. package/src/workbench/settings/StructuredDataSchemaPanel.tsx +39 -44
  140. package/src/workbench/settings/sectionedPanelScrollSpy.ts +0 -81
  141. package/src/workbench/settings/structuredDataFormModel.ts +2 -1
  142. package/src/workbench/settings/structuredDataSchema.ts +24 -13
  143. package/src/workbench/settings/structuredDataSchemaSection.ts +4 -0
  144. package/src/workbench/settings/structuredDataSchemaTable.ts +5 -2
  145. package/src/workbench/{ActivityBar.tsx → shell/ActivityBar.tsx} +8 -12
  146. package/src/workbench/{ArtifactShell.tsx → shell/ArtifactShell.tsx} +25 -25
  147. package/src/workbench/{SplitView.tsx → shell/SplitView.tsx} +3 -3
  148. package/src/workbench/{StatusBar.tsx → shell/StatusBar.tsx} +8 -8
  149. package/src/workbench/{StructuredArtifactEditor.tsx → shell/StructuredArtifactEditor.tsx} +9 -9
  150. package/src/workbench/{Timeline.tsx → shell/Timeline.tsx} +77 -20
  151. package/src/workbench/{WorkbenchCanvasShell.defaults.ts → shell/WorkbenchCanvasShell.defaults.ts} +1 -1
  152. package/src/workbench/{WorkbenchCanvasShell.model.ts → shell/WorkbenchCanvasShell.model.ts} +5 -5
  153. package/src/workbench/{WorkbenchCanvasShell.tsx → shell/WorkbenchCanvasShell.tsx} +6 -6
  154. package/src/workbench/{WorkbenchDesktopTitleBar.tsx → shell/WorkbenchDesktopTitleBar.tsx} +15 -15
  155. package/src/workbench/{WorkbenchShell.tsx → shell/WorkbenchShell.tsx} +45 -6
  156. package/src/workbench/{WorkbenchShellTitleBarLayoutControls.tsx → shell/WorkbenchShellTitleBarLayoutControls.tsx} +16 -19
  157. package/src/workbench/{WorkbenchStandaloneShell.tsx → shell/WorkbenchStandaloneShell.tsx} +15 -22
  158. package/src/workbench/{WorkbenchViewEditor.tsx → shell/WorkbenchViewEditor.tsx} +7 -7
  159. package/src/workbench/{WorkbenchViewSidebar.tsx → shell/WorkbenchViewSidebar.tsx} +7 -7
  160. package/src/workbench/{WorkbenchWindowChromeControls.tsx → shell/WorkbenchWindowChromeControls.tsx} +18 -15
  161. package/src/workbench/shell/activity-bar.css +47 -0
  162. package/src/workbench/{activityBarOrder.ts → shell/activityBarOrder.ts} +2 -1
  163. package/src/workbench/{shell.ts → shell/shell.ts} +20 -13
  164. package/src/workbench/{shellViewModel.ts → shell/shellViewModel.ts} +3 -3
  165. package/src/workbench/{standalone.ts → shell/standalone.ts} +14 -2
  166. package/src/workbench/{useDeferredWorkbenchMount.ts → shell/useDeferredWorkbenchMount.ts} +3 -3
  167. package/src/workbench/{useWorkbenchAppearanceDocumentSync.tsx → shell/useWorkbenchAppearanceDocumentSync.tsx} +1 -1
  168. package/src/workbench/{useWorkbenchSidebarActionBarDnd.ts → shell/useWorkbenchSidebarActionBarDnd.ts} +1 -1
  169. package/src/workbench/{useWorkbenchSidebarViewPlacementDropZone.ts → shell/useWorkbenchSidebarViewPlacementDropZone.ts} +2 -2
  170. package/src/workbench/{workbenchSidebarLayoutContext.ts → shell/workbenchSidebarLayoutContext.ts} +0 -6
  171. package/src/workbench/{workbenchViewRouteState.ts → shell/workbenchViewRouteState.ts} +4 -4
  172. package/src/workbench/{WorkbenchThemeProvider.tsx → theme/WorkbenchThemeProvider.tsx} +4 -4
  173. package/src/workbench/{theme.ts → theme/theme.ts} +1 -1
  174. package/src/workbench/{themePresets.ts → theme/themePresets.ts} +3 -2
  175. package/src/workbench/views/command-list-density.css +36 -0
  176. package/src/workbench/views/command-list.css +2 -0
  177. package/src/workbench/views/extensions-sidebar.css +2 -0
  178. package/src/workbench/views/view-hosts.css +3 -3
  179. package/src/workbench/workspace/WorkspaceEditorPanel.tsx +1 -1
  180. package/src/workbench/workspace/WorkspaceExplorer.tsx +105 -4
  181. package/src/workbench/workspace/createVirtualWorkspaceExplorerPort.ts +1 -14
  182. package/src/workbench/workspace/workspaceExplorerKeyboard.ts +109 -0
  183. package/src/workbench/workspace/workspaceJsonDiagnostics.ts +6 -5
  184. package/src/workbench-menu-surfaces.css +3 -57
  185. package/src/brand/TilepaperAppIcon.tsx +0 -181
  186. package/src/brand/index.ts +0 -2
  187. package/src/brand/tilepaper-app-icon-geometry.ts +0 -201
  188. package/src/primitives/absolute-box/index.ts +0 -1
  189. package/src/primitives/catalog-browse-card/index.ts +0 -1
  190. package/src/primitives/catalog-browse-pane/index.ts +0 -3
  191. package/src/primitives/catalog-filter-overlay/index.ts +0 -1
  192. package/src/primitives/codicon/index.ts +0 -1
  193. package/src/primitives/external-link-button/index.ts +0 -1
  194. package/src/primitives/library-detail-layout/index.ts +0 -1
  195. package/src/primitives/library-facet-filter-panel/index.ts +0 -1
  196. package/src/primitives/library-facet-filter-strip/index.ts +0 -1
  197. package/src/primitives/panel-loading/index.ts +0 -1
  198. package/src/primitives/scroll-area-infinite-load/index.ts +0 -2
  199. package/src/primitives/workbench-thumbnail/index.ts +0 -1
  200. package/src/test-utils/workbenchMonacoMock.tsx +0 -37
  201. package/src/workbench/jdw/jdw-editors.css +0 -4
  202. package/src/workbench/jdw/jdw.css +0 -2
  203. package/src/workbench/management/integration-command-action.ts +0 -25
  204. package/src/workbench/markdownRemarkPlugins.ts +0 -4
  205. package/src/workbench/workbench-chrome.css +0 -4
  206. /package/src/workbench/{WorkbenchPlatformContext.tsx → chrome/WorkbenchPlatformContext.tsx} +0 -0
  207. /package/src/workbench/{workbenchModalViewState.ts → chrome/workbenchModalViewState.ts} +0 -0
  208. /package/src/workbench/{workbenchOverlaysContext.tsx → chrome/workbenchOverlaysContext.tsx} +0 -0
  209. /package/src/workbench/{workbenchPlatformChrome.ts → chrome/workbenchPlatformChrome.ts} +0 -0
  210. /package/src/workbench/{command-execution-policy.ts → commands/command-execution-policy.ts} +0 -0
  211. /package/src/workbench/{keyboard.ts → commands/keyboard.ts} +0 -0
  212. /package/src/workbench/{workbenchContextMenu.ts → commands/workbenchContextMenu.ts} +0 -0
  213. /package/src/workbench/{appearanceLabels.ts → shell/appearanceLabels.ts} +0 -0
  214. /package/src/workbench/{hardReset.ts → shell/hardReset.ts} +0 -0
  215. /package/src/workbench/{shellPresets.ts → shell/shellPresets.ts} +0 -0
  216. /package/src/workbench/{shellState.ts → shell/shellState.ts} +0 -0
  217. /package/src/workbench/{sidebarViewPlacementDnd.ts → shell/sidebarViewPlacementDnd.ts} +0 -0
  218. /package/src/workbench/{status.ts → shell/status.ts} +0 -0
  219. /package/src/workbench/{useWorkbenchSidebarLayout.tsx → shell/useWorkbenchSidebarLayout.tsx} +0 -0
  220. /package/src/workbench/{useWorkbenchStandaloneShellStateSync.tsx → shell/useWorkbenchStandaloneShellStateSync.tsx} +0 -0
  221. /package/src/workbench/{workbenchStandaloneShellReactContext.tsx → shell/workbenchStandaloneShellReactContext.tsx} +0 -0
@@ -1,8 +1,18 @@
1
- import type { ComponentPropsWithRef, ReactNode } from 'react';
2
- import { EmptyState } from '../primitives/empty-state';
3
- import { cxCodicon } from '../utils/codicon';
4
- import { cx } from '../utils/cx';
5
- import { getWorkbenchStatusLabel, isWorkbenchStatusBusy, type WorkbenchStatus } from './status';
1
+ import type {
2
+ ComponentPropsWithRef,
3
+ KeyboardEvent as ReactKeyboardEvent,
4
+ MouseEvent as ReactMouseEvent,
5
+ ReactNode,
6
+ } from 'react';
7
+ import { EmptyState } from '../../primitives/empty-state';
8
+ import { cxCodicon } from '../../utils/codicon';
9
+ import { cx } from '../../utils/cx';
10
+ import {
11
+ getWorkbenchStatusLabel,
12
+ isWorkbenchStatusBusy,
13
+ isWorkbenchStatusDisabled,
14
+ type WorkbenchStatus,
15
+ } from './status';
6
16
 
7
17
  export type WorkbenchTimelineEventKind =
8
18
  'message' | 'operation-call' | 'operation-result' | 'file-write' | 'progress' | 'error';
@@ -11,16 +21,16 @@ export type WorkbenchTimelineMessageSource = 'assistant' | 'system' | 'user' | (
11
21
  export type WorkbenchTimelineVariant = 'compact' | 'expanded';
12
22
 
13
23
  export interface WorkbenchTimelineEvent {
14
- content?: ReactNode | undefined;
15
- description?: ReactNode | undefined;
24
+ content?: ReactNode;
25
+ description?: ReactNode;
16
26
  id: string;
17
27
  kind: WorkbenchTimelineEventKind;
18
- metadata?: Record<string, unknown> | undefined;
28
+ metadata?: Record<string, unknown>;
19
29
  payload?: unknown;
20
- source?: WorkbenchTimelineMessageSource | undefined;
21
- status?: WorkbenchStatus | undefined;
22
- timestamp?: ReactNode | undefined;
23
- title?: ReactNode | undefined;
30
+ source?: WorkbenchTimelineMessageSource;
31
+ status?: WorkbenchStatus;
32
+ timestamp?: ReactNode;
33
+ title?: ReactNode;
24
34
  }
25
35
 
26
36
  export interface WorkbenchTimelineRenderContext {
@@ -172,10 +182,53 @@ export interface WorkbenchTimelineItemProps extends Omit<
172
182
  'children'
173
183
  > {
174
184
  event: WorkbenchTimelineEvent;
175
- index?: number | undefined;
176
- renderMetadata?: WorkbenchTimelineRenderMetadata | undefined;
177
- renderPayload?: WorkbenchTimelineRenderPayload | undefined;
178
- variant?: WorkbenchTimelineVariant | undefined;
185
+ index?: number;
186
+ renderMetadata?: WorkbenchTimelineRenderMetadata;
187
+ renderPayload?: WorkbenchTimelineRenderPayload;
188
+ variant?: WorkbenchTimelineVariant;
189
+ }
190
+
191
+ type WorkbenchTimelineActivationEvent =
192
+ ReactKeyboardEvent<HTMLElement> | ReactMouseEvent<HTMLElement>;
193
+
194
+ const timelineInteractiveDescendantSelector =
195
+ 'a[href],button,input,select,textarea,[contenteditable],[role="button"],[role="link"]';
196
+
197
+ function createTimelineActivationProps(
198
+ event: WorkbenchTimelineEvent,
199
+ onEventActivate: WorkbenchTimelineProps['onEventActivate'],
200
+ ): Pick<
201
+ WorkbenchTimelineItemProps,
202
+ 'aria-description' | 'aria-disabled' | 'aria-keyshortcuts' | 'onClick' | 'onKeyDown' | 'tabIndex'
203
+ > {
204
+ if (onEventActivate === undefined) return {};
205
+ if (isWorkbenchStatusDisabled(getWorkbenchTimelineEventStatus(event))) {
206
+ return { 'aria-disabled': true, tabIndex: -1 };
207
+ }
208
+
209
+ const activate = (activationEvent: WorkbenchTimelineActivationEvent) => {
210
+ const { currentTarget, target } = activationEvent;
211
+ const fromNestedControl =
212
+ target instanceof Element &&
213
+ target !== currentTarget &&
214
+ target.closest(timelineInteractiveDescendantSelector) !== null;
215
+ if (activationEvent.defaultPrevented || fromNestedControl) return;
216
+
217
+ if ('key' in activationEvent) {
218
+ if (activationEvent.key !== 'Enter' && activationEvent.key !== ' ') return;
219
+ activationEvent.preventDefault();
220
+ }
221
+
222
+ onEventActivate(event);
223
+ };
224
+
225
+ return {
226
+ 'aria-description': 'Press Enter or Space to activate.',
227
+ 'aria-keyshortcuts': 'Enter Space',
228
+ onClick: activate,
229
+ onKeyDown: activate,
230
+ tabIndex: 0,
231
+ };
179
232
  }
180
233
 
181
234
  export function WorkbenchTimelineItem({
@@ -245,17 +298,20 @@ export function WorkbenchTimelineItem({
245
298
  }
246
299
 
247
300
  export interface WorkbenchTimelineProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
248
- emptyLabel?: ReactNode | undefined;
301
+ emptyLabel?: ReactNode;
249
302
  events: readonly WorkbenchTimelineEvent[];
250
- renderMetadata?: WorkbenchTimelineRenderMetadata | undefined;
251
- renderPayload?: WorkbenchTimelineRenderPayload | undefined;
252
- variant?: WorkbenchTimelineVariant | undefined;
303
+ /** Activates an enabled event from pointer or Enter/Space input. */
304
+ onEventActivate?: (event: WorkbenchTimelineEvent) => void;
305
+ renderMetadata?: WorkbenchTimelineRenderMetadata;
306
+ renderPayload?: WorkbenchTimelineRenderPayload;
307
+ variant?: WorkbenchTimelineVariant;
253
308
  }
254
309
 
255
310
  export function WorkbenchTimeline({
256
311
  className,
257
312
  emptyLabel = 'No timeline events',
258
313
  events,
314
+ onEventActivate,
259
315
  renderMetadata,
260
316
  renderPayload,
261
317
  variant = 'expanded',
@@ -290,6 +346,7 @@ export function WorkbenchTimeline({
290
346
  renderMetadata={renderMetadata}
291
347
  renderPayload={renderPayload}
292
348
  variant={variant}
349
+ {...createTimelineActivationProps(event, onEventActivate)}
293
350
  />
294
351
  ))}
295
352
  </div>
@@ -1,4 +1,4 @@
1
- import type { WorkbenchDocument } from './schema';
1
+ import type { WorkbenchDocument } from '../schema';
2
2
 
3
3
  export const DEFAULT_CANVAS_ACTIVITY_ID = 'design' as const;
4
4
  export const DEFAULT_CANVAS_THEME = 'dark' as const;
@@ -1,10 +1,10 @@
1
- import type { WorkbenchDocumentNode, WorkbenchNodeLayout } from './schema';
1
+ import type { WorkbenchDocumentNode, WorkbenchNodeLayout } from '../schema';
2
2
 
3
3
  export interface WorkbenchCanvasLayoutInput {
4
- readonly height?: string | undefined;
5
- readonly width?: string | undefined;
6
- readonly x?: string | undefined;
7
- readonly y?: string | undefined;
4
+ readonly height?: string;
5
+ readonly width?: string;
6
+ readonly x?: string;
7
+ readonly y?: string;
8
8
  }
9
9
 
10
10
  export function getWorkbenchCanvasNodeChildren(node: WorkbenchDocumentNode): readonly string[] {
@@ -1,11 +1,11 @@
1
1
  import { type CSSProperties, type ReactElement, useEffect, useMemo, useState } from 'react';
2
2
  import { createCommandRegistryFromContributions } from '@workbench-kit/platform';
3
3
  import { integratedShellWorkspaceFiles } from '@workbench-kit/adapters';
4
- import { Button } from '../primitives/button';
5
- import { TextArea } from '../primitives/text-area';
6
- import { TextInput } from '../primitives/text-input';
7
- import { SideBarViewFrame } from '../layout/sidebar';
8
- import { createWorkbenchShellCommands } from './commands';
4
+ import { Button } from '../../primitives/button';
5
+ import { TextArea } from '../../primitives/text-area';
6
+ import { TextInput } from '../../primitives/text-input';
7
+ import { SideBarViewFrame } from '../../layout/sidebar';
8
+ import { createWorkbenchShellCommands } from '../commands/commands';
9
9
  import { WorkbenchStandaloneShell } from './WorkbenchStandaloneShell';
10
10
  import type { WorkbenchActivityDescriptor, WorkbenchStandaloneBootstrap } from './standalone';
11
11
  import {
@@ -19,7 +19,7 @@ import {
19
19
  type WorkbenchDocumentPatchHistory,
20
20
  type WorkbenchDocumentPatchHistoryState,
21
21
  type WorkbenchDocumentPatchResult,
22
- } from './schema';
22
+ } from '../schema';
23
23
  import {
24
24
  DEFAULT_CANVAS_ACTIVITY_ID,
25
25
  DEFAULT_CANVAS_THEME,
@@ -1,7 +1,7 @@
1
- import './chrome/workbench-desktop-titlebar.css';
1
+ import '../chrome/workbench-desktop-titlebar.css';
2
2
  import type { ReactNode } from 'react';
3
- import { cx } from '../utils/cx';
4
- import { useWorkbenchHostPlatform } from './WorkbenchPlatformContext';
3
+ import { cx } from '../../utils/cx';
4
+ import { useWorkbenchHostPlatform } from '../chrome/WorkbenchPlatformContext';
5
5
  import {
6
6
  shouldUseDarwinPlatformChrome,
7
7
  WorkbenchWindowChromeControls,
@@ -9,19 +9,19 @@ import {
9
9
  import {
10
10
  resolveWorkbenchWindowChromeDataAttributes,
11
11
  type WorkbenchWindowChromeMode,
12
- } from './workbenchPlatformChrome';
12
+ } from '../chrome/workbenchPlatformChrome';
13
13
 
14
14
  export interface WorkbenchDesktopWindowControlsProps {
15
15
  /** Defaults to `platform` so standalone controls match `WorkbenchDesktopTitleBar`. */
16
- chrome?: WorkbenchWindowChromeMode | undefined;
17
- closeLabel?: string | undefined;
16
+ chrome?: WorkbenchWindowChromeMode;
17
+ closeLabel?: string;
18
18
  isMaximized: boolean;
19
- maximizeLabel?: string | undefined;
20
- minimizeLabel?: string | undefined;
19
+ maximizeLabel?: string;
20
+ minimizeLabel?: string;
21
21
  onClose: () => void;
22
22
  onMinimize: () => void;
23
23
  onToggleMaximized: () => void;
24
- restoreLabel?: string | undefined;
24
+ restoreLabel?: string;
25
25
  }
26
26
 
27
27
  /**
@@ -59,20 +59,20 @@ export function WorkbenchDesktopWindowControls({
59
59
 
60
60
  export interface WorkbenchDesktopTitleBarProps {
61
61
  /** Optional center area, e.g. a command-menu trigger. Omit to leave it empty. */
62
- centerSlot?: ReactNode | undefined;
62
+ centerSlot?: ReactNode;
63
63
  /**
64
64
  * `platform` (default): darwin traffic lights / win32 caption buttons via host platform context.
65
65
  * `generic`: maximize + close only (modal-like), no OS-specific placement.
66
66
  */
67
- chrome?: WorkbenchWindowChromeMode | undefined;
68
- className?: string | undefined;
69
- leading?: ReactNode | undefined;
70
- trailing?: ReactNode | undefined;
67
+ chrome?: WorkbenchWindowChromeMode;
68
+ className?: string;
69
+ leading?: ReactNode;
70
+ trailing?: ReactNode;
71
71
  /**
72
72
  * Host-supplied window actions (Electron IPC callbacks). Omit on platforms that keep a native frame.
73
73
  * Kit owns chrome markup; the host owns minimize / maximize / close side effects only.
74
74
  */
75
- windowControls?: WorkbenchDesktopWindowControlsProps | undefined;
75
+ windowControls?: WorkbenchDesktopWindowControlsProps;
76
76
  }
77
77
 
78
78
  /**
@@ -1,12 +1,22 @@
1
1
  import { type CSSProperties, type ReactNode, useState } from 'react';
2
- import './chrome/workbench-layout-regions.css';
3
- import { cx } from '../utils/cx';
2
+ import '../chrome/workbench-layout-regions.css';
3
+ import { cx } from '../../utils/cx';
4
4
  import { ActivityBar, type ActivityBarProps, type ActivityBarItem } from './ActivityBar';
5
5
  import { SplitView } from './SplitView';
6
6
  import { StatusBar, type StatusBarItemModel, type StatusBarSectionModel } from './StatusBar';
7
7
  import { DEFAULT_PRIMARY_SIDEBAR_SIZE_PX } from './shellState';
8
- import { suppressNativeBrowserContextMenu } from './workbenchContextMenu';
9
- import { WorkbenchOverlaysProvider } from './workbenchOverlaysContext';
8
+ import { suppressNativeBrowserContextMenu } from '../commands/workbenchContextMenu';
9
+ import { WorkbenchOverlaysProvider } from '../chrome/workbenchOverlaysContext';
10
+
11
+ const DEFAULT_BOTTOM_PANEL_SIZE_PERCENT = 30;
12
+
13
+ function clampBottomPanelSizePercent(value: number): number {
14
+ return Math.min(70, Math.max(10, value));
15
+ }
16
+
17
+ function clampBottomPanelPrimarySizePercent(value: number): number {
18
+ return Math.min(90, Math.max(30, value));
19
+ }
10
20
 
11
21
  export type WorkbenchShellActivityBarPosition = 'left' | 'top';
12
22
 
@@ -15,7 +25,7 @@ export interface WorkbenchShellProps {
15
25
  items: ActivityBarItem[];
16
26
  visible?: boolean;
17
27
  };
18
- activityBarPosition?: WorkbenchShellActivityBarPosition | undefined;
28
+ activityBarPosition?: WorkbenchShellActivityBarPosition;
19
29
  auxiliarySidebar?: {
20
30
  isVisible: boolean;
21
31
  node: ReactNode;
@@ -25,10 +35,18 @@ export interface WorkbenchShellProps {
25
35
  bottomPanel?: {
26
36
  isVisible: boolean;
27
37
  node: ReactNode;
38
+ /**
39
+ * Panel track size as a percent of the vertical editor+panel split.
40
+ * When set with `onSizePercentChange`, the split is controlled.
41
+ */
42
+ sizePercent?: number;
43
+ onSizePercentChange?: (sizePercent: number) => void;
28
44
  className?: string;
29
45
  style?: CSSProperties;
30
46
  };
31
47
  compactStatus?: boolean;
48
+ /** Accessible name for the status bar region (default “Status bar”). */
49
+ statusBarAriaLabel?: string;
32
50
  onStatusItemActivate?: (item: StatusBarItemModel) => void;
33
51
  primarySidebar?: {
34
52
  isVisible: boolean;
@@ -58,6 +76,7 @@ export function WorkbenchShell({
58
76
  auxiliarySidebar,
59
77
  bottomPanel,
60
78
  compactStatus = true,
79
+ statusBarAriaLabel,
61
80
  onStatusItemActivate,
62
81
  overlays,
63
82
  primarySidebar,
@@ -85,17 +104,36 @@ export function WorkbenchShell({
85
104
  const isBottomPanelCollapsed = bottomPanel !== undefined && !bottomPanel.isVisible;
86
105
  const isAuxiliarySidebarCollapsed = auxiliarySidebar !== undefined && !auxiliarySidebar.isVisible;
87
106
 
107
+ const bottomPanelSizePercent =
108
+ bottomPanel?.onSizePercentChange !== undefined
109
+ ? (bottomPanel.sizePercent ?? DEFAULT_BOTTOM_PANEL_SIZE_PERCENT)
110
+ : undefined;
111
+ const bottomPanelPrimarySizePercent =
112
+ bottomPanelSizePercent !== undefined
113
+ ? clampBottomPanelPrimarySizePercent(100 - bottomPanelSizePercent)
114
+ : undefined;
115
+
88
116
  const editorArea = bottomPanel ? (
89
117
  <SplitView
90
118
  className={cx(
91
119
  bottomPanel.className,
92
120
  isBottomPanelCollapsed && 'ui-workbench-split-view--secondary-collapsed',
93
121
  )}
94
- defaultPrimarySizePercent={70}
122
+ defaultPrimarySizePercent={100 - DEFAULT_BOTTOM_PANEL_SIZE_PERCENT}
95
123
  maxPrimarySizePercent={90}
96
124
  minPrimarySizePercent={30}
125
+ onPrimarySizePercentChange={
126
+ bottomPanel.onSizePercentChange
127
+ ? (primarySizePercent) => {
128
+ bottomPanel.onSizePercentChange?.(
129
+ clampBottomPanelSizePercent(100 - primarySizePercent),
130
+ );
131
+ }
132
+ : undefined
133
+ }
97
134
  orientation="vertical"
98
135
  primary={secondaryArea}
136
+ primarySizePercent={bottomPanelPrimarySizePercent}
99
137
  secondary={bottomPanel.node}
100
138
  />
101
139
  ) : (
@@ -178,6 +216,7 @@ export function WorkbenchShell({
178
216
  {body}
179
217
  </div>
180
218
  <StatusBar
219
+ aria-label={statusBarAriaLabel}
181
220
  compact={compactStatus}
182
221
  sections={statusSections}
183
222
  onItemActivate={onStatusItemActivate}
@@ -1,25 +1,22 @@
1
- import './chrome/workbench-shell-titlebar.css';
1
+ import '../chrome/workbench-shell-titlebar.css';
2
2
  import type { JSX } from 'react';
3
3
 
4
- import { IconButton } from '../primitives/icon-button';
4
+ import { IconButton } from '../../primitives/icon-button';
5
+ import { cx } from '../../utils/cx';
5
6
 
6
7
  export interface WorkbenchShellTitleBarLayoutControlsProps {
7
- readonly isAuxiliarySidebarVisible?: boolean | undefined;
8
- readonly isPanelVisible?: boolean | undefined;
8
+ readonly isAuxiliarySidebarVisible?: boolean;
9
+ readonly isPanelVisible?: boolean;
9
10
  readonly isPrimarySidebarVisible: boolean;
10
- readonly onToggleAuxiliarySidebar?: (() => void) | undefined;
11
- readonly onTogglePanel?: (() => void) | undefined;
11
+ readonly onToggleAuxiliarySidebar?: () => void;
12
+ readonly onTogglePanel?: () => void;
12
13
  readonly onTogglePrimarySidebar: () => void;
13
- readonly panelHideLabel?: string | undefined;
14
- readonly panelShowLabel?: string | undefined;
15
- readonly primarySidebarHideLabel?: string | undefined;
16
- readonly primarySidebarShowLabel?: string | undefined;
17
- readonly secondarySidebarHideLabel?: string | undefined;
18
- readonly secondarySidebarShowLabel?: string | undefined;
19
- }
20
-
21
- function joinClasses(...classNames: Array<string | false | null | undefined>): string {
22
- return classNames.filter(Boolean).join(' ');
14
+ readonly panelHideLabel?: string;
15
+ readonly panelShowLabel?: string;
16
+ readonly primarySidebarHideLabel?: string;
17
+ readonly primarySidebarShowLabel?: string;
18
+ readonly secondarySidebarHideLabel?: string;
19
+ readonly secondarySidebarShowLabel?: string;
23
20
  }
24
21
 
25
22
  export function WorkbenchShellTitleBarLayoutControls({
@@ -40,7 +37,7 @@ export function WorkbenchShellTitleBarLayoutControls({
40
37
  <div className="workbench-shell-titlebar__layout-controls">
41
38
  <IconButton
42
39
  aria-pressed={isPrimarySidebarVisible}
43
- className={joinClasses(
40
+ className={cx(
44
41
  'workbench-shell-titlebar__layout-control',
45
42
  isPrimarySidebarVisible && 'workbench-shell-titlebar__layout-control--active',
46
43
  )}
@@ -52,7 +49,7 @@ export function WorkbenchShellTitleBarLayoutControls({
52
49
  {onTogglePanel ? (
53
50
  <IconButton
54
51
  aria-pressed={isPanelVisible}
55
- className={joinClasses(
52
+ className={cx(
56
53
  'workbench-shell-titlebar__layout-control',
57
54
  isPanelVisible && 'workbench-shell-titlebar__layout-control--active',
58
55
  )}
@@ -65,7 +62,7 @@ export function WorkbenchShellTitleBarLayoutControls({
65
62
  {onToggleAuxiliarySidebar ? (
66
63
  <IconButton
67
64
  aria-pressed={isAuxiliarySidebarVisible}
68
- className={joinClasses(
65
+ className={cx(
69
66
  'workbench-shell-titlebar__layout-control',
70
67
  isAuxiliarySidebarVisible && 'workbench-shell-titlebar__layout-control--active',
71
68
  )}
@@ -1,16 +1,16 @@
1
1
  import { useMemo, useRef } from 'react';
2
- import { useResolvedWorkbenchTheme } from './theme';
2
+ import { useResolvedWorkbenchTheme } from '../theme/theme';
3
3
  import type { CSSProperties, MouseEvent, ReactNode } from 'react';
4
4
  import { useWorkbenchStandaloneShellStateSync } from './useWorkbenchStandaloneShellStateSync';
5
5
  import {
6
6
  WorkbenchStandaloneShellReactContextProvider,
7
7
  type WorkbenchStandaloneShellStateChange,
8
8
  } from './workbenchStandaloneShellReactContext';
9
- import { cxCodicon } from '../utils/codicon';
9
+ import { cxCodicon } from '../../utils/codicon';
10
10
  import type { StatusBarItemModel, StatusBarSectionModel } from './StatusBar';
11
11
  import type { WorkbenchShellProps } from './WorkbenchShell';
12
12
  import { WorkbenchShell } from './WorkbenchShell';
13
- import type { WorkbenchShellCommandContext } from './commands';
13
+ import type { WorkbenchShellCommandContext } from '../commands/commands';
14
14
  import { DEFAULT_PRIMARY_SIDEBAR_SIZE_PX, useWorkbenchShellState } from './shellState';
15
15
  import type {
16
16
  WorkbenchActivityChangeEvent,
@@ -19,7 +19,7 @@ import type {
19
19
  WorkbenchStandaloneBootstrapEvent,
20
20
  WorkbenchTheme,
21
21
  } from './standalone';
22
- import { WorkspaceDraftsProvider } from './workspace/WorkspaceDraftsContext';
22
+ import { WorkspaceDraftsProvider } from '../workspace/WorkspaceDraftsContext';
23
23
 
24
24
  const DEFAULT_THEME: WorkbenchTheme = 'dark';
25
25
  const DEFAULT_ACTIVITY_ID = 'explorer';
@@ -391,6 +391,15 @@ export function WorkbenchStandaloneShell<
391
391
  }),
392
392
  );
393
393
  };
394
+ const togglePrimarySidebar = () => {
395
+ const nextSidebarVisible = !isPrimarySidebarVisible;
396
+ setPrimarySidebarLifecycle(
397
+ activeActivityId,
398
+ nextSidebarVisible,
399
+ nextSidebarVisible ? 'sidebar-show' : 'sidebar-hide',
400
+ );
401
+ shell.togglePrimarySidebar();
402
+ };
394
403
  const createContext = ({
395
404
  activityId,
396
405
  shell,
@@ -403,15 +412,7 @@ export function WorkbenchStandaloneShell<
403
412
  isPrimarySidebarVisible,
404
413
  openSettings: shell.openSettings,
405
414
  showActivity,
406
- togglePrimarySidebar: () => {
407
- const nextSidebarVisible = !isPrimarySidebarVisible;
408
- setPrimarySidebarLifecycle(
409
- activeActivityId,
410
- nextSidebarVisible,
411
- nextSidebarVisible ? 'sidebar-show' : 'sidebar-hide',
412
- );
413
- shell.togglePrimarySidebar();
414
- },
415
+ togglePrimarySidebar,
415
416
  },
416
417
  isPrimarySidebarVisible,
417
418
  isSettingsOpen,
@@ -430,15 +431,7 @@ export function WorkbenchStandaloneShell<
430
431
  );
431
432
  shell.setPrimarySidebarVisible(isVisible);
432
433
  },
433
- togglePrimarySidebar: () => {
434
- const nextSidebarVisible = !isPrimarySidebarVisible;
435
- setPrimarySidebarLifecycle(
436
- activeActivityId,
437
- nextSidebarVisible,
438
- nextSidebarVisible ? 'sidebar-show' : 'sidebar-hide',
439
- );
440
- shell.togglePrimarySidebar();
441
- },
434
+ togglePrimarySidebar,
442
435
  openSettings: shell.openSettings,
443
436
  closeSettings: shell.closeSettings,
444
437
  setSettingsCategoryId: shell.setSettingsCategoryId,
@@ -7,8 +7,8 @@ import {
7
7
  type WorkbenchEditorBodyProps,
8
8
  type WorkbenchEditorFrameProps,
9
9
  type WorkbenchPanelSurfaceProps,
10
- } from '../layout/WorkbenchLayoutBase';
11
- import { EmptyState, type EmptyStateProps } from '../primitives/empty-state';
10
+ } from '../../layout/WorkbenchLayoutBase';
11
+ import { EmptyState, type EmptyStateProps } from '../../primitives/empty-state';
12
12
 
13
13
  export type WorkbenchViewEditorDataAttributes = {
14
14
  readonly [key: `data-${string}`]: boolean | number | string | undefined;
@@ -26,15 +26,15 @@ export type WorkbenchViewEditorEmptyStateSurfaceProps = Omit<
26
26
  export interface WorkbenchViewEditorEmptyState {
27
27
  readonly children: ReactNode;
28
28
  readonly icon: EmptyStateProps['icon'];
29
- readonly props?: WorkbenchViewEditorEmptyStateProps | undefined;
30
- readonly surfaceProps?: WorkbenchViewEditorEmptyStateSurfaceProps | undefined;
29
+ readonly props?: WorkbenchViewEditorEmptyStateProps;
30
+ readonly surfaceProps?: WorkbenchViewEditorEmptyStateSurfaceProps;
31
31
  }
32
32
 
33
33
  export interface WorkbenchViewEditorProps extends Omit<WorkbenchEditorFrameProps, 'children'> {
34
- readonly bodyProps?: Omit<WorkbenchEditorBodyProps, 'children'> | undefined;
34
+ readonly bodyProps?: Omit<WorkbenchEditorBodyProps, 'children'>;
35
35
  readonly children?: ReactNode;
36
- readonly emptyState?: WorkbenchViewEditorEmptyState | undefined;
37
- readonly tabs?: ReactNode | undefined;
36
+ readonly emptyState?: WorkbenchViewEditorEmptyState;
37
+ readonly tabs?: ReactNode;
38
38
  }
39
39
 
40
40
  export function WorkbenchViewEditor({
@@ -6,15 +6,15 @@ import {
6
6
  SideBarViewFrame,
7
7
  type SideBarListProps,
8
8
  type SideBarViewFrameProps,
9
- } from '../layout/sidebar';
10
- import { cx } from '../utils/cx';
9
+ } from '../../layout/sidebar';
10
+ import { cx } from '../../utils/cx';
11
11
 
12
12
  export interface WorkbenchViewSidebarItem<TViewId extends string, TIcon = unknown> {
13
- readonly disabled?: boolean | undefined;
13
+ readonly disabled?: boolean;
14
14
  readonly icon: TIcon;
15
15
  readonly id: TViewId;
16
16
  readonly label: string;
17
- readonly title?: string | undefined;
17
+ readonly title?: string;
18
18
  }
19
19
 
20
20
  export interface WorkbenchViewSidebarProps<TViewId extends string, TIcon = unknown> extends Omit<
@@ -22,10 +22,10 @@ export interface WorkbenchViewSidebarProps<TViewId extends string, TIcon = unkno
22
22
  'children' | 'onSelect'
23
23
  > {
24
24
  readonly [key: `data-${string}`]: boolean | number | string | undefined;
25
- readonly activeId?: TViewId | undefined;
26
- readonly itemDataAttributeName?: string | undefined;
25
+ readonly activeId?: TViewId;
26
+ readonly itemDataAttributeName?: string;
27
27
  readonly items: ReadonlyArray<WorkbenchViewSidebarItem<TViewId, TIcon>>;
28
- readonly listProps?: Omit<SideBarListProps, 'children'> | undefined;
28
+ readonly listProps?: Omit<SideBarListProps, 'children'>;
29
29
  readonly onSelect?:
30
30
  ((viewId: TViewId, item: WorkbenchViewSidebarItem<TViewId, TIcon>) => void) | undefined;
31
31
  readonly renderIcon: (icon: TIcon, item: WorkbenchViewSidebarItem<TViewId, TIcon>) => ReactNode;
@@ -1,21 +1,24 @@
1
1
  import type { ReactNode } from 'react';
2
2
 
3
- import { cx } from '../utils/cx';
4
- import { useWorkbenchHostPlatform } from './WorkbenchPlatformContext';
5
- import type { WorkbenchHostPlatform, WorkbenchWindowChromeMode } from './workbenchPlatformChrome';
3
+ import { cx } from '../../utils/cx';
4
+ import { useWorkbenchHostPlatform } from '../chrome/WorkbenchPlatformContext';
5
+ import type {
6
+ WorkbenchHostPlatform,
7
+ WorkbenchWindowChromeMode,
8
+ } from '../chrome/workbenchPlatformChrome';
6
9
 
7
10
  export interface WorkbenchWindowChromeControlsProps {
8
- chrome?: WorkbenchWindowChromeMode | undefined;
9
- closeLabel?: string | undefined;
10
- isMaximized?: boolean | undefined;
11
- maximizeLabel?: string | undefined;
12
- minimizeLabel?: string | undefined;
11
+ chrome?: WorkbenchWindowChromeMode;
12
+ closeLabel?: string;
13
+ isMaximized?: boolean;
14
+ maximizeLabel?: string;
15
+ minimizeLabel?: string;
13
16
  onClose: () => void;
14
- onMinimize?: (() => void) | undefined;
15
- onToggleMaximized?: (() => void) | undefined;
16
- restoreLabel?: string | undefined;
17
- showMaximize?: boolean | undefined;
18
- showMinimize?: boolean | undefined;
17
+ onMinimize?: () => void;
18
+ onToggleMaximized?: () => void;
19
+ restoreLabel?: string;
20
+ showMaximize?: boolean;
21
+ showMinimize?: boolean;
19
22
  surface: 'desktop-titlebar' | 'modal';
20
23
  }
21
24
 
@@ -88,8 +91,8 @@ interface SharedControlProps {
88
91
  maximizeLabel: string;
89
92
  minimizeLabel: string;
90
93
  onClose: () => void;
91
- onMinimize?: (() => void) | undefined;
92
- onToggleMaximized?: (() => void) | undefined;
94
+ onMinimize?: () => void;
95
+ onToggleMaximized?: () => void;
93
96
  restoreLabel: string;
94
97
  showMaximize: boolean;
95
98
  showMinimize: boolean;