// Generated by dts-bundle v0.7.3 import './styles.scss'; export { Bar, registerToolType, assertProps, Tool, Icon, themes }; export const childMap: { [key: string]: typeof BarChild; }; export const childNames: Set; export function registerToolType(Class: typeof BarChild, aliases: string[]): void; export class Bar implements IBar { $el: HTMLElement; iconBaseUrl: string; children: IBarPart[]; tooltip: 'top' | 'bottom'; tools: { [id: string]: Tool; }; constructor(config: IBarConfig); set theme(id: string); get theme(): string; static registerTheme(id: string, config: IThemeConfig): ITheme; get themes(): IThemes; bindTo(container: HTMLElement | string): this; add(child: AddableItemType): this; get(id: string): Tool; mount(child: BarChild): void; addMany(children: AddableItemType[]): this; load(children: AddableItemType[]): this; clear(): this; dump(): { id: string; type: string; }[]; getSvgLink(icon: string): string; addEventListener(type: any, listener: (ev: any) => any, options?: boolean | AddEventListenerOptions | undefined): void; dispatchEvent(event: Event): boolean; } export class Icon implements IIcon { $el: SVGSVGElement; $bar: IBar; icon: string; key?: string; label?: string; iconShrink?: number; constructor(config: IIconConfig); mount(): void; get config(): IIconBaseConfig; } export abstract class BarChild implements IBarPart { $el: HTMLElement; $bar: IBar; constructor(config: IBarChildConfig); mount(item: IBarPart): void; clear(): void; } export class Tip { $el: HTMLElement; $target: HTMLElement; label: string; sublabel?: string; constructor(target: HTMLElement, config: { position: 'top' | 'bottom' | 'left' | 'right'; }); setLabel(label?: string, sublabel?: string): this; setContent(content?: string): this; get config(): { [k: string]: any; }; } export abstract class Tool extends BarChild implements ITool { _lastState: string; id: string; disabled: boolean; $tip: Tip; constructor(config: IToolConfig); disable(): this; enable(): this; addEventListener(type: any, listener: (ev: any) => any, options?: boolean | AddEventListenerOptions | undefined): void; dispatchEvent(event: Event): boolean; get _config(): { id: string; type: string; }; get config(): { id: string; type: string; }; abstract get value(): any; get _state(): any; clear(): void; emitEvent(type: string, el?: HTMLElement, oriEvent?: Event, stateDependent?: boolean): boolean | undefined; cancelClickEvent(): void; } class Theme implements ITheme { id: string; config: IThemeConfig; $el: HTMLStyleElement; constructor(id: string, theme: IThemeConfig); get css(): string; mount(): void; unmount(): void; } class Themes implements IThemes { items: Record; current?: Theme; constructor(); switch(id: string): void; get(id: string): Theme; register(id: string, theme: IThemeConfig | Theme): Theme; } export const themes: Themes; export {}; export function assertProps(obj: object, props: string[]): void; export function camelCaseToDash(str: string): string; export function removeNull(obj: { [key: string | number]: any; }): { [k: string]: any; }; export function isFunction(obj: any): any; export class Limiter { max: number; min: number; circle: boolean; cb?: (val: number, init: boolean) => void; constructor(config: { min: number; max: number; value: number; step?: number; circle?: boolean; cb?: (val: number, init: boolean) => void; }); get value(): number; get span(): number; get length(): number; set value(newVal: number); inc(): void; dec(): void; get config(): { min: number; max: number; circle: boolean; }; } export function merge>(objFrom: T, objTo: T): T; export type ToolEventName = 'click' | 'change'; export type EventCallback = (e: CustomEvent) => {}; export type AddableItemType = IBarPart | IBarChildConfig | string; export interface IBarPart { $el: Element; $bar: IBar; mount(item: IBarPart): void; } export interface IBarPartConfig { bar: IBar; } export interface IIcon extends IBarPart { $el: SVGSVGElement; icon: string; key?: string; label?: string; iconShrink?: number; get config(): IIconBaseConfig; } export interface IIconBaseConfig { icon: string; key?: string; label?: string; iconShrink?: number; } export interface IIconConfig extends IIconBaseConfig, IBarPartConfig { } export interface IToolEventDetail { el: HTMLElement; target: ITool; event: string; id: string; value: any; } export interface IBarChildConfig extends IBarPartConfig { type: string; tag?: string; } export interface ITool extends IBarPart { id: string; disabled: boolean; } export interface IToolConfig extends IBarChildConfig { id: string; label?: string; class?: string; sublabel?: string; disabled?: boolean; listeners?: Map; } export interface IBarConfig { iconBaseUrl: string; width: string; height: string; tooltip: 'top' | 'bottom'; align?: string; vertical?: boolean; } export interface IBar { $el: HTMLElement; iconBaseUrl: string; children: IBarPart[]; tooltip?: 'top' | 'bottom'; get theme(): string; get themes(): IThemes; bindTo(container: HTMLElement): IBar; mount(child: IBarPart): void; add(child: AddableItemType): IBar; addMany(children: AddableItemType[]): IBar; load(children: AddableItemType[]): IBar; getSvgLink(icon: string): string; } export interface IIconsToolConfig extends IToolConfig { icons: IIconBaseConfig[]; current: string; circle: boolean; } export type CssSizeValue = string | number; export type CssColorValue = string; export type CssValue = CssColorValue | CssSizeValue; export interface IThemeConfig { size?: { bar?: { padding?: CssSizeValue; height?: CssSizeValue; width?: CssSizeValue; }; tool?: { button?: CssSizeValue; icon?: CssSizeValue; radius?: CssSizeValue; margin?: CssSizeValue; }; tip?: { padding?: CssSizeValue; offset?: CssSizeValue; }; text?: { input?: CssSizeValue; label?: CssSizeValue; sublabel?: CssSizeValue; }; }; color?: { text?: { normal?: CssColorValue; markup?: CssColorValue; }; bar?: { background?: CssColorValue; outline?: CssColorValue; }; tip?: { background?: CssColorValue; }; tool?: { active?: CssColorValue; hover?: CssColorValue; }; }; } export interface ITheme { id: string; config: IThemeConfig; $el: HTMLStyleElement; } export interface IThemes { items: Record; current?: ITheme; }