@workbench-kit/react 0.0.2-prototype.0.2.2 → 0.0.2-prototype.0.2.20
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 +125 -0
- package/package.json +27 -20
- package/src/index.ts +60 -29
- 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/json-config/JsonConfigWorkbench.tsx +1 -1
- package/src/layout/index.ts +11 -0
- 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 +112 -5
- package/src/overlay/context-menu.css +4 -2
- package/src/overlay/measureAnchoredOverlayPanel.ts +4 -6
- package/src/overlay/usePointerPassthroughRegion.ts +2 -0
- 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/index.ts +5 -0
- package/src/primitives/library-detail-layout/LibraryDetailLayout.tsx +123 -9
- package/src/primitives/library-detail-layout/index.ts +5 -0
- 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/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/styles.css +1 -2
- package/src/test-utils/workbenchMonacoMock.tsx +20 -0
- 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/WidgetTreeCanvasPreview.tsx +1 -4
- 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/{ShortcutCommandBridge.tsx → commands/ShortcutCommandBridge.tsx} +1 -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} +1 -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} +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 +110 -74
- package/src/workbench/management/ExtensionManagementPanel.tsx +32 -36
- package/src/workbench/management/ExtensionManagementSidebar.tsx +19 -35
- 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 +2 -5
- 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 +14 -0
- package/src/workbench/management/management.css +28 -0
- package/src/workbench/management/types.ts +14 -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/settings/StructuredDataForm.tsx +1 -4
- package/src/workbench/settings/structuredDataFormModel.ts +2 -1
- 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} +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} +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/activity-bar.css +47 -0
- 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} +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/{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} +3 -2
- package/src/workbench/views/view-hosts.css +3 -3
- package/src/workbench/workspace/WorkspaceEditorPanel.tsx +1 -1
- package/src/workbench/workspace/WorkspaceExplorer.tsx +104 -3
- package/src/workbench/workspace/workspaceExplorerKeyboard.ts +109 -0
- 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/{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
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
export { normalizeEditorTabReorderIndex } from '../editor-tabs-dnd';
|
|
1
|
+
export { normalizeEditorTabReorderIndex } from '../editor/editor-tabs-dnd';
|
|
2
2
|
export {
|
|
3
3
|
createWorkbenchStandaloneEditorTabCommandContext,
|
|
4
4
|
createWorkbenchStandaloneEditorTabContextMenuItems,
|
|
5
5
|
isWorkbenchEditorTabClosable,
|
|
6
|
-
} from '../editorTabContextMenu';
|
|
6
|
+
} from '../editor/editorTabContextMenu';
|
|
7
7
|
export type {
|
|
8
8
|
CreateWorkbenchStandaloneEditorTabCommandContextInput,
|
|
9
9
|
WorkbenchStandaloneEditorTabLike,
|
|
10
|
-
} from '../editorTabContextMenu';
|
|
11
|
-
export { useEditorTabsStripDnd } from '../useEditorTabsStripDnd';
|
|
10
|
+
} from '../editor/editorTabContextMenu';
|
|
11
|
+
export { useEditorTabsStripDnd } from '../editor/useEditorTabsStripDnd';
|
|
12
12
|
export type {
|
|
13
13
|
UseEditorTabsStripDndOptions,
|
|
14
14
|
UseEditorTabsStripDndResult,
|
|
15
|
-
} from '../useEditorTabsStripDnd';
|
|
16
|
-
export { useWorkbenchEditorTabContextMenu } from '../useWorkbenchEditorTabContextMenu';
|
|
15
|
+
} from '../editor/useEditorTabsStripDnd';
|
|
16
|
+
export { useWorkbenchEditorTabContextMenu } from '../editor/useWorkbenchEditorTabContextMenu';
|
|
17
17
|
export type {
|
|
18
18
|
UseWorkbenchEditorTabContextMenuOptions,
|
|
19
19
|
UseWorkbenchEditorTabContextMenuResult,
|
|
20
|
-
} from '../useWorkbenchEditorTabContextMenu';
|
|
21
|
-
export { WorkbenchEditorTabs } from '../WorkbenchEditorTabs';
|
|
22
|
-
export type { WorkbenchEditorTabsProps } from '../WorkbenchEditorTabs';
|
|
20
|
+
} from '../editor/useWorkbenchEditorTabContextMenu';
|
|
21
|
+
export { WorkbenchEditorTabs } from '../editor/WorkbenchEditorTabs';
|
|
22
|
+
export type { WorkbenchEditorTabsProps } from '../editor/WorkbenchEditorTabs';
|
package/src/workbench/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { ActivityBar } from './ActivityBar';
|
|
2
|
-
export type { ActivityBarItem, ActivityBarProps } from './ActivityBar';
|
|
1
|
+
export { ActivityBar } from './shell/ActivityBar';
|
|
2
|
+
export type { ActivityBarItem, ActivityBarProps } from './shell/ActivityBar';
|
|
3
3
|
export { createStringDragMime, createTypedDragMime } from '../utils/dragMime';
|
|
4
4
|
export type { TypedDragMime, TypedDragMimeOptions } from '../utils/dragMime';
|
|
5
5
|
export {
|
|
@@ -11,13 +11,13 @@ export {
|
|
|
11
11
|
readEditorTabDragPayload,
|
|
12
12
|
resolveEditorTabDropTarget,
|
|
13
13
|
resolveEditorTabStripDropTarget,
|
|
14
|
-
} from './editor-tabs-dnd';
|
|
15
|
-
export type { EditorTabDragPayload, EditorTabDropTarget } from './editor-tabs-dnd';
|
|
16
|
-
export { useEditorTabsStripDnd } from './useEditorTabsStripDnd';
|
|
14
|
+
} from './editor/editor-tabs-dnd';
|
|
15
|
+
export type { EditorTabDragPayload, EditorTabDropTarget } from './editor/editor-tabs-dnd';
|
|
16
|
+
export { useEditorTabsStripDnd } from './editor/useEditorTabsStripDnd';
|
|
17
17
|
export type {
|
|
18
18
|
UseEditorTabsStripDndOptions,
|
|
19
19
|
UseEditorTabsStripDndResult,
|
|
20
|
-
} from './useEditorTabsStripDnd';
|
|
20
|
+
} from './editor/useEditorTabsStripDnd';
|
|
21
21
|
export {
|
|
22
22
|
WorkbenchArtifactModeControls,
|
|
23
23
|
WorkbenchArtifactPreview,
|
|
@@ -28,7 +28,7 @@ export {
|
|
|
28
28
|
getWorkbenchPreviewRenderer,
|
|
29
29
|
getWorkbenchPreviewRendererMatch,
|
|
30
30
|
selectWorkbenchPreviewRenderer,
|
|
31
|
-
} from './ArtifactShell';
|
|
31
|
+
} from './shell/ArtifactShell';
|
|
32
32
|
export type {
|
|
33
33
|
WorkbenchArtifactDescriptor,
|
|
34
34
|
WorkbenchArtifactMode,
|
|
@@ -41,7 +41,7 @@ export type {
|
|
|
41
41
|
WorkbenchPreviewRendererContext,
|
|
42
42
|
WorkbenchPreviewRendererMatch,
|
|
43
43
|
WorkbenchPreviewRendererMatchReason,
|
|
44
|
-
} from './ArtifactShell';
|
|
44
|
+
} from './shell/ArtifactShell';
|
|
45
45
|
export {
|
|
46
46
|
WorkbenchCommandGroupShell,
|
|
47
47
|
WorkbenchCommandList,
|
|
@@ -58,9 +58,23 @@ export {
|
|
|
58
58
|
isWorkbenchCommandExecutionPolicy,
|
|
59
59
|
isWorkbenchCommandRunnable,
|
|
60
60
|
resolveWorkbenchCommandExecutionPolicy,
|
|
61
|
-
} from './CommandPalette';
|
|
62
|
-
export {
|
|
63
|
-
|
|
61
|
+
} from './commands/CommandPalette';
|
|
62
|
+
export {
|
|
63
|
+
DEFAULT_QUICK_OPEN_SEARCH_DEBOUNCE_MS,
|
|
64
|
+
WORKSPACE_FILES_QUICK_OPEN_PROVIDER_ID,
|
|
65
|
+
WorkbenchQuickOpen,
|
|
66
|
+
createWorkspaceFilesQuickOpenProvider,
|
|
67
|
+
getNextQuickOpenItemIndex,
|
|
68
|
+
isQuickOpenItemSelectable,
|
|
69
|
+
resolveQuickOpenItemPath,
|
|
70
|
+
} from './commands/WorkbenchQuickOpen';
|
|
71
|
+
export { WorkbenchMarkdownPreview } from './markdown/MarkdownPreview';
|
|
72
|
+
export type { WorkbenchMarkdownPreviewProps } from './markdown/MarkdownPreview';
|
|
73
|
+
export { sanitizeMarkdownHref } from './markdown/sanitizeMarkdownHref';
|
|
74
|
+
export {
|
|
75
|
+
workbenchMarkdownRemarkPlugins,
|
|
76
|
+
workbenchMarkdownRehypePlugins,
|
|
77
|
+
} from './markdown/markdownRemarkPlugins';
|
|
64
78
|
export {
|
|
65
79
|
ChatCommandProposalCard,
|
|
66
80
|
ChatConversationBar,
|
|
@@ -81,6 +95,7 @@ export type {
|
|
|
81
95
|
ChatHistoryMenuProps,
|
|
82
96
|
ChatPanelProps,
|
|
83
97
|
ChatPhasedRunProgressAction,
|
|
98
|
+
ChatPhasedRunProgressLabels,
|
|
84
99
|
ChatPhasedRunProgressProps,
|
|
85
100
|
ChatRenameDialogProps,
|
|
86
101
|
ChatRunPhase,
|
|
@@ -101,17 +116,17 @@ export {
|
|
|
101
116
|
isWorkbenchSaveShortcutEvent,
|
|
102
117
|
useWorkbenchNativeContextMenuGuard,
|
|
103
118
|
useWorkbenchNativeSaveGuard,
|
|
104
|
-
} from './keyboard';
|
|
105
|
-
export { resolveWorkbenchTheme, useResolvedWorkbenchTheme } from './theme';
|
|
106
|
-
export type { ResolvedWorkbenchTheme } from './theme';
|
|
107
|
-
export { useDeferredWorkbenchMount } from './useDeferredWorkbenchMount';
|
|
108
|
-
export type { UseDeferredWorkbenchMountOptions } from './useDeferredWorkbenchMount';
|
|
119
|
+
} from './commands/keyboard';
|
|
120
|
+
export { resolveWorkbenchTheme, useResolvedWorkbenchTheme } from './theme/theme';
|
|
121
|
+
export type { ResolvedWorkbenchTheme } from './theme/theme';
|
|
122
|
+
export { useDeferredWorkbenchMount } from './shell/useDeferredWorkbenchMount';
|
|
123
|
+
export type { UseDeferredWorkbenchMountOptions } from './shell/useDeferredWorkbenchMount';
|
|
109
124
|
export {
|
|
110
125
|
DEFAULT_WORKBENCH_HARD_RESET_CONFIRM_MESSAGE,
|
|
111
126
|
DEFAULT_WORKBENCH_STORAGE_PREFIX,
|
|
112
127
|
performWorkbenchHardReset,
|
|
113
|
-
} from './hardReset';
|
|
114
|
-
export type { WorkbenchHardResetOptions } from './hardReset';
|
|
128
|
+
} from './shell/hardReset';
|
|
129
|
+
export type { WorkbenchHardResetOptions } from './shell/hardReset';
|
|
115
130
|
export {
|
|
116
131
|
applyWorkbenchAppearance,
|
|
117
132
|
applyWorkbenchThemeAttributes,
|
|
@@ -127,11 +142,11 @@ export {
|
|
|
127
142
|
resolveActiveThemePreset,
|
|
128
143
|
resolveWorkbenchThemeProviderAttributes,
|
|
129
144
|
WORKBENCH_COLOR_SCHEME_OPTIONS,
|
|
130
|
-
} from './themePresets';
|
|
145
|
+
} from './theme/themePresets';
|
|
131
146
|
export {
|
|
132
147
|
WORKBENCH_APPEARANCE_FIELD_DESCRIPTIONS,
|
|
133
148
|
WORKBENCH_APPEARANCE_FIELD_LABELS,
|
|
134
|
-
} from './appearanceLabels';
|
|
149
|
+
} from './shell/appearanceLabels';
|
|
135
150
|
export type {
|
|
136
151
|
DarkThemePresetId,
|
|
137
152
|
LightThemePresetId,
|
|
@@ -144,34 +159,40 @@ export type {
|
|
|
144
159
|
WorkbenchThemePresetOption,
|
|
145
160
|
WorkbenchThemePresetManifestEntry,
|
|
146
161
|
WorkbenchThemePresetSelection,
|
|
147
|
-
} from './themePresets';
|
|
162
|
+
} from './theme/themePresets';
|
|
148
163
|
export {
|
|
149
164
|
applyWorkbenchShellAttributes,
|
|
150
165
|
DEFAULT_SHELL_PRESET,
|
|
151
166
|
isShellPresetId,
|
|
152
167
|
SHELL_PRESET_MANIFEST,
|
|
153
168
|
SHELL_PRESET_OPTIONS,
|
|
154
|
-
} from './shellPresets';
|
|
169
|
+
} from './shell/shellPresets';
|
|
155
170
|
export type {
|
|
156
171
|
ShellPresetId,
|
|
157
172
|
WorkbenchShellPresetManifestEntry,
|
|
158
173
|
WorkbenchShellPresetOption,
|
|
159
|
-
} from './shellPresets';
|
|
160
|
-
export { WorkbenchThemeProvider } from './WorkbenchThemeProvider';
|
|
161
|
-
export type { WorkbenchThemeProviderProps } from './WorkbenchThemeProvider';
|
|
162
|
-
export { useWorkbenchAppearanceDocumentSync } from './useWorkbenchAppearanceDocumentSync';
|
|
163
|
-
export {
|
|
164
|
-
|
|
174
|
+
} from './shell/shellPresets';
|
|
175
|
+
export { WorkbenchThemeProvider } from './theme/WorkbenchThemeProvider';
|
|
176
|
+
export type { WorkbenchThemeProviderProps } from './theme/WorkbenchThemeProvider';
|
|
177
|
+
export { useWorkbenchAppearanceDocumentSync } from './shell/useWorkbenchAppearanceDocumentSync';
|
|
178
|
+
export {
|
|
179
|
+
WorkbenchPlatformProvider,
|
|
180
|
+
useWorkbenchHostPlatform,
|
|
181
|
+
} from './chrome/WorkbenchPlatformContext';
|
|
182
|
+
export type { WorkbenchPlatformProviderProps } from './chrome/WorkbenchPlatformContext';
|
|
165
183
|
export {
|
|
166
184
|
resolveWorkbenchHostPlatform,
|
|
167
185
|
resolveWorkbenchWindowChromeDataAttributes,
|
|
168
|
-
} from './workbenchPlatformChrome';
|
|
169
|
-
export type {
|
|
186
|
+
} from './chrome/workbenchPlatformChrome';
|
|
187
|
+
export type {
|
|
188
|
+
WorkbenchHostPlatform,
|
|
189
|
+
WorkbenchWindowChromeMode,
|
|
190
|
+
} from './chrome/workbenchPlatformChrome';
|
|
170
191
|
export {
|
|
171
192
|
WorkbenchWindowChromeControls,
|
|
172
193
|
shouldUseDarwinPlatformChrome,
|
|
173
|
-
} from './WorkbenchWindowChromeControls';
|
|
174
|
-
export type { WorkbenchWindowChromeControlsProps } from './WorkbenchWindowChromeControls';
|
|
194
|
+
} from './shell/WorkbenchWindowChromeControls';
|
|
195
|
+
export type { WorkbenchWindowChromeControlsProps } from './shell/WorkbenchWindowChromeControls';
|
|
175
196
|
export {
|
|
176
197
|
WorkbenchShortcutCommandBridge,
|
|
177
198
|
getWorkbenchShortcutCommandBindings,
|
|
@@ -179,7 +200,7 @@ export {
|
|
|
179
200
|
matchesWorkbenchShortcut,
|
|
180
201
|
runWorkbenchShortcutCommand,
|
|
181
202
|
useWorkbenchShortcutCommands,
|
|
182
|
-
} from './ShortcutCommandBridge';
|
|
203
|
+
} from './commands/ShortcutCommandBridge';
|
|
183
204
|
export type { SlashCommandParseResult } from './chat/slashCommand';
|
|
184
205
|
export type {
|
|
185
206
|
WorkbenchCommandDescriptor,
|
|
@@ -201,8 +222,16 @@ export type {
|
|
|
201
222
|
WorkbenchCommandSideEffect,
|
|
202
223
|
WorkbenchCommandStatus,
|
|
203
224
|
WorkbenchCommandSuggestProps,
|
|
204
|
-
} from './CommandPalette';
|
|
205
|
-
export type { ResolveWorkbenchCommandExecutionPolicyInput } from './CommandPalette';
|
|
225
|
+
} from './commands/CommandPalette';
|
|
226
|
+
export type { ResolveWorkbenchCommandExecutionPolicyInput } from './commands/CommandPalette';
|
|
227
|
+
export type {
|
|
228
|
+
CreateWorkspaceFilesQuickOpenProviderOptions,
|
|
229
|
+
QuickOpenItem,
|
|
230
|
+
QuickOpenProvider,
|
|
231
|
+
QuickOpenSearchContext,
|
|
232
|
+
QuickOpenSelectContext,
|
|
233
|
+
WorkbenchQuickOpenProps,
|
|
234
|
+
} from './commands/WorkbenchQuickOpen';
|
|
206
235
|
export type {
|
|
207
236
|
UseWorkbenchShortcutCommandsOptions,
|
|
208
237
|
WorkbenchShortcutCommandBinding,
|
|
@@ -214,7 +243,7 @@ export type {
|
|
|
214
243
|
WorkbenchShortcutEventLike,
|
|
215
244
|
WorkbenchShortcutMatchInput,
|
|
216
245
|
WorkbenchShortcutPlatform,
|
|
217
|
-
} from './ShortcutCommandBridge';
|
|
246
|
+
} from './commands/ShortcutCommandBridge';
|
|
218
247
|
export {
|
|
219
248
|
WorkbenchConfirmationFlow,
|
|
220
249
|
getWorkbenchConfirmationButtonVariant,
|
|
@@ -223,7 +252,7 @@ export {
|
|
|
223
252
|
getWorkbenchConfirmationStatus,
|
|
224
253
|
getWorkbenchConfirmationVariant,
|
|
225
254
|
isWorkbenchConfirmationActionDisabled,
|
|
226
|
-
} from './ConfirmationFlow';
|
|
255
|
+
} from './commands/ConfirmationFlow';
|
|
227
256
|
export type {
|
|
228
257
|
WorkbenchConfirmationAction,
|
|
229
258
|
WorkbenchConfirmationCancelContext,
|
|
@@ -234,7 +263,7 @@ export type {
|
|
|
234
263
|
WorkbenchConfirmationReason,
|
|
235
264
|
WorkbenchConfirmationSideEffect,
|
|
236
265
|
WorkbenchConfirmationVariant,
|
|
237
|
-
} from './ConfirmationFlow';
|
|
266
|
+
} from './commands/ConfirmationFlow';
|
|
238
267
|
export {
|
|
239
268
|
WorkbenchAuthGate,
|
|
240
269
|
WorkbenchLoginBrandMark,
|
|
@@ -306,7 +335,7 @@ export {
|
|
|
306
335
|
createWorkbenchWorkspaceFolderMenuEntries,
|
|
307
336
|
createWorkbenchWorkspaceTargetMenuEntries,
|
|
308
337
|
getWorkbenchShowActivityCommandId,
|
|
309
|
-
} from './commands';
|
|
338
|
+
} from './commands/commands';
|
|
310
339
|
export type {
|
|
311
340
|
WorkbenchEditorCommandContext,
|
|
312
341
|
WorkbenchSearchResultCommandContext,
|
|
@@ -315,18 +344,18 @@ export type {
|
|
|
315
344
|
WorkbenchShellCommandPresetOptions,
|
|
316
345
|
WorkbenchCommandSurface,
|
|
317
346
|
WorkbenchWorkspaceCommandContext,
|
|
318
|
-
} from './commands';
|
|
347
|
+
} from './commands/commands';
|
|
319
348
|
export {
|
|
320
349
|
initializeWorkbenchShellState,
|
|
321
350
|
useWorkbenchShellState,
|
|
322
351
|
workbenchShellStateReducer,
|
|
323
|
-
} from './shellState';
|
|
352
|
+
} from './shell/shellState';
|
|
324
353
|
export type {
|
|
325
354
|
UseWorkbenchShellStateResult,
|
|
326
355
|
WorkbenchShellAction,
|
|
327
356
|
WorkbenchShellInitialState,
|
|
328
357
|
WorkbenchShellState,
|
|
329
|
-
} from './shellState';
|
|
358
|
+
} from './shell/shellState';
|
|
330
359
|
export {
|
|
331
360
|
getWorkbenchStatusDescriptor,
|
|
332
361
|
getWorkbenchStatusLabel,
|
|
@@ -336,11 +365,15 @@ export {
|
|
|
336
365
|
isWorkbenchStatusDisabled,
|
|
337
366
|
isWorkbenchStatusUnavailable,
|
|
338
367
|
workbenchStatusFromLifecycleStatus,
|
|
339
|
-
} from './status';
|
|
340
|
-
export type {
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
368
|
+
} from './shell/status';
|
|
369
|
+
export type {
|
|
370
|
+
WorkbenchStatus,
|
|
371
|
+
WorkbenchStatusDescriptor,
|
|
372
|
+
WorkbenchStatusVariant,
|
|
373
|
+
} from './shell/status';
|
|
374
|
+
export { SplitView } from './shell/SplitView';
|
|
375
|
+
export type { SplitViewLayoutMode, SplitViewProps } from './shell/SplitView';
|
|
376
|
+
export { StatusBar, StatusBarItem, StatusBarSection } from './shell/StatusBar';
|
|
344
377
|
export type {
|
|
345
378
|
StatusBarItemModel,
|
|
346
379
|
StatusBarItemProps,
|
|
@@ -348,7 +381,7 @@ export type {
|
|
|
348
381
|
StatusBarSectionAlign,
|
|
349
382
|
StatusBarSectionModel,
|
|
350
383
|
StatusBarSectionProps,
|
|
351
|
-
} from './StatusBar';
|
|
384
|
+
} from './shell/StatusBar';
|
|
352
385
|
export {
|
|
353
386
|
WorkbenchTimeline,
|
|
354
387
|
WorkbenchTimelineItem,
|
|
@@ -357,7 +390,7 @@ export {
|
|
|
357
390
|
getWorkbenchTimelineEventLabel,
|
|
358
391
|
getWorkbenchTimelineEventStatus,
|
|
359
392
|
getWorkbenchTimelineMetadataEntries,
|
|
360
|
-
} from './Timeline';
|
|
393
|
+
} from './shell/Timeline';
|
|
361
394
|
export type {
|
|
362
395
|
WorkbenchTimelineEvent,
|
|
363
396
|
WorkbenchTimelineEventKind,
|
|
@@ -369,7 +402,7 @@ export type {
|
|
|
369
402
|
WorkbenchTimelineRenderMetadata,
|
|
370
403
|
WorkbenchTimelineRenderPayload,
|
|
371
404
|
WorkbenchTimelineVariant,
|
|
372
|
-
} from './Timeline';
|
|
405
|
+
} from './shell/Timeline';
|
|
373
406
|
export {
|
|
374
407
|
WorkbenchPanelRegion,
|
|
375
408
|
WorkbenchNavigationPanel,
|
|
@@ -552,44 +585,47 @@ export {
|
|
|
552
585
|
stringifyWorkbenchStructuredDataSchemaFieldValue,
|
|
553
586
|
validateWorkbenchStructuredDataSchemaFieldValue,
|
|
554
587
|
} from './settings';
|
|
555
|
-
export { WorkbenchShell } from './WorkbenchShell';
|
|
556
|
-
export type { WorkbenchShellProps } from './WorkbenchShell';
|
|
557
|
-
export { WorkbenchViewEditor } from './WorkbenchViewEditor';
|
|
588
|
+
export { WorkbenchShell } from './shell/WorkbenchShell';
|
|
589
|
+
export type { WorkbenchShellProps } from './shell/WorkbenchShell';
|
|
590
|
+
export { WorkbenchViewEditor } from './shell/WorkbenchViewEditor';
|
|
558
591
|
export type {
|
|
559
592
|
WorkbenchViewEditorDataAttributes,
|
|
560
593
|
WorkbenchViewEditorEmptyState,
|
|
561
594
|
WorkbenchViewEditorEmptyStateProps,
|
|
562
595
|
WorkbenchViewEditorEmptyStateSurfaceProps,
|
|
563
596
|
WorkbenchViewEditorProps,
|
|
564
|
-
} from './WorkbenchViewEditor';
|
|
565
|
-
export { WorkbenchEditorTabs } from './WorkbenchEditorTabs';
|
|
566
|
-
export type { WorkbenchEditorTabsProps } from './WorkbenchEditorTabs';
|
|
597
|
+
} from './shell/WorkbenchViewEditor';
|
|
598
|
+
export { WorkbenchEditorTabs } from './editor/WorkbenchEditorTabs';
|
|
599
|
+
export type { WorkbenchEditorTabsProps } from './editor/WorkbenchEditorTabs';
|
|
567
600
|
export {
|
|
568
601
|
createWorkbenchStandaloneEditorTabCommandContext,
|
|
569
602
|
createWorkbenchStandaloneEditorTabContextMenuItems,
|
|
570
603
|
isWorkbenchEditorTabClosable,
|
|
571
|
-
} from './editorTabContextMenu';
|
|
604
|
+
} from './editor/editorTabContextMenu';
|
|
572
605
|
export type {
|
|
573
606
|
CreateWorkbenchStandaloneEditorTabCommandContextInput,
|
|
574
607
|
WorkbenchStandaloneEditorTabLike,
|
|
575
|
-
} from './editorTabContextMenu';
|
|
576
|
-
export { useWorkbenchEditorTabContextMenu } from './useWorkbenchEditorTabContextMenu';
|
|
608
|
+
} from './editor/editorTabContextMenu';
|
|
609
|
+
export { useWorkbenchEditorTabContextMenu } from './editor/useWorkbenchEditorTabContextMenu';
|
|
577
610
|
export type {
|
|
578
611
|
UseWorkbenchEditorTabContextMenuOptions,
|
|
579
612
|
UseWorkbenchEditorTabContextMenuResult,
|
|
580
|
-
} from './useWorkbenchEditorTabContextMenu';
|
|
581
|
-
export { WorkbenchViewSidebar } from './WorkbenchViewSidebar';
|
|
582
|
-
export type {
|
|
613
|
+
} from './editor/useWorkbenchEditorTabContextMenu';
|
|
614
|
+
export { WorkbenchViewSidebar } from './shell/WorkbenchViewSidebar';
|
|
615
|
+
export type {
|
|
616
|
+
WorkbenchViewSidebarItem,
|
|
617
|
+
WorkbenchViewSidebarProps,
|
|
618
|
+
} from './shell/WorkbenchViewSidebar';
|
|
583
619
|
export {
|
|
584
620
|
WorkbenchDesktopTitleBar,
|
|
585
621
|
WorkbenchDesktopWindowControls,
|
|
586
|
-
} from './WorkbenchDesktopTitleBar';
|
|
622
|
+
} from './shell/WorkbenchDesktopTitleBar';
|
|
587
623
|
export type {
|
|
588
624
|
WorkbenchDesktopTitleBarProps,
|
|
589
625
|
WorkbenchDesktopWindowControlsProps,
|
|
590
|
-
} from './WorkbenchDesktopTitleBar';
|
|
591
|
-
export { WorkbenchStandaloneShell } from './WorkbenchStandaloneShell';
|
|
592
|
-
export { WorkbenchCanvasShell } from './WorkbenchCanvasShell';
|
|
626
|
+
} from './shell/WorkbenchDesktopTitleBar';
|
|
627
|
+
export { WorkbenchStandaloneShell } from './shell/WorkbenchStandaloneShell';
|
|
628
|
+
export { WorkbenchCanvasShell } from './shell/WorkbenchCanvasShell';
|
|
593
629
|
export type {
|
|
594
630
|
WorkbenchActivityLifecycleCallbackMap,
|
|
595
631
|
WorkbenchActivityLifecycleCallbacks,
|
|
@@ -599,18 +635,18 @@ export type {
|
|
|
599
635
|
WorkbenchPrimarySidebarLifecycleReason,
|
|
600
636
|
WorkbenchStandaloneShellContext,
|
|
601
637
|
WorkbenchStandaloneShellProps,
|
|
602
|
-
} from './WorkbenchStandaloneShell';
|
|
638
|
+
} from './shell/WorkbenchStandaloneShell';
|
|
603
639
|
export {
|
|
604
640
|
createWorkbenchStandaloneShellStateSnapshot,
|
|
605
641
|
useWorkbenchStandaloneShellContext,
|
|
606
|
-
} from './workbenchStandaloneShellReactContext';
|
|
642
|
+
} from './shell/workbenchStandaloneShellReactContext';
|
|
607
643
|
export type {
|
|
608
644
|
WorkbenchStandaloneShellStateChange,
|
|
609
645
|
WorkbenchStandaloneShellStateChangeKind,
|
|
610
646
|
WorkbenchStandaloneShellStateSnapshot,
|
|
611
|
-
} from './workbenchStandaloneShellReactContext';
|
|
612
|
-
export { useWorkbenchStandaloneShellStateSync } from './useWorkbenchStandaloneShellStateSync';
|
|
613
|
-
export type { WorkbenchCanvasShellProps } from './WorkbenchCanvasShell';
|
|
647
|
+
} from './shell/workbenchStandaloneShellReactContext';
|
|
648
|
+
export { useWorkbenchStandaloneShellStateSync } from './shell/useWorkbenchStandaloneShellStateSync';
|
|
649
|
+
export type { WorkbenchCanvasShellProps } from './shell/WorkbenchCanvasShell';
|
|
614
650
|
export type {
|
|
615
651
|
WorkbenchActivityChangeEvent,
|
|
616
652
|
WorkbenchActivityDescriptor,
|
|
@@ -625,9 +661,9 @@ export type {
|
|
|
625
661
|
WorkbenchStatusController,
|
|
626
662
|
WorkbenchTheme,
|
|
627
663
|
WorkbenchWorkspaceController,
|
|
628
|
-
} from './standalone';
|
|
629
|
-
export { StructuredArtifactEditor } from './StructuredArtifactEditor';
|
|
630
|
-
export type { StructuredArtifactEditorProps } from './StructuredArtifactEditor';
|
|
664
|
+
} from './shell/standalone';
|
|
665
|
+
export { StructuredArtifactEditor } from './shell/StructuredArtifactEditor';
|
|
666
|
+
export type { StructuredArtifactEditorProps } from './shell/StructuredArtifactEditor';
|
|
631
667
|
export type {
|
|
632
668
|
WorkbenchDocument,
|
|
633
669
|
WorkbenchDocumentAdapter,
|
|
@@ -7,6 +7,8 @@ import {
|
|
|
7
7
|
extensionCategoryIconTone,
|
|
8
8
|
formatExtensionCategoryLabel,
|
|
9
9
|
} from './extension-category-display.js';
|
|
10
|
+
import { resolveExtensionInstallOptions } from './extension-install-approval.js';
|
|
11
|
+
import { filterBrowseEntries, filterInstalledEntries } from './extension-management-filters.js';
|
|
10
12
|
import { ManagementFilterChips } from './ManagementFilterChips.js';
|
|
11
13
|
import { ManagementCard, ManagementCardList } from './ManagementCard.js';
|
|
12
14
|
import { ManagementGroup, ManagementGroups } from './ManagementGroup.js';
|
|
@@ -40,7 +42,9 @@ export function ExtensionManagementPanel({
|
|
|
40
42
|
catalogLoading = false,
|
|
41
43
|
className,
|
|
42
44
|
installedEntries,
|
|
45
|
+
isInstallTrusted,
|
|
43
46
|
onInstall,
|
|
47
|
+
onRememberInstallTrust,
|
|
44
48
|
onToggleEnabled,
|
|
45
49
|
}: ExtensionManagementPanelProps) {
|
|
46
50
|
const [activeTab, setActiveTab] = useState<'installed' | 'browse'>(
|
|
@@ -103,12 +107,14 @@ export function ExtensionManagementPanel({
|
|
|
103
107
|
emptyLabel="No catalog extensions match the current filter."
|
|
104
108
|
entries={filteredBrowse}
|
|
105
109
|
groups={browseGroups}
|
|
110
|
+
isInstallTrusted={isInstallTrusted}
|
|
106
111
|
query={browseQuery}
|
|
107
112
|
showGroups={showBrowseGroups}
|
|
108
113
|
summary={`${filteredBrowse.length} of ${browseEntries.length} in catalog`}
|
|
109
114
|
onCategoryChange={setCategoryFilter}
|
|
110
115
|
onInstall={onInstall}
|
|
111
116
|
onQueryChange={setBrowseQuery}
|
|
117
|
+
onRememberInstallTrust={onRememberInstallTrust}
|
|
112
118
|
/>
|
|
113
119
|
),
|
|
114
120
|
},
|
|
@@ -273,9 +279,11 @@ function BrowseExtensionsTab({
|
|
|
273
279
|
emptyLabel,
|
|
274
280
|
entries,
|
|
275
281
|
groups,
|
|
282
|
+
isInstallTrusted,
|
|
276
283
|
onCategoryChange,
|
|
277
284
|
onInstall,
|
|
278
285
|
onQueryChange,
|
|
286
|
+
onRememberInstallTrust,
|
|
279
287
|
query,
|
|
280
288
|
showGroups,
|
|
281
289
|
summary,
|
|
@@ -286,9 +294,11 @@ function BrowseExtensionsTab({
|
|
|
286
294
|
emptyLabel: string;
|
|
287
295
|
entries: readonly ExtensionCatalogBrowseEntry[];
|
|
288
296
|
groups: ReadonlyArray<{ category: string; entries: readonly ExtensionCatalogBrowseEntry[] }>;
|
|
297
|
+
isInstallTrusted?: ExtensionManagementPanelProps['isInstallTrusted'];
|
|
289
298
|
onCategoryChange: (category: BrowseCategoryFilter) => void;
|
|
290
299
|
onInstall?: ExtensionManagementPanelProps['onInstall'];
|
|
291
300
|
onQueryChange: (query: string) => void;
|
|
301
|
+
onRememberInstallTrust?: ExtensionManagementPanelProps['onRememberInstallTrust'];
|
|
292
302
|
query: string;
|
|
293
303
|
showGroups: boolean;
|
|
294
304
|
summary: string;
|
|
@@ -335,7 +345,9 @@ function BrowseExtensionsTab({
|
|
|
335
345
|
<li key={entry.id}>
|
|
336
346
|
<ExtensionCatalogCard
|
|
337
347
|
entry={entry}
|
|
348
|
+
isInstallTrusted={isInstallTrusted}
|
|
338
349
|
onInstall={onInstall}
|
|
350
|
+
onRememberInstallTrust={onRememberInstallTrust}
|
|
339
351
|
showCategory={false}
|
|
340
352
|
/>
|
|
341
353
|
</li>
|
|
@@ -349,7 +361,13 @@ function BrowseExtensionsTab({
|
|
|
349
361
|
<ManagementCardList>
|
|
350
362
|
{flatEntries.map((entry) => (
|
|
351
363
|
<li key={entry.id}>
|
|
352
|
-
<ExtensionCatalogCard
|
|
364
|
+
<ExtensionCatalogCard
|
|
365
|
+
entry={entry}
|
|
366
|
+
isInstallTrusted={isInstallTrusted}
|
|
367
|
+
onInstall={onInstall}
|
|
368
|
+
onRememberInstallTrust={onRememberInstallTrust}
|
|
369
|
+
showCategory
|
|
370
|
+
/>
|
|
353
371
|
</li>
|
|
354
372
|
))}
|
|
355
373
|
</ManagementCardList>
|
|
@@ -360,11 +378,15 @@ function BrowseExtensionsTab({
|
|
|
360
378
|
|
|
361
379
|
function ExtensionCatalogCard({
|
|
362
380
|
entry,
|
|
381
|
+
isInstallTrusted,
|
|
363
382
|
onInstall,
|
|
383
|
+
onRememberInstallTrust,
|
|
364
384
|
showCategory,
|
|
365
385
|
}: {
|
|
366
386
|
entry: ExtensionCatalogBrowseEntry;
|
|
387
|
+
isInstallTrusted?: ExtensionManagementPanelProps['isInstallTrusted'];
|
|
367
388
|
onInstall?: ExtensionManagementPanelProps['onInstall'];
|
|
389
|
+
onRememberInstallTrust?: ExtensionManagementPanelProps['onRememberInstallTrust'];
|
|
368
390
|
showCategory: boolean;
|
|
369
391
|
}) {
|
|
370
392
|
return (
|
|
@@ -378,7 +400,15 @@ function ExtensionCatalogCard({
|
|
|
378
400
|
}
|
|
379
401
|
type="button"
|
|
380
402
|
variant={entry.installed ? 'default' : 'primary'}
|
|
381
|
-
onClick={() =>
|
|
403
|
+
onClick={() => {
|
|
404
|
+
if (!onInstall) return;
|
|
405
|
+
const options = resolveExtensionInstallOptions(entry, {
|
|
406
|
+
isTrusted: isInstallTrusted,
|
|
407
|
+
rememberTrust: onRememberInstallTrust,
|
|
408
|
+
});
|
|
409
|
+
if (!options) return;
|
|
410
|
+
onInstall(entry, options);
|
|
411
|
+
}}
|
|
382
412
|
>
|
|
383
413
|
{entry.installed ? 'Installed' : entry.installPlan?.blocked ? 'Blocked' : 'Install'}
|
|
384
414
|
</Button>
|
|
@@ -462,37 +492,3 @@ function groupBrowseEntries(entries: readonly ExtensionCatalogBrowseEntry[]) {
|
|
|
462
492
|
})
|
|
463
493
|
.map(([category, categoryEntries]) => ({ category, entries: categoryEntries }));
|
|
464
494
|
}
|
|
465
|
-
|
|
466
|
-
function filterInstalledEntries(entries: readonly ExtensionManagementEntry[], query: string) {
|
|
467
|
-
const normalized = query.trim().toLowerCase();
|
|
468
|
-
if (!normalized) {
|
|
469
|
-
return entries;
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
return entries.filter((entry) =>
|
|
473
|
-
[entry.displayName, entry.id, entry.category, entry.description ?? '']
|
|
474
|
-
.join(' ')
|
|
475
|
-
.toLowerCase()
|
|
476
|
-
.includes(normalized),
|
|
477
|
-
);
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
function filterBrowseEntries(
|
|
481
|
-
entries: readonly ExtensionCatalogBrowseEntry[],
|
|
482
|
-
query: string,
|
|
483
|
-
category?: string,
|
|
484
|
-
) {
|
|
485
|
-
const normalized = query.trim().toLowerCase();
|
|
486
|
-
return entries.filter((entry) => {
|
|
487
|
-
if (category && entry.category !== category) {
|
|
488
|
-
return false;
|
|
489
|
-
}
|
|
490
|
-
if (!normalized) {
|
|
491
|
-
return true;
|
|
492
|
-
}
|
|
493
|
-
return [entry.displayName, entry.id, entry.category, entry.description]
|
|
494
|
-
.join(' ')
|
|
495
|
-
.toLowerCase()
|
|
496
|
-
.includes(normalized);
|
|
497
|
-
});
|
|
498
|
-
}
|
|
@@ -17,6 +17,8 @@ import {
|
|
|
17
17
|
extensionCategoryIconTone,
|
|
18
18
|
formatExtensionCategoryLabel,
|
|
19
19
|
} from './extension-category-display.js';
|
|
20
|
+
import { resolveExtensionInstallOptions } from './extension-install-approval.js';
|
|
21
|
+
import { filterBrowseEntries, filterInstalledEntries } from './extension-management-filters.js';
|
|
20
22
|
import { ManagementFilterChips } from './ManagementFilterChips.js';
|
|
21
23
|
import type {
|
|
22
24
|
ExtensionCatalogBrowseEntry,
|
|
@@ -57,8 +59,10 @@ export function ExtensionManagementSidebar({
|
|
|
57
59
|
emptyInstalledLabel = 'No installed extensions match the filter.',
|
|
58
60
|
emptyMarketplaceLabel = 'No marketplace extensions match the filter.',
|
|
59
61
|
installedEntries,
|
|
62
|
+
isInstallTrusted,
|
|
60
63
|
missingExtensionIds = [],
|
|
61
64
|
onInstall,
|
|
65
|
+
onRememberInstallTrust,
|
|
62
66
|
onToggleEnabled,
|
|
63
67
|
pendingAction,
|
|
64
68
|
}: ExtensionManagementSidebarProps) {
|
|
@@ -153,8 +157,10 @@ export function ExtensionManagementSidebar({
|
|
|
153
157
|
catalogLoading={catalogLoading}
|
|
154
158
|
emptyLabel={emptyMarketplaceLabel}
|
|
155
159
|
entries={filteredBrowse}
|
|
160
|
+
isInstallTrusted={isInstallTrusted}
|
|
156
161
|
pendingAction={pendingAction}
|
|
157
162
|
onInstall={onInstall}
|
|
163
|
+
onRememberInstallTrust={onRememberInstallTrust}
|
|
158
164
|
/>
|
|
159
165
|
) : (
|
|
160
166
|
<InstalledExtensionList
|
|
@@ -257,14 +263,18 @@ function MarketplaceExtensionList({
|
|
|
257
263
|
catalogLoading,
|
|
258
264
|
emptyLabel,
|
|
259
265
|
entries,
|
|
266
|
+
isInstallTrusted,
|
|
260
267
|
onInstall,
|
|
268
|
+
onRememberInstallTrust,
|
|
261
269
|
pendingAction,
|
|
262
270
|
}: {
|
|
263
271
|
catalogError?: string | undefined;
|
|
264
272
|
catalogLoading?: boolean | undefined;
|
|
265
273
|
emptyLabel: string;
|
|
266
274
|
entries: readonly ExtensionCatalogBrowseEntry[];
|
|
275
|
+
isInstallTrusted?: ExtensionManagementPanelProps['isInstallTrusted'];
|
|
267
276
|
onInstall?: ExtensionManagementPanelProps['onInstall'];
|
|
277
|
+
onRememberInstallTrust?: ExtensionManagementPanelProps['onRememberInstallTrust'];
|
|
268
278
|
pendingAction?: ExtensionManagementPendingAction | undefined;
|
|
269
279
|
}) {
|
|
270
280
|
if (catalogLoading) {
|
|
@@ -318,7 +328,15 @@ function MarketplaceExtensionList({
|
|
|
318
328
|
}
|
|
319
329
|
type="button"
|
|
320
330
|
variant={entry.installed ? 'default' : 'primary'}
|
|
321
|
-
onClick={() =>
|
|
331
|
+
onClick={() => {
|
|
332
|
+
if (!onInstall) return;
|
|
333
|
+
const options = resolveExtensionInstallOptions(entry, {
|
|
334
|
+
isTrusted: isInstallTrusted,
|
|
335
|
+
rememberTrust: onRememberInstallTrust,
|
|
336
|
+
});
|
|
337
|
+
if (!options) return;
|
|
338
|
+
onInstall(entry, options);
|
|
339
|
+
}}
|
|
322
340
|
>
|
|
323
341
|
{entry.installed
|
|
324
342
|
? 'Installed'
|
|
@@ -456,37 +474,3 @@ function formatFeatureBadge(label: string, count: number) {
|
|
|
456
474
|
|
|
457
475
|
return `${label} ${count}`;
|
|
458
476
|
}
|
|
459
|
-
|
|
460
|
-
function filterInstalledEntries(entries: readonly ExtensionManagementEntry[], query: string) {
|
|
461
|
-
const normalized = query.trim().toLowerCase();
|
|
462
|
-
if (!normalized) {
|
|
463
|
-
return entries;
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
return entries.filter((entry) =>
|
|
467
|
-
[entry.displayName, entry.id, entry.category, entry.description ?? '']
|
|
468
|
-
.join(' ')
|
|
469
|
-
.toLowerCase()
|
|
470
|
-
.includes(normalized),
|
|
471
|
-
);
|
|
472
|
-
}
|
|
473
|
-
|
|
474
|
-
function filterBrowseEntries(
|
|
475
|
-
entries: readonly ExtensionCatalogBrowseEntry[],
|
|
476
|
-
query: string,
|
|
477
|
-
category?: string,
|
|
478
|
-
) {
|
|
479
|
-
const normalized = query.trim().toLowerCase();
|
|
480
|
-
return entries.filter((entry) => {
|
|
481
|
-
if (category && entry.category !== category) {
|
|
482
|
-
return false;
|
|
483
|
-
}
|
|
484
|
-
if (!normalized) {
|
|
485
|
-
return true;
|
|
486
|
-
}
|
|
487
|
-
return [entry.displayName, entry.id, entry.category, entry.description]
|
|
488
|
-
.join(' ')
|
|
489
|
-
.toLowerCase()
|
|
490
|
-
.includes(normalized);
|
|
491
|
-
});
|
|
492
|
-
}
|