mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
93 lines
4.7 KiB
HTML
93 lines
4.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="description" content="The JavaScript Oxidation Compiler Playground">
|
|
<title>Oxc - The JavaScript Oxidation Compiler Playground</title>
|
|
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/Boshen/oxc-assets/main/oxc.ico">
|
|
<style>
|
|
body { font-family: monospace; font-size: 16px; background-color: #24292e; color: white; margin: 0 }
|
|
button { cursor: pointer }
|
|
label { display: inline-flex; align-items: center; cursor: pointer; user-select: none; }
|
|
.cm-editor { height: 100%; }
|
|
#logo { display: flex; justify-content: center; cursor: pointer; color: white; text-decoration: inherit; }
|
|
#logo > img { margin-right: .5em; }
|
|
#loading { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; display: flex; justify-content: center; align-items: center; }
|
|
#container { display: flex; height: 100vh; }
|
|
#left { display: flex; flex: 1; flex-direction: column; border-right: 1px solid #444 }
|
|
#editor { flex: 1; overflow-y: auto; }
|
|
#panel { height: 20%; overflow-y: auto; padding: 1em; color: #d1d5da; border-top: 1px solid #444!important; }
|
|
#right { flex: 1; display:flex; flex-direction: column; min-width: 0; }
|
|
.header { border-bottom: 1px solid #444; }
|
|
.left-container { padding: .8em 1em; display: flex; align-items: center; justify-content: space-between; }
|
|
.controls { padding: .6em; }
|
|
.controls > div { padding: .2em .5em; display: flex; flex-wrap: wrap; gap: 4px; }
|
|
.controls > div > button { padding: 8px 16px; background-color: #2c3136; color: white; border: 1px solid #444; transition: background-color 0.3s; white-space: nowrap; }
|
|
.controls > div > button:hover { background-color: #444; }
|
|
.controls > div > button.active { background-color: #555; }
|
|
.controls > div > label { margin-right: 4px; }
|
|
.controls label { font-size: 14px; }
|
|
#duration { margin-left: auto; }
|
|
#viewer { flex: 1; overflow-y: auto; }
|
|
#divider { width: 4px; background: #444; }
|
|
#divider:hover { background: #666; cursor: col-resize; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script type="module" src="./index.js"></script>
|
|
<div id="loading">Loading Wasm (~400kB)...</div>
|
|
|
|
<div id="container">
|
|
<div id="left">
|
|
<div class="header left-container">
|
|
<a id="logo" href="https://oxc-project.github.io">
|
|
<img height="100%" width="20" src="https://raw.githubusercontent.com/Boshen/oxc-assets/main/oxc.ico" alt="logo">
|
|
<span>Oxc</span>
|
|
</a>
|
|
<div>
|
|
<label>
|
|
File
|
|
<select id="file-type-select" style="margin-left: 4px">
|
|
<option value="js">js</option>
|
|
<option value="ts">ts</option>
|
|
<option value="jsx">jsx</option>
|
|
<option value="tsx" selected>tsx</option>
|
|
<option value="d.ts">d.ts</option>
|
|
</select>
|
|
</label>
|
|
<label id="syntax">Syntax Check<input id="syntax-checkbox" type="checkbox" checked></label>
|
|
<label id="lint">Lint<input id="lint-checkbox" type="checkbox" checked></label>
|
|
</div>
|
|
</div>
|
|
<div id="editor"></div>
|
|
<div id="panel"></div>
|
|
</div>
|
|
<div id="divider"></div>
|
|
<div id="right">
|
|
<div class="header controls">
|
|
<div>
|
|
<button type="button" id="ast">AST</button>
|
|
<button type="button" id="codegen">Codegen</button>
|
|
<button type="button" id="ir">IR</button>
|
|
<button type="button" id="prettier-ir">Prettier IR</button>
|
|
<button type="button" id="prettier">Format (Prettier)</button>
|
|
<button type="button" id="scope">Scope</button>
|
|
<button type="button" id="symbol">Symbol</button>
|
|
<button type="button" id="ir-copy">Copy IR to clipboard</button>
|
|
</div>
|
|
<div id="codegen-controls">
|
|
<label id="transform">Transform<input id="transform-checkbox" type="checkbox"></label>
|
|
<label id="codegen-ts">TS<input id="codegen-ts-checkbox" type="checkbox"></label>
|
|
<label>| Minify: </label>
|
|
<label id="whitespace">whitespace<input id="whitespace-checkbox" type="checkbox"></label>
|
|
<label id="mangle">mangle<input id="mangle-checkbox" type="checkbox"></label>
|
|
<label id="compress">compress<input id="compress-checkbox" type="checkbox"></label>
|
|
<div id="duration" title="Execution Time"></div>
|
|
</div>
|
|
</div>
|
|
<div id="viewer"></div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|