mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-03 00:47:53 +00:00
Bring the desktop app's UI in line with the webapp's brutalist design: flat near-black surfaces, white/15 hairline borders, square panels and modals, 3px corners on controls, white primary buttons, mono uppercase labels, and Archivo display headings. - Retoken the default theme, fonts, and global CSS to the webapp values - Port the webapp's restyled shared components (buttons, modals, popovers, tooltips, inputs, select, switch, model selector) - Restyle prompt boxes, galleries, lightbox, and the 3D scene editor - Render the webapp pricing table inside the desktop pricing modal (new @storyteller/ui-pricing-table package), keeping the Tauri purchase and plan-management flow - Restyle settings, login, credits, and provider modals - Restyle the top bar, task queue, create pages, and apps page
@storyteller/keybinds
Unified, customizable keyboard shortcuts for Artcraft. A single registry of
remappable actions, switchable presets (Gamer / Blender-like), per-user
overrides with conflict detection, and persistence — plus the UI primitives
(<Kbd>, key-capture input) used by the Settings pane and the cheatsheet.
The video editor keeps its own separate keybind system and is intentionally not covered here (Settings links out to it).
Concepts
- Action — a remappable operation (
registry.ts), id-namespaced by surface (pagescene.transform.translate). - Binding —
{ code, ctrl?, shift?, alt? }keyed by physicalevent.codeso WASD survives non-QWERTY layouts. - Preset — a named set of 3D binding deltas over the Gamer base
(
presets.ts). 2D/moodboard are preset-independent. - Store (
keybinds-store.ts) — zustand + persist; resolves override → preset → base.
Usage
import { useResolvedKeybinds } from "@storyteller/keybinds";
const { matchAction, forAction, slotBindings } = useResolvedKeybinds();
// in a keydown handler:
const action = matchAction(e, "pagescene");
if (action === "pagescene.transform.translate") setGizmoMode("translate");
Engine modules that aren't React can read useKeybindsStore.getState().resolveBindings(id).