import { ComponentOptionsMixin } from 'vue'; import { createApp } from 'vue'; import { default as default_2 } from '../graphics/sbrul-shad-svg-v1.svg'; import { DefineComponent } from 'vue'; import { ExtractPropTypes } from 'vue'; import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; import { Pinia } from 'pinia'; import { PropType } from 'vue'; import { PublicProps } from 'vue'; import { Router } from 'vue-router'; import { StoreDefinition } from 'pinia'; import { VNode } from 'vue'; declare const __VLS_component: DefineComponent<__VLS_WithDefaults_3<__VLS_TypePropsToRuntimeProps_3, { initializeMinimized: boolean; canBePinned: boolean; canBeClosed: boolean; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, { "close-status-box": (...args: any[]) => void; "pin-status-box": (...args: any[]) => void; }, string, PublicProps, Readonly, { initializeMinimized: boolean; canBePinned: boolean; canBeClosed: boolean; }>>> & { "onClose-status-box"?: ((...args: any[]) => any) | undefined; "onPin-status-box"?: ((...args: any[]) => any) | undefined; }, { initializeMinimized: boolean; canBePinned: boolean; canBeClosed: boolean; }, {}>; declare type __VLS_NonUndefinedable = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_2 = T extends undefined ? never : T; declare type __VLS_NonUndefinedable_3 = T extends undefined ? never : T; declare type __VLS_Prettify = { [K in keyof T]: T[K]; } & {}; declare type __VLS_Prettify_2 = { [K in keyof T]: T[K]; } & {}; declare type __VLS_Prettify_3 = { [K in keyof T]: T[K]; } & {}; declare function __VLS_template(): { default?(_: {}): any; }; declare type __VLS_TypePropsToRuntimeProps = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_2 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_2>; } : { type: PropType; required: true; }; }; declare type __VLS_TypePropsToRuntimeProps_3 = { [K in keyof T]-?: {} extends Pick ? { type: PropType<__VLS_NonUndefinedable_3>; } : { type: PropType; required: true; }; }; declare type __VLS_WithDefaults = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify : P[K]; }; declare type __VLS_WithDefaults_2 = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify_2 : P[K]; }; declare type __VLS_WithDefaults_3 = { [K in keyof Pick]: K extends keyof D ? __VLS_Prettify_3 : P[K]; }; declare type __VLS_WithTemplateSlots = T & { new (): { $slots: S; }; }; /** * Adds a new meta tag with the given value. * @param name The name of the new meta tag. * @param content The value of the new meta tag. * @returns The new meta tag. */ declare function addMetaTag(name: string, content: string): HTMLMetaElement; export declare const ButtonWithIcon: DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps, { type: string; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly, { type: string; }>>>, { type: "button" | "reset" | "submit"; }, {}>; export declare const ButtonWithIconLink: DefineComponent<__VLS_WithDefaults_2<__VLS_TypePropsToRuntimeProps_2, { disabled: boolean; openInNewTab: boolean; }>, {}, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly, { disabled: boolean; openInNewTab: boolean; }>>>, { disabled: boolean; openInNewTab: boolean; }, {}>; declare type ChildrenType = string | string[] | VNode | VNode[]; declare type ClientPath = (typeof clientPaths)[Keys]; declare const clientPaths: PathsList; declare abstract class Color { readonly alpha100: number; get alpha255(): number; get alpha1(): number; protected constructor(alpha?: number | string); equals(other: Color, ignoreAlpha?: boolean, tolerance?: number): boolean; abstract get rgba(): ColorRGBA; abstract get hsla(): ColorHSLA; getHexString(withAlpha?: boolean): string; get hexStringWithAlpha(): string; get hexStringNoAlpha(): string; get rgbString(): string; toString(): string; static parse(input: string): Color; static parseNumber(value: number | string, maximumValue: number, allowModulo?: boolean): number; get relativeLuminance(): number; /** * Compute the contrast ratio of 2 colors. * @param other The other color. * @returns The value of contrast ratio. */ colorsContrastRatio(other: Color): number; static get randomColor(): Color; } declare namespace color { export { Color, ColorRGBA, ColorHSLA } } declare type ColorAndComplement = { value: Color; complementValue: Color; }; declare class ColorHSLA extends Color { readonly hue360: number; readonly saturation100: number; readonly lightness100: number; get saturation1(): number; get lightness1(): number; constructor(hue: number | string, saturation: number | string, lightness: number | string, alpha?: number | string); get hsla(): ColorHSLA; get rgba(): ColorRGBA; } declare type ColorPalette = { [color: string]: ColorAndComplement; }; declare namespace colorPalette { export { setColor, getCurrentColor, getColorNameFromPlainColorName, getColorNameComplementFromPlainColorName, setColors, setDefaultColors, selectByContrastRatio, ColorPalette, defaultColors, ValidColorName } } export declare const ColorPicker: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; declare class ColorRGBA extends Color { readonly red255: number; readonly green255: number; readonly blue255: number; get red1(): number; get green1(): number; get blue1(): number; constructor(red: number | string, green: number | string, blue: number | string, alpha?: number | string); get rgba(): ColorRGBA; get hsla(): ColorHSLA; } declare namespace colorScheme { export { setColorScheme, getColorSchemeConfigured, getColorSchemePreferredOrDefault, getColorSchemeConfiguredOrPreferred, getDefaultBackgroundColor, setDefaultBackgroundColor, getColorSchemeDefaultBackgroundColor, Scheme, supportedColorSchemes } } declare const colorSchemesDefinition: { dark: { backgroundColor: ColorRGBA; }; light: { backgroundColor: ColorRGBA; }; }; export declare const ColorSchemeSwitch: DefineComponent< {}, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly>, {}, {}>; declare namespace combinations { export { getPairs } } declare namespace css { export { CSSStyleDeclarationSubset } } declare type CSSStyleDeclarationSubset = { [K in keyof CSSStyleDeclaration]?: CSSStyleDeclaration[K]; }; /** * The default values of colors. */ declare const defaultColors: ColorPalette; declare type DemessifierGuiNotificationsList = ReturnType; /** * Creates a new meta tag if it doesn't exist or sets a value to an existing meta tag. * @param name Name of the meta tag to be set. * @param newContent Value to be set to the meta tag. * @returns The edited meta tag. */ declare function ensureMetaTagContent(name: string, newContent: string): HTMLMetaElement; /** * Makes sure that a meta tag exists. * If it exists, the value is ignored. * If it doesn't exist, it is created with the given value. * @param name Name of the meta tag to be ensured. * @param defaultContent The value to be used if the meta tag didn't exist. * @returns The edited meta tag. */ declare function ensureMetaTagExistence(name: string, defaultContent: string): HTMLMetaElement; declare const FADE_OUT_DURATION_MS: number; /** * Get the list of all box flavors. * @returns The list of all box flavors. */ declare function getAllStatusBoxFlavors(): StatusBoxFlavorName[]; /** * Compose color complement variable name. * @param plainColorName The basic name of the color. * @returns Variable name in the "color-${name}-complement" format. */ declare function getColorNameComplementFromPlainColorName(plainColorName: keyof typeof defaultColors): ValidColorName; /** * Compose color variable name. * @param plainColorName The basic name of the color. * @returns Variable name in the "color-${name}" format. */ declare function getColorNameFromPlainColorName(plainColorName: keyof typeof defaultColors): ValidColorName; /** * Gets the currently set color scheme in the "color-scheme" meta tag. * @returns The currently set color scheme. */ declare function getColorSchemeConfigured(): Scheme | undefined; /** * Gets the currently set color scheme in the "color-scheme" meta tag. * If it is not set, gets the preferred color scheme from the browser. * If none of the preferred schemes is supported, gets the first supported scheme. * @returns The currently set or the preferred color scheme. */ declare function getColorSchemeConfiguredOrPreferred(): Scheme; declare function getColorSchemeDefaultBackgroundColor(scheme: Scheme): Color; /** * Obtains the preferred color scheme from the browser. * If none of the supported schemes is preferred, returns the first supported scheme. * @returns The preferred scheme if it is supported. The first supported scheme otherwise. */ declare function getColorSchemePreferredOrDefault(): Scheme; /** * Retrieves the currently set CSS color variable value based the color name. * @param colorName Name of the color to be retrieved. * @returns Color value. */ declare function getCurrentColor(colorName: ValidColorName | "default-bg-color"): Color; declare function getDefaultBackgroundColor(bgColorIfNotFound?: Color): Color; declare function getElementBySelector(selector: HtmlElementSelector): HTMLElement; /** * Get flavor properties for the given box flavor. * @param name Box flavor. * @returns Flavor properties for the given box flavor. */ declare function getFlavorItem(name: StatusBoxFlavorName): StatusBoxFlavorItem; /** * Retrieves a meta tag by its name. * @param name Name of the meta tag to be retrieved. * @returns The retrieved meta tag or null if it doesn't exist. */ declare function getMetaTag(name: string): HTMLMetaElement | null; /** * Retrieves a meta tag content by the name of the meta tag. * @param name Name of the meta tag to retrieve content from. * @returns The retrieved meta tag content or undefined. */ declare function getMetaTagContent(name: string): string | undefined; /** * Returns all possible pairs from the given array. * [1, 2, 3] -> [[1,2], [1,3], [2,3]] * @param arr */ declare function getPairs(arr: T[]): T[][]; /** * Get a pseudo-random integer: 0 <= result < maximum * @param maximum upper bound (excluded) */ declare function getPseudoRandomInteger(maximum: number): number; /** * Get pseudo-random integers: 0 <= results[i] < maximums[i] * @param maximums upper bounds (excluded) */ declare function getPseudoRandomIntegers(maximums: number[]): number[]; /** * Get a pseudo-random item from the first array that is not in the second array. * @param array One of these items will be randomly selected. * @param notTheseItems None of these items will be selected. * @returns A random item form the first array and not from the second array. */ declare function getPseudoRandomItem(array: T[], notTheseItems?: T[]): T; /** * Get pseudo-random string of the specified characters. * @param charsCount number of characters to be returned * @param alphabet the characters to select uniformly from */ declare function getPseudoRandomString(charsCount?: number, alphabet?: string): string; /** * Get pseudo-random bytes: 0 <= results < 256 * @param count number of bytes to be generated */ declare function getRandomBytes(count: number): number[]; declare function getRouterForMenu(menu: MenuItemAny[], useDefault404?: boolean): Router; declare const headerLogoExample: LogoSection[]; declare const HEIGHT_FADE_DURATION_MS = 500; declare namespace htmlElement { export { getElementBySelector, sanitizeHref, HtmlElementSelector } } declare type HtmlElementSelector = { element?: HTMLElement; elementId?: string; elementClass?: string; elementTag?: string; }; declare namespace htmlMetaTag { export { addMetaTag, getMetaTag, getMetaTagContent, ensureMetaTagExistence, ensureMetaTagContent, setMetaTagContent } } declare namespace icon { export { IconDefinition } } declare type Interval = ReturnType; declare type Keys = keyof typeof clientPaths; declare type LogoSection = { logoSectionType: "text-title" | "text-subtitle" | "svg-mask-square"; logoSectionText?: string; logoSectionSvgMask?: string; }; declare namespace logoSection { export { LogoSection, headerLogoExample, default_2 as TheDemessifierLogoSvg } } declare namespace menu { export { Path, PathsList, ClientPath, MenuItemComponentDefinition, MenuItem, MenuItemAny, menuExample } } declare const menuExample: MenuItemAny[]; declare type MenuItem = { name: string; component: () => Promise; componentProps: InstanceType["$props"]; path: ClientPath; title: string; fa: IconDefinition; metaTitle: string; }; declare type MenuItemAny = MenuItem; declare type MenuItemComponentDefinition = new (...args: any[]) => { $props: any; }; declare namespace model { export { color, logoSection } } export { model } export declare function mountApp(targetElementSelector?: HtmlElementSelector, router?: Router, menu?: MenuItemAny[], appPlugins?: any[], headerLogoProps?: LogoSection[], colorPalette?: ColorPalette): ReturnType; declare namespace notification { export { ChildrenType, OPACITY_STEP_DURATION_MS, FADE_OUT_DURATION_MS, REMOVE_IN_MS, HEIGHT_FADE_DURATION_MS, useDemessifierGuiNotificationsList, DemessifierGuiNotificationsList } } declare type Notification_2 = { statusBoxProps: StatusBoxProps; children: VNode[]; interval: Interval; maxTimeMilliSeconds: number; remainingTimeMilliSeconds: number; isGone: boolean; }; declare type NotificationsList = { [key: string]: Notification_2; }; declare const OPACITY_STEP_DURATION_MS = 500; declare type Path = `/${string}`; declare type PathsList = { [key: string]: Path; }; export declare const pinia: Pinia; declare type PlainColorName = keyof typeof defaultColors; declare interface Props { /** * Icon of the button. */ icon?: IconDefinition | null; /** * Text of the button. */ text: string; /** * Button type attribute. */ type?: "button" | "reset" | "submit"; /** * Optional on-click function. */ onClick?: () => void; } declare interface Props_2 { /** * Icon of the button. */ icon?: IconDefinition | null; /** * Text of the button. */ text: string; /** * Target address. */ href: string; /** * Is the button and link disabled? */ disabled?: boolean; /** * Whether the target address will be open in a new browser tab or the same one. */ openInNewTab?: boolean; } declare interface Props_3 { /** * Headline of the box. * This is shown in the tooltip when the box is minimized. */ headlineText: string; /** * Determines color and icon of the box. */ boxFlavorName: StatusBoxFlavorName; initializeMinimized?: boolean; /** * Whether the box can be pinned. * Pinning emits and event that has to be handled by the parent component. */ canBePinned?: boolean; /** * Whether it can be closed. * Closing emits an event that has to be handled by the parent component. */ canBeClosed?: boolean; } declare namespace provider { export { colorPalette, colorScheme, combinations, css, htmlElement, htmlMetaTag, icon, menu, notification, randomness, router, statusBox } } export { provider } declare namespace randomness { export { getPseudoRandomInteger, getPseudoRandomIntegers, getRandomBytes, getPseudoRandomString, getPseudoRandomItem } } declare const REMOVE_IN_MS: number; declare namespace router { export { getRouterForMenu } } declare function sanitizeHref(hrefValue: string): string; /** * Supported values of color scheme names. */ declare type Scheme = keyof typeof colorSchemesDefinition; /** * Select a value depending on contrast ratio. * @param contrastRatio It is decided based on this contrast ration. Valid values are 1-21 * @param ok This value is returned for contrast ratio 7-21 * @param meh This value is returned for contrast ratio 4.5-7 * @param bad This value is returned for contrast ratio 7-21 * @returns One of the provided values depending on the contrast ratio. */ declare function selectByContrastRatio(contrastRatio: number, ok: T, meh: T, bad: T): T; /** * Sets the CSS color variable. * @param colorName CSS variable name associated with the color. * @param colorValue CSS color value to be set. */ declare function setColor(colorName: ValidColorName | "default-bg-color", colorValue: Color): void; /** * Set the default CSS color variables. */ declare function setColors(colorPalette: ColorPalette): void; /** * Sets a color scheme to the "color-scheme" meta tag. * @param scheme The value to be set. */ declare function setColorScheme(scheme: Scheme): void; declare function setDefaultBackgroundColor(bgColorIfNotFound?: Color): Color; /** * Set the default CSS color variables. */ declare function setDefaultColors(): void; /** * Sets a value to the given meta tag. * @param meta The meta tag to be edited. * @param content The new value to be set to the given meta tag. * @returns The meta tag. */ declare function setMetaTagContent(meta: HTMLMetaElement, content: string): HTMLMetaElement; export declare const StatusBox: __VLS_WithTemplateSlots>; declare namespace statusBox { export { getAllStatusBoxFlavors, getFlavorItem, StatusBoxFlavorName, StatusBoxFlavorItem, statusBoxFlavor } } /** * FontAwesome icons for the individual box flavors. */ declare const statusBoxFlavor: Readonly<{ [key: string]: StatusBoxFlavorItem; }>; /** * Flavor properties for boxes. */ declare type StatusBoxFlavorItem = { name: StatusBoxFlavorName; icon: IconDefinition; color: ValidColorName; bgColor: ValidColorName; }; /** * Box flavor. */ declare type StatusBoxFlavorName = keyof typeof statusBoxIcons; /** * FontAwesome icons for the individual box flavors. */ declare const statusBoxIcons: Readonly<{ success: IconDefinition; info: IconDefinition; warn: IconDefinition; error: IconDefinition; }>; declare type StatusBoxProps = InstanceType["$props"]; /** * List of supported color schemes. */ declare const supportedColorSchemes: Scheme[]; declare const useDemessifierGuiNotificationsList: StoreDefinition<"demessifier-gui:notifications-list", { notificationsList: NotificationsList; }, {}, { addNewNotification(boxFlavorName: StatusBoxFlavorName, headlineText: string, children: ChildrenType, removeInMilliSeconds?: number | false): string; removeNotification(notificationId: string, ignoreMissing?: boolean): null | undefined; interruptCountDown(notificationId: string): void; resetTimer(notificationId: string): void; getOpacityFraction(notificationId: string): number; getIsGone(notificationId: string): boolean; }>; /** * Color valid variable names. */ declare type ValidColorName = `color-${PlainColorName}` | `color-${PlainColorName}-complement`; export { }