(input: string, state: TextState)
| 3654 | } |
| 3655 | |
| 3656 | const defaultTextProcessor = (input: string, state: TextState) => { |
| 3657 | const beforeCursor = state.value.slice(0, state.cursor) |
| 3658 | const afterCursor = state.value.slice(state.cursor) |
| 3659 | const value = `${beforeCursor}${input}${afterCursor}` |
| 3660 | const cursor = state.cursor + input.length |
| 3661 | return Effect.succeed( |
| 3662 | Action.NextFrame({ |
| 3663 | state: { ...state, cursor, value, error: Option.none() } |
| 3664 | }) |
| 3665 | ) |
| 3666 | } |
| 3667 | |
| 3668 | const handleTextRender = (options: TextOptionsReq) => { |
| 3669 | return (state: TextState, action: Action<TextState, string>) => { |
no test coverage detected