hermes / ui-tui /src /app /inputSelectionStore.ts
haochengsama's picture
Add files using upload-large-folder tool
04d8658 verified
Raw
History Blame Contribute Delete
358 Bytes
import { atom } from 'nanostores'
export interface InputSelection {
clear: () => void
end: number
start: number
value: string
}
export const $inputSelection = atom<InputSelection | null>(null)
export const setInputSelection = (next: InputSelection | null) => $inputSelection.set(next)
export const getInputSelection = () => $inputSelection.get()