@codingame/monaco-vscode-api 1.69.4 → 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.
package/dist/services.js CHANGED
@@ -1,5 +1,5 @@
1
- export { f as IEditorGroupsService, c as IEditorService, I as IFileService, l as IHostService, k as ILanguageStatusService, d as IPaneCompositePartService, i as IPathService, j as IProductService, m as ISnippetsService, e as ITextFileService, b as IUriIdentityService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, w as NotificationsFilter, S as Services } from './services2.js';
2
- export { C as ContextKeyExprType } from './contextkey.js';
1
+ export { f as IEditorGroupsService, c as IEditorService, I as IFileService, l as IHostService, k as ILanguageStatusService, d as IPaneCompositePartService, i as IPathService, j as IProductService, m as ISnippetsService, e as ITextFileService, b as IUriIdentityService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, S as Services } from './services2.js';
2
+ export { C as ContextKeyExprType, f as NotificationsFilter } from './contextkey.js';
3
3
  export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
4
4
  export { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
5
5
  export { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
package/dist/services2.js CHANGED
@@ -3,137 +3,10 @@ import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/c
3
3
  import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
4
4
  import { localize } from 'monaco-editor/esm/vs/nls.js';
5
5
  import { TernarySearchTree } from 'monaco-editor/esm/vs/base/common/map.js';
6
- import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
7
6
  function refineServiceDecorator(serviceIdentifier) {
8
7
  return serviceIdentifier;
9
8
  }
10
9
  const CancellationTokenSource = monaco.CancellationTokenSource;
11
- function sortedDiff(before, after, compare) {
12
- const result = [];
13
- function pushSplice(start, deleteCount, toInsert) {
14
- if (deleteCount === 0 && toInsert.length === 0) {
15
- return;
16
- }
17
- const latest = result[result.length - 1];
18
- if (latest && latest.start + latest.deleteCount === start) {
19
- latest.deleteCount += deleteCount;
20
- latest.toInsert.push(...toInsert);
21
- }
22
- else {
23
- result.push({ start, deleteCount, toInsert });
24
- }
25
- }
26
- let beforeIdx = 0;
27
- let afterIdx = 0;
28
- while (true) {
29
- if (beforeIdx === before.length) {
30
- pushSplice(beforeIdx, 0, after.slice(afterIdx));
31
- break;
32
- }
33
- if (afterIdx === after.length) {
34
- pushSplice(beforeIdx, before.length - beforeIdx, []);
35
- break;
36
- }
37
- const beforeElement = before[beforeIdx];
38
- const afterElement = after[afterIdx];
39
- const n = compare(beforeElement, afterElement);
40
- if (n === 0) {
41
- beforeIdx += 1;
42
- afterIdx += 1;
43
- }
44
- else if (n < 0) {
45
- pushSplice(beforeIdx, 1, []);
46
- beforeIdx += 1;
47
- }
48
- else if (n > 0) {
49
- pushSplice(beforeIdx, 0, [afterElement]);
50
- afterIdx += 1;
51
- }
52
- }
53
- return result;
54
- }
55
- function delta(before, after, compare) {
56
- const splices = sortedDiff(before, after, compare);
57
- const removed = [];
58
- const added = [];
59
- for (const splice of splices) {
60
- removed.push(...before.slice(splice.start, splice.start + splice.deleteCount));
61
- added.push(...splice.toInsert);
62
- }
63
- return { removed, added };
64
- }
65
- function coalesceInPlace(array) {
66
- let to = 0;
67
- for (let i = 0; i < array.length; i++) {
68
- if (!!array[i]) {
69
- array[to] = array[i];
70
- to += 1;
71
- }
72
- }
73
- array.length = to;
74
- }
75
- function flatten(arr) {
76
- return [].concat(...arr);
77
- }
78
- function index(array, indexer, mapper) {
79
- return array.reduce((r, t) => {
80
- r[indexer(t)] = mapper ? mapper(t) : t;
81
- return r;
82
- }, Object.create(null));
83
- }
84
- function shuffle(array, _seed) {
85
- let rand;
86
- if (typeof _seed === 'number') {
87
- let seed = _seed;
88
- rand = () => {
89
- const x = Math.sin(seed++) * 179426549;
90
- return x - Math.floor(x);
91
- };
92
- }
93
- else {
94
- rand = Math.random;
95
- }
96
- for (let i = array.length - 1; i > 0; i -= 1) {
97
- const j = Math.floor(rand() * (i + 1));
98
- const temp = array[i];
99
- array[i] = array[j];
100
- array[j] = temp;
101
- }
102
- }
103
- function mapArrayOrNot(items, fn) {
104
- return Array.isArray(items) ?
105
- items.map(fn) :
106
- fn(items);
107
- }
108
- var NeverShowAgainScope;
109
- ( ((function(NeverShowAgainScope) {
110
- NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE";
111
- NeverShowAgainScope[NeverShowAgainScope["PROFILE"] = 1] = "PROFILE";
112
- NeverShowAgainScope[NeverShowAgainScope["APPLICATION"] = 2] = "APPLICATION";
113
- })(NeverShowAgainScope || (NeverShowAgainScope = {}))));
114
- var NotificationsFilter;
115
- ( ((function(NotificationsFilter) {
116
- NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF";
117
- NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT";
118
- NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR";
119
- })(NotificationsFilter || (NotificationsFilter = {}))));
120
- class NoOpNotification {
121
- constructor() {
122
- this.progress = ( (new NoOpProgress()));
123
- this.onDidClose = Event.None;
124
- this.onDidChangeVisibility = Event.None;
125
- }
126
- updateSeverity(severity) { }
127
- updateMessage(message) { }
128
- updateActions(actions) { }
129
- close() { }
130
- }
131
- class NoOpProgress {
132
- infinite() { }
133
- done() { }
134
- total(value) { }
135
- worked(value) { }
136
- }
137
10
  const IFileService = ( (createDecorator('fileService')));
138
11
  var FileType;
139
12
  ( ((function(FileType) {
@@ -420,4 +293,4 @@ var Services;
420
293
  }
421
294
  Services.install = install;
422
295
  })(Services || (Services = {})));
423
- export { ACTIVE_GROUP as A, FileChangesEvent as B, CancellationTokenSource as C, FileOperationError as D, hasOpenReadWriteCloseCapability as E, FileType as F, hasReadWriteCapability as G, hasFileReadStreamCapability as H, IFileService as I, toFileSystemProviderErrorCode as J, ensureFileSystemProviderError as K, etag as L, FileOperationEvent as M, NoOpNotification as N, toFileOperationResult as O, ETAG_DISABLED as P, hasFileAtomicReadCapability as Q, NotModifiedSinceFileOperationError as R, Services as S, hasFileFolderCopyCapability as T, hasFileCloneCapability as U, createFileSystemProviderError as V, index as W, flatten as X, FILES_ASSOCIATIONS_CONFIG as Y, FilePermission as a, IUriIdentityService as b, IEditorService as c, IPaneCompositePartService as d, ITextFileService as e, IEditorGroupsService as f, IWorkbenchEnvironmentService as g, IWorkingCopyFileService as h, IPathService as i, IProductService as j, ILanguageStatusService as k, IHostService as l, ISnippetsService as m, coalesceInPlace as n, markAsFileSystemProviderError as o, productSchemaId as p, FileSystemProviderErrorCode as q, refineServiceDecorator as r, shuffle as s, mapArrayOrNot as t, SIDE_GROUP as u, delta as v, NotificationsFilter as w, NeverShowAgainScope as x, isPreferredGroup as y, FileSystemProviderError as z };
296
+ export { ACTIVE_GROUP as A, ensureFileSystemProviderError as B, CancellationTokenSource as C, etag as D, FileOperationEvent as E, FileType as F, toFileOperationResult as G, ETAG_DISABLED as H, IFileService as I, hasFileAtomicReadCapability as J, hasFileFolderCopyCapability as K, hasFileCloneCapability as L, createFileSystemProviderError as M, NotModifiedSinceFileOperationError as N, FILES_ASSOCIATIONS_CONFIG as O, Services as S, FilePermission as a, IUriIdentityService as b, IEditorService as c, IPaneCompositePartService as d, ITextFileService as e, IEditorGroupsService as f, IWorkbenchEnvironmentService as g, IWorkingCopyFileService as h, IPathService as i, IProductService as j, ILanguageStatusService as k, IHostService as l, ISnippetsService as m, markAsFileSystemProviderError as n, FileSystemProviderErrorCode as o, productSchemaId as p, SIDE_GROUP as q, refineServiceDecorator as r, isPreferredGroup as s, FileSystemProviderError as t, FileChangesEvent as u, FileOperationError as v, hasOpenReadWriteCloseCapability as w, hasReadWriteCapability as x, hasFileReadStreamCapability as y, toFileSystemProviderErrorCode as z };
package/dist/snippets.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as IUserDataProfileService, e as ILifecycleService, O as ExtensionMessageCollector, i as isStringArray, P as parse, S as getNodeType, h as ExtensionsRegistry } from './missing-services.js';
1
+ import { F as IUserDataProfileService, b as ILifecycleService, J as ExtensionMessageCollector, K as parse, M as getNodeType, f as ExtensionsRegistry } from './missing-services.js';
2
2
  import { m as ISnippetsService, I as IFileService, e as ITextFileService, S as Services } from './services2.js';
3
3
  import { _ as __decorate, a as __param } from './contextkey.js';
4
4
  import * as monacoSuggest from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
@@ -22,6 +22,7 @@ import { ILanguageConfigurationService } from 'monaco-editor/esm/vs/editor/commo
22
22
  import { MarkdownString } from 'monaco-editor/esm/vs/base/common/htmlContent.js';
23
23
  import { StopWatch } from 'monaco-editor/esm/vs/base/common/stopwatch.js';
24
24
  import { I as IExtensionResourceLoaderService, r as registerExtensionFile } from './files.js';
25
+ import { i as isStringArray } from './types.js';
25
26
  import { DisposableStore, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
26
27
  import { ResourceMap } from 'monaco-editor/esm/vs/base/common/map.js';
27
28
  import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
package/dist/textmate.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { _ as __decorate, a as __param } from './contextkey.js';
2
- import { h as ExtensionsRegistry, O as ExtensionMessageCollector, Q as ITextMateService, E as Emitter } from './missing-services.js';
3
- export { Q as ITextMateService } from './missing-services.js';
2
+ import { f as ExtensionsRegistry, J as ExtensionMessageCollector, L as ITextMateService, E as Emitter } from './missing-services.js';
3
+ export { L as ITextMateService } from './missing-services.js';
4
4
  import { l as languagesExtPoint } from './languageService.js';
5
5
  import { localize } from 'monaco-editor/esm/vs/nls.js';
6
6
  import { I as IWorkbenchThemeService } from './workbenchThemeService.js';
package/dist/theme.js CHANGED
@@ -1,4 +1,4 @@
1
- import { I as IExtensionService, T as IBrowserWorkbenchEnvironmentService, V as IHostColorSchemeService, W as IUserDataInitializationService, h as ExtensionsRegistry, E as Emitter, X as Sequencer, O as ExtensionMessageCollector, P as parse$1, S as getNodeType } from './missing-services.js';
1
+ import { I as IExtensionService, O as IBrowserWorkbenchEnvironmentService, P as IHostColorSchemeService, Q as IUserDataInitializationService, f as ExtensionsRegistry, E as Emitter, S as Sequencer, J as ExtensionMessageCollector, K as parse$1, M as getNodeType } from './missing-services.js';
2
2
  import { _ as __decorate, a as __param } from './contextkey.js';
3
3
  import { V as VS_DARK_THEME, a as VS_LIGHT_THEME, b as VS_HC_THEME, c as VS_HC_LIGHT_THEME, T as ThemeSettings, E as ExtensionData, d as THEME_SCOPE_OPEN_PAREN, e as THEME_SCOPE_CLOSE_PAREN, f as THEME_SCOPE_WILDCARD, t as themeScopeRegex } from './workbenchThemeService.js';
4
4
  import { workbenchColorsSchemaId, editorBackground, editorForeground, editorSelectionBackground, editorInactiveSelection, editorSelectionHighlight, editorFindMatchHighlight, editorFindMatch, editorHoverHighlight, editorFindRangeHighlight, asCssVariableName, Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
@@ -1,4 +1,4 @@
1
- import { h as ExtensionsRegistry, O as ExtensionMessageCollector } from './missing-services.js';
1
+ import { f as ExtensionsRegistry, J as ExtensionMessageCollector } from './missing-services.js';
2
2
  import { g as getTokenClassificationRegistry, a as typeAndModifierIdPattern } from './tokenClassificationRegistry.js';
3
3
  import { localize } from 'monaco-editor/esm/vs/nls.js';
4
4
  import { g as getExtensionPoint, c as consoleExtensionMessageHandler, o as onServicesInitialized } from './tools.js';
package/dist/tools.js CHANGED
@@ -1,4 +1,4 @@
1
- import { h as ExtensionsRegistry } from './missing-services.js';
1
+ import { f as ExtensionsRegistry } from './missing-services.js';
2
2
  import { EventEmitter } from 'vscode';
3
3
  import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
4
4
  import Severity from 'monaco-editor/esm/vs/base/common/severity.js';
package/dist/types.js ADDED
@@ -0,0 +1,46 @@
1
+ function isString(str) {
2
+ return (typeof str === 'string');
3
+ }
4
+ function isStringArray(value) {
5
+ return Array.isArray(value) && value.every(elem => isString(elem));
6
+ }
7
+ function isObject(obj) {
8
+ return typeof obj === 'object'
9
+ && obj !== null
10
+ && !Array.isArray(obj)
11
+ && !(obj instanceof RegExp)
12
+ && !(obj instanceof Date);
13
+ }
14
+ function isUndefined(obj) {
15
+ return (typeof obj === 'undefined');
16
+ }
17
+ function isUndefinedOrNull(obj) {
18
+ return (isUndefined(obj) || obj === null);
19
+ }
20
+ function assertAllDefined(...args) {
21
+ const result = [];
22
+ for (let i = 0; i < args.length; i++) {
23
+ const arg = args[i];
24
+ if (isUndefinedOrNull(arg)) {
25
+ throw new Error(`Assertion Failed: argument at index ${i} is undefined or null`);
26
+ }
27
+ result.push(arg);
28
+ }
29
+ return result;
30
+ }
31
+ const hasOwnProperty = Object.prototype.hasOwnProperty;
32
+ function isEmptyObject(obj) {
33
+ if (!isObject(obj)) {
34
+ return false;
35
+ }
36
+ for (const key in obj) {
37
+ if (hasOwnProperty.call(obj, key)) {
38
+ return false;
39
+ }
40
+ }
41
+ return true;
42
+ }
43
+ function withUndefinedAsNull(x) {
44
+ return typeof x === 'undefined' ? null : x;
45
+ }
46
+ export { assertAllDefined as a, isEmptyObject as b, isStringArray as i, withUndefinedAsNull as w };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-vscode-api",
3
- "version": "1.69.4",
3
+ "version": "1.69.7",
4
4
  "private": false,
5
5
  "description": "VSCode public API plugged on the monaco editor",
6
6
  "keywords": [],
@@ -28,6 +28,14 @@
28
28
  "types": "./dist/messages.d.ts",
29
29
  "default": "./dist/messages.js"
30
30
  },
31
+ "./service-override/notifications": {
32
+ "types": "./dist/notifications.d.ts",
33
+ "default": "./dist/notifications.js"
34
+ },
35
+ "./service-override/dialogs": {
36
+ "types": "./dist/dialogs.d.ts",
37
+ "default": "./dist/dialogs.js"
38
+ },
31
39
  "./service-override/modelEditor": {
32
40
  "types": "./dist/modelEditor.d.ts",
33
41
  "default": "./dist/modelEditor.js"
@@ -77,6 +85,12 @@
77
85
  "service-override/messages": [
78
86
  "./dist/messages.d.ts"
79
87
  ],
88
+ "service-override/notifications": [
89
+ "./dist/notifications.d.ts"
90
+ ],
91
+ "service-override/dialogs": [
92
+ "./dist/dialogs.d.ts"
93
+ ],
80
94
  "service-override/modelEditor": [
81
95
  "./dist/modelEditor.d.ts"
82
96
  ],