@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
|
@@ -115,12 +115,25 @@ export interface ExtensionCatalogBrowseEntry {
|
|
|
115
115
|
readonly manifestUrl: string;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
+
export interface ExtensionInstallOptions {
|
|
119
|
+
/** Required when the install plan sets `requiresApproval`. */
|
|
120
|
+
readonly approved?: boolean | undefined;
|
|
121
|
+
}
|
|
122
|
+
|
|
118
123
|
export interface ExtensionManagementPanelProps {
|
|
119
124
|
browseEntries: readonly ExtensionCatalogBrowseEntry[];
|
|
120
125
|
catalogError?: string | undefined;
|
|
121
126
|
catalogLoading?: boolean | undefined;
|
|
122
127
|
className?: string | undefined;
|
|
123
128
|
installedEntries: readonly ExtensionManagementEntry[];
|
|
124
|
-
onInstall?:
|
|
129
|
+
onInstall?:
|
|
130
|
+
((entry: ExtensionCatalogBrowseEntry, options?: ExtensionInstallOptions) => void) | undefined;
|
|
125
131
|
onToggleEnabled?: ((entry: ExtensionManagementEntry, enabled: boolean) => void) | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* Host-owned durable trust check. When true for an entry, the install confirm
|
|
134
|
+
* prompt is skipped and `{ approved: true }` is used.
|
|
135
|
+
*/
|
|
136
|
+
isInstallTrusted?: ((entry: ExtensionCatalogBrowseEntry) => boolean) | undefined;
|
|
137
|
+
/** Persist trust after the user confirms a permissioned install. */
|
|
138
|
+
onRememberInstallTrust?: ((entry: ExtensionCatalogBrowseEntry) => void) | undefined;
|
|
126
139
|
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import Markdown from 'react-markdown';
|
|
2
2
|
import { Children, isValidElement, type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
-
import { cx } from '
|
|
4
|
-
import {
|
|
3
|
+
import { cx } from '../../utils/cx';
|
|
4
|
+
import {
|
|
5
|
+
workbenchMarkdownRemarkPlugins,
|
|
6
|
+
workbenchMarkdownRehypePlugins,
|
|
7
|
+
} from './markdownRemarkPlugins';
|
|
8
|
+
import { sanitizeMarkdownHref } from './sanitizeMarkdownHref';
|
|
5
9
|
|
|
6
10
|
export interface WorkbenchMarkdownPreviewProps extends ComponentPropsWithoutRef<'article'> {
|
|
7
11
|
source: string;
|
|
@@ -16,12 +20,23 @@ export function WorkbenchMarkdownPreview({
|
|
|
16
20
|
<article className={cx('ui-workbench-markdown-preview', className)} {...props}>
|
|
17
21
|
<Markdown
|
|
18
22
|
remarkPlugins={workbenchMarkdownRemarkPlugins}
|
|
23
|
+
rehypePlugins={workbenchMarkdownRehypePlugins}
|
|
19
24
|
components={{
|
|
20
|
-
a: ({ children, href }) =>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
a: ({ children, href }) => {
|
|
26
|
+
const safeHref = sanitizeMarkdownHref(href);
|
|
27
|
+
if (!safeHref) {
|
|
28
|
+
return <span>{children}</span>;
|
|
29
|
+
}
|
|
30
|
+
return (
|
|
31
|
+
<a
|
|
32
|
+
href={safeHref}
|
|
33
|
+
rel="noreferrer"
|
|
34
|
+
target={safeHref.startsWith('#') ? undefined : '_blank'}
|
|
35
|
+
>
|
|
36
|
+
{children}
|
|
37
|
+
</a>
|
|
38
|
+
);
|
|
39
|
+
},
|
|
25
40
|
code: ({ children, className: codeClassName }) => (
|
|
26
41
|
<code className={cx('ui-workbench-markdown-preview__code', codeClassName)}>
|
|
27
42
|
{children}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import remarkGfm from 'remark-gfm';
|
|
2
|
+
import rehypeSanitize from 'rehype-sanitize';
|
|
3
|
+
|
|
4
|
+
/** Shared remark plugins for workbench markdown surfaces (preview, chat, etc.). */
|
|
5
|
+
export const workbenchMarkdownRemarkPlugins = [remarkGfm];
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Default rehype pipeline for untrusted markdown (chat / preview).
|
|
9
|
+
* Strips script/event handlers and dangerous URLs via rehype-sanitize.
|
|
10
|
+
* Hosts that need raw HTML must render outside these kit surfaces.
|
|
11
|
+
*/
|
|
12
|
+
export const workbenchMarkdownRehypePlugins = [rehypeSanitize];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Allowlist markdown link targets for safe preview rendering.
|
|
3
|
+
* Blocks javascript:/data:/vbscript: and other non-navigation schemes.
|
|
4
|
+
*/
|
|
5
|
+
export function sanitizeMarkdownHref(href: string | undefined): string | undefined {
|
|
6
|
+
if (href == null || href.trim() === '') {
|
|
7
|
+
return undefined;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const trimmed = href.trim();
|
|
11
|
+
if (trimmed.startsWith('#')) {
|
|
12
|
+
return trimmed;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
try {
|
|
16
|
+
const base =
|
|
17
|
+
typeof globalThis.location?.href === 'string' && globalThis.location.href.length > 0
|
|
18
|
+
? globalThis.location.href
|
|
19
|
+
: 'https://workbench.local/';
|
|
20
|
+
const url = new URL(trimmed, base);
|
|
21
|
+
const protocol = url.protocol.toLowerCase();
|
|
22
|
+
if (protocol === 'http:' || protocol === 'https:' || protocol === 'mailto:') {
|
|
23
|
+
return trimmed;
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
} catch {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './activity-bar.css';
|
|
2
2
|
import { type ComponentPropsWithoutRef, type ReactNode } from 'react';
|
|
3
|
-
import { Button } from '
|
|
4
|
-
import { cx } from '
|
|
3
|
+
import { Button } from '../../primitives/button';
|
|
4
|
+
import { cx } from '../../utils/cx';
|
|
5
5
|
import { type ActivityBarOrientation } from './activityBarOrder';
|
|
6
6
|
import {
|
|
7
7
|
mergeWorkbenchSidebarViewPlacementDropZoneProps,
|
|
@@ -20,18 +20,18 @@ export interface ActivityBarItem {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export interface ActivityBarProps extends Omit<ComponentPropsWithoutRef<'nav'>, 'children'> {
|
|
23
|
-
acceptSidebarViewPlacementDrop?: (
|
|
23
|
+
acceptSidebarViewPlacementDrop?: (viewId: string) => boolean;
|
|
24
24
|
itemDataAttributeName?: string;
|
|
25
25
|
items: ActivityBarItem[];
|
|
26
26
|
onItemActivate?: (item: ActivityBarItem) => void;
|
|
27
27
|
onItemsReorder?: (itemIds: string[]) => void;
|
|
28
|
-
onSidebarViewPlacementDrop?: (
|
|
29
|
-
orientation?: ActivityBarOrientation
|
|
28
|
+
onSidebarViewPlacementDrop?: (viewId: string) => void;
|
|
29
|
+
orientation?: ActivityBarOrientation;
|
|
30
30
|
reorderable?: boolean;
|
|
31
31
|
secondaryItems?: ActivityBarItem[];
|
|
32
|
-
sidebarViewPlacementDropZoneId?: string
|
|
32
|
+
sidebarViewPlacementDropZoneId?: string;
|
|
33
33
|
/** Enables cross-slot placement drag without reordering within the bar. */
|
|
34
|
-
placementDraggable?: boolean
|
|
34
|
+
placementDraggable?: boolean;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
/** @deprecated Use WORKBENCH_SIDEBAR_VIEW_PLACEMENT_DRAG_DATA_TYPE */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useState, type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
2
|
-
import { EmptyState } from '
|
|
3
|
-
import { IconButton } from '
|
|
4
|
-
import { cx } from '
|
|
5
|
-
import { WorkspacePathLabel } from '
|
|
2
|
+
import { EmptyState } from '../../primitives/empty-state';
|
|
3
|
+
import { IconButton } from '../../primitives/icon-button';
|
|
4
|
+
import { cx } from '../../utils/cx';
|
|
5
|
+
import { WorkspacePathLabel } from '../workspace/WorkspacePathLabel';
|
|
6
6
|
import { SplitView } from './SplitView';
|
|
7
7
|
|
|
8
8
|
export type WorkbenchArtifactMode = 'code' | 'preview' | 'split';
|
|
@@ -31,8 +31,8 @@ export interface WorkbenchPreviewRendererMatch {
|
|
|
31
31
|
|
|
32
32
|
export interface WorkbenchPreviewRendererContext {
|
|
33
33
|
artifact: WorkbenchArtifactDescriptor;
|
|
34
|
-
match?: WorkbenchPreviewRendererMatch
|
|
35
|
-
renderer?: WorkbenchPreviewRenderer
|
|
34
|
+
match?: WorkbenchPreviewRendererMatch;
|
|
35
|
+
renderer?: WorkbenchPreviewRenderer;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
export interface WorkbenchPreviewRenderer {
|
|
@@ -58,11 +58,11 @@ export type WorkbenchArtifactShellRenderPreview = (
|
|
|
58
58
|
) => ReactNode;
|
|
59
59
|
|
|
60
60
|
export interface WorkbenchArtifactModeControlsProps extends ComponentPropsWithRef<'div'> {
|
|
61
|
-
codeLabel?: string
|
|
61
|
+
codeLabel?: string;
|
|
62
62
|
mode: WorkbenchArtifactMode;
|
|
63
63
|
onModeChange: (mode: WorkbenchArtifactMode) => void;
|
|
64
|
-
previewLabel?: string
|
|
65
|
-
splitLabel?: string
|
|
64
|
+
previewLabel?: string;
|
|
65
|
+
splitLabel?: string;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
function normalizeToken(value: string | undefined) {
|
|
@@ -229,9 +229,9 @@ export function WorkbenchArtifactModeControls({
|
|
|
229
229
|
|
|
230
230
|
export interface WorkbenchArtifactPreviewProps extends ComponentPropsWithRef<'div'> {
|
|
231
231
|
artifact: WorkbenchArtifactDescriptor;
|
|
232
|
-
renderPreview?: WorkbenchArtifactShellRenderPreview
|
|
233
|
-
renderers?: readonly WorkbenchPreviewRenderer[]
|
|
234
|
-
unsupportedLabel?: ReactNode
|
|
232
|
+
renderPreview?: WorkbenchArtifactShellRenderPreview;
|
|
233
|
+
renderers?: readonly WorkbenchPreviewRenderer[];
|
|
234
|
+
unsupportedLabel?: ReactNode;
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
export function WorkbenchArtifactPreview({
|
|
@@ -270,19 +270,19 @@ export interface WorkbenchArtifactShellProps extends Omit<
|
|
|
270
270
|
ComponentPropsWithRef<'div'>,
|
|
271
271
|
'children'
|
|
272
272
|
> {
|
|
273
|
-
artifact?: WorkbenchArtifactDescriptor
|
|
274
|
-
codeLabel?: string
|
|
275
|
-
defaultMode?: WorkbenchArtifactMode
|
|
276
|
-
emptyLabel?: ReactNode
|
|
277
|
-
mode?: WorkbenchArtifactMode
|
|
278
|
-
onModeChange?: (
|
|
279
|
-
previewLabel?: string
|
|
280
|
-
previewRenderers?: readonly WorkbenchPreviewRenderer[]
|
|
281
|
-
renderCode?: WorkbenchArtifactShellRenderCode
|
|
282
|
-
renderPreview?: WorkbenchArtifactShellRenderPreview
|
|
283
|
-
showHeader?: boolean
|
|
284
|
-
splitLabel?: string
|
|
285
|
-
unsupportedPreviewLabel?: ReactNode
|
|
273
|
+
artifact?: WorkbenchArtifactDescriptor;
|
|
274
|
+
codeLabel?: string;
|
|
275
|
+
defaultMode?: WorkbenchArtifactMode;
|
|
276
|
+
emptyLabel?: ReactNode;
|
|
277
|
+
mode?: WorkbenchArtifactMode;
|
|
278
|
+
onModeChange?: (mode: WorkbenchArtifactMode) => void;
|
|
279
|
+
previewLabel?: string;
|
|
280
|
+
previewRenderers?: readonly WorkbenchPreviewRenderer[];
|
|
281
|
+
renderCode?: WorkbenchArtifactShellRenderCode;
|
|
282
|
+
renderPreview?: WorkbenchArtifactShellRenderPreview;
|
|
283
|
+
showHeader?: boolean;
|
|
284
|
+
splitLabel?: string;
|
|
285
|
+
unsupportedPreviewLabel?: ReactNode;
|
|
286
286
|
}
|
|
287
287
|
|
|
288
288
|
export function WorkbenchArtifactShell({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './split-view.css';
|
|
2
2
|
import {
|
|
3
3
|
useEffect,
|
|
4
4
|
useLayoutEffect,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
type PointerEvent,
|
|
10
10
|
type ReactNode,
|
|
11
11
|
} from 'react';
|
|
12
|
-
import { cx } from '
|
|
12
|
+
import { cx } from '../../utils/cx';
|
|
13
13
|
|
|
14
14
|
export type SplitViewOrientation = 'horizontal' | 'vertical';
|
|
15
15
|
export type SplitViewPrimarySizeUnit = 'percent' | 'pixels';
|
|
@@ -42,7 +42,7 @@ export interface SplitViewProps {
|
|
|
42
42
|
onPrimarySizePxPreviewChange?: (primarySizePx: number) => void;
|
|
43
43
|
onSecondarySizePxChange?: (secondarySizePx: number) => void;
|
|
44
44
|
onSecondarySizePxPreviewChange?: (secondarySizePx: number) => void;
|
|
45
|
-
orientation?: SplitViewOrientation
|
|
45
|
+
orientation?: SplitViewOrientation;
|
|
46
46
|
primary: ReactNode;
|
|
47
47
|
primarySizePercent?: number;
|
|
48
48
|
primarySizePx?: number;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import './
|
|
1
|
+
import './status-bar.css';
|
|
2
2
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
3
|
-
import { Button } from '
|
|
4
|
-
import { cxCodicon } from '
|
|
5
|
-
import { cx } from '
|
|
3
|
+
import { Button } from '../../primitives/button';
|
|
4
|
+
import { cxCodicon } from '../../utils/codicon';
|
|
5
|
+
import { cx } from '../../utils/cx';
|
|
6
6
|
import {
|
|
7
7
|
getWorkbenchStatusLabel,
|
|
8
8
|
isWorkbenchStatusBusy,
|
|
@@ -106,7 +106,7 @@ function sortByOrderPriority<T extends { order?: number }>(values: readonly T[])
|
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
export interface StatusBarSectionProps extends ComponentPropsWithRef<'div'> {
|
|
109
|
-
align?: StatusBarSectionAlign
|
|
109
|
+
align?: StatusBarSectionAlign;
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
export function StatusBarSection({ align = 'start', className, ...props }: StatusBarSectionProps) {
|
|
@@ -123,9 +123,9 @@ export function StatusBarSection({ align = 'start', className, ...props }: Statu
|
|
|
123
123
|
}
|
|
124
124
|
|
|
125
125
|
export interface StatusBarItemProps extends ComponentPropsWithRef<'button'> {
|
|
126
|
-
active?: boolean
|
|
127
|
-
icon?: ReactNode | string
|
|
128
|
-
status?: WorkbenchStatus
|
|
126
|
+
active?: boolean;
|
|
127
|
+
icon?: ReactNode | string;
|
|
128
|
+
status?: WorkbenchStatus;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
131
|
function resolveStatusBarIcon(icon: ReactNode | string | undefined) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { useState, useMemo, type ReactNode } from 'react';
|
|
2
|
-
import { useWorkspaceDrafts } from '
|
|
3
|
-
import { WorkspaceEditor, type WorkspaceEditorTheme } from '
|
|
4
|
-
import { WorkbenchStructuredDataSchemaPanelEmbed } from '
|
|
5
|
-
import { type WorkbenchStructuredDataSchemaDocument } from '
|
|
2
|
+
import { useWorkspaceDrafts } from '../workspace/WorkspaceDraftsContext';
|
|
3
|
+
import { WorkspaceEditor, type WorkspaceEditorTheme } from '../workspace/WorkspaceEditor';
|
|
4
|
+
import { WorkbenchStructuredDataSchemaPanelEmbed } from '../settings/StructuredDataSchemaPanelEmbed';
|
|
5
|
+
import { type WorkbenchStructuredDataSchemaDocument } from '../settings/StructuredDataForm';
|
|
6
6
|
import { type WorkbenchArtifactMode, WorkbenchArtifactModeControls } from './ArtifactShell';
|
|
7
|
-
import { Button } from '
|
|
8
|
-
import { Panel, PanelBody, PanelHeader } from '
|
|
9
|
-
import { Toolbar } from '
|
|
7
|
+
import { Button } from '../../primitives/button';
|
|
8
|
+
import { Panel, PanelBody, PanelHeader } from '../../layout/panel';
|
|
9
|
+
import { Toolbar } from '../../primitives/toolbar';
|
|
10
10
|
import { SplitView } from './SplitView';
|
|
11
|
-
import { type WorkspaceFile } from '
|
|
12
|
-
import { fileNameOfPath } from '
|
|
11
|
+
import { type WorkspaceFile } from '../workspace/types';
|
|
12
|
+
import { fileNameOfPath } from '../workspace/path';
|
|
13
13
|
|
|
14
14
|
export interface StructuredArtifactEditorProps {
|
|
15
15
|
activePattern?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ComponentPropsWithRef, ReactNode } from 'react';
|
|
2
|
-
import { EmptyState } from '
|
|
3
|
-
import { cxCodicon } from '
|
|
4
|
-
import { cx } from '
|
|
2
|
+
import { EmptyState } from '../../primitives/empty-state';
|
|
3
|
+
import { cxCodicon } from '../../utils/codicon';
|
|
4
|
+
import { cx } from '../../utils/cx';
|
|
5
5
|
import { getWorkbenchStatusLabel, isWorkbenchStatusBusy, type WorkbenchStatus } from './status';
|
|
6
6
|
|
|
7
7
|
export type WorkbenchTimelineEventKind =
|
|
@@ -11,16 +11,16 @@ export type WorkbenchTimelineMessageSource = 'assistant' | 'system' | 'user' | (
|
|
|
11
11
|
export type WorkbenchTimelineVariant = 'compact' | 'expanded';
|
|
12
12
|
|
|
13
13
|
export interface WorkbenchTimelineEvent {
|
|
14
|
-
content?: ReactNode
|
|
15
|
-
description?: ReactNode
|
|
14
|
+
content?: ReactNode;
|
|
15
|
+
description?: ReactNode;
|
|
16
16
|
id: string;
|
|
17
17
|
kind: WorkbenchTimelineEventKind;
|
|
18
|
-
metadata?: Record<string, unknown
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
19
|
payload?: unknown;
|
|
20
|
-
source?: WorkbenchTimelineMessageSource
|
|
21
|
-
status?: WorkbenchStatus
|
|
22
|
-
timestamp?: ReactNode
|
|
23
|
-
title?: ReactNode
|
|
20
|
+
source?: WorkbenchTimelineMessageSource;
|
|
21
|
+
status?: WorkbenchStatus;
|
|
22
|
+
timestamp?: ReactNode;
|
|
23
|
+
title?: ReactNode;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
26
|
export interface WorkbenchTimelineRenderContext {
|
|
@@ -172,10 +172,10 @@ export interface WorkbenchTimelineItemProps extends Omit<
|
|
|
172
172
|
'children'
|
|
173
173
|
> {
|
|
174
174
|
event: WorkbenchTimelineEvent;
|
|
175
|
-
index?: number
|
|
176
|
-
renderMetadata?: WorkbenchTimelineRenderMetadata
|
|
177
|
-
renderPayload?: WorkbenchTimelineRenderPayload
|
|
178
|
-
variant?: WorkbenchTimelineVariant
|
|
175
|
+
index?: number;
|
|
176
|
+
renderMetadata?: WorkbenchTimelineRenderMetadata;
|
|
177
|
+
renderPayload?: WorkbenchTimelineRenderPayload;
|
|
178
|
+
variant?: WorkbenchTimelineVariant;
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
export function WorkbenchTimelineItem({
|
|
@@ -245,11 +245,11 @@ export function WorkbenchTimelineItem({
|
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
export interface WorkbenchTimelineProps extends Omit<ComponentPropsWithRef<'div'>, 'children'> {
|
|
248
|
-
emptyLabel?: ReactNode
|
|
248
|
+
emptyLabel?: ReactNode;
|
|
249
249
|
events: readonly WorkbenchTimelineEvent[];
|
|
250
|
-
renderMetadata?: WorkbenchTimelineRenderMetadata
|
|
251
|
-
renderPayload?: WorkbenchTimelineRenderPayload
|
|
252
|
-
variant?: WorkbenchTimelineVariant
|
|
250
|
+
renderMetadata?: WorkbenchTimelineRenderMetadata;
|
|
251
|
+
renderPayload?: WorkbenchTimelineRenderPayload;
|
|
252
|
+
variant?: WorkbenchTimelineVariant;
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
export function WorkbenchTimeline({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { WorkbenchDocumentNode, WorkbenchNodeLayout } from '
|
|
1
|
+
import type { WorkbenchDocumentNode, WorkbenchNodeLayout } from '../schema';
|
|
2
2
|
|
|
3
3
|
export interface WorkbenchCanvasLayoutInput {
|
|
4
|
-
readonly height?: string
|
|
5
|
-
readonly width?: string
|
|
6
|
-
readonly x?: string
|
|
7
|
-
readonly y?: string
|
|
4
|
+
readonly height?: string;
|
|
5
|
+
readonly width?: string;
|
|
6
|
+
readonly x?: string;
|
|
7
|
+
readonly y?: string;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export function getWorkbenchCanvasNodeChildren(node: WorkbenchDocumentNode): readonly string[] {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactElement, useEffect, useMemo, useState } from 'react';
|
|
2
2
|
import { createCommandRegistryFromContributions } from '@workbench-kit/platform';
|
|
3
3
|
import { integratedShellWorkspaceFiles } from '@workbench-kit/adapters';
|
|
4
|
-
import { Button } from '
|
|
5
|
-
import { TextArea } from '
|
|
6
|
-
import { TextInput } from '
|
|
7
|
-
import { SideBarViewFrame } from '
|
|
8
|
-
import { createWorkbenchShellCommands } from '
|
|
4
|
+
import { Button } from '../../primitives/button';
|
|
5
|
+
import { TextArea } from '../../primitives/text-area';
|
|
6
|
+
import { TextInput } from '../../primitives/text-input';
|
|
7
|
+
import { SideBarViewFrame } from '../../layout/sidebar';
|
|
8
|
+
import { createWorkbenchShellCommands } from '../commands/commands';
|
|
9
9
|
import { WorkbenchStandaloneShell } from './WorkbenchStandaloneShell';
|
|
10
10
|
import type { WorkbenchActivityDescriptor, WorkbenchStandaloneBootstrap } from './standalone';
|
|
11
11
|
import {
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
type WorkbenchDocumentPatchHistory,
|
|
20
20
|
type WorkbenchDocumentPatchHistoryState,
|
|
21
21
|
type WorkbenchDocumentPatchResult,
|
|
22
|
-
} from '
|
|
22
|
+
} from '../schema';
|
|
23
23
|
import {
|
|
24
24
|
DEFAULT_CANVAS_ACTIVITY_ID,
|
|
25
25
|
DEFAULT_CANVAS_THEME,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import '../chrome/workbench-desktop-titlebar.css';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import { cx } from '
|
|
4
|
-
import { useWorkbenchHostPlatform } from '
|
|
3
|
+
import { cx } from '../../utils/cx';
|
|
4
|
+
import { useWorkbenchHostPlatform } from '../chrome/WorkbenchPlatformContext';
|
|
5
5
|
import {
|
|
6
6
|
shouldUseDarwinPlatformChrome,
|
|
7
7
|
WorkbenchWindowChromeControls,
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
resolveWorkbenchWindowChromeDataAttributes,
|
|
11
11
|
type WorkbenchWindowChromeMode,
|
|
12
|
-
} from '
|
|
12
|
+
} from '../chrome/workbenchPlatformChrome';
|
|
13
13
|
|
|
14
14
|
export interface WorkbenchDesktopWindowControlsProps {
|
|
15
15
|
/** Defaults to `platform` so standalone controls match `WorkbenchDesktopTitleBar`. */
|
|
16
|
-
chrome?: WorkbenchWindowChromeMode
|
|
17
|
-
closeLabel?: string
|
|
16
|
+
chrome?: WorkbenchWindowChromeMode;
|
|
17
|
+
closeLabel?: string;
|
|
18
18
|
isMaximized: boolean;
|
|
19
|
-
maximizeLabel?: string
|
|
20
|
-
minimizeLabel?: string
|
|
19
|
+
maximizeLabel?: string;
|
|
20
|
+
minimizeLabel?: string;
|
|
21
21
|
onClose: () => void;
|
|
22
22
|
onMinimize: () => void;
|
|
23
23
|
onToggleMaximized: () => void;
|
|
24
|
-
restoreLabel?: string
|
|
24
|
+
restoreLabel?: string;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -59,20 +59,20 @@ export function WorkbenchDesktopWindowControls({
|
|
|
59
59
|
|
|
60
60
|
export interface WorkbenchDesktopTitleBarProps {
|
|
61
61
|
/** Optional center area, e.g. a command-menu trigger. Omit to leave it empty. */
|
|
62
|
-
centerSlot?: ReactNode
|
|
62
|
+
centerSlot?: ReactNode;
|
|
63
63
|
/**
|
|
64
64
|
* `platform` (default): darwin traffic lights / win32 caption buttons via host platform context.
|
|
65
65
|
* `generic`: maximize + close only (modal-like), no OS-specific placement.
|
|
66
66
|
*/
|
|
67
|
-
chrome?: WorkbenchWindowChromeMode
|
|
68
|
-
className?: string
|
|
69
|
-
leading?: ReactNode
|
|
70
|
-
trailing?: ReactNode
|
|
67
|
+
chrome?: WorkbenchWindowChromeMode;
|
|
68
|
+
className?: string;
|
|
69
|
+
leading?: ReactNode;
|
|
70
|
+
trailing?: ReactNode;
|
|
71
71
|
/**
|
|
72
72
|
* Host-supplied window actions (Electron IPC callbacks). Omit on platforms that keep a native frame.
|
|
73
73
|
* Kit owns chrome markup; the host owns minimize / maximize / close side effects only.
|
|
74
74
|
*/
|
|
75
|
-
windowControls?: WorkbenchDesktopWindowControlsProps
|
|
75
|
+
windowControls?: WorkbenchDesktopWindowControlsProps;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode, useState } from 'react';
|
|
2
|
-
import '
|
|
3
|
-
import { cx } from '
|
|
2
|
+
import '../chrome/workbench-layout-regions.css';
|
|
3
|
+
import { cx } from '../../utils/cx';
|
|
4
4
|
import { ActivityBar, type ActivityBarProps, type ActivityBarItem } from './ActivityBar';
|
|
5
5
|
import { SplitView } from './SplitView';
|
|
6
6
|
import { StatusBar, type StatusBarItemModel, type StatusBarSectionModel } from './StatusBar';
|
|
7
7
|
import { DEFAULT_PRIMARY_SIDEBAR_SIZE_PX } from './shellState';
|
|
8
|
-
import { suppressNativeBrowserContextMenu } from '
|
|
9
|
-
import { WorkbenchOverlaysProvider } from '
|
|
8
|
+
import { suppressNativeBrowserContextMenu } from '../commands/workbenchContextMenu';
|
|
9
|
+
import { WorkbenchOverlaysProvider } from '../chrome/workbenchOverlaysContext';
|
|
10
10
|
|
|
11
11
|
export type WorkbenchShellActivityBarPosition = 'left' | 'top';
|
|
12
12
|
|
|
@@ -15,7 +15,7 @@ export interface WorkbenchShellProps {
|
|
|
15
15
|
items: ActivityBarItem[];
|
|
16
16
|
visible?: boolean;
|
|
17
17
|
};
|
|
18
|
-
activityBarPosition?: WorkbenchShellActivityBarPosition
|
|
18
|
+
activityBarPosition?: WorkbenchShellActivityBarPosition;
|
|
19
19
|
auxiliarySidebar?: {
|
|
20
20
|
isVisible: boolean;
|
|
21
21
|
node: ReactNode;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import '
|
|
1
|
+
import '../chrome/workbench-shell-titlebar.css';
|
|
2
2
|
import type { JSX } from 'react';
|
|
3
3
|
|
|
4
|
-
import { IconButton } from '
|
|
4
|
+
import { IconButton } from '../../primitives/icon-button';
|
|
5
5
|
|
|
6
6
|
export interface WorkbenchShellTitleBarLayoutControlsProps {
|
|
7
|
-
readonly isAuxiliarySidebarVisible?: boolean
|
|
8
|
-
readonly isPanelVisible?: boolean
|
|
7
|
+
readonly isAuxiliarySidebarVisible?: boolean;
|
|
8
|
+
readonly isPanelVisible?: boolean;
|
|
9
9
|
readonly isPrimarySidebarVisible: boolean;
|
|
10
|
-
readonly onToggleAuxiliarySidebar?: (
|
|
11
|
-
readonly onTogglePanel?: (
|
|
10
|
+
readonly onToggleAuxiliarySidebar?: () => void;
|
|
11
|
+
readonly onTogglePanel?: () => void;
|
|
12
12
|
readonly onTogglePrimarySidebar: () => void;
|
|
13
|
-
readonly panelHideLabel?: string
|
|
14
|
-
readonly panelShowLabel?: string
|
|
15
|
-
readonly primarySidebarHideLabel?: string
|
|
16
|
-
readonly primarySidebarShowLabel?: string
|
|
17
|
-
readonly secondarySidebarHideLabel?: string
|
|
18
|
-
readonly secondarySidebarShowLabel?: string
|
|
13
|
+
readonly panelHideLabel?: string;
|
|
14
|
+
readonly panelShowLabel?: string;
|
|
15
|
+
readonly primarySidebarHideLabel?: string;
|
|
16
|
+
readonly primarySidebarShowLabel?: string;
|
|
17
|
+
readonly secondarySidebarHideLabel?: string;
|
|
18
|
+
readonly secondarySidebarShowLabel?: string;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function joinClasses(...classNames: Array<string | false | null | undefined>): string {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { useMemo, useRef } from 'react';
|
|
2
|
-
import { useResolvedWorkbenchTheme } from '
|
|
2
|
+
import { useResolvedWorkbenchTheme } from '../theme/theme';
|
|
3
3
|
import type { CSSProperties, MouseEvent, ReactNode } from 'react';
|
|
4
4
|
import { useWorkbenchStandaloneShellStateSync } from './useWorkbenchStandaloneShellStateSync';
|
|
5
5
|
import {
|
|
6
6
|
WorkbenchStandaloneShellReactContextProvider,
|
|
7
7
|
type WorkbenchStandaloneShellStateChange,
|
|
8
8
|
} from './workbenchStandaloneShellReactContext';
|
|
9
|
-
import { cxCodicon } from '
|
|
9
|
+
import { cxCodicon } from '../../utils/codicon';
|
|
10
10
|
import type { StatusBarItemModel, StatusBarSectionModel } from './StatusBar';
|
|
11
11
|
import type { WorkbenchShellProps } from './WorkbenchShell';
|
|
12
12
|
import { WorkbenchShell } from './WorkbenchShell';
|
|
13
|
-
import type { WorkbenchShellCommandContext } from '
|
|
13
|
+
import type { WorkbenchShellCommandContext } from '../commands/commands';
|
|
14
14
|
import { DEFAULT_PRIMARY_SIDEBAR_SIZE_PX, useWorkbenchShellState } from './shellState';
|
|
15
15
|
import type {
|
|
16
16
|
WorkbenchActivityChangeEvent,
|
|
@@ -19,7 +19,7 @@ import type {
|
|
|
19
19
|
WorkbenchStandaloneBootstrapEvent,
|
|
20
20
|
WorkbenchTheme,
|
|
21
21
|
} from './standalone';
|
|
22
|
-
import { WorkspaceDraftsProvider } from '
|
|
22
|
+
import { WorkspaceDraftsProvider } from '../workspace/WorkspaceDraftsContext';
|
|
23
23
|
|
|
24
24
|
const DEFAULT_THEME: WorkbenchTheme = 'dark';
|
|
25
25
|
const DEFAULT_ACTIVITY_ID = 'explorer';
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
type WorkbenchEditorBodyProps,
|
|
8
8
|
type WorkbenchEditorFrameProps,
|
|
9
9
|
type WorkbenchPanelSurfaceProps,
|
|
10
|
-
} from '
|
|
11
|
-
import { EmptyState, type EmptyStateProps } from '
|
|
10
|
+
} from '../../layout/WorkbenchLayoutBase';
|
|
11
|
+
import { EmptyState, type EmptyStateProps } from '../../primitives/empty-state';
|
|
12
12
|
|
|
13
13
|
export type WorkbenchViewEditorDataAttributes = {
|
|
14
14
|
readonly [key: `data-${string}`]: boolean | number | string | undefined;
|
|
@@ -26,15 +26,15 @@ export type WorkbenchViewEditorEmptyStateSurfaceProps = Omit<
|
|
|
26
26
|
export interface WorkbenchViewEditorEmptyState {
|
|
27
27
|
readonly children: ReactNode;
|
|
28
28
|
readonly icon: EmptyStateProps['icon'];
|
|
29
|
-
readonly props?: WorkbenchViewEditorEmptyStateProps
|
|
30
|
-
readonly surfaceProps?: WorkbenchViewEditorEmptyStateSurfaceProps
|
|
29
|
+
readonly props?: WorkbenchViewEditorEmptyStateProps;
|
|
30
|
+
readonly surfaceProps?: WorkbenchViewEditorEmptyStateSurfaceProps;
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export interface WorkbenchViewEditorProps extends Omit<WorkbenchEditorFrameProps, 'children'> {
|
|
34
|
-
readonly bodyProps?: Omit<WorkbenchEditorBodyProps, 'children'
|
|
34
|
+
readonly bodyProps?: Omit<WorkbenchEditorBodyProps, 'children'>;
|
|
35
35
|
readonly children?: ReactNode;
|
|
36
|
-
readonly emptyState?: WorkbenchViewEditorEmptyState
|
|
37
|
-
readonly tabs?: ReactNode
|
|
36
|
+
readonly emptyState?: WorkbenchViewEditorEmptyState;
|
|
37
|
+
readonly tabs?: ReactNode;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export function WorkbenchViewEditor({
|