@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,485 @@
1
+ import {
2
+ AbstractPaneItem,
3
+ CancellablePromise,
4
+ Disposable,
5
+ Dock,
6
+ Pane,
7
+ PaneItemObservedEvent,
8
+ PaneItemOpenedEvent,
9
+ Panel,
10
+ TextEditor,
11
+ TextEditorObservedEvent,
12
+ ViewModel,
13
+ ViewRegistry,
14
+ WorkspaceCenter,
15
+ } from "../index";
16
+
17
+ export type AddPanelOptions<T> = {
18
+ item: T;
19
+ visible?: boolean | undefined;
20
+ priority?: number | undefined
21
+ };
22
+
23
+ export type TextEditorAddedEvent = {
24
+ /** The {@link TextEditor} that was added. */
25
+ textEditor: TextEditor;
26
+ /** The {@link Pane} containing the added text editor. */
27
+ pane: Pane;
28
+ /** The index of the added text editor in its pane. */
29
+ index: number;
30
+ }
31
+
32
+ /** Represents the state of the user interface for the entire window. */
33
+ export interface Workspace {
34
+ // Event Subscription
35
+ /**
36
+ * Invoke the given callback with all current and future text editors in the
37
+ * workspace.
38
+ */
39
+ observeTextEditors(callback: (editor: TextEditor) => void): Disposable;
40
+
41
+ /**
42
+ * Invoke the given callback with all current and future panes items in the
43
+ * workspace.
44
+ */
45
+ observePaneItems(callback: (item: object) => void): Disposable;
46
+
47
+ /** Invoke the given callback when the active pane item changes. */
48
+ onDidChangeActivePaneItem(callback: (item: object) => void): Disposable;
49
+
50
+ /** Invoke the given callback when the active pane item stops changing. */
51
+ onDidStopChangingActivePaneItem(callback: (item: object) => void): Disposable;
52
+
53
+ /**
54
+ * Invoke the given callback when a text editor becomes the active text
55
+ * editor and when there is no longer an active text editor.
56
+ */
57
+ onDidChangeActiveTextEditor(callback: (editor?: TextEditor) => void): Disposable;
58
+
59
+ /**
60
+ * Invoke the given callback when a text editor is added to the workspace.
61
+ */
62
+ onDidAddTextEditor(callback: (event: TextEditorAddedEvent) => void): Disposable;
63
+
64
+ /**
65
+ * Invoke the given callback with the current active pane item and with all
66
+ * future active pane items in the workspace.
67
+ */
68
+ observeActivePaneItem(callback: (item: object) => void): Disposable;
69
+
70
+ /**
71
+ * Invoke the given callback with the current active text editor (if any),
72
+ * with all future active text editors, and when there is no longer an active
73
+ * text editor.
74
+ */
75
+ observeActiveTextEditor(callback: (editor?: TextEditor) => void): Disposable;
76
+
77
+ /**
78
+ * Invoke the given callback whenever an item is opened.
79
+ *
80
+ * Unlike {@link onDidAddPaneItem}, observers will be notified for items that
81
+ * are already present in the workspace when they are reopened.
82
+ */
83
+ onDidOpen(callback: (event: PaneItemOpenedEvent) => void): Disposable;
84
+
85
+ /** Invoke the given callback when a pane is added to the workspace. */
86
+ onDidAddPane(callback: (event: { pane: Pane }) => void): Disposable;
87
+
88
+ /** Invoke the given callback before a pane is destroyed in the workspace. */
89
+ onWillDestroyPane(callback: (event: { pane: Pane }) => void): Disposable;
90
+
91
+ /** Invoke the given callback when a pane is destroyed in the workspace. */
92
+ onDidDestroyPane(callback: (event: { pane: Pane }) => void): Disposable;
93
+
94
+ /**
95
+ * Invoke the given callback with all current and future panes in the
96
+ * workspace.
97
+ */
98
+ observePanes(callback: (pane: Pane) => void): Disposable;
99
+
100
+ /** Invoke the given callback when the active pane changes. */
101
+ onDidChangeActivePane(callback: (pane: Pane) => void): Disposable;
102
+
103
+ /**
104
+ * Invoke the given callback with the current active pane and when the active
105
+ * pane changes.
106
+ */
107
+ observeActivePane(callback: (pane: Pane) => void): Disposable;
108
+
109
+ /** Invoke the given callback when a pane item is added to the workspace. */
110
+ onDidAddPaneItem(callback: (event: PaneItemObservedEvent) => void): Disposable;
111
+
112
+ /**
113
+ * Invoke the given callback when a pane item is about to be destroyed,
114
+ * before the user is prompted to save it.
115
+ *
116
+ * @param callback The function to be called before pane items are destroyed.
117
+ * If this function returns a Promise, then the item will not be destroyed
118
+ * until the promise resolves.
119
+ */
120
+ onWillDestroyPaneItem(callback: (event: PaneItemObservedEvent) => void | Promise<void>): Disposable;
121
+
122
+ /** Invoke the given callback when a pane item is destroyed. */
123
+ onDidDestroyPaneItem(callback: (event: PaneItemObservedEvent) => void): Disposable;
124
+
125
+ /** Invoke the given callback when a text editor is added to the workspace. */
126
+ onDidAddTextEditor(callback: (event: TextEditorObservedEvent) => void): Disposable;
127
+
128
+ // Opening
129
+ /**
130
+ * Opens the given URI in Pulsar asynchronously.
131
+ *
132
+ * If the URI is already open, the existing item for that URI will be
133
+ * activated. If no URI is given, or no registered opener can open the URI, a
134
+ * new empty TextEditor will be created.
135
+ */
136
+ open(uri: string, options?: WorkspaceOpenOptions): Promise<object>;
137
+
138
+ /**
139
+ * Opens the given item in Pulsar asynchronously.
140
+ *
141
+ * If the item is already open, the existing item will be activated. If no
142
+ * item is given, a new empty TextEditor will be created.
143
+ */
144
+ open<T extends ViewModel = ViewModel>(item: T, options?: WorkspaceOpenOptions): Promise<T>;
145
+
146
+ /**
147
+ * Opens the given URI in Pulsar asynchronously.
148
+ *
149
+ * If the URI is already open, the existing item for that URI will be
150
+ * activated. If no URI is given, or no registered opener can open the URI, a
151
+ * new empty TextEditor will be created.
152
+ */
153
+ open(): Promise<TextEditor>;
154
+
155
+ /**
156
+ * Search the workspace for items matching the given URI and hide them.
157
+ *
158
+ * Returns a boolean indicating whether any items were found (and hidden).
159
+ */
160
+ hide(itemOrURI: object | string): boolean;
161
+
162
+ /**
163
+ * Search the workspace for items matching the given URI. If any are found,
164
+ * hide them. Otherwise, open the URL.
165
+ *
166
+ * Returns a Promise that resolves when the item is shown or hidden.
167
+ */
168
+ toggle(itemOrURI: object | string): Promise<void>;
169
+
170
+ /**
171
+ * Creates a new item that corresponds to the provided URI.
172
+ *
173
+ * If no URI is given, or no registered opener can open the URI, a new empty
174
+ * TextEditor will be created.
175
+ */
176
+ createItemForURI(uri: string): Promise<object | TextEditor>;
177
+
178
+ /** Returns a boolean that is true if object is a TextEditor. */
179
+ isTextEditor(object: object): object is TextEditor;
180
+
181
+ /**
182
+ * Asynchronously reopens the last-closed item's URI if it hasn't already
183
+ * been reopened.
184
+ */
185
+ reopenItem(): Promise<object | undefined>;
186
+
187
+ /**
188
+ * Register an opener for a URI.
189
+ *
190
+ * When a URI is opened via {@link open}, Pulsar loops through its registered
191
+ * opener functions until one returns a value for the given URI.
192
+ *
193
+ * Openers are expected to return an object that inherits from
194
+ * {@link HTMLElement} or a model which has an associated view in the
195
+ * {@link ViewRegistry}.
196
+ *
197
+ * If no opener responds to a given URI, a {@link TextEditor} will be
198
+ * opened.
199
+ *
200
+ * Note that the opener will be called if and only if the URI is not
201
+ * already open in the current pane. The `searchAllPanes` option expands
202
+ * the search from the current pane to all panes.
203
+ *
204
+ * If you which to open a view of a different type for a file that is already
205
+ * open, consider changing the protocol of the URI. For instance: if you
206
+ * wish to preview a rendered version of a file `/foo/bar/baz.quux` which
207
+ * is already open in a {@link TextEditor}, you could signal this by calling
208
+ * {@link open} with a URI like `quux-preview://foo/bar/baz.quux`. Then your
209
+ * opener can check the protocol for `quux-preview` and handle only those
210
+ * URIs that match.
211
+ *
212
+ * To defer your package's activation until a specific URI is opened, add a
213
+ * `workspaceOpeners` field to your `package.json` containing an array of URI
214
+ * strings.
215
+ */
216
+ addOpener(opener: (uri: string, options?: WorkspaceOpenOptions) => AbstractPaneItem | undefined): Disposable;
217
+
218
+ /** Create a new text editor. */
219
+ buildTextEditor(params: object): TextEditor;
220
+
221
+ /** Return whether the workspace is destroyed. */
222
+ isDestroyed(): boolean;
223
+
224
+ // (No need to document `Workspace#destroy`; it should not be called
225
+ // explicitly under any circumstances.)
226
+
227
+ // Pane Items
228
+ /** Get all pane items in the workspace. */
229
+ getPaneItems(): object[];
230
+
231
+ /** Get the active Pane's active item. */
232
+ getActivePaneItem(): object;
233
+
234
+ /** Get all text editors in the workspace. */
235
+ getTextEditors(): TextEditor[];
236
+
237
+ /** Get the workspace center's active item if it is a TextEditor. */
238
+ getActiveTextEditor(): TextEditor | undefined;
239
+
240
+ // Panes
241
+ /** Get the most recently focused pane container. */
242
+ getActivePaneContainer(): Dock | WorkspaceCenter;
243
+
244
+ /** Get all panes in the workspace. */
245
+ getPanes(): Pane[];
246
+
247
+ /** Get the active Pane. */
248
+ getActivePane(): Pane;
249
+
250
+ /** Make the next pane active. */
251
+ activateNextPane(): boolean;
252
+
253
+ /** Make the previous pane active. */
254
+ activatePreviousPane(): boolean;
255
+
256
+ /** Get the first pane container that contains an item with the given URI. */
257
+ paneContainerForURI(uri: string): Dock | WorkspaceCenter | undefined;
258
+
259
+ /** Get the first pane container that contains the given item. */
260
+ paneContainerForItem(item: object): Dock | WorkspaceCenter | undefined;
261
+
262
+ /** Get the first Pane with an item for the given URI. */
263
+ paneForURI(uri: string): Pane | undefined;
264
+
265
+ /** Get the Pane containing the given item. */
266
+ paneForItem(item: object): Pane | undefined;
267
+
268
+ // Pane Locations
269
+ /** Get the WorkspaceCenter at the center of the editor window. */
270
+ getCenter(): WorkspaceCenter;
271
+
272
+ /** Get the Dock to the left of the editor window. */
273
+ getLeftDock(): Dock;
274
+
275
+ /** Get the Dock to the right of the editor window. */
276
+ getRightDock(): Dock;
277
+
278
+ /** Get the Dock below the editor window. */
279
+ getBottomDock(): Dock;
280
+
281
+ /** Returns all Pane containers. */
282
+ getPaneContainers(): [WorkspaceCenter, Dock, Dock, Dock];
283
+
284
+ // Panels
285
+ /** Get an Array of all the panel items at the bottom of the editor window. */
286
+ getBottomPanels(): Panel[];
287
+
288
+ /** Add a panel item to the bottom of the editor window. */
289
+ addBottomPanel<T>(options: AddPanelOptions<T>): Panel<T>;
290
+
291
+ /** Get an Array of all the panel items to the left of the editor window. */
292
+ getLeftPanels(): Panel[];
293
+
294
+ /** Add a panel item to the left of the editor window. */
295
+ addLeftPanel<T>(options: AddPanelOptions<T>): Panel<T>;
296
+
297
+ /** Get an Array of all the panel items to the right of the editor window. */
298
+ getRightPanels(): Panel[];
299
+
300
+ /** Adds a panel item to the right of the editor window. */
301
+ addRightPanel<T>(options: AddPanelOptions<T>): Panel<T>;
302
+
303
+ /** Get an Array of all the panel items at the top of the editor window. */
304
+ getTopPanels(): Panel[];
305
+
306
+ /** Adds a panel item to the top of the editor window above the tabs. */
307
+ addTopPanel<T>(options: AddPanelOptions<T>): Panel<T>;
308
+
309
+ /** Get an Array of all the panel items in the header. */
310
+ getHeaderPanels(): Panel[];
311
+
312
+ /** Adds a panel item to the header. */
313
+ addHeaderPanel<T>(options: AddPanelOptions<T>): Panel<T>;
314
+
315
+ /** Get an Array of all the panel items in the footer. */
316
+ getFooterPanels(): Panel[];
317
+
318
+ /** Adds a panel item to the footer. */
319
+ addFooterPanel<T>(options: AddPanelOptions<T>): Panel<T>;
320
+
321
+ /** Get an Array of all the modal panel items. */
322
+ getModalPanels(): Panel[];
323
+
324
+ /** Adds a panel item as a modal dialog. */
325
+ addModalPanel<T>(options: {
326
+ item: T;
327
+ visible?: boolean | undefined;
328
+ priority?: number | undefined;
329
+ autoFocus?: boolean | FocusableHTMLElement | undefined;
330
+ }): Panel<T>;
331
+
332
+ /**
333
+ * Returns the Panel associated with the given item or null when the item has
334
+ * no panel.
335
+ */
336
+ panelForItem<T>(item: T): Panel<T> | null;
337
+
338
+ // Searching and Replacing
339
+
340
+ /** Performs a search across all files in the workspace. */
341
+ scan(regex: RegExp, iterator: (result: ScandalResult) => void): CancellablePromise<string | null>;
342
+
343
+ /** Performs a search across all files in the workspace. */
344
+ scan(
345
+ regex: RegExp,
346
+ options: WorkspaceScanOptions,
347
+ iterator: (result: ScandalResult) => void,
348
+ ): CancellablePromise<string | null>;
349
+
350
+ /** Performs a replace across all the specified files in the project. */
351
+ replace(
352
+ regex: RegExp,
353
+ replacementText: string,
354
+ filePaths: readonly string[],
355
+ iterator: (result: { filePath: string | undefined; replacements: number }) => void,
356
+ ): Promise<void>;
357
+ }
358
+
359
+ export interface WorkspaceOpenOptions {
360
+ /**
361
+ * A number indicating which row to move the cursor to initially.
362
+ *
363
+ * Defaults to `0`.
364
+ */
365
+ initialLine?: number | undefined;
366
+
367
+ /**
368
+ * A number indicating which column to move the cursor to initially.
369
+ *
370
+ * Defaults to `0`.
371
+ */
372
+ initialColumn?: number | undefined;
373
+
374
+ /** A specific {@link Pane} in which the item should be opened. */
375
+ pane?: Pane;
376
+
377
+ /**
378
+ * Either `'left'`, `'right'`, `'up'` or `'down'`.
379
+ *
380
+ * If `'left'`, the item will be opened in leftmost pane of the current
381
+ * active pane's row.
382
+ *
383
+ * If `'right'`, the item will be opened in the rightmost pane of the current
384
+ * active pane's row. If only one pane exists in the row, a new pane will be
385
+ * created.
386
+ *
387
+ * If `'up'`, the item will be opened in topmost pane of the current active
388
+ * pane's column.
389
+ *
390
+ * If `'down'`, the item will be opened in the bottommost pane of the current
391
+ * active pane's column. If only one pane exists in the column, a new pane
392
+ * will be created.
393
+ */
394
+ split?: "left" | "right" | "up" | "down" | undefined;
395
+
396
+ /**
397
+ * A boolean indicating whether to call {@link Pane#activate} on the
398
+ * containing pane.
399
+ *
400
+ * Defaults to `true`.
401
+ */
402
+ activatePane?: boolean | undefined;
403
+
404
+ /**
405
+ * A boolean indicating whether to call {@link Pane#activateItem} on the
406
+ * containing pane.
407
+ *
408
+ * Defaults to `true`.
409
+ */
410
+ activateItem?: boolean | undefined;
411
+
412
+ /**
413
+ * Whether the item should be opened in a pending state.
414
+ *
415
+ * Existing pending items in a pane are replaced with new pending items when
416
+ * they are opened.
417
+ */
418
+ pending?: boolean | undefined;
419
+
420
+ /**
421
+ * A boolean.
422
+ *
423
+ * If `true`, the workspace will attempt to activate an existing item for the
424
+ * given URI on any pane.
425
+ *
426
+ * If `false`, only the active pane will be searched for an existing item for
427
+ * the same URI. Defaults to false.
428
+ */
429
+ searchAllPanes?: boolean | undefined;
430
+
431
+ /**
432
+ * A string containing the name of the location in which this item should be
433
+ * opened.
434
+ *
435
+ * If omitted, Pulsar will fall back to the last location in which a user has
436
+ * placed an item with the same URI or, if this is a new URI, the default
437
+ * location specified by the item.
438
+ *
439
+ * NOTE: This option should almost always be omitted to honor user
440
+ * preference.
441
+ */
442
+ location?: "left" | "right" | "bottom" | "center" | undefined;
443
+ }
444
+
445
+ export interface WorkspaceScanOptions {
446
+ /** An array of glob patterns to search within. */
447
+ paths?: readonly string[] | undefined;
448
+
449
+ /**
450
+ * A function to be periodically called with the number of paths searched.
451
+ */
452
+ onPathsSearched?(pathsSearched: number): void;
453
+
454
+ /**
455
+ * The number of lines before the matched line to include in the results
456
+ * object.
457
+ */
458
+ leadingContextLineCount?: number | undefined;
459
+
460
+ /**
461
+ * The number of lines after the matched line to include in the results
462
+ * object.
463
+ */
464
+ trailingContextLineCount?: number | undefined;
465
+ }
466
+
467
+ export interface ScandalResult {
468
+ filePath: string;
469
+ matches: Array<{
470
+ matchText: string;
471
+ lineText: string;
472
+ lineTextOffset: number;
473
+ range: [[number, number], [number, number]];
474
+ leadingContextLines: string[];
475
+ trailingContextLines: string[];
476
+ }>;
477
+ }
478
+
479
+ /**
480
+ * The type used by the `focus-trap` library to target a specific DOM node.
481
+ *
482
+ * A DOM node, a selector string (which will be passed to `document.querySelector()`
483
+ * to find the DOM node), or a function that returns a DOM node.
484
+ */
485
+ export type FocusableHTMLElement = HTMLElement | string | { (): HTMLElement };
@@ -0,0 +1,23 @@
1
+ import "../index";
2
+
3
+ declare module "atom" {
4
+ interface ConfigValues {
5
+ /** Show status bar at the bottom of the workspace. */
6
+ "status-bar.isVisible": boolean;
7
+
8
+ /** Fit the status-bar to the window's full-width. */
9
+ "status-bar.fullWidth": boolean;
10
+
11
+ /**
12
+ * Format for the cursor position status bar element, where %L is the line
13
+ * number and %C is the column number.
14
+ */
15
+ "status-bar.cursorPositionFormat": string;
16
+
17
+ /**
18
+ * Format for the selection count status bar element, where %L is the line
19
+ * count and %C is the character count.
20
+ */
21
+ "status-bar.selectionCountFormat": string;
22
+ }
23
+ }
@@ -0,0 +1,51 @@
1
+ // Status Bar 1.x
2
+ // https://web.pulsar-edit.dev/packages/status-bar
3
+
4
+ /// <reference path="./config.d.ts" />
5
+
6
+ export interface AddTileOptions {
7
+ /**
8
+ * A DOM element, a jQuery object, or a model object for which a view
9
+ * provider has been registered in the the view registry.
10
+ */
11
+ item: object;
12
+
13
+ /**
14
+ * Determines the placement of the tile within the status bar. Lower priority
15
+ * will result in closer placement to the anchor.
16
+ */
17
+ priority: number;
18
+ }
19
+
20
+ export interface Tile {
21
+ /**
22
+ * Retrieve the priority that was assigned to the Tile when it was created.
23
+ */
24
+ getPriority(): number;
25
+
26
+ /** Retrieve the Tile's item. */
27
+ getItem(): object;
28
+
29
+ /** Remove the Tile from the status bar. */
30
+ destroy(): void;
31
+ }
32
+
33
+ export interface StatusBar {
34
+ /**
35
+ * Add a tile to the left side of the status bar. Lower priority tiles are
36
+ * placed further to the left.
37
+ */
38
+ addLeftTile(options: AddTileOptions): Tile;
39
+
40
+ /**
41
+ * Add a tile to the right side of the status bar. Lower priority tiles are
42
+ * placed further to the right.
43
+ */
44
+ addRightTile(options: AddTileOptions): Tile;
45
+
46
+ /** Retrieve all of the tiles on the left side of the status bar. */
47
+ getLeftTiles(): Tile[];
48
+
49
+ /** Retrieve all of the tiles on the right side of the status bar. */
50
+ getRightTiles(): Tile[];
51
+ }
@@ -0,0 +1,20 @@
1
+ import "../index";
2
+
3
+ declare module "atom" {
4
+ interface ConfigValues {
5
+ /** Make tool-bar visible. - default: true */
6
+ "tool-bar.visible": boolean;
7
+
8
+ /** Icon size. - default: "24px" */
9
+ "tool-bar.iconSize": "12px" | "14px" | "16px" | "18px" | "21px" | "24px" | "28px" | "32px";
10
+
11
+ /** Position of tool-bar. - default: "Top" */
12
+ "tool-bar.position": "Top" | "Right" | "Bottom" | "Left";
13
+
14
+ /** Fit the tool-bar to the window's full-width. - default: true */
15
+ "tool-bar.fullWidth": boolean;
16
+
17
+ /** On MacOS, show seven first tool-bar buttons in the TouchBar. - default: true */
18
+ "tool-bar.useTouchBar": string;
19
+ }
20
+ }