UNPKG

@rbxts/zircon

Version:

<div> <img src="https://i.imgur.com/YgpbX7G.png" align="left" width="128"/> <h1>ZIRCON</h1> <h3>A clean, sleek, runtime debugging console for Roblox</h3> <a href="https://npmjs.com/package/@rbxts/zircon"><img src="https://badge.fury.io

74 lines (73 loc) 3.05 kB
/// <reference types="@rbxts/types" /> /// <reference types="roact" /> /// <reference types="@rbxts/compiler-types" /> import Roact, { InferEnumNames } from "@rbxts/roact"; interface ConsoleColors { readonly Yellow: Color3; readonly Cyan: Color3; readonly Grey: Color3; readonly White: Color3; readonly Orange: Color3; readonly Green: Color3; readonly Red: Color3; } export interface ThemeSyntaxColors { VariableColor: Color3 | string; KeywordColor: Color3 | string; NumberColor: Color3 | string; StringColor: Color3 | string; OperatorColor: Color3 | string; CommentColor?: Color3 | string; BooleanLiteral?: Color3 | string; ControlCharacters: Color3 | string; } interface DockOptions { Transparency?: number; } export interface ZirconThemeDefinition { readonly IconAssetUri: string; readonly Font: Enum.Font | InferEnumNames<Enum.Font>; readonly ConsoleFont: Enum.Font | InferEnumNames<Enum.Font>; readonly PrimaryBackgroundColor3: Color3; readonly SecondaryBackgroundColor3: Color3; readonly PrimarySelectColor3: Color3; readonly PrimaryTextColor3: Color3; readonly PrimaryDisabledColor3: Color3; readonly SecondaryTextColor3: Color3; readonly ErrorTextColor3: Color3; readonly ServerContextColor: Color3; readonly IconColor3?: Color3; readonly ClientContextColor: Color3; readonly ConsoleColors: ConsoleColors; readonly Dock: DockOptions; readonly SyntaxHighlighter?: ThemeSyntaxColors; } export declare const ZirconDarkPlastic: ZirconThemeDefinition; export declare const ZirconFrost: ZirconThemeDefinition; export declare const BuiltInThemes: { Frost: ZirconThemeDefinition; Plastic: ZirconThemeDefinition; }; export declare type BuiltInThemes = typeof BuiltInThemes; declare type Color3Keys<T> = { [P in keyof T]: T[P] extends Color3 ? P & string : never; }[keyof T]; declare type Color3ToHex<T> = { [P in keyof T]: T[P] extends Color3 | string ? string : T[P] extends Color3 | string | undefined ? string | undefined : T[P]; }; export declare function getThemeRichTextColor(theme: ZirconThemeDefinition, color3: Color3Keys<ZirconThemeDefinition["ConsoleColors"]>): string; export declare function convertColorObjectToHex<T>(values: T): Color3ToHex<T>; export declare function getRichTextColor3(theme: ZirconThemeDefinition, color3: Color3Keys<ZirconThemeDefinition["ConsoleColors"]>, text: string): string; export declare function italicize(text: string): string; export declare function makeTheme(theme: Partial<ZirconThemeDefinition>): ZirconThemeDefinition; /** @deprecated */ export declare const ZirconTheme: ZirconThemeDefinition; declare const ThemeContext: { Provider: Roact.ComponentConstructor<{ value: ZirconThemeDefinition; }, {}>; Consumer: Roact.ComponentConstructor<{ render: (value: ZirconThemeDefinition) => Roact.Element | undefined; }, {}>; }; export default ThemeContext;