Integrate BIM entry hierarchy, durable retirement and viewport glass

This commit is contained in:
DCCONSTRUCTIONS
2026-11-14 20:44:00 +03:00
parent cd27a5e483
commit 9937eb66d8
23 changed files with 76 additions and 47 deletions
+4 -4
View File
@@ -10,7 +10,7 @@
"hasInstallScript": true,
"dependencies": {
"@noble/hashes": "^2.2.0",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.1.1.tgz",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.1.7.tgz",
"@nodedc/map-cesium-react": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/map-cesium-react",
"@nodedc/page-patterns": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/page-patterns",
"@nodedc/tokens": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/tokens",
@@ -884,9 +884,9 @@
}
},
"node_modules/@nodedc/bim-viewer": {
"version": "0.1.1",
"resolved": "file:../../vendor/bim/nodedc-bim-viewer-0.1.1.tgz",
"integrity": "sha512-x01cSS6nH2xhbZzkcl6JSlZmXQnQlifalLVwMd2prNsVJotT3Arj+PkWrLOkEypMY9yZKFmmDccgE8dATXEx7Q==",
"version": "0.1.7",
"resolved": "file:../../vendor/bim/nodedc-bim-viewer-0.1.7.tgz",
"integrity": "sha512-EN/3m7+Vk04NIEo/scV6XvGlFANefN6f7UZ3g3dNyDsM8Y4UzW4/ug1nxPXVDAa07uilZZVoR1tCJHh60tA6Gg==",
"peerDependencies": {
"@nodedc/ui-react": "0.7.0",
"react": ">=19 <20",
+1 -1
View File
@@ -15,7 +15,7 @@
},
"dependencies": {
"@noble/hashes": "^2.2.0",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.1.1.tgz",
"@nodedc/bim-viewer": "file:../../vendor/bim/nodedc-bim-viewer-0.1.7.tgz",
"@nodedc/map-cesium-react": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/map-cesium-react",
"@nodedc/page-patterns": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/page-patterns",
"@nodedc/tokens": "file:../../../NODEDC_DESIGN_GUIDELINE/packages/tokens",
+1 -1
View File
@@ -837,7 +837,7 @@ export default function App() {
/>
) : activeDefinition.kind === "missions" ? (
<div ref={setWorkspaceHeaderToolsHost} />
) : activeDefinition.kind === "vehicles" ? <div className="fleet-header-tools" ref={setWorkspaceHeaderToolsHost} /> : activeDefinition.kind === "simulations" ? <div className="ai-polygon__actions" ref={setWorkspaceHeaderToolsHost} /> : activeDefinition.kind === "datasets" ? (
) : activeDefinition.kind === "vehicles" || activeDefinition.kind === "architectural-projects" ? <div className="fleet-header-tools" ref={setWorkspaceHeaderToolsHost} /> : activeDefinition.kind === "simulations" ? <div className="ai-polygon__actions" ref={setWorkspaceHeaderToolsHost} /> : activeDefinition.kind === "datasets" ? (
<StatusBadge tone="neutral">Offline evaluation</StatusBadge>
) : activeDefinition.kind === "lab-archive" ? (
laboratoryAnnotation.control
@@ -2200,7 +2200,7 @@ function RerunViewportInstance({
/>
) : null}
{presentationStatus === "loading" ? (
<div className="rerun-viewport__notice" role="status">
<div data-glass-context="scene" className="rerun-viewport__notice nodedc-viewport-surface" role="status">
<span className="busy-indicator" aria-hidden="true" />
<div>
<strong>
@@ -2217,7 +2217,7 @@ function RerunViewportInstance({
</div>
) : null}
{presentationStatus === "error" ? (
<div className="rerun-viewport__notice rerun-viewport__notice--error" role="alert">
<div data-glass-context="scene" className="rerun-viewport__notice rerun-viewport__notice--error nodedc-viewport-surface" role="alert">
<div>
<strong>Источник не открыт</strong>
<span>Проверьте локальный поток Rerun или повторите подключение.</span>
@@ -66,7 +66,7 @@ export function SceneEditor({scene,editing,onModelState,modelUrl=roverModelURL,o
{scene.ready&&<PlayCanvasViewer modelUrl={modelUrl} onSceneReady={sceneReady} onSceneGraph={sceneGraph} minFitDistance={minFitDistance} postFx={scene.document.postFx} cameraAutoRotate={scene.document.cameraAutoRotate} cameraZoomStrength={scene.document.cameraZoomStrength} cameraResetToken={cameraReset} cameraState={scene.document.camera} onCameraChange={scene.recordCamera} materials={scene.document.materials} assignments={scene.document.assignments} objectAssignments={scene.document.objectAssignments} objectVisibility={scene.document.objectVisibility} legacyObjectVisibility={scene.document.objects} editing={editing} chargeState={chargeState} materialPreview={editing&&materialOpen&&selected&&materialPreview!=='auto'?{id:selected,mode:materialPreview}:undefined} onObjectPick={objectPick} onPickerReady={pickerReady} onModelState={modelState} onTextureState={setTextureState}/>}
</LoadingRegion></DropZone>
{editing&&<>
<div className="rover-scene-tools"><GlassSurface className="rover-scene-tools__surface nodedc-viewport-controls"><IconButton label="Отменить изменение · Ctrl/Cmd+Z" disabled={!scene.canUndo} onClick={scene.undo}><Icon name="undo"/></IconButton><IconButton label="Повторить изменение · Ctrl/Cmd+Shift+Z" disabled={!scene.canRedo} onClick={scene.redo}><Icon name="redo"/></IconButton><IconButton label="Материалы сцены" aria-pressed={palette} onClick={()=>{setPalette(v=>!v);setObjectsOpen(true);}}><Icon name="layers"/></IconButton><IconButton label="Окружение сцены" aria-pressed={environment} onClick={()=>setEnvironment(v=>!v)}><Icon name="globe"/></IconButton><IconButton label="Объекты сцены" aria-pressed={objectsOpen} onClick={()=>setObjectsOpen(v=>!v)}><Icon name="list"/></IconButton></GlassSurface></div>
<div className="rover-scene-tools"><div className="rover-scene-tools__surface nodedc-viewport-controls"><IconButton label="Отменить изменение · Ctrl/Cmd+Z" disabled={!scene.canUndo} onClick={scene.undo}><Icon name="undo"/></IconButton><IconButton label="Повторить изменение · Ctrl/Cmd+Shift+Z" disabled={!scene.canRedo} onClick={scene.redo}><Icon name="redo"/></IconButton><IconButton label="Материалы сцены" aria-pressed={palette} onClick={()=>{setPalette(v=>!v);setObjectsOpen(true);}}><Icon name="layers"/></IconButton><IconButton label="Окружение сцены" aria-pressed={environment} onClick={()=>setEnvironment(v=>!v)}><Icon name="globe"/></IconButton><IconButton label="Объекты сцены" aria-pressed={objectsOpen} onClick={()=>setObjectsOpen(v=>!v)}><Icon name="list"/></IconButton></div></div>
<div className="rover-scene-save"><StatusBadge tone={saved&&textureState!=='loading'?'neutral':'warning'}>{status}</StatusBadge></div>
</>}
</>}/>
@@ -23,7 +23,7 @@ export function AiInferencePreview({preview,layer}:{preview:InferencePreview;lay
{selected.kind==="points3d"?<Suspense fallback={<LoadingRegion loading label="Открываем 3D"/>}>
<SpatialPreview points={selected.points} label={selected.label}/>
</Suspense>:<img src={`data:image/jpeg;base64,${selected.jpeg}`} alt={`${selected.label}, кадр ${preview.frame_id}`}/>}
<div className="ai-inference-preview__caption">
<div data-glass-context="scene" className="ai-inference-preview__caption nodedc-viewport-surface">
Кадр {preview.frame_id} · Время мира {(preview.simulation_time_ns/1e9).toFixed(1)} с
{selected.legend?.length?<span className="ai-inference-preview__legend">{selected.legend.map(c=><span key={c.class_id}><i style={{background:c.color}}/>{c.label}</span>)}</span>:null}
{selected.kind==="points3d"?<span>{selected.points.length} из {selected.source_count} точек · Система координат ровера · метры</span>:null}
@@ -237,7 +237,7 @@ export function SimulationViewport({
data-control-mode={controlMode}
aria-label={`Сцена ${project.name}`}
>
<header className="simulation-viewport__toolbar">
<header data-glass-context="scene" className="simulation-viewport__toolbar nodedc-viewport-surface">
<div>
<StatusBadge tone={state === "failed" || collisionState === "failed" ? "warning" : state === "ready" && collisionState !== "loading" ? "success" : "accent"}>
{controlState === "loading"
@@ -341,7 +341,7 @@ export function SimulationViewport({
role="dialog"
aria-label="Настройки сцены"
>
<div className="simulation-viewport__settings-head">
<div data-glass-context="scene" className="simulation-viewport__settings-head nodedc-viewport-surface">
<div>
<strong>Настройки сцены</strong>
<span>Локация, камера и UGV</span>
@@ -450,7 +450,7 @@ export function SimulationViewport({
<div className="simulation-viewport__stage">
<canvas ref={canvasRef} aria-label={`Сцена ${project.name}`} />
{state !== "ready" ? (
<div className="simulation-viewport__state" role={state === "failed" ? "alert" : "status"}>
<div data-glass-context="scene" className="simulation-viewport__state nodedc-viewport-surface" role={state === "failed" ? "alert" : "status"}>
{state === "failed" ? null : <ActivityIndicator label="Загрузка локации" />}
<strong>{state === "failed" ? "Локация не открылась" : "Загружаем локацию"}</strong>
<Description>{error ?? "LOD-уровни загружаются по мере готовности runtime."}</Description>
@@ -454,7 +454,7 @@ export function E30EvidencePointCloud({ detail }: E30EvidencePointCloudProps) {
<span>ПКМ · панорама</span>
</div>
</div>
<div className="e30-evidence-scene__legend" aria-label="Легенда 3D-доказательства">
<div data-glass-context="scene" className="e30-evidence-scene__legend nodedc-viewport-surface" aria-label="Легенда 3D-доказательства">
<span data-point="context">
Контекст · {detail.projection.pointsMapXyzM.length}
</span>
@@ -198,7 +198,7 @@ export function E30EvidenceProjection({
) : null}
{pointLayerVisible ? (
<div
className="e30-evidence-scene__legend"
data-glass-context="scene" className="e30-evidence-scene__legend nodedc-viewport-surface"
aria-label="Легенда camera-LiDAR доказательства"
>
<span data-point="depth">
@@ -453,7 +453,7 @@ export function WorkspaceRenderer(props: WorkspaceRendererProps) {
case "network-monitor":
return <NetworkWorkspace />;
case "architectural-projects":
return <ArchitecturalProjectsWorkspace />;
return <ArchitecturalProjectsWorkspace headerToolsHost={props.headerToolsHost} />;
case "datasets":
return <DatasetGatewayWorkspace />;
case "artifact-health":
@@ -12,7 +12,7 @@ const Workspace = lazy(async () => {
});
/** Host composition only: the module owns its catalog, intake, maps and renderer. */
export function ArchitecturalProjectsWorkspace() {
export function ArchitecturalProjectsWorkspace({headerToolsHost}:{headerToolsHost?:HTMLElement|null}) {
const [toasts, setToasts] = useState<NotificationMessage[]>([]);
const notify = useCallback((notice: Notice) => {
setToasts(items => [...items, {...notice, id: 'bim:' + crypto.randomUUID()}].slice(-5));
@@ -22,7 +22,7 @@ export function ArchitecturalProjectsWorkspace() {
}), [notify]);
return <>
<Suspense fallback={<Description role="status">Открываем архитектурные проекты…</Description>}>
<Workspace host={host}/>
<Workspace host={host} headerToolsHost={headerToolsHost}/>
</Suspense>
<ToastStack items={toasts} onDismiss={id => setToasts(items => items.filter(item => item.id !== id))}/>
</>;
@@ -350,7 +350,7 @@ export function E34TemporalLayerScene({
<span>ПКМ · панорама</span>
</div>
</div>
<div className="e34-temporal-scene__legend">
<div data-glass-context="scene" className="e34-temporal-scene__legend nodedc-viewport-surface">
<span data-state="cells">
Ячейки · {frame.cellCentersMapXyzM.length}
</span>
@@ -499,7 +499,7 @@ export function SpatialWorkspace({
</strong>
</div>
) : null}</>} overlays={<> {!visualProfile && !pointCloudFocused && !floatingSourceMaximized && state?.sourceMode && state.sourceMode !== "idle" && !sourceUrl.trim() ? (
<div className="scene-adapter-note">
<div data-glass-context="scene" className="scene-adapter-note nodedc-viewport-surface">
<Icon name="alert" />
<span>
Локальный поток <strong>{sourceModeLabel(state.sourceMode).toLocaleLowerCase("ru-RU")}</strong> активен,
@@ -509,7 +509,7 @@ export function SpatialWorkspace({
) : null}
{!pointCloudFocused && !floatingSourceMaximized && selection ? (
<div className="scene-selection">
<div data-glass-context="scene" className="scene-selection nodedc-viewport-surface">
<span>Выбрано</span>
<strong>{selection.entityPath}</strong>
{selection.viewName ? <small>{selection.viewName}</small> : null}
@@ -575,7 +575,7 @@ export function SpatialWorkspace({
accumulationMaxSeconds={sceneSettings.accumulationMaxSeconds}
onAccumulationChange={onAccumulationChange}
onAccumulationCommit={onAccumulationCommit}
className="scene-timeline"
data-glass-context="scene" className="scene-timeline nodedc-viewport-surface"
/>
) : null}
</>}