feat(scene-editor): add persistent dockable tool workspaces

This commit is contained in:
Codex
2026-11-04 00:39:39 +03:00
parent ecf53ce974
commit 972944e6f2
27 changed files with 1020 additions and 67 deletions
+11 -4
View File
@@ -1,4 +1,5 @@
import type { HTMLAttributes, ReactNode } from "react";
import { createGlassMaterialVariables, type GlassMaterialSettings } from "@nodedc/ui-core";
import type { CSSProperties, HTMLAttributes, ReactNode } from "react";
import { cn } from "./cn.js";
export type GlassTone = "default" | "strong" | "soft";
@@ -37,11 +38,17 @@ export function GlassSurface({
export interface GlassMaterialSurfaceProps extends HTMLAttributes<HTMLDivElement> {
children: ReactNode;
/** Scene telemetry uses the translucent V4 material, independent of modal density. */
context?: "floating" | "scene";
radius?: GlassRadius;
/** Per-instance appearance; never changes the global theme or other surfaces. */
material?: GlassMaterialSettings;
radiusPx?: number;
}
/** Canonical modal/Inspector material. General application panels must not use it. */
export function GlassMaterialSurface({ children, className, ...props }: GlassMaterialSurfaceProps) {
return <div className={cn("nodedc-glass-material", className)} {...props}>{children}</div>;
/** Canonical floating/scene-overlay material. Ordinary application panels stay matte. */
export function GlassMaterialSurface({ children, className, context = "floating", radius = "modal", material, radiusPx, style, ...props }: GlassMaterialSurfaceProps) {
return <div className={cn("nodedc-glass-material", className)} data-glass-context={context} data-radius={radius} style={{ ...material && createGlassMaterialVariables(material, context), ...Number.isFinite(radiusPx) && {borderRadius: Math.max(0, Math.min(120, radiusPx!))}, ...style } as CSSProperties} {...props}>{children}</div>;
}
export interface MapGlassSurfaceProps extends HTMLAttributes<HTMLDivElement> {