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

64 lines (63 loc) 1.75 kB
/// <reference types="@rbxts/types" /> /// <reference types="roact" /> import Roact from "@rbxts/roact"; export declare const enum HistoryTraversalDirection { Back = -1, Forward = 1 } interface SyntaxTextBoxState { source: string; cursorPosition: number; virtualCursorPosition: number; focused?: boolean; } interface SyntaxTextBoxProps { /** * The source string */ Source: string; /** The size of this textbox */ Size?: UDim2; /** The position of this textbox */ Position?: UDim2; /** Whether or not this textbox is focused */ Focused?: boolean; /** * Whether or not to auto focus this text box */ AutoFocus?: boolean; /** * Whether or not to refocus this text box on submit */ RefocusOnSubmit?: boolean; CancelKeyCodes?: Enum.KeyCode[]; /** * Whether or not this textbox is multi lined */ MultiLine?: boolean; /** * The placeholder text */ PlaceholderText?: string; /** * When this text box is submitted (if not `MultiLine`) */ OnEnterSubmit?: (input: string) => void; OnHistoryTraversal?: (direction: HistoryTraversalDirection) => void; OnCancel?: () => void; OnControlKey?: (keyCode: Enum.KeyCode, io: InputObject) => void; } /** * A basic syntax text box */ export default class ZirconSyntaxTextBox extends Roact.Component<SyntaxTextBoxProps, SyntaxTextBoxState> { private ref; private maid; private focusMaid; constructor(props: SyntaxTextBoxProps); didMount(): void; willUnmount(): void; didUpdate(prevProps: SyntaxTextBoxProps): void; render(): Roact.Element; } export {};