@codingame/monaco-vscode-api 38.0.0 → 38.0.2
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/css.d.ts +1 -1
- package/css.js +7 -1
- package/lifecycle.js +7 -5
- package/missing-services.js +16 -34
- package/package.json +8 -8
- package/services.js +6 -4
- package/vscode/src/vs/base/browser/dom.d.ts +5 -4
- package/vscode/src/vs/base/browser/dom.js +17 -11
- package/vscode/src/vs/platform/product/common/product.js +1 -1
package/css.d.ts
CHANGED
package/css.js
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
import { mainWindow } from './vscode/src/vs/base/browser/window.js';
|
|
3
3
|
|
|
4
4
|
const sheets = [];
|
|
5
|
+
const sheetPromises = [];
|
|
6
|
+
function whenSheetsLoaded() {
|
|
7
|
+
return Promise.allSettled(sheetPromises);
|
|
8
|
+
}
|
|
5
9
|
function registerCss(module, order = 0) {
|
|
6
10
|
const exportedValue = module?.default;
|
|
7
11
|
let sheet = undefined;
|
|
@@ -17,6 +21,7 @@ function registerCss(module, order = 0) {
|
|
|
17
21
|
.join('\n'));
|
|
18
22
|
}
|
|
19
23
|
if (sheetPromise != null) {
|
|
24
|
+
sheetPromises.push(sheetPromise);
|
|
20
25
|
sheetPromise.then((sheet) => {
|
|
21
26
|
const fontFaces = Array.from(sheet.cssRules)
|
|
22
27
|
.filter((rule) => rule instanceof mainWindow.CSSFontFaceRule)
|
|
@@ -44,11 +49,12 @@ function getInjectElement(target) {
|
|
|
44
49
|
}
|
|
45
50
|
return target.ownerDocument;
|
|
46
51
|
}
|
|
47
|
-
function injectCss(target) {
|
|
52
|
+
async function injectCss(target) {
|
|
48
53
|
const root = getInjectElement(target);
|
|
49
54
|
if (root instanceof mainWindow.ShadowRoot && sheets.length === 0) {
|
|
50
55
|
console.error("@codingame/monaco-vscode-api was loaded inside a shadow dom, but it's unable to load the css into it because the bundler configuration wasn't applied properly: imported css files should export their content as default");
|
|
51
56
|
}
|
|
57
|
+
await whenSheetsLoaded();
|
|
52
58
|
sheets.sort((a, b) => a.order - b.order);
|
|
53
59
|
root.adoptedStyleSheets = [...root.adoptedStyleSheets, ...sheets.map((s) => s.sheet)];
|
|
54
60
|
}
|
package/lifecycle.js
CHANGED
|
@@ -57,13 +57,9 @@ async function startup(instantiationService) {
|
|
|
57
57
|
lifecycleService.phase = LifecyclePhase.Ready;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
|
-
await instantiationService.invokeFunction(async (accessor) => {
|
|
61
|
-
await Promise.all(serviceInitializePostParticipants.map((participant) => participant(accessor)));
|
|
62
|
-
});
|
|
63
60
|
serviceInitializedBarrier.open();
|
|
64
61
|
serviceInitializedEmitter.fire();
|
|
65
|
-
|
|
66
|
-
const lifecycleService = accessor.get(ILifecycleService);
|
|
62
|
+
await instantiationService.invokeFunction(async (accessor) => {
|
|
67
63
|
if (!workbenchHooksDisabled) {
|
|
68
64
|
onRenderWorkbench((accessor) => {
|
|
69
65
|
accessor.get(IInstantiationService).createInstance(WorkbenchContextKeysHandler);
|
|
@@ -71,6 +67,12 @@ async function startup(instantiationService) {
|
|
|
71
67
|
}
|
|
72
68
|
layoutEmitter.fire(accessor);
|
|
73
69
|
renderWorkbenchEmitter.fire(accessor);
|
|
70
|
+
});
|
|
71
|
+
await instantiationService.invokeFunction(async (accessor) => {
|
|
72
|
+
await Promise.all(serviceInitializePostParticipants.map((participant) => participant(accessor)));
|
|
73
|
+
});
|
|
74
|
+
await instantiationService.invokeFunction(async (accessor) => {
|
|
75
|
+
const lifecycleService = accessor.get(ILifecycleService);
|
|
74
76
|
await Promise.race([accessor.get(IWorkbenchLayoutService).whenRestored, timeout(2000)]);
|
|
75
77
|
if (!workbenchHooksDisabled) {
|
|
76
78
|
lifecycleService.phase = LifecyclePhase.Restored;
|
package/missing-services.js
CHANGED
|
@@ -373,7 +373,6 @@ import { NullRemoteAgentHostService } from './vscode/src/vs/platform/agentHost/c
|
|
|
373
373
|
import { IRemoteAgentHostService } from './vscode/src/vs/platform/agentHost/common/remoteAgentHostService.service.js';
|
|
374
374
|
import { ISSHRemoteAgentHostService } from './vscode/src/vs/platform/agentHost/common/sshRemoteAgentHost.service.js';
|
|
375
375
|
import { ITunnelAgentHostService } from './vscode/src/vs/platform/agentHost/common/tunnelAgentHost.service.js';
|
|
376
|
-
import { IGitHubService } from './vscode/src/vs/platform/github/common/githubService.service.js';
|
|
377
376
|
import { IAgentNetworkFilterService } from './vscode/src/vs/platform/networkFilter/common/networkFilterService.service.js';
|
|
378
377
|
import { ISandboxHelperService } from './vscode/src/vs/platform/sandbox/common/sandboxHelperService.service.js';
|
|
379
378
|
import { ITerminalSandboxService } from './vscode/src/vs/platform/sandbox/common/terminalSandboxService.service.js';
|
|
@@ -395,7 +394,7 @@ import { ISessionTaskRunnerRegistry } from './vscode/src/vs/sessions/contrib/cha
|
|
|
395
394
|
import { ISessionsTasksService } from './vscode/src/vs/sessions/contrib/chat/browser/sessionsTasksService.service.js';
|
|
396
395
|
import { ICodeReviewService } from './vscode/src/vs/sessions/contrib/codeReview/browser/codeReviewService.service.js';
|
|
397
396
|
import { IDiffEditorOptionsService } from './vscode/src/vs/sessions/contrib/editor/common/diffEditorOptionsService.service.js';
|
|
398
|
-
import { IGitHubService
|
|
397
|
+
import { IGitHubService } from './vscode/src/vs/sessions/contrib/github/browser/githubService.service.js';
|
|
399
398
|
import { IPullRequestIconCache } from './vscode/src/vs/sessions/contrib/github/browser/pullRequestIconCache.service.js';
|
|
400
399
|
import { ICloudSandboxTelemetryService } from './vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/cloudSandboxTelemetry.service.js';
|
|
401
400
|
import { IRemoteAgentHostConnectionCustomizationService } from './vscode/src/vs/workbench/contrib/chat/browser/remoteAgentHost/remoteAgentHostConnectionCustomization.service.js';
|
|
@@ -9771,23 +9770,32 @@ class WorkspaceFolderLabelService {
|
|
|
9771
9770
|
}
|
|
9772
9771
|
}
|
|
9773
9772
|
registerSingleton(IWorkspaceFolderLabelService, WorkspaceFolderLabelService, InstantiationType.Delayed);
|
|
9774
|
-
class
|
|
9773
|
+
class WorkbenchGitHubService {
|
|
9775
9774
|
constructor() {
|
|
9776
9775
|
this.acquireClient = unsupported;
|
|
9777
9776
|
this.acquireAnonymousClient = unsupported;
|
|
9778
9777
|
this.acquireBootstrapClient = unsupported;
|
|
9778
|
+
this.onDidChangeDefaultClient = Event.None;
|
|
9779
|
+
this.acquireDefaultAccountClient = unsupported;
|
|
9780
|
+
this.acquireSessionClient = unsupported;
|
|
9779
9781
|
}
|
|
9780
9782
|
}
|
|
9781
9783
|
__decorate([
|
|
9782
9784
|
Unsupported
|
|
9783
|
-
],
|
|
9785
|
+
], WorkbenchGitHubService.prototype, "acquireClient", void 0);
|
|
9786
|
+
__decorate([
|
|
9787
|
+
Unsupported
|
|
9788
|
+
], WorkbenchGitHubService.prototype, "acquireAnonymousClient", void 0);
|
|
9789
|
+
__decorate([
|
|
9790
|
+
Unsupported
|
|
9791
|
+
], WorkbenchGitHubService.prototype, "acquireBootstrapClient", void 0);
|
|
9784
9792
|
__decorate([
|
|
9785
9793
|
Unsupported
|
|
9786
|
-
],
|
|
9794
|
+
], WorkbenchGitHubService.prototype, "acquireDefaultAccountClient", void 0);
|
|
9787
9795
|
__decorate([
|
|
9788
9796
|
Unsupported
|
|
9789
|
-
],
|
|
9790
|
-
registerSingleton(
|
|
9797
|
+
], WorkbenchGitHubService.prototype, "acquireSessionClient", void 0);
|
|
9798
|
+
registerSingleton(IWorkbenchGitHubService, WorkbenchGitHubService, InstantiationType.Delayed);
|
|
9791
9799
|
class RemoteAgentHostLocationPreferenceService {
|
|
9792
9800
|
constructor() {
|
|
9793
9801
|
this.onDidChangePreference = Event.None;
|
|
@@ -10243,7 +10251,7 @@ __decorate([
|
|
|
10243
10251
|
__decorate([
|
|
10244
10252
|
Unsupported
|
|
10245
10253
|
], GitHubSessionService.prototype, "getPullRequestContext", void 0);
|
|
10246
|
-
registerSingleton(IGitHubService
|
|
10254
|
+
registerSingleton(IGitHubService, GitHubSessionService, InstantiationType.Delayed);
|
|
10247
10255
|
class PullRequestIconCache {
|
|
10248
10256
|
constructor() {
|
|
10249
10257
|
this.get = () => undefined;
|
|
@@ -11149,32 +11157,6 @@ class ManagedSettingsPresentationService {
|
|
|
11149
11157
|
}
|
|
11150
11158
|
}
|
|
11151
11159
|
registerSingleton(IManagedSettingsPresentationService, ManagedSettingsPresentationService, InstantiationType.Delayed);
|
|
11152
|
-
class WorkbenchGitHubService {
|
|
11153
|
-
constructor() {
|
|
11154
|
-
this.onDidChangeDefaultClient = Event.None;
|
|
11155
|
-
this.acquireClient = unsupported;
|
|
11156
|
-
this.acquireAnonymousClient = unsupported;
|
|
11157
|
-
this.acquireBootstrapClient = unsupported;
|
|
11158
|
-
this.acquireDefaultAccountClient = unsupported;
|
|
11159
|
-
this.acquireSessionClient = unsupported;
|
|
11160
|
-
}
|
|
11161
|
-
}
|
|
11162
|
-
__decorate([
|
|
11163
|
-
Unsupported
|
|
11164
|
-
], WorkbenchGitHubService.prototype, "acquireClient", void 0);
|
|
11165
|
-
__decorate([
|
|
11166
|
-
Unsupported
|
|
11167
|
-
], WorkbenchGitHubService.prototype, "acquireAnonymousClient", void 0);
|
|
11168
|
-
__decorate([
|
|
11169
|
-
Unsupported
|
|
11170
|
-
], WorkbenchGitHubService.prototype, "acquireBootstrapClient", void 0);
|
|
11171
|
-
__decorate([
|
|
11172
|
-
Unsupported
|
|
11173
|
-
], WorkbenchGitHubService.prototype, "acquireDefaultAccountClient", void 0);
|
|
11174
|
-
__decorate([
|
|
11175
|
-
Unsupported
|
|
11176
|
-
], WorkbenchGitHubService.prototype, "acquireSessionClient", void 0);
|
|
11177
|
-
registerSingleton(IWorkbenchGitHubService, WorkbenchGitHubService, InstantiationType.Delayed);
|
|
11178
11160
|
class ManagedSettingsUpdateService {
|
|
11179
11161
|
constructor() {
|
|
11180
11162
|
this.updateInfo = constObservable(undefined);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "38.0.
|
|
3
|
+
"version": "38.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-base-service-override": "38.0.
|
|
19
|
-
"@codingame/monaco-vscode-environment-service-override": "38.0.
|
|
20
|
-
"@codingame/monaco-vscode-extensions-service-override": "38.0.
|
|
21
|
-
"@codingame/monaco-vscode-files-service-override": "38.0.
|
|
22
|
-
"@codingame/monaco-vscode-host-service-override": "38.0.
|
|
23
|
-
"@codingame/monaco-vscode-layout-service-override": "38.0.
|
|
24
|
-
"@codingame/monaco-vscode-quickaccess-service-override": "38.0.
|
|
18
|
+
"@codingame/monaco-vscode-base-service-override": "38.0.2",
|
|
19
|
+
"@codingame/monaco-vscode-environment-service-override": "38.0.2",
|
|
20
|
+
"@codingame/monaco-vscode-extensions-service-override": "38.0.2",
|
|
21
|
+
"@codingame/monaco-vscode-files-service-override": "38.0.2",
|
|
22
|
+
"@codingame/monaco-vscode-host-service-override": "38.0.2",
|
|
23
|
+
"@codingame/monaco-vscode-layout-service-override": "38.0.2",
|
|
24
|
+
"@codingame/monaco-vscode-quickaccess-service-override": "38.0.2",
|
|
25
25
|
"@vscode/diff": "0.0.2-7",
|
|
26
26
|
"@vscode/iconv-lite-umd": "0.7.1",
|
|
27
27
|
"dompurify": "3.4.15",
|
package/services.js
CHANGED
|
@@ -123,6 +123,7 @@ import { asArray } from './vscode/src/vs/base/common/arrays.js';
|
|
|
123
123
|
import { MenuId, MenuRegistry } from './vscode/src/vs/platform/actions/common/actions.js';
|
|
124
124
|
import { Menu } from './vscode/src/vs/workbench/browser/web.api.js';
|
|
125
125
|
export { ColorScheme } from './vscode/src/vs/workbench/browser/web.api.js';
|
|
126
|
+
import { mark } from './vscode/src/vs/base/common/performance.js';
|
|
126
127
|
export { SyncDescriptor } from './vscode/src/vs/platform/instantiation/common/descriptors.js';
|
|
127
128
|
export { ICommandService } from './vscode/src/vs/platform/commands/common/commands.service.js';
|
|
128
129
|
export { INotificationService } from './vscode/src/vs/platform/notification/common/notification.service.js';
|
|
@@ -570,10 +571,10 @@ export { IManagedSettingsPresentationService } from './vscode/src/vs/workbench/s
|
|
|
570
571
|
export { IWorkbenchGitHubService } from './vscode/src/vs/workbench/services/github/common/githubService.service.js';
|
|
571
572
|
export { IManagedSettingsUpdateService } from './vscode/src/vs/workbench/services/policies/common/managedSettingsUpdate.service.js';
|
|
572
573
|
|
|
573
|
-
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.142.0-
|
|
574
|
-
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.142.0-
|
|
574
|
+
if (window.monacoVscodeApiBuildId != null && window.monacoVscodeApiBuildId !== "1.142.0-7546a896-4d9f-44db-a74c-778d4b06bd49") {
|
|
575
|
+
throw new Error(`Another version of monaco-vscode-api has already been loaded. Trying to load ${"1.142.0-7546a896-4d9f-44db-a74c-778d4b06bd49"}, ${window.monacoVscodeApiBuildId} is already loaded`);
|
|
575
576
|
}
|
|
576
|
-
window.monacoVscodeApiBuildId = "1.142.0-
|
|
577
|
+
window.monacoVscodeApiBuildId = "1.142.0-7546a896-4d9f-44db-a74c-778d4b06bd49";
|
|
577
578
|
function registerCommands(options) {
|
|
578
579
|
function asMenuId(menu) {
|
|
579
580
|
switch (menu) {
|
|
@@ -600,7 +601,8 @@ function registerCommands(options) {
|
|
|
600
601
|
}
|
|
601
602
|
async function initialize(overrides, container = document.body, configuration = {}, env) {
|
|
602
603
|
checkServicesNotInitialized();
|
|
603
|
-
|
|
604
|
+
mark('code/didLoadWorkbenchMain');
|
|
605
|
+
await injectCss(container);
|
|
604
606
|
registerCommands(configuration);
|
|
605
607
|
initialize$1(container, configuration, env);
|
|
606
608
|
const productService = mixin({ _serviceBrand: undefined, ...product }, configuration.productConfiguration);
|
|
@@ -4,7 +4,7 @@ import { AbstractIdleValue, IntervalTimer, IdleDeadline } from "../common/async.
|
|
|
4
4
|
import * as event from "../common/event.js";
|
|
5
5
|
import { Disposable, DisposableStore, IDisposable } from "../common/lifecycle.js";
|
|
6
6
|
import { URI } from "../common/uri.js";
|
|
7
|
-
import { CodeWindow
|
|
7
|
+
import { CodeWindow } from "./window.js";
|
|
8
8
|
import { IObservable, IReader } from "../common/observable.js";
|
|
9
9
|
export interface IRegisteredCodeWindow {
|
|
10
10
|
readonly window: CodeWindow;
|
|
@@ -787,10 +787,11 @@ type ElementAttributeKeys<T> = Partial<{
|
|
|
787
787
|
* container.appendChild(observer);
|
|
788
788
|
* ```
|
|
789
789
|
*/
|
|
790
|
-
export
|
|
790
|
+
export interface ConnectionObserverElement extends HTMLElement {
|
|
791
791
|
onDidConnect?: () => void;
|
|
792
792
|
onDidDisconnect?: () => void;
|
|
793
|
-
disconnectedCallback(): void;
|
|
794
|
-
connectedCallback(): void;
|
|
795
793
|
}
|
|
794
|
+
export declare const ConnectionObserverElement: {
|
|
795
|
+
new (): ConnectionObserverElement;
|
|
796
|
+
};
|
|
796
797
|
export {};
|
|
@@ -1989,16 +1989,22 @@ function setOrRemoveAttribute(element, key, value) {
|
|
|
1989
1989
|
element.setAttribute(camelCaseToHyphenCase(key), String(value));
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1992
|
+
mainWindow.Function(`
|
|
1993
|
+
if (!customElements.get('connection-observer')) {
|
|
1994
|
+
class ConnectionObserverElement extends HTMLElement {
|
|
1995
|
+
connectedCallback() {
|
|
1996
|
+
this.onDidConnect?.();
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
disconnectedCallback() {
|
|
2000
|
+
this.onDidDisconnect?.();
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
customElements.define('connection-observer', ConnectionObserverElement);
|
|
1998
2005
|
}
|
|
1999
|
-
}
|
|
2000
|
-
if (!mainWindow.customElements.get("connection-observer")) {
|
|
2001
|
-
mainWindow.customElements.define("connection-observer", ConnectionObserverElement);
|
|
2002
|
-
}
|
|
2003
2006
|
|
|
2004
|
-
|
|
2007
|
+
return customElements.get('connection-observer');
|
|
2008
|
+
`)();
|
|
2009
|
+
|
|
2010
|
+
export { $, AnimationFrameScheduler, DetectedFullscreenMode, Dimension, DisposableResizeObserver, DragAndDropObserver, EventHelper, EventType, LiveElement, ModifierKeyEmitter, Namespace, ObserverNode, ObserverNodeWithElement, SafeTriangle, WindowIdleValue, WindowIntervalTimer, addDisposableGenericMouseDownListener, addDisposableGenericMouseMoveListener, addDisposableGenericMouseUpListener, addDisposableListener, addDisposableThrottledListener, addStandardDisposableGenericMouseDownListener, addStandardDisposableGenericMouseUpListener, addStandardDisposableListener, after, animate, append, clearNode, computeScreenAwareSize, copyAttributes, createDocumentFragment, createElement, createElementNS, createLinkElement, createMetaElement, createTextNode, detectFullscreen, disposableWindowInterval, finalHandler, findParentWithClass, getActiveDocument, getActiveElement, getActiveWindow, getClientArea, getComputedStyle, getContentHeight, getContentWidth, getDocument, getDomNodePagePosition, getDomNodeZoomLevel, getExternalFocusWindow, getFullscreenElement, getLargestChildWidth, getRecentDisposableResizeObserverContextForLoopError, getRootContainer, getShadowRoot, getTopLeftOffset, getTotalHeight, getTotalScrollWidth, getTotalWidth, getWindow, getWindowById, getWindowId, getWindows, getWindowsCount, h, hasAppFocus, hasExternalFocus, hasParentWithClass, hide, isActiveDocument, isActiveElement, isAncestor, isAncestorOfActiveElement, isAncestorUsingFlowTo, isDragEvent, isEditableElement, isElement, isEventLike, isHTMLAnchorElement, isHTMLButtonElement, isHTMLDivElement, isHTMLElement, isHTMLIframeElement, isHTMLInputElement, isHTMLTextAreaElement, isInShadowDOM, isKeyboardEvent, isMouseEvent, isPointerEvent, isSVGElement, isShadowRoot, measure, modify, n, onDidRegisterWindow, onDidUnregisterWindow, onWillUnregisterWindow, position, prepend, registerWindow, releaseReservedWindowForExternalOpen, reserveWindowForExternalOpen, reset, restoreParentsScrollTop, runAtThisOrScheduleAtNextAnimationFrame, runWhenWindowIdle, saveParentsScrollTop, scheduleAtNextAnimationFrame, setParentFlowTo, setVisibility, sharedMutationObserver, show, size, svgElem, trackActiveElement, trackAttributes, trackFocus, triggerDownload, triggerUpload, windowOpenNoOpener, windowOpenPopup, windowOpenWithSuccess };
|