Skip to content

Commit 7e03828

Browse files
build: convert touch-bar to typescript
1 parent 5737fda commit 7e03828

File tree

7 files changed

+491
-366
lines changed

7 files changed

+491
-366
lines changed

docs/api/touch-bar-button.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ the button in the touch bar.
4141
A `NativeImage` representing the button's current icon. Changing this value immediately updates the button
4242
in the touch bar.
4343

44+
#### `touchBarButton.iconPosition`
45+
46+
A `String` - Can be `left`, `right` or `overlay`. Defaults to `overlay`.
47+
4448
#### `touchBarButton.enabled`
4549

4650
A `Boolean` representing whether the button is in an enabled state.

docs/api/touch-bar-segmented-control.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,7 @@ updates the control in the touch bar. Updating deep properties inside this array
4949

5050
An `Integer` representing the currently selected segment. Changing this value immediately updates the control
5151
in the touch bar. User interaction with the touch bar will update this value automatically.
52+
53+
#### `touchBarSegmentedControl.mode`
54+
55+
A `String` representing the current selection mode of the control. Can be `single`, `multiple` or `buttons`.

docs/api/touch-bar-spacer.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,11 @@ Process: [Main](../tutorial/application-architecture.md#main-and-renderer-proces
1111
* `small` - Small space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceSmall`. This is the default.
1212
* `large` - Large space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceLarge`.
1313
* `flexible` - Take up all available space. Maps to `NSTouchBarItemIdentifierFlexibleSpace`.
14+
15+
### Instance Properties
16+
17+
The following properties are available on instances of `TouchBarSpacer`:
18+
19+
#### `touchBarSpacer.size`
20+
21+
A `String` representing the size of the spacer. Can be `small`, `large` or `flexible`.

filenames.auto.gni

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ auto_filenames = {
217217
"lib/browser/api/screen.ts",
218218
"lib/browser/api/session.ts",
219219
"lib/browser/api/system-preferences.ts",
220-
"lib/browser/api/touch-bar.js",
220+
"lib/browser/api/touch-bar.ts",
221221
"lib/browser/api/tray.ts",
222222
"lib/browser/api/view.ts",
223223
"lib/browser/api/views/image-view.ts",

0 commit comments

Comments
 (0)