From d8ed37e09d593b2d89edf8128155f46792848262 Mon Sep 17 00:00:00 2001 From: Codex Date: Sat, 14 Nov 2026 22:53:01 +0300 Subject: [PATCH] Unify viewport glass and professional BIM controls --- apps/catalog/src/CatalogApp.tsx | 10 ++++---- docs/COMPONENTS.md | 4 +++- docs/ICONS.md | 4 ++++ docs/NAVIGATION_CUBE.md | 2 ++ packages/ui-core/styles.css | 7 +++++- packages/ui-react/src/Icon.tsx | 29 +++++++++++++++++------- packages/ui-react/src/NavigationCube.tsx | 6 ++--- registry/components.json | 5 +++- registry/icons.json | 2 ++ 9 files changed, 51 insertions(+), 18 deletions(-) diff --git a/apps/catalog/src/CatalogApp.tsx b/apps/catalog/src/CatalogApp.tsx index 7a41d9f..c16eea1 100644 --- a/apps/catalog/src/CatalogApp.tsx +++ b/apps/catalog/src/CatalogApp.tsx @@ -230,12 +230,12 @@ const iconGroups: Array<{ title: string; note: string; icons: IconName[] }> = [ { title: "Редактирование", note: "Launcher / SEO", - icons: ["save", "edit", "trash", "copy", "upload", "download", "external", "rotate-clockwise", "add-point", "ruler", "section", "isolate", "orthographic", "perspective", "select", "pen", "rectangle", "curve", "undo", "redo"], + icons: ["save", "edit", "trash", "copy", "upload", "download", "external", "rotate-clockwise", "add-point", "ruler", "section", "isolate", "orthographic", "perspective", "fit-view", "select", "pen", "rectangle", "curve", "undo", "redo"], }, { title: "Состояние и доступ", note: "Вся платформа", - icons: ["check", "alert", "info", "activity", "lock", "key", "shield", "circle", "eye", "eye-off"], + icons: ["check", "alert", "info", "info-plain", "activity", "lock", "key", "shield", "circle", "eye", "eye-off"], }, { title: "Сущности", @@ -283,6 +283,8 @@ const iconLabels: Record = { image: "Изображение", inbox: "Уведомления", info: "Информация", + "info-plain": "Информация без окружности", + "fit-view": "Вписать модель", key: "Ключ", layers: "Слои", list: "Список задач", @@ -1401,7 +1403,7 @@ export function CatalogApp() { return (
- `${v} px`}/>setCubeEdgeOpacity(1-v)} formatValue={v=>`${Math.round(v*100)}%`}/>

{cubeDirection.join(" · ")}

+ `${v} px`}/>setCubeEdgeOpacity(1-v)} formatValue={v=>`${Math.round(v*100)}%`}/>

{cubeDirection.join(" · ")}

@@ -2371,7 +2373,7 @@ export function CatalogApp() { ) : null} setTreeDemoOpen(false)}> - }>{node.label}} label="Пример дерева объектов" selected={treeSelected} onSelect={setTreeSelected} onVisibilityChange={(_,visible)=>setTreeVisible(visible)} nodes={[{id:'scene',label:'Сцена',children:[{id:'model',label:'Модель',children:[{id:'cells',label:'Ячейки / внутренний блок',visible:treeVisible},{id:'panel',label:'Боковая панель корпуса / длинное название детали'}]}]}]}/> + }>{node.label}} label="Пример дерева объектов" selected={treeSelected} onSelect={setTreeSelected} onVisibilityChange={(_,visible)=>setTreeVisible(visible)} nodes={[{id:'scene',label:'Сцена',children:[{id:'model',label:'Модель',children:[{id:'cells',label:'Ячейки / внутренний блок',visible:treeVisible},{id:'panel',label:'Боковая панель корпуса / длинное название детали'}]}]}]}/> void; - size?:number; face?:string; text?:string; edge?:string; hover?:string; hoverText?:string; opacity?:number; edgeOpacity?:number; + size?:number; face?:string; text?:string; edge?:string; hover?:string; hoverText?:string; opacity?:number; edgeOpacity?:number; faceOpacity?:number; disabled?:boolean; label?:string; } @@ -42,9 +42,9 @@ export function cubeRegions(quaternion:NavigationCubeProps["quaternion"]) { }); } /** BIM-style face / edge / corner navigation, independent of the scene engine. */ -export function NavigationCube({quaternion,onSelect,disabled=false,label="Навигационный куб",size=66,face,text,edge,hover:highlight,hoverText,opacity=1,edgeOpacity=1}:NavigationCubeProps) { +export function NavigationCube({quaternion,onSelect,disabled=false,label="Навигационный куб",size=66,face,text,edge,hover:highlight,hoverText,opacity=1,edgeOpacity=1,faceOpacity=1}:NavigationCubeProps) { const [hover,setHover]=useState(null); - return + return {cubeRegions(quaternion).map(r=>setHover(r.label)} onPointerLeave={()=>setHover(null)} diff --git a/registry/components.json b/registry/components.json index a922fb8..b74332b 100644 --- a/registry/components.json +++ b/registry/components.json @@ -814,6 +814,7 @@ "viewport container scope with local edge reveal", "native tooltips with keyboard shortcut hints", "optional canonical dropdown for toolbar item menus", + "viewport-scoped buttons share scene Glass V4; the rail stays transparent", "bounded menuWidth for rich inspectors; default remains 220 px", "theme-independent geometry", "menus outside maximum magnified icon envelope", @@ -1268,6 +1269,7 @@ ], "summary": "Renderer-independent BIM-style orientation cube; six faces, twelve edges, eight corners.", "behavior": [ + "independent faceOpacity, edgeOpacity and text colors; overall opacity remains compatible", "Tracks camera quaternion; never changes projection implicitly", "Visible regions support hover, focus, Enter/Space and disabled state", "Consumer owns camera navigation and coordinate conversion", @@ -1300,7 +1302,8 @@ ], "rules": [ "Use for object hierarchies; no nested ResourceRow cards.", - "Host owns model identity and visibility; the tree owns navigation presentation." + "Host owns model identity and visibility; the tree owns navigation presentation.", + "Compact information uses info-plain at 14px beside the independent visibility eye." ] }, { diff --git a/registry/icons.json b/registry/icons.json index 215bb23..155db4f 100644 --- a/registry/icons.json +++ b/registry/icons.json @@ -54,6 +54,7 @@ "sliders", "search", "orthographic", + "fit-view", "perspective" ] }, @@ -97,6 +98,7 @@ "check", "alert", "info", + "info-plain", "activity", "lock", "key",