From ff6b8833764340092bf4aa3bacdf3a77ff252a46 Mon Sep 17 00:00:00 2001 From: nodemode-ai Date: Fri, 4 Dec 2026 21:24:09 -0500 Subject: [PATCH 001/173] feat(commands): reserve the UV crate and the graph and UV groups fsh-uv is a new std-only crate in the workspace for the UV editor's layout work, and the command groups graph (the graph editor's services) and uv (UV editing) are reserved as empty modules chained into the catalogue, so the editor builders own their files by path. cargo check -p fsh-commands passes. --- native/Cargo.lock | 8 ++++++++ native/Cargo.toml | 2 ++ native/crates/fsh-commands/Cargo.toml | 1 + native/crates/fsh-commands/src/ext/graph.rs | 12 ++++++++++++ native/crates/fsh-commands/src/ext/mod.rs | 12 +++++++++++- native/crates/fsh-commands/src/ext/uv.rs | 12 ++++++++++++ native/crates/fsh-uv/Cargo.toml | 9 +++++++++ native/crates/fsh-uv/src/lib.rs | 2 ++ 8 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 native/crates/fsh-commands/src/ext/graph.rs create mode 100644 native/crates/fsh-commands/src/ext/uv.rs create mode 100644 native/crates/fsh-uv/Cargo.toml create mode 100644 native/crates/fsh-uv/src/lib.rs diff --git a/native/Cargo.lock b/native/Cargo.lock index 0759fa4a..2a287781 100644 --- a/native/Cargo.lock +++ b/native/Cargo.lock @@ -256,6 +256,7 @@ dependencies = [ "fsh-render-cpu", "fsh-render-gpu", "fsh-scene", + "fsh-uv", "pollster", "serde_json", ] @@ -361,6 +362,13 @@ dependencies = [ "serde_json", ] +[[package]] +name = "fsh-uv" +version = "0.10.0" +dependencies = [ + "fsh-core", +] + [[package]] name = "fsh-wasm" version = "0.10.0" diff --git a/native/Cargo.toml b/native/Cargo.toml index fb8a5ba1..8aac53c2 100644 --- a/native/Cargo.toml +++ b/native/Cargo.toml @@ -13,6 +13,7 @@ members = [ "crates/fsh-oidn", "crates/fsh-render-cpu", "crates/fsh-render-gpu", + "crates/fsh-uv", "crates/fsh-commands", "crates/fsh-cli", "crates/fsh-py", @@ -31,6 +32,7 @@ default-members = [ "crates/fsh-oidn", "crates/fsh-render-cpu", "crates/fsh-render-gpu", + "crates/fsh-uv", "crates/fsh-commands", "crates/fsh-cli", ] diff --git a/native/crates/fsh-commands/Cargo.toml b/native/crates/fsh-commands/Cargo.toml index cb39b239..e378b8ab 100644 --- a/native/crates/fsh-commands/Cargo.toml +++ b/native/crates/fsh-commands/Cargo.toml @@ -13,6 +13,7 @@ fsh-io = { path = "../fsh-io" } fsh-format = { path = "../fsh-format" } fsh-render-cpu = { path = "../fsh-render-cpu" } fsh-denoise = { path = "../fsh-denoise" } +fsh-uv = { path = "../fsh-uv" } serde_json = "1" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] diff --git a/native/crates/fsh-commands/src/ext/graph.rs b/native/crates/fsh-commands/src/ext/graph.rs new file mode 100644 index 00000000..a0f9946b --- /dev/null +++ b/native/crates/fsh-commands/src/ext/graph.rs @@ -0,0 +1,12 @@ +//! Services of the material graph editor window: node setups and the live material preview (0.11.0). + +use super::ExtCommand; +use crate::engine::{Engine, State}; +use crate::error::Result; +use serde_json::Value; + +pub(super) static COMMANDS: &[ExtCommand] = &[]; + +pub(super) fn dispatch(_engine: &Engine, _st: &mut State, _name: &str, _args: &Value) -> Option> { + None +} diff --git a/native/crates/fsh-commands/src/ext/mod.rs b/native/crates/fsh-commands/src/ext/mod.rs index 3d51f3a8..00a9fd35 100644 --- a/native/crates/fsh-commands/src/ext/mod.rs +++ b/native/crates/fsh-commands/src/ext/mod.rs @@ -11,6 +11,7 @@ pub(crate) mod cad; mod camera; pub(crate) mod configurator; pub(crate) mod denoise; +mod graph; mod handoff; mod image; pub(crate) mod import; @@ -22,6 +23,7 @@ pub(crate) mod output; pub(crate) mod shots; pub(crate) mod templates; pub(crate) mod transport; +mod uv; pub(crate) mod variants; pub(crate) mod video; @@ -56,6 +58,8 @@ pub(crate) fn commands() -> impl Iterator { .chain(anim::COMMANDS.iter()) .chain(video::COMMANDS.iter()) .chain(transport::COMMANDS.iter()) + .chain(graph::COMMANDS.iter()) + .chain(uv::COMMANDS.iter()) } /// Answers `name` when one of the groups owns it. @@ -111,5 +115,11 @@ pub(crate) fn dispatch(engine: &Engine, st: &mut State, name: &str, args: &Value if let Some(r) = video::dispatch(engine, st, name, args) { return Some(r); } - transport::dispatch(engine, st, name, args) + if let Some(r) = transport::dispatch(engine, st, name, args) { + return Some(r); + } + if let Some(r) = graph::dispatch(engine, st, name, args) { + return Some(r); + } + uv::dispatch(engine, st, name, args) } diff --git a/native/crates/fsh-commands/src/ext/uv.rs b/native/crates/fsh-commands/src/ext/uv.rs new file mode 100644 index 00000000..f2c3bac3 --- /dev/null +++ b/native/crates/fsh-commands/src/ext/uv.rs @@ -0,0 +1,12 @@ +//! UV editing for the UV editor window: layouts, unwrapping, relaxing, symmetry, packing and layout pictures (0.11.0). + +use super::ExtCommand; +use crate::engine::{Engine, State}; +use crate::error::Result; +use serde_json::Value; + +pub(super) static COMMANDS: &[ExtCommand] = &[]; + +pub(super) fn dispatch(_engine: &Engine, _st: &mut State, _name: &str, _args: &Value) -> Option> { + None +} diff --git a/native/crates/fsh-uv/Cargo.toml b/native/crates/fsh-uv/Cargo.toml new file mode 100644 index 00000000..e7598810 --- /dev/null +++ b/native/crates/fsh-uv/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "fsh-uv" +version = "0.10.0" +edition = "2021" +license = "Apache-2.0" +publish = false + +[dependencies] +fsh-core = { path = "../fsh-core" } diff --git a/native/crates/fsh-uv/src/lib.rs b/native/crates/fsh-uv/src/lib.rs new file mode 100644 index 00000000..bb6514ab --- /dev/null +++ b/native/crates/fsh-uv/src/lib.rs @@ -0,0 +1,2 @@ +//! UV layouts for FormShot's UV editor: seams, charts, conformal unwrapping, relaxing, symmetry, packing, stretch and +//! texel measures, and layout pictures (0.11.0). std only, so it builds for wasm32 too. From fda53003eaca53105c13a049194774ccbb5fc13b Mon Sep 17 00:00:00 2001 From: nodemode-ai Date: Fri, 4 Dec 2026 21:24:09 -0500 Subject: [PATCH 002/173] feat(ui): reserve the editor modules and share the editor window The UV editor, the shortcuts editor, workspaces and presentation mode get empty entry modules in the fixed module list, and the graph editor's floating window takes its storage key and title id as arguments so the other editors can open one of their own. tsc --noEmit passes. --- frontend/src/modules.ts | 8 ++++++++ frontend/src/ui/graph/window.ts | 14 +++++++------- frontend/src/ui/present/index.ts | 5 +++++ frontend/src/ui/shortcuts/index.ts | 5 +++++ frontend/src/ui/uv/index.ts | 5 +++++ frontend/src/ui/workspaces/index.ts | 5 +++++ 6 files changed, 35 insertions(+), 7 deletions(-) create mode 100644 frontend/src/ui/present/index.ts create mode 100644 frontend/src/ui/shortcuts/index.ts create mode 100644 frontend/src/ui/uv/index.ts create mode 100644 frontend/src/ui/workspaces/index.ts diff --git a/frontend/src/modules.ts b/frontend/src/modules.ts index 1c76f072..59410412 100644 --- a/frontend/src/modules.ts +++ b/frontend/src/modules.ts @@ -8,6 +8,10 @@ import { mount as importer } from './ui/import/index'; import { mount as handoff } from './ui/handoff/index'; import { mount as cad } from './ui/cad/index'; import { mount as render } from './ui/render/index'; +import { mount as uv } from './ui/uv/index'; +import { mount as shortcuts } from './ui/shortcuts/index'; +import { mount as workspaces } from './ui/workspaces/index'; +import { mount as present } from './ui/present/index'; export const MODULES: readonly ShellModule[] = [ { id: 'workspace', mount: workspace }, @@ -19,4 +23,8 @@ export const MODULES: readonly ShellModule[] = [ { id: 'handoff', mount: handoff }, { id: 'cad', mount: cad }, { id: 'render', mount: render }, + { id: 'uv', mount: uv }, + { id: 'shortcuts', mount: shortcuts }, + { id: 'workspaces', mount: workspaces }, + { id: 'present', mount: present }, ]; diff --git a/frontend/src/ui/graph/window.ts b/frontend/src/ui/graph/window.ts index 06682479..f30f5392 100644 --- a/frontend/src/ui/graph/window.ts +++ b/frontend/src/ui/graph/window.ts @@ -9,9 +9,9 @@ const MIN_W = 520; const MIN_H = 360; const EDGES = ['n', 's', 'e', 'w', 'ne', 'nw', 'se', 'sw'] as const; -function stored(): Box | null { +function stored(key: string): Box | null { try { - const v = JSON.parse(sessionStorage.getItem(STORE) ?? 'null') as Partial | null; + const v = JSON.parse(sessionStorage.getItem(key) ?? 'null') as Partial | null; if (v && [v.x, v.y, v.w, v.h].every((n) => typeof n === 'number' && Number.isFinite(n))) return v as Box; } catch { return null; } return null; @@ -27,11 +27,11 @@ export class EditorWindow { private before: Element | null = null; onClose: (() => void) | null = null; - constructor(host: HTMLElement) { - this.root = el(`