@codingame/monaco-vscode-api
Advanced tools
Comparing version 1.69.6 to 1.69.7
@@ -0,2 +1,129 @@ | ||
import { Event } from 'monaco-editor/esm/vs/base/common/event.js'; | ||
import { isMacintosh, isLinux, isWindows, isWeb, isEdge, isFirefox, isChrome, isSafari } from 'monaco-editor/esm/vs/base/common/platform.js'; | ||
function sortedDiff(before, after, compare) { | ||
const result = []; | ||
function pushSplice(start, deleteCount, toInsert) { | ||
if (deleteCount === 0 && toInsert.length === 0) { | ||
return; | ||
} | ||
const latest = result[result.length - 1]; | ||
if (latest && latest.start + latest.deleteCount === start) { | ||
latest.deleteCount += deleteCount; | ||
latest.toInsert.push(...toInsert); | ||
} | ||
else { | ||
result.push({ start, deleteCount, toInsert }); | ||
} | ||
} | ||
let beforeIdx = 0; | ||
let afterIdx = 0; | ||
while (true) { | ||
if (beforeIdx === before.length) { | ||
pushSplice(beforeIdx, 0, after.slice(afterIdx)); | ||
break; | ||
} | ||
if (afterIdx === after.length) { | ||
pushSplice(beforeIdx, before.length - beforeIdx, []); | ||
break; | ||
} | ||
const beforeElement = before[beforeIdx]; | ||
const afterElement = after[afterIdx]; | ||
const n = compare(beforeElement, afterElement); | ||
if (n === 0) { | ||
beforeIdx += 1; | ||
afterIdx += 1; | ||
} | ||
else if (n < 0) { | ||
pushSplice(beforeIdx, 1, []); | ||
beforeIdx += 1; | ||
} | ||
else if (n > 0) { | ||
pushSplice(beforeIdx, 0, [afterElement]); | ||
afterIdx += 1; | ||
} | ||
} | ||
return result; | ||
} | ||
function delta(before, after, compare) { | ||
const splices = sortedDiff(before, after, compare); | ||
const removed = []; | ||
const added = []; | ||
for (const splice of splices) { | ||
removed.push(...before.slice(splice.start, splice.start + splice.deleteCount)); | ||
added.push(...splice.toInsert); | ||
} | ||
return { removed, added }; | ||
} | ||
function coalesceInPlace(array) { | ||
let to = 0; | ||
for (let i = 0; i < array.length; i++) { | ||
if (!!array[i]) { | ||
array[to] = array[i]; | ||
to += 1; | ||
} | ||
} | ||
array.length = to; | ||
} | ||
function flatten(arr) { | ||
return [].concat(...arr); | ||
} | ||
function index(array, indexer, mapper) { | ||
return array.reduce((r, t) => { | ||
r[indexer(t)] = mapper ? mapper(t) : t; | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
function shuffle(array, _seed) { | ||
let rand; | ||
if (typeof _seed === 'number') { | ||
let seed = _seed; | ||
rand = () => { | ||
const x = Math.sin(seed++) * 179426549; | ||
return x - Math.floor(x); | ||
}; | ||
} | ||
else { | ||
rand = Math.random; | ||
} | ||
for (let i = array.length - 1; i > 0; i -= 1) { | ||
const j = Math.floor(rand() * (i + 1)); | ||
const temp = array[i]; | ||
array[i] = array[j]; | ||
array[j] = temp; | ||
} | ||
} | ||
function mapArrayOrNot(items, fn) { | ||
return Array.isArray(items) ? | ||
items.map(fn) : | ||
fn(items); | ||
} | ||
var NeverShowAgainScope; | ||
( (function(NeverShowAgainScope) { | ||
NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE"; | ||
NeverShowAgainScope[NeverShowAgainScope["PROFILE"] = 1] = "PROFILE"; | ||
NeverShowAgainScope[NeverShowAgainScope["APPLICATION"] = 2] = "APPLICATION"; | ||
})(NeverShowAgainScope || (NeverShowAgainScope = {}))); | ||
var NotificationsFilter; | ||
( (function(NotificationsFilter) { | ||
NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF"; | ||
NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT"; | ||
NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR"; | ||
})(NotificationsFilter || (NotificationsFilter = {}))); | ||
class NoOpNotification { | ||
constructor() { | ||
this.progress = ( new NoOpProgress()); | ||
this.onDidClose = Event.None; | ||
this.onDidChangeVisibility = Event.None; | ||
} | ||
updateSeverity(severity) { } | ||
updateMessage(message) { } | ||
updateActions(actions) { } | ||
close() { } | ||
} | ||
class NoOpProgress { | ||
infinite() { } | ||
done() { } | ||
total(value) { } | ||
worked(value) { } | ||
} | ||
function __decorate(decorators, target, key, desc) { | ||
@@ -387,2 +514,2 @@ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; | ||
} | ||
export { ContextKeyExprType as C, RawContextKey as R, __decorate as _, __param as a, __classPrivateFieldSet as b, __classPrivateFieldGet as c }; | ||
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 }; |
import { _ as __decorate, a as __param } from './contextkey.js'; | ||
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'; | ||
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'; | ||
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'; | ||
import { VSBuffer } from 'monaco-editor/esm/vs/base/common/buffer.js'; | ||
@@ -5,0 +5,0 @@ import { canceled } from 'monaco-editor/esm/vs/base/common/errors.js'; |
import { _ as __decorate, a as __param } from './contextkey.js'; | ||
import { f as ExtensionsRegistry, I as IExtensionService } from './missing-services.js'; | ||
import { Y as FILES_ASSOCIATIONS_CONFIG } from './services2.js'; | ||
import { O as FILES_ASSOCIATIONS_CONFIG } from './services2.js'; | ||
import { parse } from 'monaco-editor/esm/vs/base/common/glob.js'; | ||
@@ -5,0 +5,0 @@ import { posix } from 'monaco-editor/esm/vs/base/common/path.js'; |
@@ -11,3 +11,3 @@ import { _ as __decorate, a as __param } from './contextkey.js'; | ||
import { IAccessibilityService } from 'monaco-editor/esm/vs/platform/accessibility/common/accessibility.js'; | ||
import { e as ITextFileService, I as IFileService, b as IUriIdentityService, c as IEditorService, u as SIDE_GROUP, A as ACTIVE_GROUP, y as isPreferredGroup } from './services2.js'; | ||
import { e as ITextFileService, I as IFileService, b as IUriIdentityService, c as IEditorService, q as SIDE_GROUP, A as ACTIVE_GROUP, s as isPreferredGroup } from './services2.js'; | ||
import { MultiModelEditStackElement } from 'monaco-editor/esm/vs/editor/common/model/editStack.js'; | ||
@@ -14,0 +14,0 @@ import { ITextModelService } from 'monaco-editor/esm/vs/editor/common/services/resolverService.js'; |
@@ -1,3 +0,3 @@ | ||
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'; | ||
export { C as ContextKeyExprType } from './contextkey.js'; | ||
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'; | ||
export { C as ContextKeyExprType, f as NotificationsFilter } from './contextkey.js'; | ||
export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js'; | ||
@@ -4,0 +4,0 @@ export { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js'; |
@@ -6,3 +6,2 @@ import { createDecorator } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js'; | ||
import { TernarySearchTree } from 'monaco-editor/esm/vs/base/common/map.js'; | ||
import { Event } from 'monaco-editor/esm/vs/base/common/event.js'; | ||
function refineServiceDecorator(serviceIdentifier) { | ||
@@ -12,128 +11,2 @@ return serviceIdentifier; | ||
const CancellationTokenSource = monaco.CancellationTokenSource; | ||
function sortedDiff(before, after, compare) { | ||
const result = []; | ||
function pushSplice(start, deleteCount, toInsert) { | ||
if (deleteCount === 0 && toInsert.length === 0) { | ||
return; | ||
} | ||
const latest = result[result.length - 1]; | ||
if (latest && latest.start + latest.deleteCount === start) { | ||
latest.deleteCount += deleteCount; | ||
latest.toInsert.push(...toInsert); | ||
} | ||
else { | ||
result.push({ start, deleteCount, toInsert }); | ||
} | ||
} | ||
let beforeIdx = 0; | ||
let afterIdx = 0; | ||
while (true) { | ||
if (beforeIdx === before.length) { | ||
pushSplice(beforeIdx, 0, after.slice(afterIdx)); | ||
break; | ||
} | ||
if (afterIdx === after.length) { | ||
pushSplice(beforeIdx, before.length - beforeIdx, []); | ||
break; | ||
} | ||
const beforeElement = before[beforeIdx]; | ||
const afterElement = after[afterIdx]; | ||
const n = compare(beforeElement, afterElement); | ||
if (n === 0) { | ||
beforeIdx += 1; | ||
afterIdx += 1; | ||
} | ||
else if (n < 0) { | ||
pushSplice(beforeIdx, 1, []); | ||
beforeIdx += 1; | ||
} | ||
else if (n > 0) { | ||
pushSplice(beforeIdx, 0, [afterElement]); | ||
afterIdx += 1; | ||
} | ||
} | ||
return result; | ||
} | ||
function delta(before, after, compare) { | ||
const splices = sortedDiff(before, after, compare); | ||
const removed = []; | ||
const added = []; | ||
for (const splice of splices) { | ||
removed.push(...before.slice(splice.start, splice.start + splice.deleteCount)); | ||
added.push(...splice.toInsert); | ||
} | ||
return { removed, added }; | ||
} | ||
function coalesceInPlace(array) { | ||
let to = 0; | ||
for (let i = 0; i < array.length; i++) { | ||
if (!!array[i]) { | ||
array[to] = array[i]; | ||
to += 1; | ||
} | ||
} | ||
array.length = to; | ||
} | ||
function flatten(arr) { | ||
return [].concat(...arr); | ||
} | ||
function index(array, indexer, mapper) { | ||
return array.reduce((r, t) => { | ||
r[indexer(t)] = mapper ? mapper(t) : t; | ||
return r; | ||
}, Object.create(null)); | ||
} | ||
function shuffle(array, _seed) { | ||
let rand; | ||
if (typeof _seed === 'number') { | ||
let seed = _seed; | ||
rand = () => { | ||
const x = Math.sin(seed++) * 179426549; | ||
return x - Math.floor(x); | ||
}; | ||
} | ||
else { | ||
rand = Math.random; | ||
} | ||
for (let i = array.length - 1; i > 0; i -= 1) { | ||
const j = Math.floor(rand() * (i + 1)); | ||
const temp = array[i]; | ||
array[i] = array[j]; | ||
array[j] = temp; | ||
} | ||
} | ||
function mapArrayOrNot(items, fn) { | ||
return Array.isArray(items) ? | ||
items.map(fn) : | ||
fn(items); | ||
} | ||
var NeverShowAgainScope; | ||
( ((function(NeverShowAgainScope) { | ||
NeverShowAgainScope[NeverShowAgainScope["WORKSPACE"] = 0] = "WORKSPACE"; | ||
NeverShowAgainScope[NeverShowAgainScope["PROFILE"] = 1] = "PROFILE"; | ||
NeverShowAgainScope[NeverShowAgainScope["APPLICATION"] = 2] = "APPLICATION"; | ||
})(NeverShowAgainScope || (NeverShowAgainScope = {})))); | ||
var NotificationsFilter; | ||
( ((function(NotificationsFilter) { | ||
NotificationsFilter[NotificationsFilter["OFF"] = 0] = "OFF"; | ||
NotificationsFilter[NotificationsFilter["SILENT"] = 1] = "SILENT"; | ||
NotificationsFilter[NotificationsFilter["ERROR"] = 2] = "ERROR"; | ||
})(NotificationsFilter || (NotificationsFilter = {})))); | ||
class NoOpNotification { | ||
constructor() { | ||
this.progress = ( (new NoOpProgress())); | ||
this.onDidClose = Event.None; | ||
this.onDidChangeVisibility = Event.None; | ||
} | ||
updateSeverity(severity) { } | ||
updateMessage(message) { } | ||
updateActions(actions) { } | ||
close() { } | ||
} | ||
class NoOpProgress { | ||
infinite() { } | ||
done() { } | ||
total(value) { } | ||
worked(value) { } | ||
} | ||
const IFileService = ( (createDecorator('fileService'))); | ||
@@ -425,2 +298,2 @@ var FileType; | ||
})(Services || (Services = {}))); | ||
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 }; | ||
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 }; |
{ | ||
"name": "@codingame/monaco-vscode-api", | ||
"version": "1.69.6", | ||
"version": "1.69.7", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "description": "VSCode public API plugged on the monaco editor", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2853670
48
71165