@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common 20.0.0

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/empty.js ADDED
@@ -0,0 +1 @@
1
+ export {}
package/package.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "name": "@codingame/monaco-vscode-a654b07e-8806-5425-b124-18f03ba8e11a-common",
3
+ "version": "20.0.0",
4
+ "private": false,
5
+ "description": "VSCode public API plugged on the monaco editor - common package (chat, extension-gallery, extensions, interactive, localization, mcp, notebook, remote-agent, search, terminal, view-common, walkthrough)",
6
+ "keywords": [],
7
+ "author": {
8
+ "name": "CodinGame",
9
+ "url": "http://www.codingame.com"
10
+ },
11
+ "license": "MIT",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+ssh://git@github.com/CodinGame/monaco-vscode-api.git"
15
+ },
16
+ "type": "module",
17
+ "dependencies": {
18
+ "@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common": "20.0.0",
19
+ "@codingame/monaco-vscode-api": "20.0.0"
20
+ },
21
+ "exports": {
22
+ ".": {
23
+ "default": "./empty.js"
24
+ },
25
+ "./vscode/*.css": {
26
+ "default": "./vscode/src/*.css"
27
+ },
28
+ "./vscode/*": {
29
+ "types": "./vscode/src/*.d.ts",
30
+ "default": "./vscode/src/*.js"
31
+ },
32
+ "./*": {
33
+ "types": "./*.d.ts",
34
+ "default": "./*.js"
35
+ }
36
+ },
37
+ "typesVersions": {
38
+ "*": {
39
+ "vscode/*": [
40
+ "./vscode/src/*.d.ts"
41
+ ]
42
+ }
43
+ }
44
+ }
@@ -0,0 +1,20 @@
1
+ import { Disposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
3
+ import { IQuickPickItem } from "@codingame/monaco-vscode-api/vscode/vs/platform/quickinput/common/quickInput";
4
+ import { IGalleryExtension } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement";
5
+ import { IExtensionGalleryService } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service";
6
+ import { ILanguagePackService } from "@codingame/monaco-vscode-api/vscode/vs/platform/languagePacks/common/languagePacks.service";
7
+ export declare function getLocale(extension: IGalleryExtension): string | undefined;
8
+ export interface ILanguagePackItem extends IQuickPickItem {
9
+ readonly extensionId?: string;
10
+ readonly galleryExtension?: IGalleryExtension;
11
+ }
12
+ export declare abstract class LanguagePackBaseService extends Disposable implements ILanguagePackService {
13
+ protected readonly extensionGalleryService: IExtensionGalleryService;
14
+ readonly _serviceBrand: undefined;
15
+ constructor(extensionGalleryService: IExtensionGalleryService);
16
+ abstract getBuiltInExtensionTranslationsUri(id: string, language: string): Promise<URI | undefined>;
17
+ abstract getInstalledLanguages(): Promise<Array<ILanguagePackItem>>;
18
+ getAvailableLanguages(): Promise<ILanguagePackItem[]>;
19
+ protected createQuickPickItem(locale: string, languageName?: string, languagePack?: IGalleryExtension): IQuickPickItem;
20
+ }
@@ -0,0 +1,80 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { CancellationTokenSource } from '@codingame/monaco-vscode-api/vscode/vs/base/common/cancellation';
4
+ import { Disposable } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { language } from '@codingame/monaco-vscode-api/vscode/vs/base/common/platform';
6
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
7
+ import { IExtensionGalleryService } from '@codingame/monaco-vscode-api/vscode/vs/platform/extensionManagement/common/extensionManagement.service';
8
+
9
+ function getLocale(extension) {
10
+ return extension.tags.find(t => t.startsWith('lp-'))?.split('lp-')[1];
11
+ }
12
+ let LanguagePackBaseService = class LanguagePackBaseService extends Disposable {
13
+ constructor(extensionGalleryService) {
14
+ super();
15
+ this.extensionGalleryService = extensionGalleryService;
16
+ }
17
+ async getAvailableLanguages() {
18
+ const timeout = ( new CancellationTokenSource());
19
+ setTimeout(() => timeout.cancel(), 1000);
20
+ let result;
21
+ try {
22
+ result = await this.extensionGalleryService.query({
23
+ text: 'category:"language packs"',
24
+ pageSize: 20
25
+ }, timeout.token);
26
+ }
27
+ catch (_) {
28
+ return [];
29
+ }
30
+ const languagePackExtensions = result.firstPage.filter(e => e.properties.localizedLanguages?.length && ( e.tags.some(t => t.startsWith('lp-'))));
31
+ const allFromMarketplace = ( languagePackExtensions.map(lp => {
32
+ const languageName = lp.properties.localizedLanguages?.[0];
33
+ const locale = getLocale(lp);
34
+ const baseQuickPick = this.createQuickPickItem(locale, languageName, lp);
35
+ return {
36
+ ...baseQuickPick,
37
+ extensionId: lp.identifier.id,
38
+ galleryExtension: lp
39
+ };
40
+ }));
41
+ allFromMarketplace.push(this.createQuickPickItem('en', 'English'));
42
+ return allFromMarketplace;
43
+ }
44
+ createQuickPickItem(locale, languageName, languagePack) {
45
+ const label = languageName ?? locale;
46
+ let description;
47
+ if (label !== locale) {
48
+ description = `(${locale})`;
49
+ }
50
+ if (locale.toLowerCase() === language.toLowerCase()) {
51
+ description ??= '';
52
+ description += ( localize(1921, " (Current)"));
53
+ }
54
+ if (languagePack?.installCount) {
55
+ description ??= '';
56
+ const count = languagePack.installCount;
57
+ let countLabel;
58
+ if (count > 1000000) {
59
+ countLabel = `${Math.floor(count / 100000) / 10}M`;
60
+ }
61
+ else if (count > 1000) {
62
+ countLabel = `${Math.floor(count / 1000)}K`;
63
+ }
64
+ else {
65
+ countLabel = String(count);
66
+ }
67
+ description += ` $(cloud-download) ${countLabel}`;
68
+ }
69
+ return {
70
+ id: locale,
71
+ label,
72
+ description
73
+ };
74
+ }
75
+ };
76
+ LanguagePackBaseService = ( __decorate([
77
+ ( __param(0, IExtensionGalleryService))
78
+ ], LanguagePackBaseService));
79
+
80
+ export { LanguagePackBaseService, getLocale };
@@ -0,0 +1,19 @@
1
+ import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
2
+ import { ObservableValue } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue";
3
+ import { StorageScope, StorageTarget } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage";
4
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
5
+ interface IObservableMementoOpts<T> {
6
+ defaultValue: T;
7
+ key: string;
8
+ toStorage?: (value: T) => string;
9
+ fromStorage?: (value: string) => T;
10
+ }
11
+ export declare function observableMemento<T>(opts: IObservableMementoOpts<T>): (scope: StorageScope, target: StorageTarget, storageService: IStorageService) => ObservableMemento<T>;
12
+ export declare class ObservableMemento<T> extends ObservableValue<T> implements IDisposable {
13
+ private readonly _store;
14
+ private _didChange;
15
+ constructor(opts: IObservableMementoOpts<T>, storageScope: StorageScope, storageTarget: StorageTarget, storageService: IStorageService);
16
+ protected _setValue(newValue: T): void;
17
+ dispose(): void;
18
+ }
19
+ export {};
@@ -0,0 +1,66 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { strictEquals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/equals';
4
+ import { DisposableStore } from '@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle';
5
+ import { DebugNameData } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/debugName';
6
+ import { ObservableValue } from '@codingame/monaco-vscode-api/vscode/vs/base/common/observableInternal/observables/observableValue';
7
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
8
+
9
+ function observableMemento(opts) {
10
+ return (scope, target, storageService) => {
11
+ return ( new ObservableMemento(opts, scope, target, storageService));
12
+ };
13
+ }
14
+ let ObservableMemento = class ObservableMemento extends ObservableValue {
15
+ constructor(opts, storageScope, storageTarget, storageService) {
16
+ if (opts.defaultValue && typeof opts.defaultValue === 'object') {
17
+ opts.toStorage ??= (value) => JSON.stringify(value);
18
+ opts.fromStorage ??= (value) => JSON.parse(value);
19
+ }
20
+ let initialValue = opts.defaultValue;
21
+ const fromStorage = storageService.get(opts.key, storageScope);
22
+ if (fromStorage !== undefined) {
23
+ if (opts.fromStorage) {
24
+ try {
25
+ initialValue = opts.fromStorage(fromStorage);
26
+ }
27
+ catch {
28
+ initialValue = opts.defaultValue;
29
+ }
30
+ }
31
+ }
32
+ super(( new DebugNameData(undefined, `storage/${opts.key}`, undefined)), initialValue, strictEquals);
33
+ this._store = ( new DisposableStore());
34
+ this._didChange = false;
35
+ const didChange = storageService.onDidChangeValue(storageScope, opts.key, this._store);
36
+ this._store.add(didChange((e) => {
37
+ if (e.external && e.key === opts.key && !this._didChange) {
38
+ this.set(opts.defaultValue, undefined);
39
+ }
40
+ }));
41
+ this._store.add(storageService.onWillSaveState(() => {
42
+ if (this._didChange) {
43
+ this._didChange = false;
44
+ const value = this.get();
45
+ if (opts.toStorage) {
46
+ storageService.store(opts.key, opts.toStorage(value), storageScope, storageTarget);
47
+ }
48
+ else {
49
+ storageService.store(opts.key, String(value), storageScope, storageTarget);
50
+ }
51
+ }
52
+ }));
53
+ }
54
+ _setValue(newValue) {
55
+ super._setValue(newValue);
56
+ this._didChange = true;
57
+ }
58
+ dispose() {
59
+ this._store.dispose();
60
+ }
61
+ };
62
+ ObservableMemento = ( __decorate([
63
+ ( __param(3, IStorageService))
64
+ ], ObservableMemento));
65
+
66
+ export { ObservableMemento, observableMemento };
@@ -0,0 +1,24 @@
1
+ export declare const extensionsViewIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
2
+ export declare const manageExtensionIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
3
+ export declare const clearSearchResultsIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
4
+ export declare const refreshIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
5
+ export declare const filterIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
6
+ export declare const installLocalInRemoteIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
7
+ export declare const installWorkspaceRecommendedIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
8
+ export declare const configureRecommendedIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
9
+ export declare const syncEnabledIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
10
+ export declare const syncIgnoredIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
11
+ export declare const remoteIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
12
+ export declare const installCountIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
13
+ export declare const privateExtensionIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
14
+ export declare const ratingIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
15
+ export declare const preReleaseIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
16
+ export declare const sponsorIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
17
+ export declare const starFullIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
18
+ export declare const starHalfIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
19
+ export declare const starEmptyIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
20
+ export declare const errorIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
21
+ export declare const warningIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
22
+ export declare const infoIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
23
+ export declare const trustIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
24
+ export declare const activationTimeIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
@@ -0,0 +1,61 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
5
+
6
+ const extensionsViewIcon = registerIcon('extensions-view-icon', Codicon.extensions, ( localize(7012, 'View icon of the extensions view.')));
7
+ const manageExtensionIcon = registerIcon('extensions-manage', Codicon.gear, ( localize(7013, 'Icon for the \'Manage\' action in the extensions view.')));
8
+ const clearSearchResultsIcon = registerIcon('extensions-clear-search-results', Codicon.clearAll, ( localize(
9
+ 7014,
10
+ 'Icon for the \'Clear Search Result\' action in the extensions view.'
11
+ )));
12
+ const refreshIcon = registerIcon('extensions-refresh', Codicon.refresh, ( localize(7015, 'Icon for the \'Refresh\' action in the extensions view.')));
13
+ const filterIcon = registerIcon('extensions-filter', Codicon.filter, ( localize(7016, 'Icon for the \'Filter\' action in the extensions view.')));
14
+ const installLocalInRemoteIcon = registerIcon('extensions-install-local-in-remote', Codicon.cloudDownload, ( localize(
15
+ 7017,
16
+ 'Icon for the \'Install Local Extension in Remote\' action in the extensions view.'
17
+ )));
18
+ const installWorkspaceRecommendedIcon = registerIcon('extensions-install-workspace-recommended', Codicon.cloudDownload, ( localize(
19
+ 7018,
20
+ 'Icon for the \'Install Workspace Recommended Extensions\' action in the extensions view.'
21
+ )));
22
+ const configureRecommendedIcon = registerIcon('extensions-configure-recommended', Codicon.pencil, ( localize(
23
+ 7019,
24
+ 'Icon for the \'Configure Recommended Extensions\' action in the extensions view.'
25
+ )));
26
+ const syncEnabledIcon = registerIcon('extensions-sync-enabled', Codicon.sync, ( localize(7020, 'Icon to indicate that an extension is synced.')));
27
+ const syncIgnoredIcon = registerIcon('extensions-sync-ignored', Codicon.syncIgnored, ( localize(7021, 'Icon to indicate that an extension is ignored when syncing.')));
28
+ const remoteIcon = registerIcon('extensions-remote', Codicon.remote, ( localize(
29
+ 7022,
30
+ 'Icon to indicate that an extension is remote in the extensions view and editor.'
31
+ )));
32
+ const installCountIcon = registerIcon('extensions-install-count', Codicon.cloudDownload, ( localize(
33
+ 7023,
34
+ 'Icon shown along with the install count in the extensions view and editor.'
35
+ )));
36
+ const privateExtensionIcon = registerIcon('extensions-private', Codicon.lock, ( localize(
37
+ 7024,
38
+ 'Icon shown for private extensions in the extensions view and editor.'
39
+ )));
40
+ const ratingIcon = registerIcon('extensions-rating', Codicon.star, ( localize(
41
+ 7025,
42
+ 'Icon shown along with the rating in the extensions view and editor.'
43
+ )));
44
+ const preReleaseIcon = registerIcon('extensions-pre-release', Codicon.versions, ( localize(
45
+ 7026,
46
+ 'Icon shown for extensions having pre-release versions in extensions view and editor.'
47
+ )));
48
+ const sponsorIcon = registerIcon('extensions-sponsor', Codicon.heartFilled, ( localize(
49
+ 7027,
50
+ 'Icon used for sponsoring extensions in the extensions view and editor.'
51
+ )));
52
+ const starFullIcon = registerIcon('extensions-star-full', Codicon.starFull, ( localize(7028, 'Full star icon used for the rating in the extensions editor.')));
53
+ const starHalfIcon = registerIcon('extensions-star-half', Codicon.starHalf, ( localize(7029, 'Half star icon used for the rating in the extensions editor.')));
54
+ const starEmptyIcon = registerIcon('extensions-star-empty', Codicon.starEmpty, ( localize(7030, 'Empty star icon used for the rating in the extensions editor.')));
55
+ const errorIcon = registerIcon('extensions-error-message', Codicon.error, ( localize(7031, 'Icon shown with a error message in the extensions editor.')));
56
+ const warningIcon = registerIcon('extensions-warning-message', Codicon.warning, ( localize(7032, 'Icon shown with a warning message in the extensions editor.')));
57
+ const infoIcon = registerIcon('extensions-info-message', Codicon.info, ( localize(7033, 'Icon shown with an info message in the extensions editor.')));
58
+ const trustIcon = registerIcon('extension-workspace-trust', Codicon.shield, ( localize(7034, 'Icon shown with a workspace trust message in the extension editor.')));
59
+ const activationTimeIcon = registerIcon('extension-activation-time', Codicon.history, ( localize(7035, 'Icon shown with a activation time message in the extension editor.')));
60
+
61
+ export { activationTimeIcon, clearSearchResultsIcon, configureRecommendedIcon, errorIcon, extensionsViewIcon, filterIcon, infoIcon, installCountIcon, installLocalInRemoteIcon, installWorkspaceRecommendedIcon, manageExtensionIcon, preReleaseIcon, privateExtensionIcon, ratingIcon, refreshIcon, remoteIcon, sponsorIcon, starEmptyIcon, starFullIcon, starHalfIcon, syncEnabledIcon, syncIgnoredIcon, trustIcon, warningIcon };
@@ -0,0 +1,127 @@
1
+ import { Dimension } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/dom";
2
+ import { IMouseWheelEvent } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/mouseEvent";
3
+ import { CodeWindow } from "@codingame/monaco-vscode-api/vscode/vs/base/browser/window";
4
+ import { Event } from "@codingame/monaco-vscode-api/vscode/vs/base/common/event";
5
+ import { IDisposable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/lifecycle";
6
+ import { IObservable } from "@codingame/monaco-vscode-api/vscode/vs/base/common/observable";
7
+ import { URI } from "@codingame/monaco-vscode-api/vscode/vs/base/common/uri";
8
+ import { RawContextKey } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey";
9
+ import { IContextKeyService } from "@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey.service";
10
+ import { ExtensionIdentifier } from "@codingame/monaco-vscode-api/vscode/vs/platform/extensions/common/extensions";
11
+ import { IStorageService } from "@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service";
12
+ import { IWebviewPortMapping } from "@codingame/monaco-vscode-view-common-service-override/vscode/vs/platform/webview/common/webviewPortMapping";
13
+ export declare const KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE: RawContextKey<boolean>;
14
+ export declare const KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED: RawContextKey<boolean>;
15
+ export declare const KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED: RawContextKey<boolean>;
16
+ export interface WebviewInitInfo {
17
+ readonly providedViewType?: string;
18
+ readonly origin?: string;
19
+ readonly title: string | undefined;
20
+ readonly options: WebviewOptions;
21
+ readonly contentOptions: WebviewContentOptions;
22
+ readonly extension: WebviewExtensionDescription | undefined;
23
+ }
24
+ export declare enum WebviewContentPurpose {
25
+ NotebookRenderer = "notebookRenderer",
26
+ CustomEditor = "customEditor",
27
+ WebviewView = "webviewView",
28
+ ChatOutputItem = "chatOutputItem"
29
+ }
30
+ export type WebviewStyles = {
31
+ readonly [key: string]: string | number;
32
+ };
33
+ export interface WebviewOptions {
34
+ readonly purpose?: WebviewContentPurpose;
35
+ readonly customClasses?: string;
36
+ readonly enableFindWidget?: boolean;
37
+ readonly disableServiceWorker?: boolean;
38
+ readonly tryRestoreScrollPosition?: boolean;
39
+ readonly retainContextWhenHidden?: boolean;
40
+ transformCssVariables?(styles: WebviewStyles): WebviewStyles;
41
+ }
42
+ export interface WebviewContentOptions {
43
+ readonly allowMultipleAPIAcquire?: boolean;
44
+ readonly allowScripts?: boolean;
45
+ readonly allowForms?: boolean;
46
+ readonly localResourceRoots?: readonly URI[];
47
+ readonly portMapping?: readonly IWebviewPortMapping[];
48
+ readonly enableCommandUris?: boolean | readonly string[];
49
+ }
50
+ export declare function areWebviewContentOptionsEqual(a: WebviewContentOptions, b: WebviewContentOptions): boolean;
51
+ export interface WebviewExtensionDescription {
52
+ readonly location?: URI;
53
+ readonly id: ExtensionIdentifier;
54
+ }
55
+ export interface WebviewMessageReceivedEvent {
56
+ readonly message: any;
57
+ readonly transfer?: readonly ArrayBuffer[];
58
+ }
59
+ export interface IWebview extends IDisposable {
60
+ readonly providedViewType?: string;
61
+ readonly origin: string;
62
+ setHtml(html: string): void;
63
+ setTitle(title: string): void;
64
+ contentOptions: WebviewContentOptions;
65
+ localResourcesRoot: readonly URI[];
66
+ extension: WebviewExtensionDescription | undefined;
67
+ initialScrollProgress: number;
68
+ state: string | undefined;
69
+ readonly isFocused: boolean;
70
+ readonly onDidFocus: Event<void>;
71
+ readonly onDidBlur: Event<void>;
72
+ readonly onDidDispose: Event<void>;
73
+ readonly onDidClickLink: Event<string>;
74
+ readonly onDidScroll: Event<{
75
+ readonly scrollYPercentage: number;
76
+ }>;
77
+ readonly onDidWheel: Event<IMouseWheelEvent>;
78
+ readonly onDidUpdateState: Event<string | undefined>;
79
+ readonly intrinsicContentSize: IObservable<{
80
+ readonly width: number;
81
+ readonly height: number;
82
+ } | undefined>;
83
+ readonly onFatalError: Event<{
84
+ readonly message: string;
85
+ }>;
86
+ readonly onMissingCsp: Event<ExtensionIdentifier>;
87
+ readonly onMessage: Event<WebviewMessageReceivedEvent>;
88
+ postMessage(message: any, transfer?: readonly ArrayBuffer[]): Promise<boolean>;
89
+ focus(): void;
90
+ reload(): void;
91
+ showFind(animated?: boolean): void;
92
+ hideFind(animated?: boolean): void;
93
+ runFindAction(previous: boolean): void;
94
+ selectAll(): void;
95
+ copy(): void;
96
+ paste(): void;
97
+ cut(): void;
98
+ undo(): void;
99
+ redo(): void;
100
+ windowDidDragStart(): void;
101
+ windowDidDragEnd(): void;
102
+ setContextKeyService(scopedContextKeyService: IContextKeyService): void;
103
+ }
104
+ export interface IWebviewElement extends IWebview {
105
+ mountTo(parent: HTMLElement, targetWindow: CodeWindow): void;
106
+ reinitializeAfterDismount(): void;
107
+ }
108
+ export interface IOverlayWebview extends IWebview {
109
+ readonly container: HTMLElement;
110
+ origin: string;
111
+ options: WebviewOptions;
112
+ claim(claimant: any, targetWindow: CodeWindow, scopedContextKeyService: IContextKeyService | undefined): void;
113
+ release(claimant: any): void;
114
+ layoutWebviewOverElement(element: HTMLElement, dimension?: Dimension, clippingContainer?: HTMLElement): void;
115
+ }
116
+ export declare class WebviewOriginStore {
117
+ private readonly _memento;
118
+ private readonly _state;
119
+ constructor(rootStorageKey: string, storageService: IStorageService);
120
+ getOrigin(viewType: string, additionalKey: string | undefined): string;
121
+ private _getKey;
122
+ }
123
+ export declare class ExtensionKeyedWebviewOriginStore {
124
+ private readonly _store;
125
+ constructor(rootStorageKey: string, storageService: IStorageService);
126
+ getOrigin(viewType: string, extId: ExtensionIdentifier): string;
127
+ }
@@ -0,0 +1,73 @@
1
+
2
+ import { __decorate, __param } from '@codingame/monaco-vscode-api/external/tslib/tslib.es6';
3
+ import { equals } from '@codingame/monaco-vscode-api/vscode/vs/base/common/arrays';
4
+ import { isEqual } from '@codingame/monaco-vscode-api/vscode/vs/base/common/resources';
5
+ import { generateUuid } from '@codingame/monaco-vscode-api/vscode/vs/base/common/uuid';
6
+ import { RawContextKey } from '@codingame/monaco-vscode-api/vscode/vs/platform/contextkey/common/contextkey';
7
+ import { StorageScope, StorageTarget } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage';
8
+ import { IStorageService } from '@codingame/monaco-vscode-api/vscode/vs/platform/storage/common/storage.service';
9
+ import { Memento } from '@codingame/monaco-vscode-60014c9d-b815-501d-83a9-4b08725c2ec2-common/vscode/vs/workbench/common/memento';
10
+
11
+ const KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE = ( new RawContextKey('webviewFindWidgetVisible', false));
12
+ const KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED = ( new RawContextKey('webviewFindWidgetFocused', false));
13
+ const KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED = ( new RawContextKey('webviewFindWidgetEnabled', false));
14
+ var WebviewContentPurpose;
15
+ (function (WebviewContentPurpose) {
16
+ WebviewContentPurpose["NotebookRenderer"] = "notebookRenderer";
17
+ WebviewContentPurpose["CustomEditor"] = "customEditor";
18
+ WebviewContentPurpose["WebviewView"] = "webviewView";
19
+ WebviewContentPurpose["ChatOutputItem"] = "chatOutputItem";
20
+ })(WebviewContentPurpose || (WebviewContentPurpose = {}));
21
+ function areWebviewContentOptionsEqual(a, b) {
22
+ return (a.allowMultipleAPIAcquire === b.allowMultipleAPIAcquire
23
+ && a.allowScripts === b.allowScripts
24
+ && a.allowForms === b.allowForms
25
+ && equals(a.localResourceRoots, b.localResourceRoots, isEqual)
26
+ && equals(a.portMapping, b.portMapping, (a, b) => a.extensionHostPort === b.extensionHostPort && a.webviewPort === b.webviewPort)
27
+ && areEnableCommandUrisEqual(a, b));
28
+ }
29
+ function areEnableCommandUrisEqual(a, b) {
30
+ if (a.enableCommandUris === b.enableCommandUris) {
31
+ return true;
32
+ }
33
+ if (Array.isArray(a.enableCommandUris) && Array.isArray(b.enableCommandUris)) {
34
+ return equals(a.enableCommandUris, b.enableCommandUris);
35
+ }
36
+ return false;
37
+ }
38
+ let WebviewOriginStore = class WebviewOriginStore {
39
+ constructor(rootStorageKey, storageService) {
40
+ this._memento = ( new Memento(rootStorageKey, storageService));
41
+ this._state = this._memento.getMemento(StorageScope.APPLICATION, StorageTarget.MACHINE);
42
+ }
43
+ getOrigin(viewType, additionalKey) {
44
+ const key = this._getKey(viewType, additionalKey);
45
+ const existing = this._state[key];
46
+ if (existing && typeof existing === 'string') {
47
+ return existing;
48
+ }
49
+ const newOrigin = generateUuid();
50
+ this._state[key] = newOrigin;
51
+ this._memento.saveMemento();
52
+ return newOrigin;
53
+ }
54
+ _getKey(viewType, additionalKey) {
55
+ return JSON.stringify({ viewType, key: additionalKey });
56
+ }
57
+ };
58
+ WebviewOriginStore = ( __decorate([
59
+ ( __param(1, IStorageService))
60
+ ], WebviewOriginStore));
61
+ let ExtensionKeyedWebviewOriginStore = class ExtensionKeyedWebviewOriginStore {
62
+ constructor(rootStorageKey, storageService) {
63
+ this._store = ( new WebviewOriginStore(rootStorageKey, storageService));
64
+ }
65
+ getOrigin(viewType, extId) {
66
+ return this._store.getOrigin(viewType, extId.value);
67
+ }
68
+ };
69
+ ExtensionKeyedWebviewOriginStore = ( __decorate([
70
+ ( __param(1, IStorageService))
71
+ ], ExtensionKeyedWebviewOriginStore));
72
+
73
+ export { ExtensionKeyedWebviewOriginStore, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_ENABLED, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_FOCUSED, KEYBINDING_CONTEXT_WEBVIEW_FIND_WIDGET_VISIBLE, WebviewContentPurpose, WebviewOriginStore, areWebviewContentOptionsEqual };
@@ -0,0 +1,3 @@
1
+ export declare const extensionDefaultIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
2
+ export declare const verifiedPublisherIcon: import("@codingame/monaco-vscode-api/vscode/vs/base/common/themables").ThemeIcon;
3
+ export declare const extensionVerifiedPublisherIconColor: string;
@@ -0,0 +1,27 @@
1
+
2
+ import { Codicon } from '@codingame/monaco-vscode-api/vscode/vs/base/common/codicons';
3
+ import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
4
+ import { registerColor } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colorUtils';
5
+ import { textLinkForeground } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/baseColors';
6
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/chartsColors';
7
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/editorColors';
8
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/inputColors';
9
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/listColors';
10
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/menuColors';
11
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/minimapColors';
12
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/miscColors';
13
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/quickpickColors';
14
+ import '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/colors/searchColors';
15
+ import { registerIcon } from '@codingame/monaco-vscode-api/vscode/vs/platform/theme/common/iconRegistry';
16
+
17
+ const extensionDefaultIcon = registerIcon('extension-default-icon', Codicon.extensionsLarge, ( localize(
18
+ 13098,
19
+ 'Icon used for the default extension in the extensions view and editor.'
20
+ )));
21
+ const verifiedPublisherIcon = registerIcon('extensions-verified-publisher', Codicon.verifiedFilled, ( localize(
22
+ 13099,
23
+ 'Icon used for the verified extension publisher in the extensions view and editor.'
24
+ )));
25
+ const extensionVerifiedPublisherIconColor = registerColor('extensionIcon.verifiedForeground', textLinkForeground, ( localize(13100, "The icon color for extension verified publisher.")), false);
26
+
27
+ export { extensionDefaultIcon, extensionVerifiedPublisherIconColor, verifiedPublisherIcon };