@shell-shock/preset-cli 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"prompts-builtin.mjs","names":["code","Show","splitProps","FunctionDeclaration","VarDeclaration","Spacing","BuiltinFile","ClassDeclaration","ClassField","ClassMethod","ClassPropertyGet","InterfaceDeclaration","InterfaceMember","TSDoc","TSDocExample","TSDocParam","TSDocRemarks","TSDocReturns","TypeDeclaration","useTheme","defu","BasePromptDeclarations","theme","_$createComponent","heading","children","name","parameters","type","returnType","typeParameters","default","doc","optional","abstract","isPrivateMember","_$createIntrinsic","async","icons","prompt","submitted","cancelled","error","active","TextPromptDeclarations","override","SelectPromptDeclarations","NumericPromptDeclarations","TogglePromptDeclarations","PasswordPromptDeclaration","PromptsBuiltin","props","rest","_$mergeProps","id","description","imports","builtinImports","console","env","when","Boolean"],"sources":["../../src/components/prompts-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport { FunctionDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n ClassDeclaration,\n ClassField,\n ClassMethod,\n ClassPropertyGet\n} from \"@powerlines/plugin-alloy/typescript/components/class-declaration\";\nimport {\n InterfaceDeclaration,\n InterfaceMember\n} from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { TypeDeclaration } from \"@powerlines/plugin-alloy/typescript/components/type-declaration\";\nimport { useTheme } from \"@shell-shock/preset-script/contexts/theme\";\nimport defu from \"defu\";\n\nexport interface PromptsBuiltinProps\n extends Omit<BuiltinFileProps, \"id\" | \"description\"> {}\n\n/**\n * A component that generates TypeScript declarations for built-in prompt types and related utilities, such as the base Prompt class, specific prompt types like TextPrompt and SelectPrompt, and utility functions for handling prompt cancellations. This component serves as a central place to define the types and interfaces for prompts used in the Shell Shock CLI, providing a consistent API for creating and managing prompts throughout the application.\n */\nexport function BasePromptDeclarations() {\n const theme = useTheme();\n\n return (\n <>\n <TSDoc heading=\"A utility function to pause execution for a specified duration, which can be used in prompt interactions to create delays or timeouts. The function returns a promise that resolves after the specified duration in milliseconds, allowing it to be used with async/await syntax for easier handling of asynchronous prompt logic.\">\n <TSDocParam name=\"duration\">\n {`The duration to sleep in milliseconds.`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves after the specified duration, allowing for asynchronous delays in prompt interactions.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"sleep\"\n parameters={[{ name: \"duration\", type: \"number\" }]}\n returnType=\"Promise<void>\">{code`return new Promise((resolve) => setTimeout(resolve, duration)); `}</FunctionDeclaration>\n <Spacing />\n <TypeDeclaration\n export\n name=\"PromptParser\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}\n doc=\"A type for a custom prompt input parser, which can be used to create custom input styles for prompts. The function should return the parsed value for the given input string.\">\n {code`(this: Prompt<TValue>, input: string) => TValue; `}\n </TypeDeclaration>\n <Spacing />\n <TypeDeclaration\n export\n name=\"PromptFormatter\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}\n doc=\"A type for a custom prompt input formatter, which can be used to create custom display styles for prompts. The function should return the formatted string to display for the given input value.\">\n {code`(this: Prompt<TValue>, input: TValue) => string; `}\n </TypeDeclaration>\n <Spacing />\n <FunctionDeclaration\n export\n name=\"noMask\"\n doc=\"A built-in prompt mask function that just returns the input as is, making it invisible\"\n parameters={[{ name: \"input\", type: \"string\" }]}\n returnType=\"string\">\n {code`return input; `}\n </FunctionDeclaration>\n <Spacing />\n <FunctionDeclaration\n export\n name=\"invisibleMask\"\n doc=\"A built-in prompt mask function that makes input invisible\"\n parameters={[{ name: \"input\", type: \"string\" }]}\n returnType=\"string\">\n {code`return \" \".repeat(input.length); `}\n </FunctionDeclaration>\n <Spacing />\n {code`\n const DEFAULT_ICONS = process.platform === \"win32\" ? {\n arrowUp: \"↑\",\n arrowDown: \"↓\",\n arrowLeft: \"←\",\n arrowRight: \"→\",\n radioOn: \"(*)\",\n radioOff: \"( )\",\n tick: \"√\",\n cross: \"×\",\n ellipsis: \"...\",\n pointerSmall: \"»\",\n line: \"─\",\n pointer: \">\"\n } : {\n arrowUp: \"↑\",\n arrowDown: \"↓\",\n arrowLeft: \"←\",\n arrowRight: \"→\",\n radioOn: \"◉\",\n radioOff: \"◯\",\n tick: \"✔\",\n cross: \"✖\",\n ellipsis: \"…\",\n pointerSmall: \"›\",\n line: \"─\",\n pointer: \"❯\"\n }; `}\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"PromptState\"\n doc=\"The current state of a prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"value\"\n type=\"TValue\"\n doc=\"The current value of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isError\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is in an error state\"\n />\n <Spacing />\n <InterfaceMember\n name=\"errorMessage\"\n optional\n type=\"string\"\n doc=\"If the prompt is in an error state, this will contain the error message to display\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isSubmitted\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is submitted\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isCancelled\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is cancelled\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isCompleted\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is completed, which can be used to indicate that the prompt interaction is finished regardless of whether it was submitted or cancelled\"\n />\n <Spacing />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"PromptConfig\"\n doc=\"Configuration options for configuring a prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"input\"\n optional\n type=\"NodeJS.ReadStream\"\n doc=\"The readable stream to use for prompt input, defaults to process.stdin\"\n />\n <Spacing />\n <InterfaceMember\n name=\"output\"\n optional\n type=\"NodeJS.WriteStream\"\n doc=\"The writable stream to use for prompt output, defaults to process.stdout\"\n />\n <Spacing />\n <InterfaceMember\n name=\"message\"\n type=\"string\"\n doc=\"The prompt message to display\"\n />\n <Spacing />\n <InterfaceMember\n name=\"description\"\n optional\n type=\"string\"\n doc=\"The prompt description message to display\"\n />\n <Spacing />\n <InterfaceMember\n name=\"initialValue\"\n optional\n type=\"TValue\"\n doc=\"The initial value of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"validate\"\n optional\n type=\"(value: TValue) => boolean | string | Promise<boolean | string>\"\n doc=\"A validation function that returns true if the input is valid, false or a string error message if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"parse\"\n optional\n type=\"PromptParser<TValue>\"\n doc=\"A function that parses the input value and returns the parsed result or throws an error if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"format\"\n optional\n type=\"PromptFormatter<TValue>\"\n doc=\"A function that formats the input value and returns the formatted result or throws an error if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"mask\"\n optional\n type=\"(input: string) => string\"\n doc=\"A function that masks the input value and returns the masked result or throws an error if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"defaultErrorMessage\"\n optional\n type=\"string\"\n doc=\"The default error message to display when validation fails\"\n />\n <Spacing />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n abstract\n name=\"Prompt\"\n doc=\"Base prompt class that other prompt types can extend from\"\n extends=\"EventEmitter\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <ClassField name=\"readline\" isPrivateMember type=\"readline.Interface\" />\n <hbr />\n <ClassField name=\"value\" isPrivateMember optional type=\"TValue\" />\n <hbr />\n <ClassField name=\"isClosed\" isPrivateMember type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"initialValue\" abstract protected type=\"TValue\" />\n <hbr />\n <ClassField name=\"input\" protected type=\"NodeJS.ReadStream\">\n {code`process.stdin; `}\n </ClassField>\n <hbr />\n <ClassField name=\"output\" protected type=\"NodeJS.WriteStream\">\n {code`process.stdout; `}\n </ClassField>\n <hbr />\n <ClassField name=\"message\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"description\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"errorMessage\" protected type=\"string | null\">\n {code`null; `}\n </ClassField>\n <hbr />\n <ClassField name=\"defaultErrorMessage\" protected type=\"string\">\n {code`\"Invalid value provided\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isSubmitted\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isCancelled\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isInitial\" type=\"boolean\">\n {code`true; `}\n </ClassField>\n <hbr />\n <ClassField name=\"consoleOutput\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"consoleStatus\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"displayValue\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField\n name=\"validator\"\n protected\n type=\"(value: TValue) => boolean | string | Promise<boolean | string>\">\n {code`() => true; `}\n </ClassField>\n <hbr />\n <ClassField name=\"parser\" protected type=\"PromptParser<TValue>\">\n {code`(value: string) => value as TValue; `}\n </ClassField>\n <hbr />\n <ClassField name=\"formatter\" protected type=\"PromptFormatter<TValue>\">\n {code`(value: TValue) => String(value); `}\n </ClassField>\n <hbr />\n <ClassField name=\"mask\" protected type=\"(input: string) => string\">\n {code`noMask; `}\n </ClassField>\n <hbr />\n <ClassField name=\"cursor\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <hbr />\n <ClassField name=\"cursorOffset\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <Spacing />\n {code`constructor(protected config: PromptConfig<TValue>) {\n super();\n\n if (config.input) {\n this.input = config.input;\n }\n if (config.output) {\n this.output = config.output;\n }\n if (config.defaultErrorMessage) {\n this.defaultErrorMessage = config.defaultErrorMessage;\n }\n if (config.description) {\n this.description = config.description;\n }\n if (config.validate) {\n this.validator = config.validate;\n }\n if (config.parse) {\n this.parser = config.parse.bind(this);\n }\n if (config.format) {\n this.formatter = config.format.bind(this);\n }\n\n this.message = config.message;\n\n this.#readline = readline.createInterface({\n input: this.input,\n escapeCodeTimeout: 50\n });\n readline.emitKeypressEvents(this.input, this.#readline);\n\n if (this.input.isTTY) {\n this.input.setRawMode(true);\n }\n\n this.input.on(\"keypress\", this.onKeypress.bind(this));\n } `}\n <Spacing />\n <ClassPropertyGet\n public\n name=\"value\"\n type=\"TValue\"\n doc=\"A getter for the prompt value that returns the current value or the initial value if the current value is not set\">\n {code`return this.#value || this.initialValue; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet public name=\"isError\" type=\"boolean\">\n {code`return !!this.errorMessage; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"isSelect\" type=\"boolean\">\n {code`return false; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"isCompleted\" type=\"boolean\">\n {code`return this.isCancelled || this.isSubmitted; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"isPlaceholder\" type=\"boolean\">\n {code`return this.config.initialValue !== undefined && this.displayValue === this.formatter(this.initialValue); `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"status\" type=\"string\">\n {code`return this.completed ? \"\" : \\` \\\\n \\${\n colors.italic(\n this.isError\n ? colors.text.prompt.description.error(splitText(this.errorMessage, \"1/3\").join(\"\\\\n\"))\n : this.isCompleted\n ? colors.text.prompt.description.active(this.description)\n : \"\"\n )\n }\\`; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassMethod\n doc=\"A method to change the prompt value, which also updates the display value and fires a state update event. This method can be called by subclasses whenever the prompt value needs to be updated based on user input or other interactions.\"\n name=\"changeValue\"\n protected\n parameters={[{ name: \"value\", type: \"TValue\" }]}>\n {code`let updatedValue = value;\n if (value === undefined || value === \"\") {\n updatedValue = this.initialValue;\n } else {\n updatedValue = value;\n }\n\n this.displayValue = this.formatter(updatedValue);\n this.#value = updatedValue;\n setTimeout(() => {\n this.validate(updatedValue);\n this.sync();\n }, 0);\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to emit the current state\"\n name=\"sync\"\n protected>\n {code`this.emit(\"state\", {\n value: this.value,\n errorMessage: this.errorMessage,\n isError: this.isError,\n isSubmitted: this.isSubmitted,\n isCancelled: this.isCancelled,\n isCompleted: this.isCompleted\n });\n this.invokeRender(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod doc=\"A method to ring the bell\" name=\"bell\" protected>\n {code`this.output.write(beep); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"onKeypress\"\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`if (this.#isClosed) {\n return;\n }\n\n return this.keypress(char, key); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (!action) {\n this.bell();\n } else if (typeof (this as any)[action] === \"function\") {\n (this as any)[action](key);\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to close the prompt and clean up resources, which also emits a submit or cancel event based on the prompt state. This method should be called when the prompt interaction is finished and the prompt needs to be closed.\"\n name=\"close\"\n async\n protected>\n {code`this.output.write(cursor.show);\n this.input.removeListener(\"keypress\", this.onKeypress);\n\n if (this.input.isTTY) {\n this.input.setRawMode(false);\n }\n\n this.#readline.close();\n this.emit(this.isSubmitted ? \"submit\" : \"cancel\", this.value);\n this.#isClosed = true; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to validate the prompt input using the provided validator function, which updates the error message and error state based on the validation result. This method is called whenever the prompt value changes and needs to be validated.\"\n name=\"validate\"\n protected\n parameters={[\n {\n name: \"value\",\n type: \"TValue\"\n }\n ]}\n async>\n {code`let result = await this.validator(value);\n if (typeof result === \"string\") {\n this.errorMessage = result;\n } else if (typeof result === \"boolean\") {\n this.errorMessage = result ? null : this.defaultErrorMessage;\n } else {\n this.errorMessage = null;\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to route keypress events to specific prompt actions based on the key pressed. This method maps various key combinations and keys to corresponding actions that can be handled by the prompt, such as submitting, cancelling, navigating, etc.\"\n name=\"getAction\"\n protected\n parameters={[{ name: \"key\", type: \"readline.Key\" }]}\n returnType=\"string | false\">\n {code`if (key.meta && key.name !== \"escape\") {\n return false;\n }\n\n let action: string | undefined;\n if (key.ctrl) {\n if (key.name === \"a\") action = \"first\";\n if (key.name === \"c\") action = \"cancel\";\n if (key.name === \"d\") action = \"cancel\";\n if (key.name === \"e\") action = \"last\";\n if (key.name === \"g\") action = \"reset\";\n }\n\n if (key.name === \"return\") action = \"submit\";\n if (key.name === \"enter\") action = \"submit\";\n if (key.name === \"backspace\") action = \"delete\";\n if (key.name === \"delete\") action = \"deleteForward\";\n if (key.name === \"cancel\") action = \"cancel\";\n if (key.name === \"escape\") action = \"cancel\";\n if (key.name === \"tab\") action = \"next\";\n if (key.name === \"pagedown\") action = \"nextPage\";\n if (key.name === \"pageup\") action = \"prevPage\";\n if (key.name === \"home\") action = \"home\";\n if (key.name === \"end\") action = \"end\";\n\n if (key.name === \"up\") action = \"up\";\n if (key.name === \"down\") action = \"down\";\n if (key.name === \"right\") action = \"right\";\n if (key.name === \"left\") action = \"left\";\n\n return action || false; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n protected>\n {code`this.changeValue(this.initialValue);\n this.cursorOffset = 0;\n\n this.errorMessage = null;\n this.isCancelled = false;\n this.isSubmitted = false;\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to cancel the prompt input\"\n name=\"cancel\"\n protected>\n {code`this.errorMessage = null;\n this.isCancelled = true;\n this.isSubmitted = false;\n\n this.sync();\n this.output.write(\"\\\\n\");\n this.close(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to submit the prompt input\"\n name=\"submit\"\n async\n protected>\n {code`this.cursorOffset = 0;\n this.cursor = this.displayValue.length;\n\n await this.validate(this.value);\n if (this.isError) {\n this.sync();\n this.bell();\n } else {\n this.isSubmitted = true;\n this.isCancelled = false;\n\n this.sync();\n this.output.write(\"\\\\n\");\n this.close();\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"invokeRender\"\n protected>\n {code`if (this.#isClosed) {\n return;\n }\n\n if (!this.isInitial) {\n if (this.consoleStatus) {\n this.output.write(cursor.down(stripAnsi(this.consoleStatus).split(/\\\\r?\\\\n/).map(line => Math.ceil(line.length / this.output.columns)).reduce((a, b) => a + b) - 1) + clear(this.consoleStatus, this.output.columns));\n }\n\n this.output.write(clear(this.consoleOutput, this.output.columns));\n }\n\n this.consoleOutput = \\` \\${\n this.isSubmitted\n ? colors.text.prompt.icon.submitted(\"${\n theme.icons.prompt.submitted\n }\")\n : this.isCancelled\n ? colors.text.prompt.icon.cancelled(\"${\n theme.icons.prompt.cancelled\n }\")\n : this.isError\n ? colors.text.prompt.icon.error(\"${theme.icons.prompt.error}\")\n : colors.text.prompt.icon.active(\"${theme.icons.prompt.active}\")\n } \\${\n this.isCompleted\n ? colors.text.prompt.message.submitted(this.message)\n : colors.bold(colors.text.prompt.message.active(this.message))\n } \\${\n colors.border.app.divider.tertiary(\n this.isCompleted\n ? (process.platform === \"win32\" ? \"...\" : \"…\")\n : (process.platform === \"win32\" ? \"»\" : \"›\")\n )\n } \\`;\n this.consoleOutput += this.render();\n\n if (this.isInitial) {\n this.isInitial = false;\n }\n\n this.output.write(erase.line + cursor.to(0) + this.consoleOutput + (this.status ? cursor.save + this.status + cursor.restore + cursor.move(this.cursorOffset, 0) : cursor.save));\n this.consoleStatus = this.status; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"render\"\n protected\n returnType=\"string\">\n {code`return this.isPlaceholder\n ? colors.text.prompt.input.disabled(this.displayValue)\n : this.isError\n ? colors.text.prompt.input.error(this.displayValue)\n : this.isSubmitted\n ? colors.text.prompt.input.submitted(this.displayValue)\n : this.isCancelled\n ? colors.text.prompt.input.cancelled(this.displayValue)\n : colors.bold(colors.text.prompt.input.active(this.displayValue)); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"PromptFactoryConfig\"\n extends=\"PromptConfig<TValue>\"\n doc=\"Configuration options for creating a prompt with a prompt factory function\"\n typeParameters={[{ name: \"TValue\", default: \"string\" }]}>\n <InterfaceMember\n name=\"onState\"\n optional\n type=\"(state: PromptState<TValue>) => any\"\n doc=\"A function that is called when the prompt state changes, useful for updating the prompt message or other properties dynamically\"\n />\n <Spacing />\n <InterfaceMember\n name=\"onSubmit\"\n optional\n type=\"(value: TValue) => any\"\n doc=\"A function that is called when the prompt is submitted, useful for handling the submitted value or performing actions based on the prompt state\"\n />\n <Spacing />\n <InterfaceMember\n name=\"onCancel\"\n optional\n type=\"(event: any) => any\"\n doc=\"A function that is called when the prompt is canceled, useful for handling the canceled value or performing actions based on the prompt state\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <VarDeclaration\n export\n name=\"CANCEL_SYMBOL\"\n doc=\"A unique symbol used to indicate that a prompt was cancelled, which can be returned from a prompt factory function to signal that the prompt interaction should be cancelled and any pending promises should be rejected with this symbol. This allows for a consistent way to handle prompt cancellations across different prompt types and interactions.\">\n {code`Symbol(\"shell-shock:prompts:cancel\"); `}\n </VarDeclaration>\n <Spacing />\n <FunctionDeclaration\n name=\"isCancel\"\n export\n doc=\"Checks if a given value is a {@link CANCEL_SYMBOL | cancel symbol}.\"\n parameters={[\n {\n name: \"value\",\n type: \"any\",\n doc: \"The value to check\"\n }\n ]}\n returnType=\"boolean\">\n {code`return value === CANCEL_SYMBOL; `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * Declarations for a text-based prompt that allows users to input and edit text, with support for cursor movement, deletion, and custom masking. This prompt type can be used for various text input scenarios, such as entering a username, password, or any other string input. The TextPrompt class extends the base Prompt class and implements specific logic for handling text input and editing interactions.\n */\nexport function TextPromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n name=\"StringPromptConfig\"\n extends=\"PromptConfig<string>\"\n doc=\"Configuration options for configuring a text-based prompt\">\n <InterfaceMember\n name=\"initialValue\"\n optional\n type=\"string\"\n doc=\"The initial value of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"mask\"\n optional\n type=\"(input: string) => string\"\n doc=\"A function that masks the input value and returns the masked result\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n name=\"StringPrompt\"\n doc=\"A prompt for text input\"\n extends=\"Prompt<string>\">\n <ClassField name=\"isInvalid\" isPrivateMember type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"initialValue\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: StringPromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n this.cursor = 0;\n this.sync();\n } `}\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n override\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (action && typeof (this as any)[action] === \"function\") {\n return (this as any)[action]();\n }\n\n if (!char || char.length === 0) {\n return this.bell();\n }\n\n const value = \\`\\${this.value.slice(0, this.cursor)}\\${char}\\${this.value.slice(this.cursor)}\\`;\n this.#isInvalid = false;\n this.cursor = this.isPlaceholder ? 0 : this.value.slice(0, this.cursor).length + 1;\n\n this.changeValue(value);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n override\n protected>\n {code`this.#isInvalid = false;\n this.cursor = Number(!!this.initialValue);\n super.reset(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to cancel the prompt input\"\n name=\"cancel\"\n override\n protected>\n {code`this.#isInvalid = false;\n super.cancel(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to validate the prompt input\"\n name=\"validate\"\n override\n async\n protected>\n {code`await super.validate(this.value);\n this.#isInvalid = this.isError; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end of the input\"\n name=\"next\"\n protected>\n {code`if (!this.isPlaceholder) {\n return this.bell();\n }\n\n this.changeValue(this.initialValue);\n this.cursor = this.displayValue.length;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left or right by a \\`count\\` of positions\"\n name=\"moveCursor\"\n parameters={[\n {\n name: \"count\",\n type: \"number\"\n }\n ]}\n protected>\n {code`if (this.isPlaceholder) {\n return;\n }\n\n this.cursor = this.cursor + count;\n this.cursorOffset += count; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character backward of the cursor\"\n name=\"delete\"\n protected>\n {code`if (this.isCursorAtStart()) {\n return this.bell();\n }\n\n this.changeValue(\\`\\${this.value.slice(0, this.cursor - 1)}\\${this.value.slice(this.cursor)}\\`);\n this.#isInvalid = false;\n\n if (this.isCursorAtStart()) {\n this.cursorOffset = 0\n } else {\n this.cursorOffset++;\n this.moveCursor(-1);\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character forward of the cursor\"\n name=\"deleteForward\"\n protected>\n {code`if (this.cursor >= this.displayValue.length || this.isPlaceholder) {\n return this.bell();\n }\n\n this.changeValue(\\`\\${\n this.value.slice(0, this.cursor)\n }\\${\n this.value.slice(this.cursor + 1)\n }\\`);\n this.#isInvalid = false;\n\n if (this.isCursorAtEnd()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the start\"\n name=\"first\"\n protected>\n {code`this.cursor = 0;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end\"\n name=\"last\"\n protected>\n {code`this.cursor = this.value.length;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left\"\n name=\"left\"\n protected>\n {code`if (this.cursor <= 0 || this.isPlaceholder) {\n return this.bell();\n }\n\n this.moveCursor(-1);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the right\"\n name=\"right\"\n protected>\n {code`if (this.cursor >= this.displayValue.length || this.isPlaceholder) {\n return this.bell();\n }\n\n this.moveCursor(1);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to check if the cursor is at the start\"\n name=\"isCursorAtStart\"\n protected>\n {code`return this.cursor === 0 || (this.isPlaceholder && this.cursor === 1); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to check if the cursor is at the end\"\n name=\"isCursorAtEnd\"\n protected>\n {code`return this.cursor === this.displayValue.length || (this.isPlaceholder && this.cursor === this.displayValue.length + 1); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"render\"\n override\n protected\n returnType=\"string\">\n {code`return this.isPlaceholder\n ? colors.text.prompt.input.disabled(this.displayValue)\n : this.#isInvalid\n ? colors.text.prompt.input.error(this.displayValue)\n : this.isSubmitted\n ? colors.text.prompt.input.submitted(this.displayValue)\n : this.isCancelled\n ? colors.text.prompt.input.cancelled(this.displayValue)\n : colors.bold(colors.text.prompt.input.active(this.displayValue)); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"A type definition for the configuration options to pass to the text prompt, which extends the base PromptConfig with additional options specific to text prompts. This type can be used when creating a text prompt using the {@link text | text prompt factory function} or when manually creating an instance of the TextPrompt class. The TextConfig type includes all the properties of the base PromptConfig, such as message, description, initialValue, validate, parse, format, mask, etc., as well as any additional properties that are specific to text prompts.\" />\n <TypeDeclaration name=\"TextConfig\" export>\n {code`PromptFactoryConfig<string> & StringPromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a text prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocRemarks>\n {code`This function can be used to easily create and run a text prompt without needing to manually create an instance of the TextPrompt class and handle its events. The function accepts a configuration object that extends the base PromptFactoryConfig with additional options specific to text prompts, such as the initial value and mask function. The returned promise allows for easy handling of the prompt result using async/await syntax or traditional promise chaining.`}\n </TSDocRemarks>\n <TSDocExample>\n {`import { text, isCancel } from \"shell-shock/prompts\";\n\nasync function run() {\n const name = await text({\n message: \"What is your name?\",\n description: \"Please enter your full name\",\n validate: value => value.trim().length > 0 || \"Name cannot be empty\"\n });\n if (isCancel(name)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"Hello, \" + name + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the text prompt, which extends the base PromptConfig with additional options specific to text prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"text\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"TextConfig\"\n }\n ]}\n returnType=\"Promise<string | symbol>\">\n {code`return new Promise<string | symbol>((response, reject) => {\n const prompt = new StringPrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * Declarations for a select prompt that allows users to choose from a list of options, with support for pagination, option descriptions, and disabled options. This prompt type can be used for scenarios where the user needs to select one option from a predefined list, such as choosing a color, selecting a file, or picking an item from a menu. The SelectPrompt class extends the base Prompt class and implements specific logic for handling option selection and navigation interactions.\n */\nexport function SelectPromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n name=\"PromptOptionConfig\"\n doc=\"Configuration for an option the user can select from the select prompt\">\n <InterfaceMember\n name=\"label\"\n optional\n type=\"string\"\n doc=\"The message label for the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"icon\"\n optional\n type=\"string\"\n doc=\"An icon for the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"value\"\n type=\"any\"\n doc=\"The value of the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"description\"\n optional\n type=\"string\"\n doc=\"The description of the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"selected\"\n optional\n type=\"boolean\"\n doc=\"Whether the option is selected\"\n />\n <Spacing />\n <InterfaceMember\n name=\"disabled\"\n optional\n type=\"boolean\"\n doc=\"Whether the option is disabled\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"PromptOption\"\n extends=\"PromptOptionConfig\"\n doc=\"An option the user can select from the select prompt\">\n <InterfaceMember\n name=\"index\"\n type=\"number\"\n doc=\"The index of the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"selected\"\n type=\"boolean\"\n doc=\"Whether the option is selected\"\n />\n <Spacing />\n <InterfaceMember\n name=\"disabled\"\n type=\"boolean\"\n doc=\"Whether the option is disabled\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"SelectPromptConfig\"\n extends=\"PromptConfig<string>\"\n doc=\"An options object for configuring a select prompt\">\n <InterfaceMember\n name=\"hint\"\n optional\n type=\"string\"\n doc=\"A hint to display to the user\"\n />\n <Spacing />\n <InterfaceMember\n name=\"options\"\n type=\"Array<string | PromptOptionConfig>\"\n doc=\"The options available for the select prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"optionsPerPage\"\n optional\n type=\"number\"\n doc=\"The number of options to display per page, defaults to 8\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n name=\"SelectPrompt\"\n doc=\"A prompt for selecting an option from a list\"\n extends=\"Prompt<TValue>\"\n typeParameters={[{ name: \"TValue\", default: \"any\" }]}>\n <ClassField name=\"initialValue\" protected type=\"TValue\" />\n <hbr />\n <ClassField name=\"optionsPerPage\" protected type=\"number\">\n {code`8; `}\n </ClassField>\n <hbr />\n <ClassField name=\"options\" protected type=\"PromptOption[]\">\n {code`[]; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: SelectPromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n this.options = config.options.map(opt => {\n let option!: PromptOption;\n if (typeof opt === \"string\") {\n option = { index: -1, label: opt, value: opt, selected: false, disabled: false } as PromptOption;\n } else if (typeof opt === \"object\") {\n option = opt as PromptOption;\n } else {\n throw new Error(\\`Invalid option provided to SelectPrompt at index #\\${index}\\`);\n }\n\n return {\n label: String(option.value),\n ...option,\n index: -1,\n description: option.description,\n selected: !!option.selected || (this.initialValue !== undefined && option.value === this.initialValue),\n disabled: !!option.disabled\n };\n }).sort((a, b) => a.label.localeCompare(b.label)).map((option, index) => ({ ...option, index }));\n\n const selected = this.options.findIndex(option => option.selected);\n if (selected > -1) {\n this.cursor = selected;\n if (this.options[this.cursor]) {\n this.initialValue = this.options[this.cursor].value;\n }\n }\n\n if (this.initialValue === undefined && this.options.length > 0 && this.options[0]) {\n this.initialValue = this.options[0].value;\n }\n\n if (config.optionsPerPage) {\n this.optionsPerPage = config.optionsPerPage;\n }\n\n this.sync();\n } `}\n <Spacing />\n <ClassPropertyGet\n doc=\"Returns the currently selected option\"\n name=\"selectedOption\"\n type=\"PromptOption | null\"\n protected>\n {code`return this.options[this.cursor] ?? null; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassMethod\n doc=\"A method to route keypress events to specific prompt actions based on the key pressed. This method maps various key combinations and keys to corresponding actions that can be handled by the prompt, such as submitting, cancelling, navigating, etc.\"\n name=\"getAction\"\n override\n protected\n parameters={[{ name: \"key\", type: \"readline.Key\" }]}\n returnType=\"string | false\">\n {code`let action = super.getAction(key);\n if (!action) {\n if (key.name === \"j\") action = \"down\";\n if (key.name === \"k\") action = \"up\";\n }\n\n return action || false; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n override\n protected>\n {code`this.moveCursor(0);\n super.reset(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to submit the prompt input\"\n name=\"submit\"\n async\n override\n protected>\n {code`if (!this.selectedOption?.disabled) {\n await super.submit();\n } else {\n this.bell();\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end of the input\"\n name=\"next\"\n protected>\n {code`this.moveCursor((this.cursor + 1) % this.options.length);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left or right by a \\`count\\` of positions\"\n name=\"moveCursor\"\n parameters={[\n {\n name: \"count\",\n type: \"number\"\n }\n ]}\n protected>\n {code`this.cursor = count;\n\n this.changeValue(this.options[count]!.value);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the first option\"\n name=\"first\"\n protected>\n {code`this.moveCursor(0);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the last option\"\n name=\"last\"\n protected>\n {code`this.moveCursor(this.options.length - 1);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the start\"\n name=\"first\"\n protected>\n {code`this.cursor = 0;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the up\"\n name=\"up\"\n protected>\n {code`if (this.cursor === 0) {\n this.moveCursor(this.options.length - 1);\n } else {\n this.moveCursor(this.cursor - 1);\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the down\"\n name=\"down\"\n protected>\n {code`if (this.cursor === this.options.length - 1) {\n this.moveCursor(0);\n } else {\n this.moveCursor(this.cursor + 1);\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"render\"\n protected>\n {code`if (this.isInitial) {\n this.output.write(cursor.hide);\n }\n\n const spacing = Math.max(...this.options.map(option => option.label?.length || 0)) + 2;\n\n const startIndex = Math.max(Math.min(this.options.length - this.optionsPerPage, this.cursor - Math.floor(this.optionsPerPage / 2)), 0);\n const endIndex = Math.min(startIndex + this.optionsPerPage, this.options.length);\n\n let output = \"\";\n if (!this.isCompleted) {\n output += \" \\\\n\";\n for (let index = startIndex; index < endIndex; index++) {\n output += \\`\\${\n this.options[index].disabled\n ? this.cursor === index\n ? colors.bold(colors.text.prompt.input.disabled(\">\"))\n : index === startIndex\n ? colors.border.app.divider.tertiary(\"↑\")\n : index === endIndex - 1\n ? colors.border.app.divider.tertiary(\"↓\")\n : \" \"\n : this.cursor === index\n ? colors.bold(colors.text.prompt.input.active(\">\"))\n : index === startIndex\n ? colors.border.app.divider.tertiary(\"↑\")\n : index === endIndex - 1\n ? colors.border.app.divider.tertiary(\"↓\")\n : \" \"\n } \\${\n this.options[index]!.disabled\n ? this.cursor === index\n ? colors.bold(colors.text.prompt.input.disabled(this.options[index]!.icon ? colors.underline(\\`\\${this.options[index]!.icon} \\`) : \"\"))\n : colors.strikethrough(colors.text.prompt.input.disabled(this.options[index]!.icon ? \\`\\${this.options[index].icon} \\` : \"\"))\n : this.cursor === index\n ? colors.bold(colors.text.prompt.input.active(this.options[index]!.icon ? colors.underline(\\`\\${this.options[index]!.icon} \\`) : \"\"))\n : colors.text.prompt.input.inactive(this.options[index]!.icon ? \\`\\${this.options[index].icon} \\` : \"\")\n }\\${\n this.options[index]!.disabled\n ? this.cursor === index\n ? colors.bold(colors.underline(colors.text.prompt.input.disabled(this.options[index].label)))\n : colors.strikethrough(colors.text.prompt.input.disabled(this.options[index]!.label))\n : this.cursor === index\n ? colors.bold(colors.underline(colors.text.prompt.input.active(this.options[index]!.label)))\n : colors.text.prompt.input.inactive(this.options[index]!.label)\n } \\${\" \".repeat(spacing - this.options[index]!.label.length - (this.options[index]!.icon ? this.options[index]!.icon.length + 1 : 0))}\\${\n this.options[index]!.description && this.cursor === index\n ? colors.italic(colors.text.prompt.description.active(this.options[index]!.description))\n : \"\"\n } \\\\n\\`;\n }\n } else {\n this.displayValue = this.selectedOption?.label || String(this.value);\n output += super.render();\n }\n\n return output; `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"A type definition for the configuration options to pass to the select prompt, which extends the base PromptConfig with additional options specific to select prompts. This type can be used when creating a select prompt using the {@link select | select prompt factory function}.\">\n <TSDocRemarks>\n {`The Select Config type includes all the properties of the base PromptConfig, such as message, description, initialValue, validate, parse, format, etc., as well as any additional properties that are specific to select prompts, such as the list of options and pagination settings.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration export name=\"SelectConfig\">\n {code`PromptFactoryConfig<string> & SelectPromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a select prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocExample>\n {`import { select, isCancel } from \"shell-shock/prompts\";\n\nasync function run() {\n const color = await select({\n message: \"What is your favorite color?\",\n description: \"Please select your favorite color\",\n validate: value => value.trim().length > 0 || \"Color cannot be empty\",\n options: [\n { label: \"Red\", value: \"red\", description: \"The color of fire and blood\" },\n { label: \"Green\", value: \"green\", description: \"The color of nature and growth\" },\n { label: \"Blue\", value: \"blue\", description: \"The color of the sky and sea\" },\n { label: \"Yellow\", value: \"yellow\", description: \"The color of sunshine and happiness\" }\n ]\n });\n if (isCancel(color)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"Your favorite color is \" + color + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the select prompt, which extends the base PromptConfig with additional options specific to select prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"select\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"SelectConfig\"\n }\n ]}\n returnType=\"Promise<string | symbol>\">\n {code`return new Promise<string | symbol>((response, reject) => {\n const prompt = new SelectPrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component that renders the declarations for the built-in numeric prompt, which allows users to input and select numeric values with various configuration options such as floating point support, precision, increment, and min/max values.\n */\nexport function NumericPromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n name=\"NumberPromptConfig\"\n extends=\"PromptConfig<number>\"\n doc=\"Configuration options for configuring a numeric prompt\">\n <InterfaceMember\n name=\"isFloat\"\n optional\n type=\"boolean\"\n doc=\"Whether the prompt should accept floating point numbers\"\n />\n <Spacing />\n <InterfaceMember\n name=\"precision\"\n optional\n type=\"number\"\n doc=\"The number of decimal places to round the input to, defaults to 2\"\n />\n <Spacing />\n <InterfaceMember\n name=\"increment\"\n optional\n type=\"number\"\n doc=\"The increment value for the number prompt, defaults to 1\"\n />\n <Spacing />\n <InterfaceMember\n name=\"min\"\n optional\n type=\"number\"\n doc=\"The minimum value for the number prompt, defaults to -Infinity\"\n />\n <Spacing />\n <InterfaceMember\n name=\"max\"\n optional\n type=\"number\"\n doc=\"The maximum value for the number prompt, defaults to Infinity\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n name=\"NumberPrompt\"\n doc=\"A prompt for selecting a number input\"\n extends=\"Prompt<number>\">\n <ClassField name=\"initialValue\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isFloat\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"precision\" protected type=\"number\">\n {code`2; `}\n </ClassField>\n <hbr />\n <ClassField name=\"increment\" protected type=\"number\">\n {code`1; `}\n </ClassField>\n <hbr />\n <ClassField name=\"min\" protected type=\"number\">\n {code`Number.NEGATIVE_INFINITY; `}\n </ClassField>\n <hbr />\n <ClassField name=\"max\" protected type=\"number\">\n {code`Number.POSITIVE_INFINITY; `}\n </ClassField>\n <hbr />\n <ClassField name=\"currentInput\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"inputTimestamp\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: NumberPromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n this.isFloat = !!config.isFloat;\n if (config.precision !== undefined) {\n this.precision = config.precision;\n }\n if (config.increment !== undefined) {\n this.increment = config.increment;\n }\n if (config.min !== undefined) {\n this.min = config.min;\n }\n if (config.max !== undefined) {\n this.max = config.max;\n }\n\n if (config.parse) {\n this.parser = config.parse.bind(this);\n } else {\n const parser = (value: string) => this.isFloat ? Math.round(Math.pow(10, this.precision) * Number.parseFloat(value)) / Math.pow(10, this.precision) : Number.parseInt(value);\n this.parser = parser.bind(this);\n }\n\n if (config.validate) {\n this.validator = config.validate.bind(this);\n } else {\n const validator = (value: number) => !Number.isNaN(value) && value >= this.min && value <= this.max;\n this.validator = validator.bind(this);\n }\n\n this.sync();\n } `}\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n protected>\n {code`super.reset();\n this.currentInput = \"\";\n `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end of the input\"\n name=\"next\"\n protected>\n {code`this.changeValue(this.initialValue);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (action && typeof (this as any)[action] === \"function\") {\n return (this as any)[action]();\n }\n\n if (char !== \"-\" && !(char === \".\" && this.isFloat) && !/[0-9]/.test(char)) {\n return this.bell();\n }\n\n if (Date.now() - this.inputTimestamp > 1000) {\n this.currentInput = \"\";\n }\n\n this.currentInput += char;\n this.inputTimestamp = Date.now();\n\n if (char === \".\") {\n return this.sync();\n }\n\n let value = Math.min(this.parser(this.currentInput), this.max);\n if (value > this.max) {\n value = this.max;\n }\n if (value < this.min) {\n value = this.min;\n }\n\n this.changeValue(value);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the up\"\n name=\"up\"\n protected>\n {code`this.currentInput = \"\";\n\n let value = this.value;\n if (this.displayValue === \"\") {\n value = this.min === Number.NEGATIVE_INFINITY ? 0 - this.increment : this.min - this.increment;\n }\n\n if (value >= this.max) {\n return this.bell();\n }\n\n this.changeValue(value + this.increment);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the down\"\n name=\"down\"\n protected>\n {code`this.currentInput = \"\";\n\n let value = this.value;\n if(this.displayValue === \"\") {\n value = this.min === Number.NEGATIVE_INFINITY ? 0 + this.increment : this.min + this.increment;\n }\n\n if (value <= this.min) {\n return this.bell();\n }\n\n this.changeValue(value - this.increment);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character backward of the cursor\"\n name=\"delete\"\n protected>\n {code`if (this.displayValue === \"\") {\n return this.bell();\n }\n\n let value = this.parser(this.displayValue.slice(0, -1));\n if (value < this.min) {\n value = this.min === Number.NEGATIVE_INFINITY ? 0 : this.min;\n }\n\n this.changeValue(value);\n this.sync(); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"An object representing the configuration options for a numeric prompt.\" />\n <TypeDeclaration name=\"NumericConfig\" export>\n {code`PromptFactoryConfig<number> & NumberPromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a numeric prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocExample>\n {`import { numeric, isCancel } from \"shell-shock/prompts\";\n\nasync function run() {\n const age = await numeric({\n message: \"How old are you?\",\n description: \"Please enter your age in years\",\n validate: value => value < 21 ? \"You must be at least 21 years old\" : true,\n });\n if (isCancel(age)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"Your age is \" + age + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the numeric prompt, which extends the base PromptFactoryConfig with additional options specific to numeric prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"numeric\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"NumericConfig\"\n }\n ]}\n returnType=\"Promise<number | symbol>\">\n {code`return new Promise<number | symbol>((response, reject) => {\n const prompt = new NumberPrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component that renders the declarations for the built-in toggle prompt, which allows users to select a boolean value (true/false) with support for custom messages for the true and false states. This prompt type can be used for scenarios where the user needs to toggle a setting on or off, such as enabling or disabling a feature. The TogglePrompt class extends the base Prompt class and implements specific logic for handling boolean input and rendering interactions.\n */\nexport function TogglePromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"TogglePromptConfig\"\n extends=\"PromptConfig<boolean>\"\n doc=\"Configuration options for configuring a boolean toggle prompt\">\n <InterfaceMember\n name=\"trueMessage\"\n optional\n type=\"string\"\n doc=\"The message for the true state of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"falseMessage\"\n optional\n type=\"string\"\n doc=\"The message for the false state of the prompt\"\n />\n <Spacing />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n export\n name=\"TogglePrompt\"\n doc=\"A prompt for selecting a boolean input\"\n extends=\"Prompt<boolean>\">\n <ClassField name=\"initialValue\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"trueMessage\" protected type=\"string\">\n {code`\"Yes\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"falseMessage\" protected type=\"string\">\n {code`\"No\"; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: TogglePromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n if (config.trueMessage) {\n this.trueMessage = config.trueMessage;\n }\n if (config.falseMessage) {\n this.falseMessage = config.falseMessage;\n }\n\n this.sync();\n } `}\n <Spacing />\n <ClassMethod\n doc=\"Update the toggle value to a checked state based on user input\"\n name=\"check\"\n protected>\n {code`if (this.value === true) {\n return this.bell();\n }\n\n this.changeValue(true);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"Update the toggle value to an unchecked state based on user input\"\n name=\"uncheck\"\n protected>\n {code`if (this.value === false) {\n return this.bell();\n }\n\n this.changeValue(false);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (action && typeof (this as any)[action] === \"function\") {\n return (this as any)[action]();\n }\n\n if (char === \" \") {\n this.changeValue(!this.value);\n } else if (char === \"1\") {\n this.changeValue(true);\n } else if (char === \"0\") {\n this.changeValue(false);\n } else {\n return this.bell();\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character backward of the cursor\"\n name=\"delete\"\n protected>\n {code`this.uncheck(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left\"\n name=\"left\"\n protected>\n {code`this.uncheck(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the right\"\n name=\"right\"\n protected>\n {code`this.check(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to down\"\n name=\"down\"\n protected>\n {code`this.uncheck(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to up\"\n name=\"up\"\n protected>\n {code`this.check(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move to the next value\"\n name=\"next\"\n protected>\n {code`this.changeValue(!this.value);\n this.sync(); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"An object representing the configuration options for a toggle prompt, which extends the base PromptFactoryConfig with additional options specific to the toggle prompt.\" />\n <TypeDeclaration name=\"ToggleConfig\" export>\n {code`PromptFactoryConfig<boolean> & TogglePromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a toggle prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocExample>\n {`import { toggle, isCancel } from \"shell-shock/prompts\";\n\nasync function run() {\n const likesIceCream = await toggle({\n message: \"Do you like ice cream?\"\n });\n if (isCancel(likesIceCream)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"You\" + (likesIceCream ? \" like ice cream\" : \" don't like ice cream\") + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the toggle prompt, which extends the base PromptFactoryConfig with additional options specific to the toggle prompt`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"toggle\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"ToggleConfig\"\n }\n ]}\n returnType=\"Promise<boolean | symbol>\">\n {code`return new Promise<boolean | symbol>((response, reject) => {\n const prompt = new TogglePrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * Declarations for a password prompt that allows users to input and edit text, with support for cursor movement, deletion, and custom masking. This prompt type can be used for various text input scenarios, such as entering a password or any other string input. The PasswordPrompt class extends the base Prompt class and implements specific logic for handling password input and editing interactions.\n */\nexport function PasswordPromptDeclaration() {\n return (\n <>\n <FunctionDeclaration\n export\n name=\"passwordMask\"\n doc=\"A built-in prompt mask function that masks input with asterisks\"\n parameters={[{ name: \"input\", type: \"string\" }]}\n returnType=\"string\">\n {code`return \"*\".repeat(input.length); `}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"An object representing the configuration options for a password prompt, which extends the base PromptFactoryConfig with additional options specific to password prompts.\" />\n <TypeDeclaration name=\"PasswordConfig\" export>\n {code`Omit<TextConfig, \"mask\">; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a password prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocRemarks>\n {code`This function creates an instance of the TextPrompt class with the provided configuration options and a custom mask function to handle password input. It sets up event listeners for state updates, submission, and cancellation to handle the prompt interactions and return the appropriate results. The password prompt allows users to input text that is masked for privacy, making it suitable for scenarios like entering passwords or sensitive information.`}\n </TSDocRemarks>\n <Spacing />\n <TSDocExample>\n {`import { password, isCancel } from \"shell-shock/prompts\";\n\nasync function run() {\n const userPassword = await password({\n message: \"Enter your password\"\n });\n if (isCancel(userPassword)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"You entered a password!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the password prompt, which extends the base PromptConfig with additional options specific to password prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"password\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"PasswordConfig\"\n }\n ]}\n returnType=\"Promise<string | symbol>\">\n {code`return text({\n ...config,\n mask: passwordMask\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A built-in prompts module for Shell Shock.\n */\nexport function PromptsBuiltin(props: PromptsBuiltinProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <BuiltinFile\n id=\"prompts\"\n description=\"A collection of prompts that allow for interactive input in command line applications.\"\n {...rest}\n imports={defu(rest.imports ?? {}, {\n \"node:events\": \"EventEmitter\",\n \"node:readline\": \"readline\"\n })}\n builtinImports={defu(rest.builtinImports ?? {}, {\n console: [\n \"erase\",\n \"beep\",\n \"cursor\",\n \"colors\",\n \"clear\",\n \"stripAnsi\",\n \"splitText\"\n ],\n env: [\"env\", \"isCI\", \"isTest\", \"isWindows\", \"isDevelopment\", \"isDebug\"]\n })}>\n <Spacing />\n <BasePromptDeclarations />\n <Spacing />\n <TextPromptDeclarations />\n <Spacing />\n <SelectPromptDeclarations />\n <Spacing />\n <NumericPromptDeclarations />\n <Spacing />\n <TogglePromptDeclarations />\n <Spacing />\n <PasswordPromptDeclaration />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkDA,SAAgBqB,yBAAyB;CACvC,MAAMC,QAAQH,UAAU;AAExB,QAAA;EAAAI,gBAEKV,OAAK;GAACW,SAAO;GAA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KACA;KACA;KACA;KACA;KACA;KACA;KACD;IACDC,KAAK;KAAC;KAAO;KAAQ;KAAU;KAAa;KAAiB;KAAS;IACvE,CAAC;;EAAA,IAAAlC,WAAA;AAAA,UAAA;IAAAF,gBACDlB,SAAO,EAAA,CAAA;IAAAkB,gBACPF,wBAAsB,EAAA,CAAA;IAAAE,gBACtBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPqB,wBAAsB,EAAA,CAAA;IAAArB,gBACtBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPuB,0BAAwB,EAAA,CAAA;IAAAvB,gBACxBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPwB,2BAAyB,EAAA,CAAA;IAAAxB,gBACzBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPyB,0BAAwB,EAAA,CAAA;IAAAzB,gBACxBlB,SAAO,EAAA,CAAA;IAAAkB,gBACP0B,2BAAyB,EAAA,CAAA;IAAA1B,gBACzBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPtB,MAAI;KAAA,IAAC2D,OAAI;AAAA,aAAEC,QAAQpC,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"prompts-builtin.mjs","names":["code","Show","splitProps","FunctionDeclaration","VarDeclaration","Spacing","BuiltinFile","ClassDeclaration","ClassField","ClassMethod","ClassPropertyGet","InterfaceDeclaration","InterfaceMember","TSDoc","TSDocExample","TSDocParam","TSDocRemarks","TSDocReturns","TypeDeclaration","useTheme","defu","BasePromptDeclarations","theme","_$createComponent","heading","children","name","parameters","type","returnType","typeParameters","default","doc","optional","abstract","isPrivateMember","_$createIntrinsic","async","icons","prompt","submitted","cancelled","error","active","TextPromptDeclarations","override","SelectPromptDeclarations","NumericPromptDeclarations","TogglePromptDeclarations","PasswordPromptDeclaration","PromptsBuiltin","props","rest","_$mergeProps","id","description","imports","builtinImports","console","env","when","Boolean"],"sources":["../../src/components/prompts-builtin.tsx"],"sourcesContent":["/* -------------------------------------------------------------------\n\n ⚡ Storm Software - Shell Shock\n\n This code was released as part of the Shell Shock project. Shell Shock\n is maintained by Storm Software under the Apache-2.0 license, and is\n free for commercial and private use. For more information, please visit\n our licensing page at https://stormsoftware.com/licenses/projects/shell-shock.\n\n Website: https://stormsoftware.com\n Repository: https://github.com/storm-software/shell-shock\n Documentation: https://docs.stormsoftware.com/projects/shell-shock\n Contact: https://stormsoftware.com/contact\n\n SPDX-License-Identifier: Apache-2.0\n\n ------------------------------------------------------------------- */\n\nimport { code, Show, splitProps } from \"@alloy-js/core\";\nimport { FunctionDeclaration, VarDeclaration } from \"@alloy-js/typescript\";\nimport { Spacing } from \"@powerlines/plugin-alloy/core/components/spacing\";\nimport type { BuiltinFileProps } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport { BuiltinFile } from \"@powerlines/plugin-alloy/typescript/components/builtin-file\";\nimport {\n ClassDeclaration,\n ClassField,\n ClassMethod,\n ClassPropertyGet\n} from \"@powerlines/plugin-alloy/typescript/components/class-declaration\";\nimport {\n InterfaceDeclaration,\n InterfaceMember\n} from \"@powerlines/plugin-alloy/typescript/components/interface-declaration\";\nimport {\n TSDoc,\n TSDocExample,\n TSDocParam,\n TSDocRemarks,\n TSDocReturns\n} from \"@powerlines/plugin-alloy/typescript/components/tsdoc\";\nimport { TypeDeclaration } from \"@powerlines/plugin-alloy/typescript/components/type-declaration\";\nimport { useTheme } from \"@shell-shock/preset-script/contexts/theme\";\nimport defu from \"defu\";\n\nexport interface PromptsBuiltinProps\n extends Omit<BuiltinFileProps, \"id\" | \"description\"> {}\n\n/**\n * A component that generates TypeScript declarations for built-in prompt types and related utilities, such as the base Prompt class, specific prompt types like TextPrompt and SelectPrompt, and utility functions for handling prompt cancellations. This component serves as a central place to define the types and interfaces for prompts used in the Shell Shock CLI, providing a consistent API for creating and managing prompts throughout the application.\n */\nexport function BasePromptDeclarations() {\n const theme = useTheme();\n\n return (\n <>\n <TSDoc heading=\"A utility function to pause execution for a specified duration, which can be used in prompt interactions to create delays or timeouts. The function returns a promise that resolves after the specified duration in milliseconds, allowing it to be used with async/await syntax for easier handling of asynchronous prompt logic.\">\n <TSDocParam name=\"duration\">\n {`The duration to sleep in milliseconds.`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves after the specified duration, allowing for asynchronous delays in prompt interactions.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n export\n name=\"sleep\"\n parameters={[{ name: \"duration\", type: \"number\" }]}\n returnType=\"Promise<void>\">{code`return new Promise((resolve) => setTimeout(resolve, duration)); `}</FunctionDeclaration>\n <Spacing />\n <TypeDeclaration\n export\n name=\"PromptParser\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}\n doc=\"A type for a custom prompt input parser, which can be used to create custom input styles for prompts. The function should return the parsed value for the given input string.\">\n {code`(this: Prompt<TValue>, input: string) => TValue; `}\n </TypeDeclaration>\n <Spacing />\n <TypeDeclaration\n export\n name=\"PromptFormatter\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}\n doc=\"A type for a custom prompt input formatter, which can be used to create custom display styles for prompts. The function should return the formatted string to display for the given input value.\">\n {code`(this: Prompt<TValue>, input: TValue) => string; `}\n </TypeDeclaration>\n <Spacing />\n <FunctionDeclaration\n export\n name=\"noMask\"\n doc=\"A built-in prompt mask function that just returns the input as is, making it invisible\"\n parameters={[{ name: \"input\", type: \"string\" }]}\n returnType=\"string\">\n {code`return input; `}\n </FunctionDeclaration>\n <Spacing />\n <FunctionDeclaration\n export\n name=\"invisibleMask\"\n doc=\"A built-in prompt mask function that makes input invisible\"\n parameters={[{ name: \"input\", type: \"string\" }]}\n returnType=\"string\">\n {code`return \" \".repeat(input.length); `}\n </FunctionDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"PromptState\"\n doc=\"The current state of a prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"value\"\n type=\"TValue\"\n doc=\"The current value of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isError\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is in an error state\"\n />\n <Spacing />\n <InterfaceMember\n name=\"errorMessage\"\n optional\n type=\"string\"\n doc=\"If the prompt is in an error state, this will contain the error message to display\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isSubmitted\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is submitted\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isCancelled\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is cancelled\"\n />\n <Spacing />\n <InterfaceMember\n name=\"isCompleted\"\n type=\"boolean\"\n doc=\"Indicates whether the prompt is completed, which can be used to indicate that the prompt interaction is finished regardless of whether it was submitted or cancelled\"\n />\n <Spacing />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"PromptConfig\"\n doc=\"Configuration options for configuring a prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"input\"\n optional\n type=\"NodeJS.ReadStream\"\n doc=\"The readable stream to use for prompt input, defaults to process.stdin\"\n />\n <Spacing />\n <InterfaceMember\n name=\"output\"\n optional\n type=\"NodeJS.WriteStream\"\n doc=\"The writable stream to use for prompt output, defaults to process.stdout\"\n />\n <Spacing />\n <InterfaceMember\n name=\"message\"\n type=\"string\"\n doc=\"The prompt message to display\"\n />\n <Spacing />\n <InterfaceMember\n name=\"description\"\n optional\n type=\"string\"\n doc=\"The prompt description message to display\"\n />\n <Spacing />\n <InterfaceMember\n name=\"initialValue\"\n optional\n type=\"TValue\"\n doc=\"The initial value of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"validate\"\n optional\n type=\"(value: TValue) => boolean | string | null | undefined | Promise<boolean | string | null | undefined>\"\n doc=\"A validation function that returns true if the input is valid, false or a string error message if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"parse\"\n optional\n type=\"PromptParser<TValue>\"\n doc=\"A function that parses the input value and returns the parsed result or throws an error if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"format\"\n optional\n type=\"PromptFormatter<TValue>\"\n doc=\"A function that formats the input value and returns the formatted result or throws an error if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"mask\"\n optional\n type=\"(input: string) => string\"\n doc=\"A function that masks the input value and returns the masked result or throws an error if the input is invalid\"\n />\n <Spacing />\n <InterfaceMember\n name=\"defaultErrorMessage\"\n optional\n type=\"string\"\n doc=\"The default error message to display when validation fails\"\n />\n <Spacing />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n abstract\n name=\"Prompt\"\n doc=\"Base prompt class that other prompt types can extend from\"\n extends=\"EventEmitter\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <ClassField name=\"readline\" isPrivateMember type=\"readline.Interface\" />\n <hbr />\n <ClassField name=\"value\" isPrivateMember optional type=\"TValue\" />\n <hbr />\n <ClassField name=\"isClosed\" isPrivateMember type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"initialValue\" abstract protected type=\"TValue\" />\n <hbr />\n <ClassField name=\"input\" protected type=\"NodeJS.ReadStream\">\n {code`process.stdin; `}\n </ClassField>\n <hbr />\n <ClassField name=\"output\" protected type=\"NodeJS.WriteStream\">\n {code`process.stdout; `}\n </ClassField>\n <hbr />\n <ClassField name=\"message\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"description\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"errorMessage\" protected type=\"string | null\">\n {code`null; `}\n </ClassField>\n <hbr />\n <ClassField name=\"defaultErrorMessage\" protected type=\"string\">\n {code`\"Invalid value provided\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isSubmitted\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isCancelled\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isInitial\" type=\"boolean\">\n {code`true; `}\n </ClassField>\n <hbr />\n <ClassField name=\"consoleOutput\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"consoleStatus\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"displayValue\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField\n name=\"validator\"\n protected\n type=\"(value: TValue) => boolean | string | null | undefined | Promise<boolean | string | null | undefined>\">\n {code`() => true; `}\n </ClassField>\n <hbr />\n <ClassField name=\"parser\" protected type=\"PromptParser<TValue>\">\n {code`(value: string) => value as TValue; `}\n </ClassField>\n <hbr />\n <ClassField name=\"formatter\" protected type=\"PromptFormatter<TValue>\">\n {code`(value: TValue) => String(value); `}\n </ClassField>\n <hbr />\n <ClassField name=\"mask\" protected type=\"(input: string) => string\">\n {code`noMask; `}\n </ClassField>\n <hbr />\n <ClassField name=\"cursor\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <hbr />\n <ClassField name=\"cursorOffset\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <Spacing />\n {code`constructor(protected config: PromptConfig<TValue>) {\n super();\n\n if (config.input) {\n this.input = config.input;\n }\n if (config.output) {\n this.output = config.output;\n }\n if (config.defaultErrorMessage) {\n this.defaultErrorMessage = config.defaultErrorMessage;\n }\n if (config.description) {\n this.description = config.description;\n }\n if (config.validate) {\n this.validator = config.validate;\n }\n if (config.parse) {\n this.parser = config.parse.bind(this);\n }\n if (config.format) {\n this.formatter = config.format.bind(this);\n }\n\n this.message = config.message;\n\n this.#readline = readline.createInterface({\n input: this.input,\n escapeCodeTimeout: 50\n });\n readline.emitKeypressEvents(this.input, this.#readline);\n\n if (this.input.isTTY) {\n this.input.setRawMode(true);\n }\n\n this.input.on(\"keypress\", this.onKeypress.bind(this));\n } `}\n <Spacing />\n <ClassPropertyGet\n public\n name=\"value\"\n type=\"TValue\"\n doc=\"A getter for the prompt value that returns the current value or the initial value if the current value is not set\">\n {code`return this.#value || this.initialValue; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet public name=\"isError\" type=\"boolean\">\n {code`return !!this.errorMessage; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"isSelect\" type=\"boolean\">\n {code`return false; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"isCompleted\" type=\"boolean\">\n {code`return this.isCancelled || this.isSubmitted; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"isPlaceholder\" type=\"boolean\">\n {code`return this.config.initialValue !== undefined && this.displayValue === this.formatter(this.initialValue); `}\n </ClassPropertyGet>\n <Spacing />\n <ClassPropertyGet protected name=\"status\" type=\"string\">\n {code`return this.isCompleted ? \"\" : \\` \\\\n \\${\n colors.italic(\n this.isError\n ? colors.text.prompt.description.error(splitText(this.errorMessage, \"3/4\").join(\"\\\\n\"))\n : this.description\n ? colors.text.prompt.description.active(splitText(this.description, \"3/4\").join(\"\\\\n\"))\n : \"\"\n )\n }\\`; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassMethod\n doc=\"A method to change the prompt value, which also updates the display value and fires a state update event. This method can be called by subclasses whenever the prompt value needs to be updated based on user input or other interactions.\"\n name=\"changeValue\"\n protected\n parameters={[{ name: \"value\", type: \"TValue\" }]}>\n {code`let updatedValue = value;\n if (value === undefined || value === \"\") {\n updatedValue = this.initialValue;\n } else {\n updatedValue = value;\n }\n\n this.displayValue = this.formatter(updatedValue);\n this.#value = updatedValue;\n setTimeout(() => {\n Promise.resolve(this.validate(updatedValue)).then(() => this.sync());\n }, 0);\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to emit the current state\"\n name=\"sync\"\n protected>\n {code`this.emit(\"state\", {\n value: this.value,\n errorMessage: this.errorMessage,\n isError: this.isError,\n isSubmitted: this.isSubmitted,\n isCancelled: this.isCancelled,\n isCompleted: this.isCompleted\n });\n this.invokeRender(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod doc=\"A method to ring the bell\" name=\"bell\" protected>\n {code`this.output.write(beep); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"onKeypress\"\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`if (this.#isClosed) {\n return;\n }\n\n return this.keypress(char, key); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (!action) {\n this.bell();\n } else if (typeof (this as any)[action] === \"function\") {\n (this as any)[action](key);\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to close the prompt and clean up resources, which also emits a submit or cancel event based on the prompt state. This method should be called when the prompt interaction is finished and the prompt needs to be closed.\"\n name=\"close\"\n async\n protected>\n {code`this.output.write(cursor.show);\n this.input.removeListener(\"keypress\", this.onKeypress);\n\n if (this.input.isTTY) {\n this.input.setRawMode(false);\n }\n\n this.#readline.close();\n this.emit(this.isSubmitted ? \"submit\" : \"cancel\", this.value);\n this.#isClosed = true; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to validate the prompt input using the provided validator function, which updates the error message and error state based on the validation result. This method is called whenever the prompt value changes and needs to be validated.\"\n name=\"validate\"\n async\n protected\n parameters={[\n {\n name: \"value\",\n type: \"TValue\"\n }\n ]}>\n {code`let result = await this.validator(value);\n if (typeof result === \"string\") {\n this.errorMessage = result;\n } else if (typeof result === \"boolean\") {\n this.errorMessage = result ? null : this.defaultErrorMessage;\n } else {\n this.errorMessage = null;\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to route keypress events to specific prompt actions based on the key pressed. This method maps various key combinations and keys to corresponding actions that can be handled by the prompt, such as submitting, cancelling, navigating, etc.\"\n name=\"getAction\"\n protected\n parameters={[{ name: \"key\", type: \"readline.Key\" }]}\n returnType=\"string | false\">\n {code`if (key.meta && key.name !== \"escape\") {\n return false;\n }\n\n let action: string | undefined;\n if (key.ctrl) {\n if (key.name === \"a\") action = \"first\";\n if (key.name === \"c\") action = \"cancel\";\n if (key.name === \"d\") action = \"cancel\";\n if (key.name === \"e\") action = \"last\";\n if (key.name === \"g\") action = \"reset\";\n }\n\n if (key.name === \"return\") action = \"submit\";\n if (key.name === \"enter\") action = \"submit\";\n if (key.name === \"backspace\") action = \"delete\";\n if (key.name === \"delete\") action = \"deleteForward\";\n if (key.name === \"cancel\") action = \"cancel\";\n if (key.name === \"escape\") action = \"cancel\";\n if (key.name === \"tab\") action = \"next\";\n if (key.name === \"pagedown\") action = \"nextPage\";\n if (key.name === \"pageup\") action = \"prevPage\";\n if (key.name === \"home\") action = \"home\";\n if (key.name === \"end\") action = \"end\";\n\n if (key.name === \"up\") action = \"up\";\n if (key.name === \"down\") action = \"down\";\n if (key.name === \"right\") action = \"right\";\n if (key.name === \"left\") action = \"left\";\n\n return action || false; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n protected>\n {code`this.changeValue(this.initialValue);\n this.cursorOffset = 0;\n\n this.errorMessage = null;\n this.isCancelled = false;\n this.isSubmitted = false;\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to cancel the prompt input\"\n name=\"cancel\"\n protected>\n {code`this.errorMessage = null;\n this.isCancelled = true;\n this.isSubmitted = false;\n\n this.sync();\n this.output.write(\"\\\\n\");\n this.close(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to submit the prompt input\"\n name=\"submit\"\n async\n protected>\n {code`this.cursorOffset = 0;\n this.cursor = this.displayValue.length;\n\n await this.validate(this.value);\n if (this.isError) {\n this.sync();\n this.bell();\n } else {\n this.isSubmitted = true;\n this.isCancelled = false;\n\n this.sync();\n this.output.write(\"\\\\n\");\n this.close();\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"invokeRender\"\n protected>\n {code`if (this.#isClosed) {\n return;\n }\n\n if (!this.isInitial) {\n if (this.consoleStatus) {\n this.output.write(cursor.down(stripAnsi(this.consoleStatus).split(/\\\\r?\\\\n/).map(line => Math.ceil(line.length / this.output.columns)).reduce((a, b) => a + b) - 1) + clear(this.consoleStatus, this.output.columns));\n }\n\n this.output.write(clear(this.consoleOutput, this.output.columns));\n }\n\n this.consoleOutput = \\` \\${\n this.isSubmitted\n ? colors.text.prompt.icon.submitted(\"${\n theme.icons.prompt.submitted\n }\")\n : this.isCancelled\n ? colors.text.prompt.icon.cancelled(\"${\n theme.icons.prompt.cancelled\n }\")\n : this.isError\n ? colors.text.prompt.icon.error(\"${theme.icons.prompt.error}\")\n : colors.text.prompt.icon.active(\"${theme.icons.prompt.active}\")\n } \\${\n this.isCompleted\n ? colors.text.prompt.message.submitted(this.message)\n : colors.bold(colors.text.prompt.message.active(this.message))\n } \\${\n colors.border.app.divider.tertiary(\n this.isCompleted\n ? (process.platform === \"win32\" ? \"...\" : \"…\")\n : (process.platform === \"win32\" ? \"»\" : \"›\")\n )\n } \\`;\n this.consoleOutput += this.render();\n\n if (this.isInitial) {\n this.isInitial = false;\n }\n\n this.output.write(erase.line + cursor.to(0) + this.consoleOutput + (this.status ? cursor.save + this.status + cursor.restore + cursor.move(this.cursorOffset, 0) : cursor.save));\n this.consoleStatus = this.status; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"render\"\n protected\n returnType=\"string\">\n {code`return this.isPlaceholder\n ? colors.text.prompt.input.disabled(this.displayValue)\n : this.isError\n ? colors.text.prompt.input.error(this.displayValue)\n : this.isSubmitted\n ? colors.text.prompt.input.submitted(this.displayValue)\n : this.isCancelled\n ? colors.text.prompt.input.cancelled(this.displayValue)\n : colors.bold(colors.text.prompt.input.active(this.displayValue)); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"PromptFactoryConfig\"\n extends=\"PromptConfig<TValue>\"\n doc=\"Configuration options for creating a prompt with a prompt factory function\"\n typeParameters={[{ name: \"TValue\", default: \"string\" }]}>\n <InterfaceMember\n name=\"onState\"\n optional\n type=\"(state: PromptState<TValue>) => any\"\n doc=\"A function that is called when the prompt state changes, useful for updating the prompt message or other properties dynamically\"\n />\n <Spacing />\n <InterfaceMember\n name=\"onSubmit\"\n optional\n type=\"(value: TValue) => any\"\n doc=\"A function that is called when the prompt is submitted, useful for handling the submitted value or performing actions based on the prompt state\"\n />\n <Spacing />\n <InterfaceMember\n name=\"onCancel\"\n optional\n type=\"(event: any) => any\"\n doc=\"A function that is called when the prompt is canceled, useful for handling the canceled value or performing actions based on the prompt state\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <VarDeclaration\n export\n name=\"CANCEL_SYMBOL\"\n doc=\"A unique symbol used to indicate that a prompt was cancelled, which can be returned from a prompt function to signal that the prompt interaction should be cancelled and any pending promises should be rejected with this symbol. This allows for a consistent way to handle prompt cancellations across different prompt types and interactions.\">\n {code`Symbol(\"shell-shock:prompts:cancel\"); `}\n </VarDeclaration>\n <Spacing />\n <TSDoc heading=\"A utility function to check if a given value is the {@link CANCEL_SYMBOL | cancel symbol}, which can be used to determine if a prompt interaction was cancelled based on the value returned from a prompt factory function. This function checks if the provided value is strictly equal to the {@link CANCEL_SYMBOL | CANCEL_SYMBOL}, allowing for a consistent way to handle prompt cancellations across different prompt types and interactions.\">\n <TSDocParam name=\"value\">{`The value to check.`}</TSDocParam>\n <TSDocReturns>\n {`A boolean indicating whether the provided value is the {@link CANCEL_SYMBOL | cancel symbol}, which can be used to determine if a prompt interaction was cancelled.`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"isCancel\"\n export\n parameters={[\n {\n name: \"value\",\n type: \"any\"\n }\n ]}\n returnType=\"value is typeof CANCEL_SYMBOL\">\n {code`return value === CANCEL_SYMBOL; `}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * Declarations for a text-based prompt that allows users to input and edit text, with support for cursor movement, deletion, and custom masking. This prompt type can be used for various text input scenarios, such as entering a username, password, or any other string input. The TextPrompt class extends the base Prompt class and implements specific logic for handling text input and editing interactions.\n */\nexport function TextPromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n name=\"StringPromptConfig\"\n extends=\"PromptConfig<string>\"\n doc=\"Configuration options for configuring a text-based prompt\">\n <InterfaceMember\n name=\"initialValue\"\n optional\n type=\"string\"\n doc=\"The initial value of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"mask\"\n optional\n type=\"(input: string) => string\"\n doc=\"A function that masks the input value and returns the masked result\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n name=\"StringPrompt\"\n doc=\"A prompt for text input\"\n extends=\"Prompt<string>\">\n <ClassField name=\"isInvalid\" isPrivateMember type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"initialValue\" protected override type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: StringPromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n this.cursor = 0;\n this.sync();\n } `}\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n override\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (action && typeof (this as any)[action] === \"function\") {\n return (this as any)[action]();\n }\n\n if (!char || char.length === 0) {\n return this.bell();\n }\n\n const value = \\`\\${this.value.slice(0, this.cursor)}\\${char}\\${this.value.slice(this.cursor)}\\`;\n this.#isInvalid = false;\n this.cursor = this.isPlaceholder ? 0 : this.value.slice(0, this.cursor).length + 1;\n\n this.changeValue(value);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n override\n protected>\n {code`this.#isInvalid = false;\n this.cursor = Number(!!this.initialValue);\n super.reset(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to cancel the prompt input\"\n name=\"cancel\"\n override\n protected>\n {code`this.#isInvalid = false;\n super.cancel(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to validate the prompt input\"\n name=\"validate\"\n override\n async\n protected>\n {code`await super.validate(this.value);\n this.#isInvalid = this.isError; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end of the input\"\n name=\"next\"\n protected>\n {code`if (!this.isPlaceholder) {\n return this.bell();\n }\n\n this.changeValue(this.initialValue);\n this.cursor = this.displayValue.length;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left or right by a \\`count\\` of positions\"\n name=\"moveCursor\"\n parameters={[\n {\n name: \"count\",\n type: \"number\"\n }\n ]}\n protected>\n {code`if (this.isPlaceholder) {\n return;\n }\n\n this.cursor = this.cursor + count;\n this.cursorOffset += count; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character backward of the cursor\"\n name=\"delete\"\n protected>\n {code`if (this.isCursorAtStart()) {\n return this.bell();\n }\n\n this.changeValue(\\`\\${this.value.slice(0, this.cursor - 1)}\\${this.value.slice(this.cursor)}\\`);\n this.#isInvalid = false;\n\n if (this.isCursorAtStart()) {\n this.cursorOffset = 0\n } else {\n this.cursorOffset++;\n this.moveCursor(-1);\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character forward of the cursor\"\n name=\"deleteForward\"\n protected>\n {code`if (this.cursor >= this.displayValue.length || this.isPlaceholder) {\n return this.bell();\n }\n\n this.changeValue(\\`\\${\n this.value.slice(0, this.cursor)\n }\\${\n this.value.slice(this.cursor + 1)\n }\\`);\n this.#isInvalid = false;\n\n if (this.isCursorAtEnd()) {\n this.cursorOffset = 0;\n } else {\n this.cursorOffset++;\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the start\"\n name=\"first\"\n protected>\n {code`this.cursor = 0;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end\"\n name=\"last\"\n protected>\n {code`this.cursor = this.value.length;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left\"\n name=\"left\"\n protected>\n {code`if (this.cursor <= 0 || this.isPlaceholder) {\n return this.bell();\n }\n\n this.moveCursor(-1);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the right\"\n name=\"right\"\n protected>\n {code`if (this.cursor >= this.displayValue.length || this.isPlaceholder) {\n return this.bell();\n }\n\n this.moveCursor(1);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to check if the cursor is at the start\"\n name=\"isCursorAtStart\"\n protected>\n {code`return this.cursor === 0 || (this.isPlaceholder && this.cursor === 1); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to check if the cursor is at the end\"\n name=\"isCursorAtEnd\"\n protected>\n {code`return this.cursor === this.displayValue.length || (this.isPlaceholder && this.cursor === this.displayValue.length + 1); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"render\"\n override\n protected\n returnType=\"string\">\n {code`return this.isPlaceholder\n ? colors.text.prompt.input.disabled(this.displayValue)\n : this.#isInvalid\n ? colors.text.prompt.input.error(this.displayValue)\n : this.isSubmitted\n ? colors.text.prompt.input.submitted(this.displayValue)\n : this.isCancelled\n ? colors.text.prompt.input.cancelled(this.displayValue)\n : colors.bold(colors.text.prompt.input.active(this.displayValue)); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"A type definition for the configuration options to pass to the text prompt, which extends the base PromptConfig with additional options specific to text prompts. This type can be used when creating a text prompt using the {@link text | text prompt factory function} or when manually creating an instance of the TextPrompt class. The TextConfig type includes all the properties of the base PromptConfig, such as message, description, initialValue, validate, parse, format, mask, etc., as well as any additional properties that are specific to text prompts.\" />\n <TypeDeclaration name=\"TextConfig\" export>\n {code`PromptFactoryConfig<string> & StringPromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a text prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocRemarks>\n {code`This function can be used to easily create and run a text prompt without needing to manually create an instance of the TextPrompt class and handle its events. The function accepts a configuration object that extends the base PromptFactoryConfig with additional options specific to text prompts, such as the initial value and mask function. The returned promise allows for easy handling of the prompt result using async/await syntax or traditional promise chaining.`}\n </TSDocRemarks>\n <TSDocExample>\n {`import { text, isCancel } from \"shell-shock:prompts\";\n\nasync function run() {\n const name = await text({\n message: \"What is your name?\",\n description: \"Please enter your full name\",\n validate: value => value.trim().length > 0 || \"Name cannot be empty\"\n });\n if (isCancel(name)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"Hello, \" + name + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the text prompt, which extends the base PromptConfig with additional options specific to text prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"text\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"TextConfig\"\n }\n ]}\n returnType=\"Promise<string | symbol>\">\n {code`return new Promise<string | symbol>((response, reject) => {\n const prompt = new StringPrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * Declarations for a select prompt that allows users to choose from a list of options, with support for pagination, option descriptions, and disabled options. This prompt type can be used for scenarios where the user needs to select one option from a predefined list, such as choosing a color, selecting a file, or picking an item from a menu. The SelectPrompt class extends the base Prompt class and implements specific logic for handling option selection and navigation interactions.\n */\nexport function SelectPromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n name=\"PromptOptionConfig\"\n doc=\"Configuration for an option the user can select from the select prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"label\"\n optional\n type=\"string\"\n doc=\"The message label for the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"icon\"\n optional\n type=\"string\"\n doc=\"An icon for the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"value\"\n type=\"TValue\"\n doc=\"The value of the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"description\"\n optional\n type=\"string\"\n doc=\"The description of the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"selected\"\n optional\n type=\"boolean\"\n doc=\"Whether the option is selected\"\n />\n <Spacing />\n <InterfaceMember\n name=\"disabled\"\n optional\n type=\"boolean\"\n doc=\"Whether the option is disabled\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n export\n name=\"PromptOption\"\n extends=\"PromptOptionConfig<TValue>\"\n doc=\"An option the user can select from the select prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"label\"\n type=\"string\"\n doc=\"The message label for the option\"\n />\n <InterfaceMember\n name=\"index\"\n type=\"number\"\n doc=\"The index of the option\"\n />\n <Spacing />\n <InterfaceMember\n name=\"selected\"\n type=\"boolean\"\n doc=\"Whether the option is selected\"\n />\n <Spacing />\n <InterfaceMember\n name=\"disabled\"\n type=\"boolean\"\n doc=\"Whether the option is disabled\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <InterfaceDeclaration\n name=\"SelectPromptConfig\"\n extends=\"PromptConfig<TValue>\"\n doc=\"An options object for configuring a select prompt\"\n typeParameters={[\n {\n name: \"TValue\",\n default: \"string\"\n }\n ]}>\n <InterfaceMember\n name=\"hint\"\n optional\n type=\"string\"\n doc=\"A hint to display to the user\"\n />\n <Spacing />\n <InterfaceMember\n name=\"options\"\n type=\"Array<string | PromptOptionConfig<TValue>>\"\n doc=\"The options available for the select prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"optionsPerPage\"\n optional\n type=\"number\"\n doc=\"The number of options to display per page, defaults to 8\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n name=\"SelectPrompt\"\n doc=\"A prompt for selecting an option from a list\"\n extends=\"Prompt<TValue>\"\n typeParameters={[{ name: \"TValue\", default: \"string\" }]}>\n <ClassField name=\"initialValue\" protected override type=\"TValue\" />\n <hbr />\n <ClassField name=\"optionsPerPage\" protected type=\"number\">\n {code`8; `}\n </ClassField>\n <hbr />\n <ClassField name=\"options\" protected type=\"PromptOption<TValue>[]\">\n {code`[]; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: SelectPromptConfig<TValue>) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue as TValue;\n } else {\n this.initialValue = undefined as unknown as TValue;\n }\n\n this.options = config.options.map((opt, index) => {\n let option = {} as Partial<PromptOption<TValue>>;\n if (typeof opt === \"string\") {\n option = { label: opt, value: opt as TValue, selected: false, disabled: false };\n } else if (typeof opt === \"object\") {\n option = opt;\n } else {\n throw new Error(\\`Invalid option provided to SelectPrompt at index #\\${index}\\`);\n }\n\n return {\n label: String(option.value) || \"\",\n ...option,\n description: option.description,\n selected: !!option.selected || (this.initialValue !== undefined && option.value === this.initialValue),\n disabled: !!option.disabled\n } as PromptOption<TValue>;\n }).sort((a, b) => a.label.localeCompare(b.label)).map((option, index) => ({ ...option, index }));\n\n const selected = this.options.findIndex(option => option.selected);\n if (selected > -1) {\n this.cursor = selected;\n if (this.options[this.cursor]) {\n this.initialValue = this.options[this.cursor].value as TValue;\n }\n }\n\n if (this.initialValue === undefined && this.options.length > 0 && this.options[0]) {\n this.initialValue = this.options[0].value as TValue;\n }\n\n if (config.optionsPerPage) {\n this.optionsPerPage = config.optionsPerPage;\n }\n\n this.sync();\n } `}\n <Spacing />\n <ClassPropertyGet\n doc=\"Returns the currently selected option\"\n name=\"selectedOption\"\n type=\"PromptOption<TValue> | null\"\n protected>\n {code`return this.options.find(option => option.selected) ?? null; `}\n </ClassPropertyGet>\n <Spacing />\n <ClassMethod\n doc=\"A method to route keypress events to specific prompt actions based on the key pressed. This method maps various key combinations and keys to corresponding actions that can be handled by the prompt, such as submitting, cancelling, navigating, etc.\"\n name=\"getAction\"\n override\n protected\n parameters={[{ name: \"key\", type: \"readline.Key\" }]}\n returnType=\"string | false\">\n {code`let action = super.getAction(key);\n if (!action) {\n if (key.name === \"j\") action = \"down\";\n if (key.name === \"k\") action = \"up\";\n }\n\n return action || false; `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n override\n protected>\n {code`this.moveCursor(0);\n super.reset(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to submit the prompt input\"\n name=\"submit\"\n async\n override\n protected>\n {code`if (!this.selectedOption?.disabled) {\n await super.submit();\n } else {\n this.bell();\n } `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end of the input\"\n name=\"next\"\n protected>\n {code`this.moveCursor((this.cursor + 1) % this.options.length);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left or right by a \\`count\\` of positions\"\n name=\"moveCursor\"\n parameters={[\n {\n name: \"count\",\n type: \"number\"\n }\n ]}\n protected>\n {code`this.cursor = count;\n\n this.changeValue(this.options[count]!.value);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the first option\"\n name=\"first\"\n protected>\n {code`this.moveCursor(0);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the last option\"\n name=\"last\"\n protected>\n {code`this.moveCursor(this.options.length - 1);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the start\"\n name=\"first\"\n protected>\n {code`this.cursor = 0;\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the up\"\n name=\"up\"\n protected>\n {code`if (this.cursor === 0) {\n this.moveCursor(this.options.length - 1);\n } else {\n this.moveCursor(this.cursor - 1);\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the down\"\n name=\"down\"\n protected>\n {code`if (this.cursor === this.options.length - 1) {\n this.moveCursor(0);\n } else {\n this.moveCursor(this.cursor + 1);\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to render the prompt\"\n name=\"render\"\n override\n protected>\n {code`if (this.isInitial) {\n this.output.write(cursor.hide);\n }\n\n const spacing = Math.max(...this.options.map(option => option.label?.length || 0)) + 2;\n\n const startIndex = Math.max(Math.min(this.options.length - this.optionsPerPage, this.cursor - Math.floor(this.optionsPerPage / 2)), 0);\n const endIndex = Math.min(startIndex + this.optionsPerPage, this.options.length);\n\n let output = \"\";\n if (!this.isCompleted) {\n output += \" \\\\n\";\n for (let index = startIndex; index < endIndex; index++) {\n output += \\`\\${\n this.options[index].disabled\n ? this.cursor === index\n ? colors.bold(colors.text.prompt.input.disabled(\">\"))\n : index === startIndex\n ? colors.border.app.divider.tertiary(\"↑\")\n : index === endIndex - 1\n ? colors.border.app.divider.tertiary(\"↓\")\n : \" \"\n : this.cursor === index\n ? colors.bold(colors.text.prompt.input.active(\">\"))\n : index === startIndex\n ? colors.border.app.divider.tertiary(\"↑\")\n : index === endIndex - 1\n ? colors.border.app.divider.tertiary(\"↓\")\n : \" \"\n } \\${\n this.options[index]!.disabled\n ? this.cursor === index\n ? colors.bold(colors.text.prompt.input.disabled(this.options[index]!.icon ? colors.underline(\\`\\${this.options[index]!.icon} \\`) : \"\"))\n : colors.strikethrough(colors.text.prompt.input.disabled(this.options[index]!.icon ? \\`\\${this.options[index].icon} \\` : \"\"))\n : this.cursor === index\n ? colors.bold(colors.text.prompt.input.active(this.options[index]!.icon ? colors.underline(\\`\\${this.options[index]!.icon} \\`) : \"\"))\n : colors.text.prompt.input.inactive(this.options[index]!.icon ? \\`\\${this.options[index].icon} \\` : \"\")\n }\\${\n this.options[index]!.disabled\n ? this.cursor === index\n ? colors.bold(colors.underline(colors.text.prompt.input.disabled(this.options[index].label)))\n : colors.strikethrough(colors.text.prompt.input.disabled(this.options[index]!.label))\n : this.cursor === index\n ? colors.bold(colors.underline(colors.text.prompt.input.active(this.options[index]!.label)))\n : colors.text.prompt.input.inactive(this.options[index]!.label)\n } \\${\" \".repeat(spacing - this.options[index]!.label.length - (this.options[index]!.icon ? this.options[index]!.icon!.length + 1 : 0))}\\${\n this.options[index]!.description && this.cursor === index\n ? colors.italic(colors.text.prompt.description.active(this.options[index]!.description))\n : \"\"\n } \\\\n\\`;\n }\n } else {\n this.displayValue = this.selectedOption?.label || String(this.value);\n output += super.render();\n }\n\n return output; `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"A type definition for the configuration options to pass to the select prompt, which extends the base PromptConfig with additional options specific to select prompts. This type can be used when creating a select prompt using the {@link select | select prompt factory function}.\">\n <TSDocRemarks>\n {`The Select Config type includes all the properties of the base PromptConfig, such as message, description, initialValue, validate, parse, format, etc., as well as any additional properties that are specific to select prompts, such as the list of options and pagination settings.`}\n </TSDocRemarks>\n </TSDoc>\n <TypeDeclaration export name=\"SelectConfig\">\n {code`PromptFactoryConfig<string> & SelectPromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a select prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocExample>\n {`import { select, isCancel } from \"shell-shock:prompts\";\n\nasync function run() {\n const color = await select({\n message: \"What is your favorite color?\",\n description: \"Please select your favorite color\",\n validate: value => value.trim().length > 0 || \"Color cannot be empty\",\n options: [\n { label: \"Red\", value: \"red\", description: \"The color of fire and blood\" },\n { label: \"Green\", value: \"green\", description: \"The color of nature and growth\" },\n { label: \"Blue\", value: \"blue\", description: \"The color of the sky and sea\" },\n { label: \"Yellow\", value: \"yellow\", description: \"The color of sunshine and happiness\" }\n ]\n });\n if (isCancel(color)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"Your favorite color is \" + color + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the select prompt, which extends the base PromptConfig with additional options specific to select prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"select\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"SelectConfig\"\n }\n ]}\n returnType=\"Promise<string | symbol>\">\n {code`return new Promise<string | symbol>((response, reject) => {\n const prompt = new SelectPrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component that renders the declarations for the built-in numeric prompt, which allows users to input and select numeric values with various configuration options such as floating point support, precision, increment, and min/max values.\n */\nexport function NumericPromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n name=\"NumberPromptConfig\"\n extends=\"PromptConfig<number>\"\n doc=\"Configuration options for configuring a numeric prompt\">\n <InterfaceMember\n name=\"isFloat\"\n optional\n type=\"boolean\"\n doc=\"Whether the prompt should accept floating point numbers\"\n />\n <Spacing />\n <InterfaceMember\n name=\"precision\"\n optional\n type=\"number\"\n doc=\"The number of decimal places to round the input to, defaults to 2\"\n />\n <Spacing />\n <InterfaceMember\n name=\"increment\"\n optional\n type=\"number\"\n doc=\"The increment value for the number prompt, defaults to 1\"\n />\n <Spacing />\n <InterfaceMember\n name=\"min\"\n optional\n type=\"number\"\n doc=\"The minimum value for the number prompt, defaults to -Infinity\"\n />\n <Spacing />\n <InterfaceMember\n name=\"max\"\n optional\n type=\"number\"\n doc=\"The maximum value for the number prompt, defaults to Infinity\"\n />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n name=\"NumberPrompt\"\n doc=\"A prompt for selecting a number input\"\n extends=\"Prompt<number>\">\n <ClassField name=\"initialValue\" protected override type=\"number\">\n {code`0; `}\n </ClassField>\n <hbr />\n <ClassField name=\"isFloat\" protected type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"precision\" protected type=\"number\">\n {code`2; `}\n </ClassField>\n <hbr />\n <ClassField name=\"increment\" protected type=\"number\">\n {code`1; `}\n </ClassField>\n <hbr />\n <ClassField name=\"min\" protected type=\"number\">\n {code`Number.NEGATIVE_INFINITY; `}\n </ClassField>\n <hbr />\n <ClassField name=\"max\" protected type=\"number\">\n {code`Number.POSITIVE_INFINITY; `}\n </ClassField>\n <hbr />\n <ClassField name=\"currentInput\" protected type=\"string\">\n {code`\"\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"inputTimestamp\" protected type=\"number\">\n {code`0; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: NumberPromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n this.isFloat = !!config.isFloat;\n if (config.precision !== undefined) {\n this.precision = config.precision;\n }\n if (config.increment !== undefined) {\n this.increment = config.increment;\n }\n if (config.min !== undefined) {\n this.min = config.min;\n }\n if (config.max !== undefined) {\n this.max = config.max;\n }\n\n if (config.parse) {\n this.parser = config.parse.bind(this);\n } else {\n const parser = (value: string) => this.isFloat ? Math.round(Math.pow(10, this.precision) * Number.parseFloat(value)) / Math.pow(10, this.precision) : Number.parseInt(value);\n this.parser = parser.bind(this);\n }\n\n if (config.validate) {\n this.validator = config.validate.bind(this);\n } else {\n const validator = (value: number) => !Number.isNaN(value) && value >= this.min && value <= this.max;\n this.validator = validator.bind(this);\n }\n\n this.sync();\n } `}\n <Spacing />\n <ClassMethod\n doc=\"A method to reset the prompt input\"\n name=\"reset\"\n override\n protected>\n {code`super.reset();\n this.currentInput = \"\";\n `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the end of the input\"\n name=\"next\"\n protected>\n {code`this.changeValue(this.initialValue);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n override\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (action && typeof (this as any)[action] === \"function\") {\n return (this as any)[action]();\n }\n\n if (char !== \"-\" && !(char === \".\" && this.isFloat) && !/[0-9]/.test(char)) {\n return this.bell();\n }\n\n if (Date.now() - this.inputTimestamp > 1000) {\n this.currentInput = \"\";\n }\n\n this.currentInput += char;\n this.inputTimestamp = Date.now();\n\n if (char === \".\") {\n return this.sync();\n }\n\n let value = Math.min(this.parser(this.currentInput), this.max);\n if (value > this.max) {\n value = this.max;\n }\n if (value < this.min) {\n value = this.min;\n }\n\n this.changeValue(value);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the up\"\n name=\"up\"\n protected>\n {code`this.currentInput = \"\";\n\n let value = this.value;\n if (this.displayValue === \"\") {\n value = this.min === Number.NEGATIVE_INFINITY ? 0 - this.increment : this.min - this.increment;\n }\n\n if (value >= this.max) {\n return this.bell();\n }\n\n this.changeValue(value + this.increment);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the down\"\n name=\"down\"\n protected>\n {code`this.currentInput = \"\";\n\n let value = this.value;\n if(this.displayValue === \"\") {\n value = this.min === Number.NEGATIVE_INFINITY ? 0 + this.increment : this.min + this.increment;\n }\n\n if (value <= this.min) {\n return this.bell();\n }\n\n this.changeValue(value - this.increment);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character backward of the cursor\"\n name=\"delete\"\n protected>\n {code`if (this.displayValue === \"\") {\n return this.bell();\n }\n\n let value = this.parser(this.displayValue.slice(0, -1));\n if (value < this.min) {\n value = this.min === Number.NEGATIVE_INFINITY ? 0 : this.min;\n }\n\n this.changeValue(value);\n this.sync(); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"An object representing the configuration options for a numeric prompt.\" />\n <TypeDeclaration name=\"NumericConfig\" export>\n {code`PromptFactoryConfig<number> & NumberPromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a numeric prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocExample>\n {`import { numeric, isCancel } from \"shell-shock:prompts\";\n\nasync function run() {\n const age = await numeric({\n message: \"How old are you?\",\n description: \"Please enter your age in years\",\n validate: value => value < 21 ? \"You must be at least 21 years old\" : true,\n });\n if (isCancel(age)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"Your age is \" + age + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the numeric prompt, which extends the base PromptFactoryConfig with additional options specific to numeric prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"numeric\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"NumericConfig\"\n }\n ]}\n returnType=\"Promise<number | symbol>\">\n {code`return new Promise<number | symbol>((response, reject) => {\n const prompt = new NumberPrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A component that renders the declarations for the built-in toggle prompt, which allows users to select a boolean value (true/false) with support for custom messages for the true and false states. This prompt type can be used for scenarios where the user needs to toggle a setting on or off, such as enabling or disabling a feature. The TogglePrompt class extends the base Prompt class and implements specific logic for handling boolean input and rendering interactions.\n */\nexport function TogglePromptDeclarations() {\n return (\n <>\n <InterfaceDeclaration\n export\n name=\"TogglePromptConfig\"\n extends=\"PromptConfig<boolean>\"\n doc=\"Configuration options for configuring a boolean toggle prompt\">\n <InterfaceMember\n name=\"trueMessage\"\n optional\n type=\"string\"\n doc=\"The message for the true state of the prompt\"\n />\n <Spacing />\n <InterfaceMember\n name=\"falseMessage\"\n optional\n type=\"string\"\n doc=\"The message for the false state of the prompt\"\n />\n <Spacing />\n </InterfaceDeclaration>\n <Spacing />\n <ClassDeclaration\n export\n name=\"TogglePrompt\"\n doc=\"A prompt for selecting a boolean input\"\n extends=\"Prompt<boolean>\">\n <ClassField name=\"initialValue\" protected override type=\"boolean\">\n {code`false; `}\n </ClassField>\n <hbr />\n <ClassField name=\"trueMessage\" protected type=\"string\">\n {code`\"Yes\"; `}\n </ClassField>\n <hbr />\n <ClassField name=\"falseMessage\" protected type=\"string\">\n {code`\"No\"; `}\n </ClassField>\n <Spacing />\n {code`constructor(config: TogglePromptConfig) {\n super(config);\n\n if (config.initialValue) {\n this.initialValue = config.initialValue;\n }\n\n if (config.trueMessage) {\n this.trueMessage = config.trueMessage;\n }\n if (config.falseMessage) {\n this.falseMessage = config.falseMessage;\n }\n\n this.sync();\n } `}\n <Spacing />\n <ClassMethod\n doc=\"Update the toggle value to a checked state based on user input\"\n name=\"check\"\n protected>\n {code`if (this.value === true) {\n return this.bell();\n }\n\n this.changeValue(true);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"Update the toggle value to an unchecked state based on user input\"\n name=\"uncheck\"\n protected>\n {code`if (this.value === false) {\n return this.bell();\n }\n\n this.changeValue(false);\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to handle keypress events and determine the corresponding action\"\n name=\"keypress\"\n override\n protected\n parameters={[\n {\n name: \"char\",\n type: \"string\"\n },\n {\n name: \"key\",\n type: \"readline.Key\"\n }\n ]}>\n {code`const action = this.getAction(key);\n if (action && typeof (this as any)[action] === \"function\") {\n return (this as any)[action]();\n }\n\n if (char === \" \") {\n this.changeValue(!this.value);\n } else if (char === \"1\") {\n this.changeValue(true);\n } else if (char === \"0\") {\n this.changeValue(false);\n } else {\n return this.bell();\n }\n\n this.sync(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to delete the character backward of the cursor\"\n name=\"delete\"\n protected>\n {code`this.uncheck(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the left\"\n name=\"left\"\n protected>\n {code`this.uncheck(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to the right\"\n name=\"right\"\n protected>\n {code`this.check(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to down\"\n name=\"down\"\n protected>\n {code`this.uncheck(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move the cursor to up\"\n name=\"up\"\n protected>\n {code`this.check(); `}\n </ClassMethod>\n <Spacing />\n <ClassMethod\n doc=\"A method to move to the next value\"\n name=\"next\"\n protected>\n {code`this.changeValue(!this.value);\n this.sync(); `}\n </ClassMethod>\n </ClassDeclaration>\n <Spacing />\n <TSDoc heading=\"An object representing the configuration options for a toggle prompt, which extends the base PromptFactoryConfig with additional options specific to the toggle prompt.\" />\n <TypeDeclaration name=\"ToggleConfig\" export>\n {code`PromptFactoryConfig<boolean> & TogglePromptConfig; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a toggle prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocExample>\n {`import { toggle, isCancel } from \"shell-shock:prompts\";\n\nasync function run() {\n const likesIceCream = await toggle({\n message: \"Do you like ice cream?\"\n });\n if (isCancel(likesIceCream)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"You\" + (likesIceCream ? \" like ice cream\" : \" don't like ice cream\") + \"!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the toggle prompt, which extends the base PromptFactoryConfig with additional options specific to the toggle prompt`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"toggle\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"ToggleConfig\"\n }\n ]}\n returnType=\"Promise<boolean | symbol>\">\n {code`return new Promise<boolean | symbol>((response, reject) => {\n const prompt = new TogglePrompt(config);\n\n prompt.on(\"state\", state => config.onState?.(state));\n prompt.on(\"submit\", value => response(value));\n prompt.on(\"cancel\", event => reject(CANCEL_SYMBOL));\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * Declarations for a password prompt that allows users to input and edit text, with support for cursor movement, deletion, and custom masking. This prompt type can be used for various text input scenarios, such as entering a password or any other string input. The PasswordPrompt class extends the base Prompt class and implements specific logic for handling password input and editing interactions.\n */\nexport function PasswordPromptDeclaration() {\n return (\n <>\n <FunctionDeclaration\n export\n name=\"passwordMask\"\n doc=\"A built-in prompt mask function that masks input with asterisks\"\n parameters={[{ name: \"input\", type: \"string\" }]}\n returnType=\"string\">\n {code`return \"*\".repeat(input.length); `}\n </FunctionDeclaration>\n <Spacing />\n <TSDoc heading=\"An object representing the configuration options for a password prompt, which extends the base PromptFactoryConfig with additional options specific to password prompts.\" />\n <TypeDeclaration name=\"PasswordConfig\" export>\n {code`Omit<TextConfig, \"mask\">; `}\n </TypeDeclaration>\n <Spacing />\n <TSDoc heading=\"A function to create and run a password prompt, which returns a promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled.\">\n <TSDocRemarks>\n {code`This function creates an instance of the TextPrompt class with the provided configuration options and a custom mask function to handle password input. It sets up event listeners for state updates, submission, and cancellation to handle the prompt interactions and return the appropriate results. The password prompt allows users to input text that is masked for privacy, making it suitable for scenarios like entering passwords or sensitive information.`}\n </TSDocRemarks>\n <Spacing />\n <TSDocExample>\n {`import { password, isCancel } from \"shell-shock:prompts\";\n\nasync function run() {\n const userPassword = await password({\n message: \"Enter your password\"\n });\n if (isCancel(userPassword)) {\n console.log(\"Prompt was cancelled\");\n return;\n }\n\n console.log(\"You entered a password!\");\n}\n\nrun(); `}\n </TSDocExample>\n <Spacing />\n <TSDocParam name=\"config\">\n {`The configuration options to pass to the password prompt, which extends the base PromptConfig with additional options specific to password prompts`}\n </TSDocParam>\n <TSDocReturns>\n {`A promise that resolves with the submitted value or rejects with a {@link CANCEL_SYMBOL | cancel symbol} if the prompt is cancelled`}\n </TSDocReturns>\n </TSDoc>\n <FunctionDeclaration\n name=\"password\"\n export\n parameters={[\n {\n name: \"config\",\n type: \"PasswordConfig\"\n }\n ]}\n returnType=\"Promise<string | symbol>\">\n {code`return text({\n ...config,\n mask: passwordMask\n });`}\n </FunctionDeclaration>\n </>\n );\n}\n\n/**\n * A built-in prompts module for Shell Shock.\n */\nexport function PromptsBuiltin(props: PromptsBuiltinProps) {\n const [{ children }, rest] = splitProps(props, [\"children\"]);\n\n return (\n <BuiltinFile\n id=\"prompts\"\n description=\"A collection of prompts that allow for interactive input in command line applications.\"\n {...rest}\n imports={defu(rest.imports ?? {}, {\n \"node:events\": \"EventEmitter\",\n \"node:readline\": \"readline\"\n })}\n builtinImports={defu(rest.builtinImports ?? {}, {\n console: [\n \"erase\",\n \"beep\",\n \"cursor\",\n \"colors\",\n \"clear\",\n \"stripAnsi\",\n \"splitText\"\n ],\n env: [\"env\", \"isCI\", \"isTest\", \"isWindows\", \"isDevelopment\", \"isDebug\"]\n })}>\n <Spacing />\n <BasePromptDeclarations />\n <Spacing />\n <TextPromptDeclarations />\n <Spacing />\n <SelectPromptDeclarations />\n <Spacing />\n <NumericPromptDeclarations />\n <Spacing />\n <TogglePromptDeclarations />\n <Spacing />\n <PasswordPromptDeclaration />\n <Spacing />\n <Show when={Boolean(children)}>{children}</Show>\n </BuiltinFile>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAkDA,SAAgBqB,yBAAyB;CACvC,MAAMC,QAAQH,UAAU;AAExB,QAAA;EAAAI,gBAEKV,OAAK;GAACW,SAAO;GAAA,IAAAC,WAAA;AAAA,WAAA,CAAAF,gBACXR,YAAU;KAACW,MAAI;KAAAD,UACb;KAAwC,CAAA,EAAAF,gBAE1CN,cAAY,EAAAQ,UACV,kHAAgH,CAAA,CAAA;;GAAA,CAAA;EAAAF,gBAGpHpB,qBAAmB;GAAA,UAAA;GAElBuB,MAAI;GACJC,YAAY,CAAC;IAAED,MAAM;IAAYE,MAAM;IAAU,CAAC;GAClDC,YAAU;GAAAJ,UAAkBzB,IAAI;GAAkE,CAAA;EAAAuB,gBACnGlB,SAAO,EAAA,CAAA;EAAAkB,gBACPL,i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AAAA,UAAErC,KAAKgC,KAAKK,kBAAkB,EAAE,EAAE;IAC9CC,SAAS;KACP;KACA;KACA;KACA;KACA;KACA;KACA;KACD;IACDC,KAAK;KAAC;KAAO;KAAQ;KAAU;KAAa;KAAiB;KAAS;IACvE,CAAC;;EAAA,IAAAlC,WAAA;AAAA,UAAA;IAAAF,gBACDlB,SAAO,EAAA,CAAA;IAAAkB,gBACPF,wBAAsB,EAAA,CAAA;IAAAE,gBACtBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPqB,wBAAsB,EAAA,CAAA;IAAArB,gBACtBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPuB,0BAAwB,EAAA,CAAA;IAAAvB,gBACxBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPwB,2BAAyB,EAAA,CAAA;IAAAxB,gBACzBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPyB,0BAAwB,EAAA,CAAA;IAAAzB,gBACxBlB,SAAO,EAAA,CAAA;IAAAkB,gBACP0B,2BAAyB,EAAA,CAAA;IAAA1B,gBACzBlB,SAAO,EAAA,CAAA;IAAAkB,gBACPtB,MAAI;KAAA,IAAC2D,OAAI;AAAA,aAAEC,QAAQpC,SAAS;;KAAGA;KAAQ,CAAA;IAAA;;EAAA,CAAA,CAAA"}
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core2 from "@alloy-js/core";
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
2
  import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
3
3
  import { CommandTree } from "@shell-shock/core/types/command";
4
4
 
@@ -9,7 +9,7 @@ interface VirtualCommandEntryProps extends Omit<EntryFileProps, "path" | "typeDe
9
9
  /**
10
10
  * The virtual command entry point for the Shell Shock project.
11
11
  */
12
- declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _alloy_js_core2.Children;
12
+ declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _alloy_js_core0.Children;
13
13
  //#endregion
14
14
  export { VirtualCommandEntry, VirtualCommandEntryProps };
15
15
  //# sourceMappingURL=virtual-command-entry.d.cts.map
@@ -1,4 +1,4 @@
1
- import * as _alloy_js_core2 from "@alloy-js/core";
1
+ import * as _alloy_js_core0 from "@alloy-js/core";
2
2
  import { EntryFileProps } from "@powerlines/plugin-alloy/typescript/components/entry-file";
3
3
  import { CommandTree } from "@shell-shock/core/types/command";
4
4
 
@@ -9,7 +9,7 @@ interface VirtualCommandEntryProps extends Omit<EntryFileProps, "path" | "typeDe
9
9
  /**
10
10
  * The virtual command entry point for the Shell Shock project.
11
11
  */
12
- declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _alloy_js_core2.Children;
12
+ declare function VirtualCommandEntry(props: VirtualCommandEntryProps): _alloy_js_core0.Children;
13
13
  //#endregion
14
14
  export { VirtualCommandEntry, VirtualCommandEntryProps };
15
15
  //# sourceMappingURL=virtual-command-entry.d.mts.map