@codingame/monaco-vscode-api 1.68.7 → 1.69.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/README.md +102 -7
- package/dist/api.js +481 -9583
- package/dist/configuration.d.ts +488 -0
- package/dist/configuration.js +409 -0
- package/dist/extHost.js +14880 -0
- package/dist/files.js +1325 -0
- package/dist/injection.js +15 -0
- package/dist/jsonErrorMessages.js +17 -0
- package/dist/keybindings.d.ts +502 -0
- package/dist/keybindings.js +2352 -0
- package/dist/languageConfiguration.d.ts +158 -0
- package/dist/languageConfiguration.js +929 -0
- package/dist/languageService.js +340 -0
- package/dist/languages.d.ts +477 -0
- package/dist/languages.js +21 -0
- package/dist/layoutService.js +4 -0
- package/dist/messages.d.ts +7 -0
- package/dist/messages.js +3624 -0
- package/dist/missing-services.js +7293 -0
- package/dist/modelEditor.d.ts +164 -0
- package/dist/modelEditor.js +739 -0
- package/dist/monaco.d.ts +4795 -0
- package/dist/monaco.js +243 -0
- package/dist/services.d.ts +14806 -2098
- package/dist/services.js +22 -25
- package/dist/services2.js +423 -0
- package/dist/snippets.d.ts +466 -0
- package/dist/snippets.js +903 -0
- package/dist/textmate.d.ts +682 -0
- package/dist/textmate.js +740 -0
- package/dist/theme.d.ts +22 -0
- package/dist/theme.js +4167 -0
- package/dist/tokenClassification.d.ts +479 -0
- package/dist/tokenClassification.js +304 -0
- package/dist/tokenClassificationRegistry.js +472 -0
- package/dist/tools.js +17 -0
- package/dist/tslib.es6.js +21 -0
- package/dist/workbenchThemeService.js +46 -0
- package/package.json +107 -24
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import * as monaco from 'monaco-editor';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Uniform Resource Identifier (URI) http://tools.ietf.org/html/rfc3986.
|
|
5
|
+
* This class is a simple parser which creates the basic component parts
|
|
6
|
+
* (http://tools.ietf.org/html/rfc3986#section-3) with minimal validation
|
|
7
|
+
* and encoding.
|
|
8
|
+
*
|
|
9
|
+
* ```txt
|
|
10
|
+
* foo://example.com:8042/over/there?name=ferret#nose
|
|
11
|
+
* \_/ \______________/\_________/ \_________/ \__/
|
|
12
|
+
* | | | | |
|
|
13
|
+
* scheme authority path query fragment
|
|
14
|
+
* | _____________________|__
|
|
15
|
+
* / \ / \
|
|
16
|
+
* urn:example:animal:ferret:nose
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
declare class URI implements UriComponents {
|
|
20
|
+
static isUri(thing: any): thing is URI;
|
|
21
|
+
/**
|
|
22
|
+
* scheme is the 'http' part of 'http://www.example.com/some/path?query#fragment'.
|
|
23
|
+
* The part before the first colon.
|
|
24
|
+
*/
|
|
25
|
+
readonly scheme: string;
|
|
26
|
+
/**
|
|
27
|
+
* authority is the 'www.example.com' part of 'http://www.example.com/some/path?query#fragment'.
|
|
28
|
+
* The part between the first double slashes and the next slash.
|
|
29
|
+
*/
|
|
30
|
+
readonly authority: string;
|
|
31
|
+
/**
|
|
32
|
+
* path is the '/some/path' part of 'http://www.example.com/some/path?query#fragment'.
|
|
33
|
+
*/
|
|
34
|
+
readonly path: string;
|
|
35
|
+
/**
|
|
36
|
+
* query is the 'query' part of 'http://www.example.com/some/path?query#fragment'.
|
|
37
|
+
*/
|
|
38
|
+
readonly query: string;
|
|
39
|
+
/**
|
|
40
|
+
* fragment is the 'fragment' part of 'http://www.example.com/some/path?query#fragment'.
|
|
41
|
+
*/
|
|
42
|
+
readonly fragment: string;
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
protected constructor(scheme: string, authority?: string, path?: string, query?: string, fragment?: string, _strict?: boolean);
|
|
47
|
+
/**
|
|
48
|
+
* @internal
|
|
49
|
+
*/
|
|
50
|
+
protected constructor(components: UriComponents);
|
|
51
|
+
/**
|
|
52
|
+
* Returns a string representing the corresponding file system path of this URI.
|
|
53
|
+
* Will handle UNC paths, normalizes windows drive letters to lower-case, and uses the
|
|
54
|
+
* platform specific path separator.
|
|
55
|
+
*
|
|
56
|
+
* * Will *not* validate the path for invalid characters and semantics.
|
|
57
|
+
* * Will *not* look at the scheme of this URI.
|
|
58
|
+
* * The result shall *not* be used for display purposes but for accessing a file on disk.
|
|
59
|
+
*
|
|
60
|
+
*
|
|
61
|
+
* The *difference* to `URI#path` is the use of the platform specific separator and the handling
|
|
62
|
+
* of UNC paths. See the below sample of a file-uri with an authority (UNC path).
|
|
63
|
+
*
|
|
64
|
+
* ```ts
|
|
65
|
+
const u = URI.parse('file://server/c$/folder/file.txt')
|
|
66
|
+
u.authority === 'server'
|
|
67
|
+
u.path === '/shares/c$/file.txt'
|
|
68
|
+
u.fsPath === '\\server\c$\folder\file.txt'
|
|
69
|
+
```
|
|
70
|
+
*
|
|
71
|
+
* Using `URI#path` to read a file (using fs-apis) would not be enough because parts of the path,
|
|
72
|
+
* namely the server name, would be missing. Therefore `URI#fsPath` exists - it's sugar to ease working
|
|
73
|
+
* with URIs that represent files on disk (`file` scheme).
|
|
74
|
+
*/
|
|
75
|
+
get fsPath(): string;
|
|
76
|
+
with(change: {
|
|
77
|
+
scheme?: string;
|
|
78
|
+
authority?: string | null;
|
|
79
|
+
path?: string | null;
|
|
80
|
+
query?: string | null;
|
|
81
|
+
fragment?: string | null;
|
|
82
|
+
}): URI;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a new URI from a string, e.g. `http://www.example.com/some/path`,
|
|
85
|
+
* `file:///usr/home`, or `scheme:with/path`.
|
|
86
|
+
*
|
|
87
|
+
* @param value A string which represents an URI (see `URI#toString`).
|
|
88
|
+
*/
|
|
89
|
+
static parse(value: string, _strict?: boolean): URI;
|
|
90
|
+
/**
|
|
91
|
+
* Creates a new URI from a file system path, e.g. `c:\my\files`,
|
|
92
|
+
* `/usr/home`, or `\\server\share\some\path`.
|
|
93
|
+
*
|
|
94
|
+
* The *difference* between `URI#parse` and `URI#file` is that the latter treats the argument
|
|
95
|
+
* as path, not as stringified-uri. E.g. `URI.file(path)` is **not the same as**
|
|
96
|
+
* `URI.parse('file://' + path)` because the path might contain characters that are
|
|
97
|
+
* interpreted (# and ?). See the following sample:
|
|
98
|
+
* ```ts
|
|
99
|
+
const good = URI.file('/coding/c#/project1');
|
|
100
|
+
good.scheme === 'file';
|
|
101
|
+
good.path === '/coding/c#/project1';
|
|
102
|
+
good.fragment === '';
|
|
103
|
+
const bad = URI.parse('file://' + '/coding/c#/project1');
|
|
104
|
+
bad.scheme === 'file';
|
|
105
|
+
bad.path === '/coding/c'; // path is now broken
|
|
106
|
+
bad.fragment === '/project1';
|
|
107
|
+
```
|
|
108
|
+
*
|
|
109
|
+
* @param path A file system path (see `URI#fsPath`)
|
|
110
|
+
*/
|
|
111
|
+
static file(path: string): URI;
|
|
112
|
+
static from(components: {
|
|
113
|
+
scheme: string;
|
|
114
|
+
authority?: string;
|
|
115
|
+
path?: string;
|
|
116
|
+
query?: string;
|
|
117
|
+
fragment?: string;
|
|
118
|
+
}): URI;
|
|
119
|
+
/**
|
|
120
|
+
* Join a URI path with path fragments and normalizes the resulting path.
|
|
121
|
+
*
|
|
122
|
+
* @param uri The input URI.
|
|
123
|
+
* @param pathFragment The path fragment to add to the URI path.
|
|
124
|
+
* @returns The resulting URI.
|
|
125
|
+
*/
|
|
126
|
+
static joinPath(uri: URI, ...pathFragment: string[]): URI;
|
|
127
|
+
/**
|
|
128
|
+
* Creates a string representation for this URI. It's guaranteed that calling
|
|
129
|
+
* `URI.parse` with the result of this function creates an URI which is equal
|
|
130
|
+
* to this URI.
|
|
131
|
+
*
|
|
132
|
+
* * The result shall *not* be used for display purposes but for externalization or transport.
|
|
133
|
+
* * The result will be encoded using the percentage encoding and encoding happens mostly
|
|
134
|
+
* ignore the scheme-specific encoding rules.
|
|
135
|
+
*
|
|
136
|
+
* @param skipEncoding Do not encode the result, default is `false`
|
|
137
|
+
*/
|
|
138
|
+
toString(skipEncoding?: boolean): string;
|
|
139
|
+
toJSON(): UriComponents;
|
|
140
|
+
static revive(data: UriComponents | URI): URI;
|
|
141
|
+
static revive(data: UriComponents | URI | undefined): URI | undefined;
|
|
142
|
+
static revive(data: UriComponents | URI | null): URI | null;
|
|
143
|
+
static revive(data: UriComponents | URI | undefined | null): URI | undefined | null;
|
|
144
|
+
}
|
|
145
|
+
interface UriComponents {
|
|
146
|
+
scheme: string;
|
|
147
|
+
authority: string;
|
|
148
|
+
path: string;
|
|
149
|
+
query: string;
|
|
150
|
+
fragment: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
|
|
154
|
+
|
|
155
|
+
declare function setLanguageConfiguration(resource: URI, getConfiguration: () => Promise<string>): void;
|
|
156
|
+
declare function getServiceOverride(): IEditorOverrideServices;
|
|
157
|
+
|
|
158
|
+
export { getServiceOverride as default, setLanguageConfiguration };
|