@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,65 @@
1
+ import { Disposable } from "../index";
2
+
3
+ /**
4
+ * Provides a registry for commands that you'd like to appear in the context
5
+ * menu.
6
+ */
7
+ export interface ContextMenuManager {
8
+ /** Add context menu items scoped by CSS selectors. */
9
+ add(itemsBySelector: { [key: string]: readonly ContextMenuOptions[] }): Disposable;
10
+ }
11
+
12
+ export type ContextMenuOptions = ContextMenuItemOptions | { type: "separator" };
13
+
14
+ export interface ContextMenuItemOptions {
15
+ /** The menu item's label. */
16
+ label?: string | undefined;
17
+
18
+ /**
19
+ * The command to invoke on the target of the right click that invoked the
20
+ * context menu.
21
+ */
22
+ command?: string | undefined;
23
+
24
+ /**
25
+ * Whether the menu item should be clickable. Disabled menu items typically
26
+ * appear grayed out. Defaults to `true`.
27
+ */
28
+ enabled?: boolean | undefined;
29
+
30
+ /** An array of additional items. */
31
+ submenu?: readonly ContextMenuOptions[] | undefined;
32
+
33
+ /** Whether the menu item should appear in the menu. Defaults to `true`. */
34
+ visible?: boolean | undefined;
35
+
36
+ /**
37
+ * A function that is called on the item each time a context menu is created
38
+ * via a right click.
39
+ */
40
+ created?(event: Event): void;
41
+
42
+ /**
43
+ * A function that is called to determine whether to display this item on a
44
+ * given context menu deployment.
45
+ */
46
+ shouldDisplay?(event: Event): void;
47
+
48
+ /** Place this menu item before the menu items representing the given commands. */
49
+ before?: readonly string[] | undefined;
50
+
51
+ /** Place this menu item after the menu items representing the given commands. */
52
+ after?: readonly string[] | undefined;
53
+
54
+ /**
55
+ * Place this menu item's group before the containing group of the menu items
56
+ * representing the given commands.
57
+ */
58
+ beforeGroupContaining?: readonly string[] | undefined;
59
+
60
+ /**
61
+ * Place this menu item's group after the containing group of the menu items
62
+ * representing the given commands.
63
+ */
64
+ afterGroupContaining?: readonly string[] | undefined;
65
+ }
@@ -0,0 +1,252 @@
1
+ import { DisplayMarker, Disposable, Point, PointCompatible, Range, ScopeDescriptor } from "../index";
2
+
3
+ /**
4
+ * The Cursor class represents the little blinking line identifying where text
5
+ * can be inserted.
6
+ */
7
+ export interface Cursor {
8
+ // Event Subscription
9
+ /** Calls your callback when the cursor has been moved. */
10
+ onDidChangePosition(callback: (event: CursorPositionChangedEvent) => void): Disposable;
11
+
12
+ /** Calls your callback when the cursor is destroyed. */
13
+ onDidDestroy(callback: () => void): Disposable;
14
+
15
+ /** Calls your callback when the cursor's visibility has changed. */
16
+ onDidChangeVisibility(callback: (visibility: boolean) => void): Disposable;
17
+
18
+ // Managing Cursor Position
19
+ /** Moves a cursor to a given screen position. */
20
+ setScreenPosition(screenPosition: PointCompatible, options?: { autoscroll?: boolean | undefined }): void;
21
+
22
+ /** Returns the screen position of the cursor as a Point. */
23
+ getScreenPosition(): Point;
24
+
25
+ /** Moves a cursor to a given buffer position. */
26
+ setBufferPosition(bufferPosition: PointCompatible, options?: { autoscroll?: boolean | undefined }): void;
27
+
28
+ /** Returns the current buffer position as an Array. */
29
+ getBufferPosition(): Point;
30
+
31
+ /** Returns the cursor's current screen row. */
32
+ getScreenRow(): number;
33
+
34
+ /** Returns the cursor's current screen column. */
35
+ getScreenColumn(): number;
36
+
37
+ /** Retrieves the cursor's current buffer row. */
38
+ getBufferRow(): number;
39
+
40
+ /** Returns the cursor's current buffer column. */
41
+ getBufferColumn(): number;
42
+
43
+ /** Returns the cursor's current buffer row of text excluding its line ending. */
44
+ getCurrentBufferLine(): string;
45
+
46
+ /** Returns whether the cursor is at the start of a line. */
47
+ isAtBeginningOfLine(): boolean;
48
+
49
+ /** Returns whether the cursor is on the line return character. */
50
+ isAtEndOfLine(): boolean;
51
+
52
+ // Cursor Position Details
53
+ /**
54
+ * Returns the underlying DisplayMarker for the cursor.
55
+ *
56
+ * Useful with overlay decorations.
57
+ */
58
+ getMarker(): DisplayMarker;
59
+
60
+ /**
61
+ * Identifies if the cursor is surrounded by whitespace.
62
+ *
63
+ * "Surrounded" means that the character directly before and after the cursor
64
+ * are both whitespace.
65
+ */
66
+ isSurroundedByWhitespace(): boolean;
67
+
68
+ /**
69
+ * Returns whether the cursor is currently between a word and non-word
70
+ * character.
71
+ *
72
+ * The non-word characters are defined by the `editor.nonWordCharacters`
73
+ * config value.
74
+ *
75
+ * Returns `false` if the character before or after the cursor is whitespace.
76
+ */
77
+ isBetweenWordAndNonWord(): boolean;
78
+
79
+ /** Returns whether this cursor is between a word's start and end. */
80
+ isInsideWord(options?: { wordRegex?: RegExp | undefined }): boolean;
81
+
82
+ /** Returns the indentation level of the current line. */
83
+ getIndentLevel(): number;
84
+
85
+ /** Retrieves the scope descriptor for the cursor's current position. */
86
+ getScopeDescriptor(): ScopeDescriptor;
87
+
88
+ /**
89
+ * Retrieves the syntax tree scope descriptor for the cursor's current
90
+ * position.
91
+ */
92
+ getSyntaxTreeScopeDescriptor(): ScopeDescriptor;
93
+
94
+ /**
95
+ * Returns true if this cursor has no non-whitespace characters before its
96
+ * current position.
97
+ */
98
+ hasPrecedingCharactersOnLine(): boolean;
99
+
100
+ /**
101
+ * Identifies if this cursor is the last in the TextEditor.
102
+ *
103
+ * "Last" is defined as the most recently added cursor.
104
+ */
105
+ isLastCursor(): boolean;
106
+
107
+ // Moving the Cursor
108
+ /** Moves the cursor up one screen row. */
109
+ moveUp(rowCount?: number, options?: { moveToEndOfSelection?: boolean | undefined }): void;
110
+
111
+ /** Moves the cursor down one screen row. */
112
+ moveDown(rowCount?: number, options?: { moveToEndOfSelection?: boolean | undefined }): void;
113
+
114
+ /** Moves the cursor left one screen column. */
115
+ moveLeft(columnCount?: number, options?: { moveToEndOfSelection?: boolean | undefined }): void;
116
+
117
+ /** Moves the cursor right one screen column. */
118
+ moveRight(columnCount?: number, options?: { moveToEndOfSelection?: boolean | undefined }): void;
119
+
120
+ /** Moves the cursor to the top of the buffer. */
121
+ moveToTop(): void;
122
+
123
+ /** Moves the cursor to the bottom of the buffer. */
124
+ moveToBottom(): void;
125
+
126
+ /** Moves the cursor to the beginning of the line. */
127
+ moveToBeginningOfScreenLine(): void;
128
+
129
+ /** Moves the cursor to the beginning of the buffer line. */
130
+ moveToBeginningOfLine(): void;
131
+
132
+ /** Moves the cursor to the beginning of the first character in the line. */
133
+ moveToFirstCharacterOfLine(): void;
134
+
135
+ /** Moves the cursor to the end of the line. */
136
+ moveToEndOfScreenLine(): void;
137
+
138
+ /** Moves the cursor to the end of the buffer line. */
139
+ moveToEndOfLine(): void;
140
+
141
+ /** Moves the cursor to the beginning of the word. */
142
+ moveToBeginningOfWord(): void;
143
+
144
+ /** Moves the cursor to the end of the word. */
145
+ moveToEndOfWord(): void;
146
+
147
+ /** Moves the cursor to the beginning of the next word. */
148
+ moveToBeginningOfNextWord(): void;
149
+
150
+ /** Moves the cursor to the previous word boundary. */
151
+ moveToPreviousWordBoundary(): void;
152
+
153
+ /** Moves the cursor to the next word boundary. */
154
+ moveToNextWordBoundary(): void;
155
+
156
+ /** Moves the cursor to the previous subword boundary. */
157
+ moveToPreviousSubwordBoundary(): void;
158
+
159
+ /** Moves the cursor to the next subword boundary. */
160
+ moveToNextSubwordBoundary(): void;
161
+
162
+ /** Moves the cursor to the beginning of the buffer line, skipping all whitespace. */
163
+ skipLeadingWhitespace(): void;
164
+
165
+ /** Moves the cursor to the beginning of the next paragraph. */
166
+ moveToBeginningOfNextParagraph(): void;
167
+
168
+ /** Moves the cursor to the beginning of the previous paragraph. */
169
+ moveToBeginningOfPreviousParagraph(): void;
170
+
171
+ // Local Positions and Ranges
172
+ /**
173
+ * Returns buffer position of previous word boundary. It might be on the
174
+ * current word, or the previous word.
175
+ */
176
+ getPreviousWordBoundaryBufferPosition(options?: { wordRegex?: RegExp | undefined }): Point;
177
+
178
+ /**
179
+ * Returns buffer position of the next word boundary. It might be on the
180
+ * current word, or the previous word.
181
+ */
182
+ getNextWordBoundaryBufferPosition(options?: { wordRegex?: RegExp | undefined }): Point;
183
+
184
+ /** Retrieves the buffer position of where the current word starts. */
185
+ getBeginningOfCurrentWordBufferPosition(options?: {
186
+ wordRegex?: RegExp | undefined;
187
+ includeNonWordCharacters?: boolean | undefined;
188
+ allowPrevious?: boolean | undefined;
189
+ }): Point;
190
+
191
+ /** Retrieves the buffer position of where the current word ends. */
192
+ getEndOfCurrentWordBufferPosition(
193
+ options?: { wordRegex?: RegExp | undefined; includeNonWordCharacters?: boolean | undefined },
194
+ ): Point;
195
+
196
+ /** Retrieves the buffer position of where the next word starts. */
197
+ getBeginningOfNextWordBufferPosition(options?: { wordRegex?: RegExp | undefined }): Point;
198
+
199
+ /** Returns the buffer Range occupied by the word located under the cursor. */
200
+ getCurrentWordBufferRange(options?: { wordRegex?: RegExp | undefined }): Range;
201
+
202
+ /** Returns the buffer Range for the current line. */
203
+ getCurrentLineBufferRange(options?: { includeNewline?: boolean | undefined }): Range;
204
+
205
+ /**
206
+ * Retrieves the range for the current paragraph.
207
+ *
208
+ * A paragraph is defined as a block of text surrounded by empty lines or
209
+ * comments.
210
+ */
211
+ getCurrentParagraphBufferRange(): Range;
212
+
213
+ /** Returns the characters preceding the cursor in the current word. */
214
+ getCurrentWordPrefix(): string;
215
+
216
+ // Visibility
217
+ /** Sets whether the cursor is visible. */
218
+ setVisible(visible: boolean): void;
219
+
220
+ /** Returns the visibility of the cursor. */
221
+ isVisible(): boolean;
222
+
223
+ // Comparing to another cursor
224
+ /**
225
+ * Compare this cursor's buffer position to another cursor's buffer position.
226
+ *
227
+ * See {@link Point#compare} for more details.
228
+ */
229
+ compare(otherCursor: Cursor): number;
230
+
231
+ // Utilities
232
+ /** Prevents this cursor from causing scrolling. */
233
+ clearAutoscroll(): void;
234
+
235
+ /** Deselects the current selection. */
236
+ clearSelection(): void;
237
+
238
+ /** Get the RegExp used by the cursor to determine what a "word" is. */
239
+ wordRegExp(options?: { includeNonWordCharacters?: boolean | undefined }): RegExp;
240
+
241
+ /** Get the RegExp used by the cursor to determine what a "subword" is. */
242
+ subwordRegExp(options?: { backwards?: boolean | undefined }): RegExp;
243
+ }
244
+
245
+ export interface CursorPositionChangedEvent {
246
+ oldBufferPosition: Point;
247
+ oldScreenPosition: Point;
248
+ newBufferPosition: Point;
249
+ newScreenPosition: Point;
250
+ textChanged: boolean;
251
+ cursor: Cursor;
252
+ }
@@ -0,0 +1,156 @@
1
+ import { DecorationPropsChangedEvent, DisplayMarker, Disposable } from "../index";
2
+
3
+ /**
4
+ * Represents a decoration that follows a {@link DisplayMarker}.
5
+ *
6
+ * A decoration is a visual representation of a marker. It allows you to add
7
+ * CSS classes to line numbers in the gutter, lines, and add selection-line
8
+ * regions around marked ranges of text.
9
+ */
10
+ export interface Decoration {
11
+ /** The identifier for this Decoration. */
12
+ readonly id: number;
13
+
14
+ // Construction and Destruction
15
+ /**
16
+ * Destroy this marker decoration.
17
+ *
18
+ * If you own the associated marker, you can destroy that instead, and this
19
+ * decoration will automatically be destroyed.
20
+ */
21
+ destroy(): void;
22
+
23
+ // Event Subscription
24
+ /**
25
+ * Add a listener for when the decoration is updated via
26
+ * {@link setProperties}.
27
+ */
28
+ onDidChangeProperties(callback: (event: DecorationPropsChangedEvent) => void): Disposable;
29
+
30
+ /** Add a listener for when this decoration is destroyed. */
31
+ onDidDestroy(callback: () => void): Disposable;
32
+
33
+ // Decoration Details
34
+ /** An ID unique across all Decoration objects. */
35
+ getId(): number;
36
+
37
+ /** Returns the marker associated with this decoration. */
38
+ getMarker(): DisplayMarker;
39
+
40
+ /**
41
+ * Check if this decoration is of the given type.
42
+ *
43
+ * @param type A decoration type, such as `line-number` or `line`. This may
44
+ * also be an array of decoration types, with isType returning true if
45
+ * the decoration's type matches any in the array.
46
+ */
47
+ isType(type: string | string[]): boolean;
48
+
49
+ // Properties
50
+ /** Returns the Decoration's properties. */
51
+ getProperties(): DecorationOptions;
52
+
53
+ /**
54
+ * Update the marker with new properties.
55
+ *
56
+ * Allows you to change the decoration's class.
57
+ */
58
+ setProperties(newProperties: DecorationOptions): void;
59
+ }
60
+
61
+ export interface SharedDecorationOptions {
62
+ /**
63
+ * This CSS class will be applied to the decorated line number, line,
64
+ * highlight, or overlay.
65
+ */
66
+ class?: string | undefined;
67
+
68
+ /**
69
+ * An Object containing CSS style properties to apply to the relevant DOM
70
+ * node.
71
+ *
72
+ * Currently this only works with a type of `cursor` or `text`.
73
+ */
74
+ style?: object | undefined;
75
+
76
+ /**
77
+ * An `HTMLElement` or a model object with a corresponding view registered.
78
+ *
79
+ * Only applicable to the `gutter`, `overlay`, and `block` types.
80
+ */
81
+ item?: object | undefined;
82
+
83
+ /**
84
+ * If `true`, the decoration will only be applied to the head of the
85
+ * DisplayMarker.
86
+ *
87
+ * Only applicable to the `line` and `line-number` types.
88
+ */
89
+ onlyHead?: boolean | undefined;
90
+
91
+ /**
92
+ * If `true`, the decoration will only be applied if the associated
93
+ * DisplayMarker is empty.
94
+ *
95
+ * Only applicable to the `gutter`, `line`, and `line-number` types.
96
+ */
97
+ onlyEmpty?: boolean | undefined;
98
+
99
+ /**
100
+ * If `true`, the decoration will only be applied if the associated
101
+ * DisplayMarker is non-empty.
102
+ *
103
+ * Only applicable to the `gutter`, `line`, and `line-number` types.
104
+ */
105
+ onlyNonEmpty?: boolean | undefined;
106
+
107
+ /**
108
+ * If `false`, the decoration will be applied to the last row of a non-empty
109
+ * range, even if it ends at column 0.
110
+ *
111
+ * Defaults to `true`. Only applicable to the `gutter`, `line`, and
112
+ * `line-number` types.
113
+ */
114
+ omitEmptyLastRow?: boolean | undefined;
115
+
116
+ /**
117
+ * Controls where the view is positioned relative to the TextEditorMarker.
118
+ *
119
+ * Values can be 'head' (the default) or 'tail' for overlay decorations, and
120
+ * 'before' (the default) or 'after' for block decorations.
121
+ *
122
+ * Only applicable to the `overlay` and `block` decoration types.
123
+ */
124
+ position?: "head" | "tail" | "before" | "after" | undefined;
125
+
126
+ /**
127
+ * Controls where the view is positioned relative to other block decorations
128
+ * at the same screen row.
129
+ *
130
+ * If unspecified, block decorations render oldest to newest. Only applicable
131
+ * to the `block` type.
132
+ */
133
+ order?: number | undefined;
134
+
135
+ /**
136
+ * Determines whether the decoration adjusts its horizontal or vertical
137
+ * position to remain fully visible when it would otherwise overflow the
138
+ * editor.
139
+ *
140
+ * Defaults to `true`. Only applicable to the `overlay` type.
141
+ */
142
+ avoidOverflow?: boolean | undefined;
143
+ }
144
+
145
+ export interface DecorationLayerOptions extends SharedDecorationOptions {
146
+ /** One of several supported decoration types. */
147
+ type?: "line" | "line-number" | "text" | "highlight" | "block" | "cursor" | undefined;
148
+ }
149
+
150
+ export interface DecorationOptions extends SharedDecorationOptions {
151
+ /** One of several supported decoration types. */
152
+ type?: "line" | "line-number" | "text" | "highlight" | "overlay" | "gutter" | "block" | "cursor" | undefined;
153
+
154
+ /** The name of the gutter we're decorating, if type is "gutter". */
155
+ gutterName?: string | undefined;
156
+ }
@@ -0,0 +1,15 @@
1
+ import { Disposable } from "../index";
2
+
3
+ /** Manages the deserializers used for serialized state. */
4
+ export interface DeserializerManager {
5
+ /** Register the given class(es) as deserializers. */
6
+ add(...deserializers: Deserializer[]): Disposable;
7
+
8
+ /** Deserialize the state and params. */
9
+ deserialize(state: object): object | undefined;
10
+ }
11
+
12
+ export interface Deserializer {
13
+ name: string;
14
+ deserialize(state: object): object;
15
+ }
package/src/dock.d.ts ADDED
@@ -0,0 +1,121 @@
1
+ import { Disposable, Pane, PaneItemObservedEvent } from "../index";
2
+
3
+ /** A container at the edges of the editor window capable of holding items. */
4
+ export interface Dock {
5
+ // Methods
6
+ /** Show the dock and focus its active Pane. */
7
+ activate(): void;
8
+
9
+ /** Show the dock without focusing it. */
10
+ show(): void;
11
+
12
+ /**
13
+ * Hide the dock and activate the WorkspaceCenter if the dock was was
14
+ * previously focused.
15
+ */
16
+ hide(): void;
17
+
18
+ /**
19
+ * Toggle the dock's visibility without changing the Workspace's active pane
20
+ * container.
21
+ */
22
+ toggle(): void;
23
+
24
+ /** Check if the dock is visible. */
25
+ isVisible(): boolean;
26
+
27
+ // Event Subscription
28
+ /** Invoke the given callback when the visibility of the dock changes. */
29
+ onDidChangeVisible(callback: (visible: boolean) => void): Disposable;
30
+
31
+ /**
32
+ * Invoke the given callback with the current and all future visibilities of
33
+ * the dock.
34
+ */
35
+ observeVisible(callback: (visible: boolean) => void): Disposable;
36
+
37
+ /** Invoke the given callback with all current and future panes items in the dock. */
38
+ observePaneItems(callback: (item: object) => void): Disposable;
39
+
40
+ /**
41
+ * Invoke the given callback when the active pane item changes.
42
+ *
43
+ * Because observers are invoked synchronously, it's important not to perform any
44
+ * expensive operations via this method. Consider ::onDidStopChangingActivePaneItem
45
+ * to delay operations until after changes stop occurring.
46
+ */
47
+ onDidChangeActivePaneItem(callback: (item: object) => void): Disposable;
48
+
49
+ /** Invoke the given callback when the active pane item stops changing. */
50
+ onDidStopChangingActivePaneItem(callback: (item: object) => void): Disposable;
51
+
52
+ /**
53
+ * Invoke the given callback with the current active pane item and with all future
54
+ * active pane items in the dock.
55
+ */
56
+ observeActivePaneItem(callback: (item: object) => void): Disposable;
57
+
58
+ /** Invoke the given callback when a pane is added to the dock. */
59
+ onDidAddPane(callback: (event: { pane: Pane }) => void): Disposable;
60
+
61
+ /** Invoke the given callback before a pane is destroyed in the dock. */
62
+ onWillDestroyPane(callback: (event: { pane: Pane }) => void): Disposable;
63
+
64
+ /** Invoke the given callback when a pane is destroyed in the dock. */
65
+ onDidDestroyPane(callback: (event: { pane: Pane }) => void): Disposable;
66
+
67
+ /** Invoke the given callback with all current and future panes in the dock. */
68
+ observePanes(callback: (pane: Pane) => void): Disposable;
69
+
70
+ /** Invoke the given callback when the active pane changes. */
71
+ onDidChangeActivePane(callback: (pane: Pane) => void): Disposable;
72
+
73
+ /**
74
+ * Invoke the given callback with the current active pane and when the active
75
+ * pane changes.
76
+ */
77
+ observeActivePane(callback: (pane: Pane) => void): Disposable;
78
+
79
+ /** Invoke the given callback when a pane item is added to the dock. */
80
+ onDidAddPaneItem(callback: (event: PaneItemObservedEvent) => void): Disposable;
81
+
82
+ /**
83
+ * Invoke the given callback when a pane item is about to be destroyed,
84
+ * before the user is prompted to save it.
85
+ *
86
+ * @param callback The function to be called before pane items are destroyed.
87
+ * If this function returns a Promise, then the item will not be destroyed
88
+ * until the promise resolves.
89
+ */
90
+ onWillDestroyPaneItem(callback: (event: PaneItemObservedEvent) => void | Promise<void>): Disposable;
91
+
92
+ /** Invoke the given callback when a pane item is destroyed. */
93
+ onDidDestroyPaneItem(callback: (event: PaneItemObservedEvent) => void): Disposable;
94
+
95
+ /**
96
+ * Invoke the given callback when the hovered state of the dock changes.
97
+ *
98
+ * @param hovered Is the dock now hovered?
99
+ */
100
+ onDidChangeHovered(callback: (hovered: boolean) => void): Disposable;
101
+
102
+ // Pane Items
103
+ /** Get all pane items in the dock. */
104
+ getPaneItems(): object[];
105
+
106
+ /** Get the active Pane's active item. */
107
+ getActivePaneItem(): object;
108
+
109
+ // Panes
110
+ /** Returns an Array of Panes. */
111
+ getPanes(): Pane[];
112
+
113
+ /** Get the active Pane. */
114
+ getActivePane(): Pane;
115
+
116
+ /** Make the next pane active. */
117
+ activateNextPane(): boolean;
118
+
119
+ /** Make the previous pane active. */
120
+ activatePreviousPane(): boolean;
121
+ }
@@ -0,0 +1,26 @@
1
+ type LocationToOpen = {
2
+ exists: boolean;
3
+ hasWaitSession: boolean;
4
+ initialColumn: number | null;
5
+ initialLine: number | null;
6
+ isDirectory: boolean;
7
+ isFile: boolean;
8
+ pathToOpen: string | null;
9
+ };
10
+
11
+ export interface WindowLoadSettings {
12
+ readonly appName: string;
13
+ readonly appVersion: string;
14
+ readonly atomHome: string;
15
+ readonly clearWindowState: boolean;
16
+ readonly devMode: boolean;
17
+ readonly env?: { [key: string]: string | undefined } | undefined;
18
+ readonly hasOpenFiles: boolean;
19
+ readonly initialProjectRoots: string[];
20
+ readonly locationsToOpen: LocationToOpen[];
21
+ readonly resourcePath: string;
22
+ readonly safeMode: boolean;
23
+ readonly profileStartup?: boolean | undefined;
24
+ readonly userSettings: object;
25
+ readonly windowInitializationScript: string;
26
+ }