@workbench-kit/react 0.0.2-prototype.0.2.4 → 0.0.2-prototype.0.2.41
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 +172 -0
- package/package.json +38 -21
- package/src/index.ts +74 -34
- package/src/jdw/JsonCodeEditorPane.tsx +7 -6
- package/src/jdw/builtins/renderBuiltinWidgetLeaf.tsx +1 -3
- package/src/jdw/createBuiltinJdwRegistry.ts +1 -4
- package/src/jdw/cssRenderBackend.tsx +1 -4
- package/src/jdw/fixtures/jdw-fixtures.ts +0 -15
- package/src/json-config/JsonConfigWorkbench.tsx +1 -1
- package/src/layout/index.ts +11 -2
- package/src/layout/panel/Panel.tsx +0 -3
- package/src/layout/panel/index.ts +0 -2
- package/src/layout/sidebar/SideBarTree.tsx +301 -0
- package/src/layout/sidebar/SidebarActionIconBar.tsx +3 -3
- package/src/layout/sidebar/WorkbenchSidebarActions.tsx +1 -1
- package/src/layout/sidebar/index.ts +13 -0
- package/src/modal/Modal.tsx +55 -25
- package/src/modal/ModalTitlebar.tsx +8 -8
- package/src/modal/modalPosition.ts +3 -6
- package/src/modal/useModalFocusTrap.ts +142 -0
- package/src/modal/useModalWindowFrame.ts +2 -2
- package/src/overlay/ContextMenu.tsx +133 -21
- package/src/overlay/context-menu-density.css +22 -0
- package/src/overlay/context-menu-item.ts +17 -0
- package/src/overlay/context-menu.css +6 -2
- package/src/overlay/index.ts +6 -1
- package/src/overlay/measureAnchoredOverlayPanel.ts +4 -6
- package/src/overlay/pointerPassthroughRegion.ts +17 -1
- package/src/overlay/usePointerPassthroughRegion.ts +35 -6
- package/src/primitives/absolute-box/AbsoluteBox.tsx +4 -4
- package/src/primitives/app-icon/AppIcon.tsx +33 -0
- package/src/primitives/app-icon/app-icon.css +28 -0
- package/src/primitives/button/Button.tsx +4 -4
- package/src/primitives/catalog-browse-card/CatalogBrowseCard.tsx +6 -6
- package/src/primitives/catalog-browse-pane/CatalogBrowsePane.tsx +39 -32
- package/src/primitives/catalog-browse-pane/catalog-browse-pane.css +4 -0
- package/src/primitives/catalog-filter-overlay/CatalogFilterOverlay.tsx +2 -2
- package/src/primitives/checkbox/Checkbox.tsx +1 -1
- package/src/primitives/chip/Chip.tsx +3 -12
- package/src/primitives/chip/index.ts +2 -2
- package/src/primitives/codicon/Codicon.tsx +1 -1
- package/src/primitives/file-icon/FileIcon.tsx +1 -1
- package/src/primitives/icon-button/IconButton.tsx +1 -1
- package/src/primitives/index.ts +7 -2
- package/src/primitives/library-detail-layout/LibraryDetailLayout.tsx +123 -9
- package/src/primitives/library-detail-layout/library-detail-layout.css +57 -0
- package/src/primitives/library-detail-layout/resolve-hero-cover-media.ts +80 -0
- package/src/primitives/library-facet-filter-panel/LibraryFacetFilterPanel.tsx +12 -12
- package/src/primitives/library-facet-filter-strip/LibraryFacetFilterStrip.tsx +4 -4
- package/src/primitives/number-input/NumberInput.tsx +5 -5
- package/src/primitives/primitives.css +1 -0
- package/src/primitives/record-media-hero/RecordMediaHero.tsx +10 -6
- package/src/primitives/scroll-area/ScrollArea.tsx +5 -5
- package/src/primitives/scroll-area-infinite-load/useScrollAreaInfiniteLoad.ts +5 -5
- package/src/primitives/searchable-multi-select/SearchableMultiSelect.tsx +7 -7
- package/src/primitives/select/Select.tsx +1 -13
- package/src/primitives/text-area/TextArea.tsx +1 -1
- package/src/primitives/text-input/TextInput.tsx +1 -1
- package/src/primitives/workbench-media-slot/WorkbenchMediaPlaceholder.tsx +2 -2
- package/src/primitives/workbench-media-slot/WorkbenchMediaSlot.tsx +16 -10
- package/src/primitives/workbench-thumbnail/WorkbenchThumbnail.tsx +4 -4
- package/src/scrollbars.css +2 -6
- package/src/styles/core.css +16 -0
- package/src/styles/foundation.css +4 -0
- package/src/styles/overlay.css +2 -0
- package/src/styles.css +1 -15
- package/src/utils/clamp.ts +4 -0
- package/src/utils/normalizeKeyToken.ts +13 -0
- package/src/utils/readNumber.ts +4 -0
- package/src/widget-tree/WidgetSourceEditor.tsx +0 -14
- package/src/widget-tree/WidgetTreeCanvasPreview.tsx +3 -10
- package/src/widget-tree/WidgetTreeLab.tsx +2 -23
- package/src/widget-tree/WidgetTreeSidePanel.tsx +0 -5
- package/src/widget-tree/WidgetTreeWorkspaceShell.tsx +2 -2
- package/src/widget-tree/index.ts +1 -5
- package/src/workbench/auth/WorkbenchLoginView.tsx +1 -2
- package/src/workbench/auth/auth-flows.css +14 -0
- package/src/workbench/chat/ChatCommandProposalCard.tsx +4 -4
- package/src/workbench/chat/ChatConversationBar.tsx +3 -3
- package/src/workbench/chat/ChatHistoryMenu.tsx +1 -1
- package/src/workbench/chat/ChatMessageCollapsible.tsx +4 -0
- package/src/workbench/chat/ChatMessageItem.tsx +68 -10
- package/src/workbench/chat/ChatMessageList.tsx +1 -1
- package/src/workbench/chat/ChatPanel.tsx +32 -23
- package/src/workbench/chat/ChatPhasedRunProgress.tsx +86 -13
- package/src/workbench/chat/ChatRenameDialog.tsx +1 -1
- package/src/workbench/chat/chat-conversation.css +2 -2
- package/src/workbench/chat/chat-ui.css +8 -0
- package/src/workbench/chat/chatConversation.ts +2 -2
- package/src/workbench/chat/chatMessageMeta.tsx +4 -4
- package/src/workbench/chat/index.ts +1 -0
- package/src/workbench/chat/types.ts +7 -7
- package/src/workbench/chat/useCancelRuntimeOnUnmount.ts +4 -4
- package/src/workbench/chat/useChatPrependPagination.ts +10 -10
- package/src/workbench/chat/useSlashCommandSuggest.ts +1 -1
- package/src/workbench/{WorkbenchModalPortal.tsx → chrome/WorkbenchModalPortal.tsx} +1 -1
- package/src/workbench/chrome/workbench-chrome.css +4 -0
- package/src/workbench/chrome/workbench-layout-regions.css +13 -0
- package/src/workbench/chrome/workbench-shell-titlebar.css +0 -8
- package/src/workbench/{CommandGroupShell.tsx → commands/CommandGroupShell.tsx} +2 -2
- package/src/workbench/{CommandList.tsx → commands/CommandList.tsx} +6 -5
- package/src/workbench/{CommandPalette.tsx → commands/CommandPalette.tsx} +16 -42
- package/src/workbench/{ConfirmationFlow.tsx → commands/ConfirmationFlow.tsx} +5 -5
- package/src/workbench/{ShortcutCommandBridge.tsx → commands/ShortcutCommandBridge.tsx} +17 -13
- package/src/workbench/commands/WorkbenchQuickOpen.tsx +462 -0
- package/src/workbench/{command-model.ts → commands/command-model.ts} +5 -1
- package/src/workbench/commands/command-ui.ts +3 -0
- package/src/workbench/{commands.ts → commands/commands.ts} +45 -1
- package/src/workbench/commands/createWorkspaceFilesQuickOpenProvider.ts +86 -0
- package/src/workbench/commands/quick-open-model.ts +66 -0
- package/src/workbench/{WorkbenchEditorTabs.tsx → editor/WorkbenchEditorTabs.tsx} +13 -3
- package/src/workbench/{editor-tabs-dnd.ts → editor/editor-tabs-dnd.ts} +1 -1
- package/src/workbench/{editorTabContextMenu.ts → editor/editorTabContextMenu.ts} +43 -4
- package/src/workbench/{useEditorTabsStripDnd.ts → editor/useEditorTabsStripDnd.ts} +1 -1
- package/src/workbench/{useWorkbenchEditorTabContextMenu.tsx → editor/useWorkbenchEditorTabContextMenu.tsx} +16 -2
- package/src/workbench/editor-tabs/index.ts +10 -9
- package/src/workbench/index.ts +114 -74
- package/src/workbench/management/CommandManagementSidebar.tsx +16 -30
- package/src/workbench/management/ExtensionManagementPanel.tsx +84 -46
- package/src/workbench/management/ExtensionManagementSidebar.tsx +79 -45
- package/src/workbench/management/IntegrationCommandActions.tsx +8 -1
- package/src/workbench/management/IntegrationSettingsSurface.tsx +2 -5
- package/src/workbench/management/IntegrationsShell.tsx +1 -1
- package/src/workbench/management/KeybindingCaptureField.tsx +1 -9
- package/src/workbench/management/WorkbenchDialogFrame.tsx +2 -2
- package/src/workbench/management/WorkbenchNotice.tsx +17 -12
- package/src/workbench/management/createWorkbenchNotify.tsx +88 -0
- package/src/workbench/management/extension-install-approval.ts +72 -0
- package/src/workbench/management/extension-management-filters.ts +38 -0
- package/src/workbench/management/index.ts +18 -3
- package/src/workbench/management/management.css +28 -0
- package/src/workbench/management/types.ts +23 -1
- package/src/workbench/management/useWorkbenchNotify.ts +10 -0
- package/src/workbench/{MarkdownPreview.tsx → markdown/MarkdownPreview.tsx} +22 -7
- package/src/workbench/markdown/markdownRemarkPlugins.ts +12 -0
- package/src/workbench/markdown/sanitizeMarkdownHref.ts +29 -0
- package/src/workbench/schema/workbenchDocumentRenderer.tsx +48 -121
- package/src/workbench/settings/StructuredDataForm.tsx +1 -4
- package/src/workbench/settings/StructuredDataSchemaPanel.tsx +39 -44
- package/src/workbench/settings/sectionedPanelScrollSpy.ts +0 -81
- package/src/workbench/settings/structuredDataFormModel.ts +2 -1
- package/src/workbench/settings/structuredDataSchema.ts +24 -13
- package/src/workbench/settings/structuredDataSchemaSection.ts +4 -0
- package/src/workbench/settings/structuredDataSchemaTable.ts +5 -2
- package/src/workbench/{ActivityBar.tsx → shell/ActivityBar.tsx} +8 -12
- package/src/workbench/{ArtifactShell.tsx → shell/ArtifactShell.tsx} +25 -25
- package/src/workbench/{SplitView.tsx → shell/SplitView.tsx} +3 -3
- package/src/workbench/{StatusBar.tsx → shell/StatusBar.tsx} +8 -8
- package/src/workbench/{StructuredArtifactEditor.tsx → shell/StructuredArtifactEditor.tsx} +9 -9
- package/src/workbench/{Timeline.tsx → shell/Timeline.tsx} +77 -20
- package/src/workbench/{WorkbenchCanvasShell.defaults.ts → shell/WorkbenchCanvasShell.defaults.ts} +1 -1
- package/src/workbench/{WorkbenchCanvasShell.model.ts → shell/WorkbenchCanvasShell.model.ts} +5 -5
- package/src/workbench/{WorkbenchCanvasShell.tsx → shell/WorkbenchCanvasShell.tsx} +6 -6
- package/src/workbench/{WorkbenchDesktopTitleBar.tsx → shell/WorkbenchDesktopTitleBar.tsx} +15 -15
- package/src/workbench/{WorkbenchShell.tsx → shell/WorkbenchShell.tsx} +45 -6
- package/src/workbench/{WorkbenchShellTitleBarLayoutControls.tsx → shell/WorkbenchShellTitleBarLayoutControls.tsx} +16 -19
- package/src/workbench/{WorkbenchStandaloneShell.tsx → shell/WorkbenchStandaloneShell.tsx} +15 -22
- package/src/workbench/{WorkbenchViewEditor.tsx → shell/WorkbenchViewEditor.tsx} +7 -7
- package/src/workbench/{WorkbenchViewSidebar.tsx → shell/WorkbenchViewSidebar.tsx} +7 -7
- package/src/workbench/{WorkbenchWindowChromeControls.tsx → shell/WorkbenchWindowChromeControls.tsx} +18 -15
- package/src/workbench/shell/activity-bar.css +47 -0
- package/src/workbench/{activityBarOrder.ts → shell/activityBarOrder.ts} +2 -1
- package/src/workbench/{shell.ts → shell/shell.ts} +20 -13
- package/src/workbench/{shellViewModel.ts → shell/shellViewModel.ts} +3 -3
- package/src/workbench/{standalone.ts → shell/standalone.ts} +14 -2
- package/src/workbench/{useDeferredWorkbenchMount.ts → shell/useDeferredWorkbenchMount.ts} +3 -3
- package/src/workbench/{useWorkbenchAppearanceDocumentSync.tsx → shell/useWorkbenchAppearanceDocumentSync.tsx} +1 -1
- package/src/workbench/{useWorkbenchSidebarActionBarDnd.ts → shell/useWorkbenchSidebarActionBarDnd.ts} +1 -1
- package/src/workbench/{useWorkbenchSidebarViewPlacementDropZone.ts → shell/useWorkbenchSidebarViewPlacementDropZone.ts} +2 -2
- package/src/workbench/{workbenchSidebarLayoutContext.ts → shell/workbenchSidebarLayoutContext.ts} +0 -6
- package/src/workbench/{workbenchViewRouteState.ts → shell/workbenchViewRouteState.ts} +4 -4
- package/src/workbench/{WorkbenchThemeProvider.tsx → theme/WorkbenchThemeProvider.tsx} +4 -4
- package/src/workbench/{theme.ts → theme/theme.ts} +1 -1
- package/src/workbench/{themePresets.ts → theme/themePresets.ts} +39 -64
- package/src/workbench/views/command-list-density.css +36 -0
- package/src/workbench/views/command-list.css +2 -0
- package/src/workbench/views/extensions-sidebar.css +2 -0
- package/src/workbench/views/view-hosts.css +3 -3
- package/src/workbench/workspace/WorkspaceEditorPanel.tsx +1 -1
- package/src/workbench/workspace/WorkspaceExplorer.tsx +105 -4
- package/src/workbench/workspace/createVirtualWorkspaceExplorerPort.ts +1 -14
- package/src/workbench/workspace/workspaceExplorerKeyboard.ts +109 -0
- package/src/workbench/workspace/workspaceJsonDiagnostics.ts +6 -5
- package/src/workbench-menu-surfaces.css +3 -57
- package/src/brand/TilepaperAppIcon.tsx +0 -181
- package/src/brand/index.ts +0 -2
- package/src/brand/tilepaper-app-icon-geometry.ts +0 -201
- package/src/primitives/absolute-box/index.ts +0 -1
- package/src/primitives/catalog-browse-card/index.ts +0 -1
- package/src/primitives/catalog-browse-pane/index.ts +0 -3
- package/src/primitives/catalog-filter-overlay/index.ts +0 -1
- package/src/primitives/codicon/index.ts +0 -1
- package/src/primitives/external-link-button/index.ts +0 -1
- package/src/primitives/library-detail-layout/index.ts +0 -1
- package/src/primitives/library-facet-filter-panel/index.ts +0 -1
- package/src/primitives/library-facet-filter-strip/index.ts +0 -1
- package/src/primitives/panel-loading/index.ts +0 -1
- package/src/primitives/scroll-area-infinite-load/index.ts +0 -2
- package/src/primitives/workbench-thumbnail/index.ts +0 -1
- package/src/test-utils/workbenchMonacoMock.tsx +0 -37
- package/src/workbench/jdw/jdw-editors.css +0 -4
- package/src/workbench/jdw/jdw.css +0 -2
- package/src/workbench/management/integration-command-action.ts +0 -25
- package/src/workbench/markdownRemarkPlugins.ts +0 -4
- package/src/workbench/workbench-chrome.css +0 -4
- /package/src/workbench/{WorkbenchPlatformContext.tsx → chrome/WorkbenchPlatformContext.tsx} +0 -0
- /package/src/workbench/{workbenchModalViewState.ts → chrome/workbenchModalViewState.ts} +0 -0
- /package/src/workbench/{workbenchOverlaysContext.tsx → chrome/workbenchOverlaysContext.tsx} +0 -0
- /package/src/workbench/{workbenchPlatformChrome.ts → chrome/workbenchPlatformChrome.ts} +0 -0
- /package/src/workbench/{command-execution-policy.ts → commands/command-execution-policy.ts} +0 -0
- /package/src/workbench/{keyboard.ts → commands/keyboard.ts} +0 -0
- /package/src/workbench/{workbenchContextMenu.ts → commands/workbenchContextMenu.ts} +0 -0
- /package/src/workbench/{appearanceLabels.ts → shell/appearanceLabels.ts} +0 -0
- /package/src/workbench/{hardReset.ts → shell/hardReset.ts} +0 -0
- /package/src/workbench/{shellPresets.ts → shell/shellPresets.ts} +0 -0
- /package/src/workbench/{shellState.ts → shell/shellState.ts} +0 -0
- /package/src/workbench/{sidebarViewPlacementDnd.ts → shell/sidebarViewPlacementDnd.ts} +0 -0
- /package/src/workbench/{status.ts → shell/status.ts} +0 -0
- /package/src/workbench/{useWorkbenchSidebarLayout.tsx → shell/useWorkbenchSidebarLayout.tsx} +0 -0
- /package/src/workbench/{useWorkbenchStandaloneShellStateSync.tsx → shell/useWorkbenchStandaloneShellStateSync.tsx} +0 -0
- /package/src/workbench/{workbenchStandaloneShellReactContext.tsx → shell/workbenchStandaloneShellReactContext.tsx} +0 -0
|
@@ -32,6 +32,53 @@
|
|
|
32
32
|
border-top: 1px solid var(--vscode-panel-border, var(--color-border));
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
.workbench-bottom-panel__header {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
align-items: stretch;
|
|
39
|
+
gap: 0;
|
|
40
|
+
min-height: 28px;
|
|
41
|
+
border-bottom: 1px solid var(--vscode-panel-border, var(--color-border));
|
|
42
|
+
background: var(--vscode-panel-background, var(--color-surface));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.workbench-bottom-panel__tab {
|
|
46
|
+
appearance: none;
|
|
47
|
+
border: none;
|
|
48
|
+
background: transparent;
|
|
49
|
+
color: var(--color-text-muted);
|
|
50
|
+
font: inherit;
|
|
51
|
+
font-size: 12px;
|
|
52
|
+
padding: 4px 12px;
|
|
53
|
+
cursor: pointer;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.workbench-bottom-panel__tab:hover {
|
|
57
|
+
color: var(--color-text);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.workbench-bottom-panel__tab--active {
|
|
61
|
+
color: var(--color-text);
|
|
62
|
+
box-shadow: inset 0 -2px 0 var(--color-accent, var(--color-primary));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.workbench-bottom-panel__body {
|
|
66
|
+
flex: 1;
|
|
67
|
+
min-height: 0;
|
|
68
|
+
overflow: auto;
|
|
69
|
+
padding: 8px 12px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.workbench-bottom-panel__view {
|
|
73
|
+
min-height: 0;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.workbench-bottom-panel__empty {
|
|
77
|
+
color: var(--color-text-muted);
|
|
78
|
+
font-size: 12px;
|
|
79
|
+
padding: 8px 12px;
|
|
80
|
+
}
|
|
81
|
+
|
|
35
82
|
.ui-workbench-activity-bar__item {
|
|
36
83
|
--ui-button-width: var(--workbench-activity-bar-item-size);
|
|
37
84
|
--ui-button-min-width: 0;
|
|
@@ -70,13 +70,14 @@ export function sortActivityBarItems<T extends { id: string }>(
|
|
|
70
70
|
): T[] {
|
|
71
71
|
const order = itemOrder?.length ? itemOrder : fallbackOrder;
|
|
72
72
|
const orderIndex = new Map(order.map((id, index) => [id, index]));
|
|
73
|
+
const contributionIndex = new Map(items.map((item, index) => [item.id, index]));
|
|
73
74
|
|
|
74
75
|
return [...items].sort((left, right) => {
|
|
75
76
|
const leftIndex = orderIndex.get(left.id);
|
|
76
77
|
const rightIndex = orderIndex.get(right.id);
|
|
77
78
|
|
|
78
79
|
if (leftIndex === undefined && rightIndex === undefined) {
|
|
79
|
-
return left.id.
|
|
80
|
+
return (contributionIndex.get(left.id) ?? 0) - (contributionIndex.get(right.id) ?? 0);
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
if (leftIndex === undefined) return 1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ActivityBar
|
|
1
|
+
export { ActivityBar } from './ActivityBar';
|
|
2
2
|
export {
|
|
3
3
|
hasWorkbenchSidebarViewPlacementDrag,
|
|
4
4
|
readWorkbenchSidebarViewPlacementDrag,
|
|
@@ -64,22 +64,23 @@ export type {
|
|
|
64
64
|
WorkbenchViewEditorEmptyStateSurfaceProps,
|
|
65
65
|
WorkbenchViewEditorProps,
|
|
66
66
|
} from './WorkbenchViewEditor';
|
|
67
|
-
export { WorkbenchEditorTabs } from '
|
|
68
|
-
export type { WorkbenchEditorTabsProps } from '
|
|
67
|
+
export { WorkbenchEditorTabs } from '../editor/WorkbenchEditorTabs';
|
|
68
|
+
export type { WorkbenchEditorTabsProps } from '../editor/WorkbenchEditorTabs';
|
|
69
69
|
export {
|
|
70
70
|
createWorkbenchStandaloneEditorTabCommandContext,
|
|
71
71
|
createWorkbenchStandaloneEditorTabContextMenuItems,
|
|
72
72
|
isWorkbenchEditorTabClosable,
|
|
73
|
-
} from '
|
|
73
|
+
} from '../editor/editorTabContextMenu';
|
|
74
74
|
export type {
|
|
75
75
|
CreateWorkbenchStandaloneEditorTabCommandContextInput,
|
|
76
|
+
CreateWorkbenchStandaloneEditorTabContextMenuItemsInput,
|
|
76
77
|
WorkbenchStandaloneEditorTabLike,
|
|
77
|
-
} from '
|
|
78
|
-
export { useWorkbenchEditorTabContextMenu } from '
|
|
78
|
+
} from '../editor/editorTabContextMenu';
|
|
79
|
+
export { useWorkbenchEditorTabContextMenu } from '../editor/useWorkbenchEditorTabContextMenu';
|
|
79
80
|
export type {
|
|
80
81
|
UseWorkbenchEditorTabContextMenuOptions,
|
|
81
82
|
UseWorkbenchEditorTabContextMenuResult,
|
|
82
|
-
} from '
|
|
83
|
+
} from '../editor/useWorkbenchEditorTabContextMenu';
|
|
83
84
|
export { WorkbenchViewSidebar } from './WorkbenchViewSidebar';
|
|
84
85
|
export type { WorkbenchViewSidebarItem, WorkbenchViewSidebarProps } from './WorkbenchViewSidebar';
|
|
85
86
|
export {
|
|
@@ -90,23 +91,29 @@ export type {
|
|
|
90
91
|
WorkbenchDesktopTitleBarProps,
|
|
91
92
|
WorkbenchDesktopWindowControlsProps,
|
|
92
93
|
} from './WorkbenchDesktopTitleBar';
|
|
93
|
-
export {
|
|
94
|
-
|
|
94
|
+
export {
|
|
95
|
+
WorkbenchPlatformProvider,
|
|
96
|
+
useWorkbenchHostPlatform,
|
|
97
|
+
} from '../chrome/WorkbenchPlatformContext';
|
|
98
|
+
export type { WorkbenchPlatformProviderProps } from '../chrome/WorkbenchPlatformContext';
|
|
95
99
|
export {
|
|
96
100
|
resolveWorkbenchHostPlatform,
|
|
97
101
|
resolveWorkbenchWindowChromeDataAttributes,
|
|
98
|
-
} from '
|
|
99
|
-
export type {
|
|
102
|
+
} from '../chrome/workbenchPlatformChrome';
|
|
103
|
+
export type {
|
|
104
|
+
WorkbenchHostPlatform,
|
|
105
|
+
WorkbenchWindowChromeMode,
|
|
106
|
+
} from '../chrome/workbenchPlatformChrome';
|
|
100
107
|
export {
|
|
101
108
|
WorkbenchWindowChromeControls,
|
|
102
109
|
shouldUseDarwinPlatformChrome,
|
|
103
110
|
} from './WorkbenchWindowChromeControls';
|
|
104
111
|
export type { WorkbenchWindowChromeControlsProps } from './WorkbenchWindowChromeControls';
|
|
105
|
-
export { useWorkbenchModalViewState } from '
|
|
112
|
+
export { useWorkbenchModalViewState } from '../chrome/workbenchModalViewState';
|
|
106
113
|
export type {
|
|
107
114
|
UseWorkbenchModalViewStateOptions,
|
|
108
115
|
WorkbenchModalViewState,
|
|
109
|
-
} from '
|
|
116
|
+
} from '../chrome/workbenchModalViewState';
|
|
110
117
|
export {
|
|
111
118
|
WorkbenchSidebarLayoutProvider,
|
|
112
119
|
useWorkbenchSidebarLayout,
|
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
WorkbenchViewEditorTabItem,
|
|
6
6
|
} from '@workbench-kit/platform';
|
|
7
7
|
|
|
8
|
-
import type { EditorTab } from '
|
|
8
|
+
import type { EditorTab } from '../../primitives/workbench-editor';
|
|
9
9
|
import type { ActivityBarItem } from './ActivityBar';
|
|
10
10
|
import type { WorkbenchShellProps } from './WorkbenchShell';
|
|
11
11
|
import type { WorkbenchViewSidebarItem, WorkbenchViewSidebarProps } from './WorkbenchViewSidebar';
|
|
@@ -24,8 +24,8 @@ export interface CreateWorkbenchShellActivityBarFromViewModelInput<
|
|
|
24
24
|
TViewId extends string,
|
|
25
25
|
TIcon = unknown,
|
|
26
26
|
> {
|
|
27
|
-
readonly activeId?: TViewId
|
|
28
|
-
readonly activityBarProps?: WorkbenchShellActivityBarViewModelProps
|
|
27
|
+
readonly activeId?: TViewId;
|
|
28
|
+
readonly activityBarProps?: WorkbenchShellActivityBarViewModelProps;
|
|
29
29
|
readonly model: WorkbenchViewActivityBarModel<TViewId, TIcon>;
|
|
30
30
|
readonly onSelect?:
|
|
31
31
|
((viewId: TViewId, item: WorkbenchViewActivityBarItem<TViewId, TIcon>) => void) | undefined;
|
|
@@ -6,8 +6,8 @@ import type {
|
|
|
6
6
|
} from '@workbench-kit/contracts';
|
|
7
7
|
import type { ReactNode } from 'react';
|
|
8
8
|
import type { StatusBarSectionModel } from './StatusBar';
|
|
9
|
-
import type { WorkbenchShellCommandContext } from '
|
|
10
|
-
import type { WorkspaceFile } from '
|
|
9
|
+
import type { WorkbenchShellCommandContext } from '../commands/commands';
|
|
10
|
+
import type { WorkspaceFile } from '../workspace';
|
|
11
11
|
|
|
12
12
|
export type WorkbenchTheme = 'light' | 'dark' | (string & {});
|
|
13
13
|
|
|
@@ -99,3 +99,15 @@ export type WorkbenchStandaloneBootstrapEvent<TActivityId extends string = strin
|
|
|
99
99
|
| { type: 'activity-change'; payload: WorkbenchActivityChangeEvent<TActivityId> }
|
|
100
100
|
| { type: 'status-message'; message: string }
|
|
101
101
|
| { type: 'error'; error: Error };
|
|
102
|
+
|
|
103
|
+
export * from './WorkbenchStandaloneShell';
|
|
104
|
+
export {
|
|
105
|
+
createWorkbenchStandaloneShellStateSnapshot,
|
|
106
|
+
useWorkbenchStandaloneShellContext,
|
|
107
|
+
} from './workbenchStandaloneShellReactContext';
|
|
108
|
+
export type {
|
|
109
|
+
WorkbenchStandaloneShellStateChange,
|
|
110
|
+
WorkbenchStandaloneShellStateChangeKind,
|
|
111
|
+
WorkbenchStandaloneShellStateSnapshot,
|
|
112
|
+
} from './workbenchStandaloneShellReactContext';
|
|
113
|
+
export { useWorkbenchStandaloneShellStateSync } from './useWorkbenchStandaloneShellStateSync';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { startTransition, useEffect, useRef, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface UseDeferredWorkbenchMountOptions {
|
|
4
|
-
readonly delayMs?: number
|
|
5
|
-
readonly disabled?: boolean
|
|
6
|
-
readonly initialReady?: boolean
|
|
4
|
+
readonly delayMs?: number;
|
|
5
|
+
readonly disabled?: boolean;
|
|
6
|
+
readonly initialReady?: boolean;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
export function useDeferredWorkbenchMount({
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useLayoutEffect } from 'react';
|
|
2
2
|
|
|
3
|
-
import { applyWorkbenchAppearance, type WorkbenchAppearanceSettings } from '
|
|
3
|
+
import { applyWorkbenchAppearance, type WorkbenchAppearanceSettings } from '../theme/themePresets';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Keeps `document.documentElement` theme attributes aligned with appearance settings.
|
|
@@ -22,7 +22,7 @@ export interface WorkbenchSidebarActionBarDropTarget {
|
|
|
22
22
|
|
|
23
23
|
export interface UseWorkbenchSidebarActionBarDndOptions {
|
|
24
24
|
readonly itemIds: readonly string[];
|
|
25
|
-
readonly onReorder?: (
|
|
25
|
+
readonly onReorder?: (itemIds: string[]) => void;
|
|
26
26
|
readonly orientation?: ActivityBarOrientation;
|
|
27
27
|
readonly placementDraggable?: boolean;
|
|
28
28
|
readonly reorderable?: boolean;
|
|
@@ -20,9 +20,9 @@ export type WorkbenchSidebarViewPlacementDropZoneProps = HTMLAttributes<HTMLElem
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export interface UseWorkbenchSidebarViewPlacementDropZoneOptions {
|
|
23
|
-
readonly acceptViewForDrop?: (
|
|
23
|
+
readonly acceptViewForDrop?: (viewId: string) => boolean;
|
|
24
24
|
readonly onDropView: (viewId: string) => void;
|
|
25
|
-
readonly zoneId?: string
|
|
25
|
+
readonly zoneId?: string;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
function chainDragHandler<E extends DragEvent<HTMLElement>>(
|
package/src/workbench/{workbenchSidebarLayoutContext.ts → shell/workbenchSidebarLayoutContext.ts}
RENAMED
|
@@ -38,9 +38,3 @@ export function toWorkbenchSidebarLayoutContextValue<TViewId extends string>(
|
|
|
38
38
|
): WorkbenchSidebarLayoutContextStore {
|
|
39
39
|
return value as unknown as WorkbenchSidebarLayoutContextStore;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
export function fromWorkbenchSidebarLayoutContextValue<TViewId extends string>(
|
|
43
|
-
value: WorkbenchSidebarLayoutContextStore,
|
|
44
|
-
): WorkbenchSidebarLayoutContextValue<TViewId> {
|
|
45
|
-
return value as unknown as WorkbenchSidebarLayoutContextValue<TViewId>;
|
|
46
|
-
}
|
|
@@ -20,11 +20,11 @@ export interface WorkbenchViewRouteBrowserWindow {
|
|
|
20
20
|
|
|
21
21
|
export interface UseWorkbenchViewRouteStateOptions<TViewId extends string> {
|
|
22
22
|
readonly defaultViewId: TViewId;
|
|
23
|
-
readonly discardedParams?: ReadonlyArray<string
|
|
23
|
+
readonly discardedParams?: ReadonlyArray<string>;
|
|
24
24
|
readonly isViewId: (value: string | null) => value is TViewId;
|
|
25
|
-
readonly routeWindow?: WorkbenchViewRouteBrowserWindow
|
|
26
|
-
readonly tabsParam?: string
|
|
27
|
-
readonly viewParam?: string
|
|
25
|
+
readonly routeWindow?: WorkbenchViewRouteBrowserWindow;
|
|
26
|
+
readonly tabsParam?: string;
|
|
27
|
+
readonly viewParam?: string;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
export interface WorkbenchViewRouteState<
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useEffect, useMemo, type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
2
|
+
import '../chrome/workbench-host.css';
|
|
3
|
+
import '../chrome/workbench-platform-chrome.css';
|
|
4
4
|
|
|
5
|
-
import { WorkbenchPlatformProvider } from '
|
|
5
|
+
import { WorkbenchPlatformProvider } from '../chrome/WorkbenchPlatformContext';
|
|
6
6
|
import {
|
|
7
7
|
applyWorkbenchThemeProviderAttributes,
|
|
8
8
|
type WorkbenchThemeProviderAttributes,
|
|
@@ -11,7 +11,7 @@ import type { ResolvedWorkbenchTheme } from './theme';
|
|
|
11
11
|
import {
|
|
12
12
|
resolveWorkbenchHostPlatform,
|
|
13
13
|
type WorkbenchHostPlatform,
|
|
14
|
-
} from '
|
|
14
|
+
} from '../chrome/workbenchPlatformChrome';
|
|
15
15
|
|
|
16
16
|
export interface WorkbenchThemeProviderProps extends Omit<
|
|
17
17
|
ComponentPropsWithoutRef<'div'>,
|
|
@@ -1,58 +1,43 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
{ id: 'navy', label: 'Deep Navy' },
|
|
19
|
-
{ id: 'purple', label: 'Purple' },
|
|
20
|
-
{ id: 'modern', label: 'Modern Dark' },
|
|
21
|
-
{ id: 'dark-plus', label: 'Dark+' },
|
|
22
|
-
{ id: 'hc-black', label: 'High Contrast Black' },
|
|
23
|
-
] as const satisfies readonly WorkbenchThemePresetManifestEntry[];
|
|
24
|
-
|
|
25
|
-
export type LightThemePresetId = (typeof LIGHT_THEME_PRESET_MANIFEST)[number]['id'];
|
|
26
|
-
export type DarkThemePresetId = (typeof DARK_THEME_PRESET_MANIFEST)[number]['id'];
|
|
27
|
-
export type ThemePresetId = LightThemePresetId | DarkThemePresetId;
|
|
28
|
-
|
|
29
|
-
export const DEFAULT_LIGHT_THEME_PRESET: LightThemePresetId = 'skyblue';
|
|
30
|
-
export const DEFAULT_DARK_THEME_PRESET: DarkThemePresetId = 'purple';
|
|
31
|
-
|
|
32
|
-
export type WorkbenchColorSchemePreference = 'system' | WorkbenchTheme;
|
|
33
|
-
|
|
34
|
-
export const WORKBENCH_COLOR_SCHEME_OPTIONS: WorkbenchThemePresetOption<WorkbenchColorSchemePreference>[] =
|
|
35
|
-
[
|
|
36
|
-
{ id: 'system', label: 'System' },
|
|
37
|
-
{ id: 'light', label: 'Light' },
|
|
38
|
-
{ id: 'dark', label: 'Dark' },
|
|
39
|
-
];
|
|
40
|
-
|
|
41
|
-
export interface WorkbenchThemePresetOption<TId extends string = string> {
|
|
42
|
-
id: TId;
|
|
43
|
-
label: string;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export const LIGHT_THEME_PRESET_OPTIONS: WorkbenchThemePresetOption<LightThemePresetId>[] =
|
|
47
|
-
LIGHT_THEME_PRESET_MANIFEST.map((entry) => ({ id: entry.id, label: entry.label }));
|
|
1
|
+
import {
|
|
2
|
+
DARK_THEME_PRESET_MANIFEST,
|
|
3
|
+
DARK_THEME_PRESET_OPTIONS,
|
|
4
|
+
DEFAULT_DARK_THEME_PRESET,
|
|
5
|
+
DEFAULT_LIGHT_THEME_PRESET,
|
|
6
|
+
LIGHT_THEME_PRESET_MANIFEST,
|
|
7
|
+
LIGHT_THEME_PRESET_OPTIONS,
|
|
8
|
+
WORKBENCH_COLOR_SCHEME_OPTIONS,
|
|
9
|
+
isDarkThemePresetId,
|
|
10
|
+
isLightThemePresetId,
|
|
11
|
+
type DarkThemePresetId,
|
|
12
|
+
type LightThemePresetId,
|
|
13
|
+
type ThemePresetId,
|
|
14
|
+
type WorkbenchColorSchemePreference,
|
|
15
|
+
type WorkbenchThemePresetManifestEntry,
|
|
16
|
+
type WorkbenchThemePresetOption,
|
|
17
|
+
} from '@workbench-kit/contracts/theme-presets';
|
|
48
18
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
19
|
+
import { resolveWorkbenchTheme, type ResolvedWorkbenchTheme } from './theme';
|
|
20
|
+
import { applyWorkbenchShellAttributes } from '../shell/shellPresets';
|
|
21
|
+
|
|
22
|
+
export {
|
|
23
|
+
DARK_THEME_PRESET_MANIFEST,
|
|
24
|
+
DARK_THEME_PRESET_OPTIONS,
|
|
25
|
+
DEFAULT_DARK_THEME_PRESET,
|
|
26
|
+
DEFAULT_LIGHT_THEME_PRESET,
|
|
27
|
+
LIGHT_THEME_PRESET_MANIFEST,
|
|
28
|
+
LIGHT_THEME_PRESET_OPTIONS,
|
|
29
|
+
WORKBENCH_COLOR_SCHEME_OPTIONS,
|
|
30
|
+
isDarkThemePresetId,
|
|
31
|
+
isLightThemePresetId,
|
|
32
|
+
};
|
|
33
|
+
export type {
|
|
34
|
+
DarkThemePresetId,
|
|
35
|
+
LightThemePresetId,
|
|
36
|
+
ThemePresetId,
|
|
37
|
+
WorkbenchColorSchemePreference,
|
|
38
|
+
WorkbenchThemePresetManifestEntry,
|
|
39
|
+
WorkbenchThemePresetOption,
|
|
40
|
+
};
|
|
56
41
|
|
|
57
42
|
export interface WorkbenchThemePresetSelection {
|
|
58
43
|
/** A built-in preset id, or a contributed theme id with a matching `mode`. */
|
|
@@ -60,16 +45,6 @@ export interface WorkbenchThemePresetSelection {
|
|
|
60
45
|
darkPreset: string;
|
|
61
46
|
}
|
|
62
47
|
|
|
63
|
-
export function isLightThemePresetId(
|
|
64
|
-
value: string | null | undefined,
|
|
65
|
-
): value is LightThemePresetId {
|
|
66
|
-
return value != null && LIGHT_THEME_PRESET_IDS.has(value);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function isDarkThemePresetId(value: string | null | undefined): value is DarkThemePresetId {
|
|
70
|
-
return value != null && DARK_THEME_PRESET_IDS.has(value);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
48
|
export function resolveActiveThemePreset(
|
|
74
49
|
resolvedTheme: ResolvedWorkbenchTheme,
|
|
75
50
|
selection: WorkbenchThemePresetSelection,
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Compact density overrides for Workbench command lists. Keep before command-list.css. */
|
|
2
|
+
|
|
3
|
+
.ui-workbench-command-list {
|
|
4
|
+
padding: 0;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.ui-workbench-command-item,
|
|
8
|
+
.ui-workbench-command-item.ui-button {
|
|
9
|
+
--ui-button-height: auto;
|
|
10
|
+
--ui-button-padding: 7px 10px;
|
|
11
|
+
--ui-button-border-radius: 0;
|
|
12
|
+
border-radius: 0;
|
|
13
|
+
height: auto;
|
|
14
|
+
padding: 7px 10px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.ui-workbench-command-group-shell__nav {
|
|
18
|
+
padding: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.ui-workbench-command-group-shell__nav-link {
|
|
22
|
+
border-radius: 0;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.ui-workbench-command-group-shell__content {
|
|
26
|
+
padding: 0;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.ui-workbench-command-group-shell__section {
|
|
30
|
+
padding: 0;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.ui-workbench-command-group-shell__section-header {
|
|
34
|
+
min-height: 28px;
|
|
35
|
+
padding: 4px 10px;
|
|
36
|
+
}
|
|
@@ -3,19 +3,19 @@
|
|
|
3
3
|
.workbench-search-view,
|
|
4
4
|
.workbench-chat-view,
|
|
5
5
|
.workbench-primary-sidebar .ui-sidebar-view,
|
|
6
|
-
.shell-react-
|
|
6
|
+
.shell-react-sidebar-host {
|
|
7
7
|
display: flex;
|
|
8
8
|
flex: 1 1 auto;
|
|
9
9
|
flex-direction: column;
|
|
10
10
|
min-height: 0;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.shell-react-
|
|
13
|
+
.shell-react-sidebar-host > section {
|
|
14
14
|
/* section is semantic only; view host frame carries sidebar flex sizing */
|
|
15
15
|
display: contents;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
.shell-react-
|
|
18
|
+
.shell-react-sidebar-host [data-view-host-id] {
|
|
19
19
|
display: flex;
|
|
20
20
|
flex: 1 1 auto;
|
|
21
21
|
flex-direction: column;
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
createWorkbenchEditorTabListMenuEntries,
|
|
20
20
|
createWorkbenchEditorTabMenuEntries,
|
|
21
21
|
type WorkbenchEditorCommandContext,
|
|
22
|
-
} from '../commands';
|
|
22
|
+
} from '../commands/commands';
|
|
23
23
|
import { fileNameOfPath } from './path';
|
|
24
24
|
import { WorkspaceEditor, type WorkspaceEditorTheme } from './WorkspaceEditor';
|
|
25
25
|
import { WorkspaceFileIcon } from './WorkspaceFileIcon';
|