Update editor, themes, menus, backgrounds, and release tooling

This commit is contained in:
Knotty Wyvern
2026-10-14 16:19:51 -07:00
parent f6eaa52949
commit edef2520af
113 changed files with 5722 additions and 386 deletions
+13 -13
View File
@@ -82,6 +82,7 @@
finally { busy = false; }
}
function navigate(event: KeyboardEvent) {
if (event.key === "Escape") { event.preventDefault(); close(); return; }
if (!["ArrowDown", "ArrowUp", "Home", "End"].includes(event.key)) return;
event.preventDefault();
const buttons = [...menu.querySelectorAll<HTMLButtonElement>("button:not(:disabled)")];
@@ -92,14 +93,14 @@
</script>
<svelte:window onresize={() => { if (menu?.matches(":popover-open")) position(); }} />
<div bind:this={menu} popover="auto" class="workspace-menu" role="dialog" aria-label="Workspaces" tabindex="-1" onkeydown={navigate}>
<div bind:this={menu} popover="auto" class="workspace-menu rs-picker" role="dialog" aria-label="Workspaces" tabindex="-1" onkeydown={navigate}>
<h2>Recent workspaces</h2>
<div class="recent" aria-busy={loading || busy}>
{#if loading}<p>Loading workspaces…</p>
{:else if !recent.length}<p>No recent workspaces yet.</p>{/if}
{#each recent as path}
<button class="workspace-row" class:current={path === currentRoot} aria-current={path === currentRoot ? "true" : undefined} disabled={busy} onclick={() => open(path)}>
<Icon icon="folder-open" />
<button class="workspace-row rs-picker-row" aria-current={path === currentRoot ? "true" : undefined} disabled={busy} onclick={() => open(path)}>
<span class="rs-picker-icon"><Icon icon="folder-open" /></span>
<span class="details"><span>{folderName(path)}</span><small>{path}</small></span>
{#if path === currentRoot}<span class="current-label">Current</span>{/if}
</button>
@@ -107,8 +108,8 @@
</div>
{#if error}<p class="error" role="alert">{error}</p>{/if}
<footer>
<button disabled={busy} onclick={newWorkspace}><Icon icon="folder-plus" /> New workspace…</button>
<button disabled={busy} onclick={browse}><Icon icon="folder-open" /> Open another folder…</button>
<button class="rs-picker-row" disabled={busy} onclick={newWorkspace}><span class="rs-picker-icon"><Icon icon="folder-plus" /></span> New workspace…</button>
<button class="rs-picker-row" disabled={busy} onclick={browse}><span class="rs-picker-icon"><Icon icon="folder-open" /></span> Open another folder…</button>
</footer>
</div>
@@ -129,17 +130,16 @@
{/if}
<style>
.workspace-menu, dialog { background: var(--rs-bg-elevated); color: var(--rs-text); border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); box-shadow: 0 12px 36px #0006; }
.workspace-menu { position: fixed; inset: auto; margin: 0; padding: 6px; width: min(380px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; }
dialog { background: var(--rs-bg-elevated); color: var(--rs-text); border: 1px solid var(--rs-border); border-radius: var(--rs-control-radius); box-shadow: 0 12px 36px #0006; }
.workspace-menu { position: fixed; inset: auto; margin: 0; width: min(380px, calc(100vw - 16px)); }
h2 { font-size: 14px; font-weight: 600; margin: 0; padding: 9px 10px; display: flex; align-items: center; gap: 8px; }
p { font-size: 13px; color: var(--rs-text-dim); margin: 8px 10px; }
.recent { max-height: min(360px, 45vh); overflow: auto; padding: 2px; }
button { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid transparent; border-radius: var(--rs-control-radius); padding: 9px 10px; color: var(--rs-text); text-align: left; }
button:hover { background: var(--rs-bg-active); }
button:focus-visible, input:focus-visible { outline: 2px solid var(--rs-accent); outline-offset: -2px; }
button:disabled { opacity: .5; }
.recent { max-height: min(360px, 45vh); overflow: auto; }
form button { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid transparent; border-radius: var(--rs-control-radius); padding: 9px 10px; color: var(--rs-text); text-align: left; }
form button:hover { background: var(--rs-bg-active); }
form button:focus-visible, input:focus-visible { outline: 2px solid var(--rs-accent); outline-offset: -2px; }
form button:disabled { opacity: .5; }
.workspace-row, footer button { width: 100%; }
.workspace-row.current { background: var(--rs-item-selection-bg); box-shadow: inset 0 0 0 var(--rs-item-selection-width) var(--rs-item-selection-border); border-radius: var(--rs-item-selection-radius); }
.details { min-width: 0; display: flex; flex: 1; flex-direction: column; gap: 3px; }
small { font-size: 11px; color: var(--rs-text-dim); overflow-wrap: anywhere; }
.current-label { font-size: 11px; color: var(--rs-accent); }