Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions docs/public/editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { keymap } from 'https://esm.sh/@codemirror/view@6.39.14';
import { yaml } from 'https://esm.sh/@codemirror/lang-yaml@6.1.2';
import { markdown } from 'https://esm.sh/@codemirror/lang-markdown@6.5.0';
import { indentUnit } from 'https://esm.sh/@codemirror/language@6.12.1';
import { oneDark } from 'https://esm.sh/@codemirror/theme-one-dark@6.1.3';
import { githubLight, githubDark } from 'https://esm.sh/@uiw/codemirror-theme-github@4.25.4';
import { createWorkerCompiler } from '/gh-aw/wasm/compiler-loader.js';
import { frontmatterHoverTooltip } from './hover-tooltips.js';

Expand Down Expand Up @@ -142,7 +142,7 @@ let isDragging = false;
// ---------------------------------------------------------------
// Theme — follows browser's prefers-color-scheme automatically.
// Primer CSS handles the page via data-color-mode="auto".
// We only need to toggle the CodeMirror theme (oneDark vs default).
// We only need to toggle the CodeMirror theme (githubDark vs githubLight).
// ---------------------------------------------------------------
const editorThemeConfig = new Compartment();
const outputThemeConfig = new Compartment();
Expand All @@ -153,7 +153,7 @@ function isDark() {
}

function cmThemeFor(dark) {
return dark ? oneDark : [];
return dark ? githubDark : githubLight;
}

function applyCmTheme() {
Expand Down Expand Up @@ -324,10 +324,15 @@ function setStatus(status, text) {
statusBadge.setAttribute('data-status', status);
statusText.textContent = text;

// Pulse animation for loading/compiling states
// Hide the dot in the ready state; pulse it for loading/compiling
if (status === 'loading' || status === 'compiling') {
statusDot.style.display = '';
statusDot.style.animation = 'pulse 1.2s ease-in-out infinite';
} else if (status === 'ready') {
statusDot.style.display = 'none';
statusDot.style.animation = '';
} else {
statusDot.style.display = '';
statusDot.style.animation = '';
}
}
Expand Down
12 changes: 10 additions & 2 deletions docs/public/editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>gh-aw Playground</title>
<title>gh aw</title>
<link rel="icon" type="image/svg+xml" href="/gh-aw/favicon.svg" />
<link rel="stylesheet" href="https://unpkg.com/@primer/css@21/dist/primer.css">
<style>
Expand Down Expand Up @@ -172,6 +172,14 @@
padding: 0 !important;
}

/* Primer CSS v21 does not ship gap utilities — define them here */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 16px; }
.gap-4 { gap: 24px; }
.gap-5 { gap: 32px; }
.gap-6 { gap: 40px; }

</style>
</head>
<body class="color-bg-default color-fg-default">
Expand All @@ -190,7 +198,7 @@
<polyline points="4 17 10 11 4 5"></polyline>
<line x1="12" y1="19" x2="20" y2="19"></line>
</svg>
<span>gh-aw Playground</span>
<span>gh aw</span>
</a>

<div class="header-separator flex-shrink-0" style="width: 1px; height: 24px; background: var(--borderColor-default, var(--color-border-default));"></div>
Expand Down
Loading