@pstdio/workbench 0.5.0 → 0.6.0
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 +66 -72
- package/dist/composition-resolver-types-CWykPyEK.js +241 -0
- package/dist/composition-resolver-types-CWykPyEK.js.map +1 -0
- package/dist/extensions.d.ts +344 -28
- package/dist/extensions.js +1362 -883
- package/dist/extensions.js.map +1 -1
- package/dist/file-renderer-view-zpunbE4I.js +432 -0
- package/dist/file-renderer-view-zpunbE4I.js.map +1 -0
- package/dist/file-section-navigation-CfYqVObc.js +30 -0
- package/dist/file-section-navigation-CfYqVObc.js.map +1 -0
- package/dist/index.d.ts +268 -15
- package/dist/index.js +2334 -2082
- package/dist/index.js.map +1 -1
- package/dist/layout-types-DMoZz38-.js.map +1 -1
- package/dist/react.d.ts +141 -13
- package/dist/react.js +1969 -1994
- package/dist/react.js.map +1 -1
- package/dist/storage.js +132 -155
- package/dist/storage.js.map +1 -1
- package/dist/testing.d.ts +141 -13
- package/dist/webview-runtime.js +1 -1
- package/dist/webview-runtime.js.map +1 -1
- package/dist/workbench-built-ins-BtgeB274.js +1171 -0
- package/dist/workbench-built-ins-BtgeB274.js.map +1 -0
- package/dist/workbench-menu-paths-Bb0ICxeG.js +20 -0
- package/dist/workbench-menu-paths-Bb0ICxeG.js.map +1 -0
- package/package.json +3 -3
- package/dist/context-key-service-B2K9LAec.js +0 -1034
- package/dist/context-key-service-B2K9LAec.js.map +0 -1
- package/dist/file-renderer-view-DrrhYnb_.js +0 -171
- package/dist/file-renderer-view-DrrhYnb_.js.map +0 -1
- package/dist/workbench-menu-paths-B_QJzcNU.js +0 -12
- package/dist/workbench-menu-paths-B_QJzcNU.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -176,6 +176,70 @@ declare interface CommandRegistryStoreState {
|
|
|
176
176
|
commands: Record<string, RegisteredCommand>;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
+
export declare interface CompositionDiagnostic {
|
|
180
|
+
code: "extension_resource_kind_missing" | "extension_resource_slot_missing" | "extension_resource_slot_closed" | "extension_panel_missing" | "extension_panel_placement_unresolvable" | "extension_mode_resource_unsupported" | "extension_placement_required_invalid" | "extension_resource_primary_invalid";
|
|
181
|
+
message: string;
|
|
182
|
+
panelId?: string;
|
|
183
|
+
slot?: string;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export declare interface CompositionModeDefinition {
|
|
187
|
+
id: string;
|
|
188
|
+
extensionId?: string;
|
|
189
|
+
resources?: Record<string, CompositionModeRecipe>;
|
|
190
|
+
modePanels?: Record<string, CompositionPlacementPolicy>;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare interface CompositionModeRecipe {
|
|
194
|
+
slots?: Record<string, CompositionPlacementPolicy>;
|
|
195
|
+
panels?: Record<string, CompositionPlacementPolicy>;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export declare interface CompositionPanelDefinition {
|
|
199
|
+
id: string;
|
|
200
|
+
extensionId: string;
|
|
201
|
+
title: string;
|
|
202
|
+
icon?: string;
|
|
203
|
+
show?: CompositionPanelPlacement | readonly CompositionPanelPlacement[];
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare interface CompositionPanelPlacement extends CompositionPlacementPolicy {
|
|
207
|
+
resourceKind?: string;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export declare interface CompositionPlacementPolicy {
|
|
211
|
+
region: DockedCompositionRegion;
|
|
212
|
+
allowedRegions?: readonly DockedCompositionRegion[];
|
|
213
|
+
required?: boolean;
|
|
214
|
+
defaultOpen?: boolean;
|
|
215
|
+
pinned?: boolean;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
declare interface CompositionResolutionContext {
|
|
219
|
+
modeId: string;
|
|
220
|
+
resourceKind?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export declare interface CompositionResourceKindDefinition {
|
|
224
|
+
id: string;
|
|
225
|
+
extensionId: string;
|
|
226
|
+
surface: "primary" | "secondary" | "attached";
|
|
227
|
+
slots: Record<string, CompositionSlotDefinition>;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export declare interface CompositionResourcePanelEdge {
|
|
231
|
+
id: string;
|
|
232
|
+
extensionId: string;
|
|
233
|
+
resourceKind: string;
|
|
234
|
+
panel: string;
|
|
235
|
+
slot: string;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export declare interface CompositionSlotDefinition {
|
|
239
|
+
cardinality: "one" | "many";
|
|
240
|
+
external: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
179
243
|
export declare interface ContextKeyScope extends Disposable_2 {
|
|
180
244
|
ownerId: string;
|
|
181
245
|
set(key: string, value: ContextKeyValue): void;
|
|
@@ -373,7 +437,7 @@ export declare interface DataTableRendererContribution {
|
|
|
373
437
|
emptyDescription?: string;
|
|
374
438
|
executeQuery(context: DataTableRendererQueryContext): Promise<DataTableRendererQueryResult> | DataTableRendererQueryResult;
|
|
375
439
|
subscribe?: (listener: () => void) => Disposable_2 | (() => void);
|
|
376
|
-
|
|
440
|
+
onRowActivate?: (row: DataTableRendererRow) => Promise<void> | void;
|
|
377
441
|
}
|
|
378
442
|
|
|
379
443
|
export declare type DataTableRendererImplementation = (input: WorkbenchPanelRenderInput & {
|
|
@@ -444,6 +508,10 @@ declare interface Disposable_2 {
|
|
|
444
508
|
}
|
|
445
509
|
export { Disposable_2 as Disposable }
|
|
446
510
|
|
|
511
|
+
export declare type DockedCompositionRegion = (typeof dockedCompositionRegions)[number];
|
|
512
|
+
|
|
513
|
+
export declare const dockedCompositionRegions: readonly ["sidenav", "main", "secondary", "side"];
|
|
514
|
+
|
|
447
515
|
export declare interface EnumOption {
|
|
448
516
|
value: string;
|
|
449
517
|
label: string;
|
|
@@ -503,6 +571,8 @@ export declare interface FileRendererContent {
|
|
|
503
571
|
content?: string;
|
|
504
572
|
dataUrl?: string;
|
|
505
573
|
placeholder?: string;
|
|
574
|
+
/** Ordered backing-store revision when one is available. */
|
|
575
|
+
revision?: string;
|
|
506
576
|
}
|
|
507
577
|
|
|
508
578
|
export declare interface FileRendererContribution {
|
|
@@ -512,35 +582,53 @@ export declare interface FileRendererContribution {
|
|
|
512
582
|
/** Resolve the file's content (and identity) for the bound resource. */
|
|
513
583
|
load(resource: ResourceRef | undefined): Promise<FileRendererContent> | FileRendererContent;
|
|
514
584
|
/** Persist edited text. Absent ⇒ read-only. Never called for images. */
|
|
515
|
-
save?(resource: ResourceRef | undefined, content: string): Promise<
|
|
585
|
+
save?(resource: ResourceRef | undefined, content: string, origin?: FileRendererRefreshOrigin): Promise<FileRendererSaveResult | undefined> | FileRendererSaveResult | void;
|
|
516
586
|
}
|
|
517
587
|
|
|
518
588
|
export declare type FileRendererImplementation = (input: WorkbenchPanelRenderInput & {
|
|
519
589
|
fileRendererId: string;
|
|
520
590
|
}) => unknown;
|
|
521
591
|
|
|
522
|
-
declare interface
|
|
592
|
+
export declare interface FileRendererRefreshEnvelope {
|
|
593
|
+
resourceUri?: string;
|
|
594
|
+
origin?: FileRendererRefreshOrigin;
|
|
595
|
+
revision?: string;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
export declare interface FileRendererRefreshEvent extends FileRendererRefreshEnvelope {
|
|
523
599
|
fileRendererId: string;
|
|
524
600
|
}
|
|
525
601
|
|
|
526
602
|
declare type FileRendererRefreshListener = (event: FileRendererRefreshEvent) => void;
|
|
527
603
|
|
|
604
|
+
export declare interface FileRendererRefreshOrigin {
|
|
605
|
+
rendererId: string;
|
|
606
|
+
instanceId: string;
|
|
607
|
+
operationId: string;
|
|
608
|
+
}
|
|
609
|
+
|
|
528
610
|
export declare interface FileRendererRegistry {
|
|
529
611
|
fileRendererStore: WorkbenchStore<FileRendererStoreState>;
|
|
530
612
|
registerFileRenderer(contribution: FileRendererContribution, metadata?: ContributionMetadata): Disposable_2;
|
|
531
613
|
setFileRendererImplementation(impl: FileRendererImplementation): void;
|
|
532
614
|
getFileRenderer(id: string): RegisteredFileRendererContribution | undefined;
|
|
533
615
|
listFileRenderers(): RegisteredFileRendererContribution[];
|
|
534
|
-
refreshFileRenderer(id: string): void;
|
|
616
|
+
refreshFileRenderer(id: string, event?: FileRendererRefreshEnvelope): void;
|
|
535
617
|
onDidRefreshFileRenderer(listener: FileRendererRefreshListener): Disposable_2;
|
|
536
618
|
}
|
|
537
619
|
|
|
620
|
+
export declare interface FileRendererSaveResult {
|
|
621
|
+
revision?: string;
|
|
622
|
+
}
|
|
623
|
+
|
|
538
624
|
declare interface FileRendererStoreState {
|
|
539
625
|
renderers: Record<string, RegisteredFileRendererContribution>;
|
|
540
626
|
}
|
|
541
627
|
|
|
542
628
|
export declare const getKeybindingSteps: (keybinding: KeybindingSequence) => string[];
|
|
543
629
|
|
|
630
|
+
export declare const getSwitchModeNavigationTargetModeId: (target: NavigationTarget) => string | undefined;
|
|
631
|
+
|
|
544
632
|
export declare const getWorkbenchModePanelForRegion: (region: WorkbenchRegion) => "main" | "secondary" | "side" | undefined;
|
|
545
633
|
|
|
546
634
|
export declare const getWorkbenchSelectionResourceUris: (resource: ResourceRef | undefined) => string[];
|
|
@@ -551,6 +639,8 @@ export declare const headerTrailingMenuPath: (region: string) => MenuPath;
|
|
|
551
639
|
|
|
552
640
|
export declare interface HistoryController {
|
|
553
641
|
store: WorkbenchStore<HistoryStoreState>;
|
|
642
|
+
/** Snapshot the history for a compound navigation; the returned function restores it. */
|
|
643
|
+
createCheckpoint(): () => void;
|
|
554
644
|
goBack(): HistoryEntry | undefined;
|
|
555
645
|
goForward(): HistoryEntry | undefined;
|
|
556
646
|
goPrevious(): HistoryEntry | undefined;
|
|
@@ -578,6 +668,8 @@ export declare interface KanbanRendererContribution<TRow extends KanbanRendererR
|
|
|
578
668
|
id: string;
|
|
579
669
|
title: string;
|
|
580
670
|
resourceKind?: string;
|
|
671
|
+
/** Host-owned scope for persisted display settings. */
|
|
672
|
+
storageScope?: string;
|
|
581
673
|
/**
|
|
582
674
|
* Declarative attribute schema. The renderer dispatches filter / group /
|
|
583
675
|
* sort / display / inline-edit behavior on each descriptor's `type.kind`.
|
|
@@ -605,8 +697,8 @@ export declare interface KanbanRendererContribution<TRow extends KanbanRendererR
|
|
|
605
697
|
*/
|
|
606
698
|
executeQuery(state: KanbanRendererQueryState): Promise<TRow[]> | TRow[];
|
|
607
699
|
subscribe?: (listener: () => void) => Disposable_2 | (() => void);
|
|
608
|
-
/** Row
|
|
609
|
-
|
|
700
|
+
/** Row activation surfaced by the renderer (mirrored from <KanbanRenderer>). */
|
|
701
|
+
onRowActivate?: (row: TRow) => Promise<void> | void;
|
|
610
702
|
/** Per-row right-click context menu actions (mirrored from <KanbanRenderer>). */
|
|
611
703
|
getRowContextMenuActions?: (row: TRow) => ResourceContextAction[];
|
|
612
704
|
/**
|
|
@@ -700,7 +792,7 @@ export declare interface KanbanRendererRow {
|
|
|
700
792
|
title: string;
|
|
701
793
|
/**
|
|
702
794
|
* Optional navigation handle. When set, the renderer's default click handler
|
|
703
|
-
* routes through the contribution's
|
|
795
|
+
* routes through the contribution's onRowActivate (which typically opens the
|
|
704
796
|
* resource via the workbench).
|
|
705
797
|
*/
|
|
706
798
|
resource?: unknown;
|
|
@@ -810,6 +902,16 @@ declare interface LayoutModel {
|
|
|
810
902
|
carryRegionState?: readonly WorkbenchRegion[];
|
|
811
903
|
}): void;
|
|
812
904
|
getPersistenceScope(): LayoutScope | undefined;
|
|
905
|
+
/** True when the current persistence scope already stores a layout. A new scope returns false. */
|
|
906
|
+
/** Whether anything is stored for the active scope right now. */
|
|
907
|
+
hasPersistedLayout(): boolean;
|
|
908
|
+
/**
|
|
909
|
+
* Whether the active scope was entered with a layout the user already had. Unlike
|
|
910
|
+
* `hasPersistedLayout`, writes made while entering a mode do not change the answer.
|
|
911
|
+
*/
|
|
912
|
+
enteredWithPersistedLayout(): boolean;
|
|
913
|
+
/** Moves owned panel menus beside their owner's current region and removes orphan menus. */
|
|
914
|
+
reconcilePanelMenus(): void;
|
|
813
915
|
onWillChangePersistenceScope(listener: (scope: LayoutScope | undefined) => void): {
|
|
814
916
|
dispose(): void;
|
|
815
917
|
};
|
|
@@ -946,6 +1048,7 @@ declare interface OpenWidgetInput {
|
|
|
946
1048
|
resource?: ResourceRef;
|
|
947
1049
|
title?: string;
|
|
948
1050
|
region?: WorkbenchRegion;
|
|
1051
|
+
role?: WorkbenchWidgetRole;
|
|
949
1052
|
ownerId?: string;
|
|
950
1053
|
source?: ContributionSource;
|
|
951
1054
|
pinned?: boolean;
|
|
@@ -963,13 +1066,24 @@ export declare interface OpenWorkbenchPanelInput {
|
|
|
963
1066
|
resource?: ResourceRef;
|
|
964
1067
|
title?: string;
|
|
965
1068
|
region?: WorkbenchRegion;
|
|
1069
|
+
role?: WorkbenchWidgetRole;
|
|
966
1070
|
pinned?: boolean;
|
|
1071
|
+
closable?: boolean;
|
|
967
1072
|
mountStrategy?: WorkbenchPanelMountStrategy;
|
|
968
1073
|
hiddenByDefault?: boolean;
|
|
969
1074
|
tab?: WorkbenchPanelTab;
|
|
970
1075
|
strategy?: WorkbenchPanelOpenStrategy;
|
|
971
1076
|
}
|
|
972
1077
|
|
|
1078
|
+
export declare interface PersistedCompositionLayout {
|
|
1079
|
+
regions: Partial<Record<DockedCompositionRegion, PersistedCompositionRegionState>>;
|
|
1080
|
+
}
|
|
1081
|
+
|
|
1082
|
+
declare interface PersistedCompositionRegionState {
|
|
1083
|
+
order: readonly string[];
|
|
1084
|
+
activePanelId?: string;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
973
1087
|
export declare interface PersistedTreeRendererStates {
|
|
974
1088
|
statesByTreeId: Record<string, TreeRendererState>;
|
|
975
1089
|
}
|
|
@@ -1092,7 +1206,6 @@ declare type RegisteredWidgetContribution = Omit<WidgetContribution, "priority"
|
|
|
1092
1206
|
ownedPanelMenuIds?: readonly string[];
|
|
1093
1207
|
singleton: boolean;
|
|
1094
1208
|
reuse: WidgetReusePolicy;
|
|
1095
|
-
role: WorkbenchWidgetRole;
|
|
1096
1209
|
} & RegisteredContributionMetadata;
|
|
1097
1210
|
|
|
1098
1211
|
declare interface RegisteredWorkbenchNotification extends RegisteredContributionMetadata {
|
|
@@ -1108,6 +1221,44 @@ declare interface RegisteredWorkbenchNotification extends RegisteredContribution
|
|
|
1108
1221
|
|
|
1109
1222
|
export declare const resolveAnchorRegion: (anchorId: AnchorId) => "status" | "nav" | "activity" | "sidenav-header" | "sidenav" | "main-header" | "main-left-menu" | "main" | "main-right-menu" | "secondary-header" | "secondary-left-menu" | "secondary" | "secondary-right-menu" | "side-header" | "side-left-menu" | "side" | "side-right-menu" | "overlay";
|
|
1110
1223
|
|
|
1224
|
+
export declare const resolveComposition: (input: ResolveCompositionInput) => ResolvedComposition;
|
|
1225
|
+
|
|
1226
|
+
declare interface ResolveCompositionInput {
|
|
1227
|
+
context: CompositionResolutionContext;
|
|
1228
|
+
mode: CompositionModeDefinition;
|
|
1229
|
+
composition: WorkbenchComposition;
|
|
1230
|
+
persisted?: PersistedCompositionLayout;
|
|
1231
|
+
}
|
|
1232
|
+
|
|
1233
|
+
export declare interface ResolvedComposition {
|
|
1234
|
+
placements: readonly ResolvedCompositionPlacement[];
|
|
1235
|
+
regionOrder: Partial<Record<DockedCompositionRegion, readonly string[]>>;
|
|
1236
|
+
activePanelIds: Partial<Record<DockedCompositionRegion, string>>;
|
|
1237
|
+
addablePanels: readonly ResolvedCompositionAddablePanel[];
|
|
1238
|
+
diagnostics: readonly CompositionDiagnostic[];
|
|
1239
|
+
requiredFallback?: {
|
|
1240
|
+
panelId: string;
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
export declare interface ResolvedCompositionAddablePanel {
|
|
1245
|
+
panelId: string;
|
|
1246
|
+
region: DockedCompositionRegion;
|
|
1247
|
+
allowedRegions: readonly DockedCompositionRegion[];
|
|
1248
|
+
pinned?: boolean;
|
|
1249
|
+
}
|
|
1250
|
+
|
|
1251
|
+
export declare interface ResolvedCompositionPlacement {
|
|
1252
|
+
panelId: string;
|
|
1253
|
+
region: DockedCompositionRegion;
|
|
1254
|
+
slot?: string;
|
|
1255
|
+
required: boolean;
|
|
1256
|
+
defaultOpen: boolean;
|
|
1257
|
+
pinned?: boolean;
|
|
1258
|
+
allowedRegions: readonly DockedCompositionRegion[];
|
|
1259
|
+
origin: "persisted" | "required" | "default";
|
|
1260
|
+
}
|
|
1261
|
+
|
|
1111
1262
|
declare type ResolvedResourceHierarchyProvider = Required<ResourceHierarchyProvider>;
|
|
1112
1263
|
|
|
1113
1264
|
declare type ResolvedResourcePresenter = Required<ResourcePresenter>;
|
|
@@ -1134,6 +1285,14 @@ export declare interface ResourceContextAction {
|
|
|
1134
1285
|
|
|
1135
1286
|
export declare const resourceContextMenuPath: (resourceKind: string) => MenuPath;
|
|
1136
1287
|
|
|
1288
|
+
export declare interface ResourceHierarchyCycle {
|
|
1289
|
+
code: typeof resourceHierarchyCycleCode;
|
|
1290
|
+
path: ResourceRef[];
|
|
1291
|
+
repeatedUri: string;
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
export declare const resourceHierarchyCycleCode = "resource_hierarchy_cycle";
|
|
1295
|
+
|
|
1137
1296
|
export declare interface ResourceHierarchyProvider {
|
|
1138
1297
|
id: string;
|
|
1139
1298
|
priority?: number;
|
|
@@ -1197,6 +1356,7 @@ export declare interface ResourceRegistry {
|
|
|
1197
1356
|
registerHierarchyProvider(provider: ResourceHierarchyProvider): Disposable_2;
|
|
1198
1357
|
listHierarchyProviders(): ResolvedResourceHierarchyProvider[];
|
|
1199
1358
|
walkHierarchy(resource: ResourceRef | undefined): ResourceRef[];
|
|
1359
|
+
onDidDetectHierarchyCycle(listener: (cycle: ResourceHierarchyCycle) => void): Disposable_2;
|
|
1200
1360
|
isOpeningResource(): boolean;
|
|
1201
1361
|
openResource(resource: ResourceRef, input?: OpenResourceInput): Promise<WorkbenchPanelInstance>;
|
|
1202
1362
|
onDidOpenResource(listener: (resource: ResourceRef) => void): Disposable_2;
|
|
@@ -1483,7 +1643,6 @@ declare interface WidgetContribution {
|
|
|
1483
1643
|
priority?: number;
|
|
1484
1644
|
rendererId: string;
|
|
1485
1645
|
openCommandId?: string;
|
|
1486
|
-
role?: WorkbenchWidgetRole;
|
|
1487
1646
|
eligibleLocations?: WorkbenchLocationEligibility;
|
|
1488
1647
|
panelMenuOwner?: WorkbenchPanelMenuOwner;
|
|
1489
1648
|
tab?: WorkbenchWidgetTab;
|
|
@@ -1583,6 +1742,26 @@ declare interface WorkbenchCommandParamsRequest {
|
|
|
1583
1742
|
context?: WorkbenchCommandExecutionContext;
|
|
1584
1743
|
}
|
|
1585
1744
|
|
|
1745
|
+
export declare interface WorkbenchComposition {
|
|
1746
|
+
resourceKinds: readonly CompositionResourceKindDefinition[];
|
|
1747
|
+
panels: readonly CompositionPanelDefinition[];
|
|
1748
|
+
resourcePanels: readonly CompositionResourcePanelEdge[];
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
declare interface WorkbenchCompositionAddablePanel extends WorkbenchModeAddablePanel {
|
|
1752
|
+
contribution: RegisteredWidgetContribution;
|
|
1753
|
+
}
|
|
1754
|
+
|
|
1755
|
+
declare interface WorkbenchCompositionController {
|
|
1756
|
+
panelsFor(region: WorkbenchPanelRegion): WorkbenchCompositionRegionPanels;
|
|
1757
|
+
}
|
|
1758
|
+
|
|
1759
|
+
declare interface WorkbenchCompositionRegionPanels {
|
|
1760
|
+
open: readonly WorkbenchWidgetPlacement[];
|
|
1761
|
+
addable: readonly WorkbenchCompositionAddablePanel[];
|
|
1762
|
+
closable: readonly string[];
|
|
1763
|
+
}
|
|
1764
|
+
|
|
1586
1765
|
export declare interface WorkbenchCore extends WorkbenchCoreContributionContext {
|
|
1587
1766
|
host: WorkbenchHost;
|
|
1588
1767
|
registerModule(module: WorkbenchModuleContribution): Disposable_2;
|
|
@@ -1594,6 +1773,7 @@ declare interface WorkbenchCoreContributionContext {
|
|
|
1594
1773
|
commandPalette: WorkbenchCommandPaletteController;
|
|
1595
1774
|
commandPaletteResources: CommandPaletteResourceRegistry;
|
|
1596
1775
|
commands: CommandRegistry;
|
|
1776
|
+
composition: WorkbenchCompositionController;
|
|
1597
1777
|
context: ContextKeyService;
|
|
1598
1778
|
focus: WorkbenchFocusController;
|
|
1599
1779
|
history: HistoryController;
|
|
@@ -1602,6 +1782,7 @@ declare interface WorkbenchCoreContributionContext {
|
|
|
1602
1782
|
layout: WorkbenchLayoutModel;
|
|
1603
1783
|
modes: WorkbenchModeRegistry;
|
|
1604
1784
|
navigation: NavigationRegistry;
|
|
1785
|
+
navigator: WorkbenchNavigator;
|
|
1605
1786
|
notifications: NotificationRegistry;
|
|
1606
1787
|
panels: WorkbenchPanelsController;
|
|
1607
1788
|
preferences: PreferenceRegistry;
|
|
@@ -1679,7 +1860,7 @@ declare interface WorkbenchLayoutStoreState {
|
|
|
1679
1860
|
placeholders: Partial<Record<WorkbenchRegion, RegisteredPlaceholderContribution>>;
|
|
1680
1861
|
}
|
|
1681
1862
|
|
|
1682
|
-
declare type WorkbenchLocationContribution =
|
|
1863
|
+
declare type WorkbenchLocationContribution = WidgetContribution & WorkbenchPanelMenusContribution;
|
|
1683
1864
|
|
|
1684
1865
|
export declare interface WorkbenchLocationEligibility {
|
|
1685
1866
|
modeIds?: string[];
|
|
@@ -1701,15 +1882,31 @@ export declare type WorkbenchModeActivationContext = WorkbenchCoreContributionCo
|
|
|
1701
1882
|
|
|
1702
1883
|
export declare type WorkbenchModeActivationResult = Disposable_2 | readonly Disposable_2[] | undefined;
|
|
1703
1884
|
|
|
1885
|
+
export declare interface WorkbenchModeAddablePanel {
|
|
1886
|
+
panelId: string;
|
|
1887
|
+
region: WorkbenchPanelRegion;
|
|
1888
|
+
allowedRegions?: readonly WorkbenchRegion[];
|
|
1889
|
+
pinned?: boolean;
|
|
1890
|
+
}
|
|
1891
|
+
|
|
1892
|
+
export declare interface WorkbenchModeAddablePanelContext {
|
|
1893
|
+
layout: WorkbenchLayout;
|
|
1894
|
+
resource?: ResourceRef;
|
|
1895
|
+
}
|
|
1896
|
+
|
|
1704
1897
|
declare type WorkbenchModeChangeListener = () => void;
|
|
1705
1898
|
|
|
1706
1899
|
export declare interface WorkbenchModeContribution {
|
|
1707
1900
|
id: string;
|
|
1708
1901
|
label?: string;
|
|
1709
1902
|
panels?: readonly WorkbenchPanelRegion[];
|
|
1903
|
+
resourceKinds?: readonly string[];
|
|
1904
|
+
defaultResource?: ResourceRef | (() => Promise<ResourceRef | undefined> | ResourceRef | undefined);
|
|
1905
|
+
listAddablePanels?(context: WorkbenchModeAddablePanelContext): readonly WorkbenchModeAddablePanel[];
|
|
1710
1906
|
activate(ctx: WorkbenchModeActivationContext): WorkbenchModeActivationResult;
|
|
1711
1907
|
seed?(ctx: WorkbenchModeActivationContext): void;
|
|
1712
1908
|
enter?(ctx: WorkbenchModeActivationContext): WorkbenchModeActivationResult;
|
|
1909
|
+
reconcile?(ctx: WorkbenchModeActivationContext): void;
|
|
1713
1910
|
}
|
|
1714
1911
|
|
|
1715
1912
|
export declare interface WorkbenchModeRegistry {
|
|
@@ -1745,6 +1942,14 @@ export declare interface WorkbenchModuleContribution {
|
|
|
1745
1942
|
|
|
1746
1943
|
export declare type WorkbenchModuleContributionContext = WorkbenchModuleContext;
|
|
1747
1944
|
|
|
1945
|
+
declare interface WorkbenchNavigationCommit {
|
|
1946
|
+
modeId: string | undefined;
|
|
1947
|
+
resource: ResourceRef | undefined;
|
|
1948
|
+
replaceActive: boolean;
|
|
1949
|
+
}
|
|
1950
|
+
|
|
1951
|
+
declare type WorkbenchNavigationDiagnosticCode = "navigation_mode_missing" | "navigation_resource_missing" | "navigation_resource_incompatible" | "navigation_default_missing" | "navigation_target_stale";
|
|
1952
|
+
|
|
1748
1953
|
declare interface WorkbenchNavigationEntry {
|
|
1749
1954
|
entryId: string;
|
|
1750
1955
|
recordedAt: number;
|
|
@@ -1759,6 +1964,53 @@ declare interface WorkbenchNavigationEntry {
|
|
|
1759
1964
|
closedSubPanel?: WorkbenchClosedSubPanel;
|
|
1760
1965
|
}
|
|
1761
1966
|
|
|
1967
|
+
declare type WorkbenchNavigationResult = {
|
|
1968
|
+
ok: true;
|
|
1969
|
+
modeId: string | undefined;
|
|
1970
|
+
resource: ResourceRef | undefined;
|
|
1971
|
+
} | {
|
|
1972
|
+
ok: false;
|
|
1973
|
+
code: WorkbenchNavigationDiagnosticCode;
|
|
1974
|
+
message: string;
|
|
1975
|
+
};
|
|
1976
|
+
|
|
1977
|
+
declare interface WorkbenchNavigationTarget {
|
|
1978
|
+
modeId?: string;
|
|
1979
|
+
resource?: ResourceRef;
|
|
1980
|
+
replaceActive?: boolean;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
declare interface WorkbenchNavigator {
|
|
1984
|
+
configure(hooks: WorkbenchNavigatorHostHooks): void;
|
|
1985
|
+
getSelectedResource(): ResourceRef | undefined;
|
|
1986
|
+
open(target: WorkbenchNavigationTarget): Promise<WorkbenchNavigationResult>;
|
|
1987
|
+
commitContext(input: WorkbenchNavigatorCommitInput): WorkbenchNavigationResult;
|
|
1988
|
+
getLastResource(projectId: string | undefined, modeId: string): ResourceRef | undefined;
|
|
1989
|
+
forgetResource(uri: string): void;
|
|
1990
|
+
onDidCommit(listener: (commit: WorkbenchNavigationCommit) => void): {
|
|
1991
|
+
dispose(): void;
|
|
1992
|
+
};
|
|
1993
|
+
}
|
|
1994
|
+
|
|
1995
|
+
declare interface WorkbenchNavigatorCommitInput {
|
|
1996
|
+
modeId?: string | null;
|
|
1997
|
+
resource?: ResourceRef | null;
|
|
1998
|
+
replaceActive?: boolean;
|
|
1999
|
+
present?: boolean;
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
declare interface WorkbenchNavigatorHostHooks {
|
|
2003
|
+
getProjectId?(): string | undefined;
|
|
2004
|
+
getSelectedResource?(): ResourceRef | undefined;
|
|
2005
|
+
interpretSelection?(resource: ResourceRef): ResourceRef | undefined;
|
|
2006
|
+
applySelection?(resource: ResourceRef | undefined): void;
|
|
2007
|
+
applyScope?(commit: WorkbenchNavigationCommit): void;
|
|
2008
|
+
applyBreadcrumb?(resource: ResourceRef | undefined): void;
|
|
2009
|
+
presentResource?(resource: ResourceRef, input: {
|
|
2010
|
+
replaceActive: boolean;
|
|
2011
|
+
}): Promise<unknown> | unknown;
|
|
2012
|
+
}
|
|
2013
|
+
|
|
1762
2014
|
export declare interface WorkbenchNotification {
|
|
1763
2015
|
id?: string;
|
|
1764
2016
|
level: WorkbenchNotificationLevel;
|
|
@@ -1800,7 +2052,6 @@ export declare interface WorkbenchPanelContribution {
|
|
|
1800
2052
|
region: WorkbenchRegion;
|
|
1801
2053
|
fallbackRegion?: WorkbenchRegion;
|
|
1802
2054
|
rendererId: string;
|
|
1803
|
-
closable: boolean;
|
|
1804
2055
|
singleton?: boolean;
|
|
1805
2056
|
reuse?: WorkbenchPanelReusePolicy;
|
|
1806
2057
|
mountStrategy?: WorkbenchPanelMountStrategy;
|
|
@@ -1839,7 +2090,7 @@ export declare interface WorkbenchPanelInstance {
|
|
|
1839
2090
|
tab?: WorkbenchPanelTab;
|
|
1840
2091
|
}
|
|
1841
2092
|
|
|
1842
|
-
declare type WorkbenchPanelMenuContribution = Omit<WidgetContribution, "region" | "fallbackRegion"
|
|
2093
|
+
declare type WorkbenchPanelMenuContribution = Omit<WidgetContribution, "region" | "fallbackRegion"> & {
|
|
1843
2094
|
region: WorkbenchPanelMenuRegion;
|
|
1844
2095
|
fallbackRegion?: WorkbenchPanelMenuRegion;
|
|
1845
2096
|
};
|
|
@@ -1908,9 +2159,9 @@ export declare type WorkbenchPanelOpenStrategy = {
|
|
|
1908
2159
|
position?: WorkbenchTabPosition;
|
|
1909
2160
|
};
|
|
1910
2161
|
|
|
1911
|
-
declare type WorkbenchPanelRegion = (typeof workbenchPanelRegions)[number];
|
|
2162
|
+
export declare type WorkbenchPanelRegion = (typeof workbenchPanelRegions)[number];
|
|
1912
2163
|
|
|
1913
|
-
declare const workbenchPanelRegions: readonly ["main", "secondary", "side"];
|
|
2164
|
+
export declare const workbenchPanelRegions: readonly ["main", "secondary", "side"];
|
|
1914
2165
|
|
|
1915
2166
|
export declare interface WorkbenchPanelRenderInput {
|
|
1916
2167
|
workbench: WorkbenchCore;
|
|
@@ -2070,7 +2321,7 @@ declare type WorkbenchStoreSelector<TState, TValue> = (state: TState) => TValue;
|
|
|
2070
2321
|
|
|
2071
2322
|
declare type WorkbenchStoreSelectorListener<TValue> = (value: TValue, previousValue: TValue) => void;
|
|
2072
2323
|
|
|
2073
|
-
declare type WorkbenchSubPanelContribution = Omit<WidgetContribution, "region" | "fallbackRegion"
|
|
2324
|
+
declare type WorkbenchSubPanelContribution = Omit<WidgetContribution, "region" | "fallbackRegion"> & {
|
|
2074
2325
|
region: WorkbenchPanelRegion;
|
|
2075
2326
|
fallbackRegion?: WorkbenchPanelRegion;
|
|
2076
2327
|
} & WorkbenchPanelMenusContribution;
|
|
@@ -2081,6 +2332,8 @@ declare interface WorkbenchSubPanelRef {
|
|
|
2081
2332
|
instanceKey?: string;
|
|
2082
2333
|
}
|
|
2083
2334
|
|
|
2335
|
+
export declare const workbenchSwitchModeCommandId = "workbench.action.switchMode";
|
|
2336
|
+
|
|
2084
2337
|
export declare type WorkbenchTabPosition = "start" | "end" | {
|
|
2085
2338
|
beforeWidgetId: string;
|
|
2086
2339
|
} | {
|