UNPKG

@manuth/woltlab-compiler

Version:

A compiler for generating WoltLab-Package `.tar` Archives and other WoltLab-Package Components

157 lines (156 loc) 4.48 kB
import { Component } from "../../../PackageSystem/Component.js"; import { FileDescriptor } from "../../../PackageSystem/FileDescriptor.js"; import { IFileDescriptorOptions } from "../../../PackageSystem/IFileDescriptorOptions.js"; import { ThemeInstruction } from "../../../PackageSystem/Instructions/Customization/Presentation/ThemeInstruction.js"; import { Person } from "../../../PackageSystem/Person.js"; import { ImageDirectoryDescriptor } from "./ImageDirectoryDescriptor.js"; import { IThemeLoaderOptions } from "./IThemeLoaderOptions.js"; import { Theme } from "./Theme.js"; /** * Provides the functionality to load themes from files. */ export declare class ThemeLoader extends Component { /** * The instruction of the theme-loader. */ private instruction; /** * The name of the theme to load. */ private name; /** * The thumbnail of the theme to load. */ private thumbnail; /** * The high-resolution version of the thumbnail of the theme to load. */ private highResThumbnail; /** * The cover-photo of the theme to load. */ private coverPhoto; /** * The path to the file containing custom `scss`-code of the theme to load. */ private customScssFileName; /** * The path to the file containing special `scss`-variables of the theme to load. */ private scssOverrideFileName; /** * The name of the file containing variables of the theme to load. */ private variableFileName; /** * The variables of the theme to load. */ private variables; /** * The image-directory of the theme to load. */ private images; /** * Initializes a new instance of the {@link ThemeLoader `ThemeLoader`} class. * * @param instruction * The instruction of the theme-loader. * * @param options * The options of the theme-loader. */ constructor(instruction: ThemeInstruction, options: IThemeLoaderOptions); /** * Gets the instruction of the theme-loader. */ get Instruction(): ThemeInstruction; /** * Gets or sets the name of the theme to load. */ get Name(): string; /** * @inheritdoc */ set Name(value: string); /** * @inheritdoc */ get Author(): Person; /** * Gets or sets the thumbnail of the theme to load. */ get Thumbnail(): FileDescriptor; /** * @inheritdoc */ set Thumbnail(value: FileDescriptor); /** * Gets or sets the high resolution version of the thumbnail of the theme to load. */ get HighResThumbnail(): FileDescriptor; /** * @inheritdoc */ set HighResThumbnail(value: FileDescriptor); /** * Gets or sets the path to the default cover-photo for user-profiles of the theme to load. */ get CoverPhoto(): FileDescriptor; /** * @inheritdoc */ set CoverPhoto(value: FileDescriptor); /** * Gets or sets the path to the file containing custom `scss`-code of the theme to load. */ get CustomScssFileName(): string; /** * @inheritdoc */ set CustomScssFileName(value: string); /** * Gets or sets the path to the file containing special `scss`-variables of the theme to load. */ get ScssOverrideFileName(): string; /** * @inheritdoc */ set ScssOverrideFileName(value: string); /** * Gets or sets the name of the file containing variables of the theme to load. */ get VariableFileName(): string; /** * @inheritdoc */ set VariableFileName(value: string); /** * Gets or sets the variables of the theme to load. */ get Variables(): Map<string, string>; /** * Gets or sets the image-directory of the theme to load. */ get Images(): ImageDirectoryDescriptor; /** * @inheritdoc */ set Images(value: ImageDirectoryDescriptor); /** * Loads the theme. * * @returns * The newly loaded theme. */ Load(): Promise<Theme>; /** * Loads the file-descriptor from the specified {@link options `options`}. * * @param options * The options for creating the {@link FileDescriptor `FileDescriptor`}. * * @returns * The newly created {@link FileDescriptor `FileDescriptor`}. */ protected LoadFileDescriptor(options: string | IFileDescriptorOptions): FileDescriptor; }