@codingame/monaco-vscode-api 1.69.10 → 1.69.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.js CHANGED
@@ -1,6 +1,7 @@
1
- import { E as Emitter } from './polyfill.js';
1
+ import './polyfill.js';
2
2
  import { B as Breakpoint$1, C as CallHierarchyIncomingCall$1, a as CallHierarchyItem$1, b as CallHierarchyOutgoingCall$1, c as CodeAction$1, d as CodeActionKind$1, e as CodeActionTriggerKind$1, f as CodeLens$1, g as Color$1, h as ColorInformation$1, i as ColorPresentation$1, j as CommentMode$1, k as CommentThreadCollapsibleState$1, l as CompletionItem$1, m as CompletionItemKind$1, n as CompletionItemTag$1, o as CompletionList$1, p as CompletionTriggerKind$1, q as ConfigurationTarget$1, r as CustomExecution$1, D as DebugAdapterExecutable$1, s as DebugAdapterInlineImplementation$1, t as DebugAdapterNamedPipeServer$1, u as DebugAdapterServer$1, v as DebugConsoleMode$1, w as DecorationRangeBehavior$1, x as Diagnostic$1, y as DiagnosticRelatedInformation$1, z as DiagnosticSeverity$1, A as DiagnosticTag$1, E as Disposable$1, F as DocumentHighlight$1, G as DocumentHighlightKind$1, H as DocumentLink$1, I as DocumentSymbol$1, J as EndOfLine$1, K as EnvironmentVariableMutatorType$1, L as EvaluatableExpression$1, M as InlineValueText$1, N as InlineValueVariableLookup$1, O as InlineValueEvaluatableExpression$1, P as ExtensionKind$1, Q as ExtensionMode$1, R as FileChangeType$1, S as FileDecoration$1, T as FileSystemError$1, U as FoldingRange$1, V as FoldingRangeKind$1, W as FunctionBreakpoint$1, X as Hover$1, Y as Location$1, Z as MarkdownString$1, _ as ParameterInformation$1, $ as Position$1, a0 as ProcessExecution$1, a1 as ProgressLocation$1, a2 as QuickInputButtons$1, a3 as Range$1, a4 as RelativePattern$1, a5 as Selection$2, a6 as SelectionRange$1, a7 as SemanticTokens$1, a8 as SemanticTokensBuilder$1, a9 as SemanticTokensEdit$1, aa as SemanticTokensEdits$1, ab as SemanticTokensLegend$1, ac as ShellExecution$1, ad as ShellQuoting$1, ae as SignatureHelp$1, af as SignatureHelpTriggerKind$1, ag as SignatureInformation$1, ah as SnippetString$1, ai as SourceBreakpoint$1, aj as StatusBarAlignment$1, ak as SymbolInformation$1, al as SymbolKind$1, am as SymbolTag$1, an as Task$1, ao as TaskGroup$1, ap as TaskPanelKind$1, aq as TaskRevealKind$1, ar as TaskScope$1, as as TerminalLink$1, at as TerminalLocation$1, au as TerminalProfile$1, av as TextDocumentSaveReason$1, aw as TextEdit$1, ax as TextEditorLineNumbersStyle$1, ay as TextEditorRevealType$1, az as TextEditorSelectionChangeKind$1, aA as TextDocumentChangeReason$1, aB as ThemeColor$1, aC as ThemeIcon$1, aD as TreeItem$1, aE as TreeItemCollapsibleState$1, aF as TypeHierarchyItem$1, aG as UIKind$1, aH as ViewColumn$1, aI as WorkspaceEdit$1, aJ as InlayHint$1, aK as InlayHintLabelPart$1, aL as InlayHintKind$1, aM as NotebookRange$1, aN as NotebookCellKind$1, aO as NotebookCellData$1, aP as NotebookData$1, aQ as NotebookCellStatusBarAlignment$1, aR as NotebookCellOutput$1, aS as NotebookCellOutputItem$1, aT as NotebookCellStatusBarItem$1, aU as NotebookControllerAffinity$1, aV as LinkedEditingRanges$1, aW as TestRunRequest$1, aX as TestMessage$1, aY as TestTag$1, aZ as TestRunProfileKind$1, a_ as LanguageStatusSeverity$1, a$ as QuickPickItemKind$1, b0 as TextDiffTabInput, b1 as CustomEditorTabInput, b2 as NotebookEditorTabInput, b3 as NotebookDiffEditorTabInput, b4 as WebviewEditorTabInput, b5 as TerminalEditorTabInput, b6 as InputBoxValidationSeverity$1, b7 as InlineSuggestionList, b8 as InlineCompletionTriggerKind$1, b9 as InlineSuggestion, ba as DocumentDropEdit$1, bb as NotebookEditorRevealType$1, bc as getExtHostServices, bd as DEFAULT_EXTENSION, be as LanguageSelector } from './extHost.js';
3
3
  import { C as CancellationTokenSource$1, F as FileType$1, a as FilePermission$1, S as Services } from './services2.js';
4
+ import { E as Emitter } from './workspace.js';
4
5
  import { score } from 'monaco-editor/esm/vs/editor/common/languageSelector.js';
5
6
  import { u as unsupported$1 } from './missing-services.js';
6
7
  import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
@@ -1,6 +1,6 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
2
- import { E as Emitter, U as UserSettings } from './polyfill.js';
3
- import { e as IUserDataProfilesService, f as IPolicyService, N as NullPolicyService } from './missing-services.js';
1
+ import { E as Emitter, _ as __decorate, a as __param } from './workspace.js';
2
+ import { U as UserSettings } from './polyfill.js';
3
+ import { e as IPolicyService, N as NullPolicyService } from './missing-services.js';
4
4
  import { b as isEmptyObject } from './types.js';
5
5
  import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
6
  import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
@@ -19,7 +19,7 @@ import { bf as Position$2, bg as configurationDefaultsSchemaId } from './extHost
19
19
  export { bh as ConfigurationScope } from './extHost.js';
20
20
  import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
21
21
  import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
22
- import { i as IFileService, j as IWorkbenchEnvironmentService } from './services2.js';
22
+ import { q as IUserDataProfilesService, i as IFileService, j as IWorkbenchEnvironmentService } from './services2.js';
23
23
  import { localize } from 'monaco-editor/esm/vs/nls.js';
24
24
  import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
25
25
  import { IWorkspaceTrustManagementService } from 'monaco-editor/esm/vs/platform/workspace/common/workspaceTrust.js';
package/dist/dialogs.js CHANGED
@@ -1,7 +1,7 @@
1
- import { E as Emitter } from './polyfill.js';
1
+ import './polyfill.js';
2
2
  import './missing-services.js';
3
3
  import { g as getServiceOverride$1, D as DialogHandlerContribution } from './layout.js';
4
- import { _ as __decorate, a as __param } from './contextkey.js';
4
+ import { _ as __decorate, a as __param, E as Emitter } from './workspace.js';
5
5
  import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
6
6
  import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
7
7
  import { j as IWorkbenchEnvironmentService } from './services2.js';
package/dist/extHost.js CHANGED
@@ -1,4 +1,4 @@
1
- import { _ as __decorate, a as __param, b as __classPrivateFieldSet, c as __classPrivateFieldGet, d as coalesceInPlace, m as mapArrayOrNot, e as delta$1 } from './contextkey.js';
1
+ import { _ as __decorate, a as __param, E as Emitter, b as __classPrivateFieldSet, c as __classPrivateFieldGet, d as coalesceInPlace, m as mapArrayOrNot, e as delta$1 } from './workspace.js';
2
2
  import { C as CancellationTokenSource, I as IEditorService, b as IEditorGroupsService, c as IProductService, m as markAsFileSystemProviderError, d as FileSystemProviderErrorCode, A as ACTIVE_GROUP, e as SIDE_GROUP, f as IUriIdentityService, g as IPaneCompositePartService, h as ITextFileService, i as IFileService, j as IWorkbenchEnvironmentService, k as IWorkingCopyFileService, l as IPathService, n as ILanguageStatusService, o as IHostService, S as Services } from './services2.js';
3
3
  import { i as isStringArray, w as withUndefinedAsNull } from './types.js';
4
4
  import { illegalArgument, canceled, transformErrorForSerialization, CancellationError, onUnexpectedError, onUnexpectedExternalError, isCancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
@@ -12,7 +12,7 @@ import { ResourceMap, TernarySearchTree } from 'monaco-editor/esm/vs/base/common
12
12
  import { MarkdownString as MarkdownString$2, parseHrefAndDimensions, isMarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
13
13
  import { marked as marked$1 } from 'monaco-editor/esm/vs/base/common/marked/marked.js';
14
14
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
15
- import { E as Emitter, d as disposed, C as ConsoleMainLogger, r as readonly, N as NotImplementedError, R as ResourceSet } from './polyfill.js';
15
+ import { d as disposed, C as ConsoleMainLogger, r as readonly, N as NotImplementedError, R as ResourceSet } from './polyfill.js';
16
16
  import { MarkerSeverity, IMarkerService } from 'monaco-editor/esm/vs/platform/markers/common/markers.js';
17
17
  import { revive, parse } from 'monaco-editor/esm/vs/base/common/marshalling.js';
18
18
  import { equals, cloneAndChange, deepFreeze, mixin, deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
package/dist/files.js CHANGED
@@ -1,7 +1,7 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
2
- import { E as Emitter, a as isReadableStream, p as peekStream, b as peekReadable, c as bufferToReadable, s as streamToBuffer, e as consumeStream, t as transform, f as isReadableBufferedStream, l as listenStream, g as bufferedStreamToBuffer, h as readableToBuffer, n as newWriteableBufferStream, j as newWriteableStream } from './polyfill.js';
3
- import { g as format2, h as getServiceMachineId, R as ResourceQueue, u as unsupported } from './missing-services.js';
4
- import { i as IFileService, c as IProductService, S as Services, t as FileSystemProviderError, d as FileSystemProviderErrorCode, u as FileChangesEvent, v as FileOperationError, w as hasOpenReadWriteCloseCapability, x as hasReadWriteCapability, y as hasFileReadStreamCapability, z as toFileSystemProviderErrorCode, B as ensureFileSystemProviderError, F as FileType, a as FilePermission, D as etag, E as FileOperationEvent, G as toFileOperationResult, H as ETAG_DISABLED, J as hasFileAtomicReadCapability, N as NotModifiedSinceFileOperationError, K as hasFileFolderCopyCapability, L as hasFileCloneCapability, M as createFileSystemProviderError, C as CancellationTokenSource } from './services2.js';
1
+ import { _ as __decorate, a as __param, E as Emitter } from './workspace.js';
2
+ import { i as isReadableStream, p as peekStream, a as peekReadable, b as bufferToReadable, s as streamToBuffer, c as consumeStream, t as transform, e as isReadableBufferedStream, l as listenStream, f as bufferedStreamToBuffer, g as readableToBuffer, n as newWriteableBufferStream, h as newWriteableStream } from './polyfill.js';
3
+ import { f as format2, g as getServiceMachineId, R as ResourceQueue, u as unsupported } from './missing-services.js';
4
+ import { i as IFileService, c as IProductService, S as Services, w as FileSystemProviderError, d as FileSystemProviderErrorCode, x as FileChangesEvent, y as FileOperationError, z as hasOpenReadWriteCloseCapability, B as hasReadWriteCapability, D as hasFileReadStreamCapability, E as toFileSystemProviderErrorCode, G as ensureFileSystemProviderError, F as FileType, a as FilePermission, H as etag, J as FileOperationEvent, K as toFileOperationResult, L as ETAG_DISABLED, M as hasFileAtomicReadCapability, N as NotModifiedSinceFileOperationError, O as hasFileFolderCopyCapability, Q as hasFileCloneCapability, R as createFileSystemProviderError, C as CancellationTokenSource } from './services2.js';
5
5
  import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
6
6
  import { canceled } from 'monaco-editor/esm/vs/base/common/errors.js';
7
7
  import { localize } from 'monaco-editor/esm/vs/nls.js';
@@ -1,10 +1,10 @@
1
- import { i as index, _ as __decorate, a as __param, h as flatten } from './contextkey.js';
2
- import { E as Emitter, k as parse } from './polyfill.js';
3
- import { i as isProposedApiEnabled, E as ExtensionsRegistry, j as ExtensionMessageCollector, e as IUserDataProfilesService, I as IExtensionService, k as IPreferencesService, l as IUserDataProfileService, m as IKeyboardLayoutService } from './missing-services.js';
1
+ import { h as index, _ as __decorate, a as __param, j as flatten, E as Emitter } from './workspace.js';
2
+ import { j as parse } from './polyfill.js';
3
+ import { i as isProposedApiEnabled, E as ExtensionsRegistry, h as ExtensionMessageCollector, I as IExtensionService, j as IPreferencesService, k as IUserDataProfileService, l as IKeyboardLayoutService } from './missing-services.js';
4
4
  import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
5
5
  import { SimpleKeybinding, ScanCodeBinding, ChordKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
6
6
  import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
7
- import { S as Services, i as IFileService, I as IEditorService, b as IEditorGroupsService, o as IHostService } from './services2.js';
7
+ import { S as Services, q as IUserDataProfilesService, i as IFileService, I as IEditorService, b as IEditorGroupsService, o as IHostService } from './services2.js';
8
8
  import { MenuRegistry, MenuId, MenuItemAction, IMenuService, isIMenuItem } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
9
9
  import { getConfiguredDefaultLocale, localize } from 'monaco-editor/esm/vs/nls.js';
10
10
  import { ThemeIcon } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
@@ -1,6 +1,6 @@
1
- import { k as parse, m as getNodeType } from './polyfill.js';
2
- import { n as ITextMateService, I as IExtensionService } from './missing-services.js';
3
- import { _ as __decorate, a as __param } from './contextkey.js';
1
+ import { j as parse, k as getNodeType } from './polyfill.js';
2
+ import { m as ITextMateService, I as IExtensionService } from './missing-services.js';
3
+ import { _ as __decorate, a as __param } from './workspace.js';
4
4
  import { g as getParseErrorMessage } from './jsonErrorMessages.js';
5
5
  import { r as registerExtensionFile, g as getServiceOverride$1, I as IExtensionResourceLoaderService } from './files.js';
6
6
  import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
@@ -1,6 +1,6 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
1
+ import { _ as __decorate, a as __param } from './workspace.js';
2
2
  import { I as IExtensionService, E as ExtensionsRegistry } from './missing-services.js';
3
- import { O as FILES_ASSOCIATIONS_CONFIG } from './services2.js';
3
+ import { T as FILES_ASSOCIATIONS_CONFIG } from './services2.js';
4
4
  import { parse } from 'monaco-editor/esm/vs/base/common/glob.js';
5
5
  import { posix } from 'monaco-editor/esm/vs/base/common/path.js';
6
6
  import { LanguageService } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
package/dist/languages.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import './polyfill.js';
2
- import { j as ExtensionMessageCollector } from './missing-services.js';
2
+ import { h as ExtensionMessageCollector } from './missing-services.js';
3
3
  import { W as WorkbenchLanguageService } from './languageService.js';
4
4
  import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
5
5
  import { bd as DEFAULT_EXTENSION } from './extHost.js';
package/dist/layout.js CHANGED
@@ -1,6 +1,5 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
1
+ import { _ as __decorate, a as __param, E as Emitter } from './workspace.js';
2
2
  import { c as IProductService } from './services2.js';
3
- import { E as Emitter } from './polyfill.js';
4
3
  import { Widget } from 'monaco-editor/esm/vs/base/browser/ui/widget.js';
5
4
  import { CSSIcon, Codicon } from 'monaco-editor/esm/vs/base/common/codicons.js';
6
5
  import { Color } from 'monaco-editor/esm/vs/base/common/color.js';
@@ -25,6 +24,7 @@ import { IKeybindingService } from 'monaco-editor/esm/vs/platform/keybinding/com
25
24
  import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
26
25
  import { IClipboardService } from 'monaco-editor/esm/vs/platform/clipboard/common/clipboardService.js';
27
26
  import { IDialogService } from 'monaco-editor/esm/vs/platform/dialogs/common/dialogs.js';
27
+ import './polyfill.js';
28
28
  import './missing-services.js';
29
29
  import { I as IWorkbenchLayoutService } from './layoutService.js';
30
30
  import { o as onServicesInitialized } from './tools.js';
@@ -1,4 +1,4 @@
1
- import { r as refineServiceDecorator } from './services2.js';
1
+ import { s as refineServiceDecorator } from './services2.js';
2
2
  import { ILayoutService } from 'monaco-editor/esm/vs/platform/layout/browser/layoutService.js';
3
3
  const IWorkbenchLayoutService = refineServiceDecorator(ILayoutService);
4
4
  export { IWorkbenchLayoutService as I };
@@ -1,29 +1,25 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
2
- import { E as Emitter, i as isWorkspaceIdentifier } from './polyfill.js';
3
- import { p as productSchemaId, I as IEditorService, g as IPaneCompositePartService, f as IUriIdentityService, h as ITextFileService, i as IFileService, b as IEditorGroupsService, j as IWorkbenchEnvironmentService, k as IWorkingCopyFileService, l as IPathService, S as Services, c as IProductService, n as ILanguageStatusService, o as IHostService, q as ISnippetsService, r as refineServiceDecorator } from './services2.js';
1
+ import { E as Emitter, _ as __decorate, a as __param } from './workspace.js';
2
+ import { p as productSchemaId, P as PROFILES_ENABLEMENT_CONFIG, I as IEditorService, g as IPaneCompositePartService, f as IUriIdentityService, h as ITextFileService, i as IFileService, b as IEditorGroupsService, j as IWorkbenchEnvironmentService, k as IWorkingCopyFileService, l as IPathService, S as Services, c as IProductService, n as ILanguageStatusService, o as IHostService, q as IUserDataProfilesService, r as ISnippetsService, s as refineServiceDecorator } from './services2.js';
4
3
  import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
5
4
  import { compare } from 'monaco-editor/esm/vs/base/common/strings.js';
6
5
  import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
7
6
  import { ExtensionIdentifier } from 'monaco-editor/esm/vs/platform/extensions/common/extensions.js';
8
7
  import { USLayoutResolvedKeybinding } from 'monaco-editor/esm/vs/platform/keybinding/common/usLayoutResolvedKeybinding.js';
9
8
  import { SimpleKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
10
- import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
11
- import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
12
- import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
13
- import { ExtUri, joinPath, extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
14
- import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
15
- import { isSingleFolderWorkspaceIdentifier } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
16
- import { hash } from 'monaco-editor/esm/vs/base/common/hash.js';
9
+ import './polyfill.js';
17
10
  import { generateUuid } from 'monaco-editor/esm/vs/base/common/uuid.js';
18
- import { Promises } from 'monaco-editor/esm/vs/base/common/async.js';
19
- import { ResourceMap } from 'monaco-editor/esm/vs/base/common/map.js';
20
- import { localize } from 'monaco-editor/esm/vs/nls.js';
21
11
  import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
22
12
  import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
23
13
  import { Lazy } from 'monaco-editor/esm/vs/base/common/lazy.js';
24
14
  import { LRUCachedFunction } from 'monaco-editor/esm/vs/base/common/cache.js';
15
+ import { Disposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
16
+ import { Promises } from 'monaco-editor/esm/vs/base/common/async.js';
17
+ import { localize } from 'monaco-editor/esm/vs/nls.js';
18
+ import { URI } from 'monaco-editor/esm/vs/base/common/uri.js';
19
+ import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
25
20
  import { ContextKeyExpr, ContextKeyDefinedExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
26
21
  import { OS } from 'monaco-editor/esm/vs/base/common/platform.js';
22
+ import { ExtUri, extUri } from 'monaco-editor/esm/vs/base/common/resources.js';
27
23
  import { onUnexpectedError, CancellationError } from 'monaco-editor/esm/vs/base/common/errors.js';
28
24
  import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
29
25
  import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
@@ -319,237 +315,6 @@ const _UUIDPattern = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{
319
315
  function isUUID(value) {
320
316
  return _UUIDPattern.test(value);
321
317
  }
322
- const PROFILES_ENABLEMENT_CONFIG = 'workbench.experimental.settingsProfiles.enabled';
323
- const IUserDataProfilesService = ( (createDecorator('IUserDataProfilesService')));
324
- const EXTENSIONS_RESOURCE_NAME = 'extensions.json';
325
- function toUserDataProfile(name, location, useDefaultFlags) {
326
- return {
327
- id: ( (hash(location.path).toString(16))),
328
- name: name,
329
- location: location,
330
- isDefault: false,
331
- globalStorageHome: joinPath(location, 'globalStorage'),
332
- settingsResource: joinPath(location, 'settings.json'),
333
- keybindingsResource: joinPath(location, 'keybindings.json'),
334
- tasksResource: joinPath(location, 'tasks.json'),
335
- snippetsHome: joinPath(location, 'snippets'),
336
- extensionsResource: joinPath(location, EXTENSIONS_RESOURCE_NAME),
337
- useDefaultFlags
338
- };
339
- }
340
- let UserDataProfilesService = class UserDataProfilesService extends Disposable {
341
- constructor(environmentService, fileService, uriIdentityService, logService) {
342
- super();
343
- this.environmentService = environmentService;
344
- this.fileService = fileService;
345
- this.uriIdentityService = uriIdentityService;
346
- this.logService = logService;
347
- this.enabled = false;
348
- this.defaultProfileShouldIncludeExtensionsResourceAlways = false;
349
- this._onDidChangeProfiles = this._register(( (new Emitter())));
350
- this.onDidChangeProfiles = this._onDidChangeProfiles.event;
351
- this._onWillCreateProfile = this._register(( (new Emitter())));
352
- this.onWillCreateProfile = this._onWillCreateProfile.event;
353
- this._onWillRemoveProfile = this._register(( (new Emitter())));
354
- this.onWillRemoveProfile = this._onWillRemoveProfile.event;
355
- this.profilesHome = joinPath(this.environmentService.userRoamingDataHome, 'profiles');
356
- }
357
- get defaultProfile() { return this.profiles[0]; }
358
- get profiles() { return this.profilesObject.profiles; }
359
- setEnablement(enabled) {
360
- if (this.enabled !== enabled) {
361
- this._profilesObject = undefined;
362
- this.enabled = enabled;
363
- }
364
- }
365
- get profilesObject() {
366
- if (!this._profilesObject) {
367
- const profiles = this.enabled ? this.getStoredProfiles().map(storedProfile => toUserDataProfile(storedProfile.name, storedProfile.location, storedProfile.useDefaultFlags)) : [];
368
- let emptyWindow;
369
- const workspaces = ( (new ResourceMap()));
370
- if (profiles.length) {
371
- const profileAssicaitions = this.getStoredProfileAssociations();
372
- if (profileAssicaitions.workspaces) {
373
- for (const [workspacePath, profilePath] of Object.entries(profileAssicaitions.workspaces)) {
374
- const workspace = ( (URI.parse(workspacePath)));
375
- const profileLocation = ( (URI.parse(profilePath)));
376
- const profile = profiles.find(p => this.uriIdentityService.extUri.isEqual(p.location, profileLocation));
377
- if (profile) {
378
- workspaces.set(workspace, profile);
379
- }
380
- }
381
- }
382
- if (profileAssicaitions.emptyWindow) {
383
- const emptyWindowProfileLocation = ( (URI.parse(profileAssicaitions.emptyWindow)));
384
- emptyWindow = profiles.find(p => this.uriIdentityService.extUri.isEqual(p.location, emptyWindowProfileLocation));
385
- }
386
- }
387
- const profile = toUserDataProfile(( (localize('defaultProfile', "Default"))), this.environmentService.userRoamingDataHome);
388
- profiles.unshift({ ...profile, isDefault: true, extensionsResource: this.defaultProfileShouldIncludeExtensionsResourceAlways || profiles.length > 0 ? profile.extensionsResource : undefined });
389
- this._profilesObject = { profiles, workspaces, emptyWindow };
390
- }
391
- return this._profilesObject;
392
- }
393
- getProfile(workspaceIdentifier) {
394
- const workspace = this.getWorkspace(workspaceIdentifier);
395
- const profile = URI.isUri(workspace) ? this.profilesObject.workspaces.get(workspace) : this.profilesObject.emptyWindow;
396
- return profile ?? this.defaultProfile;
397
- }
398
- getWorkspace(workspaceIdentifier) {
399
- if (isSingleFolderWorkspaceIdentifier(workspaceIdentifier)) {
400
- return workspaceIdentifier.uri;
401
- }
402
- if (isWorkspaceIdentifier(workspaceIdentifier)) {
403
- return workspaceIdentifier.configPath;
404
- }
405
- return 'empty-window';
406
- }
407
- async createProfile(name, useDefaultFlags, workspaceIdentifier) {
408
- if (!this.enabled) {
409
- throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
410
- }
411
- if (this.getStoredProfiles().some(p => p.name === name)) {
412
- throw new Error(`Profile with name ${name} already exists`);
413
- }
414
- const profile = toUserDataProfile(name, joinPath(this.profilesHome, ( (hash(generateUuid()).toString(16)))), useDefaultFlags);
415
- await this.fileService.createFolder(profile.location);
416
- const joiners = [];
417
- this._onWillCreateProfile.fire({
418
- profile,
419
- join(promise) {
420
- joiners.push(promise);
421
- }
422
- });
423
- await Promises.settled(joiners);
424
- this.updateProfiles([profile], [], []);
425
- if (workspaceIdentifier) {
426
- await this.setProfileForWorkspace(profile, workspaceIdentifier);
427
- }
428
- return profile;
429
- }
430
- async updateProfile(profileToUpdate, name, useDefaultFlags) {
431
- if (!this.enabled) {
432
- throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
433
- }
434
- let profile = this.profiles.find(p => p.id === profileToUpdate.id);
435
- if (!profile) {
436
- throw new Error(`Profile '${profileToUpdate.name}' does not exist`);
437
- }
438
- profile = toUserDataProfile(name, profile.location, useDefaultFlags);
439
- this.updateProfiles([], [], [profile]);
440
- return profile;
441
- }
442
- async setProfileForWorkspace(profileToSet, workspaceIdentifier) {
443
- if (!this.enabled) {
444
- throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
445
- }
446
- const profile = this.profiles.find(p => p.id === profileToSet.id);
447
- if (!profile) {
448
- throw new Error(`Profile '${profileToSet.name}' does not exist`);
449
- }
450
- this.updateWorkspaceAssociation(workspaceIdentifier, profile);
451
- }
452
- async unsetWorkspace(workspaceIdentifier) {
453
- if (!this.enabled) {
454
- throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
455
- }
456
- this.updateWorkspaceAssociation(workspaceIdentifier);
457
- }
458
- async removeProfile(profileToRemove) {
459
- if (!this.enabled) {
460
- throw new Error(`Settings Profiles are disabled. Enable them via the '${PROFILES_ENABLEMENT_CONFIG}' setting.`);
461
- }
462
- if (profileToRemove.isDefault) {
463
- throw new Error('Cannot remove default profile');
464
- }
465
- const profile = this.profiles.find(p => p.id === profileToRemove.id);
466
- if (!profile) {
467
- throw new Error(`Profile '${profileToRemove.name}' does not exist`);
468
- }
469
- const joiners = [];
470
- this._onWillRemoveProfile.fire({
471
- profile,
472
- join(promise) {
473
- joiners.push(promise);
474
- }
475
- });
476
- await Promises.settled(joiners);
477
- if (profile.id === this.profilesObject.emptyWindow?.id) {
478
- this.profilesObject.emptyWindow = undefined;
479
- }
480
- for (const workspace of [...( (this.profilesObject.workspaces.keys()))]) {
481
- if (profile.id === this.profilesObject.workspaces.get(workspace)?.id) {
482
- this.profilesObject.workspaces.delete(workspace);
483
- }
484
- }
485
- this.updateStoredProfileAssociations();
486
- this.updateProfiles([], [profile], []);
487
- try {
488
- if (this.profiles.length === 1) {
489
- await this.fileService.del(this.profilesHome, { recursive: true });
490
- }
491
- else {
492
- await this.fileService.del(profile.location, { recursive: true });
493
- }
494
- }
495
- catch (error) {
496
- this.logService.error(error);
497
- }
498
- }
499
- updateProfiles(added, removed, updated) {
500
- const storedProfiles = [];
501
- for (let profile of [...this.profilesObject.profiles, ...added]) {
502
- if (profile.isDefault) {
503
- continue;
504
- }
505
- if (removed.some(p => profile.id === p.id)) {
506
- continue;
507
- }
508
- profile = updated.find(p => profile.id === p.id) ?? profile;
509
- storedProfiles.push({ location: profile.location, name: profile.name, useDefaultFlags: profile.useDefaultFlags });
510
- }
511
- this.saveStoredProfiles(storedProfiles);
512
- this._profilesObject = undefined;
513
- this.triggerProfilesChanges(added, removed, updated);
514
- }
515
- triggerProfilesChanges(added, removed, updated) {
516
- this._onDidChangeProfiles.fire({ added, removed, updated, all: this.profiles });
517
- }
518
- updateWorkspaceAssociation(workspaceIdentifier, newProfile) {
519
- const workspace = this.getWorkspace(workspaceIdentifier);
520
- if (URI.isUri(workspace)) {
521
- this.profilesObject.workspaces.delete(workspace);
522
- if (newProfile && !newProfile.isDefault) {
523
- this.profilesObject.workspaces.set(workspace, newProfile);
524
- }
525
- }
526
- else {
527
- this.profilesObject.emptyWindow = !newProfile?.isDefault ? newProfile : undefined;
528
- }
529
- this.updateStoredProfileAssociations();
530
- }
531
- updateStoredProfileAssociations() {
532
- const workspaces = {};
533
- for (const [workspace, profile] of this.profilesObject.workspaces.entries()) {
534
- workspaces[( (workspace.toString()))] = ( (profile.location.toString()));
535
- }
536
- const emptyWindow = this.profilesObject.emptyWindow?.location.toString();
537
- this.saveStoredProfileAssociations({ workspaces, emptyWindow });
538
- this._profilesObject = undefined;
539
- }
540
- getStoredProfiles() { return []; }
541
- saveStoredProfiles(storedProfiles) { throw new Error('not implemented'); }
542
- getStoredProfileAssociations() { return {}; }
543
- saveStoredProfileAssociations(storedProfileAssociations) { throw new Error('not implemented'); }
544
- };
545
- UserDataProfilesService.PROFILES_KEY = 'userDataProfiles';
546
- UserDataProfilesService.PROFILE_ASSOCIATIONS_KEY = 'profileAssociations';
547
- UserDataProfilesService = ( (__decorate([
548
- ( (__param(0, IEnvironmentService))),
549
- ( (__param(1, IFileService))),
550
- ( (__param(2, IUriIdentityService))),
551
- ( (__param(3, ILogService)))
552
- ], UserDataProfilesService)));
553
318
  const IPolicyService = ( (createDecorator('policy')));
554
319
  class NullPolicyService {
555
320
  constructor() {
@@ -2063,4 +1828,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
2063
1828
  this.getSnippetsSync = unsupported;
2064
1829
  }
2065
1830
  });
2066
- export { Barrier as B, ExtensionsRegistry as E, IExtensionService as I, NullPolicyService as N, ResourceQueue as R, Sequencer as S, IntervalCounter as a, ILifecycleService as b, checkProposedApiEnabled as c, ILanguageDetectionService as d, IUserDataProfilesService as e, IPolicyService as f, format2 as g, getServiceMachineId as h, isProposedApiEnabled as i, ExtensionMessageCollector as j, IPreferencesService as k, IUserDataProfileService as l, IKeyboardLayoutService as m, ITextMateService as n, IBrowserWorkbenchEnvironmentService as o, IHostColorSchemeService as p, IUserDataInitializationService as q, raceCancellationError as r, unsupported as u };
1831
+ export { Barrier as B, ExtensionsRegistry as E, IExtensionService as I, NullPolicyService as N, ResourceQueue as R, Sequencer as S, IntervalCounter as a, ILifecycleService as b, checkProposedApiEnabled as c, ILanguageDetectionService as d, IPolicyService as e, format2 as f, getServiceMachineId as g, ExtensionMessageCollector as h, isProposedApiEnabled as i, IPreferencesService as j, IUserDataProfileService as k, IKeyboardLayoutService as l, ITextMateService as m, IBrowserWorkbenchEnvironmentService as n, IHostColorSchemeService as o, IUserDataInitializationService as p, raceCancellationError as r, unsupported as u };
@@ -1,5 +1,5 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
2
- import { E as Emitter } from './polyfill.js';
1
+ import { _ as __decorate, a as __param, E as Emitter } from './workspace.js';
2
+ import './polyfill.js';
3
3
  import { d as ILanguageDetectionService, u as unsupported } from './missing-services.js';
4
4
  import { MutableDisposable, Disposable, ImmortalReference, dispose, toDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
5
5
  import { w as withUndefinedAsNull } from './types.js';
@@ -9,7 +9,7 @@ import { localize } from 'monaco-editor/esm/vs/nls.js';
9
9
  import { IModelService } from 'monaco-editor/esm/vs/editor/common/services/model.js';
10
10
  import { ILanguageService } from 'monaco-editor/esm/vs/editor/common/languages/language.js';
11
11
  import { IAccessibilityService } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js';
12
- import { I as IEditorService, e as SIDE_GROUP, A as ACTIVE_GROUP, i as IFileService, f as IUriIdentityService, s as isPreferredGroup, h as ITextFileService } from './services2.js';
12
+ import { I as IEditorService, e as SIDE_GROUP, A as ACTIVE_GROUP, i as IFileService, f as IUriIdentityService, v as isPreferredGroup, h as ITextFileService } from './services2.js';
13
13
  import { MultiModelEditStackElement } from 'monaco-editor/esm/vs/editor/common/model/editStack.js';
14
14
  import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js';
15
15
  import { IUndoRedoService } from 'monaco-editor/esm/vs/platform/undoRedo/common/undoRedo.js';
package/dist/monaco.js CHANGED
@@ -1,5 +1,5 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
2
- export { C as ContextKeyExprType } from './contextkey.js';
1
+ import { _ as __decorate, a as __param } from './workspace.js';
2
+ export { C as ContextKeyExprType } from './workspace.js';
3
3
  import './polyfill.js';
4
4
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
5
5
  export { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
@@ -1,6 +1,6 @@
1
- import { E as Emitter } from './polyfill.js';
1
+ import './polyfill.js';
2
2
  import { a as IntervalCounter, b as ILifecycleService } from './missing-services.js';
3
- import { _ as __decorate, f as NotificationsFilter, a as __param, g as NeverShowAgainScope } from './contextkey.js';
3
+ import { _ as __decorate, E as Emitter, f as NotificationsFilter, a as __param, g as NeverShowAgainScope } from './workspace.js';
4
4
  import { n, B as ButtonBar, a as attachButtonStyler, g as getServiceOverride$1, b as attachProgressBarStyler, D as DialogHandlerContribution } from './layout.js';
5
5
  import { focusBorder, registerColor, textLinkForeground, editorErrorForeground, editorWarningForeground, editorInfoForeground, widgetShadow, contrastBorder, editorWidgetBackground, lighten, darken, editorWidgetForeground } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
6
6
  import { localize } from 'monaco-editor/esm/vs/nls.js';
package/dist/polyfill.js CHANGED
@@ -7,15 +7,14 @@ import { mixin, equals, deepClone, deepFreeze } from 'monaco-editor/esm/vs/base/
7
7
  import { RunOnceScheduler, timeout } from 'monaco-editor/esm/vs/base/common/async.js';
8
8
  import { show, hide, createStyleSheet } from 'monaco-editor/esm/vs/base/browser/dom.js';
9
9
  import { isNumber, isObject, isUndefinedOrNull } from 'monaco-editor/esm/vs/base/common/types.js';
10
- import { Color as Color$1 } from 'monaco-editor/esm/vs/base/common/color.js';
10
+ import { Color as Color$1, RGBA as RGBA$1 } from 'monaco-editor/esm/vs/base/common/color.js';
11
11
  import { LanguageService as LanguageService$1 } from 'monaco-editor/esm/vs/editor/common/services/languageService.js';
12
- import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
12
+ import { E as Emitter, W as WorkspaceFolder, R as RawContextKey, N as NoOpNotification$1, s as shuffle } from './workspace.js';
13
13
  import { LanguagesRegistry as LanguagesRegistry$1 } from 'monaco-editor/esm/vs/editor/common/services/languagesRegistry.js';
14
14
  import { firstOrDefault, distinct, equals as equals$1, binarySearch, range } from 'monaco-editor/esm/vs/base/common/arrays.js';
15
15
  import { PLAINTEXT_LANGUAGE_ID, ModesRegistry } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
16
16
  import { TokenizationRegistry } from 'monaco-editor/esm/vs/editor/common/languages.js';
17
17
  import { NoOpNotification } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
18
- import { R as RawContextKey, N as NoOpNotification$1, s as shuffle } from './contextkey.js';
19
18
  import { StandaloneConfigurationService as StandaloneConfigurationService$1 } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
20
19
  import { Configuration as Configuration$1, ConfigurationModel as ConfigurationModel$1, ConfigurationChangeEvent } from 'monaco-editor/esm/vs/platform/configuration/common/configurationModels.js';
21
20
  import { DefaultConfigurationModel } from 'monaco-editor/esm/vs/platform/configuration/common/configurations.js';
@@ -29,7 +28,6 @@ import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform
29
28
  import { RawContextKey as RawContextKey$1 } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
30
29
  import { clearPlatformLanguageAssociations, registerPlatformLanguageAssociation, getLanguageIds } from 'monaco-editor/esm/vs/editor/common/services/languagesAssociations.js';
31
30
  import { WorkspaceFolder as WorkspaceFolder$1 } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
32
- import { joinPath } from 'monaco-editor/esm/vs/base/common/resources.js';
33
31
  import { List as List$1 } from 'monaco-editor/esm/vs/base/browser/ui/list/listWidget.js';
34
32
  import { ListView } from 'monaco-editor/esm/vs/base/browser/ui/list/listView.js';
35
33
  import { CombinedSpliceable } from 'monaco-editor/esm/vs/base/browser/ui/list/splice.js';
@@ -633,7 +631,6 @@ async function bufferedStreamToBuffer(bufferedStream) {
633
631
  function newWriteableBufferStream(options) {
634
632
  return newWriteableStream(chunks => VSBuffer.concat(chunks), options);
635
633
  }
636
- const Emitter = monaco.Emitter;
637
634
  const Extensions$1 = {
638
635
  ThemingContribution: 'base.contributions.theming'
639
636
  };
@@ -3072,25 +3069,6 @@ function compareConfigurationContents(to, from) {
3072
3069
  }
3073
3070
  return { added, removed, updated };
3074
3071
  }
3075
- function isWorkspaceIdentifier(obj) {
3076
- const workspaceIdentifier = obj;
3077
- return typeof workspaceIdentifier?.id === 'string' && URI.isUri(workspaceIdentifier.configPath);
3078
- }
3079
- class WorkspaceFolder {
3080
- constructor(data,
3081
- raw) {
3082
- this.raw = raw;
3083
- this.uri = data.uri;
3084
- this.index = data.index;
3085
- this.name = data.name;
3086
- }
3087
- toResource(relativePath) {
3088
- return joinPath(this.uri, relativePath);
3089
- }
3090
- toJSON() {
3091
- return { uri: this.uri, name: this.name, index: this.index };
3092
- }
3093
- }
3094
3072
  function now() {
3095
3073
  return ( (new Date())).toISOString();
3096
3074
  }
@@ -5476,15 +5454,17 @@ for (const key of Object.getOwnPropertyNames(VSBuffer)) {
5476
5454
  polyfillPrototype(VSBuffer$1.prototype, VSBuffer.prototype, toMonacoVSBuffer, toVSCodeVSBuffer);
5477
5455
  function toMonacoColor(value) {
5478
5456
  if (value instanceof Color) {
5479
- return new Color$1(value.rgba);
5457
+ const rgba = value.rgba;
5458
+ return new Color$1(new RGBA$1(rgba.r, rgba.g, rgba.g, rgba.a));
5480
5459
  }
5481
5460
  return value;
5482
5461
  }
5483
5462
  function toVSCodeColor(value) {
5484
5463
  if (value instanceof Color$1) {
5485
- return new Color(value.rgba);
5464
+ const rgba = value.rgba;
5465
+ return new Color(new RGBA(rgba.r, rgba.g, rgba.g, rgba.a));
5486
5466
  }
5487
5467
  return value;
5488
5468
  }
5489
5469
  polyfillPrototype(Color$1.prototype, Color.prototype, toMonacoColor, toVSCodeColor);
5490
- export { ConsoleMainLogger as C, Emitter as E, NotImplementedError as N, ResourceSet as R, UserSettings as U, isReadableStream as a, peekReadable as b, bufferToReadable as c, disposed as d, consumeStream as e, isReadableBufferedStream as f, bufferedStreamToBuffer as g, readableToBuffer as h, isWorkspaceIdentifier as i, newWriteableStream as j, parse as k, listenStream as l, getNodeType as m, newWriteableBufferStream as n, peekStream as p, readonly as r, streamToBuffer as s, transform as t };
5470
+ export { ConsoleMainLogger as C, NotImplementedError as N, ResourceSet as R, UserSettings as U, peekReadable as a, bufferToReadable as b, consumeStream as c, disposed as d, isReadableBufferedStream as e, bufferedStreamToBuffer as f, readableToBuffer as g, newWriteableStream as h, isReadableStream as i, parse as j, getNodeType as k, listenStream as l, newWriteableBufferStream as n, peekStream as p, readonly as r, streamToBuffer as s, transform as t };