@codingame/monaco-vscode-api 1.69.6 → 1.69.7

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.
@@ -1,4 +1,131 @@
1
+ import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
1
2
  import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js';
3
+ function sortedDiff(before, after, compare) {
4
+ const result = [];
5
+ function pushSplice(start, deleteCount, toInsert) {
6
+ if (deleteCount === 0 && toInsert.length === 0) {
7
+ return;
8
+ }
9
+ const latest = result[result.length - 1];
10
+ if (latest && latest.start + latest.deleteCount === start) {
11
+ latest.deleteCount += deleteCount;
12
+ latest.toInsert.push(...toInsert);
13
+ }
14
+ else {
15
+ result.push({ start, deleteCount, toInsert });
16
+ }
17
+ }
18
+ let beforeIdx = 0;
19
+ let afterIdx = 0;
20
+ while (true) {
21
+ if (beforeIdx === before.length) {
22
+ pushSplice(beforeIdx, 0, after.slice(afterIdx));
23
+ break;
24
+ }
25
+ if (afterIdx === after.length) {
26
+ pushSplice(beforeIdx, before.length - beforeIdx, []);
27
+ break;
28
+ }
29
+ const beforeElement = before[beforeIdx];
30
+ const afterElement = after[afterIdx];
31
+ const n = compare(beforeElement, afterElement);
32
+ if (n === 0) {
33
+ beforeIdx += 1;
34
+ afterIdx += 1;
35
+ }
36
+ else if (n < 0) {
37
+ pushSplice(beforeIdx, 1, []);
38
+ beforeIdx += 1;
39
+ }
40
+ else if (n > 0) {
41
+ pushSplice(beforeIdx, 0, [afterElement]);
42
+ afterIdx += 1;
43
+ }
44
+ }
45
+ return result;
46
+ }
47
+ function delta(before, after, compare) {
48
+ const splices = sortedDiff(before, after, compare);
49
+ const removed = [];
50
+ const added = [];
51
+ for (const splice of splices) {
52
+ removed.push(...before.slice(splice.start, splice.start + splice.deleteCount));
53
+ added.push(...splice.toInsert);
54
+ }
55
+ return { removed, added };
56
+ }
57
+ function coalesceInPlace(array) {
58
+ let to = 0;
59
+ for (let i = 0; i < array.length; i++) {
60
+ if (!!array[i]) {
61
+ array[to] = array[i];
62
+ to += 1;
63
+ }
64
+ }
65
+ array.length = to;
66
+ }
67
+ function flatten(arr) {
68
+ return [].concat(...arr);
69
+ }
70
+ function index(array, indexer, mapper) {
71
+ return array.reduce((r, t) => {
72
+ r[indexer(t)] = mapper ? mapper(t) : t;
73
+ return r;
74
+ }, Object.create(null));
75
+ }
76
+ function shuffle(array, _seed) {
77
+ let rand;
78
+ if (typeof _seed === 'number') {
79
+ let seed = _seed;
80
+ rand = () => {
81
+ const x = Math.sin(seed++) * 179426549;
82
+ return x - Math.floor(x);
83
+ };
84
+ }
85
+ else {
86
+ rand = Math.random;
87
+ }
88
+ for (let i = array.length - 1; i > 0; i -= 1) {
89
+ const j = Math.floor(rand() * (i + 1));
90
+ const temp = array[i];
91
+ array[i] = array[j];
92
+ array[j] = temp;
93
+ }
94
+ }
95
+ function mapArrayOrNot(items, fn) {
96
+ return Array.isArray(items) ?
97
+ items.map(fn) :
98
+ fn(items);
99
+ }
100
+ var NeverShowAgainScope;
101
+ ( (function(NeverShowAgainScope) {
102
+ NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE";
103
+ NeverShowAgainScope[NeverShowAgainScope["PROFILE"] = 1] = "PROFILE";
104
+ NeverShowAgainScope[NeverShowAgainScope["APPLICATION"] = 2] = "APPLICATION";
105
+ })(NeverShowAgainScope || (NeverShowAgainScope = {})));
106
+ var NotificationsFilter;
107
+ ( (function(NotificationsFilter) {
108
+ NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF";
109
+ NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT";
110
+ NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR";
111
+ })(NotificationsFilter || (NotificationsFilter = {})));
112
+ class NoOpNotification {
113
+ constructor() {
114
+ this.progress = ( new NoOpProgress());
115
+ this.onDidClose = Event.None;
116
+ this.onDidChangeVisibility = Event.None;
117
+ }
118
+ updateSeverity(severity) { }
119
+ updateMessage(message) { }
120
+ updateActions(actions) { }
121
+ close() { }
122
+ }
123
+ class NoOpProgress {
124
+ infinite() { }
125
+ done() { }
126
+ total(value) { }
127
+ worked(value) { }
128
+ }
2
129
  function __decorate(decorators, target, key, desc) {
3
130
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
131
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -384,4 +511,4 @@ function cmp2(key1, value1, key2, value2) {
384
511
  }
385
512
  return 0;
386
513
  }
387
- export { ContextKeyExprType as C, RawContextKey as R, __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c };
514
+ export { ContextKeyExprType as C, NoOpNotification as N, RawContextKey as R, __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c, coalesceInPlace as d, delta as e, NotificationsFilter as f, NeverShowAgainScope as g, flatten as h, index as i, mapArrayOrNot as m, shuffle as s };
package/dist/extHost.js CHANGED
@@ -1,5 +1,5 @@
1
- import { b as __classPrivateFieldSet, c as __classPrivateFieldGet, _ as __decorate, a as __param } from './contextkey.js';
2
- import { n as coalesceInPlace, o as markAsFileSystemProviderError, q as FileSystemProviderErrorCode, j as IProductService, c as IEditorService, f as IEditorGroupsService, C as CancellationTokenSource, b as IUriIdentityService, d as IPaneCompositePartService, e as ITextFileService, I as IFileService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, k as ILanguageStatusService, l as IHostService, S as Services, t as mapArrayOrNot, A as ACTIVE_GROUP, u as SIDE_GROUP, v as delta$1 } from './services2.js';
1
+ import { b as __classPrivateFieldSet, c as __classPrivateFieldGet, _ as __decorate, d as coalesceInPlace, a as __param, m as mapArrayOrNot, e as delta$1 } from './contextkey.js';
2
+ import { n as markAsFileSystemProviderError, o as FileSystemProviderErrorCode, j as IProductService, c as IEditorService, f as IEditorGroupsService, C as CancellationTokenSource, b as IUriIdentityService, d as IPaneCompositePartService, e as ITextFileService, I as IFileService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, i as IPathService, k as ILanguageStatusService, l as IHostService, S as Services, A as ACTIVE_GROUP, q as SIDE_GROUP } 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';
5
5
  import { URI, uriToFsPath } from 'monaco-editor/esm/vs/base/common/uri.js';
package/dist/files.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as __decorate, a as __param } from './contextkey.js';
2
2
  import { l as format2, m as getServiceMachineId, E as Emitter, n as ResourceQueue, o as isReadableStream, p as peekStream, q as peekReadable, s as bufferToReadable, t as streamToBuffer, v as consumeStream, w as transform, x as isReadableBufferedStream, y as listenStream, z as bufferedStreamToBuffer, A as readableToBuffer, u as unsupported, C as newWriteableBufferStream, D as newWriteableStream } from './missing-services.js';
3
- import { I as IFileService, j as IProductService, S as Services, z as FileSystemProviderError, q as FileSystemProviderErrorCode, B as FileChangesEvent, D as FileOperationError, E as hasOpenReadWriteCloseCapability, G as hasReadWriteCapability, H as hasFileReadStreamCapability, J as toFileSystemProviderErrorCode, K as ensureFileSystemProviderError, F as FileType, a as FilePermission, L as etag, M as FileOperationEvent, O as toFileOperationResult, P as ETAG_DISABLED, Q as hasFileAtomicReadCapability, R as NotModifiedSinceFileOperationError, T as hasFileFolderCopyCapability, U as hasFileCloneCapability, V as createFileSystemProviderError, C as CancellationTokenSource } from './services2.js';
3
+ import { I as IFileService, j as IProductService, S as Services, t as FileSystemProviderError, o 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';
4
4
  import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js';
5
5
  import { canceled } from 'monaco-editor/esm/vs/base/common/errors.js';
6
6
  import { localize } from 'monaco-editor/esm/vs/nls.js';
@@ -1,9 +1,9 @@
1
- import { _ as __decorate, a as __param } from './contextkey.js';
1
+ import { _ as __decorate, a as __param, i as index, h as flatten } from './contextkey.js';
2
2
  import { i as isProposedApiEnabled, F as IUserDataProfileService, I as IExtensionService, G as IKeyboardLayoutService, H as IPreferencesService, f as ExtensionsRegistry, J as ExtensionMessageCollector, j as IUserDataProfilesService, E as Emitter, K as parse } from './missing-services.js';
3
3
  import { KeyCodeUtils, IMMUTABLE_CODE_TO_KEY_CODE } from 'monaco-editor/esm/vs/base/common/keyCodes.js';
4
4
  import { SimpleKeybinding, ScanCodeBinding, ChordKeybinding } from 'monaco-editor/esm/vs/base/common/keybindings.js';
5
5
  import { ContextKeyExpr, IContextKeyService } from 'monaco-editor/esm/vs/platform/contextkey/common/contextkey.js';
6
- import { l as IHostService, I as IFileService, c as IEditorService, f as IEditorGroupsService, W as index, S as Services, X as flatten } from './services2.js';
6
+ import { l as IHostService, I as IFileService, c as IEditorService, f as IEditorGroupsService, S as Services } from './services2.js';
7
7
  import { MenuRegistry, MenuId, MenuItemAction, IMenuService, isIMenuItem } from 'monaco-editor/esm/vs/platform/actions/common/actions.js';
8
8
  import { getConfiguredDefaultLocale, localize } from 'monaco-editor/esm/vs/nls.js';
9
9
  import { ThemeIcon } from 'monaco-editor/esm/vs/platform/theme/common/themeService.js';
@@ -1,6 +1,6 @@
1
1
  import { _ as __decorate, a as __param } from './contextkey.js';
2
2
  import { f as ExtensionsRegistry, I as IExtensionService } from './missing-services.js';
3
- import { Y as FILES_ASSOCIATIONS_CONFIG } from './services2.js';
3
+ import { O 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';