@codingame/monaco-vscode-api 1.79.11 → 1.79.13

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.
@@ -0,0 +1,3106 @@
1
+ import { S as ServiceIdentifier, b as SyncDescriptor, c as IConstructorSignature, I as IInstantiationService, B as BrandedService } from './instantiation.js';
2
+ import { a as UriComponents, U as URI } from './uri.js';
3
+ import { d as IEditorOptions, s as IComposite, t as IProgressIndicator, u as IBoundarySashes, m as IMarkdownString, C as ICompositeControl, T as Orientation } from './editorBrowser.js';
4
+ import { c as FileType } from './files.js';
5
+ import { d as ICommandAction, e as ICommandActionTitle, f as Icon, g as ILocalizedString, E as ExtensionIdentifier, h as IEnvironmentService } from './extensions.d2.ts';
6
+ import { E as Event$1, a as IDisposable, D as Disposable, C as CancellationToken, c as Emitter } from './event.js';
7
+ import { ab as SubmenuAction, A as IAction, B as ICommandService, ac as ColorIdentifier, ad as Color, z as IActionRunner, ae as IRunEvent, G as Command } from './colorRegistry.js';
8
+ import { I as IconIdentifier, T as ThemeIcon, a as ThemeColor } from './themables.js';
9
+ import { I as IJSONSchema } from './jsonSchema.js';
10
+ import { b as IWorkspaceFolder, I as IAnyWorkspaceIdentifier, c as IWorkspaceContextService } from './workspace.js';
11
+ import { K as KeyCode, c as KeyCodeChord, R as ResolvedKeybinding, a as IKeybindingService } from './keybinding.js';
12
+ import { a as IContextKeyService, C as ContextKeyExpression } from './contextkey.js';
13
+ import { S as Severity } from './severity.js';
14
+ import { a as IExtensionService } from './extensionsRegistry.js';
15
+
16
+ interface IConfigurationOverrides {
17
+ overrideIdentifier?: string | null;
18
+ resource?: URI | null;
19
+ }
20
+ type IConfigurationUpdateOverrides = Omit<IConfigurationOverrides, 'overrideIdentifier'> & {
21
+ overrideIdentifiers?: string[] | null;
22
+ };
23
+ declare const enum ConfigurationTarget {
24
+ APPLICATION = 1,
25
+ USER = 2,
26
+ USER_LOCAL = 3,
27
+ USER_REMOTE = 4,
28
+ WORKSPACE = 5,
29
+ WORKSPACE_FOLDER = 6,
30
+ DEFAULT = 7,
31
+ MEMORY = 8
32
+ }
33
+ interface IConfigurationChange {
34
+ keys: string[];
35
+ overrides: [string, string[]][];
36
+ }
37
+ interface IConfigurationChangeEvent {
38
+ readonly source: ConfigurationTarget;
39
+ readonly affectedKeys: ReadonlySet<string>;
40
+ readonly change: IConfigurationChange;
41
+ affectsConfiguration(configuration: string, overrides?: IConfigurationOverrides): boolean;
42
+ readonly sourceConfig: any;
43
+ }
44
+ interface IConfigurationValue<T> {
45
+ readonly defaultValue?: T;
46
+ readonly applicationValue?: T;
47
+ readonly userValue?: T;
48
+ readonly userLocalValue?: T;
49
+ readonly userRemoteValue?: T;
50
+ readonly workspaceValue?: T;
51
+ readonly workspaceFolderValue?: T;
52
+ readonly memoryValue?: T;
53
+ readonly policyValue?: T;
54
+ readonly value?: T;
55
+ readonly default?: {
56
+ value?: T;
57
+ override?: T;
58
+ };
59
+ readonly application?: {
60
+ value?: T;
61
+ override?: T;
62
+ };
63
+ readonly user?: {
64
+ value?: T;
65
+ override?: T;
66
+ };
67
+ readonly userLocal?: {
68
+ value?: T;
69
+ override?: T;
70
+ };
71
+ readonly userRemote?: {
72
+ value?: T;
73
+ override?: T;
74
+ };
75
+ readonly workspace?: {
76
+ value?: T;
77
+ override?: T;
78
+ };
79
+ readonly workspaceFolder?: {
80
+ value?: T;
81
+ override?: T;
82
+ };
83
+ readonly memory?: {
84
+ value?: T;
85
+ override?: T;
86
+ };
87
+ readonly policy?: {
88
+ value?: T;
89
+ };
90
+ readonly overrideIdentifiers?: string[];
91
+ }
92
+ interface IConfigurationUpdateOptions {
93
+ /**
94
+ * If `true`, do not notifies the error to user by showing the message box. Default is `false`.
95
+ */
96
+ donotNotifyError?: boolean;
97
+ /**
98
+ * How to handle dirty file when updating the configuration.
99
+ */
100
+ handleDirtyFile?: 'save' | 'revert';
101
+ }
102
+
103
+ declare const IConfigurationService: ServiceIdentifier<IConfigurationService>;
104
+ interface IConfigurationService {
105
+ readonly _serviceBrand: undefined;
106
+ onDidChangeConfiguration: Event$1<IConfigurationChangeEvent>;
107
+ getConfigurationData(): IConfigurationData | null;
108
+ /**
109
+ * Fetches the value of the section for the given overrides.
110
+ * Value can be of native type or an object keyed off the section name.
111
+ *
112
+ * @param section - Section of the configuration. Can be `null` or `undefined`.
113
+ * @param overrides - Overrides that has to be applied while fetching
114
+ *
115
+ */
116
+ getValue<T>(): T;
117
+ getValue<T>(section: string): T;
118
+ getValue<T>(overrides: IConfigurationOverrides): T;
119
+ getValue<T>(section: string, overrides: IConfigurationOverrides): T;
120
+ /**
121
+ * Update a configuration value.
122
+ *
123
+ * Use `target` to update the configuration in a specific `ConfigurationTarget`.
124
+ *
125
+ * Use `overrides` to update the configuration for a resource or for override identifiers or both.
126
+ *
127
+ * Passing a resource through overrides will update the configuration in the workspace folder containing that resource.
128
+ *
129
+ * *Note 1:* Updating configuration to a default value will remove the configuration from the requested target. If not target is passed, it will be removed from all writeable targets.
130
+ *
131
+ * *Note 2:* Use `undefined` value to remove the configuration from the given target. If not target is passed, it will be removed from all writeable targets.
132
+ *
133
+ * Use `donotNotifyError` and set it to `true` to surpresss errors.
134
+ *
135
+ * @param key setting to be updated
136
+ * @param value The new value
137
+ */
138
+ updateValue(key: string, value: any): Promise<void>;
139
+ updateValue(key: string, value: any, target: ConfigurationTarget): Promise<void>;
140
+ updateValue(key: string, value: any, overrides: IConfigurationOverrides | IConfigurationUpdateOverrides): Promise<void>;
141
+ updateValue(key: string, value: any, overrides: IConfigurationOverrides | IConfigurationUpdateOverrides, target: ConfigurationTarget, options?: IConfigurationUpdateOptions): Promise<void>;
142
+ inspect<T>(key: string, overrides?: IConfigurationOverrides): IConfigurationValue<Readonly<T>>;
143
+ reloadConfiguration(target?: ConfigurationTarget | IWorkspaceFolder): Promise<void>;
144
+ keys(): {
145
+ default: string[];
146
+ user: string[];
147
+ workspace: string[];
148
+ workspaceFolder: string[];
149
+ memory?: string[];
150
+ };
151
+ }
152
+ interface IConfigurationModel {
153
+ contents: any;
154
+ keys: string[];
155
+ overrides: IOverrides[];
156
+ }
157
+ interface IOverrides {
158
+ keys: string[];
159
+ contents: any;
160
+ identifiers: string[];
161
+ }
162
+ interface IConfigurationData {
163
+ defaults: IConfigurationModel;
164
+ policy: IConfigurationModel;
165
+ application: IConfigurationModel;
166
+ user: IConfigurationModel;
167
+ workspace: IConfigurationModel;
168
+ folders: [UriComponents, IConfigurationModel][];
169
+ }
170
+
171
+ interface IKeybindings {
172
+ primary?: number;
173
+ secondary?: number[];
174
+ win?: {
175
+ primary: number;
176
+ secondary?: number[];
177
+ };
178
+ linux?: {
179
+ primary: number;
180
+ secondary?: number[];
181
+ };
182
+ mac?: {
183
+ primary: number;
184
+ secondary?: number[];
185
+ };
186
+ }
187
+
188
+ interface ISubmenuItem {
189
+ title: string | ICommandActionTitle;
190
+ submenu: MenuId;
191
+ icon?: Icon;
192
+ when?: ContextKeyExpression;
193
+ group?: 'navigation' | string;
194
+ order?: number;
195
+ isSelection?: boolean;
196
+ rememberDefaultAction?: boolean;
197
+ }
198
+ declare class MenuId {
199
+ private static readonly _instances;
200
+ static readonly CommandPalette: MenuId;
201
+ static readonly DebugBreakpointsContext: MenuId;
202
+ static readonly DebugCallStackContext: MenuId;
203
+ static readonly DebugConsoleContext: MenuId;
204
+ static readonly DebugVariablesContext: MenuId;
205
+ static readonly DebugWatchContext: MenuId;
206
+ static readonly DebugToolBar: MenuId;
207
+ static readonly DebugToolBarStop: MenuId;
208
+ static readonly EditorContext: MenuId;
209
+ static readonly SimpleEditorContext: MenuId;
210
+ static readonly EditorContent: MenuId;
211
+ static readonly EditorLineNumberContext: MenuId;
212
+ static readonly EditorContextCopy: MenuId;
213
+ static readonly EditorContextPeek: MenuId;
214
+ static readonly EditorContextShare: MenuId;
215
+ static readonly EditorTitle: MenuId;
216
+ static readonly EditorTitleRun: MenuId;
217
+ static readonly EditorTitleContext: MenuId;
218
+ static readonly EditorTitleContextShare: MenuId;
219
+ static readonly EmptyEditorGroup: MenuId;
220
+ static readonly EmptyEditorGroupContext: MenuId;
221
+ static readonly EditorTabsBarContext: MenuId;
222
+ static readonly ExplorerContext: MenuId;
223
+ static readonly ExplorerContextShare: MenuId;
224
+ static readonly ExtensionContext: MenuId;
225
+ static readonly GlobalActivity: MenuId;
226
+ static readonly CommandCenter: MenuId;
227
+ static readonly LayoutControlMenuSubmenu: MenuId;
228
+ static readonly LayoutControlMenu: MenuId;
229
+ static readonly MenubarMainMenu: MenuId;
230
+ static readonly MenubarAppearanceMenu: MenuId;
231
+ static readonly MenubarDebugMenu: MenuId;
232
+ static readonly MenubarEditMenu: MenuId;
233
+ static readonly MenubarCopy: MenuId;
234
+ static readonly MenubarFileMenu: MenuId;
235
+ static readonly MenubarGoMenu: MenuId;
236
+ static readonly MenubarHelpMenu: MenuId;
237
+ static readonly MenubarLayoutMenu: MenuId;
238
+ static readonly MenubarNewBreakpointMenu: MenuId;
239
+ static readonly PanelAlignmentMenu: MenuId;
240
+ static readonly PanelPositionMenu: MenuId;
241
+ static readonly MenubarPreferencesMenu: MenuId;
242
+ static readonly MenubarRecentMenu: MenuId;
243
+ static readonly MenubarSelectionMenu: MenuId;
244
+ static readonly MenubarShare: MenuId;
245
+ static readonly MenubarSwitchEditorMenu: MenuId;
246
+ static readonly MenubarSwitchGroupMenu: MenuId;
247
+ static readonly MenubarTerminalMenu: MenuId;
248
+ static readonly MenubarViewMenu: MenuId;
249
+ static readonly MenubarHomeMenu: MenuId;
250
+ static readonly OpenEditorsContext: MenuId;
251
+ static readonly OpenEditorsContextShare: MenuId;
252
+ static readonly ProblemsPanelContext: MenuId;
253
+ static readonly SCMChangeContext: MenuId;
254
+ static readonly SCMResourceContext: MenuId;
255
+ static readonly SCMResourceContextShare: MenuId;
256
+ static readonly SCMResourceFolderContext: MenuId;
257
+ static readonly SCMResourceGroupContext: MenuId;
258
+ static readonly SCMSourceControl: MenuId;
259
+ static readonly SCMTitle: MenuId;
260
+ static readonly SearchContext: MenuId;
261
+ static readonly SearchActionMenu: MenuId;
262
+ static readonly StatusBarWindowIndicatorMenu: MenuId;
263
+ static readonly StatusBarRemoteIndicatorMenu: MenuId;
264
+ static readonly StickyScrollContext: MenuId;
265
+ static readonly TestItem: MenuId;
266
+ static readonly TestItemGutter: MenuId;
267
+ static readonly TestPeekElement: MenuId;
268
+ static readonly TestPeekTitle: MenuId;
269
+ static readonly TouchBarContext: MenuId;
270
+ static readonly TitleBarContext: MenuId;
271
+ static readonly TitleBarTitleContext: MenuId;
272
+ static readonly TunnelContext: MenuId;
273
+ static readonly TunnelPrivacy: MenuId;
274
+ static readonly TunnelProtocol: MenuId;
275
+ static readonly TunnelPortInline: MenuId;
276
+ static readonly TunnelTitle: MenuId;
277
+ static readonly TunnelLocalAddressInline: MenuId;
278
+ static readonly TunnelOriginInline: MenuId;
279
+ static readonly ViewItemContext: MenuId;
280
+ static readonly ViewContainerTitle: MenuId;
281
+ static readonly ViewContainerTitleContext: MenuId;
282
+ static readonly ViewTitle: MenuId;
283
+ static readonly ViewTitleContext: MenuId;
284
+ static readonly CommentEditorActions: MenuId;
285
+ static readonly CommentThreadTitle: MenuId;
286
+ static readonly CommentThreadActions: MenuId;
287
+ static readonly CommentThreadAdditionalActions: MenuId;
288
+ static readonly CommentThreadTitleContext: MenuId;
289
+ static readonly CommentThreadCommentContext: MenuId;
290
+ static readonly CommentTitle: MenuId;
291
+ static readonly CommentActions: MenuId;
292
+ static readonly InteractiveToolbar: MenuId;
293
+ static readonly InteractiveCellTitle: MenuId;
294
+ static readonly InteractiveCellDelete: MenuId;
295
+ static readonly InteractiveCellExecute: MenuId;
296
+ static readonly InteractiveInputExecute: MenuId;
297
+ static readonly NotebookToolbar: MenuId;
298
+ static readonly NotebookCellTitle: MenuId;
299
+ static readonly NotebookCellDelete: MenuId;
300
+ static readonly NotebookCellInsert: MenuId;
301
+ static readonly NotebookCellBetween: MenuId;
302
+ static readonly NotebookCellListTop: MenuId;
303
+ static readonly NotebookCellExecute: MenuId;
304
+ static readonly NotebookCellExecutePrimary: MenuId;
305
+ static readonly NotebookDiffCellInputTitle: MenuId;
306
+ static readonly NotebookDiffCellMetadataTitle: MenuId;
307
+ static readonly NotebookDiffCellOutputsTitle: MenuId;
308
+ static readonly NotebookOutputToolbar: MenuId;
309
+ static readonly NotebookEditorLayoutConfigure: MenuId;
310
+ static readonly NotebookKernelSource: MenuId;
311
+ static readonly BulkEditTitle: MenuId;
312
+ static readonly BulkEditContext: MenuId;
313
+ static readonly TimelineItemContext: MenuId;
314
+ static readonly TimelineTitle: MenuId;
315
+ static readonly TimelineTitleContext: MenuId;
316
+ static readonly TimelineFilterSubMenu: MenuId;
317
+ static readonly AccountsContext: MenuId;
318
+ static readonly PanelTitle: MenuId;
319
+ static readonly AuxiliaryBarTitle: MenuId;
320
+ static readonly TerminalInstanceContext: MenuId;
321
+ static readonly TerminalEditorInstanceContext: MenuId;
322
+ static readonly TerminalNewDropdownContext: MenuId;
323
+ static readonly TerminalTabContext: MenuId;
324
+ static readonly TerminalTabEmptyAreaContext: MenuId;
325
+ static readonly TerminalInlineTabContext: MenuId;
326
+ static readonly WebviewContext: MenuId;
327
+ static readonly InlineCompletionsActions: MenuId;
328
+ static readonly NewFile: MenuId;
329
+ static readonly MergeInput1Toolbar: MenuId;
330
+ static readonly MergeInput2Toolbar: MenuId;
331
+ static readonly MergeBaseToolbar: MenuId;
332
+ static readonly MergeInputResultToolbar: MenuId;
333
+ static readonly InlineSuggestionToolbar: MenuId;
334
+ static readonly ChatContext: MenuId;
335
+ static readonly ChatCodeBlock: MenuId;
336
+ static readonly ChatMessageTitle: MenuId;
337
+ static readonly ChatExecute: MenuId;
338
+ /**
339
+ * Create or reuse a `MenuId` with the given identifier
340
+ */
341
+ static for(identifier: string): MenuId;
342
+ readonly id: string;
343
+ /**
344
+ * Create a new `MenuId` with the unique identifier. Will throw if a menu
345
+ * with the identifier already exists, use `MenuId.for(ident)` or a unique
346
+ * identifier
347
+ */
348
+ constructor(identifier: string);
349
+ }
350
+ interface IMenuActionOptions {
351
+ arg?: any;
352
+ shouldForwardArgs?: boolean;
353
+ renderShortTitle?: boolean;
354
+ }
355
+ interface IMenuChangeEvent {
356
+ readonly menu: IMenu;
357
+ readonly isStructuralChange: boolean;
358
+ readonly isToggleChange: boolean;
359
+ readonly isEnablementChange: boolean;
360
+ }
361
+ interface IMenu extends IDisposable {
362
+ readonly onDidChange: Event$1<IMenuChangeEvent>;
363
+ getActions(options?: IMenuActionOptions): [string, Array<MenuItemAction | SubmenuItemAction>][];
364
+ }
365
+ interface IMenuCreateOptions {
366
+ emitEventsForSubmenuChanges?: boolean;
367
+ eventDebounceDelay?: number;
368
+ }
369
+ declare const IMenuService: ServiceIdentifier<IMenuService>;
370
+ interface IMenuService {
371
+ readonly _serviceBrand: undefined;
372
+ /**
373
+ * Create a new menu for the given menu identifier. A menu sends events when it's entries
374
+ * have changed (placement, enablement, checked-state). By default it does not send events for
375
+ * submenu entries. That is more expensive and must be explicitly enabled with the
376
+ * `emitEventsForSubmenuChanges` flag.
377
+ */
378
+ createMenu(id: MenuId, contextKeyService: IContextKeyService, options?: IMenuCreateOptions): IMenu;
379
+ /**
380
+ * Reset **all** menu item hidden states.
381
+ */
382
+ resetHiddenStates(): void;
383
+ /**
384
+ * Reset the menu's hidden states.
385
+ */
386
+ resetHiddenStates(menuIds: readonly MenuId[] | undefined): void;
387
+ }
388
+ declare class SubmenuItemAction extends SubmenuAction {
389
+ readonly item: ISubmenuItem;
390
+ readonly hideActions: IMenuItemHide | undefined;
391
+ constructor(item: ISubmenuItem, hideActions: IMenuItemHide | undefined, actions: IAction[]);
392
+ }
393
+ interface IMenuItemHide {
394
+ readonly isHidden: boolean;
395
+ readonly hide: IAction;
396
+ readonly toggle: IAction;
397
+ }
398
+ declare class MenuItemAction implements IAction {
399
+ readonly hideActions: IMenuItemHide | undefined;
400
+ private _commandService;
401
+ static label(action: ICommandAction, options?: IMenuActionOptions): string;
402
+ readonly item: ICommandAction;
403
+ readonly alt: MenuItemAction | undefined;
404
+ private readonly _options;
405
+ readonly id: string;
406
+ readonly label: string;
407
+ readonly tooltip: string;
408
+ readonly class: string | undefined;
409
+ readonly enabled: boolean;
410
+ readonly checked?: boolean;
411
+ constructor(item: ICommandAction, alt: ICommandAction | undefined, options: IMenuActionOptions | undefined, hideActions: IMenuItemHide | undefined, contextKeyService: IContextKeyService, _commandService: ICommandService);
412
+ run(...args: any[]): Promise<void>;
413
+ }
414
+
415
+ /**
416
+ * Flags to indicate whether to use the default profile or not.
417
+ */
418
+ type UseDefaultProfileFlags = {
419
+ settings?: boolean;
420
+ keybindings?: boolean;
421
+ tasks?: boolean;
422
+ snippets?: boolean;
423
+ extensions?: boolean;
424
+ uiState?: boolean;
425
+ };
426
+ interface IUserDataProfile {
427
+ readonly id: string;
428
+ readonly isDefault: boolean;
429
+ readonly name: string;
430
+ readonly shortName?: string;
431
+ readonly location: URI;
432
+ readonly globalStorageHome: URI;
433
+ readonly settingsResource: URI;
434
+ readonly keybindingsResource: URI;
435
+ readonly tasksResource: URI;
436
+ readonly snippetsHome: URI;
437
+ readonly extensionsResource: URI;
438
+ readonly cacheHome: URI;
439
+ readonly useDefaultFlags?: UseDefaultProfileFlags;
440
+ readonly isTransient?: boolean;
441
+ }
442
+
443
+ declare enum WillSaveStateReason {
444
+ /**
445
+ * No specific reason to save state.
446
+ */
447
+ NONE = 0,
448
+ /**
449
+ * A hint that the workbench is about to shutdown.
450
+ */
451
+ SHUTDOWN = 1
452
+ }
453
+ interface IWillSaveStateEvent {
454
+ readonly reason: WillSaveStateReason;
455
+ }
456
+ declare const IStorageService: ServiceIdentifier<IStorageService>;
457
+ interface IStorageService {
458
+ readonly _serviceBrand: undefined;
459
+ /**
460
+ * Emitted whenever data is updated or deleted.
461
+ */
462
+ readonly onDidChangeValue: Event$1<IStorageValueChangeEvent>;
463
+ /**
464
+ * Emitted whenever target of a storage entry changes.
465
+ */
466
+ readonly onDidChangeTarget: Event$1<IStorageTargetChangeEvent>;
467
+ /**
468
+ * Emitted when the storage is about to persist. This is the right time
469
+ * to persist data to ensure it is stored before the application shuts
470
+ * down.
471
+ *
472
+ * The will save state event allows to optionally ask for the reason of
473
+ * saving the state, e.g. to find out if the state is saved due to a
474
+ * shutdown.
475
+ *
476
+ * Note: this event may be fired many times, not only on shutdown to prevent
477
+ * loss of state in situations where the shutdown is not sufficient to
478
+ * persist the data properly.
479
+ */
480
+ readonly onWillSaveState: Event$1<IWillSaveStateEvent>;
481
+ /**
482
+ * Retrieve an element stored with the given key from storage. Use
483
+ * the provided `defaultValue` if the element is `null` or `undefined`.
484
+ *
485
+ * @param scope allows to define the scope of the storage operation
486
+ * to either the current workspace only, all workspaces or all profiles.
487
+ */
488
+ get(key: string, scope: StorageScope, fallbackValue: string): string;
489
+ get(key: string, scope: StorageScope, fallbackValue?: string): string | undefined;
490
+ /**
491
+ * Retrieve an element stored with the given key from storage. Use
492
+ * the provided `defaultValue` if the element is `null` or `undefined`.
493
+ * The element will be converted to a `boolean`.
494
+ *
495
+ * @param scope allows to define the scope of the storage operation
496
+ * to either the current workspace only, all workspaces or all profiles.
497
+ */
498
+ getBoolean(key: string, scope: StorageScope, fallbackValue: boolean): boolean;
499
+ getBoolean(key: string, scope: StorageScope, fallbackValue?: boolean): boolean | undefined;
500
+ /**
501
+ * Retrieve an element stored with the given key from storage. Use
502
+ * the provided `defaultValue` if the element is `null` or `undefined`.
503
+ * The element will be converted to a `number` using `parseInt` with a
504
+ * base of `10`.
505
+ *
506
+ * @param scope allows to define the scope of the storage operation
507
+ * to either the current workspace only, all workspaces or all profiles.
508
+ */
509
+ getNumber(key: string, scope: StorageScope, fallbackValue: number): number;
510
+ getNumber(key: string, scope: StorageScope, fallbackValue?: number): number | undefined;
511
+ /**
512
+ * Retrieve an element stored with the given key from storage. Use
513
+ * the provided `defaultValue` if the element is `null` or `undefined`.
514
+ * The element will be converted to a `object` using `JSON.parse`.
515
+ *
516
+ * @param scope allows to define the scope of the storage operation
517
+ * to either the current workspace only, all workspaces or all profiles.
518
+ */
519
+ getObject<T extends object>(key: string, scope: StorageScope, fallbackValue: T): T;
520
+ getObject<T extends object>(key: string, scope: StorageScope, fallbackValue?: T): T | undefined;
521
+ /**
522
+ * Store a value under the given key to storage. The value will be
523
+ * converted to a `string`. Storing either `undefined` or `null` will
524
+ * remove the entry under the key.
525
+ *
526
+ * @param scope allows to define the scope of the storage operation
527
+ * to either the current workspace only, all workspaces or all profiles.
528
+ *
529
+ * @param target allows to define the target of the storage operation
530
+ * to either the current machine or user.
531
+ */
532
+ store(key: string, value: string | boolean | number | undefined | null | object, scope: StorageScope, target: StorageTarget): void;
533
+ /**
534
+ * Delete an element stored under the provided key from storage.
535
+ *
536
+ * The scope argument allows to define the scope of the storage
537
+ * operation to either the current workspace only, all workspaces
538
+ * or all profiles.
539
+ */
540
+ remove(key: string, scope: StorageScope): void;
541
+ /**
542
+ * Returns all the keys used in the storage for the provided `scope`
543
+ * and `target`.
544
+ *
545
+ * Note: this will NOT return all keys stored in the storage layer.
546
+ * Some keys may not have an associated `StorageTarget` and thus
547
+ * will be excluded from the results.
548
+ *
549
+ * @param scope allows to define the scope for the keys
550
+ * to either the current workspace only, all workspaces or all profiles.
551
+ *
552
+ * @param target allows to define the target for the keys
553
+ * to either the current machine or user.
554
+ */
555
+ keys(scope: StorageScope, target: StorageTarget): string[];
556
+ /**
557
+ * Log the contents of the storage to the console.
558
+ */
559
+ log(): void;
560
+ /**
561
+ * Returns true if the storage service handles the provided scope.
562
+ */
563
+ hasScope(scope: IAnyWorkspaceIdentifier | IUserDataProfile): boolean;
564
+ /**
565
+ * Switch storage to another workspace or profile. Optionally preserve the
566
+ * current data to the new storage.
567
+ */
568
+ switch(to: IAnyWorkspaceIdentifier | IUserDataProfile, preserveData: boolean): Promise<void>;
569
+ /**
570
+ * Whether the storage for the given scope was created during this session or
571
+ * existed before.
572
+ */
573
+ isNew(scope: StorageScope): boolean;
574
+ /**
575
+ * Allows to flush state, e.g. in cases where a shutdown is
576
+ * imminent. This will send out the `onWillSaveState` to ask
577
+ * everyone for latest state.
578
+ *
579
+ * @returns a `Promise` that can be awaited on when all updates
580
+ * to the underlying storage have been flushed.
581
+ */
582
+ flush(reason?: WillSaveStateReason): Promise<void>;
583
+ }
584
+ declare const enum StorageScope {
585
+ /**
586
+ * The stored data will be scoped to all workspaces across all profiles.
587
+ */
588
+ APPLICATION = -1,
589
+ /**
590
+ * The stored data will be scoped to all workspaces of the same profile.
591
+ */
592
+ PROFILE = 0,
593
+ /**
594
+ * The stored data will be scoped to the current workspace.
595
+ */
596
+ WORKSPACE = 1
597
+ }
598
+ declare const enum StorageTarget {
599
+ /**
600
+ * The stored data is user specific and applies across machines.
601
+ */
602
+ USER = 0,
603
+ /**
604
+ * The stored data is machine specific.
605
+ */
606
+ MACHINE = 1
607
+ }
608
+ interface IStorageValueChangeEvent {
609
+ /**
610
+ * The scope for the storage entry that changed
611
+ * or was removed.
612
+ */
613
+ readonly scope: StorageScope;
614
+ /**
615
+ * The `key` of the storage entry that was changed
616
+ * or was removed.
617
+ */
618
+ readonly key: string;
619
+ /**
620
+ * The `target` can be `undefined` if a key is being
621
+ * removed.
622
+ */
623
+ readonly target: StorageTarget | undefined;
624
+ }
625
+ interface IStorageTargetChangeEvent {
626
+ /**
627
+ * The scope for the target that changed. Listeners
628
+ * should use `keys(scope, target)` to get an updated
629
+ * list of keys for the given `scope` and `target`.
630
+ */
631
+ readonly scope: StorageScope;
632
+ }
633
+
634
+ interface IPropertyData {
635
+ classification: 'SystemMetaData' | 'CallstackOrException' | 'CustomerContent' | 'PublicNonPersonalData' | 'EndUserPseudonymizedInformation';
636
+ purpose: 'PerformanceAndHealth' | 'FeatureInsight' | 'BusinessInsight';
637
+ comment: string;
638
+ expiration?: string;
639
+ endpoint?: string;
640
+ isMeasurement?: boolean;
641
+ }
642
+ interface IGDPRProperty {
643
+ owner: string;
644
+ comment: string;
645
+ expiration?: string;
646
+ readonly [name: string]: IPropertyData | undefined | IGDPRProperty | string;
647
+ }
648
+ type IGDPRPropertyWithoutMetadata = Omit<IGDPRProperty, 'owner' | 'comment' | 'expiration'>;
649
+ type OmitMetadata<T> = Omit<T, 'owner' | 'comment' | 'expiration'>;
650
+ type ClassifiedEvent<T extends IGDPRPropertyWithoutMetadata> = {
651
+ [k in keyof T]: any;
652
+ };
653
+ type StrictPropertyChecker<TEvent, TClassification, TError> = keyof TEvent extends keyof OmitMetadata<TClassification> ? keyof OmitMetadata<TClassification> extends keyof TEvent ? TEvent : TError : TError;
654
+ type StrictPropertyCheckError = {
655
+ error: 'Type of classified event does not match event properties';
656
+ };
657
+ type StrictPropertyCheck<T extends IGDPRProperty, E> = StrictPropertyChecker<E, ClassifiedEvent<OmitMetadata<T>>, StrictPropertyCheckError>;
658
+
659
+ interface ITelemetryData {
660
+ from?: string;
661
+ target?: string;
662
+ [key: string]: any;
663
+ }
664
+
665
+ declare const ITelemetryService: ServiceIdentifier<ITelemetryService>;
666
+ interface ITelemetryService {
667
+ readonly _serviceBrand: undefined;
668
+ readonly telemetryLevel: TelemetryLevel;
669
+ readonly sessionId: string;
670
+ readonly machineId: string;
671
+ readonly firstSessionDate: string;
672
+ readonly msftInternal?: boolean;
673
+ /**
674
+ * Whether error telemetry will get sent. If false, `publicLogError` will no-op.
675
+ */
676
+ readonly sendErrorTelemetry: boolean;
677
+ /**
678
+ * @deprecated Use publicLog2 and the typescript GDPR annotation where possible
679
+ */
680
+ publicLog(eventName: string, data?: ITelemetryData): void;
681
+ /**
682
+ * Sends a telemetry event that has been privacy approved.
683
+ * Do not call this unless you have been given approval.
684
+ */
685
+ publicLog2<E extends ClassifiedEvent<OmitMetadata<T>> = never, T extends IGDPRProperty = never>(eventName: string, data?: StrictPropertyCheck<T, E>): void;
686
+ /**
687
+ * @deprecated Use publicLogError2 and the typescript GDPR annotation where possible
688
+ */
689
+ publicLogError(errorEventName: string, data?: ITelemetryData): void;
690
+ publicLogError2<E extends ClassifiedEvent<OmitMetadata<T>> = never, T extends IGDPRProperty = never>(eventName: string, data?: StrictPropertyCheck<T, E>): void;
691
+ setExperimentProperty(name: string, value: string): void;
692
+ }
693
+ interface ITelemetryEndpoint {
694
+ id: string;
695
+ aiKey: string;
696
+ sendErrorTelemetry: boolean;
697
+ }
698
+ declare const enum TelemetryLevel {
699
+ NONE = 0,
700
+ CRASH = 1,
701
+ ERROR = 2,
702
+ USAGE = 3
703
+ }
704
+
705
+ type IconDefaults = ThemeIcon | IconDefinition;
706
+ interface IconDefinition {
707
+ font?: IconFontContribution;
708
+ fontCharacter: string;
709
+ }
710
+ interface IconContribution {
711
+ readonly id: string;
712
+ description: string | undefined;
713
+ deprecationMessage?: string;
714
+ readonly defaults: IconDefaults;
715
+ }
716
+ declare namespace IconContribution {
717
+ function getDefinition(contribution: IconContribution, registry: IIconRegistry): IconDefinition | undefined;
718
+ }
719
+ interface IconFontContribution {
720
+ readonly id: string;
721
+ readonly definition: IconFontDefinition;
722
+ }
723
+ interface IconFontDefinition {
724
+ readonly weight?: string;
725
+ readonly style?: string;
726
+ readonly src: IconFontSource[];
727
+ }
728
+ declare namespace IconFontDefinition {
729
+ function toJSONObject(iconFont: IconFontDefinition): any;
730
+ function fromJSONObject(json: any): IconFontDefinition | undefined;
731
+ }
732
+ interface IconFontSource {
733
+ readonly location: URI;
734
+ readonly format: string;
735
+ }
736
+ interface IIconRegistry {
737
+ readonly onDidChange: Event$1<void>;
738
+ /**
739
+ * Register a icon to the registry.
740
+ * @param id The icon id
741
+ * @param defaults The default values
742
+ * @param description The description
743
+ */
744
+ registerIcon(id: IconIdentifier, defaults: IconDefaults, description?: string): ThemeIcon;
745
+ /**
746
+ * Deregister a icon from the registry.
747
+ */
748
+ deregisterIcon(id: IconIdentifier): void;
749
+ /**
750
+ * Get all icon contributions
751
+ */
752
+ getIcons(): IconContribution[];
753
+ /**
754
+ * Get the icon for the given id
755
+ */
756
+ getIcon(id: IconIdentifier): IconContribution | undefined;
757
+ /**
758
+ * JSON schema for an object to assign icon values to one of the icon contributions.
759
+ */
760
+ getIconSchema(): IJSONSchema;
761
+ /**
762
+ * JSON schema to for a reference to a icon contribution.
763
+ */
764
+ getIconReferenceSchema(): IJSONSchema;
765
+ /**
766
+ * Register a icon font to the registry.
767
+ * @param id The icon font id
768
+ * @param definition The icon font definition
769
+ */
770
+ registerIconFont(id: string, definition: IconFontDefinition): IconFontDefinition;
771
+ /**
772
+ * Deregister an icon font to the registry.
773
+ */
774
+ deregisterIconFont(id: string): void;
775
+ /**
776
+ * Get the icon font for the given id
777
+ */
778
+ getIconFont(id: string): IconFontDefinition | undefined;
779
+ }
780
+
781
+ /**
782
+ * Color scheme used by the OS and by color themes.
783
+ */
784
+ declare enum ColorScheme {
785
+ DARK = "dark",
786
+ LIGHT = "light",
787
+ HIGH_CONTRAST_DARK = "hcDark",
788
+ HIGH_CONTRAST_LIGHT = "hcLight"
789
+ }
790
+
791
+ interface ITokenStyle {
792
+ readonly foreground: number | undefined;
793
+ readonly bold: boolean | undefined;
794
+ readonly underline: boolean | undefined;
795
+ readonly strikethrough: boolean | undefined;
796
+ readonly italic: boolean | undefined;
797
+ }
798
+ interface IColorTheme {
799
+ readonly type: ColorScheme;
800
+ readonly label: string;
801
+ /**
802
+ * Resolves the color of the given color identifier. If the theme does not
803
+ * specify the color, the default color is returned unless <code>useDefault</code> is set to false.
804
+ * @param color the id of the color
805
+ * @param useDefault specifies if the default color should be used. If not set, the default is used.
806
+ */
807
+ getColor(color: ColorIdentifier, useDefault?: boolean): Color | undefined;
808
+ /**
809
+ * Returns whether the theme defines a value for the color. If not, that means the
810
+ * default color will be used.
811
+ */
812
+ defines(color: ColorIdentifier): boolean;
813
+ /**
814
+ * Returns the token style for a given classification. The result uses the <code>MetadataConsts</code> format
815
+ */
816
+ getTokenStyleMetadata(type: string, modifiers: string[], modelLanguage: string): ITokenStyle | undefined;
817
+ /**
818
+ * List of all colors used with tokens. <code>getTokenStyleMetadata</code> references the colors by index into this list.
819
+ */
820
+ readonly tokenColorMap: string[];
821
+ /**
822
+ * Defines whether semantic highlighting should be enabled for the theme.
823
+ */
824
+ readonly semanticHighlighting: boolean;
825
+ }
826
+ interface IFileIconTheme {
827
+ readonly hasFileIcons: boolean;
828
+ readonly hasFolderIcons: boolean;
829
+ readonly hidesExplorerArrows: boolean;
830
+ }
831
+ interface IProductIconTheme {
832
+ /**
833
+ * Resolves the definition for the given icon as defined by the theme.
834
+ *
835
+ * @param iconContribution The icon
836
+ */
837
+ getIcon(iconContribution: IconContribution): IconDefinition | undefined;
838
+ }
839
+
840
+ declare const IThemeService: ServiceIdentifier<IThemeService>;
841
+ interface IThemeService {
842
+ readonly _serviceBrand: undefined;
843
+ getColorTheme(): IColorTheme;
844
+ readonly onDidColorThemeChange: Event$1<IColorTheme>;
845
+ getFileIconTheme(): IFileIconTheme;
846
+ readonly onDidFileIconThemeChange: Event$1<IFileIconTheme>;
847
+ getProductIconTheme(): IProductIconTheme;
848
+ readonly onDidProductIconThemeChange: Event$1<IProductIconTheme>;
849
+ }
850
+ /**
851
+ * Utility base class for all themable components.
852
+ */
853
+ declare class Themable extends Disposable {
854
+ protected themeService: IThemeService;
855
+ protected theme: IColorTheme;
856
+ constructor(themeService: IThemeService);
857
+ protected onThemeChange(theme: IColorTheme): void;
858
+ updateStyles(): void;
859
+ protected getColor(id: string, modify?: (color: Color, theme: IColorTheme) => Color): string | null;
860
+ }
861
+
862
+ interface IBaseOpenWindowsOptions {
863
+ /**
864
+ * Whether to reuse the window or open a new one.
865
+ */
866
+ readonly forceReuseWindow?: boolean;
867
+ /**
868
+ * The remote authority to use when windows are opened with either
869
+ * - no workspace (empty window)
870
+ * - a workspace that is neither `file://` nor `vscode-remote://`
871
+ * Use 'null' for a local window.
872
+ * If not set, defaults to the remote authority of the current window.
873
+ */
874
+ readonly remoteAuthority?: string | null;
875
+ }
876
+ interface IOpenWindowOptions extends IBaseOpenWindowsOptions {
877
+ readonly forceNewWindow?: boolean;
878
+ readonly preferNewWindow?: boolean;
879
+ readonly noRecentEntry?: boolean;
880
+ readonly addMode?: boolean;
881
+ readonly diffMode?: boolean;
882
+ readonly mergeMode?: boolean;
883
+ readonly gotoLineMode?: boolean;
884
+ readonly waitMarkerFileURI?: URI;
885
+ readonly forceProfile?: string;
886
+ readonly forceTempProfile?: boolean;
887
+ }
888
+ interface IOpenEmptyWindowOptions extends IBaseOpenWindowsOptions {
889
+ }
890
+ type IWindowOpenable = IWorkspaceToOpen | IFolderToOpen | IFileToOpen;
891
+ interface IBaseWindowOpenable {
892
+ label?: string;
893
+ }
894
+ interface IWorkspaceToOpen extends IBaseWindowOpenable {
895
+ readonly workspaceUri: URI;
896
+ }
897
+ interface IFolderToOpen extends IBaseWindowOpenable {
898
+ readonly folderUri: URI;
899
+ }
900
+ interface IFileToOpen extends IBaseWindowOpenable {
901
+ readonly fileUri: URI;
902
+ }
903
+ interface IPath<T = IEditorOptions> extends IPathData<T> {
904
+ /**
905
+ * The file path to open within the instance
906
+ */
907
+ fileUri?: URI;
908
+ }
909
+ interface IPathData<T = IEditorOptions> {
910
+ /**
911
+ * The file path to open within the instance
912
+ */
913
+ readonly fileUri?: UriComponents;
914
+ /**
915
+ * Optional editor options to apply in the file
916
+ */
917
+ readonly options?: T;
918
+ /**
919
+ * A hint that the file exists. if true, the
920
+ * file exists, if false it does not. with
921
+ * `undefined` the state is unknown.
922
+ */
923
+ readonly exists?: boolean;
924
+ /**
925
+ * A hint about the file type of this path.
926
+ * with `undefined` the type is unknown.
927
+ */
928
+ readonly type?: FileType;
929
+ /**
930
+ * Specifies if the file should be only be opened
931
+ * if it exists.
932
+ */
933
+ readonly openOnlyIfExists?: boolean;
934
+ }
935
+
936
+ interface IPaneComposite extends IComposite {
937
+ /**
938
+ * Returns the minimal width needed to avoid any content horizontal truncation
939
+ */
940
+ getOptimalWidth(): number | undefined;
941
+ openView<T extends IView$3>(id: string, focus?: boolean): T | undefined;
942
+ getViewPaneContainer(): IViewPaneContainer | undefined;
943
+ }
944
+
945
+ declare const enum ViewContainerLocation {
946
+ Sidebar = 0,
947
+ Panel = 1,
948
+ AuxiliaryBar = 2
949
+ }
950
+ type OpenCommandActionDescriptor = {
951
+ readonly id: string;
952
+ readonly title?: ILocalizedString | string;
953
+ readonly mnemonicTitle?: string;
954
+ readonly order?: number;
955
+ readonly keybindings?: IKeybindings & {
956
+ when?: ContextKeyExpression;
957
+ };
958
+ };
959
+ /**
960
+ * View Container Contexts
961
+ */
962
+ interface IViewContainerDescriptor {
963
+ /**
964
+ * The id of the view container
965
+ */
966
+ readonly id: string;
967
+ /**
968
+ * The title of the view container
969
+ */
970
+ readonly title: ILocalizedString | string;
971
+ /**
972
+ * Icon representation of the View container
973
+ */
974
+ readonly icon?: ThemeIcon | URI;
975
+ /**
976
+ * Order of the view container.
977
+ */
978
+ readonly order?: number;
979
+ /**
980
+ * IViewPaneContainer Ctor to instantiate
981
+ */
982
+ readonly ctorDescriptor: SyncDescriptor<IViewPaneContainer>;
983
+ /**
984
+ * Descriptor for open view container command
985
+ * If not provided, view container info (id, title) is used.
986
+ *
987
+ * Note: To prevent registering open command, use `doNotRegisterOpenCommand` flag while registering the view container
988
+ */
989
+ readonly openCommandActionDescriptor?: OpenCommandActionDescriptor;
990
+ /**
991
+ * Storage id to use to store the view container state.
992
+ * If not provided, it will be derived.
993
+ */
994
+ readonly storageId?: string;
995
+ /**
996
+ * If enabled, view container is not shown if it has no active views.
997
+ */
998
+ readonly hideIfEmpty?: boolean;
999
+ /**
1000
+ * Id of the extension that contributed the view container
1001
+ */
1002
+ readonly extensionId?: ExtensionIdentifier;
1003
+ readonly alwaysUseContainerInfo?: boolean;
1004
+ readonly viewOrderDelegate?: ViewOrderDelegate;
1005
+ readonly rejectAddedViews?: boolean;
1006
+ requestedIndex?: number;
1007
+ }
1008
+ interface ViewOrderDelegate {
1009
+ getOrder(group?: string): number | undefined;
1010
+ }
1011
+ interface ViewContainer extends IViewContainerDescriptor {
1012
+ }
1013
+ interface IViewDescriptor {
1014
+ readonly type?: string;
1015
+ readonly id: string;
1016
+ readonly name: string;
1017
+ readonly ctorDescriptor: SyncDescriptor<IView$3>;
1018
+ readonly when?: ContextKeyExpression;
1019
+ readonly order?: number;
1020
+ readonly weight?: number;
1021
+ readonly collapsed?: boolean;
1022
+ readonly canToggleVisibility?: boolean;
1023
+ readonly canMoveView?: boolean;
1024
+ readonly containerIcon?: ThemeIcon | URI;
1025
+ readonly containerTitle?: string;
1026
+ readonly hideByDefault?: boolean;
1027
+ readonly workspace?: boolean;
1028
+ readonly focusCommand?: {
1029
+ id: string;
1030
+ keybindings?: IKeybindings;
1031
+ };
1032
+ readonly group?: string;
1033
+ readonly remoteAuthority?: string | string[];
1034
+ readonly virtualWorkspace?: string;
1035
+ readonly openCommandActionDescriptor?: OpenCommandActionDescriptor;
1036
+ }
1037
+ interface IViewDescriptorRef {
1038
+ viewDescriptor: IViewDescriptor;
1039
+ index: number;
1040
+ }
1041
+ interface IAddedViewDescriptorRef extends IViewDescriptorRef {
1042
+ collapsed: boolean;
1043
+ size?: number;
1044
+ }
1045
+ interface IViewContainerModel {
1046
+ readonly viewContainer: ViewContainer;
1047
+ readonly title: string;
1048
+ readonly icon: ThemeIcon | URI | undefined;
1049
+ readonly keybindingId: string | undefined;
1050
+ readonly onDidChangeContainerInfo: Event$1<{
1051
+ title?: boolean;
1052
+ icon?: boolean;
1053
+ keybindingId?: boolean;
1054
+ badgeEnablement?: boolean;
1055
+ }>;
1056
+ readonly allViewDescriptors: ReadonlyArray<IViewDescriptor>;
1057
+ readonly onDidChangeAllViewDescriptors: Event$1<{
1058
+ added: ReadonlyArray<IViewDescriptor>;
1059
+ removed: ReadonlyArray<IViewDescriptor>;
1060
+ }>;
1061
+ readonly activeViewDescriptors: ReadonlyArray<IViewDescriptor>;
1062
+ readonly onDidChangeActiveViewDescriptors: Event$1<{
1063
+ added: ReadonlyArray<IViewDescriptor>;
1064
+ removed: ReadonlyArray<IViewDescriptor>;
1065
+ }>;
1066
+ readonly visibleViewDescriptors: ReadonlyArray<IViewDescriptor>;
1067
+ readonly onDidAddVisibleViewDescriptors: Event$1<IAddedViewDescriptorRef[]>;
1068
+ readonly onDidRemoveVisibleViewDescriptors: Event$1<IViewDescriptorRef[]>;
1069
+ readonly onDidMoveVisibleViewDescriptors: Event$1<{
1070
+ from: IViewDescriptorRef;
1071
+ to: IViewDescriptorRef;
1072
+ }>;
1073
+ isVisible(id: string): boolean;
1074
+ setVisible(id: string, visible: boolean): void;
1075
+ isCollapsed(id: string): boolean;
1076
+ setCollapsed(id: string, collapsed: boolean): void;
1077
+ getSize(id: string): number | undefined;
1078
+ setSizes(newSizes: readonly {
1079
+ id: string;
1080
+ size: number;
1081
+ }[]): void;
1082
+ move(from: string, to: string): void;
1083
+ }
1084
+ interface IView$3 {
1085
+ readonly id: string;
1086
+ focus(): void;
1087
+ isVisible(): boolean;
1088
+ isBodyVisible(): boolean;
1089
+ setExpanded(expanded: boolean): boolean;
1090
+ getProgressIndicator(): IProgressIndicator | undefined;
1091
+ }
1092
+ declare const IViewsService: ServiceIdentifier<IViewsService>;
1093
+ interface IViewsService {
1094
+ readonly _serviceBrand: undefined;
1095
+ readonly onDidChangeViewContainerVisibility: Event$1<{
1096
+ id: string;
1097
+ visible: boolean;
1098
+ location: ViewContainerLocation;
1099
+ }>;
1100
+ isViewContainerVisible(id: string): boolean;
1101
+ openViewContainer(id: string, focus?: boolean): Promise<IPaneComposite | null>;
1102
+ closeViewContainer(id: string): void;
1103
+ getVisibleViewContainer(location: ViewContainerLocation): ViewContainer | null;
1104
+ getActiveViewPaneContainerWithId(viewContainerId: string): IViewPaneContainer | null;
1105
+ readonly onDidChangeViewVisibility: Event$1<{
1106
+ id: string;
1107
+ visible: boolean;
1108
+ }>;
1109
+ isViewVisible(id: string): boolean;
1110
+ openView<T extends IView$3>(id: string, focus?: boolean): Promise<T | null>;
1111
+ closeView(id: string): void;
1112
+ getActiveViewWithId<T extends IView$3>(id: string): T | null;
1113
+ getViewWithId<T extends IView$3>(id: string): T | null;
1114
+ getViewProgressIndicator(id: string): IProgressIndicator | undefined;
1115
+ }
1116
+ declare enum ViewVisibilityState {
1117
+ Default = 0,
1118
+ Expand = 1
1119
+ }
1120
+ declare const IViewDescriptorService: ServiceIdentifier<IViewDescriptorService>;
1121
+ interface IViewDescriptorService {
1122
+ readonly _serviceBrand: undefined;
1123
+ readonly viewContainers: ReadonlyArray<ViewContainer>;
1124
+ readonly onDidChangeViewContainers: Event$1<{
1125
+ added: ReadonlyArray<{
1126
+ container: ViewContainer;
1127
+ location: ViewContainerLocation;
1128
+ }>;
1129
+ removed: ReadonlyArray<{
1130
+ container: ViewContainer;
1131
+ location: ViewContainerLocation;
1132
+ }>;
1133
+ }>;
1134
+ getDefaultViewContainer(location: ViewContainerLocation): ViewContainer | undefined;
1135
+ getViewContainerById(id: string): ViewContainer | null;
1136
+ isViewContainerRemovedPermanently(id: string): boolean;
1137
+ getDefaultViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation | null;
1138
+ getViewContainerLocation(viewContainer: ViewContainer): ViewContainerLocation | null;
1139
+ getViewContainersByLocation(location: ViewContainerLocation): ViewContainer[];
1140
+ getViewContainerModel(viewContainer: ViewContainer): IViewContainerModel;
1141
+ readonly onDidChangeContainerLocation: Event$1<{
1142
+ viewContainer: ViewContainer;
1143
+ from: ViewContainerLocation;
1144
+ to: ViewContainerLocation;
1145
+ }>;
1146
+ moveViewContainerToLocation(viewContainer: ViewContainer, location: ViewContainerLocation, requestedIndex?: number): void;
1147
+ getViewContainerBadgeEnablementState(id: string): boolean;
1148
+ setViewContainerBadgeEnablementState(id: string, badgesEnabled: boolean): void;
1149
+ getViewDescriptorById(id: string): IViewDescriptor | null;
1150
+ getViewContainerByViewId(id: string): ViewContainer | null;
1151
+ getDefaultContainerById(id: string): ViewContainer | null;
1152
+ getViewLocationById(id: string): ViewContainerLocation | null;
1153
+ readonly onDidChangeContainer: Event$1<{
1154
+ views: IViewDescriptor[];
1155
+ from: ViewContainer;
1156
+ to: ViewContainer;
1157
+ }>;
1158
+ moveViewsToContainer(views: IViewDescriptor[], viewContainer: ViewContainer, visibilityState?: ViewVisibilityState): void;
1159
+ readonly onDidChangeLocation: Event$1<{
1160
+ views: IViewDescriptor[];
1161
+ from: ViewContainerLocation;
1162
+ to: ViewContainerLocation;
1163
+ }>;
1164
+ moveViewToLocation(view: IViewDescriptor, location: ViewContainerLocation): void;
1165
+ reset(): void;
1166
+ }
1167
+ interface IEditableData {
1168
+ validationMessage: (value: string) => {
1169
+ content: string;
1170
+ severity: Severity;
1171
+ } | null;
1172
+ placeholder?: string | null;
1173
+ startingValue?: string | null;
1174
+ onFinish: (value: string, success: boolean) => Promise<void>;
1175
+ }
1176
+ interface IViewPaneContainer {
1177
+ onDidAddViews: Event$1<IView$3[]>;
1178
+ onDidRemoveViews: Event$1<IView$3[]>;
1179
+ onDidChangeViewVisibility: Event$1<IView$3>;
1180
+ readonly views: IView$3[];
1181
+ setVisible(visible: boolean): void;
1182
+ isVisible(): boolean;
1183
+ focus(): void;
1184
+ getActionsContext(): unknown;
1185
+ getView(viewId: string): IView$3 | undefined;
1186
+ toggleViewVisibility(viewId: string): void;
1187
+ }
1188
+
1189
+ declare const IWorkbenchEnvironmentService: ServiceIdentifier<IWorkbenchEnvironmentService>;
1190
+ /**
1191
+ * A workbench specific environment service that is only present in workbench
1192
+ * layer.
1193
+ */
1194
+ interface IWorkbenchEnvironmentService extends IEnvironmentService {
1195
+ readonly logFile: URI;
1196
+ readonly windowLogsPath: URI;
1197
+ readonly extHostLogsPath: URI;
1198
+ readonly extHostTelemetryLogFile: URI;
1199
+ readonly extensionEnabledProposedApi?: string[];
1200
+ readonly remoteAuthority?: string;
1201
+ readonly skipReleaseNotes: boolean;
1202
+ readonly skipWelcome: boolean;
1203
+ readonly disableWorkspaceTrust: boolean;
1204
+ readonly webviewExternalEndpoint: string;
1205
+ readonly debugRenderer: boolean;
1206
+ readonly logExtensionHostCommunication?: boolean;
1207
+ readonly enableSmokeTestDriver?: boolean;
1208
+ readonly profDurationMarkers?: string[];
1209
+ readonly filesToOpenOrCreate?: IPath[] | undefined;
1210
+ readonly filesToDiff?: IPath[] | undefined;
1211
+ readonly filesToMerge?: IPath[] | undefined;
1212
+ }
1213
+
1214
+ type OpenInternalOptions = {
1215
+ /**
1216
+ * Signals that the intent is to open an editor to the side
1217
+ * of the currently active editor.
1218
+ */
1219
+ readonly openToSide?: boolean;
1220
+ /**
1221
+ * Extra editor options to apply in case an editor is used to open.
1222
+ */
1223
+ readonly editorOptions?: IEditorOptions;
1224
+ /**
1225
+ * Signals that the editor to open was triggered through a user
1226
+ * action, such as keyboard or mouse usage.
1227
+ */
1228
+ readonly fromUserGesture?: boolean;
1229
+ /**
1230
+ * Allow command links to be handled.
1231
+ *
1232
+ * If this is an array, then only the commands included in the array can be run.
1233
+ */
1234
+ readonly allowCommands?: boolean | readonly string[];
1235
+ };
1236
+ type OpenExternalOptions = {
1237
+ readonly openExternal?: boolean;
1238
+ readonly allowTunneling?: boolean;
1239
+ readonly allowContributedOpeners?: boolean | string;
1240
+ readonly fromWorkspace?: boolean;
1241
+ };
1242
+ type OpenOptions = OpenInternalOptions & OpenExternalOptions;
1243
+ type ResolveExternalUriOptions = {
1244
+ readonly allowTunneling?: boolean;
1245
+ };
1246
+ interface IResolvedExternalUri extends IDisposable {
1247
+ resolved: URI;
1248
+ }
1249
+ interface IOpener {
1250
+ open(resource: URI | string, options?: OpenInternalOptions | OpenExternalOptions): Promise<boolean>;
1251
+ }
1252
+ interface IExternalOpener {
1253
+ openExternal(href: string, ctx: {
1254
+ sourceUri: URI;
1255
+ preferredOpenerId?: string;
1256
+ }, token: CancellationToken): Promise<boolean>;
1257
+ dispose?(): void;
1258
+ }
1259
+ interface IValidator {
1260
+ shouldOpen(resource: URI | string, openOptions?: OpenOptions): Promise<boolean>;
1261
+ }
1262
+ interface IExternalUriResolver {
1263
+ resolveExternalUri(resource: URI, options?: OpenOptions): Promise<{
1264
+ resolved: URI;
1265
+ dispose(): void;
1266
+ } | undefined>;
1267
+ }
1268
+
1269
+ declare const IOpenerService: ServiceIdentifier<IOpenerService>;
1270
+ interface IOpenerService {
1271
+ readonly _serviceBrand: undefined;
1272
+ /**
1273
+ * Register a participant that can handle the open() call.
1274
+ */
1275
+ registerOpener(opener: IOpener): IDisposable;
1276
+ /**
1277
+ * Register a participant that can validate if the URI resource be opened.
1278
+ * Validators are run before openers.
1279
+ */
1280
+ registerValidator(validator: IValidator): IDisposable;
1281
+ /**
1282
+ * Register a participant that can resolve an external URI resource to be opened.
1283
+ */
1284
+ registerExternalUriResolver(resolver: IExternalUriResolver): IDisposable;
1285
+ /**
1286
+ * Sets the handler for opening externally. If not provided,
1287
+ * a default handler will be used.
1288
+ */
1289
+ setDefaultExternalOpener(opener: IExternalOpener): void;
1290
+ /**
1291
+ * Registers a new opener external resources openers.
1292
+ */
1293
+ registerExternalOpener(opener: IExternalOpener): IDisposable;
1294
+ /**
1295
+ * Opens a resource, like a webaddress, a document uri, or executes command.
1296
+ *
1297
+ * @param resource A resource
1298
+ * @return A promise that resolves when the opening is done.
1299
+ */
1300
+ open(resource: URI | string, options?: OpenInternalOptions | OpenExternalOptions): Promise<boolean>;
1301
+ /**
1302
+ * Resolve a resource to its external form.
1303
+ * @throws whenever resolvers couldn't resolve this resource externally.
1304
+ */
1305
+ resolveExternalUri(resource: URI, options?: ResolveExternalUriOptions): Promise<IResolvedExternalUri>;
1306
+ }
1307
+
1308
+ interface IKeyboardEvent {
1309
+ readonly _standardKeyboardEventBrand: true;
1310
+ readonly browserEvent: KeyboardEvent;
1311
+ readonly target: HTMLElement;
1312
+ readonly ctrlKey: boolean;
1313
+ readonly shiftKey: boolean;
1314
+ readonly altKey: boolean;
1315
+ readonly metaKey: boolean;
1316
+ readonly altGraphKey: boolean;
1317
+ readonly keyCode: KeyCode;
1318
+ readonly code: string;
1319
+ /**
1320
+ * @internal
1321
+ */
1322
+ toKeyCodeChord(): KeyCodeChord;
1323
+ equals(keybinding: number): boolean;
1324
+ preventDefault(): void;
1325
+ stopPropagation(): void;
1326
+ }
1327
+
1328
+ interface IMouseEvent {
1329
+ readonly browserEvent: MouseEvent;
1330
+ readonly leftButton: boolean;
1331
+ readonly middleButton: boolean;
1332
+ readonly rightButton: boolean;
1333
+ readonly buttons: number;
1334
+ readonly target: HTMLElement;
1335
+ readonly detail: number;
1336
+ readonly posx: number;
1337
+ readonly posy: number;
1338
+ readonly ctrlKey: boolean;
1339
+ readonly shiftKey: boolean;
1340
+ readonly altKey: boolean;
1341
+ readonly metaKey: boolean;
1342
+ readonly timestamp: number;
1343
+ preventDefault(): void;
1344
+ stopPropagation(): void;
1345
+ }
1346
+
1347
+ interface IDimension {
1348
+ readonly width: number;
1349
+ readonly height: number;
1350
+ }
1351
+ declare class Dimension implements IDimension {
1352
+ readonly width: number;
1353
+ readonly height: number;
1354
+ static readonly None: Dimension;
1355
+ constructor(width: number, height: number);
1356
+ with(width?: number, height?: number): Dimension;
1357
+ static is(obj: unknown): obj is IDimension;
1358
+ static lift(obj: IDimension): Dimension;
1359
+ static equals(a: Dimension | undefined, b: Dimension | undefined): boolean;
1360
+ }
1361
+ interface IDomPosition {
1362
+ readonly left: number;
1363
+ readonly top: number;
1364
+ }
1365
+
1366
+ interface ILayoutOffsetInfo {
1367
+ /**
1368
+ * Generic top offset
1369
+ */
1370
+ readonly top: number;
1371
+ /**
1372
+ * Quick pick specific top offset.
1373
+ */
1374
+ readonly quickPickTop: number;
1375
+ }
1376
+
1377
+ declare const ILayoutService: ServiceIdentifier<ILayoutService>;
1378
+ interface ILayoutService {
1379
+ readonly _serviceBrand: undefined;
1380
+ /**
1381
+ * The dimensions of the container.
1382
+ */
1383
+ readonly dimension: IDimension;
1384
+ /**
1385
+ * Does the application have a single container?
1386
+ */
1387
+ readonly hasContainer: boolean;
1388
+ /**
1389
+ * Container of the application.
1390
+ *
1391
+ * **NOTE**: In the standalone editor case, multiple editors can be created on a page.
1392
+ * Therefore, in the standalone editor case, there are multiple containers, not just
1393
+ * a single one. If you ship code that needs a "container" for the standalone editor,
1394
+ * please use `ICodeEditorService` to get the current focused code editor and use its
1395
+ * container if necessary. You can also instantiate `EditorScopedLayoutService`
1396
+ * which implements `ILayoutService` but is not a part of the service collection because
1397
+ * it is code editor instance specific.
1398
+ *
1399
+ */
1400
+ readonly container: HTMLElement;
1401
+ /**
1402
+ * An offset to use for positioning elements inside the container.
1403
+ */
1404
+ readonly offset: ILayoutOffsetInfo;
1405
+ /**
1406
+ * An event that is emitted when the container is layed out. The
1407
+ * event carries the dimensions of the container as part of it.
1408
+ */
1409
+ readonly onDidLayout: Event$1<IDimension>;
1410
+ /**
1411
+ * Focus the primary component of the container.
1412
+ */
1413
+ focus(): void;
1414
+ }
1415
+
1416
+ type MementoObject = {
1417
+ [key: string]: any;
1418
+ };
1419
+
1420
+ declare class Component extends Themable {
1421
+ private readonly id;
1422
+ private readonly memento;
1423
+ constructor(id: string, themeService: IThemeService, storageService: IStorageService);
1424
+ getId(): string;
1425
+ protected getMemento(scope: StorageScope, target: StorageTarget): MementoObject;
1426
+ protected saveState(): void;
1427
+ }
1428
+
1429
+ declare const enum LayoutPriority {
1430
+ Normal = 0,
1431
+ Low = 1,
1432
+ High = 2
1433
+ }
1434
+ /**
1435
+ * The interface to implement for views within a {@link SplitView}.
1436
+ *
1437
+ * An optional {@link TLayoutContext layout context type} may be used in order to
1438
+ * pass along layout contextual data from the {@link SplitView.layout} method down
1439
+ * to each view's {@link IView.layout} calls.
1440
+ */
1441
+ interface IView$2<TLayoutContext = undefined> {
1442
+ /**
1443
+ * The DOM element for this view.
1444
+ */
1445
+ readonly element: HTMLElement;
1446
+ /**
1447
+ * A minimum size for this view.
1448
+ *
1449
+ * @remarks If none, set it to `0`.
1450
+ */
1451
+ readonly minimumSize: number;
1452
+ /**
1453
+ * A maximum size for this view.
1454
+ *
1455
+ * @remarks If none, set it to `Number.POSITIVE_INFINITY`.
1456
+ */
1457
+ readonly maximumSize: number;
1458
+ /**
1459
+ * The priority of the view when the {@link SplitView.resize layout} algorithm
1460
+ * runs. Views with higher priority will be resized first.
1461
+ *
1462
+ * @remarks Only used when `proportionalLayout` is false.
1463
+ */
1464
+ readonly priority?: LayoutPriority;
1465
+ /**
1466
+ * If the {@link SplitView} supports {@link ISplitViewOptions.proportionalLayout proportional layout},
1467
+ * this property allows for finer control over the proportional layout algorithm, per view.
1468
+ *
1469
+ * @defaultValue `true`
1470
+ */
1471
+ readonly proportionalLayout?: boolean;
1472
+ /**
1473
+ * Whether the view will snap whenever the user reaches its minimum size or
1474
+ * attempts to grow it beyond the minimum size.
1475
+ *
1476
+ * @defaultValue `false`
1477
+ */
1478
+ readonly snap?: boolean;
1479
+ /**
1480
+ * View instances are supposed to fire the {@link IView.onDidChange} event whenever
1481
+ * any of the constraint properties have changed:
1482
+ *
1483
+ * - {@link IView.minimumSize}
1484
+ * - {@link IView.maximumSize}
1485
+ * - {@link IView.priority}
1486
+ * - {@link IView.snap}
1487
+ *
1488
+ * The SplitView will relayout whenever that happens. The event can optionally emit
1489
+ * the view's preferred size for that relayout.
1490
+ */
1491
+ readonly onDidChange: Event$1<number | undefined>;
1492
+ /**
1493
+ * This will be called by the {@link SplitView} during layout. A view meant to
1494
+ * pass along the layout information down to its descendants.
1495
+ *
1496
+ * @param size The size of this view, in pixels.
1497
+ * @param offset The offset of this view, relative to the start of the {@link SplitView}.
1498
+ * @param context The optional {@link IView layout context} passed to {@link SplitView.layout}.
1499
+ */
1500
+ layout(size: number, offset: number, context: TLayoutContext | undefined): void;
1501
+ /**
1502
+ * This will be called by the {@link SplitView} whenever this view is made
1503
+ * visible or hidden.
1504
+ *
1505
+ * @param visible Whether the view becomes visible.
1506
+ */
1507
+ setVisible?(visible: boolean): void;
1508
+ }
1509
+
1510
+ interface IViewSize {
1511
+ readonly width: number;
1512
+ readonly height: number;
1513
+ }
1514
+ /**
1515
+ * The interface to implement for views within a {@link GridView}.
1516
+ */
1517
+ interface IView$1 {
1518
+ /**
1519
+ * The DOM element for this view.
1520
+ */
1521
+ readonly element: HTMLElement;
1522
+ /**
1523
+ * A minimum width for this view.
1524
+ *
1525
+ * @remarks If none, set it to `0`.
1526
+ */
1527
+ readonly minimumWidth: number;
1528
+ /**
1529
+ * A minimum width for this view.
1530
+ *
1531
+ * @remarks If none, set it to `Number.POSITIVE_INFINITY`.
1532
+ */
1533
+ readonly maximumWidth: number;
1534
+ /**
1535
+ * A minimum height for this view.
1536
+ *
1537
+ * @remarks If none, set it to `0`.
1538
+ */
1539
+ readonly minimumHeight: number;
1540
+ /**
1541
+ * A minimum height for this view.
1542
+ *
1543
+ * @remarks If none, set it to `Number.POSITIVE_INFINITY`.
1544
+ */
1545
+ readonly maximumHeight: number;
1546
+ /**
1547
+ * The priority of the view when the {@link GridView} layout algorithm
1548
+ * runs. Views with higher priority will be resized first.
1549
+ *
1550
+ * @remarks Only used when `proportionalLayout` is false.
1551
+ */
1552
+ readonly priority?: LayoutPriority;
1553
+ /**
1554
+ * If the {@link GridView} supports proportional layout,
1555
+ * this property allows for finer control over the proportional layout algorithm, per view.
1556
+ *
1557
+ * @defaultValue `true`
1558
+ */
1559
+ readonly proportionalLayout?: boolean;
1560
+ /**
1561
+ * Whether the view will snap whenever the user reaches its minimum size or
1562
+ * attempts to grow it beyond the minimum size.
1563
+ *
1564
+ * @defaultValue `false`
1565
+ */
1566
+ readonly snap?: boolean;
1567
+ /**
1568
+ * View instances are supposed to fire this event whenever any of the constraint
1569
+ * properties have changed:
1570
+ *
1571
+ * - {@link IView.minimumWidth}
1572
+ * - {@link IView.maximumWidth}
1573
+ * - {@link IView.minimumHeight}
1574
+ * - {@link IView.maximumHeight}
1575
+ * - {@link IView.priority}
1576
+ * - {@link IView.snap}
1577
+ *
1578
+ * The {@link GridView} will relayout whenever that happens. The event can
1579
+ * optionally emit the view's preferred size for that relayout.
1580
+ */
1581
+ readonly onDidChange: Event$1<IViewSize | undefined>;
1582
+ /**
1583
+ * This will be called by the {@link GridView} during layout. A view meant to
1584
+ * pass along the layout information down to its descendants.
1585
+ */
1586
+ layout(width: number, height: number, top: number, left: number): void;
1587
+ /**
1588
+ * This will be called by the {@link GridView} whenever this view is made
1589
+ * visible or hidden.
1590
+ *
1591
+ * @param visible Whether the view becomes visible.
1592
+ */
1593
+ setVisible?(visible: boolean): void;
1594
+ /**
1595
+ * This will be called by the {@link GridView} whenever this view is on
1596
+ * an edge of the grid and the grid's
1597
+ * {@link GridView.boundarySashes boundary sashes} change.
1598
+ */
1599
+ setBoundarySashes?(sashes: IBoundarySashes): void;
1600
+ }
1601
+
1602
+ declare const enum Direction {
1603
+ Up = 0,
1604
+ Down = 1,
1605
+ Left = 2,
1606
+ Right = 3
1607
+ }
1608
+ /**
1609
+ * The interface to implement for views within a {@link Grid}.
1610
+ */
1611
+ interface IView extends IView$1 {
1612
+ /**
1613
+ * The preferred width for when the user double clicks a sash
1614
+ * adjacent to this view.
1615
+ */
1616
+ readonly preferredWidth?: number;
1617
+ /**
1618
+ * The preferred height for when the user double clicks a sash
1619
+ * adjacent to this view.
1620
+ */
1621
+ readonly preferredHeight?: number;
1622
+ }
1623
+ interface ISerializableView extends IView {
1624
+ toJSON(): object;
1625
+ }
1626
+
1627
+ interface IPartOptions {
1628
+ readonly hasTitle?: boolean;
1629
+ readonly borderWidth?: () => number;
1630
+ }
1631
+ interface ILayoutContentResult {
1632
+ readonly titleSize: IDimension;
1633
+ readonly contentSize: IDimension;
1634
+ }
1635
+ /**
1636
+ * Parts are layed out in the workbench and have their own layout that
1637
+ * arranges an optional title and mandatory content area to show content.
1638
+ */
1639
+ declare abstract class Part extends Component implements ISerializableView {
1640
+ private options;
1641
+ protected readonly layoutService: IWorkbenchLayoutService;
1642
+ private _dimension;
1643
+ get dimension(): Dimension | undefined;
1644
+ protected _onDidVisibilityChange: Emitter<boolean>;
1645
+ readonly onDidVisibilityChange: Event$1<boolean>;
1646
+ private parent;
1647
+ private titleArea;
1648
+ private contentArea;
1649
+ private partLayout;
1650
+ constructor(id: string, options: IPartOptions, themeService: IThemeService, storageService: IStorageService, layoutService: IWorkbenchLayoutService);
1651
+ protected onThemeChange(theme: IColorTheme): void;
1652
+ updateStyles(): void;
1653
+ /**
1654
+ * Note: Clients should not call this method, the workbench calls this
1655
+ * method. Calling it otherwise may result in unexpected behavior.
1656
+ *
1657
+ * Called to create title and content area of the part.
1658
+ */
1659
+ create(parent: HTMLElement, options?: object): void;
1660
+ /**
1661
+ * Returns the overall part container.
1662
+ */
1663
+ getContainer(): HTMLElement | undefined;
1664
+ /**
1665
+ * Subclasses override to provide a title area implementation.
1666
+ */
1667
+ protected createTitleArea(parent: HTMLElement, options?: object): HTMLElement | undefined;
1668
+ /**
1669
+ * Returns the title area container.
1670
+ */
1671
+ protected getTitleArea(): HTMLElement | undefined;
1672
+ /**
1673
+ * Subclasses override to provide a content area implementation.
1674
+ */
1675
+ protected createContentArea(parent: HTMLElement, options?: object): HTMLElement | undefined;
1676
+ /**
1677
+ * Returns the content area container.
1678
+ */
1679
+ protected getContentArea(): HTMLElement | undefined;
1680
+ /**
1681
+ * Layout title and content area in the given dimension.
1682
+ */
1683
+ protected layoutContents(width: number, height: number): ILayoutContentResult;
1684
+ protected _onDidChange: Emitter<IViewSize | undefined>;
1685
+ get onDidChange(): Event$1<IViewSize | undefined>;
1686
+ element: HTMLElement;
1687
+ abstract minimumWidth: number;
1688
+ abstract maximumWidth: number;
1689
+ abstract minimumHeight: number;
1690
+ abstract maximumHeight: number;
1691
+ layout(width: number, height: number, _top: number, _left: number): void;
1692
+ setVisible(visible: boolean): void;
1693
+ abstract toJSON(): object;
1694
+ }
1695
+
1696
+ declare const enum Parts {
1697
+ TITLEBAR_PART = "workbench.parts.titlebar",
1698
+ BANNER_PART = "workbench.parts.banner",
1699
+ ACTIVITYBAR_PART = "workbench.parts.activitybar",
1700
+ SIDEBAR_PART = "workbench.parts.sidebar",
1701
+ PANEL_PART = "workbench.parts.panel",
1702
+ AUXILIARYBAR_PART = "workbench.parts.auxiliarybar",
1703
+ EDITOR_PART = "workbench.parts.editor",
1704
+ STATUSBAR_PART = "workbench.parts.statusbar"
1705
+ }
1706
+ declare const enum Position {
1707
+ LEFT = 0,
1708
+ RIGHT = 1,
1709
+ BOTTOM = 2
1710
+ }
1711
+ type PanelAlignment = 'left' | 'center' | 'right' | 'justify';
1712
+
1713
+ declare const IWorkbenchLayoutService: ServiceIdentifier<IWorkbenchLayoutService>;
1714
+ interface IWorkbenchLayoutService extends ILayoutService {
1715
+ readonly _serviceBrand: undefined;
1716
+ /**
1717
+ * Emits when the zen mode is enabled or disabled.
1718
+ */
1719
+ readonly onDidChangeZenMode: Event$1<boolean>;
1720
+ /**
1721
+ * Emits when fullscreen is enabled or disabled.
1722
+ */
1723
+ readonly onDidChangeFullscreen: Event$1<boolean>;
1724
+ /**
1725
+ * Emits when the window is maximized or unmaximized.
1726
+ */
1727
+ readonly onDidChangeWindowMaximized: Event$1<boolean>;
1728
+ /**
1729
+ * Emits when centered layout is enabled or disabled.
1730
+ */
1731
+ readonly onDidChangeCenteredLayout: Event$1<boolean>;
1732
+ readonly onDidChangePanelPosition: Event$1<string>;
1733
+ /**
1734
+ * Emit when panel alignment changes.
1735
+ */
1736
+ readonly onDidChangePanelAlignment: Event$1<PanelAlignment>;
1737
+ /**
1738
+ * Emit when part visibility changes
1739
+ */
1740
+ readonly onDidChangePartVisibility: Event$1<void>;
1741
+ /**
1742
+ * Emit when notifications (toasts or center) visibility changes.
1743
+ */
1744
+ readonly onDidChangeNotificationsVisibility: Event$1<boolean>;
1745
+ /**
1746
+ * True if a default layout with default editors was applied at startup
1747
+ */
1748
+ readonly openedDefaultEditors: boolean;
1749
+ /**
1750
+ * Run a layout of the workbench.
1751
+ */
1752
+ layout(): void;
1753
+ /**
1754
+ * Asks the part service if all parts have been fully restored. For editor part
1755
+ * this means that the contents of visible editors have loaded.
1756
+ */
1757
+ isRestored(): boolean;
1758
+ /**
1759
+ * A promise for to await the `isRestored()` condition to be `true`.
1760
+ */
1761
+ readonly whenRestored: Promise<void>;
1762
+ /**
1763
+ * Returns whether the given part has the keyboard focus or not.
1764
+ */
1765
+ hasFocus(part: Parts): boolean;
1766
+ /**
1767
+ * Focuses the part. If the part is not visible this is a noop.
1768
+ */
1769
+ focusPart(part: Parts): void;
1770
+ /**
1771
+ * Returns the parts HTML element, if there is one.
1772
+ */
1773
+ getContainer(part: Parts): HTMLElement | undefined;
1774
+ /**
1775
+ * Returns if the part is visible.
1776
+ */
1777
+ isVisible(part: Parts): boolean;
1778
+ /**
1779
+ * Returns if the part is visible.
1780
+ */
1781
+ getDimension(part: Parts): Dimension | undefined;
1782
+ /**
1783
+ * Set part hidden or not
1784
+ */
1785
+ setPartHidden(hidden: boolean, part: Exclude<Parts, Parts.STATUSBAR_PART | Parts.TITLEBAR_PART>): void;
1786
+ /**
1787
+ * Maximizes the panel height if the panel is not already maximized.
1788
+ * Shrinks the panel to the default starting size if the panel is maximized.
1789
+ */
1790
+ toggleMaximizedPanel(): void;
1791
+ /**
1792
+ * Returns true if the window has a border.
1793
+ */
1794
+ hasWindowBorder(): boolean;
1795
+ /**
1796
+ * Returns the window border width.
1797
+ */
1798
+ getWindowBorderWidth(): number;
1799
+ /**
1800
+ * Returns the window border radius if any.
1801
+ */
1802
+ getWindowBorderRadius(): string | undefined;
1803
+ /**
1804
+ * Returns true if the panel is maximized.
1805
+ */
1806
+ isPanelMaximized(): boolean;
1807
+ /**
1808
+ * Gets the current side bar position. Note that the sidebar can be hidden too.
1809
+ */
1810
+ getSideBarPosition(): Position;
1811
+ /**
1812
+ * Toggles the menu bar visibility.
1813
+ */
1814
+ toggleMenuBar(): void;
1815
+ getPanelPosition(): Position;
1816
+ /**
1817
+ * Sets the panel position.
1818
+ */
1819
+ setPanelPosition(position: Position): void;
1820
+ /**
1821
+ * Gets the panel alignement.
1822
+ */
1823
+ getPanelAlignment(): PanelAlignment;
1824
+ /**
1825
+ * Sets the panel alignment.
1826
+ */
1827
+ setPanelAlignment(alignment: PanelAlignment): void;
1828
+ /**
1829
+ * Gets the maximum possible size for editor.
1830
+ */
1831
+ getMaximumEditorDimensions(): Dimension;
1832
+ /**
1833
+ * Toggles the workbench in and out of zen mode - parts get hidden and window goes fullscreen.
1834
+ */
1835
+ toggleZenMode(): void;
1836
+ /**
1837
+ * Returns whether the centered editor layout is active.
1838
+ */
1839
+ isEditorLayoutCentered(): boolean;
1840
+ /**
1841
+ * Sets the workbench in and out of centered editor layout.
1842
+ */
1843
+ centerEditorLayout(active: boolean): void;
1844
+ /**
1845
+ * Resizes currently focused part on main access
1846
+ */
1847
+ resizePart(part: Parts, sizeChangeWidth: number, sizeChangeHeight: number): void;
1848
+ /**
1849
+ * Register a part to participate in the layout.
1850
+ */
1851
+ registerPart(part: Part): void;
1852
+ /**
1853
+ * Returns whether the window is maximized.
1854
+ */
1855
+ isWindowMaximized(): boolean;
1856
+ /**
1857
+ * Updates the maximized state of the window.
1858
+ */
1859
+ updateWindowMaximizedState(maximized: boolean): void;
1860
+ /**
1861
+ * Returns the next visible view part in a given direction
1862
+ */
1863
+ getVisibleNeighborPart(part: Parts, direction: Direction): Parts | undefined;
1864
+ }
1865
+
1866
+ interface IAnchor {
1867
+ x: number;
1868
+ y: number;
1869
+ width?: number;
1870
+ height?: number;
1871
+ }
1872
+ declare const enum AnchorAlignment {
1873
+ LEFT = 0,
1874
+ RIGHT = 1
1875
+ }
1876
+ declare const enum AnchorPosition {
1877
+ BELOW = 0,
1878
+ ABOVE = 1
1879
+ }
1880
+ declare const enum AnchorAxisAlignment {
1881
+ VERTICAL = 0,
1882
+ HORIZONTAL = 1
1883
+ }
1884
+ interface IDelegate {
1885
+ getAnchor(): HTMLElement | IAnchor;
1886
+ render(container: HTMLElement): IDisposable | null;
1887
+ focus?(): void;
1888
+ layout?(): void;
1889
+ anchorAlignment?: AnchorAlignment;
1890
+ anchorPosition?: AnchorPosition;
1891
+ anchorAxisAlignment?: AnchorAxisAlignment;
1892
+ canRelayout?: boolean;
1893
+ onDOMEvent?(e: Event, activeElement: HTMLElement): void;
1894
+ onHide?(data?: unknown): void;
1895
+ }
1896
+ interface IContextViewProvider {
1897
+ showContextView(delegate: IDelegate, container?: HTMLElement): void;
1898
+ hideContextView(): void;
1899
+ layout(): void;
1900
+ }
1901
+
1902
+ declare abstract class Widget extends Disposable {
1903
+ protected onclick(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
1904
+ protected onmousedown(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
1905
+ protected onmouseover(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
1906
+ protected onmouseleave(domNode: HTMLElement, listener: (e: IMouseEvent) => void): void;
1907
+ protected onkeydown(domNode: HTMLElement, listener: (e: IKeyboardEvent) => void): void;
1908
+ protected onkeyup(domNode: HTMLElement, listener: (e: IKeyboardEvent) => void): void;
1909
+ protected oninput(domNode: HTMLElement, listener: (e: Event) => void): void;
1910
+ protected onblur(domNode: HTMLElement, listener: (e: Event) => void): void;
1911
+ protected onfocus(domNode: HTMLElement, listener: (e: Event) => void): void;
1912
+ protected onchange(domNode: HTMLElement, listener: (e: Event) => void): void;
1913
+ protected ignoreGesture(domNode: HTMLElement): IDisposable;
1914
+ }
1915
+
1916
+ declare const enum HoverPosition {
1917
+ LEFT = 0,
1918
+ RIGHT = 1,
1919
+ BELOW = 2,
1920
+ ABOVE = 3
1921
+ }
1922
+
1923
+ /**
1924
+ * Copied from src\vs\workbench\services\hover\browser\hover.ts
1925
+ * @deprecated Use IHoverService
1926
+ */
1927
+ interface IHoverAction$1 {
1928
+ label: string;
1929
+ commandId: string;
1930
+ iconClass?: string;
1931
+ run(target: HTMLElement): void;
1932
+ }
1933
+ interface IUpdatableHoverOptions {
1934
+ actions?: IHoverAction$1[];
1935
+ linkHandler?(url: string): void;
1936
+ }
1937
+
1938
+ interface IHoverDelegateTarget extends IDisposable {
1939
+ readonly targetElements: readonly HTMLElement[];
1940
+ x?: number;
1941
+ }
1942
+ interface IHoverDelegateOptions extends IUpdatableHoverOptions {
1943
+ /**
1944
+ * The content to display in the primary section of the hover. The type of text determines the
1945
+ * default `hideOnHover` behavior.
1946
+ */
1947
+ content: IMarkdownString | string | HTMLElement;
1948
+ /**
1949
+ * The target for the hover. This determines the position of the hover and it will only be
1950
+ * hidden when the mouse leaves both the hover and the target. A HTMLElement can be used for
1951
+ * simple cases and a IHoverDelegateTarget for more complex cases where multiple elements and/or a
1952
+ * dispose method is required.
1953
+ */
1954
+ target: IHoverDelegateTarget | HTMLElement;
1955
+ /**
1956
+ * Position of the hover. The default is to show above the target. This option will be ignored
1957
+ * if there is not enough room to layout the hover in the specified position, unless the
1958
+ * forcePosition option is set.
1959
+ */
1960
+ hoverPosition?: HoverPosition;
1961
+ /**
1962
+ * Whether to show the hover pointer
1963
+ */
1964
+ showPointer?: boolean;
1965
+ /**
1966
+ * Whether to skip the fade in animation, this should be used when hovering from one hover to
1967
+ * another in the same group so it looks like the hover is moving from one element to the other.
1968
+ */
1969
+ skipFadeInAnimation?: boolean;
1970
+ /**
1971
+ * The container to pass to {@link IContextViewProvider.showContextView} which renders the hover
1972
+ * in. This is particularly useful for more natural tab focusing behavior, where the hover is
1973
+ * created as the next tab index after the element being hovered and/or to workaround the
1974
+ * element's container hiding on `focusout`.
1975
+ */
1976
+ container?: HTMLElement;
1977
+ }
1978
+ interface IHoverDelegate {
1979
+ showHover(options: IHoverDelegateOptions, focus?: boolean): IHoverWidget$1 | undefined;
1980
+ onDidHideHover?: () => void;
1981
+ delay: number;
1982
+ placement?: 'mouse' | 'element';
1983
+ }
1984
+ interface IHoverWidget$1 extends IDisposable {
1985
+ readonly isDisposed: boolean;
1986
+ }
1987
+
1988
+ interface IToggleStyles {
1989
+ readonly inputActiveOptionBorder: string | undefined;
1990
+ readonly inputActiveOptionForeground: string | undefined;
1991
+ readonly inputActiveOptionBackground: string | undefined;
1992
+ }
1993
+
1994
+ interface IBaseActionViewItemOptions {
1995
+ draggable?: boolean;
1996
+ isMenu?: boolean;
1997
+ useEventAsContext?: boolean;
1998
+ hoverDelegate?: IHoverDelegate;
1999
+ }
2000
+ interface IActionViewItemOptions extends IBaseActionViewItemOptions {
2001
+ icon?: boolean;
2002
+ label?: boolean;
2003
+ keybinding?: string | null;
2004
+ toggleStyles?: IToggleStyles;
2005
+ }
2006
+
2007
+ interface IActionViewItem extends IDisposable {
2008
+ action: IAction;
2009
+ actionRunner: IActionRunner;
2010
+ setActionContext(context: unknown): void;
2011
+ render(element: HTMLElement): void;
2012
+ isEnabled(): boolean;
2013
+ focus(fromRight?: boolean): void;
2014
+ blur(): void;
2015
+ }
2016
+ interface IActionViewItemProvider {
2017
+ (action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined;
2018
+ }
2019
+ declare const enum ActionsOrientation {
2020
+ HORIZONTAL = 0,
2021
+ VERTICAL = 1
2022
+ }
2023
+ interface ActionTrigger {
2024
+ keys?: KeyCode[];
2025
+ keyDown: boolean;
2026
+ }
2027
+ interface IActionBarOptions {
2028
+ readonly orientation?: ActionsOrientation;
2029
+ readonly context?: unknown;
2030
+ readonly actionViewItemProvider?: IActionViewItemProvider;
2031
+ readonly actionRunner?: IActionRunner;
2032
+ readonly ariaLabel?: string;
2033
+ readonly ariaRole?: string;
2034
+ readonly animated?: boolean;
2035
+ readonly triggerKeys?: ActionTrigger;
2036
+ readonly allowContextMenu?: boolean;
2037
+ readonly preventLoopNavigation?: boolean;
2038
+ readonly focusOnlyEnabledItems?: boolean;
2039
+ readonly hoverDelegate?: IHoverDelegate;
2040
+ }
2041
+ interface IActionOptions extends IActionViewItemOptions {
2042
+ index?: number;
2043
+ }
2044
+ declare class ActionBar extends Disposable implements IActionRunner {
2045
+ private readonly options;
2046
+ private _actionRunner;
2047
+ private readonly _actionRunnerDisposables;
2048
+ private _context;
2049
+ private readonly _orientation;
2050
+ private readonly _triggerKeys;
2051
+ viewItems: IActionViewItem[];
2052
+ private readonly viewItemDisposables;
2053
+ private previouslyFocusedItem?;
2054
+ protected focusedItem?: number;
2055
+ private focusTracker;
2056
+ private triggerKeyDown;
2057
+ private focusable;
2058
+ domNode: HTMLElement;
2059
+ protected readonly actionsList: HTMLElement;
2060
+ private readonly _onDidBlur;
2061
+ readonly onDidBlur: Event$1<void>;
2062
+ private readonly _onDidCancel;
2063
+ readonly onDidCancel: Event$1<void>;
2064
+ private cancelHasListener;
2065
+ private readonly _onDidRun;
2066
+ readonly onDidRun: Event$1<IRunEvent>;
2067
+ private readonly _onWillRun;
2068
+ readonly onWillRun: Event$1<IRunEvent>;
2069
+ constructor(container: HTMLElement, options?: IActionBarOptions);
2070
+ private refreshRole;
2071
+ setAriaLabel(label: string): void;
2072
+ setFocusable(focusable: boolean): void;
2073
+ private isTriggerKeyEvent;
2074
+ private updateFocusedItem;
2075
+ get context(): unknown;
2076
+ set context(context: unknown);
2077
+ get actionRunner(): IActionRunner;
2078
+ set actionRunner(actionRunner: IActionRunner);
2079
+ getContainer(): HTMLElement;
2080
+ hasAction(action: IAction): boolean;
2081
+ getAction(indexOrElement: number | HTMLElement): IAction | undefined;
2082
+ push(arg: IAction | ReadonlyArray<IAction>, options?: IActionOptions): void;
2083
+ getWidth(index: number): number;
2084
+ getHeight(index: number): number;
2085
+ pull(index: number): void;
2086
+ clear(): void;
2087
+ length(): number;
2088
+ isEmpty(): boolean;
2089
+ focus(index?: number): void;
2090
+ focus(selectFirst?: boolean): void;
2091
+ private focusFirst;
2092
+ private focusLast;
2093
+ protected focusNext(forceLoop?: boolean): boolean;
2094
+ protected focusPrevious(forceLoop?: boolean): boolean;
2095
+ protected updateFocus(fromRight?: boolean, preventScroll?: boolean, forceFocus?: boolean): void;
2096
+ private doTrigger;
2097
+ run(action: IAction, context?: unknown): Promise<void>;
2098
+ dispose(): void;
2099
+ }
2100
+
2101
+ /**
2102
+ * Composites are layed out in the sidebar and panel part of the workbench. At a time only one composite
2103
+ * can be open in the sidebar, and only one composite can be open in the panel.
2104
+ *
2105
+ * Each composite has a minimized representation that is good enough to provide some
2106
+ * information about the state of the composite data.
2107
+ *
2108
+ * The workbench will keep a composite alive after it has been created and show/hide it based on
2109
+ * user interaction. The lifecycle of a composite goes in the order create(), setVisible(true|false),
2110
+ * layout(), focus(), dispose(). During use of the workbench, a composite will often receive a setVisible,
2111
+ * layout and focus call, but only one create and dispose call.
2112
+ */
2113
+ declare abstract class Composite extends Component implements IComposite {
2114
+ private readonly _onTitleAreaUpdate;
2115
+ readonly onTitleAreaUpdate: Event$1<void>;
2116
+ private _onDidFocus;
2117
+ get onDidFocus(): Event$1<void>;
2118
+ protected fireOnDidFocus(): void;
2119
+ private _onDidBlur;
2120
+ get onDidBlur(): Event$1<void>;
2121
+ private _hasFocus;
2122
+ hasFocus(): boolean;
2123
+ private registerFocusTrackEvents;
2124
+ protected actionRunner: IActionRunner | undefined;
2125
+ private _telemetryService;
2126
+ protected get telemetryService(): ITelemetryService;
2127
+ private visible;
2128
+ private parent;
2129
+ constructor(id: string, telemetryService: ITelemetryService, themeService: IThemeService, storageService: IStorageService);
2130
+ getTitle(): string | undefined;
2131
+ /**
2132
+ * Note: Clients should not call this method, the workbench calls this
2133
+ * method. Calling it otherwise may result in unexpected behavior.
2134
+ *
2135
+ * Called to create this composite on the provided parent. This method is only
2136
+ * called once during the lifetime of the workbench.
2137
+ * Note that DOM-dependent calculations should be performed from the setVisible()
2138
+ * call. Only then the composite will be part of the DOM.
2139
+ */
2140
+ create(parent: HTMLElement): void;
2141
+ /**
2142
+ * Returns the container this composite is being build in.
2143
+ */
2144
+ getContainer(): HTMLElement | undefined;
2145
+ /**
2146
+ * Note: Clients should not call this method, the workbench calls this
2147
+ * method. Calling it otherwise may result in unexpected behavior.
2148
+ *
2149
+ * Called to indicate that the composite has become visible or hidden. This method
2150
+ * is called more than once during workbench lifecycle depending on the user interaction.
2151
+ * The composite will be on-DOM if visible is set to true and off-DOM otherwise.
2152
+ *
2153
+ * Typically this operation should be fast though because setVisible might be called many times during a session.
2154
+ * If there is a long running operation it is fine to have it running in the background asyncly and return before.
2155
+ */
2156
+ setVisible(visible: boolean): void;
2157
+ /**
2158
+ * Called when this composite should receive keyboard focus.
2159
+ */
2160
+ focus(): void;
2161
+ /**
2162
+ * Layout the contents of this composite using the provided dimensions.
2163
+ */
2164
+ abstract layout(dimension: Dimension, position?: IDomPosition): void;
2165
+ /**
2166
+ * Set boundary sashes for this composite. These are used to create
2167
+ * draggable corner areas with inner sashes.
2168
+ */
2169
+ abstract setBoundarySashes(sashes: IBoundarySashes): void;
2170
+ /**
2171
+ * Update the styles of the contents of this composite.
2172
+ */
2173
+ updateStyles(): void;
2174
+ /**
2175
+ *
2176
+ * @returns the action runner for this composite
2177
+ */
2178
+ getMenuIds(): readonly MenuId[];
2179
+ /**
2180
+ * Returns an array of actions to show in the action bar of the composite.
2181
+ */
2182
+ getActions(): readonly IAction[];
2183
+ /**
2184
+ * Returns an array of actions to show in the action bar of the composite
2185
+ * in a less prominent way then action from getActions.
2186
+ */
2187
+ getSecondaryActions(): readonly IAction[];
2188
+ /**
2189
+ * Returns an array of actions to show in the context menu of the composite
2190
+ */
2191
+ getContextMenuActions(): readonly IAction[];
2192
+ /**
2193
+ * For any of the actions returned by this composite, provide an IActionViewItem in
2194
+ * cases where the implementor of the composite wants to override the presentation
2195
+ * of an action. Returns undefined to indicate that the action is not rendered through
2196
+ * an action item.
2197
+ */
2198
+ getActionViewItem(action: IAction): IActionViewItem | undefined;
2199
+ /**
2200
+ * Provide a context to be passed to the toolbar.
2201
+ */
2202
+ getActionsContext(): unknown;
2203
+ /**
2204
+ * Returns the instance of IActionRunner to use with this composite for the
2205
+ * composite tool bar.
2206
+ */
2207
+ getActionRunner(): IActionRunner;
2208
+ /**
2209
+ * Method for composite implementors to indicate to the composite container that the title or the actions
2210
+ * of the composite have changed. Calling this method will cause the container to ask for title (getTitle())
2211
+ * and actions (getActions(), getSecondaryActions()) if the composite is visible or the next time the composite
2212
+ * gets visible.
2213
+ */
2214
+ protected updateTitleArea(): void;
2215
+ /**
2216
+ * Returns true if this composite is currently visible and false otherwise.
2217
+ */
2218
+ isVisible(): boolean;
2219
+ /**
2220
+ * Returns the underlying composite control or `undefined` if it is not accessible.
2221
+ */
2222
+ getControl(): ICompositeControl | undefined;
2223
+ }
2224
+ /**
2225
+ * A composite descriptor is a lightweight descriptor of a composite in the workbench.
2226
+ */
2227
+ declare abstract class CompositeDescriptor<T extends Composite> {
2228
+ private readonly ctor;
2229
+ readonly id: string;
2230
+ readonly name: string;
2231
+ readonly cssClass?: string | undefined;
2232
+ readonly order?: number | undefined;
2233
+ readonly requestedIndex?: number | undefined;
2234
+ constructor(ctor: IConstructorSignature<T>, id: string, name: string, cssClass?: string | undefined, order?: number | undefined, requestedIndex?: number | undefined);
2235
+ instantiate(instantiationService: IInstantiationService): T;
2236
+ }
2237
+ declare abstract class CompositeRegistry<T extends Composite> extends Disposable {
2238
+ private readonly _onDidRegister;
2239
+ readonly onDidRegister: Event$1<CompositeDescriptor<T>>;
2240
+ private readonly _onDidDeregister;
2241
+ readonly onDidDeregister: Event$1<CompositeDescriptor<T>>;
2242
+ private readonly composites;
2243
+ protected registerComposite(descriptor: CompositeDescriptor<T>): void;
2244
+ protected deregisterComposite(id: string): void;
2245
+ getComposite(id: string): CompositeDescriptor<T> | undefined;
2246
+ protected getComposites(): CompositeDescriptor<T>[];
2247
+ private compositeById;
2248
+ }
2249
+
2250
+ interface IContextMenuEvent {
2251
+ readonly shiftKey?: boolean;
2252
+ readonly ctrlKey?: boolean;
2253
+ readonly altKey?: boolean;
2254
+ readonly metaKey?: boolean;
2255
+ }
2256
+ interface IContextMenuDelegate {
2257
+ getAnchor(): HTMLElement | {
2258
+ x: number;
2259
+ y: number;
2260
+ width?: number;
2261
+ height?: number;
2262
+ };
2263
+ getActions(): readonly IAction[];
2264
+ getCheckedActionsRepresentation?(action: IAction): 'radio' | 'checkbox';
2265
+ getActionViewItem?(action: IAction, options: IActionViewItemOptions): IActionViewItem | undefined;
2266
+ getActionsContext?(event?: IContextMenuEvent): unknown;
2267
+ getKeyBinding?(action: IAction): ResolvedKeybinding | undefined;
2268
+ getMenuClassName?(): string;
2269
+ onHide?(didCancel: boolean): void;
2270
+ actionRunner?: IActionRunner;
2271
+ skipTelemetry?: boolean;
2272
+ autoSelectFirstItem?: boolean;
2273
+ anchorAlignment?: AnchorAlignment;
2274
+ anchorAxisAlignment?: AnchorAxisAlignment;
2275
+ domForShadowRoot?: HTMLElement;
2276
+ }
2277
+ interface IContextMenuProvider {
2278
+ showContextMenu(delegate: IContextMenuDelegate): void;
2279
+ }
2280
+
2281
+ declare const IContextViewService: ServiceIdentifier<IContextViewService>;
2282
+ interface IContextViewService extends IContextViewProvider {
2283
+ readonly _serviceBrand: undefined;
2284
+ showContextView(delegate: IContextViewDelegate, container?: HTMLElement, shadowRoot?: boolean): IDisposable;
2285
+ hideContextView(data?: any): void;
2286
+ getContextViewElement(): HTMLElement;
2287
+ layout(): void;
2288
+ anchorAlignment?: AnchorAlignment;
2289
+ }
2290
+ interface IContextViewDelegate {
2291
+ canRelayout?: boolean;
2292
+ getAnchor(): HTMLElement | {
2293
+ x: number;
2294
+ y: number;
2295
+ width?: number;
2296
+ height?: number;
2297
+ };
2298
+ render(container: HTMLElement): IDisposable;
2299
+ onDOMEvent?(e: any, activeElement: HTMLElement): void;
2300
+ onHide?(data?: any): void;
2301
+ focus?(): void;
2302
+ anchorAlignment?: AnchorAlignment;
2303
+ anchorAxisAlignment?: AnchorAxisAlignment;
2304
+ }
2305
+ declare const IContextMenuService: ServiceIdentifier<IContextMenuService>;
2306
+ interface IContextMenuService {
2307
+ readonly _serviceBrand: undefined;
2308
+ readonly onDidShowContextMenu: Event$1<void>;
2309
+ readonly onDidHideContextMenu: Event$1<void>;
2310
+ showContextMenu(delegate: IContextMenuDelegate | IContextMenuMenuDelegate): void;
2311
+ }
2312
+ type IContextMenuMenuDelegate = {
2313
+ /**
2314
+ * The MenuId that should be used to populate the context menu.
2315
+ */
2316
+ menuId?: MenuId;
2317
+ /**
2318
+ * Optional options how menu actions are invoked
2319
+ */
2320
+ menuActionOptions?: IMenuActionOptions;
2321
+ /**
2322
+ * Optional context key service which drives the given menu
2323
+ */
2324
+ contextKeyService?: IContextKeyService;
2325
+ /**
2326
+ * Optional getter for extra actions. They will be prepended to the menu actions.
2327
+ */
2328
+ getActions?(): IAction[];
2329
+ } & Omit<IContextMenuDelegate, 'getActions'>;
2330
+
2331
+ interface IPaneOptions {
2332
+ minimumBodySize?: number;
2333
+ maximumBodySize?: number;
2334
+ expanded?: boolean;
2335
+ orientation?: Orientation;
2336
+ title: string;
2337
+ titleDescription?: string;
2338
+ }
2339
+ interface IPaneStyles {
2340
+ readonly dropBackground: string | undefined;
2341
+ readonly headerForeground: string | undefined;
2342
+ readonly headerBackground: string | undefined;
2343
+ readonly headerBorder: string | undefined;
2344
+ readonly leftBorder: string | undefined;
2345
+ }
2346
+ /**
2347
+ * A Pane is a structured SplitView view.
2348
+ *
2349
+ * WARNING: You must call `render()` after you construct it.
2350
+ * It can't be done automatically at the end of the ctor
2351
+ * because of the order of property initialization in TypeScript.
2352
+ * Subclasses wouldn't be able to set own properties
2353
+ * before the `render()` call, thus forbidding their use.
2354
+ */
2355
+ declare abstract class Pane extends Disposable implements IView$2 {
2356
+ private static readonly HEADER_SIZE;
2357
+ readonly element: HTMLElement;
2358
+ private header;
2359
+ private body;
2360
+ protected _expanded: boolean;
2361
+ protected _orientation: Orientation;
2362
+ private expandedSize;
2363
+ private _headerVisible;
2364
+ private _bodyRendered;
2365
+ private _minimumBodySize;
2366
+ private _maximumBodySize;
2367
+ private _ariaHeaderLabel;
2368
+ private styles;
2369
+ private animationTimer;
2370
+ private readonly _onDidChange;
2371
+ readonly onDidChange: Event$1<number | undefined>;
2372
+ private readonly _onDidChangeExpansionState;
2373
+ readonly onDidChangeExpansionState: Event$1<boolean>;
2374
+ get ariaHeaderLabel(): string;
2375
+ set ariaHeaderLabel(newLabel: string);
2376
+ get draggableElement(): HTMLElement;
2377
+ get dropTargetElement(): HTMLElement;
2378
+ get dropBackground(): string | undefined;
2379
+ get minimumBodySize(): number;
2380
+ set minimumBodySize(size: number);
2381
+ get maximumBodySize(): number;
2382
+ set maximumBodySize(size: number);
2383
+ private get headerSize();
2384
+ get minimumSize(): number;
2385
+ get maximumSize(): number;
2386
+ orthogonalSize: number;
2387
+ constructor(options: IPaneOptions);
2388
+ isExpanded(): boolean;
2389
+ setExpanded(expanded: boolean): boolean;
2390
+ get headerVisible(): boolean;
2391
+ set headerVisible(visible: boolean);
2392
+ get orientation(): Orientation;
2393
+ set orientation(orientation: Orientation);
2394
+ render(): void;
2395
+ layout(size: number): void;
2396
+ style(styles: IPaneStyles): void;
2397
+ protected updateHeader(): void;
2398
+ protected abstract renderHeader(container: HTMLElement): void;
2399
+ protected abstract renderBody(container: HTMLElement): void;
2400
+ protected abstract layoutBody(height: number, width: number): void;
2401
+ }
2402
+ interface IPaneDndController {
2403
+ canDrag(pane: Pane): boolean;
2404
+ canDrop(pane: Pane, overPane: Pane): boolean;
2405
+ }
2406
+ interface IPaneViewOptions {
2407
+ dnd?: IPaneDndController;
2408
+ orientation?: Orientation;
2409
+ }
2410
+
2411
+ declare class CompositeMenuActions extends Disposable {
2412
+ readonly menuId: MenuId;
2413
+ private readonly contextMenuId;
2414
+ private readonly options;
2415
+ private readonly contextKeyService;
2416
+ private readonly menuService;
2417
+ private readonly menuActions;
2418
+ private _onDidChange;
2419
+ readonly onDidChange: Event$1<void>;
2420
+ constructor(menuId: MenuId, contextMenuId: MenuId | undefined, options: IMenuActionOptions | undefined, contextKeyService: IContextKeyService, menuService: IMenuService);
2421
+ getPrimaryActions(): IAction[];
2422
+ getSecondaryActions(): IAction[];
2423
+ getContextMenuActions(): IAction[];
2424
+ }
2425
+
2426
+ interface IKeybindingProvider {
2427
+ (action: IAction): ResolvedKeybinding | undefined;
2428
+ }
2429
+ interface IAnchorAlignmentProvider {
2430
+ (): AnchorAlignment;
2431
+ }
2432
+ interface IDropdownMenuActionViewItemOptions extends IBaseActionViewItemOptions {
2433
+ readonly actionViewItemProvider?: IActionViewItemProvider;
2434
+ readonly keybindingProvider?: IKeybindingProvider;
2435
+ readonly actionRunner?: IActionRunner;
2436
+ readonly classNames?: string[] | string;
2437
+ readonly anchorAlignmentProvider?: IAnchorAlignmentProvider;
2438
+ readonly menuAsChild?: boolean;
2439
+ }
2440
+
2441
+ interface IFilterWidgetOptions {
2442
+ readonly text?: string;
2443
+ readonly placeholder?: string;
2444
+ readonly ariaLabel?: string;
2445
+ readonly history?: string[];
2446
+ readonly focusContextKey?: string;
2447
+ }
2448
+ declare class FilterWidget extends Widget {
2449
+ private readonly options;
2450
+ private readonly instantiationService;
2451
+ private readonly contextViewService;
2452
+ private readonly keybindingService;
2453
+ readonly element: HTMLElement;
2454
+ private readonly delayedFilterUpdate;
2455
+ private readonly filterInputBox;
2456
+ private readonly filterBadge;
2457
+ private readonly toolbar;
2458
+ private readonly focusContextKey;
2459
+ private readonly _onDidChangeFilterText;
2460
+ readonly onDidChangeFilterText: Event$1<string>;
2461
+ private moreFiltersActionViewItem;
2462
+ private isMoreFiltersChecked;
2463
+ constructor(options: IFilterWidgetOptions, instantiationService: IInstantiationService, contextViewService: IContextViewService, contextKeyService: IContextKeyService, keybindingService: IKeybindingService);
2464
+ focus(): void;
2465
+ blur(): void;
2466
+ updateBadge(message: string | undefined): void;
2467
+ setFilterText(filterText: string): void;
2468
+ getFilterText(): string;
2469
+ getHistory(): string[];
2470
+ layout(width: number): void;
2471
+ checkMoreFilters(checked: boolean): void;
2472
+ private createInput;
2473
+ private createBadge;
2474
+ private createToolBar;
2475
+ private onDidInputChange;
2476
+ private adjustInputBox;
2477
+ private handleKeyboardEvent;
2478
+ private onInputKeyDown;
2479
+ }
2480
+
2481
+ interface IViewPaneOptions extends IPaneOptions {
2482
+ id: string;
2483
+ showActionsAlways?: boolean;
2484
+ titleMenuId?: MenuId;
2485
+ donotForwardArgs?: boolean;
2486
+ }
2487
+ declare abstract class ViewPane extends Pane implements IView$3 {
2488
+ protected keybindingService: IKeybindingService;
2489
+ protected contextMenuService: IContextMenuService;
2490
+ protected readonly configurationService: IConfigurationService;
2491
+ protected contextKeyService: IContextKeyService;
2492
+ protected viewDescriptorService: IViewDescriptorService;
2493
+ protected instantiationService: IInstantiationService;
2494
+ protected openerService: IOpenerService;
2495
+ protected themeService: IThemeService;
2496
+ protected telemetryService: ITelemetryService;
2497
+ private static readonly AlwaysShowActionsConfig;
2498
+ private _onDidFocus;
2499
+ readonly onDidFocus: Event$1<void>;
2500
+ private _onDidBlur;
2501
+ readonly onDidBlur: Event$1<void>;
2502
+ private _onDidChangeBodyVisibility;
2503
+ readonly onDidChangeBodyVisibility: Event$1<boolean>;
2504
+ protected _onDidChangeTitleArea: Emitter<void>;
2505
+ readonly onDidChangeTitleArea: Event$1<void>;
2506
+ protected _onDidChangeViewWelcomeState: Emitter<void>;
2507
+ readonly onDidChangeViewWelcomeState: Event$1<void>;
2508
+ private _isVisible;
2509
+ readonly id: string;
2510
+ private _title;
2511
+ get title(): string;
2512
+ private _titleDescription;
2513
+ get titleDescription(): string | undefined;
2514
+ readonly menuActions: CompositeMenuActions;
2515
+ private progressBar;
2516
+ private progressIndicator;
2517
+ private toolbar?;
2518
+ private readonly showActionsAlways;
2519
+ private headerContainer?;
2520
+ private titleContainer?;
2521
+ private titleDescriptionContainer?;
2522
+ private iconContainer?;
2523
+ protected twistiesContainer?: HTMLElement;
2524
+ private bodyContainer;
2525
+ private viewWelcomeContainer;
2526
+ private viewWelcomeDisposable;
2527
+ private viewWelcomeController;
2528
+ protected readonly scopedContextKeyService: IContextKeyService;
2529
+ constructor(options: IViewPaneOptions, keybindingService: IKeybindingService, contextMenuService: IContextMenuService, configurationService: IConfigurationService, contextKeyService: IContextKeyService, viewDescriptorService: IViewDescriptorService, instantiationService: IInstantiationService, openerService: IOpenerService, themeService: IThemeService, telemetryService: ITelemetryService);
2530
+ get headerVisible(): boolean;
2531
+ set headerVisible(visible: boolean);
2532
+ setVisible(visible: boolean): void;
2533
+ isVisible(): boolean;
2534
+ isBodyVisible(): boolean;
2535
+ setExpanded(expanded: boolean): boolean;
2536
+ render(): void;
2537
+ protected renderHeader(container: HTMLElement): void;
2538
+ protected getTwistyIcon(expanded: boolean): ThemeIcon;
2539
+ style(styles: IPaneStyles): void;
2540
+ private getIcon;
2541
+ protected renderHeaderTitle(container: HTMLElement, title: string): void;
2542
+ protected updateTitle(title: string): void;
2543
+ private setTitleDescription;
2544
+ protected updateTitleDescription(description?: string | undefined): void;
2545
+ private calculateTitle;
2546
+ private scrollableElement;
2547
+ protected renderBody(container: HTMLElement): void;
2548
+ protected layoutBody(height: number, width: number): void;
2549
+ onDidScrollRoot(): void;
2550
+ getProgressIndicator(): IProgressIndicator;
2551
+ protected getProgressLocation(): string;
2552
+ protected getBackgroundColor(): string;
2553
+ focus(): void;
2554
+ private setActions;
2555
+ private updateActionsVisibility;
2556
+ protected updateActions(): void;
2557
+ getActionViewItem(action: IAction, options?: IDropdownMenuActionViewItemOptions): IActionViewItem | undefined;
2558
+ getActionsContext(): unknown;
2559
+ getActionRunner(): IActionRunner | undefined;
2560
+ getOptimalWidth(): number;
2561
+ saveState(): void;
2562
+ private updateViewWelcome;
2563
+ shouldShowWelcome(): boolean;
2564
+ getFilterWidget(): FilterWidget | undefined;
2565
+ shouldShowFilterInHeader(): boolean;
2566
+ }
2567
+
2568
+ interface IViewletViewOptions extends IViewPaneOptions {
2569
+ readonly fromExtensionId?: ExtensionIdentifier;
2570
+ }
2571
+
2572
+ interface IViewPaneContainerOptions extends IPaneViewOptions {
2573
+ mergeViewWithContainerWhenSingleView: boolean;
2574
+ }
2575
+ declare class ViewPaneContainer extends Component implements IViewPaneContainer {
2576
+ private options;
2577
+ protected instantiationService: IInstantiationService;
2578
+ protected configurationService: IConfigurationService;
2579
+ protected layoutService: IWorkbenchLayoutService;
2580
+ protected contextMenuService: IContextMenuService;
2581
+ protected telemetryService: ITelemetryService;
2582
+ protected extensionService: IExtensionService;
2583
+ protected storageService: IStorageService;
2584
+ protected contextService: IWorkspaceContextService;
2585
+ protected viewDescriptorService: IViewDescriptorService;
2586
+ readonly viewContainer: ViewContainer;
2587
+ private lastFocusedPane;
2588
+ private lastMergedCollapsedPane;
2589
+ private paneItems;
2590
+ private paneview?;
2591
+ private visible;
2592
+ private areExtensionsReady;
2593
+ private didLayout;
2594
+ private dimension;
2595
+ private _boundarySashes;
2596
+ private readonly visibleViewsCountFromCache;
2597
+ private readonly visibleViewsStorageId;
2598
+ protected readonly viewContainerModel: IViewContainerModel;
2599
+ private viewDisposables;
2600
+ private readonly _onTitleAreaUpdate;
2601
+ readonly onTitleAreaUpdate: Event$1<void>;
2602
+ private readonly _onDidChangeVisibility;
2603
+ readonly onDidChangeVisibility: Event$1<boolean>;
2604
+ private readonly _onDidAddViews;
2605
+ readonly onDidAddViews: Event$1<IView$3[]>;
2606
+ private readonly _onDidRemoveViews;
2607
+ readonly onDidRemoveViews: Event$1<IView$3[]>;
2608
+ private readonly _onDidChangeViewVisibility;
2609
+ readonly onDidChangeViewVisibility: Event$1<IView$3>;
2610
+ private readonly _onDidFocusView;
2611
+ readonly onDidFocusView: Event$1<IView$3>;
2612
+ private readonly _onDidBlurView;
2613
+ readonly onDidBlurView: Event$1<IView$3>;
2614
+ get onDidSashChange(): Event$1<number>;
2615
+ get panes(): ViewPane[];
2616
+ get views(): IView$3[];
2617
+ get length(): number;
2618
+ private _menuActions?;
2619
+ get menuActions(): CompositeMenuActions | undefined;
2620
+ constructor(id: string, options: IViewPaneContainerOptions, instantiationService: IInstantiationService, configurationService: IConfigurationService, layoutService: IWorkbenchLayoutService, contextMenuService: IContextMenuService, telemetryService: ITelemetryService, extensionService: IExtensionService, themeService: IThemeService, storageService: IStorageService, contextService: IWorkspaceContextService, viewDescriptorService: IViewDescriptorService);
2621
+ create(parent: HTMLElement): void;
2622
+ getTitle(): string;
2623
+ private showContextMenu;
2624
+ getActionsContext(): unknown;
2625
+ getActionViewItem(action: IAction): IActionViewItem | undefined;
2626
+ focus(): void;
2627
+ private get orientation();
2628
+ layout(dimension: Dimension): void;
2629
+ setBoundarySashes(sashes: IBoundarySashes): void;
2630
+ getOptimalWidth(): number;
2631
+ addPanes(panes: {
2632
+ pane: ViewPane;
2633
+ size: number;
2634
+ index?: number;
2635
+ }[]): void;
2636
+ setVisible(visible: boolean): void;
2637
+ isVisible(): boolean;
2638
+ protected updateTitleArea(): void;
2639
+ protected createView(viewDescriptor: IViewDescriptor, options: IViewletViewOptions): ViewPane;
2640
+ getView(id: string): ViewPane | undefined;
2641
+ private saveViewSizes;
2642
+ private restoreViewSizes;
2643
+ private computeInitialSizes;
2644
+ protected saveState(): void;
2645
+ private onContextMenu;
2646
+ openView(id: string, focus?: boolean): IView$3 | undefined;
2647
+ protected onDidAddViewDescriptors(added: IAddedViewDescriptorRef[]): ViewPane[];
2648
+ private onDidRemoveViewDescriptors;
2649
+ toggleViewVisibility(viewId: string): void;
2650
+ private addPane;
2651
+ removePanes(panes: ViewPane[]): void;
2652
+ private removePane;
2653
+ movePane(from: ViewPane, to: ViewPane): void;
2654
+ resizePane(pane: ViewPane, size: number): void;
2655
+ getPaneSize(pane: ViewPane): number;
2656
+ private updateViewHeaders;
2657
+ isViewMergedWithContainer(): boolean;
2658
+ private onDidScrollPane;
2659
+ private onDidSashReset;
2660
+ dispose(): void;
2661
+ }
2662
+
2663
+ declare abstract class PaneComposite extends Composite implements IPaneComposite {
2664
+ protected storageService: IStorageService;
2665
+ protected instantiationService: IInstantiationService;
2666
+ protected contextMenuService: IContextMenuService;
2667
+ protected extensionService: IExtensionService;
2668
+ protected contextService: IWorkspaceContextService;
2669
+ private viewPaneContainer?;
2670
+ constructor(id: string, telemetryService: ITelemetryService, storageService: IStorageService, instantiationService: IInstantiationService, themeService: IThemeService, contextMenuService: IContextMenuService, extensionService: IExtensionService, contextService: IWorkspaceContextService);
2671
+ create(parent: HTMLElement): void;
2672
+ setVisible(visible: boolean): void;
2673
+ layout(dimension: Dimension): void;
2674
+ setBoundarySashes(sashes: IBoundarySashes): void;
2675
+ getOptimalWidth(): number;
2676
+ openView<T extends IView$3>(id: string, focus?: boolean): T | undefined;
2677
+ getViewPaneContainer(): ViewPaneContainer | undefined;
2678
+ getActionsContext(): unknown;
2679
+ getContextMenuActions(): readonly IAction[];
2680
+ getMenuIds(): MenuId[];
2681
+ getActions(): readonly IAction[];
2682
+ getSecondaryActions(): readonly IAction[];
2683
+ getActionViewItem(action: IAction): IActionViewItem | undefined;
2684
+ getTitle(): string;
2685
+ focus(): void;
2686
+ protected abstract createViewPaneContainer(parent: HTMLElement): ViewPaneContainer;
2687
+ }
2688
+ /**
2689
+ * A Pane Composite descriptor is a lightweight descriptor of a Pane Composite in the workbench.
2690
+ */
2691
+ declare class PaneCompositeDescriptor extends CompositeDescriptor<PaneComposite> {
2692
+ readonly iconUrl?: URI | undefined;
2693
+ static create<Services extends BrandedService[]>(ctor: {
2694
+ new (...services: Services): PaneComposite;
2695
+ }, id: string, name: string, cssClass?: string, order?: number, requestedIndex?: number, iconUrl?: URI): PaneCompositeDescriptor;
2696
+ private constructor();
2697
+ }
2698
+
2699
+ interface IActivity {
2700
+ readonly badge: IBadge;
2701
+ readonly clazz?: string;
2702
+ readonly priority?: number;
2703
+ }
2704
+ declare const IActivityService: ServiceIdentifier<IActivityService>;
2705
+ interface IActivityService {
2706
+ readonly _serviceBrand: undefined;
2707
+ /**
2708
+ * Show activity for the given view container
2709
+ */
2710
+ showViewContainerActivity(viewContainerId: string, badge: IActivity): IDisposable;
2711
+ /**
2712
+ * Show activity for the given view
2713
+ */
2714
+ showViewActivity(viewId: string, badge: IActivity): IDisposable;
2715
+ /**
2716
+ * Show accounts activity
2717
+ */
2718
+ showAccountsActivity(activity: IActivity): IDisposable;
2719
+ /**
2720
+ * Show global activity
2721
+ */
2722
+ showGlobalActivity(activity: IActivity): IDisposable;
2723
+ }
2724
+ interface IBadge {
2725
+ getDescription(): string;
2726
+ }
2727
+
2728
+ declare const IPaneCompositePartService: ServiceIdentifier<IPaneCompositePartService>;
2729
+ interface IPaneCompositePartService {
2730
+ readonly _serviceBrand: undefined;
2731
+ readonly onDidPaneCompositeOpen: Event$1<{
2732
+ composite: IPaneComposite;
2733
+ viewContainerLocation: ViewContainerLocation;
2734
+ }>;
2735
+ readonly onDidPaneCompositeClose: Event$1<{
2736
+ composite: IPaneComposite;
2737
+ viewContainerLocation: ViewContainerLocation;
2738
+ }>;
2739
+ /**
2740
+ * Opens a viewlet with the given identifier and pass keyboard focus to it if specified.
2741
+ */
2742
+ openPaneComposite(id: string | undefined, viewContainerLocation: ViewContainerLocation, focus?: boolean): Promise<IPaneComposite | undefined>;
2743
+ /**
2744
+ * Returns the current active viewlet if any.
2745
+ */
2746
+ getActivePaneComposite(viewContainerLocation: ViewContainerLocation): IPaneComposite | undefined;
2747
+ /**
2748
+ * Returns the viewlet by id.
2749
+ */
2750
+ getPaneComposite(id: string, viewContainerLocation: ViewContainerLocation): PaneCompositeDescriptor | undefined;
2751
+ /**
2752
+ * Returns all enabled viewlets
2753
+ */
2754
+ getPaneComposites(viewContainerLocation: ViewContainerLocation): PaneCompositeDescriptor[];
2755
+ /**
2756
+ * Returns id of pinned view containers following the visual order.
2757
+ */
2758
+ getPinnedPaneCompositeIds(viewContainerLocation: ViewContainerLocation): string[];
2759
+ /**
2760
+ * Returns id of visible view containers following the visual order.
2761
+ */
2762
+ getVisiblePaneCompositeIds(viewContainerLocation: ViewContainerLocation): string[];
2763
+ /**
2764
+ * Returns the progress indicator for the side bar.
2765
+ */
2766
+ getProgressIndicator(id: string, viewContainerLocation: ViewContainerLocation): IProgressIndicator | undefined;
2767
+ /**
2768
+ * Hide the active viewlet.
2769
+ */
2770
+ hideActivePaneComposite(viewContainerLocation: ViewContainerLocation): void;
2771
+ /**
2772
+ * Return the last active viewlet id.
2773
+ */
2774
+ getLastActivePaneCompositeId(viewContainerLocation: ViewContainerLocation): string;
2775
+ /**
2776
+ * Show an activity in a viewlet.
2777
+ */
2778
+ showActivity(id: string, viewContainerLocation: ViewContainerLocation, badge: IBadge, clazz?: string, priority?: number): IDisposable;
2779
+ }
2780
+
2781
+ declare const IStatusbarService: ServiceIdentifier<IStatusbarService>;
2782
+ interface IStatusbarService {
2783
+ readonly _serviceBrand: undefined;
2784
+ /**
2785
+ * An event that is triggered when an entry's visibility is changed.
2786
+ */
2787
+ readonly onDidChangeEntryVisibility: Event$1<{
2788
+ id: string;
2789
+ visible: boolean;
2790
+ }>;
2791
+ /**
2792
+ * Adds an entry to the statusbar with the given alignment and priority. Use the returned accessor
2793
+ * to update or remove the statusbar entry.
2794
+ *
2795
+ * @param id identifier of the entry is needed to allow users to hide entries via settings
2796
+ * @param alignment either LEFT or RIGHT side in the status bar
2797
+ * @param priority items get arranged from highest priority to lowest priority from left to right
2798
+ * in their respective alignment slot
2799
+ */
2800
+ addEntry(entry: IStatusbarEntry, id: string, alignment: StatusbarAlignment, priority?: number | IStatusbarEntryPriority): IStatusbarEntryAccessor;
2801
+ /**
2802
+ * Adds an entry to the statusbar with the given alignment relative to another entry. Use the returned
2803
+ * accessor to update or remove the statusbar entry.
2804
+ *
2805
+ * @param id identifier of the entry is needed to allow users to hide entries via settings
2806
+ * @param alignment either LEFT or RIGHT side in the status bar
2807
+ * @param location a reference to another entry to position relative to
2808
+ */
2809
+ addEntry(entry: IStatusbarEntry, id: string, alignment: StatusbarAlignment, location?: IStatusbarEntryLocation): IStatusbarEntryAccessor;
2810
+ /**
2811
+ * Return if an entry is visible or not.
2812
+ */
2813
+ isEntryVisible(id: string): boolean;
2814
+ /**
2815
+ * Allows to update an entry's visibility with the provided ID.
2816
+ */
2817
+ updateEntryVisibility(id: string, visible: boolean): void;
2818
+ /**
2819
+ * Focused the status bar. If one of the status bar entries was focused, focuses it directly.
2820
+ */
2821
+ focus(preserveEntryFocus?: boolean): void;
2822
+ /**
2823
+ * Focuses the next status bar entry. If none focused, focuses the first.
2824
+ */
2825
+ focusNextEntry(): void;
2826
+ /**
2827
+ * Focuses the previous status bar entry. If none focused, focuses the last.
2828
+ */
2829
+ focusPreviousEntry(): void;
2830
+ /**
2831
+ * Returns true if a status bar entry is focused.
2832
+ */
2833
+ isEntryFocused(): boolean;
2834
+ /**
2835
+ * Temporarily override statusbar style.
2836
+ */
2837
+ overrideStyle(style: IStatusbarStyleOverride): IDisposable;
2838
+ }
2839
+ declare const enum StatusbarAlignment {
2840
+ LEFT = 0,
2841
+ RIGHT = 1
2842
+ }
2843
+ interface IStatusbarEntryLocation {
2844
+ /**
2845
+ * The identifier of another status bar entry to
2846
+ * position relative to.
2847
+ */
2848
+ id: string;
2849
+ /**
2850
+ * The alignment of the status bar entry relative
2851
+ * to the referenced entry.
2852
+ */
2853
+ alignment: StatusbarAlignment;
2854
+ /**
2855
+ * Whether to move the entry close to the location
2856
+ * so that it appears as if both this entry and
2857
+ * the location belong to each other.
2858
+ */
2859
+ compact?: boolean;
2860
+ }
2861
+ interface IStatusbarEntryPriority {
2862
+ /**
2863
+ * The main priority of the entry that
2864
+ * defines the order of appearance:
2865
+ * either a number or a reference to
2866
+ * another status bar entry to position
2867
+ * relative to.
2868
+ *
2869
+ * May not be unique across all entries.
2870
+ */
2871
+ readonly primary: number | IStatusbarEntryLocation;
2872
+ /**
2873
+ * The secondary priority of the entry
2874
+ * is used in case the main priority
2875
+ * matches another one's priority.
2876
+ *
2877
+ * Should be unique across all entries.
2878
+ */
2879
+ readonly secondary: number;
2880
+ }
2881
+ declare const ShowTooltipCommand: Command;
2882
+ interface IStatusbarStyleOverride {
2883
+ readonly priority: number;
2884
+ readonly foreground?: ColorIdentifier;
2885
+ readonly background?: ColorIdentifier;
2886
+ readonly border?: ColorIdentifier;
2887
+ }
2888
+ /**
2889
+ * A declarative way of describing a status bar entry
2890
+ */
2891
+ interface IStatusbarEntry {
2892
+ /**
2893
+ * The (short) name to show for the entry like 'Language Indicator',
2894
+ * 'Git Status' etc.
2895
+ */
2896
+ readonly name: string;
2897
+ /**
2898
+ * The text to show for the entry. You can embed icons in the text by leveraging the syntax:
2899
+ *
2900
+ * `My text $(icon name) contains icons like $(icon name) this one.`
2901
+ */
2902
+ readonly text: string;
2903
+ /**
2904
+ * Text to be read out by the screen reader.
2905
+ */
2906
+ readonly ariaLabel: string;
2907
+ /**
2908
+ * Role of the status bar entry which defines how a screen reader interacts with it.
2909
+ * Default is 'button'.
2910
+ */
2911
+ readonly role?: string;
2912
+ /**
2913
+ * An optional tooltip text to show when you hover over the entry
2914
+ */
2915
+ readonly tooltip?: string | IMarkdownString | HTMLElement;
2916
+ /**
2917
+ * An optional color to use for the entry
2918
+ */
2919
+ readonly color?: string | ThemeColor;
2920
+ /**
2921
+ * An optional background color to use for the entry
2922
+ */
2923
+ readonly backgroundColor?: string | ThemeColor;
2924
+ /**
2925
+ * An optional command to execute on click.
2926
+ *
2927
+ * Can use the special `ShowTooltipCommand` to
2928
+ * show the tooltip on click if provided.
2929
+ */
2930
+ readonly command?: string | Command | typeof ShowTooltipCommand;
2931
+ /**
2932
+ * Whether to show a beak above the status bar entry.
2933
+ */
2934
+ readonly showBeak?: boolean;
2935
+ /**
2936
+ * Will enable a spinning icon in front of the text to indicate progress. When `true` is
2937
+ * specified, `syncing` will be used.
2938
+ */
2939
+ readonly showProgress?: boolean | 'syncing' | 'loading';
2940
+ }
2941
+ interface IStatusbarEntryAccessor extends IDisposable {
2942
+ /**
2943
+ * Allows to update an existing status bar entry.
2944
+ */
2945
+ update(properties: IStatusbarEntry): void;
2946
+ }
2947
+
2948
+ declare const IHoverService: ServiceIdentifier<IHoverService>;
2949
+ /**
2950
+ * Enables the convenient display of rich markdown-based hovers in the workbench.
2951
+ */
2952
+ interface IHoverService {
2953
+ readonly _serviceBrand: undefined;
2954
+ /**
2955
+ * Shows a hover, provided a hover with the same options object is not already visible.
2956
+ * @param options A set of options defining the characteristics of the hover.
2957
+ * @param focus Whether to focus the hover (useful for keyboard accessibility).
2958
+ *
2959
+ * **Example:** A simple usage with a single element target.
2960
+ *
2961
+ * ```typescript
2962
+ * showHover({
2963
+ * text: new MarkdownString('Hello world'),
2964
+ * target: someElement
2965
+ * });
2966
+ * ```
2967
+ */
2968
+ showHover(options: IHoverOptions, focus?: boolean): IHoverWidget | undefined;
2969
+ /**
2970
+ * Hides the hover if it was visible. This call will be ignored if the the hover is currently
2971
+ * "locked" via the alt/option key.
2972
+ */
2973
+ hideHover(): void;
2974
+ }
2975
+ interface IHoverWidget extends IDisposable {
2976
+ readonly isDisposed: boolean;
2977
+ }
2978
+ interface IHoverOptions {
2979
+ /**
2980
+ * The content to display in the primary section of the hover. The type of text determines the
2981
+ * default `hideOnHover` behavior.
2982
+ */
2983
+ content: IMarkdownString | string | HTMLElement;
2984
+ /**
2985
+ * The target for the hover. This determines the position of the hover and it will only be
2986
+ * hidden when the mouse leaves both the hover and the target. A HTMLElement can be used for
2987
+ * simple cases and a IHoverTarget for more complex cases where multiple elements and/or a
2988
+ * dispose method is required.
2989
+ */
2990
+ target: IHoverTarget | HTMLElement;
2991
+ /**
2992
+ * An ID to associate with the hover to be used as an equality check. Normally when calling
2993
+ * {@link IHoverService.showHover} the options object itself is used to determine if the hover
2994
+ * is the same one that is already showing, when this is set, the ID will be used instead.
2995
+ */
2996
+ id?: number | string;
2997
+ /**
2998
+ * A set of actions for the hover's "status bar".
2999
+ */
3000
+ actions?: IHoverAction[];
3001
+ /**
3002
+ * An optional array of classes to add to the hover element.
3003
+ */
3004
+ additionalClasses?: string[];
3005
+ /**
3006
+ * An optional link handler for markdown links, if this is not provided the IOpenerService will
3007
+ * be used to open the links using its default options.
3008
+ */
3009
+ linkHandler?(url: string): void;
3010
+ /**
3011
+ * Whether to hide the hover when the mouse leaves the `target` and enters the actual hover.
3012
+ * This is false by default when text is an `IMarkdownString` and true when `text` is a
3013
+ * `string`. Note that this will be ignored if any `actions` are provided as hovering is
3014
+ * required to make them accessible.
3015
+ *
3016
+ * In general hiding on hover is desired for:
3017
+ * - Regular text where selection is not important
3018
+ * - Markdown that contains no links where selection is not important
3019
+ */
3020
+ hideOnHover?: boolean;
3021
+ /**
3022
+ * When {@link hideOnHover} is explicitly true or undefined and its auto value is detected to
3023
+ * hide, show a hint at the bottom of the hover explaining how to mouse over the widget. This
3024
+ * should be used in the cases where despite the hover having no interactive content, it's
3025
+ * likely the user may want to interact with it somehow.
3026
+ */
3027
+ showHoverHint?: boolean;
3028
+ /**
3029
+ * Whether to hide the hover when a key is pressed.
3030
+ */
3031
+ hideOnKeyDown?: boolean;
3032
+ /**
3033
+ * Position of the hover. The default is to show above the target. This option will be ignored
3034
+ * if there is not enough room to layout the hover in the specified position, unless the
3035
+ * forcePosition option is set.
3036
+ */
3037
+ hoverPosition?: HoverPosition;
3038
+ /**
3039
+ * Force the hover position, reducing the size of the hover instead of adjusting the hover
3040
+ * position.
3041
+ */
3042
+ forcePosition?: boolean;
3043
+ /**
3044
+ * Whether to show the hover pointer
3045
+ */
3046
+ showPointer?: boolean;
3047
+ /**
3048
+ * Whether to show a compact hover
3049
+ */
3050
+ compact?: boolean;
3051
+ /**
3052
+ * Whether to skip the fade in animation, this should be used when hovering from one hover to
3053
+ * another in the same group so it looks like the hover is moving from one element to the other.
3054
+ */
3055
+ skipFadeInAnimation?: boolean;
3056
+ /**
3057
+ * Whether to trap focus in the following ways:
3058
+ * - When the hover closes, focus goes to the element that had focus before the hover opened
3059
+ * - If there are elements in the hover to focus, focus stays inside of the hover when tabbing
3060
+ */
3061
+ trapFocus?: boolean;
3062
+ container?: HTMLElement;
3063
+ }
3064
+ interface IHoverAction {
3065
+ /**
3066
+ * The label to use in the hover's status bar.
3067
+ */
3068
+ label: string;
3069
+ /**
3070
+ * The command ID of the action, this is used to resolve the keybinding to display after the
3071
+ * action label.
3072
+ */
3073
+ commandId: string;
3074
+ /**
3075
+ * An optional class of an icon that will be displayed before the label.
3076
+ */
3077
+ iconClass?: string;
3078
+ /**
3079
+ * The callback to run the action.
3080
+ * @param target The action element that was activated.
3081
+ */
3082
+ run(target: HTMLElement): void;
3083
+ }
3084
+ /**
3085
+ * A target for a hover.
3086
+ */
3087
+ interface IHoverTarget extends IDisposable {
3088
+ /**
3089
+ * A set of target elements used to position the hover. If multiple elements are used the hover
3090
+ * will try to not overlap any target element. An example use case for this is show a hover for
3091
+ * wrapped text.
3092
+ */
3093
+ readonly targetElements: readonly HTMLElement[];
3094
+ /**
3095
+ * An optional absolute x coordinate to position the hover with, for example to position the
3096
+ * hover using `MouseEvent.pageX`.
3097
+ */
3098
+ x?: number;
3099
+ /**
3100
+ * An optional absolute y coordinate to position the hover with, for example to position the
3101
+ * hover using `MouseEvent.pageY`.
3102
+ */
3103
+ y?: number;
3104
+ }
3105
+
3106
+ export { StorageScope as $, ActionBar as A, IHoverOptions as B, Composite as C, IHoverWidget as D, Dimension as E, Parts as F, IStatusbarService as G, HoverPosition as H, IContextMenuProvider as I, IStatusbarEntry as J, IStatusbarEntryLocation as K, LayoutPriority as L, MenuId as M, IStatusbarEntryPriority as N, IStatusbarEntryAccessor as O, Part as P, IStatusbarStyleOverride as Q, ConfigurationTarget as R, StatusbarAlignment as S, ITelemetryEndpoint as T, IOpenEmptyWindowOptions as U, ViewContainerLocation as V, IWindowOpenable as W, IOpenWindowOptions as X, IEditableData as Y, IConfigurationChangeEvent as Z, IColorTheme as _, ActionsOrientation as a, StorageTarget as a0, IOpenerService as a1, IViewsService as a2, ILayoutService as a3, IActionViewItemProvider as b, AnchorAlignment as c, IMenuService as d, IContextMenuService as e, ITelemetryService as f, IMenuActionOptions as g, IStorageService as h, CompositeRegistry as i, IWorkbenchLayoutService as j, IThemeService as k, IPartOptions as l, IActionViewItem as m, IView as n, IPaneComposite as o, PaneCompositeDescriptor as p, IBadge as q, PaneComposite as r, IViewDescriptorService as s, IActivityService as t, IPaneCompositePartService as u, IActivity as v, IConfigurationService as w, IWorkbenchEnvironmentService as x, IHoverService as y, IContextViewService as z };