Add Tailwind CSS toggle, Markdown/WASM modes, and npm import resolution

- Tailwind CSS: toolbar checkbox injects Play CDN into preview, persisted
  per-fiddle via new options JSON column
- Markdown mode: uses marked.js CDN, renders markdown to HTML preview with
  CSS tab for custom styling
- WASM mode: starter template with inline WebAssembly add function, supports
  top-level await via module detection
- npm imports: auto-detect bare import specifiers in module code and inject
  importmap pointing to esm.sh CDN
- Module auto-detection for html-css-js mode (import/export statements)
- DB migration adds options column, server passes through all API endpoints
- All features work across preview, export, and embed
This commit is contained in:
root
2026-02-26 15:15:53 -06:00
parent e41c3e7dc4
commit 77f64d2862
13 changed files with 273 additions and 41 deletions

View File

@@ -17,6 +17,8 @@
<option value="react-ts">React + TS</option>
<option value="vue">Vue</option>
<option value="svelte">Svelte</option>
<option value="markdown">Markdown</option>
<option value="wasm">WASM</option>
</select>
<input type="text" id="title-input" placeholder="Untitled" spellcheck="false">
<select id="layout-mode">
@@ -37,6 +39,10 @@
<datalist id="tags-datalist"></datalist>
<div id="tags-display" class="tags-display"></div>
</div>
<label class="tailwind-toggle" title="Enable Tailwind CSS">
<input type="checkbox" id="tailwind-checkbox">
Tailwind
</label>
<label class="listed-toggle" title="Show in browse page">
<input type="checkbox" id="listed-checkbox" checked>
Listed