Move overviewRuler API under scrollbar

Fixes #5678
This commit is contained in:
Daniel Imms
2026-02-05 09:14:58 -08:00
parent 3a147e8e10
commit d155bb6767
10 changed files with 36 additions and 43 deletions
+20 -20
View File
@@ -206,12 +206,6 @@ declare module '@xterm/xterm' {
*/
minimumContrastRatio?: number;
/**
* Controls the visibility and style of the overview ruler which visualizes
* decorations underneath the scroll bar.
*/
overviewRuler?: IOverviewRulerOptions;
/**
* Control various quirks features that are either non-standard or standard
* in but generally rejected in modern terminals.
@@ -399,8 +393,8 @@ declare module '@xterm/xterm' {
scrollbarSliderActiveBackground?: string;
/**
* The border color of the overview ruler. This visually separates the
* terminal from the scroll bar when {@link IOverviewRulerOptions.width} is
* set. When this is not set it defaults to black (`#000000`).
* terminal from the scroll bar when {@link IScrollbarOptions.width} is set.
* When this is not set it defaults to black (`#000000`).
*/
overviewRulerBorder?: string;
/** ANSI black (eg. `\x1b[30m`) */
@@ -688,8 +682,8 @@ declare module '@xterm/xterm' {
/**
* When defined, renders the decoration in the overview ruler to the right
* of the terminal. {@link IOverviewRulerOptions.width} must be set in order
* to see the overview ruler.
* of the terminal. {@link IScrollbarOptions.width} must be set in order to
* see the overview ruler.
* @param color The color of the decoration.
* @param position The position of the decoration.
*/
@@ -712,16 +706,10 @@ declare module '@xterm/xterm' {
tooMuchOutput: string;
}
/**
* Options for configuring the overview ruler rendered beside the scrollbar.
*/
export interface IOverviewRulerOptions {
/**
* When defined, renders decorations in the overview ruler to the right of
* the terminal. This must be set in order to see the overview ruler.
* This is ignored when {@link IScrollbarOptions.showScrollbar} is false.
* @param color The color of the decoration.
* @param position The position of the decoration.
*/
width?: number;
/**
* Whether to show the top border of the overview ruler, which uses the
* {@link ITheme.overviewRulerBorder} color.
@@ -741,7 +729,7 @@ declare module '@xterm/xterm' {
export interface IScrollbarOptions {
/**
* Whether to show the scrollbar. When false, this supersedes
* {@link IOverviewRulerOptions.width}. Defaults to true.
* {@link IScrollbarOptions.width}. Defaults to true.
*/
showScrollbar?: boolean;
/**
@@ -749,6 +737,18 @@ declare module '@xterm/xterm' {
* to false.
*/
showArrows?: boolean;
/**
* The width of the scrollbar and overview ruler in CSS pixels. When set,
* this enables the overview ruler.
*/
width?: number;
/**
* Controls the visibility and style of the overview ruler which visualizes
* decorations underneath the scroll bar.
*/
overviewRuler?: IOverviewRulerOptions;
}
/**