Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

refactor(editor): shared SearchField + one interaction-state language

yhhab1d1f7cffd3
diff --git a/desktop/src/components/AddComponentMenu.tsx b/desktop/src/components/AddComponentMenu.tsx
index 926a40a48..7ebeb3f50 100644
--- a/desktop/src/components/AddComponentMenu.tsx
+++ b/desktop/src/components/AddComponentMenu.tsx
@@ -9,8 +9,8 @@
*/
import { useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
-import { Search } from 'lucide-react';
import { ComponentIcon } from '@/components/icons';
+import { SearchField } from '@/components/SearchField';
import { useDialogFocus } from '@/components/dialogFocus';
import { CATEGORY_ORDER } from '@/engine/schema';
@@ -123,18 +123,18 @@ export function AddComponentMenu({
return createPortal(
<div className="ac-scrim open" onMouseDown={onClose}>
<div ref={shellRef} className="ac" role="dialog" aria-modal="true" aria-label="Add component" tabIndex={-1} onMouseDown={(e) => e.stopPropagation()}>
- <div className="ac-search">
- <Search size={15} strokeWidth={1.9} />
- <input
- ref={inputRef}
- placeholder="Search components…"
- value={query}
- spellCheck={false}
- onChange={(e) => setQuery(e.target.value)}
- onKeyDown={onKeyDown}
- />
+ <SearchField
+ flush
+ className="ac-search"
+ iconSize={15}
+ inputRef={inputRef}
+ placeholder="Search components…"
+ value={query}
+ onChange={setQuery}
+ onKeyDown={onKeyDown}
+ >
<kbd className="esc">Esc</kbd>
- </div>
+ </SearchField>
<div className="ac-body">
{flat.length === 0 ? (
diff --git a/desktop/src/components/CreatePopover.tsx b/desktop/src/components/CreatePopover.tsx
index 24c5b9829..23f7f4999 100644
--- a/desktop/src/components/CreatePopover.tsx
+++ b/desktop/src/components/CreatePopover.tsx
@@ -11,8 +11,9 @@
*/
import { useEffect, useMemo, useRef, useState } from 'react';
import { createPortal } from 'react-dom';
-import { Search, Box, Image, Video, Lightbulb, Sparkles, LayoutDashboard, ToggleLeft, SlidersHorizontal } from 'lucide-react';
+import { Box, Image, Video, Lightbulb, Sparkles, LayoutDashboard, ToggleLeft, SlidersHorizontal } from 'lucide-react';
import { flattenCatalog, matchCatalog, type CatalogEntry, type EntityTemplate } from '@/engine/entityTemplates';
+import { SearchField } from '@/components/SearchField';
import { useDialogFocus } from '@/components/dialogFocus';
const ICONS: Record<string, typeof Box> = {
@@ -90,18 +91,18 @@ export function CreatePopover({
return createPortal(
<div className="ac-scrim open" onMouseDown={onClose}>
<div ref={shellRef} className="ac" role="dialog" aria-modal="true" aria-label="Create entity" tabIndex={-1} onMouseDown={(e) => e.stopPropagation()}>
- <div className="ac-search">
- <Search size={15} strokeWidth={1.9} />
- <input
- ref={inputRef}
- placeholder="Create entity…"
- value={query}
- spellCheck={false}
- onChange={(e) => setQuery(e.target.value)}
- onKeyDown={onKeyDown}
- />
+ <SearchField
+ flush
+ className="ac-search"
+ iconSize={15}
+ inputRef={inputRef}
+ placeholder="Create entity…"
+ value={query}
+ onChange={setQuery}
+ onKeyDown={onKeyDown}
+ >
<kbd className="esc">Esc</kbd>
- </div>
+ </SearchField>
<div className="ac-body">
{results.length === 0 ? (
diff --git a/desktop/src/components/SearchField.tsx b/desktop/src/components/SearchField.tsx
new file mode 100644
index 000000000..0f9dc4195
--- /dev/null
+++ b/desktop/src/components/SearchField.tsx
@@ -0,0 +1,59 @@
+// SPDX-License-Identifier: Apache-2.0
+// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
+/**
+ * @file SearchField.tsx
+ * @brief The shared search/filter input — leading icon + reset-styled input in
+ * a bordered well (`.search`, theme/controls.css). Rendered as a <label>
+ * so a click anywhere in the well focuses the input. Size/placement
+ * deltas ride on `className`; popover-internal filters use the flush
+ * variant (a border-bottom row instead of a box). Trailing adornments
+ * (e.g. a kbd hint) are children.
+ */
+import { Search } from 'lucide-react';
+import type { KeyboardEvent, ReactNode, Ref } from 'react';
+
+export function SearchField({
+ value,
+ onChange,
+ placeholder,
+ className,
+ flush,
+ autoFocus,
+ iconSize = 13,
+ inputRef,
+ onKeyDown,
+ ariaLabel,
+ children,
+}: {
+ value: string;
+ onChange: (value: string) => void;
+ placeholder?: string;
+ /** Layout deltas only (width/height/margin) — the look itself stays shared. */
+ className?: string;
+ /** Popover-internal variant: a flush border-bottom row instead of a box. */
+ flush?: boolean;
+ autoFocus?: boolean;
+ iconSize?: number;
+ inputRef?: Ref<HTMLInputElement>;
+ onKeyDown?: (e: KeyboardEvent<HTMLInputElement>) => void;
+ ariaLabel?: string;
+ /** Trailing adornment (e.g. the command palettes' Esc hint). */
+ children?: ReactNode;
+}) {
+ return (
+ <label className={`search${flush ? ' search--flush' : ''}${className ? ` ${className}` : ''}`}>
+ <Search size={iconSize} strokeWidth={1.9} />
+ <input
+ ref={inputRef}
+ value={value}
+ placeholder={placeholder}
+ spellCheck={false}
+ autoFocus={autoFocus}
+ aria-label={ariaLabel ?? placeholder}
+ onChange={(e) => onChange(e.target.value)}
+ onKeyDown={onKeyDown}
+ />
+ {children}
+ </label>
+ );
+}
diff --git a/desktop/src/components/SettingsDialog.tsx b/desktop/src/components/SettingsDialog.tsx
index 25c73a3bf..7c1c23881 100644
--- a/desktop/src/components/SettingsDialog.tsx
+++ b/desktop/src/components/SettingsDialog.tsx
@@ -11,12 +11,13 @@ import { useEffect, useRef, useState } from 'react';
import type { PointerEvent as ReactPointerEvent } from 'react';
import { createPortal } from 'react-dom';
import { useShallow } from 'zustand/react/shallow';
-import { Settings as SettingsIcon, Search, X, RotateCcw } from 'lucide-react';
+import { Settings as SettingsIcon, X, RotateCcw } from 'lucide-react';
import { useEditorStore } from '@/store/editorStore';
import { useSettings } from '@/store/settingsStore';
import { settingsRegistry } from '@/settings/registry';
import { eventToChord, formatKeybinding } from '@/commands/keybinding';
import { useDialogFocus } from '@/components/dialogFocus';
+import { SearchField } from '@/components/SearchField';
import { Segmented } from '@/components/Segmented';
import { Select } from '@/components/Select';
import type { Setting, NumberSetting, KeybindingSetting, StringListSetting, MatrixSetting, FlagListSetting } from '@/settings/types';
@@ -383,15 +384,7 @@ export function SettingsDialog() {
Settings
</span>
<span className="set-head-sp" />
- <label className="set-search">
- <Search size={12} strokeWidth={2} />
- <input
- placeholder="Search settings…"
- value={query}
- onChange={(e) => setQuery(e.target.value)}
- autoFocus
- />
- </label>
+ <SearchField className="set-search" iconSize={12} autoFocus placeholder="Search settings…" value={query} onChange={setQuery} />
<button type="button" className="set-x" title="Close (Esc)" onClick={close}>
<X size={14} strokeWidth={2} />
</button>
diff --git a/desktop/src/components/TilemapPickerDialog.tsx b/desktop/src/components/TilemapPickerDialog.tsx
index fc8fc29f6..df8541f8c 100644
--- a/desktop/src/components/TilemapPickerDialog.tsx
+++ b/desktop/src/components/TilemapPickerDialog.tsx
@@ -11,6 +11,7 @@
import { useState } from 'react';
import { LayoutGrid } from 'lucide-react';
import { Modal } from '@/components/Modal';
+import { SearchField } from '@/components/SearchField';
import { ProjectStore } from '@/project/ProjectStore';
import { useEditorStore } from '@/store/editorStore';
import { createTilemapFromTileset } from '@/tilemap/createTilemap';
@@ -32,14 +33,7 @@ export function TilemapPickerDialog() {
<Modal title="New Tilemap" onClose={close} width={440}>
<div className="tmpick">
<p className="tmpick__hint">Pick a tileset to use as the map's palette</p>
- <input
- className="tmpick__search"
- placeholder="Search tilesets…"
- value={q}
- autoFocus
- spellCheck={false}
- onChange={(e) => setQ(e.target.value)}
- />
+ <SearchField className="tmpick__search" autoFocus placeholder="Search tilesets…" value={q} onChange={setQ} />
{shown.length === 0 ? (
<div className="tmpick__empty">No matching tilesets</div>
) : (
diff --git a/desktop/src/launcher/Launcher.tsx b/desktop/src/launcher/Launcher.tsx
index ad5544fb1..bc96654fd 100644
--- a/desktop/src/launcher/Launcher.tsx
+++ b/desktop/src/launcher/Launcher.tsx
@@ -1,10 +1,11 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
import { useEffect, useMemo, useState } from 'react';
-import { ArrowRight, Clock, FolderOpen, LayoutGrid, Plus, Rows3, Search, X } from 'lucide-react';
+import { ArrowRight, Clock, FolderOpen, LayoutGrid, Plus, Rows3, X } from 'lucide-react';
import { useEditorStore } from '@/store/editorStore';
import { ProjectStore } from '@/project/ProjectStore';
import { WindowControls } from '@/layout/WindowControls';
+import { SearchField } from '@/components/SearchField';
import { Segmented } from '@/components/Segmented';
import type { RecentEntry, TemplateEntry } from '@/project/format';
import { version } from '../../package.json';
@@ -101,15 +102,7 @@ function RecentView({
<header className="lc-head">
<h1>Recent</h1>
<div className="lc-head__tools">
- <label className="lc-search">
- <Search size={13} strokeWidth={1.85} />
- <input
- value={query}
- onChange={(e) => setQuery(e.target.value)}
- placeholder="Search projects"
- spellCheck={false}
- />
- </label>
+ <SearchField className="lc-search" placeholder="Search projects" value={query} onChange={setQuery} />
<Segmented
value={layout}
onChange={setLayout}
diff --git a/desktop/src/panels/ContentBrowser.tsx b/desktop/src/panels/ContentBrowser.tsx
index 4f6434030..3478a4481 100644
--- a/desktop/src/panels/ContentBrowser.tsx
+++ b/desktop/src/panels/ContentBrowser.tsx
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
import { Fragment, useCallback, useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
-import { ChevronRight, Search, LayoutGrid, List, Import, FolderOpen, FolderPlus, ArrowLeft, ArrowRight, ArrowUp, ArrowDownUp } from 'lucide-react';
+import { ChevronRight, LayoutGrid, List, Import, FolderOpen, FolderPlus, ArrowLeft, ArrowRight, ArrowUp, ArrowDownUp } from 'lucide-react';
import { AssetIcon, assetTint } from '@/components/icons';
+import { SearchField } from '@/components/SearchField';
import { ContextMenu, type MenuItem } from '@/components/Menu';
import { useTooltip } from '@/components/Tooltip';
import { Segmented } from '@/components/Segmented';
@@ -266,6 +267,8 @@ export function ContentBrowser() {
// A right-click menu: on an item (target set) or on empty space (target null).
const [ctx, setCtx] = useState<{ x: number; y: number; target: { path: string; entry: DirEntry } | null } | null>(null);
const [renaming, setRenaming] = useState<string | null>(null);
+ // The tile being dragged dims so the source of the move reads at a glance.
+ const [dragPath, setDragPath] = useState<string | null>(null);
const [filters, setFilters] = useState<Set<AssetType>>(new Set());
const [sort, setSort] = useState<AssetSort>('name');
const tip = useTooltip<{ path: string; entry: DirEntry }>((p) => <AssetTipCard path={p.path} entry={p.entry} />);
@@ -719,10 +722,14 @@ export function ContentBrowser() {
ev.dataTransfer.effectAllowed = 'copy';
ev.dataTransfer.setData('application/x-estella-asset', path);
ev.dataTransfer.setData('text/plain', path);
+ setDragPath(path);
},
// A cancelled drag (Escape / dropped outside a target) fires no drop —
- // make sure no folder keeps its highlight.
- onDragEnd: clearDropState,
+ // make sure no folder keeps its highlight and the source undims.
+ onDragEnd: () => {
+ clearDropState();
+ setDragPath(null);
+ },
onClick: () => selectAsset(path),
onDoubleClick: () => onOpen(path, e.isDir, e.name),
// Suppress the hover card while any inline rename is active.
@@ -843,15 +850,7 @@ export function ContentBrowser() {
</Fragment>
))}
</div>
- <div className="search cb-search">
- <Search size={13} strokeWidth={1.9} />
- <input
- placeholder="Search (type:texture …)"
- spellCheck={false}
- value={query}
- onChange={(e) => setQuery(e.target.value)}
- />
- </div>
+ <SearchField className="cb-search" placeholder="Search (type:texture …)" value={query} onChange={setQuery} />
<button
type="button"
className="cb-ghost"
@@ -946,7 +945,7 @@ export function ContentBrowser() {
<div
key={path}
data-path={path}
- className={`asset${it.isDir ? ' folder' : ''}${selected === path ? ' sel' : ''}${it.isDir && dropFolder === path ? ' is-drop' : ''}`}
+ className={`asset${it.isDir ? ' folder' : ''}${selected === path ? ' sel' : ''}${it.isDir && dropFolder === path ? ' is-drop' : ''}${dragPath === path ? ' is-dragging' : ''}`}
// Files drag onto inspector asset fields / the viewport (assign / instantiate);
// folders are drop targets that move the dragged asset into them.
{...bindItem(path, it)}
@@ -979,7 +978,7 @@ export function ContentBrowser() {
})}
{!listLoading && items.length === 0 && (
<div className="cb-empty" style={{ gridColumn: '1 / -1' }}>
- {q ? 'No assets match.' : 'Empty folder.'}
+ {q ? 'No assets match.' : 'Empty folder — drag files here or use Import.'}
</div>
)}
</div>
@@ -1007,7 +1006,7 @@ export function ContentBrowser() {
<div
key={path}
data-path={path}
- className={`lr${selected === path ? ' sel' : ''}${it.isDir && dropFolder === path ? ' is-drop' : ''}`}
+ className={`lr${selected === path ? ' sel' : ''}${it.isDir && dropFolder === path ? ' is-drop' : ''}${dragPath === path ? ' is-dragging' : ''}`}
{...bindItem(path, it)}
{...(it.isDir ? folderDrop(path) : null)}
>
@@ -1028,7 +1027,7 @@ export function ContentBrowser() {
);
})}
{!listLoading && items.length === 0 && (
- <div className="cb-empty">{q ? 'No assets match.' : 'Empty folder.'}</div>
+ <div className="cb-empty">{q ? 'No assets match.' : 'Empty folder — drag files here or use Import.'}</div>
)}
</div>
)}
diff --git a/desktop/src/panels/Details.tsx b/desktop/src/panels/Details.tsx
index 637c2ae29..8c230427a 100644
--- a/desktop/src/panels/Details.tsx
+++ b/desktop/src/panels/Details.tsx
@@ -62,6 +62,7 @@ import {
} from '@/material/materialInspectorModel';
import { ContextMenu } from '@/components/Menu';
import { Popover, usePopover } from '@/components/Popover';
+import { SearchField } from '@/components/SearchField';
import { Select } from '@/components/Select';
import { AddComponentMenu } from '@/components/AddComponentMenu';
import type { InspectorComponent, InspectorField, InspectorFieldValue, EntityId, NodeKind, EnumOption, AssetType, GradientValue, GradientStop, CurveValue, CurveKey, DimensionValue } from '@/types';
@@ -305,10 +306,7 @@ export function EnumControl({
{pop.anchor && (
<Popover anchor={pop.anchor} width={Math.max(pop.anchor.width, 150)} onClose={close}>
{searchable && (
- <div className="dd-search">
- <Search size={12} strokeWidth={2} />
- <input autoFocus placeholder="Search" value={q} spellCheck={false} onChange={(e) => setQ(e.target.value)} />
- </div>
+ <SearchField flush className="dd-search" iconSize={12} autoFocus placeholder="Search" value={q} onChange={setQ} />
)}
<div className="dd-list">
{filtered.map((o) => (
@@ -1009,10 +1007,7 @@ export function AssetControl({
)}
{pop.anchor && (
<Popover anchor={pop.anchor} width={Math.max(pop.anchor.width, 240)} onClose={close}>
- <div className="dd-search">
- <Search size={12} strokeWidth={2} />
- <input autoFocus placeholder="Search assets" value={q} spellCheck={false} onChange={(e) => setQ(e.target.value)} />
- </div>
+ <SearchField flush className="dd-search" iconSize={12} autoFocus placeholder="Search assets" value={q} onChange={setQ} />
<div className="asset-grid">
<button type="button" className={`asset-opt${value === 0 || !info ? ' on' : ''}`} onClick={() => pick(0)}>
<span className="th">
@@ -2055,15 +2050,7 @@ function EditorDetails() {
return (
<div className="insp">
<div className="insp-head">
- <div className="search">
- <Search size={13} strokeWidth={1.9} />
- <input
- placeholder="Search"
- value={query}
- spellCheck={false}
- onChange={(e) => setQuery(e.target.value)}
- />
- </div>
+ <SearchField placeholder="Search" value={query} onChange={setQuery} />
<button
type="button"
className={`filt-btn${filtOn ? ' on' : ''}`}
diff --git a/desktop/src/panels/Outliner.tsx b/desktop/src/panels/Outliner.tsx
index 2a895db3c..7e9b6fe91 100644
--- a/desktop/src/panels/Outliner.tsx
+++ b/desktop/src/panels/Outliner.tsx
@@ -2,6 +2,7 @@
// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
import { useEffect, useMemo, useRef, useState, useSyncExternalStore } from 'react';
import { Search, Plus, FolderPlus, ArrowDownUp } from 'lucide-react';
+import { SearchField } from '@/components/SearchField';
import { useEditorStore } from '@/store/editorStore';
import { useSelection } from '@/store/selectionStore';
import { EngineHost } from '@/engine/EngineHost';
@@ -626,15 +627,7 @@ export function Outliner() {
) : (
<>
<div className="phead">
- <div className="search">
- <Search size={13} strokeWidth={1.85} />
- <input
- placeholder="Search · type: comp:"
- spellCheck={false}
- value={query}
- onChange={(e) => setQuery(e.target.value)}
- />
- </div>
+ <SearchField placeholder="Search · type: comp:" value={query} onChange={setQuery} />
<button
type="button"
className={`pbtn${sortMode !== 'manual' ? ' on' : ''}`}
@@ -675,6 +668,7 @@ export function Outliner() {
<div className="empty">
<Search size={22} strokeWidth={1.4} />
<p>{engine.status === 'ready' ? 'No entities in scene.' : 'Waiting for engine…'}</p>
+ {engine.status === 'ready' && <small>Right-click here or use the + button to add one.</small>}
</div>
</div>
) : items.length === 0 ? (
diff --git a/desktop/src/panels/OutputLog.tsx b/desktop/src/panels/OutputLog.tsx
index a187d723d..9d7693ae8 100644
--- a/desktop/src/panels/OutputLog.tsx
+++ b/desktop/src/panels/OutputLog.tsx
@@ -9,9 +9,10 @@ import {
useSyncExternalStore,
} from 'react';
import { createPortal } from 'react-dom';
-import { Trash2, ArrowDownToLine, Search, Clock, ListFilter, Check } from 'lucide-react';
+import { Trash2, ArrowDownToLine, Clock, ListFilter, Check } from 'lucide-react';
import { LogStore, type LogLevel, type LogEntry } from '@/store/LogStore';
import { ContextMenu, type MenuItem } from '@/components/Menu';
+import { SearchField } from '@/components/SearchField';
import { Toasts } from '@/store/Toasts';
type Filter = 'all' | LogLevel;
@@ -229,15 +230,7 @@ export function OutputLog() {
<Chip id="warn" label="Warnings" count={counts.warn} />
<Chip id="error" label="Errors" count={counts.error} />
</div>
- <div className="log-search">
- <Search size={12} strokeWidth={1.9} />
- <input
- value={query}
- spellCheck={false}
- placeholder="Filter"
- onChange={(e) => setQuery(e.target.value)}
- />
- </div>
+ <SearchField className="log-search" iconSize={12} placeholder="Filter" value={query} onChange={setQuery} />
<button
type="button"
className={`pbtn${hidden.size > 0 ? ' on' : ''}`}
@@ -275,7 +268,7 @@ export function OutputLog() {
))}
{visible.length === 0 && (
<div className="log-empty">
- {entries.length === 0 ? 'No log output yet.' : 'No entries match the filter.'}
+ {entries.length === 0 ? 'No log output yet — engine and script logs appear here.' : 'No entries match the filter.'}
</div>
)}
</div>
diff --git a/desktop/src/theme/app.css b/desktop/src/theme/app.css
index 5b29b1162..235d1be02 100644
--- a/desktop/src/theme/app.css
+++ b/desktop/src/theme/app.css
@@ -142,6 +142,13 @@
font-size: var(--fs-sm);
max-width: 200px;
}
+/* secondary "what to do next" line under the status */
+.empty small {
+ margin: -6px 0 0;
+ font-size: var(--fs-xs);
+ color: var(--text-mute);
+ max-width: 220px;
+}
/* -------------------------------------------------------------- viewport --- */
.viewport {
diff --git a/desktop/src/theme/content.css b/desktop/src/theme/content.css
index e1e1f55f9..55844d120 100644
--- a/desktop/src/theme/content.css
+++ b/desktop/src/theme/content.css
@@ -13,6 +13,7 @@
.cb-head .sp { flex: 1; }
.cb-ico { width: 22px; height: 22px; display: grid; place-items: center; color: var(--text-mute); border-radius: var(--r-sm); transition: color var(--t-fast), background var(--t-fast); }
.cb-ico:hover { color: var(--text); background: var(--srf-4); }
+.cb-ico:active { background: var(--srf-5); }
/* ── Sources (left) ── */
.cb-src { width: 168px; flex-shrink: 0; border-right: 1px solid var(--border); }
@@ -35,7 +36,8 @@
.cb-bar { display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px; border-bottom: 1px solid var(--border); flex-shrink: 0; background: var(--srf-2); }
.cb-nav { display: flex; gap: 1px; }
.cb-nav button { width: 26px; height: 26px; display: grid; place-items: center; color: var(--text-dim); border-radius: var(--r-sm); transition: color var(--t-fast), background var(--t-fast); }
-.cb-nav button:hover { color: var(--text); background: var(--srf-4); }
+.cb-nav button:hover:not(:disabled) { color: var(--text); background: var(--srf-4); }
+.cb-nav button:active:not(:disabled) { background: var(--srf-5); }
.cb-nav button:disabled { color: var(--text-mute); opacity: 0.4; }
.crumbs { display: flex; align-items: center; gap: 2px; font-size: var(--fs-sm); min-width: 0; flex: 1; overflow: hidden; }
.crumbs .cr { padding: 3px 6px; border-radius: var(--r-sm); color: var(--text-dim); cursor: pointer; white-space: nowrap; transition: color var(--t-fast), background var(--t-fast); }
@@ -49,6 +51,7 @@
.cb-add:disabled { opacity: 0.45; }
.cb-ghost { width: 26px; height: 26px; display: grid; place-items: center; color: var(--text-dim); background: var(--srf-3); border: 1px solid var(--border-line); border-radius: var(--r-sm); flex-shrink: 0; transition: color var(--t-fast), background var(--t-fast); }
.cb-ghost:hover { color: var(--text); background: var(--srf-4); }
+.cb-ghost:active { background: var(--srf-5); }
/* Inline rename editor (tiles + list rows). */
.cb-rename { width: 100%; min-width: 0; font: inherit; color: var(--text); background: var(--inset); border: 1px solid var(--acc); border-radius: var(--r-xs); padding: 1px 4px; outline: none; text-align: center; }
@@ -73,6 +76,8 @@
.asset { position: relative; border-radius: var(--r-md); cursor: pointer; outline: 1px solid transparent; transition: outline-color var(--t-fast), transform var(--t-fast); }
.asset:hover { outline-color: var(--border-line); transform: translateY(-1px); }
.asset.sel { outline: 2px solid var(--acc); }
+/* drag source dims while its ghost travels */
+.asset.is-dragging, .lr.is-dragging { opacity: 0.45; }
.asset .th { position: relative; width: 100%; aspect-ratio: 1; border-radius: var(--r-md) var(--r-md) 0 0; display: grid; place-items: center; color: rgba(255, 255, 255, 0.85); overflow: hidden; background: var(--srf-4); }
.asset .th img { width: 100%; height: 100%; object-fit: cover; }
.asset .th .badge { position: absolute; top: 5px; left: 5px; font-size: var(--fs-3xs); font-weight: 700; letter-spacing: 0.4px; padding: 1px 4px; border-radius: var(--r-xs); background: rgba(0, 0, 0, 0.5); color: #fff; font-family: var(--mono); }
@@ -130,8 +135,10 @@
.cb-mr .v { color: var(--text-dim); font-family: var(--mono); font-size: var(--fs-xs); }
.cb-act { padding: 11px 13px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 7px; }
.cb-act button { height: 30px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: var(--fs-sm); border-radius: var(--r-sm); transition: background var(--t-fast); }
-.cb-act .primary { background: var(--acc); color: var(--on-accent); font-weight: 600; }
-.cb-act .primary:hover { background: var(--acc-hi); }
+/* Outlined like .cb-add — the accent fill stays reserved for Play. */
+.cb-act .primary { background: var(--srf-3); color: var(--star-hi); border: 1px solid var(--star-line); font-weight: 600; }
+.cb-act .primary:hover { background: var(--star-dim); }
+.cb-act .primary:active { background: var(--star-soft); }
.cb-act .ghost { background: var(--srf-3); color: var(--text-dim); border: 1px solid var(--border-line); }
.cb-act .ghost:hover { color: var(--text); background: var(--srf-4); }
diff --git a/desktop/src/theme/controls.css b/desktop/src/theme/controls.css
index e8ee8a849..9fc3f04ad 100644
--- a/desktop/src/theme/controls.css
+++ b/desktop/src/theme/controls.css
@@ -55,6 +55,46 @@
.sel-trigger > svg { color: var(--text-mute); flex-shrink: 0; }
.sel-trigger .dd-val { flex: 1; }
+/* — Search/filter field (components/SearchField.tsx). One recipe for every
+ panel filter; usage sites keep only layout deltas (width/height/margin).
+ The flush variant is the popover-internal border-bottom row. — */
+.search {
+ flex: 1;
+ height: 24px;
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ background: var(--inset);
+ border: 1px solid var(--border);
+ border-radius: var(--r-sm);
+ padding: 0 8px;
+ color: var(--text-mute);
+ transition: border-color var(--t-fast), box-shadow var(--t-fast);
+}
+.search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
+.search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: var(--fs-sm); color: var(--text); }
+.search input::placeholder { color: var(--text-mute); }
+.search > svg { flex-shrink: 0; }
+.search--flush {
+ flex: none;
+ height: auto;
+ background: none;
+ border: none;
+ border-bottom: 1px solid var(--border);
+ border-radius: 0;
+ padding: 4px 7px;
+}
+.search--flush:focus-within { border-color: var(--border); box-shadow: none; }
+
+/* — Pill toggle switch (inspector booleans, settings; `.mixed` = a multi-select
+ value the selection disagrees on) — */
+.toggle { width: 30px; height: 17px; border-radius: var(--r-pill); background: var(--srf-5); position: relative; cursor: pointer; flex-shrink: 0; transition: background var(--t-fast); }
+.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--text-dim); transition: left var(--t-fast) var(--e-out), background var(--t-fast); }
+.toggle.on { background: var(--acc); }
+.toggle.on::after { left: 15px; background: var(--on-accent); }
+.toggle.mixed { background: var(--srf-5); }
+.toggle.mixed::after { left: 50%; transform: translateX(-50%); background: var(--text-mute); }
+
/* — Unsaved-changes dot (components/DirtyDot.tsx) — */
.dirty-dot { color: var(--sel); font-size: 0.7em; line-height: 1; }
diff --git a/desktop/src/theme/inspector.css b/desktop/src/theme/inspector.css
index 12ce606d9..1aa05b983 100644
--- a/desktop/src/theme/inspector.css
+++ b/desktop/src/theme/inspector.css
@@ -8,24 +8,6 @@
bare `.pill` is the Output Log filter pill elsewhere).
========================================================================== */
-/* panel search field (shared header control the inspector head reuses) */
-.search {
- flex: 1;
- height: 24px;
- display: flex;
- align-items: center;
- gap: 6px;
- background: var(--inset);
- border: 1px solid var(--border);
- border-radius: var(--r-sm);
- padding: 0 8px;
- color: var(--text-mute);
- transition: border-color var(--t-fast), box-shadow var(--t-fast);
-}
-.search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
-.search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: var(--fs-sm); color: var(--text); }
-.search input::placeholder { color: var(--text-mute); }
-
/* ════════════════════════ INSPECTOR (Details) ════════════════════════ */
.insp { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.insp-head { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
@@ -39,6 +21,7 @@
.insp-add:hover { background: var(--star-dim); }
.filt-btn { width: 28px; height: 26px; display: grid; place-items: center; color: var(--text-mute); border: 1px solid var(--border-line); border-radius: var(--r-sm); flex-shrink: 0; transition: color var(--t-fast), background var(--t-fast), border-color var(--t-fast); }
.filt-btn:hover { color: var(--text); background: var(--srf-4); }
+.filt-btn:active { background: var(--srf-5); }
.filt-btn.on { color: var(--warn); border-color: rgba(211,162,60,0.4); background: rgba(211,162,60,0.12); }
/* Add Component at the TOP of Details */
.insp-addrow { padding: 8px; border-bottom: 1px solid var(--border); }
@@ -159,6 +142,7 @@
.curve-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.curve-line { fill: none; stroke: var(--acc); stroke-width: 1.5px; }
.curve-pt { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--text); border: 2px solid var(--srf-2); transform: translate(-50%, -50%); cursor: grab; box-shadow: 0 0 0 1px rgba(0,0,0,.4); }
+.curve-pt:active { cursor: grabbing; }
.curve-pt.on { background: var(--acc-hi); }
.curve-edit { display: flex; align-items: center; gap: 10px; font-size: var(--fs-xs); color: var(--text-dim); }
.curve-kv { font-family: var(--mono); }
@@ -178,9 +162,8 @@
.dd-trigger:hover > svg { color: var(--text-dim); }
.popover { position: fixed; z-index: var(--z-popover); background: var(--srf-3); border: 1px solid var(--border-line); border-radius: var(--r-md); box-shadow: var(--shadow-3); padding: 3px; max-height: 320px; display: flex; flex-direction: column; min-width: 0; }
-.dd-search { display: flex; align-items: center; gap: 6px; padding: 4px 7px; margin-bottom: 2px; border-bottom: 1px solid var(--border); color: var(--text-mute); flex-shrink: 0; }
-.dd-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font-size: var(--fs-sm); }
-.dd-search input::placeholder { color: var(--text-mute); }
+/* popover-internal filter = the shared flush SearchField */
+.dd-search { margin-bottom: 2px; flex-shrink: 0; }
.dd-list { overflow-y: auto; display: flex; flex-direction: column; min-height: 0; }
.dd-opt { display: flex; align-items: center; gap: 7px; height: 25px; padding: 0 8px; background: none; border: none; color: var(--text-dim); font-size: var(--fs-sm); text-align: left; cursor: pointer; border-radius: var(--r-sm); }
.dd-opt:hover { background: var(--acc-soft); color: var(--text); }
@@ -204,16 +187,11 @@
.asset-opt .an { width: 100%; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.asset-grid .dd-empty { grid-column: 1 / -1; }
-/* multi-select: a value the selection disagrees on (shows a "—" placeholder) */
+/* multi-select: a value the selection disagrees on (shows a "—" placeholder).
+ The pill toggle itself (incl. .mixed) is the shared primitive in controls.css. */
.prop.mixed .prop-label { color: var(--text-mute); }
-.toggle.mixed { background: var(--srf-5); }
-.toggle.mixed::after { left: 50%; transform: translateX(-50%); background: var(--text-mute); }
.comp-chk.mixed { background: var(--srf-5); border-color: var(--border-line); color: var(--text-mute); }
.ent-multi { display: flex; align-items: center; color: var(--text-dim); font-weight: 600; }
-.toggle { width: 30px; height: 17px; border-radius: var(--r-pill); background: var(--srf-5); position: relative; cursor: pointer; flex-shrink: 0; transition: background var(--t-fast); }
-.toggle::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--text-dim); transition: left var(--t-fast) var(--e-out), background var(--t-fast); }
-.toggle.on { background: var(--acc); }
-.toggle.on::after { left: 15px; background: var(--on-accent); }
.assetref { flex: 1; min-width: 0; height: 22px; display: flex; align-items: center; gap: 6px; padding: 0 6px 0 3px; background: var(--inset); border: 1px solid var(--border); border-radius: var(--r-sm); transition: border-color var(--t-fast); cursor: pointer; }
.assetref:hover { border-color: var(--border-line); }
.assetref.is-over { border-color: var(--acc); background: var(--acc-soft); }
@@ -255,6 +233,6 @@
.im-in { background: var(--void); border: 1px solid var(--border); border-radius: var(--r-xs); padding: 2px 5px; color: var(--text); font-size: var(--fs-xs); min-width: 0; }
.im-in.kind { flex-shrink: 0; }
.im-in.num { width: 54px; font-family: var(--mono); }
-.im-x { color: var(--text-mute); width: 18px; height: 18px; border-radius: var(--r-xs); flex-shrink: 0; line-height: 1; }
-.im-x:hover { color: var(--error); }
+.im-x { color: var(--text-mute); width: 18px; height: 18px; border-radius: var(--r-xs); flex-shrink: 0; line-height: 1; transition: color var(--t-fast), background var(--t-fast); }
+.im-x:hover { color: var(--error); background: var(--srf-4); }
.im-addb { align-self: flex-start; }
diff --git a/desktop/src/theme/launcher.css b/desktop/src/theme/launcher.css
index 256913117..ea0ce2408 100644
--- a/desktop/src/theme/launcher.css
+++ b/desktop/src/theme/launcher.css
@@ -186,28 +186,13 @@
gap: 10px;
}
+/* shared SearchField, sized for the launcher header (keeps the launcher's
+ softer radius; the look and focus ring come from the shared recipe) */
.lc-search {
- display: flex;
- align-items: center;
- gap: 7px;
- padding: 6px 11px;
+ flex: none;
width: 210px;
- background: var(--input);
- border: 1px solid var(--line);
+ height: 30px;
border-radius: var(--r-md);
- color: var(--text-faint);
-}
-.lc-search input {
- flex: 1;
- min-width: 0;
- background: none;
- border: none;
- outline: none;
- color: var(--text);
- font-size: var(--fs-sm);
-}
-.lc-search input::placeholder {
- color: var(--text-faint);
}
/* ----------------------------------------------------------- grid cards --- */
diff --git a/desktop/src/theme/log.css b/desktop/src/theme/log.css
index 16d7717cb..116721c4c 100644
--- a/desktop/src/theme/log.css
+++ b/desktop/src/theme/log.css
@@ -21,29 +21,16 @@
}
.log-chip .d { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.log-chip:hover { color: var(--text-dim); }
+.log-chip:active { background: var(--srf-5); }
.log-chip.on { background: var(--srf-4); color: var(--text-dim); }
.log-chip.info.on { color: var(--acc-hi); }
.log-chip.warn.on { color: var(--warn); }
.log-chip.error.on { color: var(--error); }
.log-chip .ct { font-variant-numeric: tabular-nums; opacity: 0.85; }
-.log-search {
- margin-left: auto;
- flex: 0 1 150px;
- height: 24px;
- display: flex;
- align-items: center;
- gap: 6px;
- background: var(--inset);
- border: 1px solid var(--border);
- border-radius: var(--r-sm);
- padding: 0 8px;
- color: var(--text-mute);
- transition: border-color var(--t-fast);
-}
-.log-search:focus-within { border-color: var(--acc); }
-.log-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: var(--fs-xs); color: var(--text); }
-.log-search input::placeholder { color: var(--text-mute); }
+/* shared SearchField, right-aligned in the header row */
+.log-search { margin-left: auto; flex: 0 1 150px; }
+.log-search input { font-size: var(--fs-xs); }
/* The log is a selectable text stream (UE5): drag to select across lines, then
Ctrl+C / right-click Copy. The shell sets `user-select: none` globally, so the
diff --git a/desktop/src/theme/material.css b/desktop/src/theme/material.css
index fb6369120..43152d8a4 100644
--- a/desktop/src/theme/material.css
+++ b/desktop/src/theme/material.css
@@ -31,6 +31,7 @@
.mg-node { width: 100%; height: 100%; background: var(--srf-2); border: 1px solid var(--border-line); border-radius: var(--r-lg); box-shadow: var(--shadow-1); user-select: none; overflow: hidden; }
.mg-node.sel { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc), var(--shadow-1); }
.mg-node-head { height: 28px; display: flex; align-items: center; padding: 0 10px; font-size: var(--fs-xs); font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); cursor: grab; background: var(--srf-3); }
+.mg-node-head:active { cursor: grabbing; }
.mg-node .mg-row, .mg-node .mg-param { display: flex; align-items: center; gap: 6px; padding: 0 10px; }
.mg-row-label { font-size: var(--fs-2xs); color: var(--text-dim); }
.mg-param .mg-row-label { min-width: 38px; }
diff --git a/desktop/src/theme/menus.css b/desktop/src/theme/menus.css
index 36b288c94..219843157 100644
--- a/desktop/src/theme/menus.css
+++ b/desktop/src/theme/menus.css
@@ -89,8 +89,9 @@
from { transform: translateY(-10px) scale(0.98); }
to { transform: translateY(0) scale(1); }
}
-.ac-search { display: flex; align-items: center; gap: 9px; padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-mute); }
-.ac-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: var(--fs-md); color: var(--text); }
+/* shared flush SearchField at palette scale */
+.ac-search { gap: 9px; padding: 12px 14px; }
+.ac-search input { font-size: var(--fs-md); }
.ac-search .esc { font-size: var(--fs-2xs); border: 1px solid var(--border-line); border-radius: 2px; padding: 1px 5px; }
.ac-body { overflow-y: auto; padding: 6px; }
.ac-sec { font-size: var(--fs-2xs); text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-mute); font-weight: 700; padding: 8px 10px 4px; }
@@ -135,8 +136,8 @@
/* ── New Tilemap tileset chooser ── */
.tmpick { display: flex; flex-direction: column; gap: 10px; }
.tmpick__hint { font-size: var(--fs-sm); color: var(--text-mute); }
-.tmpick__search { width: 100%; padding: 7px 10px; background: var(--srf-3); border: 1px solid var(--border-line); border-radius: var(--r-md); color: var(--text); font: inherit; }
-.tmpick__search:focus { outline: none; border-color: var(--acc); }
+/* shared SearchField, full-width in the dialog column */
+.tmpick__search { flex: none; width: 100%; height: 30px; border-radius: var(--r-md); }
.tmpick__list { display: flex; flex-direction: column; gap: 3px; max-height: 320px; overflow-y: auto; }
.tmpick__item { display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: var(--srf-3); border: 1px solid transparent; border-radius: var(--r-md); color: var(--text-dim); cursor: pointer; text-align: left; font: inherit; }
.tmpick__item:hover { color: var(--text); border-color: var(--acc); background: var(--srf-2); }
diff --git a/desktop/src/theme/nodegraph.css b/desktop/src/theme/nodegraph.css
index 6710b236d..1bb48e752 100644
--- a/desktop/src/theme/nodegraph.css
+++ b/desktop/src/theme/nodegraph.css
@@ -46,6 +46,7 @@
}
.ng-node { position: absolute; box-sizing: border-box; cursor: grab; user-select: none; }
+.ng-node:active { cursor: grabbing; }
.ng-node.droppable { outline: 2px dashed var(--star-line); outline-offset: 3px; }
/* Output handle (right): drag it to another node to connect. */
@@ -140,9 +141,10 @@
.ng-btn:not(:disabled):hover { background: var(--srf-4); }
.ng-btn:not(:disabled):active { background: var(--srf-5); }
.ng-btn:disabled { opacity: 0.45; cursor: default; }
-.ng-btn.primary { background: var(--star); border-color: transparent; color: var(--on-accent); }
-.ng-btn.primary:not(:disabled):hover { background: var(--star-hi); }
-.ng-btn.primary:not(:disabled):active { background: var(--star-deep); }
+/* Outlined, not filled — the accent fill is reserved for Play. */
+.ng-btn.primary { background: transparent; border-color: var(--star-line); color: var(--star-hi); font-weight: 600; }
+.ng-btn.primary:not(:disabled):hover { background: var(--star-dim); }
+.ng-btn.primary:not(:disabled):active { background: var(--star-soft); }
.ng-doc-title {
display: inline-flex;
diff --git a/desktop/src/theme/outliner.css b/desktop/src/theme/outliner.css
index e90a38f3b..ee4fe7d83 100644
--- a/desktop/src/theme/outliner.css
+++ b/desktop/src/theme/outliner.css
@@ -26,6 +26,8 @@
transition: color var(--t-fast), background var(--t-fast);
}
.pbtn:hover { color: var(--text); background: var(--srf-4); }
+.pbtn:active { background: var(--srf-5); }
+.pbtn:disabled { opacity: 0.4; cursor: default; }
.pbtn.on { color: var(--acc); }
.pbody { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; }
diff --git a/desktop/src/theme/profiler.css b/desktop/src/theme/profiler.css
index 955a4384a..a608323ba 100644
--- a/desktop/src/theme/profiler.css
+++ b/desktop/src/theme/profiler.css
@@ -56,7 +56,9 @@
padding: 2px 10px;
cursor: pointer;
}
-.prof-btn:hover { color: var(--text-hi); border-color: var(--star-line, var(--star)); }
+.prof-btn { transition: color var(--t-fast), background var(--t-fast); }
+.prof-btn:hover { color: var(--text-hi); background: var(--srf-4); }
+.prof-btn:active { background: var(--srf-5); }
.prof-btn.on { color: var(--star-hi, var(--star)); border-color: var(--star); } /* frozen → "Live" is armed */
.prof-btn.rec { color: var(--error, #d3564b); border-color: var(--error, #d3564b); }
.prof-check { display: flex; align-items: center; gap: 4px; color: var(--text-mute); cursor: pointer; }
diff --git a/desktop/src/theme/sequencer.css b/desktop/src/theme/sequencer.css
index 72bf1de07..09d48c8ec 100644
--- a/desktop/src/theme/sequencer.css
+++ b/desktop/src/theme/sequencer.css
@@ -42,6 +42,7 @@
transition: background var(--t-fast) var(--e-out), color var(--t-fast) var(--e-out);
}
.seq-btn:hover:not(:disabled) { background: var(--raised); color: var(--text); }
+.seq-btn:active:not(:disabled) { background: var(--srf-5); }
.seq-btn:disabled { opacity: 0.4; cursor: default; }
.seq-btn.on { color: var(--acc-hi); }
.seq-btn--text span { font-size: var(--fs-xs); }
@@ -57,7 +58,9 @@
.seq-tab {
border: 0; background: transparent; color: var(--text-mute); cursor: pointer;
font-size: var(--fs-xs); padding: 3px 9px; border-radius: var(--r-sm);
+ transition: color var(--t-fast);
}
+.seq-tab:not(.active):hover { color: var(--text); }
.seq-tab.active { background: var(--raised); color: var(--text); }
/* ── body: track list | timeline ── */
@@ -85,6 +88,9 @@
}
.seq-row--entity { background: var(--srf-3); cursor: pointer; }
.seq-row--component { background: color-mix(in srgb, var(--srf-3) 50%, transparent); cursor: pointer; font-size: var(--fs-xs); }
+/* clickable group rows highlight like every other list row */
+.seq-row--entity:hover { background: var(--srf-4); }
+.seq-row--component:hover { background: color-mix(in srgb, var(--srf-4) 60%, transparent); }
.seq-row--entity .seq-row__label { font-weight: 600; }
.seq-row__label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seq-row--channel .seq-row__label { color: var(--text-dim); font-family: var(--mono); font-size: var(--fs-xs); }
diff --git a/desktop/src/theme/settings.css b/desktop/src/theme/settings.css
index 4b65c9014..ce681d5fd 100644
--- a/desktop/src/theme/settings.css
+++ b/desktop/src/theme/settings.css
@@ -48,22 +48,8 @@
.set-title { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: var(--fs-lg); }
.set-title .ic { color: var(--text-dim); display: inline-flex; }
.set-head-sp { flex: 1; }
-.set-search {
- display: inline-flex;
- align-items: center;
- gap: 6px;
- width: 220px;
- height: 28px;
- padding: 0 9px;
- background: var(--inset);
- border: 1px solid var(--border);
- border-radius: var(--r-sm);
- color: var(--text-mute);
- transition: border-color var(--t-fast), box-shadow var(--t-fast);
-}
-.set-search:focus-within { border-color: var(--acc); box-shadow: 0 0 0 2px var(--acc-soft); }
-.set-search input { flex: 1; min-width: 0; background: none; border: none; outline: none; font-size: var(--fs-sm); color: var(--text); }
-.set-search input::placeholder { color: var(--text-mute); }
+/* shared SearchField, sized for the dialog header */
+.set-search { flex: none; width: 220px; height: 28px; }
.set-x { width: 28px; height: 28px; display: grid; place-items: center; color: var(--text-mute); border-radius: var(--r-sm); }
.set-x:hover { color: var(--text); background: var(--srf-4); }
@@ -216,27 +202,4 @@
}
.set-swatch.on { box-shadow: 0 0 0 2px var(--srf-2), 0 0 0 4px var(--acc); }
-/* Pill toggle (the design's `.toggle`; not yet in the shared theme). */
-.toggle {
- width: 30px;
- height: 17px;
- border-radius: var(--r-pill);
- background: var(--srf-5);
- position: relative;
- cursor: pointer;
- flex-shrink: 0;
- transition: background var(--t-fast);
-}
-.toggle::after {
- content: '';
- position: absolute;
- top: 2px;
- left: 2px;
- width: 13px;
- height: 13px;
- border-radius: 50%;
- background: var(--text-dim);
- transition: left var(--t-fast) var(--e-out), background var(--t-fast);
-}
-.toggle.on { background: var(--acc); }
-.toggle.on::after { left: 15px; background: var(--on-accent); }
+/* The pill toggle is the shared `.toggle` primitive (controls.css). */
diff --git a/desktop/src/theme/tilemap.css b/desktop/src/theme/tilemap.css
index 874144d37..f20096183 100644
--- a/desktop/src/theme/tilemap.css
+++ b/desktop/src/theme/tilemap.css
@@ -105,7 +105,9 @@
color: var(--text-dim);
cursor: pointer;
}
-.tp-tool:hover { color: var(--text); border-color: var(--srf-4); }
+.tp-tool:not(:disabled):hover { color: var(--text); background: var(--srf-4); }
+.tp-tool:not(:disabled):active { background: var(--srf-5); }
+.tp-tool:disabled { opacity: 0.4; cursor: default; }
.tp-tool.is-active {
background: var(--star);
border-color: var(--star);
@@ -134,7 +136,9 @@
color: var(--text-dim);
cursor: pointer;
}
-.tp-zbtn:hover { color: var(--text); border-color: var(--srf-4); }
+.tp-zbtn:not(:disabled):hover { color: var(--text); background: var(--srf-4); }
+.tp-zbtn:not(:disabled):active { background: var(--srf-5); }
+.tp-zbtn:disabled { opacity: 0.4; cursor: default; }
.tp-zpct {
min-width: 42px;
text-align: center;
@@ -175,7 +179,9 @@
cursor: pointer;
font: inherit;
text-align: left;
+ transition: color var(--t-fast), border-color var(--t-fast);
}
+.tp-terrain:not(.is-active):hover { border-color: var(--line-strong); color: var(--text); }
.tp-terrain.is-active { border-color: var(--star); color: var(--text); }
.tp-tswatch { width: 12px; height: 12px; border-radius: var(--r-xs); display: inline-block; }
diff --git a/desktop/src/theme/tileset.css b/desktop/src/theme/tileset.css
index 29c245539..2b4a500fe 100644
--- a/desktop/src/theme/tileset.css
+++ b/desktop/src/theme/tileset.css
@@ -44,19 +44,25 @@
.ts-grow { flex: 1 1 auto; }
.ts-stat { color: var(--text-faint); font-variant-numeric: tabular-nums; }
+/* Outlined, not filled — the accent fill is reserved for Play (one primary
+ action per screen); Save stays prominent through the accent stroke/text. */
.ts-save {
display: inline-flex;
align-items: center;
gap: 5px;
- background: var(--star);
- color: var(--on-accent);
- border: none;
+ background: transparent;
+ color: var(--star-hi);
+ border: 1px solid var(--star-line);
border-radius: var(--r-sm);
padding: 4px 9px;
cursor: pointer;
font: inherit;
+ font-weight: 600;
+ transition: background var(--t-fast);
}
-.ts-save:disabled { background: var(--srf-3); color: var(--text-faint); cursor: default; }
+.ts-save:not(:disabled):hover { background: var(--star-dim); }
+.ts-save:not(:disabled):active { background: var(--star-soft); }
+.ts-save:disabled { opacity: 0.45; cursor: default; }
.ts-canvas {
flex: 1 1 auto;
@@ -115,7 +121,9 @@
padding: 3px 8px;
cursor: pointer;
font: inherit;
+ transition: color var(--t-fast), border-color var(--t-fast);
}
+.ts-terrain:not(.is-active):hover { border-color: var(--line-strong); color: var(--text); }
.ts-terrain.is-active { border-color: var(--star); color: var(--text); }
.ts-tswatch { width: 11px; height: 11px; border-radius: var(--r-xs); display: inline-block; }
.ts-tmode { color: var(--text-faint); font-size: var(--fs-2xs); }