@codingame/monaco-vscode-api 1.69.0 → 1.69.3
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/README.md +24 -0
- package/dist/configuration.js +179 -6
- package/dist/contextkey.js +387 -0
- package/dist/extHost.js +3 -2
- package/dist/files.js +226 -226
- package/dist/keybindings.js +2 -2
- package/dist/languageConfiguration.d.ts +1 -151
- package/dist/languageConfiguration.js +7 -11
- package/dist/languageService.js +2 -2
- package/dist/messages.js +6 -6
- package/dist/missing-services.js +507 -378
- package/dist/modelEditor.js +2 -2
- package/dist/monaco.d.ts +236 -99
- package/dist/monaco.js +25 -6
- package/dist/services.d.ts +19 -1
- package/dist/services.js +1 -0
- package/dist/services2.js +1 -1
- package/dist/snippets.js +10 -49
- package/dist/textmate.d.ts +3 -2
- package/dist/textmate.js +8 -9
- package/dist/theme.d.ts +4 -3
- package/dist/theme.js +2 -2
- package/dist/tokenClassification.js +5 -7
- package/dist/tools.js +16 -2
- package/dist/workspaceContext.js +49 -0
- package/package.json +7 -7
- package/dist/tslib.es6.js +0 -21
package/dist/modelEditor.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
2
|
-
import {
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
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
|
@@ -375,6 +375,24 @@ interface ServiceIdentifier<T> {
|
|
|
375
375
|
type: T;
|
|
376
376
|
}
|
|
377
377
|
|
|
378
|
+
declare const enum ContextKeyExprType {
|
|
379
|
+
False = 0,
|
|
380
|
+
True = 1,
|
|
381
|
+
Defined = 2,
|
|
382
|
+
Not = 3,
|
|
383
|
+
Equals = 4,
|
|
384
|
+
NotEquals = 5,
|
|
385
|
+
And = 6,
|
|
386
|
+
Regex = 7,
|
|
387
|
+
NotRegex = 8,
|
|
388
|
+
Or = 9,
|
|
389
|
+
In = 10,
|
|
390
|
+
NotIn = 11,
|
|
391
|
+
Greater = 12,
|
|
392
|
+
GreaterEquals = 13,
|
|
393
|
+
Smaller = 14,
|
|
394
|
+
SmallerEquals = 15
|
|
395
|
+
}
|
|
378
396
|
interface IContextKeyExprMapper {
|
|
379
397
|
mapDefined(key: string): ContextKeyExpression;
|
|
380
398
|
mapNot(key: string): ContextKeyExpression;
|
|
@@ -683,12 +701,6 @@ interface IContextKeyService {
|
|
|
683
701
|
updateParent(parentContextKeyService: IContextKeyService): void;
|
|
684
702
|
}
|
|
685
703
|
|
|
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
704
|
declare type JSONSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'null' | 'array' | 'object';
|
|
693
705
|
interface IJSONSchema {
|
|
694
706
|
id?: string;
|
|
@@ -778,98 +790,6 @@ interface IJSONSchemaSnippet {
|
|
|
778
790
|
bodyText?: string;
|
|
779
791
|
}
|
|
780
792
|
|
|
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
793
|
/**
|
|
874
794
|
* Configuration options for auto indentation in the editor
|
|
875
795
|
*/
|
|
@@ -1862,6 +1782,171 @@ interface IconDefinition {
|
|
|
1862
1782
|
fontCharacter: string;
|
|
1863
1783
|
}
|
|
1864
1784
|
|
|
1785
|
+
declare class RGBA {
|
|
1786
|
+
_rgbaBrand: void;
|
|
1787
|
+
/**
|
|
1788
|
+
* Red: integer in [0-255]
|
|
1789
|
+
*/
|
|
1790
|
+
readonly r: number;
|
|
1791
|
+
/**
|
|
1792
|
+
* Green: integer in [0-255]
|
|
1793
|
+
*/
|
|
1794
|
+
readonly g: number;
|
|
1795
|
+
/**
|
|
1796
|
+
* Blue: integer in [0-255]
|
|
1797
|
+
*/
|
|
1798
|
+
readonly b: number;
|
|
1799
|
+
/**
|
|
1800
|
+
* Alpha: float in [0-1]
|
|
1801
|
+
*/
|
|
1802
|
+
readonly a: number;
|
|
1803
|
+
constructor(r: number, g: number, b: number, a?: number);
|
|
1804
|
+
static equals(a: RGBA, b: RGBA): boolean;
|
|
1805
|
+
}
|
|
1806
|
+
declare class HSLA {
|
|
1807
|
+
_hslaBrand: void;
|
|
1808
|
+
/**
|
|
1809
|
+
* Hue: integer in [0, 360]
|
|
1810
|
+
*/
|
|
1811
|
+
readonly h: number;
|
|
1812
|
+
/**
|
|
1813
|
+
* Saturation: float in [0, 1]
|
|
1814
|
+
*/
|
|
1815
|
+
readonly s: number;
|
|
1816
|
+
/**
|
|
1817
|
+
* Luminosity: float in [0, 1]
|
|
1818
|
+
*/
|
|
1819
|
+
readonly l: number;
|
|
1820
|
+
/**
|
|
1821
|
+
* Alpha: float in [0, 1]
|
|
1822
|
+
*/
|
|
1823
|
+
readonly a: number;
|
|
1824
|
+
constructor(h: number, s: number, l: number, a: number);
|
|
1825
|
+
static equals(a: HSLA, b: HSLA): boolean;
|
|
1826
|
+
/**
|
|
1827
|
+
* Converts an RGB color value to HSL. Conversion formula
|
|
1828
|
+
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
1829
|
+
* Assumes r, g, and b are contained in the set [0, 255] and
|
|
1830
|
+
* returns h in the set [0, 360], s, and l in the set [0, 1].
|
|
1831
|
+
*/
|
|
1832
|
+
static fromRGBA(rgba: RGBA): HSLA;
|
|
1833
|
+
private static _hue2rgb;
|
|
1834
|
+
/**
|
|
1835
|
+
* Converts an HSL color value to RGB. Conversion formula
|
|
1836
|
+
* adapted from http://en.wikipedia.org/wiki/HSL_color_space.
|
|
1837
|
+
* Assumes h in the set [0, 360] s, and l are contained in the set [0, 1] and
|
|
1838
|
+
* returns r, g, and b in the set [0, 255].
|
|
1839
|
+
*/
|
|
1840
|
+
static toRGBA(hsla: HSLA): RGBA;
|
|
1841
|
+
}
|
|
1842
|
+
declare class HSVA {
|
|
1843
|
+
_hsvaBrand: void;
|
|
1844
|
+
/**
|
|
1845
|
+
* Hue: integer in [0, 360]
|
|
1846
|
+
*/
|
|
1847
|
+
readonly h: number;
|
|
1848
|
+
/**
|
|
1849
|
+
* Saturation: float in [0, 1]
|
|
1850
|
+
*/
|
|
1851
|
+
readonly s: number;
|
|
1852
|
+
/**
|
|
1853
|
+
* Value: float in [0, 1]
|
|
1854
|
+
*/
|
|
1855
|
+
readonly v: number;
|
|
1856
|
+
/**
|
|
1857
|
+
* Alpha: float in [0, 1]
|
|
1858
|
+
*/
|
|
1859
|
+
readonly a: number;
|
|
1860
|
+
constructor(h: number, s: number, v: number, a: number);
|
|
1861
|
+
static equals(a: HSVA, b: HSVA): boolean;
|
|
1862
|
+
static fromRGBA(rgba: RGBA): HSVA;
|
|
1863
|
+
static toRGBA(hsva: HSVA): RGBA;
|
|
1864
|
+
}
|
|
1865
|
+
declare class Color {
|
|
1866
|
+
static fromHex(hex: string): Color;
|
|
1867
|
+
readonly rgba: RGBA;
|
|
1868
|
+
private _hsla?;
|
|
1869
|
+
get hsla(): HSLA;
|
|
1870
|
+
private _hsva?;
|
|
1871
|
+
get hsva(): HSVA;
|
|
1872
|
+
constructor(arg: RGBA | HSLA | HSVA);
|
|
1873
|
+
equals(other: Color | null): boolean;
|
|
1874
|
+
/**
|
|
1875
|
+
* http://www.w3.org/TR/WCAG20/#relativeluminancedef
|
|
1876
|
+
* Returns the number in the set [0, 1]. O => Darkest Black. 1 => Lightest white.
|
|
1877
|
+
*/
|
|
1878
|
+
getRelativeLuminance(): number;
|
|
1879
|
+
private static _relativeLuminanceForComponent;
|
|
1880
|
+
/**
|
|
1881
|
+
* http://www.w3.org/TR/WCAG20/#contrast-ratiodef
|
|
1882
|
+
* Returns the contrast ration number in the set [1, 21].
|
|
1883
|
+
*/
|
|
1884
|
+
getContrastRatio(another: Color): number;
|
|
1885
|
+
/**
|
|
1886
|
+
* http://24ways.org/2010/calculating-color-contrast
|
|
1887
|
+
* Return 'true' if darker color otherwise 'false'
|
|
1888
|
+
*/
|
|
1889
|
+
isDarker(): boolean;
|
|
1890
|
+
/**
|
|
1891
|
+
* http://24ways.org/2010/calculating-color-contrast
|
|
1892
|
+
* Return 'true' if lighter color otherwise 'false'
|
|
1893
|
+
*/
|
|
1894
|
+
isLighter(): boolean;
|
|
1895
|
+
isLighterThan(another: Color): boolean;
|
|
1896
|
+
isDarkerThan(another: Color): boolean;
|
|
1897
|
+
lighten(factor: number): Color;
|
|
1898
|
+
darken(factor: number): Color;
|
|
1899
|
+
transparent(factor: number): Color;
|
|
1900
|
+
isTransparent(): boolean;
|
|
1901
|
+
isOpaque(): boolean;
|
|
1902
|
+
opposite(): Color;
|
|
1903
|
+
blend(c: Color): Color;
|
|
1904
|
+
makeOpaque(opaqueBackground: Color): Color;
|
|
1905
|
+
flatten(...backgrounds: Color[]): Color;
|
|
1906
|
+
private static _flatten;
|
|
1907
|
+
private _toString?;
|
|
1908
|
+
toString(): string;
|
|
1909
|
+
static getLighterColor(of: Color, relative: Color, factor?: number): Color;
|
|
1910
|
+
static getDarkerColor(of: Color, relative: Color, factor?: number): Color;
|
|
1911
|
+
static readonly white: Color;
|
|
1912
|
+
static readonly black: Color;
|
|
1913
|
+
static readonly red: Color;
|
|
1914
|
+
static readonly blue: Color;
|
|
1915
|
+
static readonly green: Color;
|
|
1916
|
+
static readonly cyan: Color;
|
|
1917
|
+
static readonly lightgrey: Color;
|
|
1918
|
+
static readonly transparent: Color;
|
|
1919
|
+
}
|
|
1920
|
+
declare namespace Color {
|
|
1921
|
+
namespace Format {
|
|
1922
|
+
namespace CSS {
|
|
1923
|
+
function formatRGB(color: Color): string;
|
|
1924
|
+
function formatRGBA(color: Color): string;
|
|
1925
|
+
function formatHSL(color: Color): string;
|
|
1926
|
+
function formatHSLA(color: Color): string;
|
|
1927
|
+
/**
|
|
1928
|
+
* Formats the color as #RRGGBB
|
|
1929
|
+
*/
|
|
1930
|
+
function formatHex(color: Color): string;
|
|
1931
|
+
/**
|
|
1932
|
+
* Formats the color as #RRGGBBAA
|
|
1933
|
+
* If 'compact' is set, colors without transparancy will be printed as #RRGGBB
|
|
1934
|
+
*/
|
|
1935
|
+
function formatHexA(color: Color, compact?: boolean): string;
|
|
1936
|
+
/**
|
|
1937
|
+
* The default format will use HEX if opaque and RGBA otherwise.
|
|
1938
|
+
*/
|
|
1939
|
+
function format(color: Color): string;
|
|
1940
|
+
/**
|
|
1941
|
+
* Converts an Hex color value to a Color.
|
|
1942
|
+
* returns r, g, and b are contained in the set [0, 255]
|
|
1943
|
+
* @param hex string (#RGB, #RGBA, #RRGGBB or #RRGGBBAA).
|
|
1944
|
+
*/
|
|
1945
|
+
function parseHex(hex: string): Color | null;
|
|
1946
|
+
}
|
|
1947
|
+
}
|
|
1948
|
+
}
|
|
1949
|
+
|
|
1865
1950
|
interface IDataTransferFile {
|
|
1866
1951
|
readonly name: string;
|
|
1867
1952
|
readonly uri?: URI;
|
|
@@ -2012,6 +2097,54 @@ declare namespace IMarkerData {
|
|
|
2012
2097
|
function makeKeyOptionalMessage(markerData: IMarkerData, useMessage: boolean): string;
|
|
2013
2098
|
}
|
|
2014
2099
|
|
|
2100
|
+
declare type ColorIdentifier = string;
|
|
2101
|
+
declare const enum ColorTransformType {
|
|
2102
|
+
Darken = 0,
|
|
2103
|
+
Lighten = 1,
|
|
2104
|
+
Transparent = 2,
|
|
2105
|
+
OneOf = 3,
|
|
2106
|
+
LessProminent = 4,
|
|
2107
|
+
IfDefinedThenElse = 5
|
|
2108
|
+
}
|
|
2109
|
+
declare type ColorTransform = {
|
|
2110
|
+
op: ColorTransformType.Darken;
|
|
2111
|
+
value: ColorValue;
|
|
2112
|
+
factor: number;
|
|
2113
|
+
} | {
|
|
2114
|
+
op: ColorTransformType.Lighten;
|
|
2115
|
+
value: ColorValue;
|
|
2116
|
+
factor: number;
|
|
2117
|
+
} | {
|
|
2118
|
+
op: ColorTransformType.Transparent;
|
|
2119
|
+
value: ColorValue;
|
|
2120
|
+
factor: number;
|
|
2121
|
+
} | {
|
|
2122
|
+
op: ColorTransformType.OneOf;
|
|
2123
|
+
values: readonly ColorValue[];
|
|
2124
|
+
} | {
|
|
2125
|
+
op: ColorTransformType.LessProminent;
|
|
2126
|
+
value: ColorValue;
|
|
2127
|
+
background: ColorValue;
|
|
2128
|
+
factor: number;
|
|
2129
|
+
transparency: number;
|
|
2130
|
+
} | {
|
|
2131
|
+
op: ColorTransformType.IfDefinedThenElse;
|
|
2132
|
+
if: ColorIdentifier;
|
|
2133
|
+
then: ColorValue;
|
|
2134
|
+
else: ColorValue;
|
|
2135
|
+
};
|
|
2136
|
+
interface ColorDefaults {
|
|
2137
|
+
light: ColorValue | null;
|
|
2138
|
+
dark: ColorValue | null;
|
|
2139
|
+
hcDark: ColorValue | null;
|
|
2140
|
+
hcLight: ColorValue | null;
|
|
2141
|
+
}
|
|
2142
|
+
/**
|
|
2143
|
+
* A Color Value is either a color literal, a reference to an other color or a derived color
|
|
2144
|
+
*/
|
|
2145
|
+
declare type ColorValue = Color | string | ColorIdentifier | ColorTransform;
|
|
2146
|
+
declare function registerColor(id: string, defaults: ColorDefaults | null, description: string, needsTransparency?: boolean, deprecationMessage?: string): ColorIdentifier;
|
|
2147
|
+
|
|
2015
2148
|
interface ThemeColor {
|
|
2016
2149
|
id: string;
|
|
2017
2150
|
}
|
|
@@ -4789,7 +4922,11 @@ interface IJSONContributionRegistry {
|
|
|
4789
4922
|
declare const createConfiguredEditor: typeof create;
|
|
4790
4923
|
declare const createConfiguredDiffEditor: typeof createDiffEditor;
|
|
4791
4924
|
declare const Extensions: {
|
|
4925
|
+
Configuration: string;
|
|
4792
4926
|
JSONContribution: string;
|
|
4793
4927
|
};
|
|
4928
|
+
declare type FileMatch = Partial<Record<string, string[]>>;
|
|
4929
|
+
declare function getJsonSchemas(fileMatchs?: FileMatch): monaco.languages.json.DiagnosticsOptions['schemas'];
|
|
4930
|
+
declare const onDidChangeJsonSchema: Event<string>;
|
|
4794
4931
|
|
|
4795
|
-
export { CommandsRegistry, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry,
|
|
4932
|
+
export { CommandsRegistry, ContextKeyExprType, DisposableStore, Extensions, FoldingController, FoldingModel, IJSONContributionRegistry, IJSONSchema, Registry, createConfiguredDiffEditor, createConfiguredEditor, errorHandler, getJsonSchemas, onDidChangeJsonSchema, registerColor, setCollapseStateForMatchingLines };
|
package/dist/monaco.js
CHANGED
|
@@ -1,12 +1,17 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
2
|
-
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
+
export { C as ContextKeyExprType } from './contextkey.js';
|
|
3
3
|
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api.js';
|
|
4
|
+
export { registerColor } from 'monaco-editor/esm/vs/platform/theme/common/colorRegistry.js';
|
|
5
|
+
import { c as createInjectedClass } from './injection.js';
|
|
4
6
|
import { editorOptionsRegistry } from 'monaco-editor/esm/vs/editor/common/config/editorOptions.js';
|
|
5
7
|
import { equals as equals$1 } from 'monaco-editor/esm/vs/base/common/arrays.js';
|
|
8
|
+
import { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
9
|
+
export { Registry } from 'monaco-editor/esm/vs/platform/registry/common/platform.js';
|
|
6
10
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
7
11
|
import { ITextResourceConfigurationService } from 'monaco-editor/esm/vs/editor/common/services/textResourceConfiguration.js';
|
|
8
12
|
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
9
13
|
import { Extensions as Extensions$1 } from 'monaco-editor/esm/vs/platform/jsonschemas/common/jsonContributionRegistry.js';
|
|
14
|
+
import { Extensions as Extensions$2 } from 'monaco-editor/esm/vs/platform/configuration/common/configurationRegistry.js';
|
|
10
15
|
import { StandaloneDiffEditor, StandaloneEditor } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneCodeEditor.js';
|
|
11
16
|
import { isObject } from 'monaco-editor/esm/vs/base/common/types.js';
|
|
12
17
|
import { deepClone } from 'monaco-editor/esm/vs/base/common/objects.js';
|
|
@@ -14,9 +19,7 @@ export { errorHandler } from 'monaco-editor/esm/vs/base/common/errors.js';
|
|
|
14
19
|
export { DisposableStore } from 'monaco-editor/esm/vs/base/common/lifecycle.js';
|
|
15
20
|
export { FoldingController } from 'monaco-editor/esm/vs/editor/contrib/folding/browser/folding.js';
|
|
16
21
|
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
22
|
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
23
|
function equals(one, other) {
|
|
21
24
|
if (one === other) {
|
|
22
25
|
return true;
|
|
@@ -238,6 +241,22 @@ const createConfiguredDiffEditor = (domElement, options, override) => {
|
|
|
238
241
|
return instantiationService.createInstance(ConfiguredStandaloneDiffEditor, domElement, options);
|
|
239
242
|
};
|
|
240
243
|
const Extensions = {
|
|
241
|
-
...Extensions$1
|
|
244
|
+
...Extensions$1,
|
|
245
|
+
...Extensions$2
|
|
242
246
|
};
|
|
243
|
-
|
|
247
|
+
const registry = ( Registry.as(Extensions.JSONContribution));
|
|
248
|
+
function getJsonSchemas(fileMatchs = {}) {
|
|
249
|
+
return Object.entries(registry.getSchemaContributions().schemas)
|
|
250
|
+
.filter(([uri]) => uri !== 'vscode://schemas/vscode-extensions')
|
|
251
|
+
.map(([uri, schema]) => {
|
|
252
|
+
const path = monaco.Uri.parse(uri).path;
|
|
253
|
+
const schemaName = path.slice(1);
|
|
254
|
+
return {
|
|
255
|
+
uri,
|
|
256
|
+
schema,
|
|
257
|
+
fileMatch: schemaName != null ? fileMatchs[schemaName] : undefined
|
|
258
|
+
};
|
|
259
|
+
});
|
|
260
|
+
}
|
|
261
|
+
const onDidChangeJsonSchema = registry.onDidChangeSchema;
|
|
262
|
+
export { Extensions, createConfiguredDiffEditor, createConfiguredEditor, getJsonSchemas, onDidChangeJsonSchema };
|
package/dist/services.d.ts
CHANGED
|
@@ -4914,6 +4914,24 @@ declare class IndentRulesSupport {
|
|
|
4914
4914
|
getIndentMetadata(text: string): number;
|
|
4915
4915
|
}
|
|
4916
4916
|
|
|
4917
|
+
declare const enum ContextKeyExprType {
|
|
4918
|
+
False = 0,
|
|
4919
|
+
True = 1,
|
|
4920
|
+
Defined = 2,
|
|
4921
|
+
Not = 3,
|
|
4922
|
+
Equals = 4,
|
|
4923
|
+
NotEquals = 5,
|
|
4924
|
+
And = 6,
|
|
4925
|
+
Regex = 7,
|
|
4926
|
+
NotRegex = 8,
|
|
4927
|
+
Or = 9,
|
|
4928
|
+
In = 10,
|
|
4929
|
+
NotIn = 11,
|
|
4930
|
+
Greater = 12,
|
|
4931
|
+
GreaterEquals = 13,
|
|
4932
|
+
Smaller = 14,
|
|
4933
|
+
SmallerEquals = 15
|
|
4934
|
+
}
|
|
4917
4935
|
interface IContextKeyExprMapper {
|
|
4918
4936
|
mapDefined(key: string): ContextKeyExpression;
|
|
4919
4937
|
mapNot(key: string): ContextKeyExpression;
|
|
@@ -15932,4 +15950,4 @@ declare namespace Services {
|
|
|
15932
15950
|
function install(_services: Services): vscode.Disposable;
|
|
15933
15951
|
}
|
|
15934
15952
|
|
|
15935
|
-
export { IBulkEditService, IClipboardService, ICodeEditorService, IColorTheme, ICommandService, IConfigurationChangeEvent, IConfigurationService, IDialogService, IEditorGroupsService, IEditorService, IEditorWorkerService, IFileService, IHostService, IInstantiationService, ILanguageConfigurationService, ILanguageFeaturesService, ILanguageService, ILanguageStatusService, IMarkerService, IModelService, INotificationService, IOpenerService, IPaneCompositePartService, IPathService, IProductService, IQuickInputService, ISnippetsService, ITelemetryService, ITextFileService, ITextModelContentProvider, ITextModelService, IThemeService, IUriIdentityService, IWorkbenchEnvironmentService, IWorkingCopyFileService, IWorkspaceContextService, NotificationsFilter, Services, Severity$1 as Severity, StandaloneServices, Window, Workspace };
|
|
15953
|
+
export { ContextKeyExprType, IBulkEditService, IClipboardService, ICodeEditorService, IColorTheme, ICommandService, IConfigurationChangeEvent, IConfigurationService, IDialogService, IEditorGroupsService, IEditorService, IEditorWorkerService, IFileService, IHostService, IInstantiationService, ILanguageConfigurationService, ILanguageFeaturesService, ILanguageService, ILanguageStatusService, IMarkerService, IModelService, INotificationService, IOpenerService, IPaneCompositePartService, IPathService, IProductService, IQuickInputService, ISnippetsService, ITelemetryService, ITextFileService, ITextModelContentProvider, ITextModelService, IThemeService, IUriIdentityService, IWorkbenchEnvironmentService, IWorkingCopyFileService, IWorkspaceContextService, NotificationsFilter, Services, Severity$1 as Severity, StandaloneServices, Window, Workspace };
|
package/dist/services.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { f as IEditorGroupsService, c as IEditorService, I as IFileService, l as IHostService, k as ILanguageStatusService, d as IPaneCompositePartService, i as IPathService, j as IProductService, m as ISnippetsService, e as ITextFileService, b as IUriIdentityService, g as IWorkbenchEnvironmentService, h as IWorkingCopyFileService, w as NotificationsFilter, S as Services } from './services2.js';
|
|
2
|
+
export { C as ContextKeyExprType } from './contextkey.js';
|
|
2
3
|
export { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
3
4
|
export { ICommandService } from 'monaco-editor/esm/vs/platform/commands/common/commands.js';
|
|
4
5
|
export { INotificationService } from 'monaco-editor/esm/vs/platform/notification/common/notification.js';
|
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,6 +1,6 @@
|
|
|
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
|
-
import { _ as __decorate, a as __param } from './
|
|
3
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
4
4
|
import * as monacoSuggest from 'monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js';
|
|
5
5
|
import { extname as extname$1, basename as basename$1 } from 'monaco-editor/esm/vs/base/common/path.js';
|
|
6
6
|
import { Iterable } from 'monaco-editor/esm/vs/base/common/iterator.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 };
|
package/dist/textmate.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as __decorate, a as __param } from './
|
|
2
|
-
import {
|
|
1
|
+
import { _ as __decorate, a as __param } from './contextkey.js';
|
|
2
|
+
import { h as ExtensionsRegistry, O as ExtensionMessageCollector, Q as ITextMateService, E as Emitter } from './missing-services.js';
|
|
3
3
|
export { Q as ITextMateService } from './missing-services.js';
|
|
4
4
|
import { l as languagesExtPoint } from './languageService.js';
|
|
5
5
|
import { localize } from 'monaco-editor/esm/vs/nls.js';
|
|
@@ -21,13 +21,12 @@ import { ILogService } from 'monaco-editor/esm/vs/platform/log/common/log.js';
|
|
|
21
21
|
import { IConfigurationService } from 'monaco-editor/esm/vs/platform/configuration/common/configuration.js';
|
|
22
22
|
import { IProgressService } from 'monaco-editor/esm/vs/platform/progress/common/progress.js';
|
|
23
23
|
import { nullTokenizeEncoded } from 'monaco-editor/esm/vs/editor/common/languages/nullTokenize.js';
|
|
24
|
-
import { g as getExtensionPoint, c as consoleExtensionMessageHandler } from './tools.js';
|
|
24
|
+
import { g as getExtensionPoint, c as consoleExtensionMessageHandler, o as onServicesInitialized } from './tools.js';
|
|
25
25
|
import { S as Services } from './services2.js';
|
|
26
26
|
import { bd as DEFAULT_EXTENSION } from './extHost.js';
|
|
27
27
|
import { c as createInjectedClass } from './injection.js';
|
|
28
28
|
import { SyncDescriptor } from 'monaco-editor/esm/vs/platform/instantiation/common/descriptors.js';
|
|
29
29
|
import { IInstantiationService } from 'monaco-editor/esm/vs/platform/instantiation/common/instantiation.js';
|
|
30
|
-
import { StandaloneServices } from 'monaco-editor/esm/vs/editor/standalone/browser/standaloneServices.js';
|
|
31
30
|
const grammarsExtPoint = ( (ExtensionsRegistry.registerExtensionPoint({
|
|
32
31
|
extensionPoint: 'grammars',
|
|
33
32
|
deps: [languagesExtPoint],
|
|
@@ -458,7 +457,7 @@ let AbstractTextMateService = class AbstractTextMateService extends Disposable {
|
|
|
458
457
|
if (this._grammarFactory) {
|
|
459
458
|
return this._grammarFactory;
|
|
460
459
|
}
|
|
461
|
-
const [vscodeTextmate, vscodeOniguruma] = await Promise.all([import('vscode-textmate'), this._getVSCodeOniguruma()]);
|
|
460
|
+
const [vscodeTextmate, vscodeOniguruma] = await Promise.all([import('vscode-textmate').then(module => module.default ?? module), this._getVSCodeOniguruma()]);
|
|
462
461
|
const onigLib = Promise.resolve({
|
|
463
462
|
createOnigScanner: (sources) => vscodeOniguruma.createOnigScanner(sources),
|
|
464
463
|
createOnigString: (str) => vscodeOniguruma.createOnigString(str)
|
|
@@ -651,7 +650,7 @@ let AbstractTextMateService = class AbstractTextMateService extends Disposable {
|
|
|
651
650
|
return this._vscodeOniguruma;
|
|
652
651
|
}
|
|
653
652
|
async _doGetVSCodeOniguruma() {
|
|
654
|
-
const [vscodeOniguruma, wasm] = await Promise.all([import('vscode-oniguruma'), this._loadVSCodeOnigurumWASM()]);
|
|
653
|
+
const [vscodeOniguruma, wasm] = await Promise.all([import('vscode-oniguruma').then(module => module.default ?? module), this._loadVSCodeOnigurumWASM()]);
|
|
655
654
|
const options = {
|
|
656
655
|
data: wasm,
|
|
657
656
|
print: (str) => {
|
|
@@ -727,11 +726,11 @@ function setGrammars(grammars, getContent, extension = Services.get().extension
|
|
|
727
726
|
registerExtensionFile(joinPath(extension.extensionLocation, grammar.path), () => getContent(grammar));
|
|
728
727
|
}
|
|
729
728
|
}
|
|
730
|
-
function initialize() {
|
|
731
|
-
|
|
729
|
+
function initialize(instantiationService) {
|
|
730
|
+
instantiationService.invokeFunction((accessor) => accessor.get(ITextMateService));
|
|
732
731
|
}
|
|
733
732
|
function getServiceOverride(getOnigLib) {
|
|
734
|
-
|
|
733
|
+
onServicesInitialized(initialize);
|
|
735
734
|
return {
|
|
736
735
|
...getServiceOverride$1(),
|
|
737
736
|
[( ITextMateService.toString())]: new SyncDescriptor(TextMateService, [getOnigLib])
|