@codingame/monaco-vscode-api 3.1.2 → 3.2.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 (29) hide show
  1. package/_virtual/semver.js +2 -0
  2. package/external/vscode-marked/lib/marked.esm.js +2199 -0
  3. package/external/vscode-semver/semver.js +983 -0
  4. package/missing-services.js +32 -5
  5. package/package.json +8 -10
  6. package/services.d.ts +2 -3
  7. package/services.js +3 -5
  8. package/vscode/src/vs/base/browser/markdownRenderer.js +11 -11
  9. package/vscode/src/vs/editor/editor.api.d.ts +9072 -8018
  10. package/vscode/src/vs/platform/extensions/common/extensionValidator.js +2 -2
  11. package/vscode/src/vs/workbench/api/common/extHostTypeConverters.js +3 -3
  12. package/vscode/src/vs/workbench/contrib/accessibility/browser/accessibleView.js +2 -2
  13. package/vscode/src/vs/workbench/contrib/chat/browser/chatListRenderer.js +2 -2
  14. package/vscode/src/vs/workbench/contrib/markdown/browser/markdownDocumentRenderer.js +3 -3
  15. package/vscode/src/vs/workbench/contrib/notebook/browser/viewModel/foldingModel.js +2 -2
  16. package/vscode/src/vs/workbench/contrib/terminal/browser/terminal.d.ts +1 -1
  17. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm/xtermTerminal.d.ts +7 -7
  18. package/vscode/src/vs/workbench/contrib/terminal/browser/xterm-private.d.ts +1 -1
  19. package/workbench.d.ts +8 -0
  20. package/workbench.js +7 -2
  21. package/workers/editor.worker.js +1 -1
  22. package/external/@xterm/addon-canvas/typings/addon-canvas.d.ts +0 -38
  23. package/external/@xterm/addon-image/typings/addon-image.d.ts +0 -115
  24. package/external/@xterm/addon-search/typings/addon-search.d.ts +0 -141
  25. package/external/@xterm/addon-serialize/typings/addon-serialize.d.ts +0 -100
  26. package/external/@xterm/addon-unicode11/typings/addon-unicode11.d.ts +0 -9
  27. package/external/@xterm/addon-webgl/typings/addon-webgl.d.ts +0 -43
  28. package/external/@xterm/xterm/typings/xterm.d.ts +0 -1825
  29. package/vscode/src/vs/workbench/services/path/browser/pathService.js +0 -34
@@ -1,7 +1,7 @@
1
1
  import { joinPath, isEqualOrParent } from '../../../base/common/resources.js';
2
2
  import Severity from '../../../base/common/severity.js';
3
3
  import { localizeWithPath } from '../../../nls.js';
4
- import { valid } from 'vscode-semver';
4
+ import { semverExports } from '../../../../../../external/vscode-semver/semver.js';
5
5
  const VERSION_REGEXP = /^(\^|>=)?((\d+)|x)\.((\d+)|x)\.((\d+)|x)(\-.*)?$/;
6
6
  const NOT_BEFORE_REGEXP = /^-(\d{4})(\d{2})(\d{2})$/;
7
7
  function isValidVersionStr(version) {
@@ -299,7 +299,7 @@ function validateExtensionManifest(productVersion, productDate, extensionLocatio
299
299
  }
300
300
  }
301
301
  }
302
- if (!valid(extensionManifest.version)) {
302
+ if (!semverExports.valid(extensionManifest.version)) {
303
303
  validations.push([Severity.Error, ( localizeWithPath(
304
304
  'vs/platform/extensions/common/extensionValidator',
305
305
  'notSemver',
@@ -4,7 +4,7 @@ import { UriList } from '../../../base/common/dataTransfer.js';
4
4
  import { createSingleCallFunction } from '../../../base/common/functional.js';
5
5
  import { parseHrefAndDimensions, isMarkdownString } from '../../../base/common/htmlContent.js';
6
6
  import { ResourceSet, ResourceMap } from '../../../base/common/map.js';
7
- import marked from 'vscode-marked';
7
+ import marked_1 from '../../../../../../external/vscode-marked/lib/marked.esm.js';
8
8
  import { parse, revive } from '../../../base/common/marshalling.js';
9
9
  import { Mimes } from '../../../base/common/mime.js';
10
10
  import { cloneAndChange } from '../../../base/common/objects.js';
@@ -311,10 +311,10 @@ var MarkdownString;
311
311
  }
312
312
  return '';
313
313
  };
314
- const renderer = new marked.Renderer();
314
+ const renderer = new marked_1.Renderer();
315
315
  renderer.link = collectUri;
316
316
  renderer.image = href => typeof href === 'string' ? collectUri(parseHrefAndDimensions(href).href) : '';
317
- marked(res.value, { renderer });
317
+ marked_1(res.value, { renderer });
318
318
  return res;
319
319
  }
320
320
  MarkdownString.from = from;
@@ -4,7 +4,7 @@ import { StandardKeyboardEvent } from '../../../../base/browser/keyboardEvent.js
4
4
  import { alert } from '../../../../base/browser/ui/aria/aria.js';
5
5
  import { Codicon } from '../../../../base/common/codicons.js';
6
6
  import { Disposable, DisposableStore } from '../../../../base/common/lifecycle.js';
7
- import marked from 'vscode-marked';
7
+ import marked_1 from '../../../../../../../external/vscode-marked/lib/marked.esm.js';
8
8
  import { isMacintosh } from '../../../../base/common/platform.js';
9
9
  import { ThemeIcon } from '../../../../base/common/themables.js';
10
10
  import { URI } from '../../../../base/common/uri.js';
@@ -204,7 +204,7 @@ let AccessibleView = class AccessibleView extends Disposable {
204
204
  if (this._currentProvider.options.language && this._currentProvider.options.language !== 'markdown') {
205
205
  return;
206
206
  }
207
- const markdownTokens = marked.lexer(this._currentContent);
207
+ const markdownTokens = marked_1.lexer(this._currentContent);
208
208
  if (!markdownTokens) {
209
209
  return;
210
210
  }
@@ -10,7 +10,7 @@ import { Emitter } from '../../../../base/common/event.js';
10
10
  import { MarkdownString } from '../../../../base/common/htmlContent.js';
11
11
  import { Disposable, DisposableStore, toDisposable } from '../../../../base/common/lifecycle.js';
12
12
  import { ResourceMap } from '../../../../base/common/map.js';
13
- import marked from 'vscode-marked';
13
+ import marked_1 from '../../../../../../../external/vscode-marked/lib/marked.esm.js';
14
14
  import { Schemas, FileAccess, matchesSomeScheme } from '../../../../base/common/network.js';
15
15
  import { clamp } from '../../../../base/common/numbers.js';
16
16
  import { basename } from '../../../../base/common/path.js';
@@ -911,7 +911,7 @@ let ChatAccessibilityProvider = class ChatAccessibilityProvider {
911
911
  ));
912
912
  break;
913
913
  }
914
- const codeBlockCount = marked.lexer(element.response.asString()).filter(token => token.type === 'code')?.length ?? 0;
914
+ const codeBlockCount = marked_1.lexer(element.response.asString()).filter(token => token.type === 'code')?.length ?? 0;
915
915
  switch (codeBlockCount) {
916
916
  case 0:
917
917
  label = accessibleViewHint ? ( localizeWithPath(
@@ -1,7 +1,7 @@
1
1
  import { hookDomPurifyHrefAndSrcSanitizer, basicMarkupHtmlTags } from '../../../../base/browser/dom.js';
2
2
  import { sanitize as sanitize$1 } from '../../../../base/browser/dompurify/dompurify.js';
3
3
  import { allowedMarkdownAttr } from '../../../../base/browser/markdownRenderer.js';
4
- import marked from 'vscode-marked';
4
+ import marked_1 from '../../../../../../../external/vscode-marked/lib/marked.esm.js';
5
5
  import { Schemas } from '../../../../base/common/network.js';
6
6
  import { tokenizeToString } from '../../../../editor/common/languages/textToHtmlTokenizer.js';
7
7
  import { escape } from '../../../../base/common/strings.js';
@@ -191,12 +191,12 @@ async function renderMarkdownDocument(text, extensionService, languageService, s
191
191
  });
192
192
  return '';
193
193
  };
194
- const renderer = new marked.Renderer();
194
+ const renderer = new marked_1.Renderer();
195
195
  if (settingRenderer) {
196
196
  renderer.html = settingRenderer.getHtmlRenderer();
197
197
  }
198
198
  return ( new Promise((resolve, reject) => {
199
- marked(text, { highlight, renderer }, (err, value) => err ? reject(err) : resolve(value));
199
+ marked_1(text, { highlight, renderer }, (err, value) => err ? reject(err) : resolve(value));
200
200
  })).then(raw => {
201
201
  if (shouldSanitize) {
202
202
  return sanitize(raw, allowUnknownProtocols);
@@ -1,7 +1,7 @@
1
1
  import { renderMarkdownAsPlaintext } from '../../../../../base/browser/markdownRenderer.js';
2
2
  import { Emitter } from '../../../../../base/common/event.js';
3
3
  import { DisposableStore } from '../../../../../base/common/lifecycle.js';
4
- import marked from 'vscode-marked';
4
+ import marked_1 from '../../../../../../../../external/vscode-marked/lib/marked.esm.js';
5
5
  import { FoldingRegions } from '../../../../../editor/contrib/folding/browser/foldingRanges.js';
6
6
  import { sanitizeRanges } from '../../../../../editor/contrib/folding/browser/syntaxRangeProvider.js';
7
7
  import { CellKind } from '../../common/notebookCommon.js';
@@ -245,7 +245,7 @@ class FoldingModel {
245
245
  }
246
246
  }
247
247
  function* getMarkdownHeadersInCell(cellContent) {
248
- for (const token of marked.lexer(cellContent, { gfm: true })) {
248
+ for (const token of marked_1.lexer(cellContent, { gfm: true })) {
249
249
  if (token.type === 'heading') {
250
250
  yield {
251
251
  depth: token.depth,
@@ -17,7 +17,7 @@ import { ITerminalStatusList } from './terminalStatusList.js';
17
17
  import { XtermTerminal } from './xterm/xtermTerminal.js';
18
18
  import { IStartExtensionTerminalRequest, ITerminalProcessExtHostProxy, IRemoteTerminalAttachTarget, ITerminalConfiguration, ITerminalFont, ITerminalProcessInfo } from '../common/terminal.js';
19
19
  import { IContextKeyService } from '../../../../platform/contextkey/common/contextkey.js';
20
- import { IMarker, ITheme, Terminal } from '../../../../../../../external/@xterm/xterm/typings/xterm.js';
20
+ import { IMarker, ITheme, Terminal } from '@xterm/xterm';
21
21
  import { ScrollPosition } from './xterm/markNavigationAddon.js';
22
22
  import { SIDE_GROUP_TYPE, ACTIVE_GROUP_TYPE, AUX_WINDOW_GROUP_TYPE } from '../../../services/editor/common/editorService.js';
23
23
 
@@ -1,11 +1,11 @@
1
1
  import { Event } from '../../../../../base/common/event.js';
2
- import { Terminal, ITheme } from '../../../../../../../../external/@xterm/xterm/typings/xterm.js';
3
- import { CanvasAddon } from '../../../../../../../../external/@xterm/addon-canvas/typings/addon-canvas.js';
4
- import { ISearchOptions, SearchAddon } from '../../../../../../../../external/@xterm/addon-search/typings/addon-search.js';
5
- import { Unicode11Addon } from '../../../../../../../../external/@xterm/addon-unicode11/typings/addon-unicode11.js';
6
- import { WebglAddon } from '../../../../../../../../external/@xterm/addon-webgl/typings/addon-webgl.js';
7
- import { SerializeAddon } from '../../../../../../../../external/@xterm/addon-serialize/typings/addon-serialize.js';
8
- import { ImageAddon } from '../../../../../../../../external/@xterm/addon-image/typings/addon-image.js';
2
+ import { Terminal, ITheme } from '@xterm/xterm';
3
+ import { CanvasAddon } from '@xterm/addon-canvas';
4
+ import { ISearchOptions, SearchAddon } from '@xterm/addon-search';
5
+ import { Unicode11Addon } from '@xterm/addon-unicode11';
6
+ import { WebglAddon } from '@xterm/addon-webgl';
7
+ import { SerializeAddon } from '@xterm/addon-serialize';
8
+ import { ImageAddon } from '@xterm/addon-image';
9
9
  import { IConfigurationService } from '../../../../../platform/configuration/common/configuration.js';
10
10
  import { TerminalConfigHelper } from '../terminalConfigHelper.js';
11
11
  import { Disposable } from '../../../../../base/common/lifecycle.js';
@@ -1,4 +1,4 @@
1
- import { IBufferCell } from '../../../../../../../external/@xterm/xterm/typings/xterm.js';
1
+ import { IBufferCell } from '@xterm/xterm';
2
2
 
3
3
  /*---------------------------------------------------------------------------------------------
4
4
  * Copyright (c) Microsoft Corporation. All rights reserved.
package/workbench.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import { URI } from './vscode/src/vs/base/common/uri.js';
2
+ import './vscode/src/vs/editor/editor.api.js';
3
+
4
+ interface EnvironmentOverride {
5
+ userHome?: URI;
6
+ }
7
+
8
+ export type { EnvironmentOverride };
package/workbench.js CHANGED
@@ -5,6 +5,7 @@ import { URI } from './vscode/src/vs/base/common/uri.js';
5
5
  import { toLocalISOString } from './vscode/src/vs/base/common/date.js';
6
6
  let workbenchContainer = document.body;
7
7
  let workbenchConstructionOptions = {};
8
+ let environmentOverride = {};
8
9
  let workspaceIdentifier = UNKNOWN_EMPTY_WINDOW_WORKSPACE;
9
10
  const logsPath = URI.file(toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '')).with({ scheme: 'vscode-log' });
10
11
  function getWorkbenchContainer() {
@@ -13,6 +14,9 @@ function getWorkbenchContainer() {
13
14
  function getWorkbenchConstructionOptions() {
14
15
  return workbenchConstructionOptions;
15
16
  }
17
+ function getEnvironmentOverride() {
18
+ return environmentOverride;
19
+ }
16
20
  function getWorkspaceIdentifier() {
17
21
  return workspaceIdentifier;
18
22
  }
@@ -29,9 +33,10 @@ function resolveWorkspace(configuration) {
29
33
  }
30
34
  return UNKNOWN_EMPTY_WINDOW_WORKSPACE;
31
35
  }
32
- function initialize(container, options) {
36
+ function initialize(container, options, env = {}) {
33
37
  workbenchContainer = container;
34
38
  workbenchConstructionOptions = options;
39
+ environmentOverride = env;
35
40
  workspaceIdentifier = resolveWorkspace(options);
36
41
  }
37
- export { getWorkbenchConstructionOptions, getWorkbenchContainer, getWorkspaceIdentifier, initialize, logsPath };
42
+ export { getEnvironmentOverride, getWorkbenchConstructionOptions, getWorkbenchContainer, getWorkspaceIdentifier, initialize, logsPath };
@@ -1 +1 @@
1
- import '../vscode/src/vs/editor/editor.worker.js';
1
+ export { initialize } from '../vscode/src/vs/editor/editor.worker.js';
@@ -1,38 +0,0 @@
1
- import { ITerminalAddon, IEvent, Terminal } from '../../xterm/typings/xterm.js';
2
-
3
- /**
4
- * An xterm.js addon that provides search functionality.
5
- */
6
- declare class CanvasAddon implements ITerminalAddon {
7
- public textureAtlas?: HTMLCanvasElement;
8
-
9
- /**
10
- * An event that is fired when the texture atlas of the renderer changes.
11
- */
12
- public readonly onChangeTextureAtlas: IEvent<HTMLCanvasElement>;
13
-
14
- /**
15
- * An event that is fired when the a new page is added to the texture atlas.
16
- */
17
- public readonly onAddTextureAtlasCanvas: IEvent<HTMLCanvasElement>;
18
-
19
- constructor();
20
-
21
- /**
22
- * Activates the addon.
23
- * @param terminal The terminal the addon is being loaded in.
24
- */
25
- public activate(terminal: Terminal): void;
26
-
27
- /**
28
- * Disposes the addon.
29
- */
30
- public dispose(): void;
31
-
32
- /**
33
- * Clears the terminal's texture atlas and triggers a redraw.
34
- */
35
- public clearTextureAtlas(): void;
36
- }
37
-
38
- export { CanvasAddon };
@@ -1,115 +0,0 @@
1
- import { ITerminalAddon, Terminal } from '../../xterm/typings/xterm.js';
2
-
3
- interface IImageAddonOptions {
4
- /**
5
- * Enable size reports in windowOptions:
6
- * - getWinSizePixels (CSI 14 t)
7
- * - getCellSizePixels (CSI 16 t)
8
- * - getWinSizeChars (CSI 18 t)
9
- *
10
- * If `true` (default), the reports will be activated during addon loading.
11
- * If `false`, no settings will be touched. Use `false`, if you have high
12
- * security constraints and/or deal with windowOptions by other means.
13
- * On addon disposal, the settings will not change.
14
- */
15
- enableSizeReports?: boolean;
16
-
17
- /**
18
- * Maximum pixels a single image may hold. Images exceeding this number will
19
- * be discarded during processing with no changes to the terminal buffer
20
- * (no cursor advance, no placeholder).
21
- * This setting is mainly used to restrict images sizes during initial decoding
22
- * including the final canvas creation.
23
- *
24
- * Note: The image worker decoder may hold additional memory up to
25
- * `pixelLimit` * 4 bytes permanently, plus the same amount on top temporarily
26
- * for pixel transfers, which should be taken into account under memory pressure conditions.
27
- *
28
- * Note: Browsers restrict allowed canvas dimensions further. We dont reflect those
29
- * limits here, thus the construction of an oddly shaped image having most pixels
30
- * in one dimension still can fail.
31
- *
32
- * Note: `storageLimit` bytes are calculated from images by multiplying the pixels with 4
33
- * (4 channels with one byte, images are stored as RGBA8888).
34
- *
35
- * Default is 2^16 (4096 x 4096 pixels).
36
- */
37
- pixelLimit?: number;
38
-
39
- /**
40
- * Storage limit in MB.
41
- * The storage implements a FIFO cache removing old images, when the limit gets hit.
42
- * Also exposed as addon property for runtime adjustments.
43
- * Default is 128 MB.
44
- */
45
- storageLimit?: number;
46
-
47
- /**
48
- * Whether to show a placeholder for images removed from cache, default is true.
49
- */
50
- showPlaceholder?: boolean;
51
-
52
- /**
53
- * SIXEL settings
54
- */
55
-
56
- /** Whether SIXEL is enabled (default is true). */
57
- sixelSupport?: boolean;
58
- /** Whether SIXEL scrolling is enabled (default is true). Same as DECSET 80. */
59
- sixelScrolling?: boolean;
60
- /** Palette color limit (default 256). */
61
- sixelPaletteLimit?: number;
62
- /** SIXEL image size limit in bytes (default 25000000 bytes). */
63
- sixelSizeLimit?: number;
64
-
65
- /**
66
- * IIP settings (iTerm image protocol)
67
- */
68
-
69
- /** Whether iTerm image protocol style is enabled (default is true). */
70
- iipSupport?: boolean;
71
- /** IIP sequence size limit (default 20000000 bytes). */
72
- iipSizeLimit?: number;
73
- }
74
-
75
- declare class ImageAddon implements ITerminalAddon {
76
- constructor(options?: IImageAddonOptions);
77
- public activate(terminal: Terminal): void;
78
- public dispose(): void;
79
-
80
- /**
81
- * Reset the image addon.
82
- *
83
- * This resets all runtime options to default values (as given to the ctor)
84
- * and resets the image storage.
85
- */
86
- public reset(): void;
87
-
88
- /**
89
- * Getter/Setter for the storageLimit in MB.
90
- * Synchronously deletes images if the stored data exceeds the new value.
91
- */
92
- public storageLimit: number;
93
-
94
- /**
95
- * Current memory usage of the stored images in MB.
96
- */
97
- public readonly storageUsage: number;
98
-
99
- /**
100
- * Getter/Setter whether the placeholder should be shown.
101
- */
102
- public showPlaceholder: boolean;
103
-
104
- /**
105
- * Get original image canvas at buffer position.
106
- */
107
- public getImageAtBufferCell(x: number, y: number): HTMLCanvasElement | undefined;
108
-
109
- /**
110
- * Extract single tile canvas at buffer position.
111
- */
112
- public extractTileAtBufferCell(x: number, y: number): HTMLCanvasElement | undefined;
113
- }
114
-
115
- export { type IImageAddonOptions, ImageAddon };
@@ -1,141 +0,0 @@
1
- import { ITerminalAddon, Terminal, IEvent } from '../../xterm/typings/xterm.js';
2
-
3
- /**
4
- * Options for a search.
5
- */
6
- interface ISearchOptions {
7
- /**
8
- * Whether the search term is a regex.
9
- */
10
- regex?: boolean;
11
-
12
- /**
13
- * Whether to search for a whole word, the result is only valid if it's
14
- * surrounded in "non-word" characters such as `_`, `(`, `)` or space.
15
- */
16
- wholeWord?: boolean;
17
-
18
- /**
19
- * Whether the search is case sensitive.
20
- */
21
- caseSensitive?: boolean;
22
-
23
- /**
24
- * Whether to do an incremental search, this will expand the selection if it
25
- * still matches the term the user typed. Note that this only affects
26
- * `findNext`, not `findPrevious`.
27
- */
28
- incremental?: boolean;
29
-
30
- /**
31
- * When set, will highlight all instances of the word on search and show
32
- * them in the overview ruler if it's enabled.
33
- */
34
- decorations?: ISearchDecorationOptions;
35
- }
36
-
37
- /**
38
- * Options for showing decorations when searching.
39
- */
40
- interface ISearchDecorationOptions {
41
- /**
42
- * The background color of a match, this must use #RRGGBB format.
43
- */
44
- matchBackground?: string;
45
-
46
- /**
47
- * The border color of a match.
48
- */
49
- matchBorder?: string;
50
-
51
- /**
52
- * The overview ruler color of a match.
53
- */
54
- matchOverviewRuler: string;
55
-
56
- /**
57
- * The background color for the currently active match, this must use #RRGGBB format.
58
- */
59
- activeMatchBackground?: string;
60
-
61
- /**
62
- * The border color of the currently active match.
63
- */
64
- activeMatchBorder?: string;
65
-
66
- /**
67
- * The overview ruler color of the currently active match.
68
- */
69
- activeMatchColorOverviewRuler: string;
70
- }
71
-
72
- /**
73
- * Options for the search addon.
74
- */
75
- interface ISearchAddonOptions {
76
- /**
77
- * Max number of matches highlighted when decorations are enabled.
78
- * Defaults to 1000 highlighted matches
79
- */
80
- highlightLimit: number
81
- }
82
-
83
- /**
84
- * An xterm.js addon that provides search functionality.
85
- */
86
- declare class SearchAddon implements ITerminalAddon {
87
-
88
- /**
89
- * Creates a new search addon.
90
- * @param options Options for the search addon.
91
- */
92
- constructor(options?: Partial<ISearchAddonOptions>);
93
-
94
- /**
95
- * Activates the addon
96
- * @param terminal The terminal the addon is being loaded in.
97
- */
98
- public activate(terminal: Terminal): void;
99
-
100
- /**
101
- * Disposes the addon.
102
- */
103
- public dispose(): void;
104
-
105
- /**
106
- * Search forwards for the next result that matches the search term and
107
- * options.
108
- * @param term The search term.
109
- * @param searchOptions The options for the search.
110
- */
111
- public findNext(term: string, searchOptions?: ISearchOptions): boolean;
112
-
113
- /**
114
- * Search backwards for the previous result that matches the search term and
115
- * options.
116
- * @param term The search term.
117
- * @param searchOptions The options for the search.
118
- */
119
- public findPrevious(term: string, searchOptions?: ISearchOptions): boolean;
120
-
121
- /**
122
- * Clears the decorations and selection
123
- */
124
- public clearDecorations(): void;
125
-
126
- /**
127
- * Clears the active result decoration, this decoration is applied on top of the selection so
128
- * removing it will reveal the selection underneath. This is intended to be called on the search
129
- * textarea's `blur` event.
130
- */
131
- public clearActiveDecoration(): void;
132
-
133
- /**
134
- * When decorations are enabled, fires when
135
- * the search results change.
136
- * @returns -1 for resultIndex when the threshold of matches is exceeded.
137
- */
138
- readonly onDidChangeResults: IEvent<{ resultIndex: number, resultCount: number }>;
139
- }
140
-
141
- export { type ISearchAddonOptions, type ISearchDecorationOptions, type ISearchOptions, SearchAddon };
@@ -1,100 +0,0 @@
1
- import { ITerminalAddon, Terminal, IMarker } from '../../xterm/typings/xterm.js';
2
-
3
- /**
4
- * An xterm.js addon that enables serialization of terminal contents.
5
- */
6
- declare class SerializeAddon implements ITerminalAddon {
7
-
8
- constructor();
9
-
10
- /**
11
- * Activates the addon.
12
- * @param terminal The terminal the addon is being loaded in.
13
- */
14
- public activate(terminal: Terminal): void;
15
-
16
- /**
17
- * Serializes terminal rows into a string that can be written back to the terminal to restore
18
- * the state. The cursor will also be positioned to the correct cell. When restoring a terminal
19
- * it is best to do before `Terminal.open` is called to avoid wasting CPU cycles rendering
20
- * incomplete frames.
21
- *
22
- * It's recommended that you write the serialized data into a terminal of the same size in which
23
- * it originated from and then resize it after if needed.
24
- *
25
- * @param options Custom options to allow control over what gets serialized.
26
- */
27
- public serialize(options?: ISerializeOptions): string;
28
-
29
- /**
30
- * Serializes terminal content as HTML, which can be written to the clipboard using the
31
- * `text/html` mimetype. For applications that support it, the pasted text should then retain
32
- * its colors/styles.
33
- *
34
- * @param options Custom options to allow control over what gets serialized.
35
- */
36
- public serializeAsHTML(options?: Partial<IHTMLSerializeOptions>): string;
37
-
38
- /**
39
- * Disposes the addon.
40
- */
41
- public dispose(): void;
42
- }
43
-
44
- interface ISerializeOptions {
45
- /**
46
- * The row range to serialize. The an explicit range is specified, the cursor will get its final
47
- * repositioning.
48
- */
49
- range?: ISerializeRange;
50
-
51
- /**
52
- * The number of rows in the scrollback buffer to serialize, starting from the bottom of the
53
- * scrollback buffer. When not specified, all available rows in the scrollback buffer will be
54
- * serialized. This will be ignored if {@link range} is specified.
55
- */
56
- scrollback?: number;
57
-
58
- /**
59
- * Whether to exclude the terminal modes from the serialization. False by default.
60
- */
61
- excludeModes?: boolean;
62
-
63
- /**
64
- * Whether to exclude the alt buffer from the serialization. False by default.
65
- */
66
- excludeAltBuffer?: boolean;
67
- }
68
-
69
- interface IHTMLSerializeOptions {
70
- /**
71
- * The number of rows in the scrollback buffer to serialize, starting from the bottom of the
72
- * scrollback buffer. When not specified, all available rows in the scrollback buffer will be
73
- * serialized. This setting is ignored if {@link IHTMLSerializeOptions.onlySelection} is true.
74
- */
75
- scrollback: number;
76
-
77
- /**
78
- * Whether to only serialize the selection. If false, the whole active buffer is serialized in HTML.
79
- * False by default.
80
- */
81
- onlySelection: boolean;
82
-
83
- /**
84
- * Whether to include the global background of the terminal. False by default.
85
- */
86
- includeGlobalBackground: boolean;
87
- }
88
-
89
- interface ISerializeRange {
90
- /**
91
- * The line to start serializing (inclusive).
92
- */
93
- start: IMarker | number;
94
- /**
95
- * The line to end serializing (inclusive).
96
- */
97
- end: IMarker | number;
98
- }
99
-
100
- export { type IHTMLSerializeOptions, type ISerializeOptions, type ISerializeRange, SerializeAddon };
@@ -1,9 +0,0 @@
1
- import { ITerminalAddon, Terminal } from '../../xterm/typings/xterm.js';
2
-
3
- declare class Unicode11Addon implements ITerminalAddon {
4
- constructor();
5
- public activate(terminal: Terminal): void;
6
- public dispose(): void;
7
- }
8
-
9
- export { Unicode11Addon };
@@ -1,43 +0,0 @@
1
- import { ITerminalAddon, IEvent, Terminal } from '../../xterm/typings/xterm.js';
2
-
3
- /**
4
- * An xterm.js addon that provides search functionality.
5
- */
6
- declare class WebglAddon implements ITerminalAddon {
7
- public textureAtlas?: HTMLCanvasElement;
8
-
9
- /**
10
- * An event that is fired when the renderer loses its canvas context.
11
- */
12
- public readonly onContextLoss: IEvent<void>;
13
-
14
- /**
15
- * An event that is fired when the texture atlas of the renderer changes.
16
- */
17
- public readonly onChangeTextureAtlas: IEvent<HTMLCanvasElement>;
18
-
19
- /**
20
- * An event that is fired when the a new page is added to the texture atlas.
21
- */
22
- public readonly onAddTextureAtlasCanvas: IEvent<HTMLCanvasElement>;
23
-
24
- constructor(preserveDrawingBuffer?: boolean);
25
-
26
- /**
27
- * Activates the addon.
28
- * @param terminal The terminal the addon is being loaded in.
29
- */
30
- public activate(terminal: Terminal): void;
31
-
32
- /**
33
- * Disposes the addon.
34
- */
35
- public dispose(): void;
36
-
37
- /**
38
- * Clears the terminal's texture atlas and triggers a redraw.
39
- */
40
- public clearTextureAtlas(): void;
41
- }
42
-
43
- export { WebglAddon };