/** * light IDE for text inputs - used particularly for editing raw CSS */ /* TODOS: - [ ] copy / paste - [ ] left / right arrows - [ ] ctrl+a - [ ] backspace - [ ] shift backspace */ import "./index.scss"; import * as React from "react"; import * as ReactDOM from "react-dom"; import { PreviewComponent } from "./preview"; import { calcCaretPosition } from "./utils"; import { LightIDETextToken } from "./state"; import { compose, pure, withHandlers } from "recompose"; export type LightIDEComponentOuterProps = { tokens: LightIDETextToken[]; }; export type LightIDEComponentInnerProps = { onMouseDown: () => any; } & LightIDEComponentOuterProps; const BaseLightIDEComponent = ({ tokens, onMouseDown }: LightIDEComponentInnerProps) => { return (