UNPKG

sussudio

Version:

An unofficial VS Code Internal API

45 lines (44 loc) 1.88 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import "../../../../css!./iconlabel.mjs"; import { IHoverDelegate } from "./iconHoverDelegate.mjs"; import { ITooltipMarkdownString } from "./iconLabelHover.mjs"; import { IMatch } from "../../../common/filters.mjs"; import { Disposable } from "../../../common/lifecycle.mjs"; export interface IIconLabelCreationOptions { readonly supportHighlights?: boolean; readonly supportDescriptionHighlights?: boolean; readonly supportIcons?: boolean; readonly hoverDelegate?: IHoverDelegate; } export interface IIconLabelValueOptions { title?: string | ITooltipMarkdownString; descriptionTitle?: string; hideIcon?: boolean; extraClasses?: readonly string[]; italic?: boolean; strikethrough?: boolean; matches?: readonly IMatch[]; labelEscapeNewLines?: boolean; descriptionMatches?: readonly IMatch[]; disabledCommand?: boolean; readonly separator?: string; readonly domId?: string; } export declare class IconLabel extends Disposable { private readonly creationOptions?; private readonly domNode; private readonly nameNode; private descriptionNode; private readonly labelContainer; private readonly hoverDelegate; private readonly customHovers; constructor(container: HTMLElement, options?: IIconLabelCreationOptions); get element(): HTMLElement; setLabel(label: string | string[], description?: string, options?: IIconLabelValueOptions): void; private setupHover; dispose(): void; private getOrCreateDescriptionNode; }