@workbench-kit/shell-react 0.0.2-prototype.0.2.20 → 0.0.2-prototype.0.2.21

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 CHANGED
@@ -17,17 +17,26 @@ Peer: React 19.
17
17
  ## Quick start
18
18
 
19
19
  ```tsx
20
- import { WorkbenchProvider, WorkbenchShell } from '@workbench-kit/shell-react';
20
+ import {
21
+ BUILTIN_WORKBENCH_EXTENSIONS,
22
+ WorkbenchProvider,
23
+ WorkbenchShell,
24
+ } from '@workbench-kit/shell-react';
21
25
 
22
26
  export function App() {
23
27
  return (
24
- <WorkbenchProvider>
28
+ <WorkbenchProvider availableExtensions={BUILTIN_WORKBENCH_EXTENSIONS}>
25
29
  <WorkbenchShell title="Workbench" primarySidebar={<aside />} />
26
30
  </WorkbenchProvider>
27
31
  );
28
32
  }
29
33
  ```
30
34
 
35
+ `WorkbenchProvider` has no implicit extensions. Product hosts pass their own
36
+ extension list; hosts that want the Kit Explorer/Search/Settings set opt into
37
+ `BUILTIN_WORKBENCH_EXTENSIONS` explicitly. Pure layout persistence helpers are
38
+ available from the non-React `@workbench-kit/shell-react/layout-storage` subpath.
39
+
31
40
  Prefer this package when the host needs provider + shell orchestration. For
32
41
  layout-only chrome without host services, start from
33
42
  `@workbench-kit/react/workbench/shell` — see
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.20",
3
+ "version": "0.0.2-prototype.0.2.21",
4
4
  "private": false,
5
5
  "sideEffects": [
6
6
  "**/*.css"
@@ -9,7 +9,8 @@
9
9
  "exports": {
10
10
  ".": "./src/index.ts",
11
11
  "./field-remap": "./src/field-remap/index.ts",
12
- "./field-remap/view.css": "./src/field-remap/view.css"
12
+ "./field-remap/view.css": "./src/field-remap/view.css",
13
+ "./layout-storage": "./src/workbench/layout-storage.ts"
13
14
  },
14
15
  "files": [
15
16
  "src",
@@ -24,14 +25,14 @@
24
25
  "@xyflow/react": "^12.11.2",
25
26
  "jsonata": "^2.2.0",
26
27
  "react-table-mapping": "^1.0.3",
27
- "@workbench-kit/platform": "0.0.2-prototype.0.2.20",
28
- "@workbench-kit/field-remap": "0.0.2-prototype.0.2.20",
29
- "@workbench-kit/tokens": "0.0.2-prototype.0.2.20",
30
- "@workbench-kit/react": "0.0.2-prototype.0.2.20",
31
- "@workbench-kit/workbench-core": "0.0.2-prototype.0.2.20",
32
- "@workbench-kit/workbench-config": "0.0.2-prototype.0.2.20",
33
- "@workbench-kit/workbench-extension-sdk": "0.0.2-prototype.0.2.20",
34
- "@workbench-kit/workspace": "0.0.2-prototype.0.2.20"
28
+ "@workbench-kit/platform": "0.0.2-prototype.0.2.21",
29
+ "@workbench-kit/react": "0.0.2-prototype.0.2.21",
30
+ "@workbench-kit/field-remap": "0.0.2-prototype.0.2.21",
31
+ "@workbench-kit/tokens": "0.0.2-prototype.0.2.21",
32
+ "@workbench-kit/workbench-core": "0.0.2-prototype.0.2.21",
33
+ "@workbench-kit/workbench-config": "0.0.2-prototype.0.2.21",
34
+ "@workbench-kit/workspace": "0.0.2-prototype.0.2.21",
35
+ "@workbench-kit/workbench-extension-sdk": "0.0.2-prototype.0.2.21"
35
36
  },
36
37
  "peerDependencies": {
37
38
  "react": "^19.0.0",
@@ -34,7 +34,6 @@ import {
34
34
  type WorkbenchLayoutStateInput,
35
35
  type ViewHostFactory,
36
36
  } from '@workbench-kit/workbench-core';
37
- import { BUILTIN_WORKBENCH_EXTENSIONS } from '../extensions/builtin-extensions.js';
38
37
  import {
39
38
  ContextKeyService,
40
39
  createWorkbenchPermissionContextKeys,
@@ -96,12 +95,12 @@ export interface WorkbenchWorkspaceHostPort extends WorkbenchEditorSavePort {
96
95
 
97
96
  export type { WorkbenchStorageAdapter };
98
97
 
99
- const DEFAULT_AVAILABLE_EXTENSIONS = BUILTIN_WORKBENCH_EXTENSIONS;
100
-
98
+ const EMPTY_AVAILABLE_EXTENSIONS: readonly WorkbenchExtensionDescription[] = Object.freeze([]);
101
99
  const EMPTY_HOST_THEMES: readonly WorkbenchHostThemeRegistration[] = Object.freeze([]);
102
100
  const EMPTY_USER_COMMANDS: readonly WorkbenchUserCommandDefinition[] = Object.freeze([]);
103
101
 
104
102
  export interface WorkbenchProviderProps {
103
+ /** Extensions available to this host. Defaults to none; hosts opt into built-ins explicitly. */
105
104
  availableExtensions?: readonly WorkbenchExtensionDescription[];
106
105
  children: ReactNode;
107
106
  contextKeyValues?: Readonly<Record<string, ContextKeyValue>> | undefined;
@@ -219,7 +218,7 @@ export function WorkbenchProvider({
219
218
  viewHostFactories,
220
219
  workspaceHostPort,
221
220
  }: WorkbenchProviderProps) {
222
- const hostAvailableExtensions = availableExtensions ?? DEFAULT_AVAILABLE_EXTENSIONS;
221
+ const hostAvailableExtensions = availableExtensions ?? EMPTY_AVAILABLE_EXTENSIONS;
223
222
  const deferredDisposeRef = useRef<DeferredProviderDispose | undefined>(undefined);
224
223
  const shouldPersistEditorState =
225
224
  persistEditorState ??