import { Token } from '@lumino/coreutils'; import { CommandRegistry } from '@lumino/commands'; import { ICommandPalette } from '@jupyterlab/apputils'; import { ISignal } from '@lumino/signaling'; import { INotebookTracker, NotebookPanel } from '@jupyterlab/notebook'; import { Menu } from '@lumino/widgets'; import * as SCHEMA from './schema'; import '../style/index.css'; export declare type Scope = 'global' | 'notebook'; export declare enum TextKind { code = "code", content = "content" } export declare const KIND_LABELS: { [key in TextKind]: string; }; export declare enum FontFormat { woff2 = "woff2", woff = "woff" } export declare type TFontMimeTypes = { [key in FontFormat]: string; }; export declare const FONT_FORMATS: { woff2: string; woff: string; }; export declare type TextProperty = 'font-family' | 'font-size' | 'line-height'; export interface IFontCallback { (): Promise; } export interface IFontLicense { name: string; spdx: string; text: () => Promise; holders: string[]; } export interface IFontFaceOptions { name: string; faces: IFontCallback; license: IFontLicense; } export declare const CMD: { code: { fontSize: string; fontFamily: string; lineHeight: string; }; content: { fontSize: string; fontFamily: string; lineHeight: string; }; editFonts: string; customFonts: { disable: string; enable: string; }; }; export declare const ROOT = ":root"; export declare type ICSSVars = { [key in TextKind]: { [key in TextProperty]: SCHEMA.ICSSOM; }; }; export declare const CSS: ICSSVars; export declare type ICSSTextOptions = { [key in TextProperty]: (manager: IFontManager) => SCHEMA.ICSSOM[]; }; export declare const TEXT_OPTIONS: ICSSTextOptions; export declare type ICSSTextLabels = { [key in TextProperty]: string; }; export declare const TEXT_LABELS: ICSSTextLabels; export declare const DEFAULT: { code: { fontSize: string; lineHeight: string; fontFamily: string; }; }; export declare const PACKAGE_NAME: string; export declare const CONFIGURED_CLASS = "jp-fonts-configured"; export declare const IFontManager: Token; export interface IFontManagerConstructor { new (commands: CommandRegistry, palette: ICommandPalette, notebooks: INotebookTracker): IFontManager; } export interface IFontManager { ready: Promise; registerFontFace(options: IFontFaceOptions): void; licensePaneRequested: ISignal; requestLicensePane(font: any): void; fonts: Map; stylesheets: HTMLStyleElement[]; menu: Menu; getVarName(property: TextProperty, options: ITextStyleOptions): SCHEMA.ICSSOM | null; getTextStyle(property: TextProperty, options: ITextStyleOptions): SCHEMA.ICSSOM | null; setTextStyle(property: TextProperty, value: SCHEMA.ICSSOM | null, options: ITextStyleOptions): void; dataURISrc(url: string, format: FontFormat): Promise; } export interface ITextStyleOptions { kind: TextKind; scope?: Scope; notebook?: NotebookPanel; }