@workbench-kit/shell-react 0.0.2-prototype.0.2.21 → 0.0.2-prototype.0.2.23
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 +12 -6
- package/package.json +15 -10
- package/src/shell/shell.tsx +1 -2
- package/src/workbench/layout-storage.ts +5 -3
package/README.md
CHANGED
|
@@ -17,16 +17,15 @@ Peer: React 19.
|
|
|
17
17
|
## Quick start
|
|
18
18
|
|
|
19
19
|
```tsx
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
} from '@workbench-kit/shell-react';
|
|
20
|
+
import { BUILTIN_WORKBENCH_EXTENSIONS } from '@workbench-kit/shell-react';
|
|
21
|
+
import { EditorArea } from '@workbench-kit/shell-react';
|
|
22
|
+
import { WorkbenchProvider } from '@workbench-kit/shell-react/provider';
|
|
23
|
+
import { WorkbenchShell } from '@workbench-kit/shell-react/shell';
|
|
25
24
|
|
|
26
25
|
export function App() {
|
|
27
26
|
return (
|
|
28
27
|
<WorkbenchProvider availableExtensions={BUILTIN_WORKBENCH_EXTENSIONS}>
|
|
29
|
-
<WorkbenchShell title="Workbench" primarySidebar={<aside />} />
|
|
28
|
+
<WorkbenchShell title="Workbench" primarySidebar={<aside />} editorArea={<EditorArea />} />
|
|
30
29
|
</WorkbenchProvider>
|
|
31
30
|
);
|
|
32
31
|
}
|
|
@@ -36,6 +35,13 @@ export function App() {
|
|
|
36
35
|
extension list; hosts that want the Kit Explorer/Search/Settings set opt into
|
|
37
36
|
`BUILTIN_WORKBENCH_EXTENSIONS` explicitly. Pure layout persistence helpers are
|
|
38
37
|
available from the non-React `@workbench-kit/shell-react/layout-storage` subpath.
|
|
38
|
+
`WorkbenchShell` also has no implicit editor surface: pass `editorArea` when the
|
|
39
|
+
host wants the Kit editor, or omit it for a product-owned editor region.
|
|
40
|
+
|
|
41
|
+
Performance-sensitive hosts should import orchestration from the focused
|
|
42
|
+
`provider`, `shell`, `command-host`, `command-palette`, and
|
|
43
|
+
`command-descriptors` subpaths. The root barrel remains the discovery surface,
|
|
44
|
+
not the default runtime import graph.
|
|
39
45
|
|
|
40
46
|
Prefer this package when the host needs provider + shell orchestration. For
|
|
41
47
|
layout-only chrome without host services, start from
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workbench-kit/shell-react",
|
|
3
|
-
"version": "0.0.2-prototype.0.2.
|
|
3
|
+
"version": "0.0.2-prototype.0.2.23",
|
|
4
4
|
"private": false,
|
|
5
5
|
"sideEffects": [
|
|
6
6
|
"**/*.css"
|
|
@@ -8,9 +8,14 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"exports": {
|
|
10
10
|
".": "./src/index.ts",
|
|
11
|
+
"./command-descriptors": "./src/commands/use-command-descriptors.ts",
|
|
12
|
+
"./command-host": "./src/workbench/command-host.tsx",
|
|
13
|
+
"./command-palette": "./src/workbench/command-palette.ts",
|
|
11
14
|
"./field-remap": "./src/field-remap/index.ts",
|
|
12
15
|
"./field-remap/view.css": "./src/field-remap/view.css",
|
|
13
|
-
"./layout-storage": "./src/workbench/layout-storage.ts"
|
|
16
|
+
"./layout-storage": "./src/workbench/layout-storage.ts",
|
|
17
|
+
"./provider": "./src/shell/provider.tsx",
|
|
18
|
+
"./shell": "./src/shell/shell.tsx"
|
|
14
19
|
},
|
|
15
20
|
"files": [
|
|
16
21
|
"src",
|
|
@@ -25,14 +30,14 @@
|
|
|
25
30
|
"@xyflow/react": "^12.11.2",
|
|
26
31
|
"jsonata": "^2.2.0",
|
|
27
32
|
"react-table-mapping": "^1.0.3",
|
|
28
|
-
"@workbench-kit/platform": "0.0.2-prototype.0.2.
|
|
29
|
-
"@workbench-kit/react": "0.0.2-prototype.0.2.
|
|
30
|
-
"@workbench-kit/field-remap": "0.0.2-prototype.0.2.
|
|
31
|
-
"@workbench-kit/
|
|
32
|
-
"@workbench-kit/workbench-
|
|
33
|
-
"@workbench-kit/
|
|
34
|
-
"@workbench-kit/
|
|
35
|
-
"@workbench-kit/
|
|
33
|
+
"@workbench-kit/platform": "0.0.2-prototype.0.2.23",
|
|
34
|
+
"@workbench-kit/react": "0.0.2-prototype.0.2.23",
|
|
35
|
+
"@workbench-kit/field-remap": "0.0.2-prototype.0.2.23",
|
|
36
|
+
"@workbench-kit/workbench-config": "0.0.2-prototype.0.2.23",
|
|
37
|
+
"@workbench-kit/workbench-extension-sdk": "0.0.2-prototype.0.2.23",
|
|
38
|
+
"@workbench-kit/tokens": "0.0.2-prototype.0.2.23",
|
|
39
|
+
"@workbench-kit/workbench-core": "0.0.2-prototype.0.2.23",
|
|
40
|
+
"@workbench-kit/workspace": "0.0.2-prototype.0.2.23"
|
|
36
41
|
},
|
|
37
42
|
"peerDependencies": {
|
|
38
43
|
"react": "^19.0.0",
|
package/src/shell/shell.tsx
CHANGED
|
@@ -27,7 +27,6 @@ import {
|
|
|
27
27
|
useResolvedWorkbenchTheme,
|
|
28
28
|
} from '@workbench-kit/react/workbench';
|
|
29
29
|
|
|
30
|
-
import { EditorArea } from '../editor/area.js';
|
|
31
30
|
import { BUILTIN_COMMANDS_VIEW_CONTAINER_ID } from '../commands/view-data.js';
|
|
32
31
|
import { BUILTIN_EXTENSIONS_VIEW_CONTAINER_ID } from '../extensions/view-data.js';
|
|
33
32
|
import {
|
|
@@ -198,7 +197,7 @@ export function WorkbenchShell({
|
|
|
198
197
|
showPanelLayoutToggle = true,
|
|
199
198
|
showAuxiliarySidebarLayoutToggle = true,
|
|
200
199
|
}: WorkbenchShellProps) {
|
|
201
|
-
const resolvedEditorArea = editorArea ??
|
|
200
|
+
const resolvedEditorArea = editorArea ?? null;
|
|
202
201
|
const resolvedWorkbenchTheme = useResolvedWorkbenchTheme(theme ?? 'system');
|
|
203
202
|
const activeThemePreset =
|
|
204
203
|
lightPreset !== undefined && darkPreset !== undefined
|
|
@@ -4,11 +4,13 @@ import {
|
|
|
4
4
|
} from '@workbench-kit/workbench-config';
|
|
5
5
|
import {
|
|
6
6
|
createWorkbenchLayoutState,
|
|
7
|
-
type WorkbenchStorageReader,
|
|
8
|
-
type WorkbenchStorageWriter,
|
|
9
7
|
type WorkbenchLayoutState,
|
|
10
8
|
type WorkbenchLayoutStateInput,
|
|
11
|
-
} from '@workbench-kit/workbench-core';
|
|
9
|
+
} from '@workbench-kit/workbench-core/layout';
|
|
10
|
+
import type {
|
|
11
|
+
WorkbenchStorageReader,
|
|
12
|
+
WorkbenchStorageWriter,
|
|
13
|
+
} from '@workbench-kit/workbench-core/storage';
|
|
12
14
|
|
|
13
15
|
import {
|
|
14
16
|
readLocalJsonStorage,
|