Add Python REPL, instant deploy, Gist import, presentation mode, and CSS visual tools

- Python mode via Pyodide WASM runtime with stdout/stderr console integration
- Publish fiddles to clean /p/:slug URLs as standalone HTML pages
- Import code from GitHub Gist URLs with auto-detection of language/mode
- Presentation mode with slide management, fullscreen viewer, and keyboard nav
- Enable Monaco color decorators for inline CSS color pickers
- Extract reusable generateStandaloneHtml from export module
This commit is contained in:
root
2026-02-27 15:50:55 -06:00
parent 26e232fd41
commit ae8dbafb20
11 changed files with 666 additions and 6 deletions

View File

@@ -33,6 +33,7 @@ const editorOpts = {
autoClosingQuotes: 'always',
autoSurround: 'languageDefined',
bracketPairColorization: { enabled: true },
colorDecorators: true,
};
export const MODE_TABS = {
@@ -73,6 +74,10 @@ export const MODE_TABS = {
{ id: 'css', label: 'CSS', lang: 'css', ext: 'css' },
{ id: 'js', label: 'JavaScript', lang: 'javascript', ext: 'js' },
],
'python': [
{ id: 'js', label: 'Python', lang: 'python', ext: 'py' },
{ id: 'html', label: 'HTML', lang: 'html', ext: 'html' },
],
};
// Map mode names to js_type values stored in DB
@@ -85,6 +90,7 @@ export const MODE_TO_JS_TYPE = {
'svelte': 'svelte',
'markdown': 'markdown',
'wasm': 'wasm',
'python': 'python',
};
export const JS_TYPE_TO_MODE = Object.fromEntries(