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
+6 -1
View File
@@ -1,5 +1,6 @@
import type { HTMLAttributes, ReactNode } from "react";
import { cn } from "./cn.js";
import {ApplicationPanelFullscreen} from "./ApplicationPanelFullscreen.js";
import { Icon, type IconName } from "./Icon.js";
export interface ApplicationShellProps extends Omit<HTMLAttributes<HTMLDivElement>, "content"> {
@@ -52,6 +53,8 @@ export interface ApplicationPanelProps extends Omit<HTMLAttributes<HTMLElement>,
title: ReactNode;
description?: ReactNode;
expanded?: boolean;
/** Enables full-window presentation requested by an owned viewer through context. */
allowFullscreen?: boolean;
expandLabel?: string;
closeLabel?: string;
onExpandedChange?: (expanded: boolean) => void;
@@ -76,6 +79,7 @@ export function ApplicationPanel({
title,
description,
expanded = false,
allowFullscreen = false,
expandLabel = "Развернуть окно",
closeLabel = "Закрыть окно",
onExpandedChange,
@@ -86,7 +90,7 @@ export function ApplicationPanel({
className,
...props
}: ApplicationPanelProps) {
return (
const panel = (
<section className={cn("nodedc-application-panel", className)} data-expanded={expanded ? "true" : undefined} {...props}>
<header className="nodedc-application-panel__head">
<div className="nodedc-application-panel__titles">
@@ -131,4 +135,5 @@ export function ApplicationPanel({
<div className="nodedc-application-panel__body">{children}</div>
</section>
);
return allowFullscreen ? <ApplicationPanelFullscreen>{panel}</ApplicationPanelFullscreen> : panel;
}