@codingame/monaco-vscode-api 1.69.0 → 1.69.1
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/configuration.js +178 -5
- package/dist/extHost.js +2 -1
- package/dist/files.js +225 -225
- package/dist/keybindings.js +1 -1
- package/dist/languageConfiguration.d.ts +1 -151
- package/dist/languageConfiguration.js +6 -10
- package/dist/languageService.js +1 -1
- package/dist/messages.js +5 -5
- package/dist/missing-services.js +1 -1
- package/dist/modelEditor.js +1 -1
- package/dist/monaco.d.ts +218 -99
- package/dist/monaco.js +23 -5
- package/dist/services2.js +1 -1
- package/dist/snippets.js +9 -48
- package/dist/textmate.d.ts +3 -2
- package/dist/textmate.js +7 -8
- package/dist/theme.d.ts +4 -3
- package/dist/theme.js +1 -1
- package/dist/tokenClassification.js +5 -7
- package/dist/tools.js +16 -2
- package/dist/workspaceContext.js +49 -0
- package/package.json +1 -1
|
@@ -11,10 +11,10 @@ import { ILanguageConfigurationService } from 'monaco-editor/esm/vs/editor/commo
|
|
|
11
11
|
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
12
12
|
import { Extensions } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
13
13
|
import { IndentAction } from 'monaco-editor/esm/vs/editor/common/languages/languageConfiguration.js';
|
|
14
|
+
import { o as onServicesInitialized } from './tools.js';
|
|
14
15
|
import { S as Services } from './services2.js';
|
|
15
16
|
import { bd as DEFAULT_EXTENSION } from './extHost.js';
|
|
16
|
-
import {
|
|
17
|
-
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
17
|
+
import { joinPath } from 'monaco-editor/esm/vs/base/common/resources.js';
|
|
18
18
|
function isStringArr(something) {
|
|
19
19
|
if (!Array.isArray(something)) {
|
|
20
20
|
return false;
|
|
@@ -909,19 +909,15 @@ const schema = {
|
|
|
909
909
|
};
|
|
910
910
|
const schemaRegistry = ( Registry.as(Extensions.JSONContribution));
|
|
911
911
|
schemaRegistry.registerSchema(schemaId, schema);
|
|
912
|
-
function setLanguageConfiguration(
|
|
912
|
+
function setLanguageConfiguration(path, getConfiguration) {
|
|
913
913
|
const extension = Services.get().extension ?? DEFAULT_EXTENSION;
|
|
914
|
-
|
|
915
|
-
throw new Error(`The provided resource url should have the ${extension.extensionLocation.scheme} scheme`);
|
|
916
|
-
}
|
|
917
|
-
registerExtensionFile(resource, getConfiguration);
|
|
914
|
+
registerExtensionFile(joinPath(extension.extensionLocation, path), getConfiguration);
|
|
918
915
|
}
|
|
919
|
-
function initialize() {
|
|
920
|
-
const instantiationService = StandaloneServices.get(IInstantiationService);
|
|
916
|
+
function initialize(instantiationService) {
|
|
921
917
|
instantiationService.createInstance(LanguageConfigurationFileHandler);
|
|
922
918
|
}
|
|
923
919
|
function getServiceOverride() {
|
|
924
|
-
|
|
920
|
+
onServicesInitialized(initialize);
|
|
925
921
|
return {
|
|
926
922
|
...getServiceOverride$1()
|
|
927
923
|
};
|
package/dist/languageService.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { h as ExtensionsRegistry, I as IExtensionService } from './missing-services.js';
|
|
3
3
|
import { Y 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';
|
package/dist/messages.js
CHANGED
|
@@ -54,6 +54,7 @@ import { DeferredPromise } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
|
54
54
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
55
55
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
56
56
|
import { ICodeEditorService } from 'monaco-editor/esm/vs/editor/browser/services/codeEditorService.js';
|
|
57
|
+
import { o as onServicesInitialized } from './tools.js';
|
|
57
58
|
function isErrorWithActions(obj) {
|
|
58
59
|
const candidate = obj;
|
|
59
60
|
return candidate instanceof Error && Array.isArray(candidate.actions);
|
|
@@ -3591,11 +3592,10 @@ function getServiceOverride$1(container = document.body) {
|
|
|
3591
3592
|
[( IWorkbenchLayoutService.toString())]: new SyncDescriptor(LayoutService, [container])
|
|
3592
3593
|
};
|
|
3593
3594
|
}
|
|
3594
|
-
function
|
|
3595
|
+
function initialize(instantiationService) {
|
|
3595
3596
|
const container = StandaloneServices.get(ILayoutService).container;
|
|
3596
3597
|
container.classList.add('monaco-workbench');
|
|
3597
|
-
const model =
|
|
3598
|
-
const instantiationService = StandaloneServices.get(IInstantiationService);
|
|
3598
|
+
const model = instantiationService.invokeFunction((accessor) => accessor.get(INotificationService)).model;
|
|
3599
3599
|
const notificationsToasts = instantiationService.createInstance(NotificationsToasts, container, model);
|
|
3600
3600
|
notificationsToasts.layout(getClientArea(container));
|
|
3601
3601
|
const notificationsCenter = {
|
|
@@ -3611,10 +3611,10 @@ function register() {
|
|
|
3611
3611
|
}
|
|
3612
3612
|
};
|
|
3613
3613
|
registerNotificationCommands(notificationsCenter, notificationsToasts, model);
|
|
3614
|
-
|
|
3614
|
+
instantiationService.createInstance(DialogHandlerContribution);
|
|
3615
3615
|
}
|
|
3616
3616
|
function getServiceOverride(container) {
|
|
3617
|
-
|
|
3617
|
+
onServicesInitialized(initialize);
|
|
3618
3618
|
return {
|
|
3619
3619
|
[( IDialogService.toString())]: new SyncDescriptor(DialogService),
|
|
3620
3620
|
[( INotificationService.toString())]: new SyncDescriptor(NotificationService),
|
package/dist/missing-services.js
CHANGED
|
@@ -7290,4 +7290,4 @@ registerSingleton(ISnippetsService, class SnippetsService {
|
|
|
7290
7290
|
this.getSnippetsSync = unsupported;
|
|
7291
7291
|
}
|
|
7292
7292
|
});
|
|
7293
|
-
export {
|
|
7293
|
+
export { transform as A, Barrier as B, isReadableBufferedStream as C, listenStream as D, Emitter as E, bufferedStreamToBuffer as F, readableToBuffer as G, newWriteableBufferStream as H, IExtensionService as I, newWriteableStream as J, IUserDataProfileService as K, IKeyboardLayoutService as L, IPreferencesService as M, NotImplementedError as N, ExtensionMessageCollector as O, parse as P, ITextMateService as Q, ResourceSet as R, getNodeType as S, IBrowserWorkbenchEnvironmentService as T, UserSettings as U, IHostColorSchemeService as V, IUserDataInitializationService as W, Sequencer as X, isProposedApiEnabled as a, readonly as b, checkProposedApiEnabled as c, disposed as d, ILifecycleService as e, IntervalCounter as f, assertAllDefined as g, ExtensionsRegistry as h, isStringArray as i, ILanguageDetectionService as j, IPolicyService as k, IUserDataProfilesService as l, isEmptyObject as m, NullPolicyService as n, format2 as o, getServiceMachineId as p, ResourceQueue as q, raceCancellationError as r, isReadableStream as s, peekStream as t, unsupported as u, peekReadable as v, withUndefinedAsNull as w, bufferToReadable as x, streamToBuffer as y, consumeStream as z };
|
package/dist/modelEditor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './tslib.es6.js';
|
|
2
|
-
import {
|
|
2
|
+
import { j as ILanguageDetectionService, w as withUndefinedAsNull, E as Emitter, u as unsupported } from './missing-services.js';
|
|
3
3
|
import { MutableDisposable, Disposable, toDisposable, ImmortalReference, dispose } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
4
4
|
import { ThrottledDelayer } from 'monaco-editor/esm/vs/base/common/async.js';
|
|
5
5
|
import { PLAINTEXT_LANGUAGE_ID } from 'monaco-editor/esm/vs/editor/common/languages/modesRegistry.js';
|
package/dist/monaco.d.ts
CHANGED
|
@@ -683,12 +683,6 @@ interface IContextKeyService {
|
|
|
683
683
|
updateParent(parentContextKeyService: IContextKeyService): void;
|
|
684
684
|
}
|
|
685
685
|
|
|
686
|
-
/**
|
|
687
|
-
* An interface for a JavaScript object that
|
|
688
|
-
* acts a dictionary. The keys are strings.
|
|
689
|
-
*/
|
|
690
|
-
declare type IStringDictionary<V> = Record<string, V>;
|
|
691
|
-
|
|
692
686
|
declare type JSONSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'null' | 'array' | 'object';
|
|
693
687
|
interface IJSONSchema {
|
|
694
688
|
id?: string;
|
|
@@ -778,98 +772,6 @@ interface IJSONSchemaSnippet {
|
|
|
778
772
|
bodyText?: string;
|
|
779
773
|
}
|
|
780
774
|
|
|
781
|
-
declare type PolicyName = string;
|
|
782
|
-
|
|
783
|
-
declare enum EditPresentationTypes {
|
|
784
|
-
Multiline = "multilineText",
|
|
785
|
-
Singleline = "singlelineText"
|
|
786
|
-
}
|
|
787
|
-
declare const enum ConfigurationScope {
|
|
788
|
-
/**
|
|
789
|
-
* Application specific configuration, which can be configured only in local user settings.
|
|
790
|
-
*/
|
|
791
|
-
APPLICATION = 1,
|
|
792
|
-
/**
|
|
793
|
-
* Machine specific configuration, which can be configured only in local and remote user settings.
|
|
794
|
-
*/
|
|
795
|
-
MACHINE = 2,
|
|
796
|
-
/**
|
|
797
|
-
* Window specific configuration, which can be configured in the user or workspace settings.
|
|
798
|
-
*/
|
|
799
|
-
WINDOW = 3,
|
|
800
|
-
/**
|
|
801
|
-
* Resource specific configuration, which can be configured in the user, workspace or folder settings.
|
|
802
|
-
*/
|
|
803
|
-
RESOURCE = 4,
|
|
804
|
-
/**
|
|
805
|
-
* Resource specific configuration that can be configured in language specific settings
|
|
806
|
-
*/
|
|
807
|
-
LANGUAGE_OVERRIDABLE = 5,
|
|
808
|
-
/**
|
|
809
|
-
* Machine specific configuration that can also be configured in workspace or folder settings.
|
|
810
|
-
*/
|
|
811
|
-
MACHINE_OVERRIDABLE = 6
|
|
812
|
-
}
|
|
813
|
-
interface IPolicy {
|
|
814
|
-
/**
|
|
815
|
-
* The policy name.
|
|
816
|
-
*/
|
|
817
|
-
readonly name: PolicyName;
|
|
818
|
-
/**
|
|
819
|
-
* The Code version in which this policy was introduced.
|
|
820
|
-
*/
|
|
821
|
-
readonly minimumVersion: `${number}.${number}`;
|
|
822
|
-
}
|
|
823
|
-
interface IConfigurationPropertySchema extends IJSONSchema {
|
|
824
|
-
scope?: ConfigurationScope;
|
|
825
|
-
/**
|
|
826
|
-
* When restricted, value of this configuration will be read only from trusted sources.
|
|
827
|
-
* For eg., If the workspace is not trusted, then the value of this configuration is not read from workspace settings file.
|
|
828
|
-
*/
|
|
829
|
-
restricted?: boolean;
|
|
830
|
-
/**
|
|
831
|
-
* When `false` this property is excluded from the registry. Default is to include.
|
|
832
|
-
*/
|
|
833
|
-
included?: boolean;
|
|
834
|
-
/**
|
|
835
|
-
* List of tags associated to the property.
|
|
836
|
-
* - A tag can be used for filtering
|
|
837
|
-
* - Use `experimental` tag for marking the setting as experimental. **Note:** Defaults of experimental settings can be changed by the running experiments.
|
|
838
|
-
*/
|
|
839
|
-
tags?: string[];
|
|
840
|
-
/**
|
|
841
|
-
* When enabled this setting is ignored during sync and user can override this.
|
|
842
|
-
*/
|
|
843
|
-
ignoreSync?: boolean;
|
|
844
|
-
/**
|
|
845
|
-
* When enabled this setting is ignored during sync and user cannot override this.
|
|
846
|
-
*/
|
|
847
|
-
disallowSyncIgnore?: boolean;
|
|
848
|
-
/**
|
|
849
|
-
* Labels for enumeration items
|
|
850
|
-
*/
|
|
851
|
-
enumItemLabels?: string[];
|
|
852
|
-
/**
|
|
853
|
-
* When specified, controls the presentation format of string settings.
|
|
854
|
-
* Otherwise, the presentation format defaults to `singleline`.
|
|
855
|
-
*/
|
|
856
|
-
editPresentation?: EditPresentationTypes;
|
|
857
|
-
/**
|
|
858
|
-
* When specified, gives an order number for the setting
|
|
859
|
-
* within the settings editor. Otherwise, the setting is placed at the end.
|
|
860
|
-
*/
|
|
861
|
-
order?: number;
|
|
862
|
-
/**
|
|
863
|
-
* When specified, this setting's value can always be overwritten by
|
|
864
|
-
* a system-wide policy.
|
|
865
|
-
*/
|
|
866
|
-
policy?: IPolicy;
|
|
867
|
-
}
|
|
868
|
-
declare const allSettings: {
|
|
869
|
-
properties: IStringDictionary<IConfigurationPropertySchema>;
|
|
870
|
-
patternProperties: IStringDictionary<IConfigurationPropertySchema>;
|
|
871
|
-
};
|
|
872
|
-
|
|
873
775
|
/**
|
|
874
776
|
* Configuration options for auto indentation in the editor
|
|
875
777
|
*/
|
|
@@ -1862,6 +1764,171 @@ interface IconDefinition {
|
|
|
1862
1764
|
fontCharacter: string;
|
|
1863
1765
|
}
|
|
1864
1766
|
|
|
1767
|
+
declare class RGBA {
|
|
1768
|
+
_rgbaBrand: void;
|
|
1769
|
+
/**
|
|
1770
|
+
* Red: integer in [0-255]
|
|
1771
|
+
*/
|
|
1772
|
+
readonly r: number;
|
|
1773
|
+
/**
|
|
1774
|
+
* Green: integer in [0-255]
|
|
1775
|
+
*/
|
|
1776
|
+
readonly g: number;
|
|
1777
|
+
/**
|
|
1778
|
+
* Blue: integer in [0-255]
|
|
1779
|
+
*/
|
|
1780
|
+
readonly b: number;
|
|
1781
|
+
/**
|
|
1782
|
+
* Alpha: float in [0-1]
|
|
1783
|
+
*/
|
|
1784
|
+
readonly a: number;
|
|
1785
|
+
constructor(r: number, g: number, b: number, a?: number);
|
|
1786
|
+
static equals(a: RGBA, b: RGBA): boolean;
|
|
1787
|
+
}
|
|
1788
|
+
declare class HSLA {
|
|
1789
|
+
_hslaBrand: void;
|
|
1790
|
+
/**
|
|
1791
|
+
* Hue: integer in [0, 360]
|
|
1792
|
+
*/
|
|
1793
|
+
readonly h: number;
|
|
1794
|
+
/**
|
|
1795
|
+
* Saturation: float in [0, 1]
|
|
1796
|
+
*/
|
|
1797
|
+
readonly s: number;
|
|
1798
|
+
/**
|
|
1799
|
+
* Luminosity: float in [0, 1]
|
|
1800
|
+
*/
|
|
1801
|
+
readonly l: number;
|
|
1802
|
+
/**
|
|
1803
|
+
* Alpha: float in [0, 1]
|
|
1804
|
+
*/
|
|
1805
|
+
readonly a: number;
|
|
1806
|
+
constructor(h: number, s: number, l: number, a: number);
|
|
1807
|
+
static equals(a: HSLA, b: HSLA): boolean;
|
|
1808
|
+
/**
|
|
1809
|
+
* Converts an RGB color value to HSL. Conversion formula
|
|
1810
|
+
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
1811
|
+
* Assumes r, g, and b are contained in the set [0, 255] and
|
|
1812
|
+
* returns h in the set [0, 360], s, and l in the set [0, 1].
|
|
1813
|
+
*/
|
|
1814
|
+
static fromRGBA(rgba: RGBA): HSLA;
|
|
1815
|
+
private static _hue2rgb;
|
|
1816
|
+
/**
|
|
1817
|
+
* Converts an HSL color value to RGB. Conversion formula
|
|
1818
|
+
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
1819
|
+
* Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
|
|
1820
|
+
* returns r, g, and b in the set [0, 255].
|
|
1821
|
+
*/
|
|
1822
|
+
static toRGBA(hsla: HSLA): RGBA;
|
|
1823
|
+
}
|
|
1824
|
+
declare class HSVA {
|
|
1825
|
+
_hsvaBrand: void;
|
|
1826
|
+
/**
|
|
1827
|
+
* Hue: integer in [0, 360]
|
|
1828
|
+
*/
|
|
1829
|
+
readonly h: number;
|
|
1830
|
+
/**
|
|
1831
|
+
* Saturation: float in [0, 1]
|
|
1832
|
+
*/
|
|
1833
|
+
readonly s: number;
|
|
1834
|
+
/**
|
|
1835
|
+
* Value: float in [0, 1]
|
|
1836
|
+
*/
|
|
1837
|
+
readonly v: number;
|
|
1838
|
+
/**
|
|
1839
|
+
* Alpha: float in [0, 1]
|
|
1840
|
+
*/
|
|
1841
|
+
readonly a: number;
|
|
1842
|
+
constructor(h: number, s: number, v: number, a: number);
|
|
1843
|
+
static equals(a: HSVA, b: HSVA): boolean;
|
|
1844
|
+
static fromRGBA(rgba: RGBA): HSVA;
|
|
1845
|
+
static toRGBA(hsva: HSVA): RGBA;
|
|
1846
|
+
}
|
|
1847
|
+
declare class Color {
|
|
1848
|
+
static fromHex(hex: string): Color;
|
|
1849
|
+
readonly rgba: RGBA;
|
|
1850
|
+
private _hsla?;
|
|
1851
|
+
get hsla(): HSLA;
|
|
1852
|
+
private _hsva?;
|
|
1853
|
+
get hsva(): HSVA;
|
|
1854
|
+
constructor(arg: RGBA | HSLA | HSVA);
|
|
1855
|
+
equals(other: Color | null): boolean;
|
|
1856
|
+
/**
|
|
1857
|
+
* http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
|
1858
|
+
* Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
|
|
1859
|
+
*/
|
|
1860
|
+
getRelativeLuminance(): number;
|
|
1861
|
+
private static _relativeLuminanceForComponent;
|
|
1862
|
+
/**
|
|
1863
|
+
* http://www.w3.org/TR/WCAG20/#contrast-ratiodef
|
|
1864
|
+
* Returns the contrast ration number in the set [1, 21].
|
|
1865
|
+
*/
|
|
1866
|
+
getContrastRatio(another: Color): number;
|
|
1867
|
+
/**
|
|
1868
|
+
* http://24ways.org/2010/calculating-color-contrast
|
|
1869
|
+
* Return 'true' if darker color otherwise 'false'
|
|
1870
|
+
*/
|
|
1871
|
+
isDarker(): boolean;
|
|
1872
|
+
/**
|
|
1873
|
+
* http://24ways.org/2010/calculating-color-contrast
|
|
1874
|
+
* Return 'true' if lighter color otherwise 'false'
|
|
1875
|
+
*/
|
|
1876
|
+
isLighter(): boolean;
|
|
1877
|
+
isLighterThan(another: Color): boolean;
|
|
1878
|
+
isDarkerThan(another: Color): boolean;
|
|
1879
|
+
lighten(factor: number): Color;
|
|
1880
|
+
darken(factor: number): Color;
|
|
1881
|
+
transparent(factor: number): Color;
|
|
1882
|
+
isTransparent(): boolean;
|
|
1883
|
+
isOpaque(): boolean;
|
|
1884
|
+
opposite(): Color;
|
|
1885
|
+
blend(c: Color): Color;
|
|
1886
|
+
makeOpaque(opaqueBackground: Color): Color;
|
|
1887
|
+
flatten(...backgrounds: Color[]): Color;
|
|
1888
|
+
private static _flatten;
|
|
1889
|
+
private _toString?;
|
|
1890
|
+
toString(): string;
|
|
1891
|
+
static getLighterColor(of: Color, relative: Color, factor?: number): Color;
|
|
1892
|
+
static getDarkerColor(of: Color, relative: Color, factor?: number): Color;
|
|
1893
|
+
static readonly white: Color;
|
|
1894
|
+
static readonly black: Color;
|
|
1895
|
+
static readonly red: Color;
|
|
1896
|
+
static readonly blue: Color;
|
|
1897
|
+
static readonly green: Color;
|
|
1898
|
+
static readonly cyan: Color;
|
|
1899
|
+
static readonly lightgrey: Color;
|
|
1900
|
+
static readonly transparent: Color;
|
|
1901
|
+
}
|
|
1902
|
+
declare namespace Color {
|
|
1903
|
+
namespace Format {
|
|
1904
|
+
namespace CSS {
|
|
1905
|
+
function formatRGB(color: Color): string;
|
|
1906
|
+
function formatRGBA(color: Color): string;
|
|
1907
|
+
function formatHSL(color: Color): string;
|
|
1908
|
+
function formatHSLA(color: Color): string;
|
|
1909
|
+
/**
|
|
1910
|
+
* Formats the color as #RRGGBB
|
|
1911
|
+
*/
|
|
1912
|
+
function formatHex(color: Color): string;
|
|
1913
|
+
/**
|
|
1914
|
+
* Formats the color as #RRGGBBAA
|
|
1915
|
+
* If 'compact' is set, colors without transparancy will be printed as #RRGGBB
|
|
1916
|
+
*/
|
|
1917
|
+
function formatHexA(color: Color, compact?: boolean): string;
|
|
1918
|
+
/**
|
|
1919
|
+
* The default format will use HEX if opaque and RGBA otherwise.
|
|
1920
|
+
*/
|
|
1921
|
+
function format(color: Color): string;
|
|
1922
|
+
/**
|
|
1923
|
+
* Converts an Hex color value to a Color.
|
|
1924
|
+
* returns r, g, and b are contained in the set [0, 255]
|
|
1925
|
+
* @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).
|
|
1926
|
+
*/
|
|
1927
|
+
function parseHex(hex: string): Color | null;
|
|
1928
|
+
}
|
|
1929
|
+
}
|
|
1930
|
+
}
|
|
1931
|
+
|
|
1865
1932
|
interface IDataTransferFile {
|
|
1866
1933
|
readonly name: string;
|
|
1867
1934
|
readonly uri?: URI;
|
|
@@ -2012,6 +2079,54 @@ declare namespace IMarkerData {
|
|
|
2012
2079
|
function makeKeyOptionalMessage(markerData: IMarkerData, useMessage: boolean): string;
|
|
2013
2080
|
}
|
|
2014
2081
|
|
|
2082
|
+
declare type ColorIdentifier = string;
|
|
2083
|
+
declare const enum ColorTransformType {
|
|
2084
|
+
Darken = 0,
|
|
2085
|
+
Lighten = 1,
|
|
2086
|
+
Transparent = 2,
|
|
2087
|
+
OneOf = 3,
|
|
2088
|
+
LessProminent = 4,
|
|
2089
|
+
IfDefinedThenElse = 5
|
|
2090
|
+
}
|
|
2091
|
+
declare type ColorTransform = {
|
|
2092
|
+
op: ColorTransformType.Darken;
|
|
2093
|
+
value: ColorValue;
|
|
2094
|
+
factor: number;
|
|
2095
|
+
} | {
|
|
2096
|
+
op: ColorTransformType.Lighten;
|
|
2097
|
+
value: ColorValue;
|
|
2098
|
+
factor: number;
|
|
2099
|
+
} | {
|
|
2100
|
+
op: ColorTransformType.Transparent;
|
|
2101
|
+
value: ColorValue;
|
|
2102
|
+
factor: number;
|
|
2103
|
+
} | {
|
|
2104
|
+
op: ColorTransformType.OneOf;
|
|
2105
|
+
values: readonly ColorValue[];
|
|
2106
|
+
} | {
|
|
2107
|
+
op: ColorTransformType.LessProminent;
|
|
2108
|
+
value: ColorValue;
|
|
2109
|
+
background: ColorValue;
|
|
2110
|
+
factor: number;
|
|
2111
|
+
transparency: number;
|
|
2112
|
+
} | {
|
|
2113
|
+
op: ColorTransformType.IfDefinedThenElse;
|
|
2114
|
+
if: ColorIdentifier;
|
|
2115
|
+
then: ColorValue;
|
|
2116
|
+
else: ColorValue;
|
|
2117
|
+
};
|
|
2118
|
+
interface ColorDefaults {
|
|
2119
|
+
light: ColorValue | null;
|
|
2120
|
+
dark: ColorValue | null;
|
|
2121
|
+
hcDark: ColorValue | null;
|
|
2122
|
+
hcLight: ColorValue | null;
|
|
2123
|
+
}
|
|
2124
|
+
/**
|
|
2125
|
+
* A Color Value is either a color literal, a reference to an other color or a derived color
|
|
2126
|
+
*/
|
|
2127
|
+
declare type ColorValue = Color | string | ColorIdentifier | ColorTransform;
|
|
2128
|
+
declare function registerColor(id: string, defaults: ColorDefaults | null, description: string, needsTransparency?: boolean, deprecationMessage?: string): ColorIdentifier;
|
|
2129
|
+
|
|
2015
2130
|
interface ThemeColor {
|
|
2016
2131
|
id: string;
|
|
2017
2132
|
}
|
|
@@ -4789,7 +4904,11 @@ interface IJSONContributionRegistry {
|
|
|
4789
4904
|
declare const createConfiguredEditor: typeof create;
|
|
4790
4905
|
declare const createConfiguredDiffEditor: typeof createDiffEditor;
|
|
4791
4906
|
declare const Extensions: {
|
|
4907
|
+
Configuration: string;
|
|
4792
4908
|
JSONContribution: string;
|
|
4793
4909
|
};
|
|
4910
|
+
declare type FileMatch = Partial<Record<string, string[]>>;
|
|
4911
|
+
declare function getJsonSchemas(fileMatchs?: FileMatch): monaco.languages.json.DiagnosticsOptions['schemas'];
|
|
4912
|
+
declare const onDidChangeJsonSchema: Event<string>;
|
|
4794
4913
|
|
|
4795
|
-
export { CommandsRegistry, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry,
|
|
4914
|
+
export { CommandsRegistry, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry, createConfiguredDiffEditor, createConfiguredEditor, errorHandler, getJsonSchemas, onDidChangeJsonSchema, registerColor, setCollapseStateForMatchingLines };
|
package/dist/monaco.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { _ as __decorate, a as __param } from './tslib.es6.js';
|
|
2
|
-
import { c as createInjectedClass } from './injection.js';
|
|
3
2
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
3
|
+
export { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
4
|
+
import { c as createInjectedClass } from './injection.js';
|
|
4
5
|
import { editorOptionsRegistry } from 'monaco-editor/esm/vs/editor/common/config/editorOptions.js';
|
|
5
6
|
import { equals as equals$1 } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
7
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
8
|
+
export { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
6
9
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
7
10
|
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
8
11
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
9
12
|
import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
13
|
+
import { Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
10
14
|
import { StandaloneDiffEditor, StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
|
|
11
15
|
import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
12
16
|
import { deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
@@ -14,9 +18,7 @@ export { errorHandler } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
|
14
18
|
export { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
15
19
|
export { FoldingController } from 'monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js';
|
|
16
20
|
export { FoldingModel, setCollapseStateForMatchingLines } from 'monaco-editor/esm/vs/editor/contrib/folding/browser/foldingModel.js';
|
|
17
|
-
export { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
18
21
|
export { CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
19
|
-
export { allSettings } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
20
22
|
function equals(one, other) {
|
|
21
23
|
if (one === other) {
|
|
22
24
|
return true;
|
|
@@ -238,6 +240,22 @@ const createConfiguredDiffEditor = (domElement, options, override) => {
|
|
|
238
240
|
return instantiationService.createInstance(ConfiguredStandaloneDiffEditor, domElement, options);
|
|
239
241
|
};
|
|
240
242
|
const Extensions = {
|
|
241
|
-
...Extensions$1
|
|
243
|
+
...Extensions$1,
|
|
244
|
+
...Extensions$2
|
|
242
245
|
};
|
|
243
|
-
|
|
246
|
+
const registry = ( Registry.as(Extensions.JSONContribution));
|
|
247
|
+
function getJsonSchemas(fileMatchs = {}) {
|
|
248
|
+
return Object.entries(registry.getSchemaContributions().schemas)
|
|
249
|
+
.filter(([uri]) => uri !== 'vscode://schemas/vscode-extensions')
|
|
250
|
+
.map(([uri, schema]) => {
|
|
251
|
+
const path = monaco.Uri.parse(uri).path;
|
|
252
|
+
const schemaName = path.slice(1);
|
|
253
|
+
return {
|
|
254
|
+
uri,
|
|
255
|
+
schema,
|
|
256
|
+
fileMatch: schemaName != null ? fileMatchs[schemaName] : undefined
|
|
257
|
+
};
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
const onDidChangeJsonSchema = registry.onDidChangeSchema;
|
|
261
|
+
export { Extensions, createConfiguredDiffEditor, createConfiguredEditor, getJsonSchemas, onDidChangeJsonSchema };
|
package/dist/services2.js
CHANGED
|
@@ -420,4 +420,4 @@ var Services;
|
|
|
420
420
|
}
|
|
421
421
|
Services.install = install;
|
|
422
422
|
})(Services || (Services = {})));
|
|
423
|
-
export { ACTIVE_GROUP as A,
|
|
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 };
|
package/dist/snippets.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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';
|
|
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 './tslib.es6.js';
|
|
4
4
|
import * as monacoSuggest from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
|
|
@@ -12,7 +12,7 @@ import { SnippetParser, Placeholder, Variable, Text } from 'monaco-editor/esm/vs
|
|
|
12
12
|
import { tail, insertInto } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
13
13
|
import { KnownSnippetVariableNames } from 'monaco-editor/esm/vs/editor/contrib/snippet/browser/snippetVariables.js';
|
|
14
14
|
import { l as languagesExtPoint } from './languageService.js';
|
|
15
|
-
import { bd as DEFAULT_EXTENSION,
|
|
15
|
+
import { bd as DEFAULT_EXTENSION, bk as Range$2 } from './extHost.js';
|
|
16
16
|
import { CommandsRegistry } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
17
17
|
import { getWordAtText } from 'monaco-editor/esm/vs/editor/common/core/wordHelper.js';
|
|
18
18
|
import { isPatternInWord } from 'monaco-editor/esm/vs/base/common/filters.js';
|
|
@@ -25,13 +25,13 @@ import { I as IExtensionResourceLoaderService, r as registerExtensionFile } from
|
|
|
25
25
|
import { DisposableStore, combinedDisposable } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
26
26
|
import { ResourceMap } from 'monaco-editor/esm/vs/base/common/map.js';
|
|
27
27
|
import { IEnvironmentService } from 'monaco-editor/esm/vs/platform/environment/common/environment.js';
|
|
28
|
-
import { IWorkspaceContextService
|
|
28
|
+
import { IWorkspaceContextService } from 'monaco-editor/esm/vs/platform/workspace/common/workspace.js';
|
|
29
29
|
import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
30
30
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
31
31
|
import { IStorageService } from 'monaco-editor/esm/vs/platform/storage/common/storage.js';
|
|
32
|
-
import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
|
|
32
|
+
import { g as getExtensionPoint, c as consoleExtensionMessageHandler, o as onServicesInitialized } from './tools.js';
|
|
33
|
+
import { g as getServiceOverride$1 } from './workspaceContext.js';
|
|
33
34
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
34
|
-
import { Event } from 'monaco-editor/esm/vs/base/common/event.js';
|
|
35
35
|
function setSnippetSuggestSupport (support) {
|
|
36
36
|
if (monacoSuggest.setSnippetSuggestSupport != null) {
|
|
37
37
|
monacoSuggest.setSnippetSuggestSupport(support);
|
|
@@ -840,49 +840,6 @@ SnippetsService = ( (__decorate([
|
|
|
840
840
|
( (__param(9, IInstantiationService))),
|
|
841
841
|
( (__param(10, ILanguageConfigurationService)))
|
|
842
842
|
], SnippetsService)));
|
|
843
|
-
class SimpleWorkspaceContextService {
|
|
844
|
-
constructor() {
|
|
845
|
-
this.onDidChangeWorkspaceName = Event.None;
|
|
846
|
-
this.onWillChangeWorkspaceFolders = Event.None;
|
|
847
|
-
this.onDidChangeWorkspaceFolders = Event.None;
|
|
848
|
-
this.onDidChangeWorkbenchState = Event.None;
|
|
849
|
-
this.isCurrentWorkspace = unsupported;
|
|
850
|
-
}
|
|
851
|
-
getCompleteWorkspace() {
|
|
852
|
-
return Promise.resolve(this.getWorkspace());
|
|
853
|
-
}
|
|
854
|
-
getWorkspace() {
|
|
855
|
-
const workspaceFolders = Services.get().workspace?.workspaceFolders;
|
|
856
|
-
return {
|
|
857
|
-
id: '4064f6ec-cb38-4ad0-af64-ee6467e63c82',
|
|
858
|
-
folders: workspaceFolders?.map(folder => new WorkspaceFolder(folder)) ?? []
|
|
859
|
-
};
|
|
860
|
-
}
|
|
861
|
-
getWorkbenchState() {
|
|
862
|
-
const workspaceFoldersCount = Services.get().workspace?.workspaceFolders?.length ?? 1;
|
|
863
|
-
if (workspaceFoldersCount === 0) {
|
|
864
|
-
return 1 ;
|
|
865
|
-
}
|
|
866
|
-
else if (workspaceFoldersCount === 1) {
|
|
867
|
-
return 2 ;
|
|
868
|
-
}
|
|
869
|
-
else {
|
|
870
|
-
return 3 ;
|
|
871
|
-
}
|
|
872
|
-
}
|
|
873
|
-
getWorkspaceFolder(resource) {
|
|
874
|
-
const workspace = this.getWorkspace();
|
|
875
|
-
return workspace.folders.find(folder => folder.uri.scheme === resource.scheme && resource.path.startsWith(folder.uri.path)) ?? null;
|
|
876
|
-
}
|
|
877
|
-
isInsideWorkspace(resource) {
|
|
878
|
-
return this.getWorkspaceFolder(resource) != null;
|
|
879
|
-
}
|
|
880
|
-
}
|
|
881
|
-
function getServiceOverride$1() {
|
|
882
|
-
return {
|
|
883
|
-
[( IWorkspaceContextService.toString())]: new SyncDescriptor(SimpleWorkspaceContextService)
|
|
884
|
-
};
|
|
885
|
-
}
|
|
886
843
|
const snippetExtensionPoint = getExtensionPoint('snippets');
|
|
887
844
|
function setSnippets(snippets, getContent, extension = Services.get().extension ?? DEFAULT_EXTENSION) {
|
|
888
845
|
snippetExtensionPoint.acceptUsers([{
|
|
@@ -894,7 +851,11 @@ function setSnippets(snippets, getContent, extension = Services.get().extension
|
|
|
894
851
|
registerExtensionFile(joinPath(extension.extensionLocation, snippet.path), () => getContent(snippet));
|
|
895
852
|
}
|
|
896
853
|
}
|
|
854
|
+
function initialize(instantiationService) {
|
|
855
|
+
instantiationService.invokeFunction((accessor) => accessor.get(ISnippetsService));
|
|
856
|
+
}
|
|
897
857
|
function getServiceOverride() {
|
|
858
|
+
onServicesInitialized(initialize);
|
|
898
859
|
return {
|
|
899
860
|
...getServiceOverride$1(),
|
|
900
861
|
[( ISnippetsService.toString())]: new SyncDescriptor(SnippetsService)
|
package/dist/textmate.d.ts
CHANGED
|
@@ -676,7 +676,8 @@ interface ITMSyntaxExtensionPoint {
|
|
|
676
676
|
unbalancedBracketScopes: string[];
|
|
677
677
|
}
|
|
678
678
|
|
|
679
|
-
declare
|
|
679
|
+
declare type PartialITMSyntaxExtensionPoint = Partial<ITMSyntaxExtensionPoint> & Pick<ITMSyntaxExtensionPoint, 'path' | 'scopeName'>;
|
|
680
|
+
declare function setGrammars<T extends PartialITMSyntaxExtensionPoint>(grammars: T[], getContent: (grammar: T) => Promise<string>, extension?: IExtensionDescription): void;
|
|
680
681
|
declare function getServiceOverride(getOnigLib: () => Promise<Response | ArrayBuffer>): IEditorOverrideServices;
|
|
681
682
|
|
|
682
|
-
export { ITMSyntaxExtensionPoint, ITextMateService, getServiceOverride as default, setGrammars };
|
|
683
|
+
export { PartialITMSyntaxExtensionPoint as ITMSyntaxExtensionPoint, ITextMateService, getServiceOverride as default, setGrammars };
|