(placeholder?: string)
| 588 | |
| 589 | // Helper method to render text with cursor |
| 590 | renderWithCursor(placeholder?: string): { |
| 591 | text: string; |
| 592 | cursorPosition: number; |
| 593 | } { |
| 594 | if (this._text.length === 0 && placeholder) { |
| 595 | return { text: placeholder, cursorPosition: 0 }; |
| 596 | } |
| 597 | |
| 598 | return { |
| 599 | text: this._text, |
| 600 | cursorPosition: this._cursor, |
| 601 | }; |
| 602 | } |
| 603 | } |