@theia/plugin-ext 1.33.0-next.9 → 1.34.0-next.7

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 (106) hide show
  1. package/lib/common/collections.d.ts +5 -0
  2. package/lib/common/collections.d.ts.map +1 -0
  3. package/lib/common/collections.js +40 -0
  4. package/lib/common/collections.js.map +1 -0
  5. package/lib/common/plugin-api-rpc-model.d.ts +80 -0
  6. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  7. package/lib/common/plugin-api-rpc-model.js +17 -1
  8. package/lib/common/plugin-api-rpc-model.js.map +1 -1
  9. package/lib/common/plugin-api-rpc.d.ts +113 -1
  10. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  11. package/lib/common/plugin-api-rpc.js +5 -2
  12. package/lib/common/plugin-api-rpc.js.map +1 -1
  13. package/lib/common/reference-map.d.ts +8 -0
  14. package/lib/common/reference-map.d.ts.map +1 -0
  15. package/lib/common/reference-map.js +40 -0
  16. package/lib/common/reference-map.js.map +1 -0
  17. package/lib/common/types.d.ts +4 -0
  18. package/lib/common/types.d.ts.map +1 -1
  19. package/lib/common/types.js +11 -1
  20. package/lib/common/types.js.map +1 -1
  21. package/lib/main/browser/comments/comment-thread-widget.d.ts +1 -0
  22. package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
  23. package/lib/main/browser/comments/comment-thread-widget.js +11 -0
  24. package/lib/main/browser/comments/comment-thread-widget.js.map +1 -1
  25. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  26. package/lib/main/browser/custom-editors/custom-editors-main.js +2 -2
  27. package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
  28. package/lib/main/browser/file-system-main-impl.d.ts +1 -0
  29. package/lib/main/browser/file-system-main-impl.d.ts.map +1 -1
  30. package/lib/main/browser/file-system-main-impl.js +9 -2
  31. package/lib/main/browser/file-system-main-impl.js.map +1 -1
  32. package/lib/main/browser/languages-main.d.ts +1 -0
  33. package/lib/main/browser/languages-main.d.ts.map +1 -1
  34. package/lib/main/browser/languages-main.js +10 -0
  35. package/lib/main/browser/languages-main.js.map +1 -1
  36. package/lib/main/browser/tabs/tabs-main.d.ts +10 -0
  37. package/lib/main/browser/tabs/tabs-main.d.ts.map +1 -0
  38. package/lib/main/browser/tabs/tabs-main.js +33 -0
  39. package/lib/main/browser/tabs/tabs-main.js.map +1 -0
  40. package/lib/main/browser/terminal-main.d.ts +1 -1
  41. package/lib/main/browser/terminal-main.d.ts.map +1 -1
  42. package/lib/main/browser/terminal-main.js +2 -2
  43. package/lib/main/browser/terminal-main.js.map +1 -1
  44. package/lib/main/browser/webview/webview.d.ts +1 -0
  45. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  46. package/lib/main/browser/webview/webview.js.map +1 -1
  47. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  48. package/lib/main/browser/webviews-main.js +6 -6
  49. package/lib/main/browser/webviews-main.js.map +1 -1
  50. package/lib/plugin/comments.js +2 -0
  51. package/lib/plugin/comments.js.map +1 -1
  52. package/lib/plugin/file-system-ext-impl.d.ts +2 -0
  53. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  54. package/lib/plugin/file-system-ext-impl.js +22 -5
  55. package/lib/plugin/file-system-ext-impl.js.map +1 -1
  56. package/lib/plugin/languages/inline-completion.d.ts +21 -0
  57. package/lib/plugin/languages/inline-completion.d.ts.map +1 -0
  58. package/lib/plugin/languages/inline-completion.js +94 -0
  59. package/lib/plugin/languages/inline-completion.js.map +1 -0
  60. package/lib/plugin/languages.d.ts +5 -2
  61. package/lib/plugin/languages.d.ts.map +1 -1
  62. package/lib/plugin/languages.js +16 -1
  63. package/lib/plugin/languages.js.map +1 -1
  64. package/lib/plugin/plugin-context.d.ts.map +1 -1
  65. package/lib/plugin/plugin-context.js +120 -3
  66. package/lib/plugin/plugin-context.js.map +1 -1
  67. package/lib/plugin/tabs.d.ts +23 -0
  68. package/lib/plugin/tabs.d.ts.map +1 -0
  69. package/lib/plugin/tabs.js +362 -0
  70. package/lib/plugin/tabs.js.map +1 -0
  71. package/lib/plugin/theming.d.ts.map +1 -1
  72. package/lib/plugin/theming.js +3 -0
  73. package/lib/plugin/theming.js.map +1 -1
  74. package/lib/plugin/type-converters.d.ts +4 -0
  75. package/lib/plugin/type-converters.d.ts.map +1 -1
  76. package/lib/plugin/type-converters.js +21 -1
  77. package/lib/plugin/type-converters.js.map +1 -1
  78. package/lib/plugin/types-impl.d.ts +190 -1
  79. package/lib/plugin/types-impl.d.ts.map +1 -1
  80. package/lib/plugin/types-impl.js +265 -6
  81. package/lib/plugin/types-impl.js.map +1 -1
  82. package/package.json +26 -26
  83. package/src/common/collections.ts +37 -0
  84. package/src/common/plugin-api-rpc-model.ts +98 -0
  85. package/src/common/plugin-api-rpc.ts +142 -3
  86. package/src/common/reference-map.ts +38 -0
  87. package/src/common/types.ts +11 -0
  88. package/src/main/browser/comments/comment-thread-widget.tsx +11 -0
  89. package/src/main/browser/custom-editors/custom-editors-main.ts +2 -1
  90. package/src/main/browser/file-system-main-impl.ts +12 -3
  91. package/src/main/browser/languages-main.ts +18 -1
  92. package/src/main/browser/style/comments.css +6 -0
  93. package/src/main/browser/tabs/tabs-main.ts +42 -0
  94. package/src/main/browser/terminal-main.ts +2 -2
  95. package/src/main/browser/webview/pre/main.js +8 -1
  96. package/src/main/browser/webview/webview.ts +1 -0
  97. package/src/main/browser/webviews-main.ts +6 -3
  98. package/src/plugin/comments.ts +2 -0
  99. package/src/plugin/file-system-ext-impl.ts +21 -5
  100. package/src/plugin/languages/inline-completion.ts +126 -0
  101. package/src/plugin/languages.ts +30 -3
  102. package/src/plugin/plugin-context.ts +164 -5
  103. package/src/plugin/tabs.ts +430 -0
  104. package/src/plugin/theming.ts +3 -0
  105. package/src/plugin/type-converters.ts +22 -0
  106. package/src/plugin/types-impl.ts +287 -1
@@ -134,6 +134,8 @@ export class Disposable {
134
134
  static create(func: () => void): Disposable {
135
135
  return new Disposable(func);
136
136
  }
137
+
138
+ static NULL: Disposable;
137
139
  }
138
140
 
139
141
  export interface AccessibilityInformation {
@@ -176,7 +178,8 @@ export enum ViewColumn {
176
178
  export enum ColorThemeKind {
177
179
  Light = 1,
178
180
  Dark = 2,
179
- HighContrast = 3
181
+ HighContrast = 3,
182
+ HighContrastLight = 4
180
183
  }
181
184
 
182
185
  export enum ExtensionMode {
@@ -978,6 +981,37 @@ export class CompletionList {
978
981
  }
979
982
  }
980
983
 
984
+ export enum InlineCompletionTriggerKind {
985
+ Invoke = 0,
986
+ Automatic = 1,
987
+ }
988
+
989
+ @es5ClassCompat
990
+ export class InlineCompletionItem implements theia.InlineCompletionItem {
991
+
992
+ filterText?: string;
993
+ insertText: string;
994
+ range?: Range;
995
+ command?: theia.Command;
996
+
997
+ constructor(insertText: string, range?: Range, command?: theia.Command) {
998
+ this.insertText = insertText;
999
+ this.range = range;
1000
+ this.command = command;
1001
+ }
1002
+ }
1003
+
1004
+ @es5ClassCompat
1005
+ export class InlineCompletionList implements theia.InlineCompletionList {
1006
+
1007
+ items: theia.InlineCompletionItem[];
1008
+ commands: theia.Command[] | undefined = undefined;
1009
+
1010
+ constructor(items: theia.InlineCompletionItem[]) {
1011
+ this.items = items;
1012
+ }
1013
+ }
1014
+
981
1015
  export enum DiagnosticSeverity {
982
1016
  Error = 0,
983
1017
  Warning = 1,
@@ -1065,6 +1099,218 @@ export enum MarkerTag {
1065
1099
  Deprecated = 2,
1066
1100
  }
1067
1101
 
1102
+ export enum NotebookCellKind {
1103
+ Markup = 1,
1104
+ Code = 2
1105
+ }
1106
+
1107
+ export enum NotebookCellStatusBarAlignment {
1108
+ Left = 1,
1109
+ Right = 2
1110
+ }
1111
+
1112
+ export enum NotebookControllerAffinity {
1113
+ Default = 1,
1114
+ Preferred = 2
1115
+ }
1116
+
1117
+ export enum NotebookEditorRevealType {
1118
+ Default = 0,
1119
+ InCenter = 1,
1120
+ InCenterIfOutsideViewport = 2,
1121
+ AtTop = 3
1122
+ }
1123
+ @es5ClassCompat
1124
+ export class NotebookCellData implements theia.NotebookCellData {
1125
+ languageId: string;
1126
+ kind: NotebookCellKind;
1127
+ value: string;
1128
+ outputs?: theia.NotebookCellOutput[];
1129
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1130
+ metadata?: { [key: string]: any };
1131
+ executionSummary?: theia.NotebookCellExecutionSummary;
1132
+
1133
+ constructor(kind: NotebookCellKind, value: string, languageId: string) {
1134
+ this.kind = kind;
1135
+ this.value = value;
1136
+ this.languageId = languageId;
1137
+ }
1138
+ }
1139
+
1140
+ @es5ClassCompat
1141
+ export class NotebookCellOutput implements theia.NotebookCellOutput {
1142
+ items: theia.NotebookCellOutputItem[];
1143
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1144
+ metadata?: { [key: string]: any };
1145
+
1146
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1147
+ constructor(items: theia.NotebookCellOutputItem[], metadata?: { [key: string]: any }) {
1148
+ this.items = items;
1149
+ this.metadata = metadata;
1150
+ }
1151
+ }
1152
+
1153
+ export class NotebookCellOutputItem implements theia.NotebookCellOutputItem {
1154
+ mime: string;
1155
+ data: Uint8Array;
1156
+
1157
+ static #encoder = new TextEncoder();
1158
+
1159
+ static text(value: string, mime?: string): NotebookCellOutputItem {
1160
+ const bytes = NotebookCellOutputItem.#encoder.encode(String(value));
1161
+ return new NotebookCellOutputItem(bytes, mime || 'text/plain');
1162
+ }
1163
+
1164
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1165
+ static json(value: any, mime?: string): NotebookCellOutputItem {
1166
+ const jsonStr = JSON.stringify(value, undefined, '\t');
1167
+ return NotebookCellOutputItem.text(jsonStr, mime);
1168
+ }
1169
+
1170
+ static stdout(value: string): NotebookCellOutputItem {
1171
+ return NotebookCellOutputItem.text(value, 'application/vnd.code.notebook.stdout');
1172
+ }
1173
+
1174
+ static stderr(value: string): NotebookCellOutputItem {
1175
+ return NotebookCellOutputItem.text(value, 'application/vnd.code.notebook.stderr');
1176
+ }
1177
+
1178
+ static error(value: Error): NotebookCellOutputItem {
1179
+ return NotebookCellOutputItem.json(value, 'application/vnd.code.notebook.error');
1180
+ }
1181
+
1182
+ constructor(data: Uint8Array, mime: string) {
1183
+ this.data = data;
1184
+ this.mime = mime;
1185
+ }
1186
+ }
1187
+
1188
+ @es5ClassCompat
1189
+ export class NotebookCellStatusBarItem implements theia.NotebookCellStatusBarItem {
1190
+ text: string;
1191
+ alignment: NotebookCellStatusBarAlignment;
1192
+ command?: string | theia.Command;
1193
+ tooltip?: string;
1194
+ priority?: number;
1195
+ accessibilityInformation?: AccessibilityInformation;
1196
+
1197
+ /**
1198
+ * Creates a new NotebookCellStatusBarItem.
1199
+ * @param text The text to show for the item.
1200
+ * @param alignment Whether the item is aligned to the left or right.
1201
+ * @stubbed
1202
+ */
1203
+ constructor(text: string, alignment: NotebookCellStatusBarAlignment) {
1204
+ this.text = text;
1205
+ this.alignment = alignment;
1206
+ }
1207
+ }
1208
+
1209
+ @es5ClassCompat
1210
+ export class NotebookData implements theia.NotebookData {
1211
+ cells: NotebookCellData[];
1212
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1213
+ metadata?: { [key: string]: any };
1214
+
1215
+ constructor(cells: NotebookCellData[]) {
1216
+ this.cells = cells;
1217
+ }
1218
+ }
1219
+
1220
+ export class NotebookDocument implements theia.NotebookDocument {
1221
+ readonly uri: theia.Uri;
1222
+ readonly notebookType: string;
1223
+ readonly version: number;
1224
+ readonly isDirty: boolean;
1225
+ readonly isUntitled: boolean;
1226
+ readonly isClosed: boolean;
1227
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1228
+ readonly metadata: { [key: string]: any };
1229
+ readonly cellCount: number;
1230
+
1231
+ cellAt(index: number): theia.NotebookCell {
1232
+ return {} as theia.NotebookCell;
1233
+ }
1234
+ save(): theia.Thenable<boolean> {
1235
+ return Promise.resolve(false);
1236
+ }
1237
+
1238
+ getCells(range?: theia.NotebookRange | undefined): theia.NotebookCell[] {
1239
+ return [] as NotebookCell[];
1240
+ }
1241
+ }
1242
+ export class NotebookCell implements theia.NotebookCell {
1243
+ readonly index: number;
1244
+ readonly notebook: theia.NotebookDocument;
1245
+ readonly kind: theia.NotebookCellKind;
1246
+ readonly document: theia.TextDocument;
1247
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1248
+ readonly metadata: { readonly [key: string]: any; };
1249
+ readonly outputs: readonly theia.NotebookCellOutput[];
1250
+ readonly executionSummary: theia.NotebookCellExecutionSummary | undefined;
1251
+
1252
+ }
1253
+
1254
+ export class NotebookRange implements theia.NotebookRange {
1255
+ readonly start: number;
1256
+ readonly end: number;
1257
+ readonly isEmpty: boolean;
1258
+
1259
+ with(change: { start?: number; end?: number }): NotebookRange {
1260
+ let newStart = this.start;
1261
+ let newEnd = this.end;
1262
+
1263
+ if (change.start !== undefined) {
1264
+ newStart = change.start;
1265
+ }
1266
+ if (change.end !== undefined) {
1267
+ newEnd = change.end;
1268
+ }
1269
+ if (newStart === this.start && newEnd === this.end) {
1270
+ return this;
1271
+ }
1272
+ return new NotebookRange(newStart, newEnd);
1273
+ }
1274
+
1275
+ constructor(start: number, end: number) {
1276
+ this.start = start;
1277
+ this.end = end;
1278
+ }
1279
+
1280
+ }
1281
+
1282
+ @es5ClassCompat
1283
+ export class NotebookEdit implements theia.NotebookEdit {
1284
+ range: theia.NotebookRange;
1285
+ newCells: theia.NotebookCellData[];
1286
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1287
+ newCellMetadata?: { [key: string]: any; } | undefined;
1288
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1289
+ newNotebookMetadata?: { [key: string]: any; } | undefined;
1290
+
1291
+ static replaceCells(range: NotebookRange, newCells: NotebookCellData[]): NotebookEdit {
1292
+ return new NotebookEdit();
1293
+ }
1294
+
1295
+ static insertCells(index: number, newCells: NotebookCellData[]): NotebookEdit {
1296
+ return new NotebookEdit();
1297
+ }
1298
+
1299
+ static deleteCells(range: NotebookRange): NotebookEdit {
1300
+ return new NotebookEdit();
1301
+ }
1302
+
1303
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1304
+ static updateCellMetadata(index: number, newCellMetadata: { [key: string]: any }): NotebookEdit {
1305
+ return new NotebookEdit();
1306
+ }
1307
+
1308
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1309
+ static updateNotebookMetadata(newNotebookMetadata: { [key: string]: any }): NotebookEdit {
1310
+ return new NotebookEdit();
1311
+ }
1312
+ }
1313
+
1068
1314
  @es5ClassCompat
1069
1315
  export class ParameterInformation {
1070
1316
  label: string | [number, number];
@@ -1309,6 +1555,7 @@ export class CodeActionKind {
1309
1555
  public static readonly Refactor = CodeActionKind.Empty.append('refactor');
1310
1556
  public static readonly RefactorExtract = CodeActionKind.Refactor.append('extract');
1311
1557
  public static readonly RefactorInline = CodeActionKind.Refactor.append('inline');
1558
+ public static readonly RefactorMove = CodeActionKind.Refactor.append('move');
1312
1559
  public static readonly RefactorRewrite = CodeActionKind.Refactor.append('rewrite');
1313
1560
  public static readonly Source = CodeActionKind.Empty.append('source');
1314
1561
  public static readonly SourceOrganizeImports = CodeActionKind.Source.append('organizeImports');
@@ -2994,3 +3241,42 @@ export enum InputBoxValidationSeverity {
2994
3241
  }
2995
3242
 
2996
3243
  // #endregion
3244
+
3245
+ // #region Tab Inputs
3246
+
3247
+ export class TextTabInput {
3248
+ constructor(readonly uri: URI) { }
3249
+ }
3250
+
3251
+ export class TextDiffTabInput {
3252
+ constructor(readonly original: URI, readonly modified: URI) { }
3253
+ }
3254
+
3255
+ export class TextMergeTabInput {
3256
+ constructor(readonly base: URI, readonly input1: URI, readonly input2: URI, readonly result: URI) { }
3257
+ }
3258
+
3259
+ export class CustomEditorTabInput {
3260
+ constructor(readonly uri: URI, readonly viewType: string) { }
3261
+ }
3262
+
3263
+ export class WebviewEditorTabInput {
3264
+ constructor(readonly viewType: string) { }
3265
+ }
3266
+
3267
+ export class NotebookEditorTabInput {
3268
+ constructor(readonly uri: URI, readonly notebookType: string) { }
3269
+ }
3270
+
3271
+ export class NotebookDiffEditorTabInput {
3272
+ constructor(readonly original: URI, readonly modified: URI, readonly notebookType: string) { }
3273
+ }
3274
+
3275
+ export class TerminalEditorTabInput {
3276
+ constructor() { }
3277
+ }
3278
+ export class InteractiveWindowInput {
3279
+ constructor(readonly uri: URI, readonly inputBoxUri: URI) { }
3280
+ }
3281
+
3282
+ // #endregion