diff --git a/.changes/traffic-light-position-type.md b/.changes/traffic-light-position-type.md new file mode 100644 index 000000000..debb0b198 --- /dev/null +++ b/.changes/traffic-light-position-type.md @@ -0,0 +1,5 @@ +--- +"@tauri-apps/api": "patch:bug" +--- + +Add missing `trafficLightPosition` TypeScript type definition diff --git a/packages/api/src/dpi.ts b/packages/api/src/dpi.ts index cf96901bc..88409726b 100644 --- a/packages/api/src/dpi.ts +++ b/packages/api/src/dpi.ts @@ -206,7 +206,7 @@ class Size { } /** - * A position represented in logical pixels. + * A position represented in logical pixels. * For an explanation of what logical pixels are, see description of {@linkcode LogicalSize}. * * @since 2.0.0 @@ -272,7 +272,7 @@ class LogicalPosition { } /** - * A position represented in physical pixels. + * A position represented in physical pixels. * * For an explanation of what physical pixels are, see description of {@linkcode PhysicalSize}. * diff --git a/packages/api/src/window.ts b/packages/api/src/window.ts index d84709f23..ab6a3280f 100644 --- a/packages/api/src/window.ts +++ b/packages/api/src/window.ts @@ -2325,6 +2325,14 @@ interface WindowOptions { * The style of the macOS title bar. */ titleBarStyle?: TitleBarStyle + /** + * The position of the window controls on macOS. + * + * Requires `titleBarStyle: 'overlay'` and `decorations: true`. + * + * @since 2.4.0 + */ + trafficLightPosition?: LogicalPosition /** * If `true`, sets the window title to be hidden on macOS. */