@pulsar-edit/types 1.128.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 (87) hide show
  1. package/.github/workflows/publish.yml +33 -0
  2. package/LICENSE.md +8 -0
  3. package/README.md +187 -0
  4. package/atom-i18n/config.d.ts +9 -0
  5. package/atom-i18n/index.d.ts +4 -0
  6. package/autocomplete-plus/config.d.ts +140 -0
  7. package/autocomplete-plus/index.d.ts +200 -0
  8. package/dependencies/event-kit/index.d.ts +143 -0
  9. package/dependencies/first-mate/index.d.ts +1 -0
  10. package/dependencies/first-mate/src/first-mate.d.ts +1 -0
  11. package/dependencies/first-mate/src/grammar.d.ts +119 -0
  12. package/dependencies/pathwatcher/index.d.ts +1 -0
  13. package/dependencies/pathwatcher/src/directory.d.ts +98 -0
  14. package/dependencies/pathwatcher/src/file.d.ts +115 -0
  15. package/dependencies/pathwatcher/src/main.d.ts +2 -0
  16. package/dependencies/service-hub/index.d.ts +3 -0
  17. package/dependencies/service-hub/src/consumer.d.ts +8 -0
  18. package/dependencies/service-hub/src/provider.d.ts +14 -0
  19. package/dependencies/service-hub/src/service-hub.d.ts +46 -0
  20. package/dependencies/service-hub/src/util.d.ts +1 -0
  21. package/dependencies/text-buffer/index.d.ts +1 -0
  22. package/dependencies/text-buffer/src/display-marker-layer.d.ts +182 -0
  23. package/dependencies/text-buffer/src/display-marker.d.ts +232 -0
  24. package/dependencies/text-buffer/src/helpers.d.ts +11 -0
  25. package/dependencies/text-buffer/src/marker-layer.d.ts +117 -0
  26. package/dependencies/text-buffer/src/marker.d.ts +207 -0
  27. package/dependencies/text-buffer/src/point.d.ts +102 -0
  28. package/dependencies/text-buffer/src/range.d.ts +141 -0
  29. package/dependencies/text-buffer/src/text-buffer.d.ts +759 -0
  30. package/index.d.ts +72 -0
  31. package/linter/config.d.ts +26 -0
  32. package/linter/index.d.ts +108 -0
  33. package/package.json +61 -0
  34. package/src/atom-environment.d.ts +361 -0
  35. package/src/branding.d.ts +19 -0
  36. package/src/buffered-node-process.d.ts +10 -0
  37. package/src/buffered-process.d.ts +88 -0
  38. package/src/clipboard.d.ts +14 -0
  39. package/src/color.d.ts +11 -0
  40. package/src/command-registry.d.ts +118 -0
  41. package/src/config-schema.d.ts +271 -0
  42. package/src/config.d.ts +168 -0
  43. package/src/context-menu-manager.d.ts +65 -0
  44. package/src/cursor.d.ts +252 -0
  45. package/src/decoration.d.ts +156 -0
  46. package/src/deserializer-manager.d.ts +15 -0
  47. package/src/dock.d.ts +121 -0
  48. package/src/get-window-load-settings.d.ts +26 -0
  49. package/src/git-repository.d.ts +174 -0
  50. package/src/grammar-registry.d.ts +241 -0
  51. package/src/gutter.d.ts +118 -0
  52. package/src/history-manager.d.ts +28 -0
  53. package/src/keymap-extensions.d.ts +190 -0
  54. package/src/language-mode.d.ts +314 -0
  55. package/src/layer-decoration.d.ts +31 -0
  56. package/src/menu-manager.d.ts +24 -0
  57. package/src/notification-manager.d.ts +37 -0
  58. package/src/notification.d.ts +79 -0
  59. package/src/other-types.d.ts +283 -0
  60. package/src/package-manager.d.ts +103 -0
  61. package/src/package.d.ts +33 -0
  62. package/src/pane.d.ts +604 -0
  63. package/src/panel.d.ts +38 -0
  64. package/src/path-watcher.d.ts +35 -0
  65. package/src/project.d.ts +110 -0
  66. package/src/scope-descriptor.d.ts +8 -0
  67. package/src/selection.d.ts +341 -0
  68. package/src/style-manager.d.ts +68 -0
  69. package/src/task.d.ts +38 -0
  70. package/src/text-editor-component.d.ts +15 -0
  71. package/src/text-editor-element.d.ts +48 -0
  72. package/src/text-editor-registry.d.ts +48 -0
  73. package/src/text-editor.d.ts +1416 -0
  74. package/src/theme-manager.d.ts +29 -0
  75. package/src/tooltip-manager.d.ts +42 -0
  76. package/src/tooltip.d.ts +63 -0
  77. package/src/ui.d.ts +101 -0
  78. package/src/view-registry.d.ts +34 -0
  79. package/src/wasm-tree-sitter-grammar.d.ts +305 -0
  80. package/src/wasm-tree-sitter-language-mode.d.ts +294 -0
  81. package/src/workspace-center.d.ts +117 -0
  82. package/src/workspace.d.ts +485 -0
  83. package/status-bar/config.d.ts +23 -0
  84. package/status-bar/index.d.ts +51 -0
  85. package/tool-bar/config.d.ts +20 -0
  86. package/tool-bar/index.d.ts +235 -0
  87. package/tsconfig.json +8 -0
@@ -0,0 +1,174 @@
1
+ import { Config, Disposable, Project } from "../index";
2
+
3
+ /** Represents the underlying git operations performed by Atom. */
4
+ export class GitRepository {
5
+ // Construction
6
+ /** Creates a new GitRepository instance. */
7
+ static open(path: string, options?: { refreshOnWindowFocus?: boolean | undefined }): GitRepository;
8
+
9
+ constructor(
10
+ path: string,
11
+ options?: {
12
+ refreshOnWindowFocus?: boolean | undefined;
13
+ config?: Config | undefined;
14
+ project?: Project | undefined;
15
+ },
16
+ );
17
+
18
+ // Lifecycle
19
+ /** Destroy this GitRepository object. */
20
+ destroy(): void;
21
+
22
+ /** Returns a boolean indicating if this repository has been destroyed. */
23
+ isDestroyed(): boolean;
24
+
25
+ // Event Subscription
26
+ /**
27
+ * Invoke the given callback when this GitRepository's destroy() method is
28
+ * invoked.
29
+ */
30
+ onDidDestroy(callback: () => void): Disposable;
31
+
32
+ /**
33
+ * Invoke the given callback when a specific file's status has changed. When
34
+ * a file is updated, reloaded, etc., and the status changes, this will be
35
+ * fired.
36
+ */
37
+ onDidChangeStatus(callback: (event: RepoStatusChangedEvent) => void): Disposable;
38
+
39
+ /** Invoke the given callback when a multiple files' statuses have changed. */
40
+ onDidChangeStatuses(callback: () => void): Disposable;
41
+
42
+ /**
43
+ * Refreshes the current git status in an outside process and asynchronously
44
+ * updates the relevant properties.
45
+ *
46
+ * If this results in a status change, will fire any callbacks registered via
47
+ * {@link onDidChangeStatuses}.
48
+ */
49
+ refreshStatus(): Promise<void>;
50
+
51
+ // Repository Details
52
+ /** A string indicating the type of version control system used by this repository. */
53
+ getType(): "git";
54
+
55
+ /** Returns the string path of the repository. */
56
+ getPath(): string;
57
+
58
+ /** Returns the string working directory path of the repository. */
59
+ getWorkingDirectory(): string;
60
+
61
+ /** Returns true if at the root, false if in a subfolder of the repository. */
62
+ isProjectAtRoot(): boolean;
63
+
64
+ /** Makes a path relative to the repository's working directory. */
65
+ relativize(): string;
66
+
67
+ /** Returns true if the given branch exists. */
68
+ hasBranch(branch: string): boolean;
69
+
70
+ /** Retrieves a shortened version of the HEAD reference value. */
71
+ getShortHead(path?: string): string;
72
+
73
+ /** Is the given path a submodule in the repository? */
74
+ isSubmodule(path: string): boolean;
75
+
76
+ /**
77
+ * Returns the number of commits behind the current branch is from the its
78
+ * upstream remote branch. The default reference is the HEAD.
79
+ *
80
+ * @param reference The branch reference name.
81
+ * @param path The path in the repository to get this ifnromation for, only
82
+ * needed if the repository contains submodules.
83
+ * @return The number of commits behind the current branch is from its
84
+ * upstream remote branch.
85
+ */
86
+ getAheadBehindCount(reference: string, path?: string): { ahead: number; behind: number };
87
+
88
+ /**
89
+ * Get the cached ahead/behind commit counts for the current branch's
90
+ * upstream branch.
91
+ */
92
+ getCachedUpstreamAheadBehindCount(path?: string): { ahead: number; behind: number };
93
+
94
+ /** Returns the git configuration value specified by the key. */
95
+ getConfigValue(key: string, path?: string): string;
96
+
97
+ /** Returns the origin url of the repository. */
98
+ getOriginURL(path?: string): string;
99
+
100
+ /**
101
+ * Returns the upstream branch for the current HEAD, or null if there is no
102
+ * upstream branch for the current HEAD.
103
+ */
104
+ getUpstreamBranch(path?: string): string | null;
105
+
106
+ /** Gets all the local and remote references. */
107
+ getReferences(path?: string): { heads: string[]; remotes: string[]; tags: string[] };
108
+
109
+ /** Returns the current string SHA for the given reference. */
110
+ getReferenceTarget(reference: string, path?: string): string;
111
+
112
+ // Reading Status
113
+ /** Returns true if the given path is modified. */
114
+ isPathModified(path: string): boolean;
115
+
116
+ /** Returns true if the given path is new. */
117
+ isPathNew(path: string): boolean;
118
+
119
+ /** Is the given path ignored? */
120
+ isPathIgnored(path: string): boolean;
121
+
122
+ /** Get the status of a directory in the repository's working directory. */
123
+ getDirectoryStatus(path: string): number;
124
+
125
+ /** Get the status of a single path in the repository. */
126
+ getPathStatus(path: string): number;
127
+
128
+ /** Get the cached status for the given path. */
129
+ getCachedPathStatus(path: string): number | null;
130
+
131
+ /** Returns `true` if the given status indicates modification. */
132
+ isStatusModified(status: number): boolean;
133
+
134
+ /** Returns `true` if the given status indicates a new path. */
135
+ isStatusNew(status: number): boolean;
136
+
137
+ // Retrieving Diffs
138
+ /**
139
+ * Retrieve the number of lines added and removed to a path.
140
+ *
141
+ * This compares the working directory contents of the path to the HEAD
142
+ * version.
143
+ */
144
+ getDiffStats(path: string): { added: number; deleted: number };
145
+
146
+ /**
147
+ * Retrieve the line diffs comparing the HEAD version of the given path and
148
+ * the given text.
149
+ */
150
+ getLineDiffs(
151
+ path: string,
152
+ text: string,
153
+ ): Array<{ oldStart: number; newStart: number; oldLines: number; newLines: number }>;
154
+
155
+ // Checking Out
156
+ /**
157
+ * Restore the contents of a path in the working directory and index to the
158
+ * version at HEAD.
159
+ */
160
+ checkoutHead(path: string): boolean;
161
+
162
+ /** Check out a branch in your repository. */
163
+ checkoutReference(reference: string, create: boolean): boolean;
164
+ }
165
+
166
+ export interface RepoStatusChangedEvent {
167
+ path: string;
168
+
169
+ /**
170
+ * This value can be passed to {@link GitRepository#isStatusModified} or
171
+ * {@link GitRepository#isStatusNew} to get more information.
172
+ */
173
+ pathStatus: number;
174
+ }
@@ -0,0 +1,241 @@
1
+ import {
2
+ Disposable,
3
+ Grammar as TextMateGrammar,
4
+ GrammarToken,
5
+ TextBuffer
6
+ } from "../index";
7
+ import {
8
+ InjectionPoint,
9
+ WASMTreeSitterGrammar,
10
+ WASMTreeSitterGrammarParams
11
+ } from "./wasm-tree-sitter-grammar";
12
+
13
+ type GenericGrammar = TextMateGrammar | WASMTreeSitterGrammar
14
+
15
+ type GrammarType = 'modern-tree-sitter' | 'textmate'
16
+
17
+ type TextMateGrammarParams = {
18
+ maxTokensPerLine?: number
19
+ maxLineLength?: number
20
+ limitLineLength?: boolean
21
+ name: string
22
+ fileTypes?: string[]
23
+ scopeName: string
24
+ foldingStopMarker?: string
25
+
26
+ injections?: unknown[]
27
+ injectionSelector?: string
28
+
29
+ patterns?: unknown[]
30
+ repository?: unknown
31
+ firstLineMatch?: string
32
+ contentRegex?: string
33
+ }
34
+
35
+ type GrammarConstructorParams = WASMTreeSitterGrammarParams | TextMateGrammarParams
36
+
37
+ type CreateGrammarParams = {
38
+ type: 'modern-tree-sitter',
39
+ params: GrammarConstructorParams
40
+ } | {
41
+ params: TextMateGrammarParams
42
+ }
43
+
44
+ type LanguageScopeFunction = (
45
+ grammar: WASMTreeSitterGrammar,
46
+ buffer: TextBuffer,
47
+ range: Range
48
+ ) => string | null
49
+
50
+
51
+ /** Registry containing one or more grammars. */
52
+ export interface GrammarRegistry {
53
+ // Event Subscription
54
+ /**
55
+ * Invoke the given callback when a grammar is added to the registry.
56
+ *
57
+ * @param callback The callback to be invoked whenever a grammar is added.
58
+ * @return A Disposable on which `.dispose()` can be called to unsubscribe.
59
+ */
60
+ onDidAddGrammar(callback: (grammar: GenericGrammar) => void): Disposable;
61
+
62
+ /**
63
+ * Invoke the given callback when a grammar is updated due to a grammar it
64
+ * depends on being added or removed from the registry.
65
+ *
66
+ * @param callback The callback to be invoked whenever a grammar is updated.
67
+ * @return A Disposable on which `.dispose()` can be called to unsubscribe.
68
+ */
69
+ onDidUpdateGrammar(callback: (grammar: GenericGrammar) => void): Disposable;
70
+
71
+ /**
72
+ * Invoke the given callback when a grammar is removed from the registry.
73
+ *
74
+ * @param callback The callback to be invoked whenever a grammar is removed.
75
+ * @return A Disposable on which `.dispose()` can be called to unsubscribe.
76
+ */
77
+ onDidRemoveGrammar(callback: (grammar: GenericGrammar) => void): Disposable;
78
+
79
+ // Managing Grammars
80
+ /**
81
+ * Get all the grammars in this registry.
82
+ *
83
+ * @param options When `includeTreeSitterGrammars` is `true`, will return
84
+ * both `Grammar`s and `WASMTreeSitterGrammar`s. Defaults to `false`.
85
+ * @return A non-empty array of `Grammar` instances.
86
+ */
87
+ getGrammars(options?: { includeTreeSitterGrammars?: boolean }): GenericGrammar[];
88
+
89
+ /**
90
+ * Get a grammar with the given scope name.
91
+ *
92
+ * If there is more than one kind of grammar for the given scope name, will
93
+ * return the grammar that matches the preferred grammar type for the given
94
+ * language as configured by the user.
95
+ *
96
+ * @param scopeName A string such as `source.js`.
97
+ * @return A Grammar or undefined.
98
+ */
99
+ grammarForScopeName(scopeName: string): GenericGrammar | undefined;
100
+
101
+ /**
102
+ * Add a grammar to this registry.
103
+ *
104
+ * A 'grammar-added' event is emitted after the grammar is added.
105
+ *
106
+ * @param grammar The Grammar to add. This should be a value previously
107
+ * returned from {@link readGrammar} or {@link readGrammarSync}.
108
+ * @return Returns a Disposable on which `.dispose()` can be called to
109
+ * remove the grammar.
110
+ */
111
+ addGrammar(grammar: GenericGrammar): Disposable;
112
+
113
+ /**
114
+ * Remove the given grammar from this registry.
115
+ *
116
+ * @param grammar The grammar to remove. This should be a grammar previously
117
+ * added to the registry from {@link addGrammar}.
118
+ */
119
+ removeGrammar(grammar: GenericGrammar): void;
120
+
121
+ /**
122
+ * Create a grammar of the type indicated by `params.type` — or a
123
+ * TextMate-style `Grammar` by default.
124
+ *
125
+ * @param grammarPath The path to the grammar configuration file.
126
+ * @param params Parameters to pass to the constructor. If `params.type`
127
+ * is `'modern-tree-sitter'`, will create a `WASMTreeSitterGrammar`;
128
+ * otherwise will create a `Grammar`.
129
+ */
130
+ createGrammar(grammarPath: string, params: CreateGrammarParams): GenericGrammar;
131
+
132
+ /**
133
+ * Remove the grammar with the given scope name.
134
+ *
135
+ * @param scopeName A string such as `source.js`.
136
+ * @return Returns the removed Grammar or undefined.
137
+ */
138
+ removeGrammarForScopeName(scopeName: string): TextMateGrammar | undefined;
139
+
140
+ /**
141
+ * Read a grammar synchronously but don't add it to the registry.
142
+ *
143
+ * @param grammarPath The absolute file path to a grammar.
144
+ * @return The newly loaded Grammar.
145
+ */
146
+ readGrammarSync(grammarPath: string): GenericGrammar;
147
+
148
+ /**
149
+ * Read a grammar asynchronously but don't add it to the registry.
150
+ *
151
+ * @param grammarPath The absolute file path to the grammar.
152
+ * @param callback The function to be invoked once the Grammar has been
153
+ * read in.
154
+ */
155
+ readGrammar(grammarPath: string, callback: (error: Error | null, grammar?: GenericGrammar) => void): void;
156
+
157
+ /**
158
+ * Read a grammar synchronously and add it to this registry.
159
+ *
160
+ * @param grammarPath The absolute file path to the grammar.
161
+ * @return The newly loaded Grammar.
162
+ */
163
+ loadGrammarSync(grammarPath: string): GenericGrammar;
164
+
165
+ /**
166
+ * Read a grammar asynchronously and add it to the registry.
167
+ *
168
+ * @param grammarPath The absolute file path to the grammar.
169
+ * @param callback The function to be invoked once the Grammar has been read
170
+ * in and added to the registry.
171
+ */
172
+ loadGrammar(grammarPath: string, callback: (error: Error | null, grammar?: GenericGrammar) => void): void;
173
+
174
+ /**
175
+ * Convert compact tags representation into convenient, space-inefficient
176
+ * tokens.
177
+ *
178
+ * @param lineText The text of the tokenized line.
179
+ * @param tags The tags returned from a call to Grammar::tokenizeLine().
180
+ * @return An array of GrammarToken instances decoded from the given tags.
181
+ */
182
+ decodeTokens(lineText: string, tags: Array<number | string>): GrammarToken[];
183
+
184
+ /**
185
+ * Set a TextBuffer's language mode based on its path and content, and
186
+ * continue to update its language mode as grammars are added or updated,
187
+ * or the buffer's file path changes.
188
+ *
189
+ * @param buffer The buffer whose language mode will be maintained.
190
+ * @return A {@link Disposable} that can be used to stop updating the
191
+ * buffer's language mode.
192
+ */
193
+ maintainLanguageMode(buffer: TextBuffer): Disposable;
194
+
195
+ /**
196
+ * Force a {@link TextBuffer} to use a different grammar than the one that
197
+ * would otherwise be selected for it.
198
+ *
199
+ * @param buffer The buffer whose grammar will be set.
200
+ * @param languageId The identifier of the desired language.
201
+ * @return Returns a boolean that indicates whether the language was
202
+ * successfully found.
203
+ */
204
+ assignLanguageMode(buffer: TextBuffer, languageId: string): boolean;
205
+
206
+ /**
207
+ * Remove any language mode override that has been set for the given
208
+ * TextBuffer. This will assign to the buffer the best language mode
209
+ * available.
210
+ */
211
+ autoAssignLanguageMode(buffer: TextBuffer): void;
212
+
213
+ /**
214
+ * Select a grammar for the given file path and file contents.
215
+ *
216
+ * This picks the best match by checking the file path and contents against
217
+ * each grammar.
218
+ *
219
+ * @param filePath A string file path.
220
+ * @param fileContents A string of text for that file path.
221
+ */
222
+ selectGrammar(filePath: string, fileContents: string): GenericGrammar;
223
+
224
+ /**
225
+ * Returns a number representing how well the grammar matches the `filePath`
226
+ * and `contents`.
227
+ *
228
+ * @param grammar The grammar to score.
229
+ * @param filePath A string file path.
230
+ * @param contents A string of text for that file path.
231
+ */
232
+ getGrammarScore(grammar: GenericGrammar, filePath: string, contents: string): number;
233
+
234
+ /**
235
+ * Specify a type of syntax node that may embed other languages.
236
+ *
237
+ * Returns a {@link Disposable} that, when disposed, will remove the
238
+ * injection point.
239
+ */
240
+ addInjectionPoint(scopeName: string, injectionPoint: InjectionPoint): Disposable;
241
+ }
@@ -0,0 +1,118 @@
1
+ import { Decoration, DecorationOptions, DisplayMarker, Disposable } from "../index";
2
+
3
+ /** Represents a gutter within a TextEditor. */
4
+ export interface Gutter {
5
+ /** Undocumented: The name of the gutter. */
6
+ name?: string;
7
+
8
+ // Gutter Destruction
9
+ /** Destroys the gutter. */
10
+ destroy(): void;
11
+
12
+ // Event Subscription
13
+ /** Calls your callback when the gutter's visibility changes. */
14
+ onDidChangeVisible(callback: (gutter: Gutter) => void): Disposable;
15
+
16
+ /** Calls your callback when the gutter is destroyed. */
17
+ onDidDestroy(callback: () => void): Disposable;
18
+
19
+ // Visibility
20
+ /** Hide the gutter. */
21
+ hide(): void;
22
+
23
+ /** Show the gutter. */
24
+ show(): void;
25
+
26
+ /** Determine whether the gutter is visible. */
27
+ isVisible(): boolean;
28
+
29
+ /**
30
+ * Add a decoration that tracks a DisplayMarker. When the marker moves, is
31
+ * invalidated, or is destroyed, the decoration will be updated to reflect
32
+ * the marker's state.
33
+ */
34
+ decorateMarker(marker: DisplayMarker, decorationParams: DecorationOptions): Decoration;
35
+ }
36
+
37
+ export interface GutterOptions {
38
+ /** (required) A unique String to identify this gutter. */
39
+ name: string;
40
+
41
+ /**
42
+ * A Number that determines stacking order between gutters.
43
+ *
44
+ * Lower priority items are forced closer to the edges of the window.
45
+ *
46
+ * Defaults to `-100`.
47
+ */
48
+ priority?: number | undefined;
49
+
50
+ /**
51
+ * Boolean specifying whether the gutter is visible initially after being
52
+ * created.
53
+ *
54
+ * Defaults to `true`.
55
+ */
56
+ visible?: boolean | undefined;
57
+
58
+ /**
59
+ * String specifying the type of gutter to create.
60
+ *
61
+ * 'decorated' gutters are useful as a destination for decorations created
62
+ * with {@link Gutter#decorateMarker}.
63
+ */
64
+ type?: "decorated" | "line-number" | undefined;
65
+
66
+ /** String added to the CSS classnames of the gutter's root DOM element. */
67
+ class?: string | undefined;
68
+
69
+ /**
70
+ * Function called by a 'line-number' gutter to generate the label for each
71
+ * line number element. Should return a String that will be used to label the
72
+ * corresponding line.
73
+ */
74
+ labelFn?: ((lineData: LineDataExtended) => string) | undefined;
75
+
76
+ /**
77
+ * Function to be called when a mousedown event is received by a line-number
78
+ * element within this type: 'line-number' Gutter. If unspecified, the default
79
+ * behavior is to select the clicked buffer row.
80
+ */
81
+ onMouseDown?: ((lineData: LineDataEvent) => void) | undefined;
82
+
83
+ /**
84
+ * Function to be called when a mousemove event occurs on a line-number
85
+ * element within within this type: 'line-number' Gutter.
86
+ */
87
+ onMouseMove?: ((lineData: LineDataEvent) => void) | undefined;
88
+ }
89
+
90
+
91
+ export interface LineData {
92
+ /** Number indicating the zero-indexed buffer index of a line. */
93
+ bufferRow: number;
94
+
95
+ /** Number indicating the zero-indexed screen index. */
96
+ screenRow: number;
97
+ }
98
+
99
+ /**
100
+ * The event delivered to all {@link GutterOptions['onMouseDown']} and
101
+ * {@link GutterOptions['onMouseMove']} callbacks. Contains line data as well
102
+ * as a reference to the underlying mouse event.
103
+ */
104
+ export interface LineDataEvent extends LineData {
105
+ domEvent: MouseEvent;
106
+ }
107
+
108
+ /** Object containing information about each line to label. */
109
+ export interface LineDataExtended extends LineData {
110
+ /** Boolean that is true if a fold may be created here. */
111
+ foldable: boolean;
112
+
113
+ /** Boolean if this screen row is the soft-wrapped continuation of the same buffer row. */
114
+ softWrapped: boolean;
115
+
116
+ /** Number the maximum number of digits necessary to represent any known screen row. */
117
+ maxDigits: number;
118
+ }
@@ -0,0 +1,28 @@
1
+ import { Disposable } from "../index";
2
+
3
+ /**
4
+ * History manager for remembering which projects have been opened.
5
+ *
6
+ * An instance of this class is always available as the atom.history global.
7
+ * The project history is used to enable the 'Reopen Project' menu.
8
+ */
9
+ export interface HistoryManager {
10
+ /** Obtain a list of previously opened projects. */
11
+ getProjects(): ProjectHistory[];
12
+
13
+ /**
14
+ * Clear all projects from the history.
15
+ *
16
+ * Note: This is not a privacy function. Other traces will still exist —
17
+ * e.g., window state.
18
+ */
19
+ clearProjects(): void;
20
+
21
+ /** Invoke the given callback when the list of projects changes. */
22
+ onDidChangeProjects(callback: (args: { reloaded: boolean }) => void): Disposable;
23
+ }
24
+
25
+ export interface ProjectHistory {
26
+ paths: string[];
27
+ lastOpened: Date;
28
+ }