@workbench-kit/react 0.0.2-prototype.0.2.5 → 0.0.2-prototype.0.2.8
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 +87 -0
- package/package.json +20 -18
- package/src/index.ts +27 -27
- package/src/jdw/JsonCodeEditorPane.tsx +7 -6
- package/src/json-config/JsonConfigWorkbench.tsx +1 -1
- package/src/layout/sidebar/SidebarActionIconBar.tsx +3 -3
- package/src/layout/sidebar/WorkbenchSidebarActions.tsx +1 -1
- package/src/modal/Modal.tsx +55 -25
- package/src/modal/ModalTitlebar.tsx +8 -8
- package/src/modal/useModalFocusTrap.ts +142 -0
- package/src/modal/useModalWindowFrame.ts +2 -2
- package/src/primitives/absolute-box/AbsoluteBox.tsx +4 -4
- 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 +15 -15
- package/src/primitives/catalog-filter-overlay/CatalogFilterOverlay.tsx +2 -2
- package/src/primitives/checkbox/Checkbox.tsx +1 -1
- package/src/primitives/chip/Chip.tsx +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/library-detail-layout/LibraryDetailLayout.tsx +5 -5
- 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/record-media-hero/RecordMediaHero.tsx +6 -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/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 +9 -9
- package/src/primitives/workbench-thumbnail/WorkbenchThumbnail.tsx +4 -4
- package/src/styles.css +1 -2
- package/src/widget-tree/WidgetTreeWorkspaceShell.tsx +2 -2
- 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/{CommandGroupShell.tsx → commands/CommandGroupShell.tsx} +2 -2
- package/src/workbench/{CommandList.tsx → commands/CommandList.tsx} +5 -5
- package/src/workbench/{CommandPalette.tsx → commands/CommandPalette.tsx} +16 -42
- package/src/workbench/{ConfirmationFlow.tsx → commands/ConfirmationFlow.tsx} +5 -5
- package/src/workbench/{command-model.ts → commands/command-model.ts} +5 -1
- package/src/workbench/{commands.ts → commands/commands.ts} +1 -1
- package/src/workbench/{WorkbenchEditorTabs.tsx → editor/WorkbenchEditorTabs.tsx} +1 -1
- package/src/workbench/{editor-tabs-dnd.ts → editor/editor-tabs-dnd.ts} +1 -1
- package/src/workbench/{editorTabContextMenu.ts → editor/editorTabContextMenu.ts} +2 -2
- package/src/workbench/{useEditorTabsStripDnd.ts → editor/useEditorTabsStripDnd.ts} +1 -1
- package/src/workbench/{useWorkbenchEditorTabContextMenu.tsx → editor/useWorkbenchEditorTabContextMenu.tsx} +1 -1
- package/src/workbench/editor-tabs/index.ts +9 -9
- package/src/workbench/index.ts +93 -74
- package/src/workbench/management/ExtensionManagementPanel.tsx +31 -2
- package/src/workbench/management/ExtensionManagementSidebar.tsx +18 -1
- package/src/workbench/management/IntegrationsShell.tsx +1 -1
- package/src/workbench/management/WorkbenchDialogFrame.tsx +2 -2
- package/src/workbench/management/extension-install-approval.ts +72 -0
- package/src/workbench/management/index.ts +7 -0
- package/src/workbench/management/types.ts +14 -1
- 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/{ActivityBar.tsx → shell/ActivityBar.tsx} +8 -8
- 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} +18 -18
- 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} +5 -5
- package/src/workbench/{WorkbenchShellTitleBarLayoutControls.tsx → shell/WorkbenchShellTitleBarLayoutControls.tsx} +12 -12
- package/src/workbench/{WorkbenchStandaloneShell.tsx → shell/WorkbenchStandaloneShell.tsx} +4 -4
- 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.ts → shell/shell.ts} +18 -12
- package/src/workbench/{shellViewModel.ts → shell/shellViewModel.ts} +3 -3
- package/src/workbench/{standalone.ts → shell/standalone.ts} +2 -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/{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} +2 -2
- package/src/workbench/workspace/WorkspaceEditorPanel.tsx +1 -1
- package/src/workbench/workspace/workspaceJsonDiagnostics.ts +6 -5
- package/src/workbench/jdw/jdw-editors.css +0 -4
- package/src/workbench/jdw/jdw.css +0 -2
- 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/{ShortcutCommandBridge.tsx → commands/ShortcutCommandBridge.tsx} +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/{activityBarOrder.ts → shell/activityBarOrder.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/{workbenchSidebarLayoutContext.ts → shell/workbenchSidebarLayoutContext.ts} +0 -0
- /package/src/workbench/{workbenchStandaloneShellReactContext.tsx → shell/workbenchStandaloneShellReactContext.tsx} +0 -0
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
SideBarViewFrame,
|
|
7
7
|
type SideBarListProps,
|
|
8
8
|
type SideBarViewFrameProps,
|
|
9
|
-
} from '
|
|
10
|
-
import { cx } from '
|
|
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
|
|
13
|
+
readonly disabled?: boolean;
|
|
14
14
|
readonly icon: TIcon;
|
|
15
15
|
readonly id: TViewId;
|
|
16
16
|
readonly label: string;
|
|
17
|
-
readonly title?: string
|
|
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
|
|
26
|
-
readonly itemDataAttributeName?: string
|
|
25
|
+
readonly activeId?: TViewId;
|
|
26
|
+
readonly itemDataAttributeName?: string;
|
|
27
27
|
readonly items: ReadonlyArray<WorkbenchViewSidebarItem<TViewId, TIcon>>;
|
|
28
|
-
readonly listProps?: Omit<SideBarListProps, 'children'
|
|
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;
|
package/src/workbench/{WorkbenchWindowChromeControls.tsx → shell/WorkbenchWindowChromeControls.tsx}
RENAMED
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import { cx } from '
|
|
4
|
-
import { useWorkbenchHostPlatform } from '
|
|
5
|
-
import type {
|
|
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
|
|
9
|
-
closeLabel?: string
|
|
10
|
-
isMaximized?: boolean
|
|
11
|
-
maximizeLabel?: string
|
|
12
|
-
minimizeLabel?: string
|
|
11
|
+
chrome?: WorkbenchWindowChromeMode;
|
|
12
|
+
closeLabel?: string;
|
|
13
|
+
isMaximized?: boolean;
|
|
14
|
+
maximizeLabel?: string;
|
|
15
|
+
minimizeLabel?: string;
|
|
13
16
|
onClose: () => void;
|
|
14
|
-
onMinimize?: (
|
|
15
|
-
onToggleMaximized?: (
|
|
16
|
-
restoreLabel?: string
|
|
17
|
-
showMaximize?: boolean
|
|
18
|
-
showMinimize?: boolean
|
|
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?: (
|
|
92
|
-
onToggleMaximized?: (
|
|
94
|
+
onMinimize?: () => void;
|
|
95
|
+
onToggleMaximized?: () => void;
|
|
93
96
|
restoreLabel: string;
|
|
94
97
|
showMaximize: boolean;
|
|
95
98
|
showMinimize: boolean;
|
|
@@ -64,22 +64,22 @@ 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
76
|
WorkbenchStandaloneEditorTabLike,
|
|
77
|
-
} from '
|
|
78
|
-
export { useWorkbenchEditorTabContextMenu } from '
|
|
77
|
+
} from '../editor/editorTabContextMenu';
|
|
78
|
+
export { useWorkbenchEditorTabContextMenu } from '../editor/useWorkbenchEditorTabContextMenu';
|
|
79
79
|
export type {
|
|
80
80
|
UseWorkbenchEditorTabContextMenuOptions,
|
|
81
81
|
UseWorkbenchEditorTabContextMenuResult,
|
|
82
|
-
} from '
|
|
82
|
+
} from '../editor/useWorkbenchEditorTabContextMenu';
|
|
83
83
|
export { WorkbenchViewSidebar } from './WorkbenchViewSidebar';
|
|
84
84
|
export type { WorkbenchViewSidebarItem, WorkbenchViewSidebarProps } from './WorkbenchViewSidebar';
|
|
85
85
|
export {
|
|
@@ -90,23 +90,29 @@ export type {
|
|
|
90
90
|
WorkbenchDesktopTitleBarProps,
|
|
91
91
|
WorkbenchDesktopWindowControlsProps,
|
|
92
92
|
} from './WorkbenchDesktopTitleBar';
|
|
93
|
-
export {
|
|
94
|
-
|
|
93
|
+
export {
|
|
94
|
+
WorkbenchPlatformProvider,
|
|
95
|
+
useWorkbenchHostPlatform,
|
|
96
|
+
} from '../chrome/WorkbenchPlatformContext';
|
|
97
|
+
export type { WorkbenchPlatformProviderProps } from '../chrome/WorkbenchPlatformContext';
|
|
95
98
|
export {
|
|
96
99
|
resolveWorkbenchHostPlatform,
|
|
97
100
|
resolveWorkbenchWindowChromeDataAttributes,
|
|
98
|
-
} from '
|
|
99
|
-
export type {
|
|
101
|
+
} from '../chrome/workbenchPlatformChrome';
|
|
102
|
+
export type {
|
|
103
|
+
WorkbenchHostPlatform,
|
|
104
|
+
WorkbenchWindowChromeMode,
|
|
105
|
+
} from '../chrome/workbenchPlatformChrome';
|
|
100
106
|
export {
|
|
101
107
|
WorkbenchWindowChromeControls,
|
|
102
108
|
shouldUseDarwinPlatformChrome,
|
|
103
109
|
} from './WorkbenchWindowChromeControls';
|
|
104
110
|
export type { WorkbenchWindowChromeControlsProps } from './WorkbenchWindowChromeControls';
|
|
105
|
-
export { useWorkbenchModalViewState } from '
|
|
111
|
+
export { useWorkbenchModalViewState } from '../chrome/workbenchModalViewState';
|
|
106
112
|
export type {
|
|
107
113
|
UseWorkbenchModalViewStateOptions,
|
|
108
114
|
WorkbenchModalViewState,
|
|
109
|
-
} from '
|
|
115
|
+
} from '../chrome/workbenchModalViewState';
|
|
110
116
|
export {
|
|
111
117
|
WorkbenchSidebarLayoutProvider,
|
|
112
118
|
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
|
|
|
@@ -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>>(
|
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import { resolveWorkbenchTheme, type ResolvedWorkbenchTheme } from './theme';
|
|
2
|
-
import type { WorkbenchTheme } from '
|
|
3
|
-
import { applyWorkbenchShellAttributes } from '
|
|
2
|
+
import type { WorkbenchTheme } from '../shell/standalone';
|
|
3
|
+
import { applyWorkbenchShellAttributes } from '../shell/shellPresets';
|
|
4
4
|
|
|
5
5
|
export interface WorkbenchThemePresetManifestEntry<TId extends string = string> {
|
|
6
6
|
readonly id: TId;
|
|
@@ -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';
|
|
@@ -68,11 +68,12 @@ export function configureWorkspaceEditorJsonDiagnostics(
|
|
|
68
68
|
const schemas = getWorkspaceEditorJsonDiagnosticsSchemas(file);
|
|
69
69
|
if (schemas.length === 0) return;
|
|
70
70
|
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
71
|
+
const jsonLanguage = monacoInstance.languages.json as unknown as
|
|
72
|
+
| {
|
|
73
|
+
jsonDefaults?: { setDiagnosticsOptions: (options: unknown) => void };
|
|
74
|
+
}
|
|
75
|
+
| undefined;
|
|
76
|
+
const jsonDefaults = jsonLanguage?.jsonDefaults;
|
|
76
77
|
if (!jsonDefaults) return;
|
|
77
78
|
|
|
78
79
|
jsonDefaults.setDiagnosticsOptions({
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/workbench/{useWorkbenchSidebarLayout.tsx → shell/useWorkbenchSidebarLayout.tsx}
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/workbench/{workbenchSidebarLayoutContext.ts → shell/workbenchSidebarLayoutContext.ts}
RENAMED
|
File without changes
|
|
File without changes
|