import { app, Component } from './apprun'; declare var CodeMirror; const styles = ` .CodeMirror, .apprun-play iframe { height: 100%; border: dotted gray 1px; } .apprun-play { height: 100%; display: flex; font-size: 1.1rem; } .apprun-play .col { margin: 2px; } .apprun-play .editor, .apprun-play .preview { width: 100%; height: 100%; } `; const encodeHTML = code => { return code.replace(/&/g, '&') .replace(//g, '>') .replace(/"/g, '"') .replace(/'/g, '''); } const code_html = code => ` AppRun Playground `; class Play extends Component { view = ({ code, hide_code }) => { return <> {hide_code ?