@codingame/monaco-vscode-api 1.68.6 → 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.
Files changed (44) hide show
  1. package/README.md +102 -7
  2. package/dist/api.js +481 -9576
  3. package/dist/configuration.d.ts +488 -0
  4. package/dist/configuration.js +582 -0
  5. package/dist/extHost.js +14881 -0
  6. package/dist/files.js +1325 -0
  7. package/dist/injection.js +15 -0
  8. package/dist/jsonErrorMessages.js +17 -0
  9. package/dist/keybindings.d.ts +502 -0
  10. package/dist/keybindings.js +2352 -0
  11. package/dist/languageConfiguration.d.ts +8 -0
  12. package/dist/languageConfiguration.js +925 -0
  13. package/dist/languageService.js +340 -0
  14. package/dist/languages.d.ts +477 -0
  15. package/dist/languages.js +21 -0
  16. package/dist/layoutService.js +4 -0
  17. package/dist/messages.d.ts +7 -0
  18. package/dist/messages.js +3624 -0
  19. package/dist/missing-services.js +7293 -0
  20. package/dist/modelEditor.d.ts +164 -0
  21. package/dist/modelEditor.js +739 -0
  22. package/dist/monaco.d.ts +4914 -0
  23. package/dist/monaco.js +261 -0
  24. package/dist/services.d.ts +14806 -2098
  25. package/dist/services.js +22 -25
  26. package/dist/services2.js +423 -0
  27. package/dist/snippets.d.ts +466 -0
  28. package/dist/snippets.js +864 -0
  29. package/dist/textmate.d.ts +683 -0
  30. package/dist/textmate.js +739 -0
  31. package/dist/theme.d.ts +23 -0
  32. package/dist/theme.js +4167 -0
  33. package/dist/tokenClassification.d.ts +479 -0
  34. package/dist/tokenClassification.js +302 -0
  35. package/dist/tokenClassificationRegistry.js +472 -0
  36. package/dist/tools.js +31 -0
  37. package/dist/tslib.es6.js +21 -0
  38. package/dist/workbenchThemeService.js +46 -0
  39. package/dist/workspaceContext.js +49 -0
  40. package/package.json +106 -37
  41. package/dist/api.amd.js +0 -10066
  42. package/dist/api.cjs +0 -10107
  43. package/dist/services.amd.js +0 -33
  44. package/dist/services.cjs +0 -33
@@ -0,0 +1,164 @@
1
+ import * as monaco from 'monaco-editor';
2
+
3
+ /**
4
+ * A model.
5
+ */
6
+ type ITextModel = monaco.editor.ITextModel
7
+
8
+ /**
9
+ * A rich code editor.
10
+ */
11
+ type ICodeEditor = monaco.editor.ICodeEditor
12
+
13
+ declare enum EditorActivation {
14
+ /**
15
+ * Activate the editor after it opened. This will automatically restore
16
+ * the editor if it is minimized.
17
+ */
18
+ ACTIVATE = 1,
19
+ /**
20
+ * Only restore the editor if it is minimized but do not activate it.
21
+ *
22
+ * Note: will only work in combination with the `preserveFocus: true` option.
23
+ * Otherwise, if focus moves into the editor, it will activate and restore
24
+ * automatically.
25
+ */
26
+ RESTORE = 2,
27
+ /**
28
+ * Preserve the current active editor.
29
+ *
30
+ * Note: will only work in combination with the `preserveFocus: true` option.
31
+ * Otherwise, if focus moves into the editor, it will activate and restore
32
+ * automatically.
33
+ */
34
+ PRESERVE = 3
35
+ }
36
+ declare enum EditorResolution {
37
+ /**
38
+ * Displays a picker and allows the user to decide which editor to use.
39
+ */
40
+ PICK = 0,
41
+ /**
42
+ * Disables editor resolving.
43
+ */
44
+ DISABLED = 1,
45
+ /**
46
+ * Only exclusive editors are considered.
47
+ */
48
+ EXCLUSIVE_ONLY = 2
49
+ }
50
+ declare enum EditorOpenSource {
51
+ /**
52
+ * Default: the editor is opening via a programmatic call
53
+ * to the editor service API.
54
+ */
55
+ API = 0,
56
+ /**
57
+ * Indicates that a user action triggered the opening, e.g.
58
+ * via mouse or keyboard use.
59
+ */
60
+ USER = 1
61
+ }
62
+ interface IEditorOptions {
63
+ /**
64
+ * Tells the editor to not receive keyboard focus when the editor is being opened.
65
+ *
66
+ * Will also not activate the group the editor opens in unless the group is already
67
+ * the active one. This behaviour can be overridden via the `activation` option.
68
+ */
69
+ preserveFocus?: boolean;
70
+ /**
71
+ * This option is only relevant if an editor is opened into a group that is not active
72
+ * already and allows to control if the inactive group should become active, restored
73
+ * or preserved.
74
+ *
75
+ * By default, the editor group will become active unless `preserveFocus` or `inactive`
76
+ * is specified.
77
+ */
78
+ activation?: EditorActivation;
79
+ /**
80
+ * Tells the editor to reload the editor input in the editor even if it is identical to the one
81
+ * already showing. By default, the editor will not reload the input if it is identical to the
82
+ * one showing.
83
+ */
84
+ forceReload?: boolean;
85
+ /**
86
+ * Will reveal the editor if it is already opened and visible in any of the opened editor groups.
87
+ *
88
+ * Note that this option is just a hint that might be ignored if the user wants to open an editor explicitly
89
+ * to the side of another one or into a specific editor group.
90
+ */
91
+ revealIfVisible?: boolean;
92
+ /**
93
+ * Will reveal the editor if it is already opened (even when not visible) in any of the opened editor groups.
94
+ *
95
+ * Note that this option is just a hint that might be ignored if the user wants to open an editor explicitly
96
+ * to the side of another one or into a specific editor group.
97
+ */
98
+ revealIfOpened?: boolean;
99
+ /**
100
+ * An editor that is pinned remains in the editor stack even when another editor is being opened.
101
+ * An editor that is not pinned will always get replaced by another editor that is not pinned.
102
+ */
103
+ pinned?: boolean;
104
+ /**
105
+ * An editor that is sticky moves to the beginning of the editors list within the group and will remain
106
+ * there unless explicitly closed. Operations such as "Close All" will not close sticky editors.
107
+ */
108
+ sticky?: boolean;
109
+ /**
110
+ * The index in the document stack where to insert the editor into when opening.
111
+ */
112
+ index?: number;
113
+ /**
114
+ * An active editor that is opened will show its contents directly. Set to true to open an editor
115
+ * in the background without loading its contents.
116
+ *
117
+ * Will also not activate the group the editor opens in unless the group is already
118
+ * the active one. This behaviour can be overridden via the `activation` option.
119
+ */
120
+ inactive?: boolean;
121
+ /**
122
+ * Will not show an error in case opening the editor fails and thus allows to show a custom error
123
+ * message as needed. By default, an error will be presented as notification if opening was not possible.
124
+ */
125
+ /**
126
+ * In case of an error opening the editor, will not present this error to the user (e.g. by showing
127
+ * a generic placeholder in the editor area). So it is up to the caller to provide error information
128
+ * in that case.
129
+ *
130
+ * By default, an error when opening an editor will result in a placeholder editor that shows the error.
131
+ * In certain cases a modal dialog may be presented to ask the user for further action.
132
+ */
133
+ ignoreError?: boolean;
134
+ /**
135
+ * Allows to override the editor that should be used to display the input:
136
+ * - `undefined`: let the editor decide for itself
137
+ * - `string`: specific override by id
138
+ * - `EditorResolution`: specific override handling
139
+ */
140
+ override?: string | EditorResolution;
141
+ /**
142
+ * A optional hint to signal in which context the editor opens.
143
+ *
144
+ * If configured to be `EditorOpenSource.USER`, this hint can be
145
+ * used in various places to control the experience. For example,
146
+ * if the editor to open fails with an error, a notification could
147
+ * inform about this in a modal dialog. If the editor opened through
148
+ * some background task, the notification would show in the background,
149
+ * not as a modal dialog.
150
+ */
151
+ source?: EditorOpenSource;
152
+ /**
153
+ * An optional property to signal that certain view state should be
154
+ * applied when opening the editor.
155
+ */
156
+ viewState?: object;
157
+ }
158
+
159
+ type IEditorOverrideServices = monaco.editor.IEditorOverrideServices
160
+
161
+ declare type OpenEditor = (model: ITextModel, options: IEditorOptions | undefined, sideBySide?: boolean) => Promise<ICodeEditor | undefined>;
162
+ declare function getServiceOverride(openEditor: OpenEditor): IEditorOverrideServices;
163
+
164
+ export { IEditorOptions, OpenEditor, getServiceOverride as default };