@workbench-kit/react 0.0.2-prototype.0.2.4 → 0.0.2-prototype.0.2.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -0
- package/package.json +38 -21
- package/src/index.ts +74 -34
- package/src/jdw/JsonCodeEditorPane.tsx +7 -6
- package/src/jdw/builtins/renderBuiltinWidgetLeaf.tsx +1 -3
- package/src/jdw/createBuiltinJdwRegistry.ts +1 -4
- package/src/jdw/cssRenderBackend.tsx +1 -4
- package/src/jdw/fixtures/jdw-fixtures.ts +0 -15
- package/src/json-config/JsonConfigWorkbench.tsx +1 -1
- package/src/layout/index.ts +11 -2
- package/src/layout/panel/Panel.tsx +0 -3
- package/src/layout/panel/index.ts +0 -2
- package/src/layout/sidebar/SideBarTree.tsx +301 -0
- package/src/layout/sidebar/SidebarActionIconBar.tsx +3 -3
- package/src/layout/sidebar/WorkbenchSidebarActions.tsx +1 -1
- package/src/layout/sidebar/index.ts +13 -0
- package/src/modal/Modal.tsx +55 -25
- package/src/modal/ModalTitlebar.tsx +8 -8
- package/src/modal/modalPosition.ts +3 -6
- package/src/modal/useModalFocusTrap.ts +142 -0
- package/src/modal/useModalWindowFrame.ts +2 -2
- package/src/overlay/ContextMenu.tsx +133 -21
- package/src/overlay/context-menu-density.css +22 -0
- package/src/overlay/context-menu-item.ts +17 -0
- package/src/overlay/context-menu.css +6 -2
- package/src/overlay/index.ts +6 -1
- package/src/overlay/measureAnchoredOverlayPanel.ts +4 -6
- package/src/overlay/pointerPassthroughRegion.ts +17 -1
- package/src/overlay/usePointerPassthroughRegion.ts +35 -6
- package/src/primitives/absolute-box/AbsoluteBox.tsx +4 -4
- package/src/primitives/app-icon/AppIcon.tsx +33 -0
- package/src/primitives/app-icon/app-icon.css +28 -0
- package/src/primitives/button/Button.tsx +4 -4
- package/src/primitives/catalog-browse-card/CatalogBrowseCard.tsx +6 -6
- package/src/primitives/catalog-browse-pane/CatalogBrowsePane.tsx +39 -32
- package/src/primitives/catalog-browse-pane/catalog-browse-pane.css +4 -0
- package/src/primitives/catalog-filter-overlay/CatalogFilterOverlay.tsx +2 -2
- package/src/primitives/checkbox/Checkbox.tsx +1 -1
- package/src/primitives/chip/Chip.tsx +3 -12
- package/src/primitives/chip/index.ts +2 -2
- package/src/primitives/codicon/Codicon.tsx +1 -1
- package/src/primitives/file-icon/FileIcon.tsx +1 -1
- package/src/primitives/icon-button/IconButton.tsx +1 -1
- package/src/primitives/index.ts +7 -2
- package/src/primitives/library-detail-layout/LibraryDetailLayout.tsx +123 -9
- package/src/primitives/library-detail-layout/library-detail-layout.css +57 -0
- package/src/primitives/library-detail-layout/resolve-hero-cover-media.ts +80 -0
- package/src/primitives/library-facet-filter-panel/LibraryFacetFilterPanel.tsx +12 -12
- package/src/primitives/library-facet-filter-strip/LibraryFacetFilterStrip.tsx +4 -4
- package/src/primitives/number-input/NumberInput.tsx +5 -5
- package/src/primitives/primitives.css +1 -0
- package/src/primitives/record-media-hero/RecordMediaHero.tsx +10 -6
- package/src/primitives/scroll-area/ScrollArea.tsx +5 -5
- package/src/primitives/scroll-area-infinite-load/useScrollAreaInfiniteLoad.ts +5 -5
- package/src/primitives/searchable-multi-select/SearchableMultiSelect.tsx +7 -7
- package/src/primitives/select/Select.tsx +1 -13
- package/src/primitives/text-area/TextArea.tsx +1 -1
- package/src/primitives/text-input/TextInput.tsx +1 -1
- package/src/primitives/workbench-media-slot/WorkbenchMediaPlaceholder.tsx +2 -2
- package/src/primitives/workbench-media-slot/WorkbenchMediaSlot.tsx +16 -10
- package/src/primitives/workbench-thumbnail/WorkbenchThumbnail.tsx +4 -4
- package/src/scrollbars.css +2 -6
- package/src/styles/core.css +16 -0
- package/src/styles/foundation.css +4 -0
- package/src/styles/overlay.css +2 -0
- package/src/styles.css +1 -15
- package/src/utils/clamp.ts +4 -0
- package/src/utils/normalizeKeyToken.ts +13 -0
- package/src/utils/readNumber.ts +4 -0
- package/src/widget-tree/WidgetSourceEditor.tsx +0 -14
- package/src/widget-tree/WidgetTreeCanvasPreview.tsx +3 -10
- package/src/widget-tree/WidgetTreeLab.tsx +2 -23
- package/src/widget-tree/WidgetTreeSidePanel.tsx +0 -5
- package/src/widget-tree/WidgetTreeWorkspaceShell.tsx +2 -2
- package/src/widget-tree/index.ts +1 -5
- package/src/workbench/auth/WorkbenchLoginView.tsx +1 -2
- package/src/workbench/auth/auth-flows.css +14 -0
- package/src/workbench/chat/ChatCommandProposalCard.tsx +4 -4
- package/src/workbench/chat/ChatConversationBar.tsx +3 -3
- package/src/workbench/chat/ChatHistoryMenu.tsx +1 -1
- package/src/workbench/chat/ChatMessageCollapsible.tsx +4 -0
- package/src/workbench/chat/ChatMessageItem.tsx +68 -10
- package/src/workbench/chat/ChatMessageList.tsx +1 -1
- package/src/workbench/chat/ChatPanel.tsx +32 -23
- package/src/workbench/chat/ChatPhasedRunProgress.tsx +86 -13
- package/src/workbench/chat/ChatRenameDialog.tsx +1 -1
- package/src/workbench/chat/chat-conversation.css +2 -2
- package/src/workbench/chat/chat-ui.css +8 -0
- package/src/workbench/chat/chatConversation.ts +2 -2
- package/src/workbench/chat/chatMessageMeta.tsx +4 -4
- package/src/workbench/chat/index.ts +1 -0
- package/src/workbench/chat/types.ts +7 -7
- package/src/workbench/chat/useCancelRuntimeOnUnmount.ts +4 -4
- package/src/workbench/chat/useChatPrependPagination.ts +10 -10
- package/src/workbench/chat/useSlashCommandSuggest.ts +1 -1
- package/src/workbench/{WorkbenchModalPortal.tsx → chrome/WorkbenchModalPortal.tsx} +1 -1
- package/src/workbench/chrome/workbench-chrome.css +4 -0
- package/src/workbench/chrome/workbench-layout-regions.css +13 -0
- package/src/workbench/chrome/workbench-shell-titlebar.css +0 -8
- package/src/workbench/{CommandGroupShell.tsx → commands/CommandGroupShell.tsx} +2 -2
- package/src/workbench/{CommandList.tsx → commands/CommandList.tsx} +6 -5
- package/src/workbench/{CommandPalette.tsx → commands/CommandPalette.tsx} +16 -42
- package/src/workbench/{ConfirmationFlow.tsx → commands/ConfirmationFlow.tsx} +5 -5
- package/src/workbench/{ShortcutCommandBridge.tsx → commands/ShortcutCommandBridge.tsx} +17 -13
- package/src/workbench/commands/WorkbenchQuickOpen.tsx +462 -0
- package/src/workbench/{command-model.ts → commands/command-model.ts} +5 -1
- package/src/workbench/commands/command-ui.ts +3 -0
- package/src/workbench/{commands.ts → commands/commands.ts} +45 -1
- package/src/workbench/commands/createWorkspaceFilesQuickOpenProvider.ts +86 -0
- package/src/workbench/commands/quick-open-model.ts +66 -0
- package/src/workbench/{WorkbenchEditorTabs.tsx → editor/WorkbenchEditorTabs.tsx} +13 -3
- package/src/workbench/{editor-tabs-dnd.ts → editor/editor-tabs-dnd.ts} +1 -1
- package/src/workbench/{editorTabContextMenu.ts → editor/editorTabContextMenu.ts} +43 -4
- package/src/workbench/{useEditorTabsStripDnd.ts → editor/useEditorTabsStripDnd.ts} +1 -1
- package/src/workbench/{useWorkbenchEditorTabContextMenu.tsx → editor/useWorkbenchEditorTabContextMenu.tsx} +16 -2
- package/src/workbench/editor-tabs/index.ts +10 -9
- package/src/workbench/index.ts +114 -74
- package/src/workbench/management/CommandManagementSidebar.tsx +16 -30
- package/src/workbench/management/ExtensionManagementPanel.tsx +84 -46
- package/src/workbench/management/ExtensionManagementSidebar.tsx +79 -45
- package/src/workbench/management/IntegrationCommandActions.tsx +8 -1
- package/src/workbench/management/IntegrationSettingsSurface.tsx +2 -5
- package/src/workbench/management/IntegrationsShell.tsx +1 -1
- package/src/workbench/management/KeybindingCaptureField.tsx +1 -9
- package/src/workbench/management/WorkbenchDialogFrame.tsx +2 -2
- package/src/workbench/management/WorkbenchNotice.tsx +17 -12
- package/src/workbench/management/createWorkbenchNotify.tsx +88 -0
- package/src/workbench/management/extension-install-approval.ts +72 -0
- package/src/workbench/management/extension-management-filters.ts +38 -0
- package/src/workbench/management/index.ts +18 -3
- package/src/workbench/management/management.css +28 -0
- package/src/workbench/management/types.ts +23 -1
- package/src/workbench/management/useWorkbenchNotify.ts +10 -0
- package/src/workbench/{MarkdownPreview.tsx → markdown/MarkdownPreview.tsx} +22 -7
- package/src/workbench/markdown/markdownRemarkPlugins.ts +12 -0
- package/src/workbench/markdown/sanitizeMarkdownHref.ts +29 -0
- package/src/workbench/schema/workbenchDocumentRenderer.tsx +48 -121
- package/src/workbench/settings/StructuredDataForm.tsx +1 -4
- package/src/workbench/settings/StructuredDataSchemaPanel.tsx +39 -44
- package/src/workbench/settings/sectionedPanelScrollSpy.ts +0 -81
- package/src/workbench/settings/structuredDataFormModel.ts +2 -1
- package/src/workbench/settings/structuredDataSchema.ts +24 -13
- package/src/workbench/settings/structuredDataSchemaSection.ts +4 -0
- package/src/workbench/settings/structuredDataSchemaTable.ts +5 -2
- package/src/workbench/{ActivityBar.tsx → shell/ActivityBar.tsx} +8 -12
- package/src/workbench/{ArtifactShell.tsx → shell/ArtifactShell.tsx} +25 -25
- package/src/workbench/{SplitView.tsx → shell/SplitView.tsx} +3 -3
- package/src/workbench/{StatusBar.tsx → shell/StatusBar.tsx} +8 -8
- package/src/workbench/{StructuredArtifactEditor.tsx → shell/StructuredArtifactEditor.tsx} +9 -9
- package/src/workbench/{Timeline.tsx → shell/Timeline.tsx} +77 -20
- package/src/workbench/{WorkbenchCanvasShell.defaults.ts → shell/WorkbenchCanvasShell.defaults.ts} +1 -1
- package/src/workbench/{WorkbenchCanvasShell.model.ts → shell/WorkbenchCanvasShell.model.ts} +5 -5
- package/src/workbench/{WorkbenchCanvasShell.tsx → shell/WorkbenchCanvasShell.tsx} +6 -6
- package/src/workbench/{WorkbenchDesktopTitleBar.tsx → shell/WorkbenchDesktopTitleBar.tsx} +15 -15
- package/src/workbench/{WorkbenchShell.tsx → shell/WorkbenchShell.tsx} +45 -6
- package/src/workbench/{WorkbenchShellTitleBarLayoutControls.tsx → shell/WorkbenchShellTitleBarLayoutControls.tsx} +16 -19
- package/src/workbench/{WorkbenchStandaloneShell.tsx → shell/WorkbenchStandaloneShell.tsx} +15 -22
- package/src/workbench/{WorkbenchViewEditor.tsx → shell/WorkbenchViewEditor.tsx} +7 -7
- package/src/workbench/{WorkbenchViewSidebar.tsx → shell/WorkbenchViewSidebar.tsx} +7 -7
- package/src/workbench/{WorkbenchWindowChromeControls.tsx → shell/WorkbenchWindowChromeControls.tsx} +18 -15
- package/src/workbench/shell/activity-bar.css +47 -0
- package/src/workbench/{activityBarOrder.ts → shell/activityBarOrder.ts} +2 -1
- package/src/workbench/{shell.ts → shell/shell.ts} +20 -13
- package/src/workbench/{shellViewModel.ts → shell/shellViewModel.ts} +3 -3
- package/src/workbench/{standalone.ts → shell/standalone.ts} +14 -2
- package/src/workbench/{useDeferredWorkbenchMount.ts → shell/useDeferredWorkbenchMount.ts} +3 -3
- package/src/workbench/{useWorkbenchAppearanceDocumentSync.tsx → shell/useWorkbenchAppearanceDocumentSync.tsx} +1 -1
- package/src/workbench/{useWorkbenchSidebarActionBarDnd.ts → shell/useWorkbenchSidebarActionBarDnd.ts} +1 -1
- package/src/workbench/{useWorkbenchSidebarViewPlacementDropZone.ts → shell/useWorkbenchSidebarViewPlacementDropZone.ts} +2 -2
- package/src/workbench/{workbenchSidebarLayoutContext.ts → shell/workbenchSidebarLayoutContext.ts} +0 -6
- package/src/workbench/{workbenchViewRouteState.ts → shell/workbenchViewRouteState.ts} +4 -4
- package/src/workbench/{WorkbenchThemeProvider.tsx → theme/WorkbenchThemeProvider.tsx} +4 -4
- package/src/workbench/{theme.ts → theme/theme.ts} +1 -1
- package/src/workbench/{themePresets.ts → theme/themePresets.ts} +3 -2
- package/src/workbench/views/command-list-density.css +36 -0
- package/src/workbench/views/command-list.css +2 -0
- package/src/workbench/views/extensions-sidebar.css +2 -0
- package/src/workbench/views/view-hosts.css +3 -3
- package/src/workbench/workspace/WorkspaceEditorPanel.tsx +1 -1
- package/src/workbench/workspace/WorkspaceExplorer.tsx +105 -4
- package/src/workbench/workspace/createVirtualWorkspaceExplorerPort.ts +1 -14
- package/src/workbench/workspace/workspaceExplorerKeyboard.ts +109 -0
- package/src/workbench/workspace/workspaceJsonDiagnostics.ts +6 -5
- package/src/workbench-menu-surfaces.css +3 -57
- package/src/brand/TilepaperAppIcon.tsx +0 -181
- package/src/brand/index.ts +0 -2
- package/src/brand/tilepaper-app-icon-geometry.ts +0 -201
- package/src/primitives/absolute-box/index.ts +0 -1
- package/src/primitives/catalog-browse-card/index.ts +0 -1
- package/src/primitives/catalog-browse-pane/index.ts +0 -3
- package/src/primitives/catalog-filter-overlay/index.ts +0 -1
- package/src/primitives/codicon/index.ts +0 -1
- package/src/primitives/external-link-button/index.ts +0 -1
- package/src/primitives/library-detail-layout/index.ts +0 -1
- package/src/primitives/library-facet-filter-panel/index.ts +0 -1
- package/src/primitives/library-facet-filter-strip/index.ts +0 -1
- package/src/primitives/panel-loading/index.ts +0 -1
- package/src/primitives/scroll-area-infinite-load/index.ts +0 -2
- package/src/primitives/workbench-thumbnail/index.ts +0 -1
- package/src/test-utils/workbenchMonacoMock.tsx +0 -37
- package/src/workbench/jdw/jdw-editors.css +0 -4
- package/src/workbench/jdw/jdw.css +0 -2
- package/src/workbench/management/integration-command-action.ts +0 -25
- package/src/workbench/markdownRemarkPlugins.ts +0 -4
- package/src/workbench/workbench-chrome.css +0 -4
- /package/src/workbench/{WorkbenchPlatformContext.tsx → chrome/WorkbenchPlatformContext.tsx} +0 -0
- /package/src/workbench/{workbenchModalViewState.ts → chrome/workbenchModalViewState.ts} +0 -0
- /package/src/workbench/{workbenchOverlaysContext.tsx → chrome/workbenchOverlaysContext.tsx} +0 -0
- /package/src/workbench/{workbenchPlatformChrome.ts → chrome/workbenchPlatformChrome.ts} +0 -0
- /package/src/workbench/{command-execution-policy.ts → commands/command-execution-policy.ts} +0 -0
- /package/src/workbench/{keyboard.ts → commands/keyboard.ts} +0 -0
- /package/src/workbench/{workbenchContextMenu.ts → commands/workbenchContextMenu.ts} +0 -0
- /package/src/workbench/{appearanceLabels.ts → shell/appearanceLabels.ts} +0 -0
- /package/src/workbench/{hardReset.ts → shell/hardReset.ts} +0 -0
- /package/src/workbench/{shellPresets.ts → shell/shellPresets.ts} +0 -0
- /package/src/workbench/{shellState.ts → shell/shellState.ts} +0 -0
- /package/src/workbench/{sidebarViewPlacementDnd.ts → shell/sidebarViewPlacementDnd.ts} +0 -0
- /package/src/workbench/{status.ts → shell/status.ts} +0 -0
- /package/src/workbench/{useWorkbenchSidebarLayout.tsx → shell/useWorkbenchSidebarLayout.tsx} +0 -0
- /package/src/workbench/{useWorkbenchStandaloneShellStateSync.tsx → shell/useWorkbenchStandaloneShellStateSync.tsx} +0 -0
- /package/src/workbench/{workbenchStandaloneShellReactContext.tsx → shell/workbenchStandaloneShellReactContext.tsx} +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
# `@workbench-kit/react`
|
|
2
|
+
|
|
3
|
+
React primitives and workbench chrome for integrating hosts (browser, desktop
|
|
4
|
+
shells, and other React hosts).
|
|
5
|
+
|
|
6
|
+
Published on npm with the **`prototype`** dist tag.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```powershell
|
|
11
|
+
pnpm add @workbench-kit/react@prototype @workbench-kit/tokens@prototype
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Peer: React 19.
|
|
15
|
+
|
|
16
|
+
## Styles
|
|
17
|
+
|
|
18
|
+
Import one bundle at the app entry. A host that renders the broad Workbench feature
|
|
19
|
+
set should use the core bundle, which excludes only the optional Auth and Chat
|
|
20
|
+
surfaces:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import '@workbench-kit/react/styles/core.css';
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Use `@workbench-kit/react/styles.css` when the host also renders Auth or Chat.
|
|
27
|
+
Component-only consumers can instead combine token styles with
|
|
28
|
+
`@workbench-kit/react/primitives.css`.
|
|
29
|
+
|
|
30
|
+
Focused entries avoid loading unrelated feature hubs:
|
|
31
|
+
|
|
32
|
+
| Entry | Owns |
|
|
33
|
+
| -------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
34
|
+
| `@workbench-kit/react/styles/foundation.css` | Theme tokens, Codicons, and shared scrollbars |
|
|
35
|
+
| `@workbench-kit/react/styles/overlay.css` | Context-menu overlay rules and compact context-menu density; import after `foundation.css` |
|
|
36
|
+
| `@workbench-kit/react/styles/core.css` | Broad Workbench feature set except Auth and Chat |
|
|
37
|
+
| `@workbench-kit/react/styles.css` | Full compatibility bundle |
|
|
38
|
+
|
|
39
|
+
For a non-shell surface that only uses co-located component styles and overlays:
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
import '@workbench-kit/react/styles/foundation.css';
|
|
43
|
+
import '@workbench-kit/react/styles/overlay.css';
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Use `core.css` for Workbench shell routes: shell composition commonly reaches Layout,
|
|
47
|
+
Settings, Views, Workspace, and modal styles that a narrower name would not safely imply.
|
|
48
|
+
When routes emit separate async CSS chunks, inspect the production manifest because
|
|
49
|
+
bundlers can repeat a shared CSS import across chunks.
|
|
50
|
+
|
|
51
|
+
The packed-consumer gate measures production `core.css` and focused overlay paths from
|
|
52
|
+
packed tarballs. It checks required/forbidden selectors, the focused-to-core ratio,
|
|
53
|
+
referenced static assets, and gzip budgets. Budget changes require an explicit initial-load
|
|
54
|
+
review.
|
|
55
|
+
|
|
56
|
+
## Quick start
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import { WorkbenchShell } from '@workbench-kit/react/workbench/shell';
|
|
60
|
+
|
|
61
|
+
export function AppShell() {
|
|
62
|
+
return (
|
|
63
|
+
<div className="ui-workbench-host-root" style={{ height: '100vh' }}>
|
|
64
|
+
<WorkbenchShell
|
|
65
|
+
activityBar={{
|
|
66
|
+
items: [
|
|
67
|
+
{ id: 'explorer', icon: <i className="codicon codicon-files" />, label: 'Explorer' },
|
|
68
|
+
],
|
|
69
|
+
}}
|
|
70
|
+
rootClassName="ide-root"
|
|
71
|
+
secondaryArea={<main>Editor region</main>}
|
|
72
|
+
statusSections={[]}
|
|
73
|
+
/>
|
|
74
|
+
</div>
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Full walkthrough: [Getting Started](../../docs/guides/getting-started.md).
|
|
80
|
+
|
|
81
|
+
## Common subpaths
|
|
82
|
+
|
|
83
|
+
| Subpath | Purpose |
|
|
84
|
+
| -------------------------------------------- | ------------------------------------ |
|
|
85
|
+
| `@workbench-kit/react/primitives` | App icons, controls, library layouts |
|
|
86
|
+
| `@workbench-kit/react/workbench/shell` | Workbench shell / activity bar |
|
|
87
|
+
| `@workbench-kit/react/workbench/workspace` | Explorer, workspace editor panel |
|
|
88
|
+
| `@workbench-kit/react/workbench/chat` | Chat panel and message surfaces |
|
|
89
|
+
| `@workbench-kit/react/overlay` | Context menus, anchored overlays |
|
|
90
|
+
| `@workbench-kit/react/modal` | Low-level modal frame |
|
|
91
|
+
| `@workbench-kit/react/jdw` | JDW preview bridges |
|
|
92
|
+
| `@workbench-kit/react/styles/foundation.css` | Theme/icon/scrollbar foundation |
|
|
93
|
+
| `@workbench-kit/react/styles/overlay.css` | Focused context-menu overlay CSS |
|
|
94
|
+
| `@workbench-kit/react/styles/core.css` | Core host CSS without Auth and Chat |
|
|
95
|
+
| `@workbench-kit/react/styles.css` | Full CSS including Auth and Chat |
|
|
96
|
+
|
|
97
|
+
Import **only** through `exports`. Do not deep-import `src/` paths.
|
|
98
|
+
|
|
99
|
+
## Host-owned app icon
|
|
100
|
+
|
|
101
|
+
`AppIcon` standardizes icon sizing and image fitting without embedding a product
|
|
102
|
+
mark. Supply either an image or custom content; the host remains responsible for
|
|
103
|
+
the artwork.
|
|
104
|
+
|
|
105
|
+
```tsx
|
|
106
|
+
import { AppIcon } from '@workbench-kit/react/primitives';
|
|
107
|
+
|
|
108
|
+
const appIcon = <AppIcon alt="Example app" src="/app-icon.svg" />;
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Quick Open providers
|
|
112
|
+
|
|
113
|
+
`WorkbenchQuickOpen` is a file/provider overlay distinct from the command palette.
|
|
114
|
+
Hosts (or `@workbench-kit/shell-react` `WorkbenchCommandHost`) pass pluggable
|
|
115
|
+
providers; the default workspace-files provider wraps
|
|
116
|
+
`searchWorkspaceFiles` from `@workbench-kit/workspace`.
|
|
117
|
+
|
|
118
|
+
```ts
|
|
119
|
+
import {
|
|
120
|
+
WorkbenchQuickOpen,
|
|
121
|
+
createWorkspaceFilesQuickOpenProvider,
|
|
122
|
+
type QuickOpenProvider,
|
|
123
|
+
} from '@workbench-kit/react/workbench';
|
|
124
|
+
|
|
125
|
+
const providers: QuickOpenProvider[] = [
|
|
126
|
+
createWorkspaceFilesQuickOpenProvider({
|
|
127
|
+
files: workspaceFiles,
|
|
128
|
+
recentPaths: ['src/App.tsx'],
|
|
129
|
+
}),
|
|
130
|
+
];
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Contract:
|
|
134
|
+
|
|
135
|
+
- `provider.search(query, { signal })` returns items (sync or `Promise`); the context is
|
|
136
|
+
optional so simple and existing single-provider implementations can keep a one-argument function
|
|
137
|
+
- Without `providerId`, providers search concurrently and contribute results as they settle;
|
|
138
|
+
final grouping is deterministic by declared provider order, then provider item order
|
|
139
|
+
- A rejected or slow provider does not block results from other providers; query/provider changes
|
|
140
|
+
abort the prior signal and late results are ignored
|
|
141
|
+
- `onProviderError` can observe an isolated provider failure without failing the whole search
|
|
142
|
+
- Every result shows its provider label, and selection reports the matching `providerId`
|
|
143
|
+
- Provider IDs are unique; item IDs only need to be stable within their provider
|
|
144
|
+
- Set `providerId` to restrict the overlay to one provider
|
|
145
|
+
- Empty query → all files, with optional `recentPaths` elevated first
|
|
146
|
+
- Enter selects the active item; Escape closes (modal focus trap)
|
|
147
|
+
- Shell default: Ctrl/Cmd+P opens Quick Open; Ctrl/Cmd+Shift+P opens the command palette
|
|
148
|
+
|
|
149
|
+
## Learn more
|
|
150
|
+
|
|
151
|
+
| Doc | Purpose |
|
|
152
|
+
| ---------------------------------------------------------------------- | ----------------------------- |
|
|
153
|
+
| [Getting Started](../../docs/guides/getting-started.md) | Install + minimal shell |
|
|
154
|
+
| [Component Map](../../docs/guides/component-map.md) | Surface → Storybook / sample |
|
|
155
|
+
| [Sample Screens](../../docs/guides/sample-screens.md) | Example screen recipes |
|
|
156
|
+
| [Consumer Capabilities](../../docs/workbench/consumer-capabilities.md) | Props / when-to-use contracts |
|
|
157
|
+
| [API Reference](../../docs/guides/api-reference.md) | Package export index |
|
|
158
|
+
|
|
159
|
+
## Local verification (this monorepo)
|
|
160
|
+
|
|
161
|
+
```powershell
|
|
162
|
+
pnpm install
|
|
163
|
+
pnpm build:workbench-extensions
|
|
164
|
+
pnpm dev
|
|
165
|
+
pnpm dev:storybook
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
Storybook stays a curated set of interaction stories — not a full package gallery.
|
|
169
|
+
Demo and story modules under this package are for development; published consumers
|
|
170
|
+
rely on the `exports` map and CSS entry points above.
|
|
171
|
+
Storybook and the sample host intentionally keep `styles.css` so they exercise the
|
|
172
|
+
full compatibility graph; focused production consumers are covered by the packed gate.
|
package/package.json
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workbench-kit/react",
|
|
3
|
-
"version": "0.0.2-prototype.0.2.
|
|
3
|
+
"version": "0.0.2-prototype.0.2.40",
|
|
4
4
|
"private": false,
|
|
5
|
+
"sideEffects": [
|
|
6
|
+
"**/*.css"
|
|
7
|
+
],
|
|
5
8
|
"type": "module",
|
|
9
|
+
"typesVersions": {
|
|
10
|
+
"*": {
|
|
11
|
+
"overlay/context-menu-item": [
|
|
12
|
+
"src/overlay/context-menu-item.ts"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
15
|
+
},
|
|
6
16
|
"exports": {
|
|
7
17
|
".": "./src/index.ts",
|
|
8
18
|
"./drag-mime": "./src/utils/dragMime.ts",
|
|
@@ -11,7 +21,7 @@
|
|
|
11
21
|
"./editor-tabs": "./src/workbench/editor-tabs/index.ts",
|
|
12
22
|
"./icons": "./src/icons/index.ts",
|
|
13
23
|
"./overlay": "./src/overlay/index.ts",
|
|
14
|
-
"./
|
|
24
|
+
"./overlay/context-menu-item": "./src/overlay/context-menu-item.ts",
|
|
15
25
|
"./primitives": "./src/primitives/index.ts",
|
|
16
26
|
"./primitives.css": "./src/primitives/styles.css",
|
|
17
27
|
"./workbench/auth": "./src/workbench/auth/index.ts",
|
|
@@ -20,17 +30,20 @@
|
|
|
20
30
|
"./workbench/management": "./src/workbench/management/index.ts",
|
|
21
31
|
"./workbench/settings": "./src/workbench/settings/index.ts",
|
|
22
32
|
"./workbench": "./src/workbench/index.ts",
|
|
23
|
-
"./workbench/activityBarOrder": "./src/workbench/activityBarOrder.ts",
|
|
24
|
-
"./workbench/
|
|
25
|
-
"./workbench/
|
|
26
|
-
"./workbench/
|
|
27
|
-
"./workbench/
|
|
28
|
-
"./workbench/
|
|
33
|
+
"./workbench/activityBarOrder": "./src/workbench/shell/activityBarOrder.ts",
|
|
34
|
+
"./workbench/command-ui": "./src/workbench/commands/command-ui.ts",
|
|
35
|
+
"./workbench/markdown-preview": "./src/workbench/markdown/MarkdownPreview.tsx",
|
|
36
|
+
"./workbench/shell": "./src/workbench/shell/shell.ts",
|
|
37
|
+
"./workbench/standalone": "./src/workbench/shell/standalone.ts",
|
|
38
|
+
"./workbench/theme": "./src/workbench/theme/theme.ts",
|
|
39
|
+
"./workbench/theme-provider": "./src/workbench/theme/WorkbenchThemeProvider.tsx",
|
|
40
|
+
"./workbench/themePresets": "./src/workbench/theme/themePresets.ts",
|
|
41
|
+
"./workbench/split-view": "./src/workbench/shell/SplitView.tsx",
|
|
29
42
|
"./workbench/workspace": "./src/workbench/workspace/index.ts",
|
|
30
43
|
"./workbench/workspace/editor": "./src/workbench/workspace/WorkspaceEditor.tsx",
|
|
31
44
|
"./workbench/workspace/explorer": "./src/workbench/workspace/WorkspaceExplorer.tsx",
|
|
32
45
|
"./workbench/workspace/file-icon": "./src/icons/file-icon.ts",
|
|
33
|
-
"./workbench/commands": "./src/workbench/commands.ts",
|
|
46
|
+
"./workbench/commands": "./src/workbench/commands/commands.ts",
|
|
34
47
|
"./jdw": "./src/jdw/index.ts",
|
|
35
48
|
"./jdw/document": "./src/jdw/document.ts",
|
|
36
49
|
"./jdw/parse": "./src/jdw/parse.ts",
|
|
@@ -41,6 +54,9 @@
|
|
|
41
54
|
"./widget-tree": "./src/widget-tree/index.ts",
|
|
42
55
|
"./widget-asset": "./src/widget-asset/index.ts",
|
|
43
56
|
"./widget-studio": "./src/widget-studio/index.ts",
|
|
57
|
+
"./styles/core.css": "./src/styles/core.css",
|
|
58
|
+
"./styles/foundation.css": "./src/styles/foundation.css",
|
|
59
|
+
"./styles/overlay.css": "./src/styles/overlay.css",
|
|
44
60
|
"./styles.css": "./src/styles.css",
|
|
45
61
|
"./workbench-menu-surfaces.css": "./src/workbench-menu-surfaces.css"
|
|
46
62
|
},
|
|
@@ -54,18 +70,18 @@
|
|
|
54
70
|
"!src/**/*.stories.tsx"
|
|
55
71
|
],
|
|
56
72
|
"dependencies": {
|
|
57
|
-
"@dnd-kit/core": "^6.3.1",
|
|
58
73
|
"@vscode/codicons": "^0.0.45",
|
|
59
74
|
"remark-gfm": "^4.0.1",
|
|
60
|
-
"
|
|
61
|
-
"@workbench-kit/
|
|
62
|
-
"@workbench-kit/contracts": "0.0.2-prototype.0.2.
|
|
63
|
-
"@workbench-kit/
|
|
64
|
-
"@workbench-kit/
|
|
65
|
-
"@workbench-kit/
|
|
66
|
-
"@workbench-kit/
|
|
67
|
-
"@workbench-kit/
|
|
68
|
-
"@workbench-kit/
|
|
75
|
+
"rehype-sanitize": "^6.0.0",
|
|
76
|
+
"@workbench-kit/adapters": "0.0.2-prototype.0.2.40",
|
|
77
|
+
"@workbench-kit/contracts": "0.0.2-prototype.0.2.40",
|
|
78
|
+
"@workbench-kit/jdw": "0.0.2-prototype.0.2.40",
|
|
79
|
+
"@workbench-kit/monaco": "0.0.2-prototype.0.2.40",
|
|
80
|
+
"@workbench-kit/services": "0.0.2-prototype.0.2.40",
|
|
81
|
+
"@workbench-kit/platform": "0.0.2-prototype.0.2.40",
|
|
82
|
+
"@workbench-kit/tokens": "0.0.2-prototype.0.2.40",
|
|
83
|
+
"@workbench-kit/workspace": "0.0.2-prototype.0.2.40",
|
|
84
|
+
"@workbench-kit/runtime": "0.0.2-prototype.0.2.40"
|
|
69
85
|
},
|
|
70
86
|
"peerDependencies": {
|
|
71
87
|
"react": "^19.0.0",
|
|
@@ -88,7 +104,8 @@
|
|
|
88
104
|
"directory": "packages/react"
|
|
89
105
|
},
|
|
90
106
|
"scripts": {
|
|
91
|
-
"test": "pnpm exec vitest run --config ../../vitest.config.ts src
|
|
92
|
-
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
107
|
+
"test": "pnpm exec vitest run --config ../../vitest.config.ts src",
|
|
108
|
+
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
109
|
+
"typecheck:exact-optional": "tsc -p typecheck-exact-optional/tsconfig.emit.json && tsc -p typecheck-exact-optional/tsconfig.json --noEmit"
|
|
93
110
|
}
|
|
94
111
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export { Modal } from './modal/Modal';
|
|
2
2
|
export type { ModalBodyLayout, ModalBodyPadding, ModalProps } from './modal/Modal';
|
|
3
|
-
export { TilepaperAppIcon } from './brand/TilepaperAppIcon';
|
|
4
|
-
export type { TilepaperAppIconProps } from './brand/TilepaperAppIcon';
|
|
5
3
|
export {
|
|
6
4
|
WorkbenchIcon,
|
|
7
5
|
WorkbenchIconProvider,
|
|
@@ -20,7 +18,12 @@ export type {
|
|
|
20
18
|
WorkbenchIconRenderProps,
|
|
21
19
|
WorkbenchIconResolver,
|
|
22
20
|
} from './icons';
|
|
23
|
-
export { commandMenuItemsToContextMenuItems } from './workbench/commands';
|
|
21
|
+
export { commandMenuItemsToContextMenuItems } from './workbench/commands/commands';
|
|
22
|
+
export type {
|
|
23
|
+
ExtensionManagementEntry,
|
|
24
|
+
ExtensionManagementPanelProps,
|
|
25
|
+
ExtensionManagementTransition,
|
|
26
|
+
} from './workbench/management';
|
|
24
27
|
export {
|
|
25
28
|
WorkbenchArtifactModeControls,
|
|
26
29
|
WorkbenchArtifactPreview,
|
|
@@ -31,7 +34,7 @@ export {
|
|
|
31
34
|
getWorkbenchPreviewRenderer,
|
|
32
35
|
getWorkbenchPreviewRendererMatch,
|
|
33
36
|
selectWorkbenchPreviewRenderer,
|
|
34
|
-
} from './workbench/ArtifactShell';
|
|
37
|
+
} from './workbench/shell/ArtifactShell';
|
|
35
38
|
export type {
|
|
36
39
|
WorkbenchArtifactDescriptor,
|
|
37
40
|
WorkbenchArtifactMode,
|
|
@@ -44,7 +47,7 @@ export type {
|
|
|
44
47
|
WorkbenchPreviewRendererContext,
|
|
45
48
|
WorkbenchPreviewRendererMatch,
|
|
46
49
|
WorkbenchPreviewRendererMatchReason,
|
|
47
|
-
} from './workbench/ArtifactShell';
|
|
50
|
+
} from './workbench/shell/ArtifactShell';
|
|
48
51
|
export {
|
|
49
52
|
WorkbenchCommandGroupShell,
|
|
50
53
|
WorkbenchCommandList,
|
|
@@ -58,7 +61,16 @@ export {
|
|
|
58
61
|
getWorkbenchCommandStatusLabel,
|
|
59
62
|
groupWorkbenchCommands,
|
|
60
63
|
isWorkbenchCommandRunnable,
|
|
61
|
-
} from './workbench/CommandPalette';
|
|
64
|
+
} from './workbench/commands/CommandPalette';
|
|
65
|
+
export {
|
|
66
|
+
DEFAULT_QUICK_OPEN_SEARCH_DEBOUNCE_MS,
|
|
67
|
+
WORKSPACE_FILES_QUICK_OPEN_PROVIDER_ID,
|
|
68
|
+
WorkbenchQuickOpen,
|
|
69
|
+
createWorkspaceFilesQuickOpenProvider,
|
|
70
|
+
getNextQuickOpenItemIndex,
|
|
71
|
+
isQuickOpenItemSelectable,
|
|
72
|
+
resolveQuickOpenItemPath,
|
|
73
|
+
} from './workbench/commands/WorkbenchQuickOpen';
|
|
62
74
|
export {
|
|
63
75
|
WorkbenchShortcutCommandBridge,
|
|
64
76
|
getWorkbenchShortcutCommandBindings,
|
|
@@ -66,7 +78,7 @@ export {
|
|
|
66
78
|
matchesWorkbenchShortcut,
|
|
67
79
|
runWorkbenchShortcutCommand,
|
|
68
80
|
useWorkbenchShortcutCommands,
|
|
69
|
-
} from './workbench/ShortcutCommandBridge';
|
|
81
|
+
} from './workbench/commands/ShortcutCommandBridge';
|
|
70
82
|
export type {
|
|
71
83
|
WorkbenchCommandDescriptor,
|
|
72
84
|
WorkbenchCommandDescriptorOverrides,
|
|
@@ -86,7 +98,15 @@ export type {
|
|
|
86
98
|
WorkbenchCommandSideEffect,
|
|
87
99
|
WorkbenchCommandStatus,
|
|
88
100
|
WorkbenchCommandSuggestProps,
|
|
89
|
-
} from './workbench/CommandPalette';
|
|
101
|
+
} from './workbench/commands/CommandPalette';
|
|
102
|
+
export type {
|
|
103
|
+
CreateWorkspaceFilesQuickOpenProviderOptions,
|
|
104
|
+
QuickOpenItem,
|
|
105
|
+
QuickOpenProvider,
|
|
106
|
+
QuickOpenSearchContext,
|
|
107
|
+
QuickOpenSelectContext,
|
|
108
|
+
WorkbenchQuickOpenProps,
|
|
109
|
+
} from './workbench/commands/WorkbenchQuickOpen';
|
|
90
110
|
export type {
|
|
91
111
|
UseWorkbenchShortcutCommandsOptions,
|
|
92
112
|
WorkbenchShortcutCommandBinding,
|
|
@@ -98,7 +118,7 @@ export type {
|
|
|
98
118
|
WorkbenchShortcutEventLike,
|
|
99
119
|
WorkbenchShortcutMatchInput,
|
|
100
120
|
WorkbenchShortcutPlatform,
|
|
101
|
-
} from './workbench/ShortcutCommandBridge';
|
|
121
|
+
} from './workbench/commands/ShortcutCommandBridge';
|
|
102
122
|
export {
|
|
103
123
|
WorkbenchConfirmationFlow,
|
|
104
124
|
getWorkbenchConfirmationButtonVariant,
|
|
@@ -107,7 +127,7 @@ export {
|
|
|
107
127
|
getWorkbenchConfirmationStatus,
|
|
108
128
|
getWorkbenchConfirmationVariant,
|
|
109
129
|
isWorkbenchConfirmationActionDisabled,
|
|
110
|
-
} from './workbench/ConfirmationFlow';
|
|
130
|
+
} from './workbench/commands/ConfirmationFlow';
|
|
111
131
|
export type {
|
|
112
132
|
WorkbenchConfirmationAction,
|
|
113
133
|
WorkbenchConfirmationCancelContext,
|
|
@@ -118,7 +138,7 @@ export type {
|
|
|
118
138
|
WorkbenchConfirmationReason,
|
|
119
139
|
WorkbenchConfirmationSideEffect,
|
|
120
140
|
WorkbenchConfirmationVariant,
|
|
121
|
-
} from './workbench/ConfirmationFlow';
|
|
141
|
+
} from './workbench/commands/ConfirmationFlow';
|
|
122
142
|
export {
|
|
123
143
|
WorkbenchAuthGate,
|
|
124
144
|
WorkbenchLoginBrandMark,
|
|
@@ -161,7 +181,7 @@ export {
|
|
|
161
181
|
getWorkbenchTimelineEventLabel,
|
|
162
182
|
getWorkbenchTimelineEventStatus,
|
|
163
183
|
getWorkbenchTimelineMetadataEntries,
|
|
164
|
-
} from './workbench/Timeline';
|
|
184
|
+
} from './workbench/shell/Timeline';
|
|
165
185
|
export type {
|
|
166
186
|
WorkbenchTimelineEvent,
|
|
167
187
|
WorkbenchTimelineEventKind,
|
|
@@ -173,7 +193,7 @@ export type {
|
|
|
173
193
|
WorkbenchTimelineRenderMetadata,
|
|
174
194
|
WorkbenchTimelineRenderPayload,
|
|
175
195
|
WorkbenchTimelineVariant,
|
|
176
|
-
} from './workbench/Timeline';
|
|
196
|
+
} from './workbench/shell/Timeline';
|
|
177
197
|
export { ConfirmDialog } from './modal/ConfirmDialog';
|
|
178
198
|
export type { ConfirmDialogProps } from './modal/ConfirmDialog';
|
|
179
199
|
export { ContextMenu } from './overlay/ContextMenu';
|
|
@@ -198,15 +218,20 @@ export type {
|
|
|
198
218
|
export {
|
|
199
219
|
createPointerPassthroughController,
|
|
200
220
|
isPointerOverHitRegion,
|
|
221
|
+
resolvePointerHitTarget,
|
|
201
222
|
} from './overlay/pointerPassthroughRegion';
|
|
202
223
|
export type {
|
|
224
|
+
PointerHitTestDocument,
|
|
203
225
|
PointerOverHitRegionOptions,
|
|
204
226
|
PointerPassthroughController,
|
|
205
227
|
PointerPassthroughControllerOptions,
|
|
206
228
|
PointerPassthroughPort,
|
|
207
229
|
} from './overlay/pointerPassthroughRegion';
|
|
208
230
|
export { usePointerPassthroughRegion } from './overlay/usePointerPassthroughRegion';
|
|
209
|
-
export type {
|
|
231
|
+
export type {
|
|
232
|
+
PointerHitTargetResolver,
|
|
233
|
+
UsePointerPassthroughRegionOptions,
|
|
234
|
+
} from './overlay/usePointerPassthroughRegion';
|
|
210
235
|
export {
|
|
211
236
|
getWorkbenchStatusDescriptor,
|
|
212
237
|
getWorkbenchStatusLabel,
|
|
@@ -216,17 +241,16 @@ export {
|
|
|
216
241
|
isWorkbenchStatusDisabled,
|
|
217
242
|
isWorkbenchStatusUnavailable,
|
|
218
243
|
workbenchStatusFromLifecycleStatus,
|
|
219
|
-
} from './workbench/status';
|
|
244
|
+
} from './workbench/shell/status';
|
|
220
245
|
export type {
|
|
221
246
|
WorkbenchStatus,
|
|
222
247
|
WorkbenchStatusDescriptor,
|
|
223
248
|
WorkbenchStatusVariant,
|
|
224
|
-
} from './workbench/status';
|
|
249
|
+
} from './workbench/shell/status';
|
|
225
250
|
export {
|
|
226
251
|
FilterBar,
|
|
227
252
|
FilterBarActiveChips,
|
|
228
253
|
FilterBarRow,
|
|
229
|
-
FilterChip,
|
|
230
254
|
HelpText,
|
|
231
255
|
Panel,
|
|
232
256
|
PanelBody,
|
|
@@ -251,7 +275,6 @@ export type {
|
|
|
251
275
|
FilterBarActiveChipsProps,
|
|
252
276
|
FilterBarRowProps,
|
|
253
277
|
FilterBarProps,
|
|
254
|
-
FilterChipProps,
|
|
255
278
|
HelpTextProps,
|
|
256
279
|
PanelBodyProps,
|
|
257
280
|
PanelFooterProps,
|
|
@@ -276,6 +299,7 @@ export {
|
|
|
276
299
|
SideBarHeaderControl,
|
|
277
300
|
SideBarList,
|
|
278
301
|
SideBarListItem,
|
|
302
|
+
SideBarTree,
|
|
279
303
|
SideBarViewFrame,
|
|
280
304
|
SideBarRow,
|
|
281
305
|
SidebarActionIconBar,
|
|
@@ -286,12 +310,20 @@ export {
|
|
|
286
310
|
WorkbenchSidebarSection,
|
|
287
311
|
WorkbenchSidebarSectionHeader,
|
|
288
312
|
WorkbenchSidebarSectionStack,
|
|
313
|
+
flattenVisibleSideBarTreeItems,
|
|
314
|
+
isSideBarTreeBranch,
|
|
315
|
+
selectSideBarTreeIds,
|
|
316
|
+
toggleSideBarTreeId,
|
|
289
317
|
useSidebarSectionBaseDepth,
|
|
290
318
|
} from './layout/sidebar';
|
|
291
319
|
export type {
|
|
292
320
|
SideBarHeaderControlProps,
|
|
293
321
|
SideBarListItemProps,
|
|
294
322
|
SideBarListProps,
|
|
323
|
+
SideBarTreeItem,
|
|
324
|
+
SideBarTreeProps,
|
|
325
|
+
SideBarTreeSelectionMode,
|
|
326
|
+
SideBarTreeVisibleNode,
|
|
295
327
|
SideBarViewFrameProps,
|
|
296
328
|
SideBarRowProps,
|
|
297
329
|
SidebarActionIconBarProps,
|
|
@@ -567,7 +599,7 @@ export {
|
|
|
567
599
|
StatusBar as WorkbenchStatusBar,
|
|
568
600
|
StatusBarItem as WorkbenchStatusBarItem,
|
|
569
601
|
StatusBarSection as WorkbenchStatusBarSection,
|
|
570
|
-
} from './workbench/StatusBar';
|
|
602
|
+
} from './workbench/shell/StatusBar';
|
|
571
603
|
export type {
|
|
572
604
|
StatusBarItemModel as WorkbenchStatusBarItemModel,
|
|
573
605
|
StatusBarItemProps as WorkbenchStatusBarItemProps,
|
|
@@ -575,9 +607,11 @@ export type {
|
|
|
575
607
|
StatusBarSectionAlign as WorkbenchStatusBarSectionAlign,
|
|
576
608
|
StatusBarSectionModel as WorkbenchStatusBarSectionModel,
|
|
577
609
|
StatusBarSectionProps as WorkbenchStatusBarSectionProps,
|
|
578
|
-
} from './workbench/StatusBar';
|
|
610
|
+
} from './workbench/shell/StatusBar';
|
|
579
611
|
export { AbsoluteBox } from './primitives';
|
|
580
612
|
export type { AbsoluteBoxProps, WorkbenchRect } from './primitives';
|
|
613
|
+
export { AppIcon } from './primitives';
|
|
614
|
+
export type { AppIconProps, AppIconSize } from './primitives';
|
|
581
615
|
export { Badge } from './primitives';
|
|
582
616
|
export type { BadgeProps } from './primitives';
|
|
583
617
|
export { Button } from './primitives';
|
|
@@ -643,8 +677,13 @@ export type {
|
|
|
643
677
|
} from './primitives';
|
|
644
678
|
export { CatalogFilterOverlay } from './primitives';
|
|
645
679
|
export type { CatalogFilterOverlayProps } from './primitives';
|
|
646
|
-
export { LibraryDetailLayout } from './primitives';
|
|
647
|
-
export type {
|
|
680
|
+
export { LibraryDetailLayout, resolveLibraryDetailHeroCoverMedia } from './primitives';
|
|
681
|
+
export type {
|
|
682
|
+
LibraryDetailLayoutMode,
|
|
683
|
+
LibraryDetailLayoutProps,
|
|
684
|
+
ResolveLibraryDetailHeroCoverMediaInput,
|
|
685
|
+
ResolvedLibraryDetailHeroCoverMedia,
|
|
686
|
+
} from './primitives';
|
|
648
687
|
export { WorkbenchMediaPlaceholder } from './primitives';
|
|
649
688
|
export type { WorkbenchMediaPlaceholderProps } from './primitives';
|
|
650
689
|
export { WorkbenchMediaSlot } from './primitives';
|
|
@@ -685,8 +724,8 @@ export type {
|
|
|
685
724
|
WorkspaceDraftsContextValue,
|
|
686
725
|
WorkspaceDraftsProviderProps,
|
|
687
726
|
} from './workbench/workspace/WorkspaceDraftsContext';
|
|
688
|
-
export { StructuredArtifactEditor } from './workbench/StructuredArtifactEditor';
|
|
689
|
-
export type { StructuredArtifactEditorProps } from './workbench/StructuredArtifactEditor';
|
|
727
|
+
export { StructuredArtifactEditor } from './workbench/shell/StructuredArtifactEditor';
|
|
728
|
+
export type { StructuredArtifactEditorProps } from './workbench/shell/StructuredArtifactEditor';
|
|
690
729
|
export { createStringDragMime, createTypedDragMime } from './utils/dragMime';
|
|
691
730
|
export type { TypedDragMime, TypedDragMimeOptions } from './utils/dragMime';
|
|
692
731
|
export {
|
|
@@ -698,29 +737,30 @@ export {
|
|
|
698
737
|
readEditorTabDragPayload,
|
|
699
738
|
resolveEditorTabDropTarget,
|
|
700
739
|
resolveEditorTabStripDropTarget,
|
|
701
|
-
} from './workbench/editor-tabs-dnd';
|
|
702
|
-
export type { EditorTabDragPayload, EditorTabDropTarget } from './workbench/editor-tabs-dnd';
|
|
703
|
-
export { useEditorTabsStripDnd } from './workbench/useEditorTabsStripDnd';
|
|
740
|
+
} from './workbench/editor/editor-tabs-dnd';
|
|
741
|
+
export type { EditorTabDragPayload, EditorTabDropTarget } from './workbench/editor/editor-tabs-dnd';
|
|
742
|
+
export { useEditorTabsStripDnd } from './workbench/editor/useEditorTabsStripDnd';
|
|
704
743
|
export type {
|
|
705
744
|
UseEditorTabsStripDndOptions,
|
|
706
745
|
UseEditorTabsStripDndResult,
|
|
707
|
-
} from './workbench/useEditorTabsStripDnd';
|
|
708
|
-
export { WorkbenchEditorTabs } from './workbench/WorkbenchEditorTabs';
|
|
709
|
-
export type { WorkbenchEditorTabsProps } from './workbench/WorkbenchEditorTabs';
|
|
746
|
+
} from './workbench/editor/useEditorTabsStripDnd';
|
|
747
|
+
export { WorkbenchEditorTabs } from './workbench/editor/WorkbenchEditorTabs';
|
|
748
|
+
export type { WorkbenchEditorTabsProps } from './workbench/editor/WorkbenchEditorTabs';
|
|
710
749
|
export {
|
|
711
750
|
createWorkbenchStandaloneEditorTabCommandContext,
|
|
712
751
|
createWorkbenchStandaloneEditorTabContextMenuItems,
|
|
713
752
|
isWorkbenchEditorTabClosable,
|
|
714
|
-
} from './workbench/editorTabContextMenu';
|
|
753
|
+
} from './workbench/editor/editorTabContextMenu';
|
|
715
754
|
export type {
|
|
716
755
|
CreateWorkbenchStandaloneEditorTabCommandContextInput,
|
|
756
|
+
CreateWorkbenchStandaloneEditorTabContextMenuItemsInput,
|
|
717
757
|
WorkbenchStandaloneEditorTabLike,
|
|
718
|
-
} from './workbench/editorTabContextMenu';
|
|
719
|
-
export { useWorkbenchEditorTabContextMenu } from './workbench/useWorkbenchEditorTabContextMenu';
|
|
758
|
+
} from './workbench/editor/editorTabContextMenu';
|
|
759
|
+
export { useWorkbenchEditorTabContextMenu } from './workbench/editor/useWorkbenchEditorTabContextMenu';
|
|
720
760
|
export type {
|
|
721
761
|
UseWorkbenchEditorTabContextMenuOptions,
|
|
722
762
|
UseWorkbenchEditorTabContextMenuResult,
|
|
723
|
-
} from './workbench/useWorkbenchEditorTabContextMenu';
|
|
763
|
+
} from './workbench/editor/useWorkbenchEditorTabContextMenu';
|
|
724
764
|
export {
|
|
725
765
|
clampPreviewViewportZoom,
|
|
726
766
|
computePreviewViewportFitScale,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
StatusBar as WorkbenchStatusBar,
|
|
21
21
|
StatusBarItem as WorkbenchStatusBarItem,
|
|
22
22
|
StatusBarSection as WorkbenchStatusBarSection,
|
|
23
|
-
} from '../workbench/StatusBar';
|
|
23
|
+
} from '../workbench/shell/StatusBar';
|
|
24
24
|
import { WorkspaceEditor, type WorkspaceEditorTheme } from '../workbench/workspace/WorkspaceEditor';
|
|
25
25
|
import type { WorkspaceFile } from '../workbench/workspace/types';
|
|
26
26
|
|
|
@@ -245,11 +245,12 @@ export function JsonCodeEditorPane({
|
|
|
245
245
|
const configureJsonSchema = (monaco: WorkbenchMonaco, path: string) => {
|
|
246
246
|
if (!jsonSchema) return;
|
|
247
247
|
|
|
248
|
-
const
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
248
|
+
const jsonLanguage = monaco.languages.json as unknown as
|
|
249
|
+
| {
|
|
250
|
+
jsonDefaults?: { setDiagnosticsOptions: (options: unknown) => void };
|
|
251
|
+
}
|
|
252
|
+
| undefined;
|
|
253
|
+
const jsonDefaults = jsonLanguage?.jsonDefaults;
|
|
253
254
|
if (!jsonDefaults) return;
|
|
254
255
|
|
|
255
256
|
jsonDefaults.setDiagnosticsOptions({
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { createElement, type CSSProperties, type ReactNode } from 'react';
|
|
2
2
|
import type { GenericWidget } from '@workbench-kit/jdw';
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
6
|
-
}
|
|
4
|
+
import { readNumber } from '../../utils/readNumber';
|
|
7
5
|
|
|
8
6
|
function readString(value: unknown): string | undefined {
|
|
9
7
|
return typeof value === 'string' && value.trim().length > 0 ? value.trim() : undefined;
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
type GenericWidget,
|
|
11
11
|
} from '@workbench-kit/jdw';
|
|
12
12
|
|
|
13
|
+
import { readNumber } from '../utils/readNumber';
|
|
13
14
|
import { renderBuiltinWidgetLeaf } from './builtins/renderBuiltinWidgetLeaf.js';
|
|
14
15
|
|
|
15
16
|
const LAYOUT_INSPECTOR = [
|
|
@@ -73,10 +74,6 @@ function build(widget: WidgetTypeShape) {
|
|
|
73
74
|
return renderBuiltinWidgetLeaf(widget as GenericWidget);
|
|
74
75
|
}
|
|
75
76
|
|
|
76
|
-
function readNumber(value: unknown): number | undefined {
|
|
77
|
-
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
77
|
function readString(value: unknown): string | undefined {
|
|
81
78
|
return typeof value === 'string' && value.trim().length > 0 ? value : undefined;
|
|
82
79
|
}
|
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
type WidgetPath,
|
|
23
23
|
} from '@workbench-kit/jdw';
|
|
24
24
|
|
|
25
|
+
import { readNumber } from '../utils/readNumber';
|
|
25
26
|
import { renderBuiltinWidgetLeaf } from './builtins/renderBuiltinWidgetLeaf.js';
|
|
26
27
|
import { BUILTIN_JDW_REGISTRY } from './createBuiltinJdwRegistry.js';
|
|
27
28
|
export interface CssRenderBackendOptions {
|
|
@@ -45,10 +46,6 @@ const LAYOUT_CONTAINER_TYPES = new Set([
|
|
|
45
46
|
'sized_box',
|
|
46
47
|
]);
|
|
47
48
|
|
|
48
|
-
function readNumber(value: unknown): number | undefined {
|
|
49
|
-
return typeof value === 'number' && Number.isFinite(value) ? value : undefined;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
49
|
function renderFromRegistry(
|
|
53
50
|
registry: WidgetRegistryContract<unknown>,
|
|
54
51
|
widget: GenericWidget,
|
|
@@ -35,18 +35,3 @@ export const JDW_FIXTURE_ROW_FLEX = `{
|
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
`;
|
|
38
|
-
|
|
39
|
-
export const JDW_FIXTURE_GRID_CELLS = `{
|
|
40
|
-
"type": "grid",
|
|
41
|
-
"args": {
|
|
42
|
-
"columns": 2,
|
|
43
|
-
"gap": 8,
|
|
44
|
-
"padding": 12,
|
|
45
|
-
"children": [
|
|
46
|
-
{ "type": "text", "args": { "text": "A", "col": 0, "row": 0 } },
|
|
47
|
-
{ "type": "text", "args": { "text": "B", "col": 1, "row": 0 } },
|
|
48
|
-
{ "type": "text", "args": { "text": "Wide", "col": 0, "row": 1, "colSpan": 2 } }
|
|
49
|
-
]
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
`;
|