@workbench-kit/react 0.0.2-prototype.0.2.26 → 0.0.2-prototype.0.2.28

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.
Files changed (62) hide show
  1. package/README.md +61 -14
  2. package/package.json +21 -11
  3. package/src/index.ts +2 -4
  4. package/src/jdw/fixtures/jdw-fixtures.ts +0 -15
  5. package/src/layout/index.ts +0 -2
  6. package/src/layout/panel/Panel.tsx +0 -3
  7. package/src/layout/panel/index.ts +0 -2
  8. package/src/overlay/ContextMenu.tsx +4 -16
  9. package/src/overlay/context-menu-density.css +22 -0
  10. package/src/overlay/context-menu-item.ts +17 -0
  11. package/src/overlay/context-menu.css +2 -0
  12. package/src/overlay/pointerPassthroughRegion.ts +1 -1
  13. package/src/primitives/app-icon/AppIcon.tsx +33 -0
  14. package/src/primitives/app-icon/app-icon.css +28 -0
  15. package/src/primitives/catalog-browse-pane/CatalogBrowsePane.tsx +24 -17
  16. package/src/primitives/catalog-browse-pane/catalog-browse-pane.css +4 -0
  17. package/src/primitives/chip/Chip.tsx +1 -10
  18. package/src/primitives/chip/index.ts +2 -2
  19. package/src/primitives/index.ts +2 -2
  20. package/src/primitives/primitives.css +1 -0
  21. package/src/scrollbars.css +2 -6
  22. package/src/styles/core.css +16 -0
  23. package/src/styles/foundation.css +4 -0
  24. package/src/styles/overlay.css +2 -0
  25. package/src/styles.css +0 -1
  26. package/src/widget-tree/WidgetSourceEditor.tsx +0 -14
  27. package/src/widget-tree/WidgetTreeCanvasPreview.tsx +2 -6
  28. package/src/widget-tree/WidgetTreeLab.tsx +2 -23
  29. package/src/widget-tree/WidgetTreeSidePanel.tsx +0 -5
  30. package/src/widget-tree/index.ts +1 -5
  31. package/src/workbench/auth/WorkbenchLoginView.tsx +1 -2
  32. package/src/workbench/auth/auth-flows.css +14 -0
  33. package/src/workbench/chrome/workbench-layout-regions.css +13 -0
  34. package/src/workbench/chrome/workbench-shell-titlebar.css +0 -8
  35. package/src/workbench/commands/CommandList.tsx +1 -0
  36. package/src/workbench/commands/ShortcutCommandBridge.tsx +16 -0
  37. package/src/workbench/management/WorkbenchNotice.tsx +19 -11
  38. package/src/workbench/settings/StructuredDataSchemaPanel.tsx +21 -40
  39. package/src/workbench/settings/sectionedPanelScrollSpy.ts +0 -81
  40. package/src/workbench/shell/ActivityBar.tsx +0 -4
  41. package/src/workbench/shell/shell.ts +1 -1
  42. package/src/workbench/shell/workbenchSidebarLayoutContext.ts +0 -6
  43. package/src/workbench/views/command-list-density.css +36 -0
  44. package/src/workbench/views/command-list.css +2 -0
  45. package/src/workbench/workspace/WorkspaceExplorer.tsx +1 -1
  46. package/src/workbench/workspace/createVirtualWorkspaceExplorerPort.ts +1 -14
  47. package/src/workbench-menu-surfaces.css +3 -57
  48. package/src/brand/TilepaperAppIcon.tsx +0 -181
  49. package/src/brand/index.ts +0 -2
  50. package/src/brand/tilepaper-app-icon-geometry.ts +0 -201
  51. package/src/primitives/absolute-box/index.ts +0 -1
  52. package/src/primitives/catalog-browse-card/index.ts +0 -1
  53. package/src/primitives/catalog-browse-pane/index.ts +0 -3
  54. package/src/primitives/catalog-filter-overlay/index.ts +0 -1
  55. package/src/primitives/codicon/index.ts +0 -1
  56. package/src/primitives/external-link-button/index.ts +0 -1
  57. package/src/primitives/library-detail-layout/index.ts +0 -6
  58. package/src/primitives/library-facet-filter-panel/index.ts +0 -1
  59. package/src/primitives/library-facet-filter-strip/index.ts +0 -1
  60. package/src/primitives/panel-loading/index.ts +0 -1
  61. package/src/primitives/scroll-area-infinite-load/index.ts +0 -2
  62. package/src/primitives/workbench-thumbnail/index.ts +0 -1
@@ -31,10 +31,7 @@ import { WorkbenchLabeledPane } from '../layout/panel';
31
31
  import type { WorkspaceEditorTheme } from '../workbench/workspace/WorkspaceEditor.js';
32
32
  import type { JsonEditorProblem } from '../jdw/JsonCodeEditorPane.js';
33
33
  import { WidgetAssetPalette } from './WidgetAssetPalette.js';
34
- import {
35
- WidgetTreeCanvasPreview,
36
- type WidgetTreeCanvasAssetDropOperation,
37
- } from './WidgetTreeCanvasPreview.js';
34
+ import { WidgetTreeCanvasPreview } from './WidgetTreeCanvasPreview.js';
38
35
  import { WidgetInspectorPanel } from './WidgetInspectorPanel.js';
39
36
  import { WidgetSourceEditor } from './WidgetSourceEditor.js';
40
37
  import { WidgetTreeSidePanel } from './WidgetTreeSidePanel.js';
@@ -375,24 +372,6 @@ export function WidgetTreeLab({
375
372
  }
376
373
  };
377
374
 
378
- const handlePlaceAssetPreviewPath = (operation: WidgetTreeCanvasAssetDropOperation) => {
379
- if (!document.root) return;
380
-
381
- const parent = getWidgetAtPath(document.root, operation.parentPath);
382
- if (!parent || !canAddChildren(parent)) return;
383
-
384
- const changed = applyPatch({
385
- type: 'insert-child',
386
- parentPath: operation.parentPath,
387
- index: operation.insertIndex,
388
- child: materializeWidgetPlacementAsset(operation.asset, parent),
389
- });
390
- if (changed) {
391
- setSelection((current) => selectWidgetPath(current, operation.nextPath));
392
- focusPropertyDetailTab();
393
- }
394
- };
395
-
396
375
  const handleRemovePath = (pathToRemove: WidgetPath) => {
397
376
  if (pathToRemove.length === 0) return;
398
377
  const parentPath = pathToRemove.slice(0, -1);
@@ -518,7 +497,7 @@ export function WidgetTreeLab({
518
497
  root={document.root}
519
498
  selectedPath={selectedPath}
520
499
  onPatch={handleCanvasPatch}
521
- onPlaceAssetPath={readOnly ? undefined : handlePlaceAssetPreviewPath}
500
+ onPlaceAssetPath={readOnly ? undefined : handlePlaceAssetPath}
522
501
  onSelectPath={handlePreviewSelectPath}
523
502
  />
524
503
  </WorkbenchLabeledPane>
@@ -1,10 +1,5 @@
1
1
  import type { ReactNode } from 'react';
2
2
 
3
- /** @deprecated Side panel no longer switches tabs; all panes stay visible. */
4
- export type WidgetTreeSidePanelTab = 'outline' | 'assets' | 'properties';
5
- /** @deprecated Side panel no longer switches detail tabs. */
6
- export type WidgetTreeSidePanelDetailTab = Exclude<WidgetTreeSidePanelTab, 'outline'>;
7
-
8
3
  export interface WidgetTreeSidePanelProps {
9
4
  readonly outline: ReactNode;
10
5
  readonly properties: ReactNode;
@@ -18,11 +18,7 @@ export type {
18
18
  export { WidgetInspectorPanel } from './WidgetInspectorPanel.js';
19
19
  export type { WidgetInspectorPanelProps } from './WidgetInspectorPanel.js';
20
20
  export { WidgetTreeSidePanel } from './WidgetTreeSidePanel.js';
21
- export type {
22
- WidgetTreeSidePanelProps,
23
- WidgetTreeSidePanelDetailTab,
24
- WidgetTreeSidePanelTab,
25
- } from './WidgetTreeSidePanel.js';
21
+ export type { WidgetTreeSidePanelProps } from './WidgetTreeSidePanel.js';
26
22
  export { WidgetAssetPalette } from './WidgetAssetPalette.js';
27
23
  export type { WidgetAssetPaletteProps } from './WidgetAssetPalette.js';
28
24
  export {
@@ -1,5 +1,4 @@
1
1
  import { useId, useState, type FormEvent, type ReactNode } from 'react';
2
- import { TilepaperAppIcon } from '../../brand/TilepaperAppIcon';
3
2
  import { Button } from '../../primitives/button';
4
3
  import { TextInput } from '../../primitives/text-input';
5
4
  import { cx } from '../../utils/cx';
@@ -165,7 +164,7 @@ export interface WorkbenchPasswordResetViewProps {
165
164
  export function WorkbenchLoginBrandMark() {
166
165
  return (
167
166
  <div className="workbench-login-brand-mark" aria-hidden>
168
- <TilepaperAppIcon />
167
+ <span className="workbench-login-brand-mark__glyph">W</span>
169
168
  </div>
170
169
  );
171
170
  }
@@ -135,8 +135,22 @@
135
135
  }
136
136
 
137
137
  .workbench-login-brand-mark {
138
+ box-sizing: border-box;
139
+ display: grid;
140
+ place-items: center;
138
141
  width: 100%;
139
142
  aspect-ratio: 1;
143
+ border: 1px solid var(--color-border);
144
+ border-radius: clamp(28px, 8vw, 72px);
145
+ background: var(--color-surface);
146
+ color: var(--color-text);
147
+ }
148
+
149
+ .workbench-login-brand-mark__glyph {
150
+ font-size: clamp(72px, 14vw, 160px);
151
+ font-weight: 650;
152
+ letter-spacing: -0.08em;
153
+ line-height: 1;
140
154
  }
141
155
 
142
156
  .workbench-login-view__footer-brand {
@@ -40,3 +40,16 @@
40
40
  --panel-bg-75: var(--color-primary-side-bar-bg-75);
41
41
  background: var(--panel-bg);
42
42
  }
43
+
44
+ /* Primary-sidebar residency owns its intentionally hidden native scrollbars. */
45
+ .workbench-primary-sidebar .ui-sidebar-view__body,
46
+ .workbench-primary-sidebar .ui-workbench-sidebar-section__content {
47
+ scrollbar-gutter: auto;
48
+ scrollbar-width: none;
49
+ }
50
+
51
+ .workbench-primary-sidebar .ui-sidebar-view__body::-webkit-scrollbar,
52
+ .workbench-primary-sidebar .ui-workbench-sidebar-section__content::-webkit-scrollbar {
53
+ width: 0;
54
+ height: 0;
55
+ }
@@ -60,18 +60,10 @@
60
60
  object-position: center;
61
61
  }
62
62
 
63
- .workbench-shell-titlebar__app-icon > .tilepaper-app-icon,
64
63
  .workbench-shell-titlebar__app-icon > svg {
65
64
  shape-rendering: geometricPrecision;
66
65
  }
67
66
 
68
- .tilepaper-app-icon {
69
- display: block;
70
- width: 100%;
71
- height: 100%;
72
- overflow: visible;
73
- }
74
-
75
67
  .workbench-shell-titlebar__title {
76
68
  min-width: 0;
77
69
  overflow: hidden;
@@ -1,3 +1,4 @@
1
+ import '../views/command-list.css';
1
2
  import { useEffect, useId, useRef, type ComponentPropsWithRef, type ReactNode } from 'react';
2
3
  import { Button } from '../../primitives/button';
3
4
  import { EmptyState } from '../../primitives/empty-state';
@@ -213,6 +213,22 @@ export function matchesWorkbenchShortcut({
213
213
  );
214
214
  }
215
215
 
216
+ export function matchesWorkbenchCommandPaletteShortcut(event: WorkbenchShortcutEventLike) {
217
+ return matchesWorkbenchShortcut({ event, shortcut: 'Ctrl/Cmd+Shift+P' });
218
+ }
219
+
220
+ export function matchesWorkbenchQuickAccessShortcut(event: WorkbenchShortcutEventLike) {
221
+ return matchesWorkbenchShortcut({ event, shortcut: 'Ctrl/Cmd+P' });
222
+ }
223
+
224
+ export function getWorkbenchCommandPaletteShortcutLabel() {
225
+ return 'Ctrl+Shift+P';
226
+ }
227
+
228
+ export function getWorkbenchQuickAccessShortcutLabel() {
229
+ return 'Ctrl+P';
230
+ }
231
+
216
232
  export function getWorkbenchShortcutCommandBindings<TContext>({
217
233
  commandIds,
218
234
  context,
@@ -9,7 +9,6 @@ import {
9
9
  type ReactNode,
10
10
  } from 'react';
11
11
  import { IconButton, WorkbenchBanner, WorkbenchBannerMessage } from '../../primitives/index';
12
- import { cx } from '../../utils/cx';
13
12
 
14
13
  export type WorkbenchNoticeTone = 'error' | 'info' | 'success' | 'warning';
15
14
  export type WorkbenchNoticePosition = 'bottom-center' | 'bottom-right';
@@ -150,16 +149,16 @@ export function WorkbenchNoticeViewport({
150
149
 
151
150
  return (
152
151
  <div
153
- aria-live="polite"
154
- className={resolveNoticeViewportClassName(position)}
152
+ className="ui-workbench-notice-viewport"
155
153
  data-position={position}
154
+ style={resolveNoticeViewportStyle(position)}
156
155
  {...(dataAttributes ?? {})}
157
156
  >
158
157
  {visibleNotices.map((notice) => (
159
158
  <WorkbenchBanner
160
- className="pointer-events-auto"
161
159
  data-tone={notice.tone}
162
160
  key={notice.id}
161
+ role={notice.tone === 'error' ? 'alert' : 'status'}
163
162
  style={resolveNoticeBannerStyle(notice.tone)}
164
163
  tone={notice.tone === 'warning' ? 'warning' : 'default'}
165
164
  {...(notice.dataAttributes ?? {})}
@@ -187,13 +186,6 @@ export function useWorkbenchNotice(): WorkbenchNoticeController {
187
186
  return controller;
188
187
  }
189
188
 
190
- function resolveNoticeViewportClassName(position: WorkbenchNoticePosition): string {
191
- return cx(
192
- 'pointer-events-none fixed inset-x-0 bottom-4 z-50 flex flex-col gap-2 px-4',
193
- position === 'bottom-center' ? 'items-center' : 'items-end',
194
- );
195
- }
196
-
197
189
  function resolveNoticeBannerStyle(tone: WorkbenchNoticeTone): CSSProperties {
198
190
  return {
199
191
  borderColor:
@@ -204,5 +196,21 @@ function resolveNoticeBannerStyle(tone: WorkbenchNoticeTone): CSSProperties {
204
196
  : undefined,
205
197
  maxWidth: 'min(520px, calc(100vw - 32px))',
206
198
  minWidth: 'min(420px, calc(100vw - 32px))',
199
+ pointerEvents: 'auto',
200
+ };
201
+ }
202
+
203
+ function resolveNoticeViewportStyle(position: WorkbenchNoticePosition): CSSProperties {
204
+ return {
205
+ alignItems: position === 'bottom-center' ? 'center' : 'flex-end',
206
+ bottom: 16,
207
+ display: 'flex',
208
+ flexDirection: 'column',
209
+ gap: 8,
210
+ insetInline: 0,
211
+ paddingInline: 16,
212
+ pointerEvents: 'none',
213
+ position: 'fixed',
214
+ zIndex: 50,
207
215
  };
208
216
  }
@@ -98,6 +98,24 @@ interface WorkbenchStructuredDataSchemaSectionView {
98
98
  value: unknown;
99
99
  }
100
100
 
101
+ interface SchemaSectionRenderOptions {
102
+ classNames?: WorkbenchStructuredDataSchemaPanelClassNames | undefined;
103
+ fieldErrors?: Record<string, ReactNode> | undefined;
104
+ getFieldErrorId?: ((dataPath: string) => string | undefined) | undefined;
105
+ labels?: WorkbenchStructuredDataSchemaPanelLabels | undefined;
106
+ localErrorKeys?: ReadonlySet<string> | undefined;
107
+ onDataValueChange: (path: string[], value: unknown) => void;
108
+ onValidateField?: (
109
+ dataPath: string,
110
+ definition: WorkbenchStructuredDataSchemaFieldDefinition | undefined,
111
+ value: unknown,
112
+ ) => void;
113
+ readOnly: boolean;
114
+ }
115
+
116
+ type SchemaSectionRenderProps = WorkbenchStructuredDataSchemaSectionView &
117
+ SchemaSectionRenderOptions;
118
+
101
119
  const defaultSchemaPanelClassNames: Required<WorkbenchStructuredDataSchemaPanelClassNames> = {
102
120
  checkbox: 'ui-workbench-structured-data-schema-panel__checkbox',
103
121
  empty: 'ui-workbench-structured-data-schema-panel__empty',
@@ -245,20 +263,7 @@ function renderSchemaFormSection({
245
263
  schema,
246
264
  section,
247
265
  value,
248
- }: WorkbenchStructuredDataSchemaSectionView & {
249
- classNames?: WorkbenchStructuredDataSchemaPanelClassNames | undefined;
250
- fieldErrors?: Record<string, ReactNode> | undefined;
251
- getFieldErrorId?: ((dataPath: string) => string | undefined) | undefined;
252
- labels?: WorkbenchStructuredDataSchemaPanelLabels | undefined;
253
- localErrorKeys?: ReadonlySet<string> | undefined;
254
- onDataValueChange: (path: string[], value: unknown) => void;
255
- onValidateField?: (
256
- dataPath: string,
257
- definition: WorkbenchStructuredDataSchemaFieldDefinition | undefined,
258
- value: unknown,
259
- ) => void;
260
- readOnly: boolean;
261
- }) {
266
+ }: SchemaSectionRenderProps) {
262
267
  const fields = section.fields ?? [];
263
268
  if (fields.length) {
264
269
  return (
@@ -379,20 +384,8 @@ function renderSchemaTableSection({
379
384
  section,
380
385
  value,
381
386
  ...sectionView
382
- }: WorkbenchStructuredDataSchemaSectionView & {
383
- classNames?: WorkbenchStructuredDataSchemaPanelClassNames | undefined;
384
- fieldErrors?: Record<string, ReactNode> | undefined;
385
- getFieldErrorId?: ((dataPath: string) => string | undefined) | undefined;
386
- labels?: WorkbenchStructuredDataSchemaPanelLabels | undefined;
387
- localErrorKeys?: ReadonlySet<string> | undefined;
388
- onDataValueChange: (path: string[], value: unknown) => void;
389
- onValidateField?: (
390
- dataPath: string,
391
- definition: WorkbenchStructuredDataSchemaFieldDefinition | undefined,
392
- value: unknown,
393
- ) => void;
387
+ }: SchemaSectionRenderProps & {
394
388
  preferredTableColumns?: readonly string[] | undefined;
395
- readOnly: boolean;
396
389
  }) {
397
390
  const rows = getWorkbenchStructuredDataSchemaTableRows(value);
398
391
  const columns = getWorkbenchStructuredDataSchemaDocumentTableColumns({
@@ -569,22 +562,10 @@ function renderSchemaPanelSection({
569
562
  preferredTableColumns,
570
563
  readOnly,
571
564
  sectionView,
572
- }: {
565
+ }: SchemaSectionRenderOptions & {
573
566
  anchorId?: string | undefined;
574
- classNames?: WorkbenchStructuredDataSchemaPanelClassNames | undefined;
575
- fieldErrors?: Record<string, ReactNode> | undefined;
576
- getFieldErrorId?: ((dataPath: string) => string | undefined) | undefined;
577
567
  headerActions?: ReactNode | undefined;
578
- labels?: WorkbenchStructuredDataSchemaPanelLabels | undefined;
579
- localErrorKeys?: ReadonlySet<string> | undefined;
580
- onDataValueChange: (path: string[], value: unknown) => void;
581
- onValidateField?: (
582
- dataPath: string,
583
- definition: WorkbenchStructuredDataSchemaFieldDefinition | undefined,
584
- value: unknown,
585
- ) => void;
586
568
  preferredTableColumns?: readonly string[] | undefined;
587
- readOnly: boolean;
588
569
  sectionView: WorkbenchStructuredDataSchemaSectionView;
589
570
  }) {
590
571
  const { section, value } = sectionView;
@@ -30,12 +30,6 @@ export const WORKBENCH_SECTIONED_PANEL_INTERSECTION_THRESHOLDS = [0, 0.25, 0.5,
30
30
 
31
31
  export type WorkbenchSectionedPanelScrollSpyAxis = 'vertical' | 'horizontal';
32
32
 
33
- export interface WorkbenchSectionedPanelIntersectionEntry {
34
- intersectionRatio: number;
35
- isIntersecting: boolean;
36
- target: { id: string };
37
- }
38
-
39
33
  export interface WorkbenchSectionedPanelScrollPosition {
40
34
  anchorId: string;
41
35
  /** Section start along the active scroll axis (top or left). */
@@ -108,70 +102,6 @@ export function isWorkbenchSectionedPanelAtScrollEnd({
108
102
  return scrollPosition + clientSize >= scrollSize - bottomThreshold;
109
103
  }
110
104
 
111
- /** @deprecated Use `isWorkbenchSectionedPanelAtScrollStart`. */
112
- export function isWorkbenchSectionedPanelAtScrollTop({
113
- scrollTop,
114
- topThreshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
115
- }: {
116
- scrollTop: number;
117
- topThreshold?: number | undefined;
118
- }): boolean {
119
- return isWorkbenchSectionedPanelAtScrollStart({
120
- scrollPosition: scrollTop,
121
- startThreshold: topThreshold,
122
- });
123
- }
124
-
125
- /** @deprecated Use `isWorkbenchSectionedPanelAtScrollEnd`. */
126
- export function isWorkbenchSectionedPanelAtScrollBottom({
127
- bottomThreshold = WORKBENCH_SECTIONED_PANEL_SCROLL_THRESHOLD,
128
- clientHeight,
129
- scrollHeight,
130
- scrollTop,
131
- }: {
132
- bottomThreshold?: number | undefined;
133
- clientHeight: number;
134
- scrollHeight: number;
135
- scrollTop: number;
136
- }): boolean {
137
- return isWorkbenchSectionedPanelAtScrollEnd({
138
- bottomThreshold,
139
- clientSize: clientHeight,
140
- scrollPosition: scrollTop,
141
- scrollSize: scrollHeight,
142
- });
143
- }
144
-
145
- export function resolveWorkbenchSectionedPanelActiveAnchorFromIntersection({
146
- anchorOrder,
147
- entries,
148
- fallbackAnchorId,
149
- }: {
150
- anchorOrder: readonly string[];
151
- entries: readonly WorkbenchSectionedPanelIntersectionEntry[];
152
- fallbackAnchorId?: string | undefined;
153
- }): string | undefined {
154
- const intersectingAnchorIds = new Set(
155
- entries
156
- .filter((entry) => entry.isIntersecting && entry.target.id)
157
- .map((entry) => entry.target.id),
158
- );
159
-
160
- if (intersectingAnchorIds.size === 0) {
161
- return fallbackAnchorId;
162
- }
163
-
164
- let nextActive = fallbackAnchorId;
165
-
166
- for (const anchorId of anchorOrder) {
167
- if (intersectingAnchorIds.has(anchorId)) {
168
- nextActive = anchorId;
169
- }
170
- }
171
-
172
- return nextActive ?? fallbackAnchorId;
173
- }
174
-
175
105
  export function resolveWorkbenchSectionedPanelActiveAnchorFromScroll({
176
106
  activeLineBias = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_ACTIVE_LINE_BIAS,
177
107
  anchorOrder,
@@ -250,17 +180,6 @@ export function resolveWorkbenchSectionedPanelScrollTarget({
250
180
  return Math.max(0, sectionStart - offset);
251
181
  }
252
182
 
253
- /** @deprecated Use `resolveWorkbenchSectionedPanelScrollTarget`. */
254
- export function resolveWorkbenchSectionedPanelScrollTop({
255
- offset = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET,
256
- sectionTop,
257
- }: {
258
- offset?: number | undefined;
259
- sectionTop: number;
260
- }): number {
261
- return resolveWorkbenchSectionedPanelScrollTarget({ offset, sectionStart: sectionTop });
262
- }
263
-
264
183
  export function createWorkbenchSectionedPanelIntersectionRootMargin(
265
184
  offset = WORKBENCH_SECTIONED_PANEL_SCROLL_SPY_OFFSET,
266
185
  axis: WorkbenchSectionedPanelScrollSpyAxis = 'vertical',
@@ -8,7 +8,6 @@ import {
8
8
  useWorkbenchSidebarViewPlacementDropZone,
9
9
  } from './useWorkbenchSidebarViewPlacementDropZone';
10
10
  import { useWorkbenchSidebarActionBarDnd } from './useWorkbenchSidebarActionBarDnd';
11
- import { WORKBENCH_SIDEBAR_VIEW_PLACEMENT_DRAG_DATA_TYPE } from './sidebarViewPlacementDnd';
12
11
 
13
12
  export interface ActivityBarItem {
14
13
  active?: boolean;
@@ -34,9 +33,6 @@ export interface ActivityBarProps extends Omit<ComponentPropsWithoutRef<'nav'>,
34
33
  placementDraggable?: boolean;
35
34
  }
36
35
 
37
- /** @deprecated Use WORKBENCH_SIDEBAR_VIEW_PLACEMENT_DRAG_DATA_TYPE */
38
- export const ACTIVITY_BAR_DRAG_DATA_TYPE = WORKBENCH_SIDEBAR_VIEW_PLACEMENT_DRAG_DATA_TYPE;
39
-
40
36
  export function ActivityBar({
41
37
  'aria-label': ariaLabel = 'Activity bar',
42
38
  acceptSidebarViewPlacementDrop,
@@ -1,4 +1,4 @@
1
- export { ActivityBar, ACTIVITY_BAR_DRAG_DATA_TYPE } from './ActivityBar';
1
+ export { ActivityBar } from './ActivityBar';
2
2
  export {
3
3
  hasWorkbenchSidebarViewPlacementDrag,
4
4
  readWorkbenchSidebarViewPlacementDrag,
@@ -38,9 +38,3 @@ export function toWorkbenchSidebarLayoutContextValue<TViewId extends string>(
38
38
  ): WorkbenchSidebarLayoutContextStore {
39
39
  return value as unknown as WorkbenchSidebarLayoutContextStore;
40
40
  }
41
-
42
- export function fromWorkbenchSidebarLayoutContextValue<TViewId extends string>(
43
- value: WorkbenchSidebarLayoutContextStore,
44
- ): WorkbenchSidebarLayoutContextValue<TViewId> {
45
- return value as unknown as WorkbenchSidebarLayoutContextValue<TViewId>;
46
- }
@@ -0,0 +1,36 @@
1
+ /* Compact density overrides for Workbench command lists. Keep before command-list.css. */
2
+
3
+ .ui-workbench-command-list {
4
+ padding: 0;
5
+ }
6
+
7
+ .ui-workbench-command-item,
8
+ .ui-workbench-command-item.ui-button {
9
+ --ui-button-height: auto;
10
+ --ui-button-padding: 7px 10px;
11
+ --ui-button-border-radius: 0;
12
+ border-radius: 0;
13
+ height: auto;
14
+ padding: 7px 10px;
15
+ }
16
+
17
+ .ui-workbench-command-group-shell__nav {
18
+ padding: 0;
19
+ }
20
+
21
+ .ui-workbench-command-group-shell__nav-link {
22
+ border-radius: 0;
23
+ }
24
+
25
+ .ui-workbench-command-group-shell__content {
26
+ padding: 0;
27
+ }
28
+
29
+ .ui-workbench-command-group-shell__section {
30
+ padding: 0;
31
+ }
32
+
33
+ .ui-workbench-command-group-shell__section-header {
34
+ min-height: 28px;
35
+ padding: 4px 10px;
36
+ }
@@ -1,3 +1,5 @@
1
+ @import './command-list-density.css';
2
+
1
3
  .ui-workbench-command-list {
2
4
  max-height: min(430px, calc(100vh - 190px));
3
5
  overflow: auto;
@@ -30,7 +30,7 @@ import {
30
30
  import { WorkspaceFileIcon } from './WorkspaceFileIcon';
31
31
  import type { WorkspaceTreeNode } from './types';
32
32
 
33
- export const WORKSPACE_EXPLORER_DRAG_DATA_TYPE = 'application/x-newchobo-ui-workspace-paths';
33
+ export const WORKSPACE_EXPLORER_DRAG_DATA_TYPE = 'application/x-workbench-kit-workspace-paths';
34
34
  export const WORKSPACE_EXPLORER_DRAG_METADATA_DATA_TYPE = `${WORKSPACE_EXPLORER_DRAG_DATA_TYPE}.metadata`;
35
35
 
36
36
  export type WorkspaceExplorerSelectionChangeReason =
@@ -6,10 +6,7 @@ import {
6
6
  } from '@workbench-kit/workspace';
7
7
 
8
8
  import type { VirtualWorkspaceApi } from './useVirtualWorkspace';
9
- import type {
10
- WorkspaceExplorerControllerPort,
11
- WorkspaceExplorerMutationResult,
12
- } from './workspaceExplorerController';
9
+ import type { WorkspaceExplorerControllerPort } from './workspaceExplorerController';
13
10
 
14
11
  export function createVirtualWorkspaceExplorerPort({
15
12
  onNotify,
@@ -129,13 +126,3 @@ export function applyVirtualWorkspaceRenameSelection(
129
126
  paths: selection.paths.map(renameDescendantPath),
130
127
  };
131
128
  }
132
-
133
- export function toWorkspaceExplorerMutationResult(
134
- value: WorkspaceExplorerMutationResult | void | undefined,
135
- ): WorkspaceExplorerMutationResult | undefined {
136
- if (!value) {
137
- return undefined;
138
- }
139
-
140
- return value;
141
- }
@@ -1,57 +1,3 @@
1
- /* Optional compact menu density for context menus and command lists. */
2
-
3
- .ui-context-menu__item,
4
- .ui-context-menu__item.ui-button {
5
- --ui-button-min-height: 28px;
6
- --ui-button-height: auto;
7
- --ui-button-padding: 4px 10px;
8
- --ui-button-border-radius: 0;
9
- border-radius: 0;
10
- min-height: 28px;
11
- height: auto;
12
- padding: 4px 10px;
13
- }
14
-
15
- .ui-context-menu__separator {
16
- margin: 0;
17
- }
18
-
19
- .ui-context-menu__shortcut {
20
- font-size: var(--font-size-xs);
21
- color: var(--color-text-subtle);
22
- }
23
-
24
- .ui-workbench-command-list {
25
- padding: 0;
26
- }
27
-
28
- .ui-workbench-command-item,
29
- .ui-workbench-command-item.ui-button {
30
- --ui-button-height: auto;
31
- --ui-button-padding: 7px 10px;
32
- --ui-button-border-radius: 0;
33
- border-radius: 0;
34
- height: auto;
35
- padding: 7px 10px;
36
- }
37
-
38
- .ui-workbench-command-group-shell__nav {
39
- padding: 0;
40
- }
41
-
42
- .ui-workbench-command-group-shell__nav-link {
43
- border-radius: 0;
44
- }
45
-
46
- .ui-workbench-command-group-shell__content {
47
- padding: 0;
48
- }
49
-
50
- .ui-workbench-command-group-shell__section {
51
- padding: 0;
52
- }
53
-
54
- .ui-workbench-command-group-shell__section-header {
55
- min-height: 28px;
56
- padding: 4px 10px;
57
- }
1
+ /* Compatibility entry for consumers that opt into both compact menu surfaces. */
2
+ @import './overlay/context-menu-density.css';
3
+ @import './workbench/views/command-list-density.css';