feat: add FreeCAD-aligned web CAD frontend baseline
This commit is contained in:
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
node_modules/
|
||||
dist/
|
||||
.vite/
|
||||
*.log
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
.DS_Store
|
||||
|
||||
25
README.md
Normal file
25
README.md
Normal file
@@ -0,0 +1,25 @@
|
||||
# Web FreeCAD BitBybit
|
||||
|
||||
FreeCAD-aligned web CAD frontend baseline for the BitBybit runtime boundary.
|
||||
|
||||
## Current scope
|
||||
|
||||
- React + Vite frontend shell
|
||||
- FreeCAD-style application menus, workbench navigation, Combo View, Task Dock, viewport and Report view
|
||||
- Machine-readable workbench and command manifest in `src/freecadManifest.ts`
|
||||
- Chinese implementation plan in `docs/web-cad-implementation-plan.zh-CN.md`
|
||||
|
||||
The current milestone is a static interface prototype. Real BitBybit Facade, FreeCAD/OCCT WASM, Three.js geometry, SQLite WASM and OPFS persistence are scheduled for the following integration milestones.
|
||||
|
||||
## Development
|
||||
|
||||
```bash
|
||||
npm install
|
||||
npm run dev
|
||||
```
|
||||
|
||||
Build verification:
|
||||
|
||||
```bash
|
||||
npm run build
|
||||
```
|
||||
1378
docs/web-cad-implementation-plan.zh-CN.md
Normal file
1378
docs/web-cad-implementation-plan.zh-CN.md
Normal file
File diff suppressed because it is too large
Load Diff
13
index.html
Normal file
13
index.html
Normal file
@@ -0,0 +1,13 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="theme-color" content="#111519" />
|
||||
<title>BitBybit CAD Studio</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script type="module" src="/src/main.tsx"></script>
|
||||
</body>
|
||||
</html>
|
||||
1755
package-lock.json
generated
Normal file
1755
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
23
package.json
Normal file
23
package.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "bitbybit-web-cad",
|
||||
"private": true,
|
||||
"version": "0.1.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"lucide-react": "^0.468.0",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/react": "^18.3.12",
|
||||
"@types/react-dom": "^18.3.1",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"typescript": "^5.7.2",
|
||||
"vite": "^6.0.5"
|
||||
}
|
||||
}
|
||||
441
src/App.tsx
Normal file
441
src/App.tsx
Normal file
@@ -0,0 +1,441 @@
|
||||
import { useEffect, useMemo, useState } from 'react'
|
||||
import type { ComponentType, ReactNode } from 'react'
|
||||
import {
|
||||
AlertTriangle,
|
||||
Archive,
|
||||
ArrowDownToLine,
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
Box,
|
||||
Check,
|
||||
CheckCircle2,
|
||||
ChevronDown,
|
||||
ChevronRight,
|
||||
Circle,
|
||||
CircleDot,
|
||||
Clock3,
|
||||
Code2,
|
||||
Command,
|
||||
Copy,
|
||||
Download,
|
||||
FileBox,
|
||||
FilePlus2,
|
||||
FileText,
|
||||
FolderOpen,
|
||||
HardDrive,
|
||||
HelpCircle,
|
||||
Layers3,
|
||||
LayoutGrid,
|
||||
ListTree,
|
||||
Menu,
|
||||
MoreHorizontal,
|
||||
PanelBottom,
|
||||
PanelLeft,
|
||||
PanelRight,
|
||||
Pause,
|
||||
Pencil,
|
||||
Plus,
|
||||
Rotate3D,
|
||||
Save,
|
||||
Search,
|
||||
Settings2,
|
||||
SlidersHorizontal,
|
||||
Sparkles,
|
||||
SquareStack,
|
||||
Trash2,
|
||||
Undo2,
|
||||
Redo2,
|
||||
Upload,
|
||||
UserRound,
|
||||
WandSparkles,
|
||||
X,
|
||||
ZoomIn,
|
||||
ZoomOut,
|
||||
} from 'lucide-react'
|
||||
import { menuDefinitions, pinnedWorkbenches, workbenchDefinitions, type MenuName, type WorkbenchId } from './freecadManifest'
|
||||
|
||||
type Page = 'start' | 'projects' | 'workspace' | 'import' | 'export' | 'settings' | 'help' | 'diagnostics' | 'sync'
|
||||
type Workbench = WorkbenchId
|
||||
|
||||
type Icon = ComponentType<{ size?: string | number; strokeWidth?: string | number; className?: string }>
|
||||
|
||||
const pageFromPath = (): Page => {
|
||||
const path = window.location.pathname
|
||||
if (path.startsWith('/projects')) return 'projects'
|
||||
if (path.startsWith('/workspace')) return 'workspace'
|
||||
if (path.startsWith('/import')) return 'import'
|
||||
if (path.startsWith('/export')) return 'export'
|
||||
if (path.startsWith('/settings')) return 'settings'
|
||||
if (path.startsWith('/help')) return 'help'
|
||||
if (path.startsWith('/diagnostics')) return 'diagnostics'
|
||||
if (path.startsWith('/sync')) return 'sync'
|
||||
return 'start'
|
||||
}
|
||||
|
||||
const iconMap: Record<string, Icon> = {
|
||||
box: Box, 'circle-dot': CircleDot, 'square-stack': SquareStack, 'file-text': FileText, 'layout-grid': LayoutGrid,
|
||||
layers: Layers3, archive: Archive, pencil: Pencil, copy: Copy, 'arrow-up': ArrowDownToLine, 'arrow-down': ArrowDownToLine,
|
||||
rotate: Rotate3D, 'sliders-horizontal': SlidersHorizontal, search: Search, upload: Upload, download: Download, 'file-plus': FilePlus2,
|
||||
'code-2': Code2, 'settings-2': Settings2, 'circle-check': CheckCircle2, 'triangle-alert': AlertTriangle, eye: CircleDot,
|
||||
'zoom-in': ZoomIn, 'grid-3x3': LayoutGrid, play: Check, plus: Plus, minus: X, circle: Circle, route: Rotate3D, 'git-branch': Layers3,
|
||||
'layers-2': Layers3, 'flip-horizontal': ArrowLeft, repeat: Rotate3D, 'refresh-cw': Rotate3D, shuffle: MoreHorizontal,
|
||||
'corner-down-right': SlidersHorizontal, scissors: X, triangle: Box, paperclip: Copy, 'move-horizontal': ArrowRight, 'move-vertical': ArrowDownToLine,
|
||||
magnet: CircleDot, move: ArrowRight, type: FileText, 'panels-top-left': LayoutGrid, maximize: PanelRight, table: LayoutGrid, tag: FileText,
|
||||
'rows-3': ListTree, link: Copy, paintbrush: WandSparkles, pin: PanelLeft, anchor: CircleDot, split: ArrowRight, target: CircleDot,
|
||||
protractor: SlidersHorizontal, activity: Rotate3D, lock: Circle, spline: Rotate3D, crosshair: CircleDot, 'file-box': FileBox,
|
||||
}
|
||||
|
||||
const workbenchIconKeys: Record<Workbench, string> = {
|
||||
'Part Design': 'box', Part: 'box', Sketcher: 'circle-dot', Draft: 'square-stack', BIM: 'layers', TechDraw: 'file-text', Spreadsheet: 'layout-grid', Assembly: 'layers', CAM: 'settings-2', FEM: 'activity', Mesh: 'archive', Surface: 'spline', Inspection: 'search',
|
||||
}
|
||||
|
||||
const workbenchMeta: Record<Workbench, { icon: Icon; accent: string; description: string }> = Object.fromEntries(
|
||||
Object.entries(workbenchDefinitions).map(([id, definition]) => [id, { icon: iconMap[workbenchIconKeys[id as Workbench]] || MoreHorizontal, accent: id === 'Sketcher' ? 'violet' : id === 'Part' ? 'amber' : 'cyan', description: definition.description }]),
|
||||
) as Record<Workbench, { icon: Icon; accent: string; description: string }>
|
||||
|
||||
function CuboidIcon({ size = 18, strokeWidth = 1.8, className }: { size?: string | number; strokeWidth?: string | number; className?: string }) {
|
||||
return <Box size={size} strokeWidth={strokeWidth} className={className} />
|
||||
}
|
||||
|
||||
const projects = [
|
||||
{ name: 'Pump Housing', path: 'Local / Mechanical / Pump Housing', modified: 'Just now', objects: 18, state: 'Unsaved' },
|
||||
{ name: 'Mounting Bracket', path: 'Local / Concepts / Mounting Bracket', modified: 'Yesterday', objects: 9, state: 'Saved' },
|
||||
{ name: 'Motor Assembly', path: 'Local / Assemblies / Motor Assembly', modified: '28 Jul 2026', objects: 142, state: 'Saved' },
|
||||
{ name: 'Valve Body Study', path: 'Shared / Review / Valve Body Study', modified: '22 Jul 2026', objects: 31, state: 'Read only' },
|
||||
]
|
||||
|
||||
const treeData = [
|
||||
{ id: 'origin', label: 'Origin', type: 'folder', children: ['XY_Plane', 'XZ_Plane', 'YZ_Plane'] },
|
||||
{ id: 'body', label: 'Body', type: 'body', state: 'active', children: ['sketch', 'pad', 'pocket', 'fillet'] },
|
||||
{ id: 'sketch', label: 'Sketch', type: 'sketch', state: 'valid', detail: 'Fully constrained' },
|
||||
{ id: 'pad', label: 'Pad', type: 'feature', state: 'valid', detail: 'Length 42 mm' },
|
||||
{ id: 'pocket', label: 'Pocket', type: 'feature', state: 'warning', detail: 'Through all' },
|
||||
{ id: 'fillet', label: 'Fillet', type: 'feature', state: 'valid', detail: 'Radius 3 mm' },
|
||||
{ id: 'reference', label: 'Reference geometry', type: 'folder', children: ['DatumPlane', 'DatumAxis'] },
|
||||
]
|
||||
|
||||
const IconButton = ({ icon: IconComponent, label, onClick, active = false, disabled = false }: { icon: Icon; label: string; onClick?: () => void; active?: boolean; disabled?: boolean }) => (
|
||||
<button className={`icon-button ${active ? 'is-active' : ''}`} title={label} aria-label={label} onClick={onClick} disabled={disabled}>
|
||||
<IconComponent size={16} strokeWidth={1.8} />
|
||||
</button>
|
||||
)
|
||||
|
||||
const Badge = ({ tone, children }: { tone: 'cyan' | 'green' | 'amber' | 'red' | 'muted'; children: ReactNode }) => (
|
||||
<span className={`badge badge-${tone}`}>
|
||||
<span className="badge-dot" />
|
||||
{children}
|
||||
</span>
|
||||
)
|
||||
|
||||
function App() {
|
||||
const [page, setPage] = useState<Page>(pageFromPath)
|
||||
const [workbench, setWorkbench] = useState<Workbench>('Part Design')
|
||||
const [leftTab, setLeftTab] = useState<'model' | 'tasks'>('model')
|
||||
const [rightTab, setRightTab] = useState<'data' | 'view'>('data')
|
||||
const [bottomOpen, setBottomOpen] = useState(true)
|
||||
const [selectedObject, setSelectedObject] = useState('pad')
|
||||
const [notice, setNotice] = useState('')
|
||||
|
||||
useEffect(() => {
|
||||
const handlePopState = () => setPage(pageFromPath())
|
||||
window.addEventListener('popstate', handlePopState)
|
||||
return () => window.removeEventListener('popstate', handlePopState)
|
||||
}, [])
|
||||
|
||||
const navigate = (next: Page, replace = false) => {
|
||||
const paths: Record<Page, string> = {
|
||||
start: '/start',
|
||||
projects: '/projects',
|
||||
workspace: '/workspace/pump-housing',
|
||||
import: '/import',
|
||||
export: '/export',
|
||||
settings: '/settings',
|
||||
help: '/help',
|
||||
diagnostics: '/diagnostics',
|
||||
sync: '/sync',
|
||||
}
|
||||
window.history[replace ? 'replaceState' : 'pushState']({}, '', paths[next])
|
||||
setPage(next)
|
||||
}
|
||||
|
||||
const openWorkspace = () => navigate('workspace')
|
||||
const currentWorkbench = workbenchMeta[workbench]
|
||||
const CurrentIcon = currentWorkbench.icon
|
||||
|
||||
const showNotice = (message: string) => {
|
||||
setNotice(message)
|
||||
window.setTimeout(() => setNotice(''), 2600)
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="app-shell">
|
||||
<TopBar page={page} workbench={workbench} onNavigate={navigate} onOpenWorkspace={openWorkspace} />
|
||||
{page === 'workspace' ? (
|
||||
<Workspace
|
||||
workbench={workbench}
|
||||
setWorkbench={(value) => { setWorkbench(value); setLeftTab('tasks'); showNotice(`${value} workbench loaded`) }}
|
||||
leftTab={leftTab}
|
||||
setLeftTab={setLeftTab}
|
||||
rightTab={rightTab}
|
||||
setRightTab={setRightTab}
|
||||
bottomOpen={bottomOpen}
|
||||
setBottomOpen={setBottomOpen}
|
||||
selectedObject={selectedObject}
|
||||
setSelectedObject={setSelectedObject}
|
||||
workbenchIcon={CurrentIcon}
|
||||
showNotice={showNotice}
|
||||
/>
|
||||
) : (
|
||||
<PageFrame page={page} onNavigate={navigate} onOpenWorkspace={openWorkspace} showNotice={showNotice} />
|
||||
)}
|
||||
{notice && <div className="toast"><CheckCircle2 size={16} />{notice}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
function TopBar({ page, workbench, onNavigate, onOpenWorkspace }: { page: Page; workbench: Workbench; onNavigate: (page: Page) => void; onOpenWorkspace: () => void }) {
|
||||
const [openMenu, setOpenMenu] = useState<MenuName | null>(null)
|
||||
const handleMenuCommand = (command: string) => {
|
||||
setOpenMenu(null)
|
||||
if (command === 'help' || command === 'shortcuts') onNavigate('help')
|
||||
else if (command === 'diagnostics') onNavigate('diagnostics')
|
||||
else if (command === 'preferences' || command === 'project-settings' || command === 'parameters') onNavigate('settings')
|
||||
else if (command === 'import') onNavigate('import')
|
||||
else if (command === 'export') onNavigate('export')
|
||||
else if (command === 'open') onNavigate('projects')
|
||||
else onOpenWorkspace()
|
||||
}
|
||||
return (
|
||||
<header className="topbar">
|
||||
<div className="brand-lockup" onClick={() => onNavigate('start')} role="button" tabIndex={0}>
|
||||
<div className="brand-mark"><span /><span /><span /></div>
|
||||
<div><div className="brand-name">BitBybit</div><div className="brand-product">CAD studio</div></div>
|
||||
</div>
|
||||
<nav className="top-menu" aria-label="Application menu">
|
||||
{(Object.keys(menuDefinitions) as MenuName[]).map((menu) => <div className="menu-wrapper" key={menu}><button className={openMenu === menu ? 'is-open' : ''} onClick={() => setOpenMenu(openMenu === menu ? null : menu)} aria-expanded={openMenu === menu}>{menu}</button>{openMenu === menu && <div className="menu-popover">{menuDefinitions[menu].map((item) => <button key={item.command} onClick={() => handleMenuCommand(item.command)}><span>{item.label}</span>{'shortcut' in item && <kbd>{item.shortcut}</kbd>}</button>)}</div>}</div>)}
|
||||
</nav>
|
||||
<div className="topbar-spacer" />
|
||||
<div className="topbar-context">
|
||||
<div className="context-document"><span className="context-dot" />Pump Housing <span className="context-separator">/</span> {workbench}</div>
|
||||
<span className="save-state"><span className="save-dot" />Unsaved changes</span>
|
||||
</div>
|
||||
<IconButton icon={Undo2} label="Undo" />
|
||||
<IconButton icon={Redo2} label="Redo" disabled />
|
||||
<div className="topbar-divider" />
|
||||
<button className="command-search" onClick={() => onNavigate('help')}><Search size={15} /><span>Search commands</span><kbd>⌘ K</kbd></button>
|
||||
<IconButton icon={HelpCircle} label="Help" onClick={() => onNavigate('help')} />
|
||||
<button className="avatar-button" title="Account and sync" onClick={() => onNavigate('sync')}><UserRound size={16} /><span>MS</span></button>
|
||||
</header>
|
||||
)
|
||||
}
|
||||
|
||||
function Workspace({ workbench, setWorkbench, leftTab, setLeftTab, rightTab, setRightTab, bottomOpen, setBottomOpen, selectedObject, setSelectedObject, workbenchIcon: WorkbenchIcon, showNotice }: {
|
||||
workbench: Workbench
|
||||
setWorkbench: (value: Workbench) => void
|
||||
leftTab: 'model' | 'tasks'
|
||||
setLeftTab: (tab: 'model' | 'tasks') => void
|
||||
rightTab: 'data' | 'view'
|
||||
setRightTab: (tab: 'data' | 'view') => void
|
||||
bottomOpen: boolean
|
||||
setBottomOpen: (open: boolean) => void
|
||||
selectedObject: string
|
||||
setSelectedObject: (id: string) => void
|
||||
workbenchIcon: Icon
|
||||
showNotice: (message: string) => void
|
||||
}) {
|
||||
return (
|
||||
<main className="workspace-page">
|
||||
<div className="workspace-toolbar">
|
||||
<div className="workbench-picker"><WorkbenchIcon size={17} /><select value={workbench} onChange={(event) => setWorkbench(event.target.value as Workbench)} aria-label="Workbench">{Object.keys(workbenchDefinitions).map((option) => <option key={option}>{option}</option>)}</select><ChevronDown size={14} /></div>
|
||||
<div className="toolbar-divider" />
|
||||
<IconButton icon={FilePlus2} label="New document" onClick={() => showNotice('New document prepared')} />
|
||||
<IconButton icon={FolderOpen} label="Open project" onClick={() => showNotice('Project browser opened')} />
|
||||
<IconButton icon={Save} label="Save project" onClick={() => showNotice('Saved to local workspace')} />
|
||||
<div className="toolbar-divider" />
|
||||
<IconButton icon={Box} label="Create body" onClick={() => showNotice('Create Body task opened')} active={workbench === 'Part Design'} />
|
||||
<IconButton icon={CircleDot} label="Create sketch" onClick={() => showNotice('Select a plane to create a sketch')} />
|
||||
<IconButton icon={Rotate3D} label="Transform" />
|
||||
<IconButton icon={SlidersHorizontal} label="Measure" />
|
||||
<div className="toolbar-spacer" />
|
||||
<div className="toolbar-status"><span className="status-pulse" />Local workspace</div>
|
||||
<IconButton icon={PanelLeft} label="Toggle left panel" />
|
||||
<IconButton icon={PanelRight} label="Toggle right panel" />
|
||||
</div>
|
||||
<WorkbenchNavBar workbench={workbench} setWorkbench={setWorkbench} showNotice={showNotice} />
|
||||
<div className="document-tabs">
|
||||
<button className="doc-tab is-active"><FileBox size={15} /><span>Pump Housing</span><span className="doc-unsaved" /><X size={13} /></button>
|
||||
<button className="doc-tab" onClick={() => showNotice('Open Mounting Bracket') }><FileBox size={15} /><span>Mounting Bracket</span><X size={13} /></button>
|
||||
<button className="new-tab" title="New document"><Plus size={16} /></button>
|
||||
<div className="document-tab-spacer" />
|
||||
<span className="document-meta">mm · 18 objects · v0.1 draft</span>
|
||||
</div>
|
||||
<div className="workspace-content">
|
||||
<aside className="combo-panel left-panel">
|
||||
<div className="panel-tabs"><button className={leftTab === 'model' ? 'is-active' : ''} onClick={() => setLeftTab('model')}><ListTree size={14} />Model</button><button className={leftTab === 'tasks' ? 'is-active' : ''} onClick={() => setLeftTab('tasks')}><SlidersHorizontal size={14} />Tasks <span className="tab-count">1</span></button></div>
|
||||
{leftTab === 'model' ? <div className="combo-model"><ModelTree selectedObject={selectedObject} setSelectedObject={setSelectedObject} showNotice={showNotice} /><div className="combo-property"><div className="property-heading"><div><span className="eyebrow">Property view</span><h2>{selectedObject === 'pad' ? 'Pad' : selectedObject === 'pocket' ? 'Pocket' : 'Body'}</h2></div><IconButton icon={MoreHorizontal} label="More object actions" /></div><div className="panel-tabs property-tabs"><button className={rightTab === 'data' ? 'is-active' : ''} onClick={() => setRightTab('data')}>Data</button><button className={rightTab === 'view' ? 'is-active' : ''} onClick={() => setRightTab('view')}>View</button></div>{rightTab === 'data' ? <DataProperties selectedObject={selectedObject} showNotice={showNotice} /> : <ViewProperties showNotice={showNotice} />}</div></div> : <div className="model-task-summary"><span className="eyebrow">Combo View task tab</span><p>Use the right Task panel for command parameters. This tab stays available for selection and dependency context.</p><button className="button button-outline" onClick={() => showNotice('Selection filter enabled')}><Search size={14} />Selection filter</button></div>}
|
||||
</aside>
|
||||
<section className="viewport-region">
|
||||
<Viewport selectedObject={selectedObject} setSelectedObject={setSelectedObject} workbench={workbench} showNotice={showNotice} />
|
||||
<div className="viewport-bottom-left"><div className="view-chip"><Circle size={8} fill="currentColor" /> Perspective</div><div className="view-chip">Grid 10 mm</div></div>
|
||||
<div className="viewport-bottom-right"><div className="axis-widget"><span className="axis-x">X</span><span className="axis-y">Y</span><span className="axis-z">Z</span><div className="axis-origin" /></div></div>
|
||||
</section>
|
||||
<aside className="task-dock right-panel"><div className="task-dock-title"><div><span className="eyebrow">Task panel</span><h2>{workbenchDefinitions[workbench].taskTitle}</h2></div><IconButton icon={MoreHorizontal} label="Task panel actions" /></div><TaskPanel workbench={workbench} showNotice={showNotice} /></aside>
|
||||
<FunctionRail workbench={workbench} showNotice={showNotice} />
|
||||
</div>
|
||||
<div className={`bottom-drawer ${bottomOpen ? 'is-open' : ''}`}>
|
||||
<div className="bottom-drawer-header"><div className="drawer-tabs"><button className="is-active"><PanelBottom size={14} />Report view <span className="tab-count">2</span></button><button><Clock3 size={14} />Jobs <span className="tab-count tab-count-green">1</span></button><button><Code2 size={14} />Diagnostics</button></div><button className="drawer-toggle" onClick={() => setBottomOpen(!bottomOpen)} title={bottomOpen ? 'Collapse bottom panel' : 'Expand bottom panel'}>{bottomOpen ? <ChevronDown size={15} /> : <ChevronRight size={15} />}</button></div>
|
||||
{bottomOpen && <div className="bottom-drawer-content"><div className="report-line"><CheckCircle2 size={14} className="icon-green" /><span>Recompute completed</span><span className="report-context">Document / Body / Fillet</span><span className="report-time">142 ms</span></div><div className="report-line"><AlertTriangle size={14} className="icon-amber" /><span>Reference face may change after Pocket edit</span><button onClick={() => showNotice('Dependency review opened')}>Review dependency</button><span className="report-time">just now</span></div></div>}
|
||||
</div>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
function WorkbenchNavBar({ workbench, setWorkbench, showNotice }: { workbench: Workbench; setWorkbench: (value: Workbench) => void; showNotice: (message: string) => void }) {
|
||||
return <div className="workbench-nav" aria-label="Workbench navigation"><span className="nav-caption">Workbench</span>{pinnedWorkbenches.map((item) => { const IconComponent = workbenchMeta[item].icon; return <button key={item} className={workbench === item ? 'is-active' : ''} onClick={() => { setWorkbench(item); showNotice(`${item} workbench loaded`) }}><IconComponent size={13} /><span>{item}</span></button> })}<button className="nav-more" onClick={() => showNotice('All workbenches available from the picker')}><MoreHorizontal size={14} /><span>More workbenches</span></button></div>
|
||||
}
|
||||
|
||||
function FunctionRail({ workbench, showNotice }: { workbench: Workbench; showNotice: (message: string) => void }) {
|
||||
const groups = workbenchDefinitions[workbench].groups
|
||||
return <aside className="function-rail" aria-label={`${workbench} commands`}>{groups.map((group) => <div className="rail-group" key={group.label}><span className="rail-group-label">{group.label}</span>{group.commands.slice(0, 5).map((item) => { const IconComponent = iconMap[item.icon] || MoreHorizontal; return <button key={item.id} title={`${item.label}${item.shortcut ? ` (${item.shortcut})` : ''}`} aria-label={item.label} onClick={() => showNotice(`${item.label} command staged`)}><IconComponent size={15} /></button> })}</div>)}</aside>
|
||||
}
|
||||
|
||||
function ModelTree({ selectedObject, setSelectedObject, showNotice }: { selectedObject: string; setSelectedObject: (id: string) => void; showNotice: (message: string) => void }) {
|
||||
const [expanded, setExpanded] = useState<Record<string, boolean>>({ origin: false, body: true, reference: false })
|
||||
return <div className="model-tree">
|
||||
<div className="tree-toolbar"><div className="tree-search"><Search size={14} /><input placeholder="Filter objects" /></div><IconButton icon={MoreHorizontal} label="Model tree actions" /></div>
|
||||
<div className="tree-root"><div className="tree-document-row"><ChevronDown size={14} /><FileBox size={15} className="icon-cyan" /><span>Pump Housing</span><span className="tree-version">v18</span></div>
|
||||
{treeData.map((item) => <TreeItem key={item.id} item={item} level={1} expanded={expanded[item.id]} onToggle={() => setExpanded((current) => ({ ...current, [item.id]: !current[item.id] }))} selectedObject={selectedObject} setSelectedObject={setSelectedObject} showNotice={showNotice} />)}
|
||||
</div>
|
||||
<div className="tree-footer"><span><span className="legend-dot valid" />Valid</span><span><span className="legend-dot warning" />Needs review</span></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
function TreeItem({ item, level, expanded, onToggle, selectedObject, setSelectedObject, showNotice }: { item: typeof treeData[number]; level: number; expanded?: boolean; onToggle: () => void; selectedObject: string; setSelectedObject: (id: string) => void; showNotice: (message: string) => void }) {
|
||||
const hasChildren = item.children && item.children.length > 0
|
||||
const itemIcon = item.type === 'body' ? Box : item.type === 'sketch' ? CircleDot : item.type === 'feature' ? SquareStack : Layers3
|
||||
const ItemIcon = itemIcon
|
||||
return <>
|
||||
<button className={`tree-row ${selectedObject === item.id ? 'is-selected' : ''} ${item.state === 'active' ? 'is-active' : ''}`} style={{ paddingLeft: `${level * 14}px` }} onClick={() => { setSelectedObject(item.id); if (item.state === 'warning') showNotice('This feature has a reference warning') }} onDoubleClick={() => showNotice(`Editing ${item.label}`)}>
|
||||
{hasChildren ? <span onClick={(event) => { event.stopPropagation(); onToggle() }}>{expanded ? <ChevronDown size={13} /> : <ChevronRight size={13} />}</span> : <span className="tree-spacer" />}
|
||||
<ItemIcon size={15} className={item.type === 'body' ? 'icon-cyan' : item.state === 'warning' ? 'icon-amber' : 'icon-muted'} />
|
||||
<span className="tree-label">{item.label}</span>
|
||||
{item.state === 'warning' && <AlertTriangle size={13} className="icon-amber" />}
|
||||
{item.state === 'active' && <span className="active-marker" />}
|
||||
</button>
|
||||
{expanded && hasChildren && <div className="tree-children">{item.children?.map((child) => <div className="tree-row tree-child" key={child}><span className="tree-spacer" /><Circle size={8} className="icon-muted" /><span className="tree-label">{child}</span></div>)}</div>}
|
||||
</>
|
||||
}
|
||||
|
||||
function TaskPanel({ workbench, showNotice }: { workbench: Workbench; showNotice: (message: string) => void }) {
|
||||
const definition = workbenchDefinitions[workbench]
|
||||
const isSketch = workbench === 'Sketcher'
|
||||
return <div className="task-panel"><div className="task-actions-top"><button className="button button-primary" onClick={() => showNotice('Task accepted')}>OK</button><button className="button button-outline" onClick={() => showNotice('Preview applied')}>Apply</button><button className="button button-quiet" onClick={() => showNotice('Task cancelled')}>Cancel</button></div><div className="task-header"><div className="task-icon"><Pencil size={16} /></div><div><span className="eyebrow">Active command</span><h2>{isSketch ? 'Edit Sketch' : definition.taskTitle}</h2></div><Badge tone="cyan">Preview</Badge></div><div className="task-body"><div className="task-step"><span className="step-index">1</span><div><strong>{isSketch ? 'Geometry and constraints' : definition.objectType}</strong><span>{definition.taskSummary}</span></div></div><label className="field-label">Primary value <span className="field-unit">mm</span><input className="field-input" value={isSketch ? 'Fully constrained' : '42.00'} readOnly /></label><label className="field-label">Operation<select className="field-input"><option>{workbench === 'Part Design' ? 'Dimension' : 'Contextual preview'}</option><option>Through all</option><option>Up to face</option></select></label><label className="check-row"><input type="checkbox" defaultChecked /><span>Preview result in viewport</span></label><div className="task-note"><AlertTriangle size={14} /><span>Changes remain local until the document is recomputed.</span></div></div></div>
|
||||
}
|
||||
|
||||
function DataProperties({ selectedObject, showNotice }: { selectedObject: string; showNotice: (message: string) => void }) {
|
||||
const isPocket = selectedObject === 'pocket'
|
||||
return <div className="properties-scroll"><div className="property-group"><div className="property-group-title">Identity <ChevronDown size={14} /></div><PropertyRow label="Label" value={isPocket ? 'Pocket' : 'Pad'} editable onClick={() => showNotice('Label editor opened')} /><PropertyRow label="Type" value={isPocket ? 'PartDesign::Pocket' : 'PartDesign::Pad'} /><PropertyRow label="Status" value={isPocket ? 'Warning' : 'Valid'} tone={isPocket ? 'amber' : 'green'} /></div><div className="property-group"><div className="property-group-title">Parameters <ChevronDown size={14} /></div><PropertyRow label="Length" value={isPocket ? 'Through all' : '42.00 mm'} editable onClick={() => showNotice('Length editor opened')} /><PropertyRow label="Profile" value="Sketch" link /><PropertyRow label="Direction" value="Normal sketch axis" /><PropertyRow label="Reversed" value="false" editable onClick={() => showNotice('Boolean editor opened')} /></div><div className="property-group"><div className="property-group-title">Dependencies <ChevronDown size={14} /></div><PropertyRow label="Base" value="Body" link /><PropertyRow label="Support" value="XY_Plane" link /><PropertyRow label="Children" value="Pocket, Fillet" link /></div><div className="property-group"><div className="property-group-title">Expressions <ChevronDown size={14} /></div><div className="expression-row"><Code2 size={13} /><span>Length</span><span className="expression-value">42 mm</span><button title="Edit expression" onClick={() => showNotice('Expression editor opened')}><Pencil size={13} /></button></div></div></div>
|
||||
}
|
||||
|
||||
function PropertyRow({ label, value, editable = false, link = false, tone, onClick }: { label: string; value: string; editable?: boolean; link?: boolean; tone?: 'amber' | 'green'; onClick?: () => void }) {
|
||||
return <div className="property-row"><span className="property-label">{label}</span><button className={`property-value ${editable ? 'is-editable' : ''} ${link ? 'is-link' : ''}`} onClick={onClick} disabled={!editable && !link}>{value}{tone && <span className={`status-pill ${tone}`}>{tone === 'green' ? 'OK' : 'Review'}</span>}</button></div>
|
||||
}
|
||||
|
||||
function ViewProperties({ showNotice }: { showNotice: (message: string) => void }) {
|
||||
return <div className="properties-scroll"><div className="property-group"><div className="property-group-title">Display <ChevronDown size={14} /></div><PropertyRow label="Visibility" value="Visible" editable onClick={() => showNotice('Visibility toggled')} /><PropertyRow label="Display mode" value="Flat lines" editable onClick={() => showNotice('Display mode menu opened')} /><PropertyRow label="Transparency" value="0 %" editable onClick={() => showNotice('Transparency editor opened')} /></div><div className="property-group"><div className="property-group-title">Appearance <ChevronDown size={14} /></div><PropertyRow label="Shape color" value="Graphite / 02" editable onClick={() => showNotice('Color picker opened')} /><PropertyRow label="Line color" value="Steel / 04" editable onClick={() => showNotice('Color picker opened')} /><PropertyRow label="Line width" value="1.0 px" editable onClick={() => showNotice('Line width editor opened')} /></div><div className="property-group"><div className="property-group-title">View state <ChevronDown size={14} /></div><PropertyRow label="Selection style" value="Object + edges" /><PropertyRow label="Tessellation" value="Adaptive" /><PropertyRow label="Render cache" value="Ready" tone="green" /></div></div>
|
||||
}
|
||||
|
||||
function Viewport({ selectedObject, setSelectedObject, workbench, showNotice }: { selectedObject: string; setSelectedObject: (id: string) => void; workbench: Workbench; showNotice: (message: string) => void }) {
|
||||
return <div className="viewport"><div className="viewport-header"><div className="viewport-title"><span className="eyebrow">{workbench}</span><strong>Body / Fillet</strong></div><div className="viewport-actions"><IconButton icon={ZoomOut} label="Zoom out" /><IconButton icon={ZoomIn} label="Zoom in" /><IconButton icon={Rotate3D} label="Orbit view" active /></div></div><div className="viewport-grid" onClick={() => setSelectedObject('')}><div className="grid-lines" /><div className={`mock-part ${selectedObject === 'pad' ? 'part-selected' : ''}`} onClick={(event) => { event.stopPropagation(); setSelectedObject('pad'); showNotice('Selected Pad') }}><div className="part-top" /><div className="part-front"><span className="part-hole one" /><span className="part-hole two" /><span className="part-cut" /></div><div className="part-side" /></div><div className="mock-datum-plane" /><div className="selection-callout"><span className="callout-line" /><span>Pad</span></div></div><div className="viewport-legend"><span><span className="legend-swatch selected" />Selected</span><span><span className="legend-swatch edge" />Edges</span><span><span className="legend-swatch datum" />Datum</span></div></div>
|
||||
}
|
||||
|
||||
function PageFrame({ page, onNavigate, onOpenWorkspace, showNotice }: { page: Page; onNavigate: (page: Page) => void; onOpenWorkspace: () => void; showNotice: (message: string) => void }) {
|
||||
const pages: Record<Exclude<Page, 'workspace'>, ReactNode> = {
|
||||
start: <StartPage onNavigate={onNavigate} onOpenWorkspace={onOpenWorkspace} showNotice={showNotice} />,
|
||||
projects: <ProjectsPage onNavigate={onNavigate} onOpenWorkspace={onOpenWorkspace} showNotice={showNotice} />,
|
||||
import: <FileFlowPage mode="import" onNavigate={onNavigate} showNotice={showNotice} />,
|
||||
export: <FileFlowPage mode="export" onNavigate={onNavigate} showNotice={showNotice} />,
|
||||
settings: <SettingsPage onNavigate={onNavigate} showNotice={showNotice} />,
|
||||
help: <HelpPage onNavigate={onNavigate} showNotice={showNotice} />,
|
||||
diagnostics: <DiagnosticsPage onNavigate={onNavigate} showNotice={showNotice} />,
|
||||
sync: <SyncPage onNavigate={onNavigate} showNotice={showNotice} />,
|
||||
}
|
||||
return <div className="page-shell"><div className="page-content">{pages[page as Exclude<Page, 'workspace'>]}</div></div>
|
||||
}
|
||||
|
||||
function PageHeader({ eyebrow, title, description, actions, onBack }: { eyebrow: string; title: string; description: string; actions?: ReactNode; onBack?: () => void }) {
|
||||
return <div className="page-header"><div className="page-heading"><div className="page-eyebrow">{onBack && <button className="back-button" onClick={onBack} title="Back"><ArrowLeft size={15} /></button>}<span>{eyebrow}</span></div><h1>{title}</h1><p>{description}</p></div>{actions && <div className="page-actions">{actions}</div>}</div>
|
||||
}
|
||||
|
||||
function StartPage({ onNavigate, onOpenWorkspace, showNotice }: { onNavigate: (page: Page) => void; onOpenWorkspace: () => void; showNotice: (message: string) => void }) {
|
||||
return <div className="start-page">
|
||||
<PageHeader eyebrow="Local-first workspace" title="Start a new design." description="A focused CAD workspace for parametric parts, drawings and assemblies." actions={<><button className="button button-outline" onClick={() => onNavigate('projects')}><FolderOpen size={16} />Open project</button><button className="button button-primary" onClick={onOpenWorkspace}><Plus size={16} />New document</button></>} />
|
||||
<div className="start-grid"><section className="start-hero panel-surface"><div className="hero-copy"><span className="section-kicker"><Sparkles size={14} />FreeCAD-compatible workspace</span><h2>Model with a clear history.</h2><p>Build parts through ordered features, inspect every dependency and keep your project local by default.</p><div className="hero-actions"><button className="button button-primary" onClick={onOpenWorkspace}><FilePlus2 size={16} />Create blank document</button><button className="text-button" onClick={() => showNotice('Example gallery opened')}>Browse examples <ArrowRight size={14} /></button></div></div><div className="hero-schematic"><div className="schematic-axis axis-x-line" /><div className="schematic-axis axis-y-line" /><div className="schematic-block block-a" /><div className="schematic-block block-b" /><div className="schematic-ring" /><span className="schematic-label label-a">Feature history</span><span className="schematic-label label-b">Parametric part</span></div></section><section className="quick-panel panel-surface"><div className="section-title"><div><span className="section-kicker">Quick access</span><h3>Keep moving</h3></div><MoreHorizontal size={16} /></div><QuickAction icon={FolderOpen} title="Open a project" detail="Browse local files" onClick={() => onNavigate('projects')} /><QuickAction icon={Upload} title="Import a model" detail="STEP, IGES, STL and mesh" onClick={() => onNavigate('import')} /><QuickAction icon={WandSparkles} title="Start from an example" detail="Parametric reference models" onClick={() => showNotice('Example gallery opened')} /></section></div>
|
||||
<section className="recent-section"><div className="section-title"><div><span className="section-kicker">Recent projects</span><h3>Your local workspace</h3></div><button className="text-button" onClick={() => onNavigate('projects')}>View all <ArrowRight size={14} /></button></div><div className="recent-grid">{projects.slice(0, 3).map((project, index) => <ProjectCard project={project} key={project.name} index={index} onClick={onOpenWorkspace} />)}</div></section>
|
||||
<div className="start-footer"><div><HardDrive size={15} /><span>Local storage ready</span><Badge tone="green">OPFS available</Badge></div><div><span>BitBybit CAD Studio</span><span className="footer-separator">·</span><span>FreeCAD UI baseline 1.1.1</span></div></div>
|
||||
</div>
|
||||
}
|
||||
|
||||
function QuickAction({ icon: ActionIcon, title, detail, onClick }: { icon: Icon; title: string; detail: string; onClick: () => void }) {
|
||||
return <button className="quick-action" onClick={onClick}><span className="quick-icon"><ActionIcon size={17} /></span><span><strong>{title}</strong><small>{detail}</small></span><ArrowRight size={15} /></button>
|
||||
}
|
||||
|
||||
function ProjectCard({ project, index, onClick }: { project: typeof projects[number]; index: number; onClick: () => void }) {
|
||||
return <button className="project-card" onClick={onClick}><div className={`project-preview preview-${index}`}><div className="preview-shape" /><div className="preview-grid" /></div><div className="project-card-info"><div className="project-card-title"><strong>{project.name}</strong><MoreHorizontal size={15} /></div><span>{project.path}</span><div className="project-card-meta"><span>{project.modified}</span><span>{project.objects} objects</span><Badge tone={project.state === 'Unsaved' ? 'amber' : project.state === 'Read only' ? 'muted' : 'green'}>{project.state}</Badge></div></div></button>
|
||||
}
|
||||
|
||||
function ProjectsPage({ onNavigate, onOpenWorkspace, showNotice }: { onNavigate: (page: Page) => void; onOpenWorkspace: () => void; showNotice: (message: string) => void }) {
|
||||
return <div className="projects-page"><PageHeader eyebrow="Project manager" title="Your projects." description="Local-first project storage with explicit save and recovery states." actions={<><button className="button button-outline" onClick={() => onNavigate('import')}><Upload size={16} />Import</button><button className="button button-primary" onClick={onOpenWorkspace}><Plus size={16} />New project</button></>} /><div className="manager-toolbar"><div className="large-search"><Search size={16} /><input placeholder="Search projects" /><kbd>/</kbd></div><div className="toolbar-select"><span>Sort by</span><select><option>Last modified</option><option>Name</option><option>Object count</option></select><ChevronDown size={14} /></div><IconButton icon={LayoutGrid} label="Grid view" active /><IconButton icon={ListTree} label="List view" /></div><div className="project-list">{projects.map((project, index) => <div className="project-list-row" key={project.name}><div className={`list-thumbnail preview-${index}`}><div className="preview-shape" /><div className="preview-grid" /></div><div className="list-main"><strong>{project.name}</strong><span>{project.path}</span></div><span className="list-count">{project.objects} objects</span><span className="list-modified">{project.modified}</span><Badge tone={project.state === 'Unsaved' ? 'amber' : project.state === 'Read only' ? 'muted' : 'green'}>{project.state}</Badge><button className="row-action" title="More project actions" onClick={() => showNotice(`Actions for ${project.name}`)}><MoreHorizontal size={16} /></button></div>)}</div><div className="storage-banner"><div className="storage-icon"><HardDrive size={18} /></div><div><strong>Local storage</strong><span>3.4 GB of 10 GB used · Last backup just now</span></div><button className="text-button" onClick={() => onNavigate('settings')}>Manage storage <ArrowRight size={14} /></button></div></div>
|
||||
}
|
||||
|
||||
function FileFlowPage({ mode, onNavigate, showNotice }: { mode: 'import' | 'export'; onNavigate: (page: Page) => void; showNotice: (message: string) => void }) {
|
||||
const isImport = mode === 'import'
|
||||
return <div className="flow-page"><PageHeader eyebrow={isImport ? 'Import model' : 'Export project'} title={isImport ? 'Bring a model into your workspace.' : 'Export a clean deliverable.'} description={isImport ? 'Review format, units and compatibility before the document is created.' : 'Choose an exchange format and keep the native project available for future edits.'} onBack={() => onNavigate('start')} /><div className="flow-layout"><div className="flow-steps"><FlowStep index="01" title="Choose file" active={!isImport} complete={isImport} /><FlowStep index="02" title="Review mapping" active={isImport} complete={false} /><FlowStep index="03" title="Confirm" active={false} complete={false} /></div><section className="flow-card panel-surface"><div className="flow-card-header"><div><span className="section-kicker">Step 01 / 03</span><h2>{isImport ? 'Select a CAD file' : 'Select an export format'}</h2></div><Badge tone="cyan">Local only</Badge></div>{isImport ? <><div className="drop-zone"><div className="drop-icon"><Upload size={20} /></div><strong>Drop a model here</strong><span>or browse from your device</span><button className="button button-outline" onClick={() => showNotice('File picker opened')}><FolderOpen size={15} />Browse files</button><small>STEP · IGES · STL · OBJ · PLY · FCStd</small></div><div className="flow-note"><AlertTriangle size={15} /><span>Imported objects will appear as editable or read-only proxies depending on format support.</span></div></> : <div className="format-grid">{['STEP', 'IGES', 'STL', 'GLB / GLTF', 'Web CAD package'].map((format, index) => <button key={format} className={`format-card ${index === 0 ? 'is-selected' : ''}`} onClick={() => showNotice(`${format} selected`)}><span className="format-icon">{index === 4 ? <FileBox size={18} /> : <FileText size={18} />}</span><strong>{format}</strong><small>{index === 0 ? 'Best for editable solids' : index === 2 ? 'Mesh export' : 'Exchange format'}</small>{index === 0 && <Check size={15} className="format-check" />}</button>)}</div>}<div className="flow-footer"><button className="button button-quiet" onClick={() => onNavigate('start')}>Cancel</button><button className="button button-primary" onClick={() => showNotice(isImport ? 'Next: review mapping' : 'Export queued')}><span>{isImport ? 'Continue' : 'Export'}</span><ArrowRight size={15} /></button></div></section></div></div>
|
||||
}
|
||||
|
||||
function FlowStep({ index, title, active, complete }: { index: string; title: string; active: boolean; complete: boolean }) {
|
||||
return <div className={`flow-step ${active ? 'is-active' : ''} ${complete ? 'is-complete' : ''}`}><span className="flow-index">{complete ? <Check size={13} /> : index}</span><span>{title}</span></div>
|
||||
}
|
||||
|
||||
function SettingsPage({ onNavigate, showNotice }: { onNavigate: (page: Page) => void; showNotice: (message: string) => void }) {
|
||||
return <div className="settings-page"><PageHeader eyebrow="Preferences" title="Workspace settings." description="Keep the FreeCAD workflow familiar and tune the browser workspace around it." onBack={() => onNavigate('start')} actions={<button className="button button-primary" onClick={() => showNotice('Preferences saved')}><Save size={16} />Save changes</button>} /><div className="settings-layout"><aside className="settings-nav"><button className="is-active"><SlidersHorizontal size={15} />General</button><button><Rotate3D size={15} />Navigation</button><button><Circle size={15} />Units & precision</button><button><Layers3 size={15} />Display</button><button><Command size={15} />Shortcuts</button><button><HardDrive size={15} />Storage</button><button><UserRound size={15} />Privacy & security</button></aside><section className="settings-content panel-surface"><SettingSection title="Document defaults" detail="New documents inherit these values."><SettingRow label="Unit system" detail="Used for new projects and property editors"><select><option>Metric (mm, kg, s)</option><option>Imperial (in, lb, s)</option></select></SettingRow><SettingRow label="Autosave interval" detail="A local snapshot is created after inactivity"><select><option>Every 5 minutes</option><option>Every 10 minutes</option><option>Manual only</option></select></SettingRow></SettingSection><SettingSection title="Viewport" detail="The default FreeCAD navigation preset is kept intact."><SettingRow label="Navigation preset" detail="Orbit, pan and zoom mapping"><select><option>FreeCAD CAD</option><option>Trackpad</option><option>Blender</option></select></SettingRow><SettingRow label="Display mode" detail="Default rendering for precise edges"><select><option>Flat lines</option><option>Shaded</option><option>Wireframe</option></select></SettingRow><SettingRow label="Show selection edges" detail="Highlight selected sub-shapes"><input type="checkbox" defaultChecked /></SettingRow></SettingSection><SettingSection title="Local storage" detail="No design data leaves this browser unless you export or sync it."><SettingRow label="OPFS workspace" detail="3.4 GB of 10 GB used"><span className="storage-meter"><span /></span></SettingRow><SettingRow label="Diagnostic uploads" detail="Share only when you explicitly attach a report"><span className="setting-value">Off</span></SettingRow></SettingSection></section></div></div>
|
||||
}
|
||||
|
||||
function SettingSection({ title, detail, children }: { title: string; detail: string; children: ReactNode }) {
|
||||
return <section className="setting-section"><div className="setting-section-heading"><h2>{title}</h2><p>{detail}</p></div>{children}</section>
|
||||
}
|
||||
|
||||
function SettingRow({ label, detail, children }: { label: string; detail: string; children: ReactNode }) {
|
||||
return <div className="setting-row"><div><strong>{label}</strong><span>{detail}</span></div><div className="setting-control">{children}</div></div>
|
||||
}
|
||||
|
||||
function HelpPage({ onNavigate, showNotice }: { onNavigate: (page: Page) => void; showNotice: (message: string) => void }) {
|
||||
const helpItems = [{ title: 'Create a feature-based part', detail: 'Body → Sketch → Pad → Pocket → Fillet', icon: Box }, { title: 'Understand the model tree', detail: 'Objects, links, Tip and recompute states', icon: ListTree }, { title: 'Navigate the viewport', detail: 'FreeCAD CAD preset and view controls', icon: Rotate3D }, { title: 'Recover a project', detail: 'Snapshots, compatibility and backups', icon: Archive }]
|
||||
return <div className="help-page"><PageHeader eyebrow="Help center" title="Find your next command." description="FreeCAD workflow references, keyboard shortcuts and compatibility notes." onBack={() => onNavigate('start')} /><div className="help-search"><Search size={18} /><input placeholder="Search commands, workbenches and help" autoFocus /><kbd>⌘ K</kbd></div><div className="help-grid">{helpItems.map((item) => <button className="help-card panel-surface" key={item.title} onClick={() => showNotice(`${item.title} opened`)}><span className="help-icon"><item.icon size={18} /></span><span><strong>{item.title}</strong><small>{item.detail}</small></span><ArrowRight size={15} /></button>)}</div><section className="shortcut-panel panel-surface"><div className="section-title"><div><span className="section-kicker">Keyboard</span><h3>Core shortcuts</h3></div><button className="text-button" onClick={() => showNotice('Shortcut editor opened')}>Customize <ArrowRight size={14} /></button></div><div className="shortcut-grid"><Shortcut keyName="⌘ K" label="Command search" /><Shortcut keyName="Space" label="Toggle visibility" /><Shortcut keyName="F" label="Fit all" /><Shortcut keyName="Esc" label="Cancel task or selection" /><Shortcut keyName="⌘ Z" label="Undo" /><Shortcut keyName="⌘ S" label="Save project" /></div></section></div>
|
||||
}
|
||||
|
||||
function Shortcut({ keyName, label }: { keyName: string; label: string }) {
|
||||
return <div className="shortcut-row"><kbd>{keyName}</kbd><span>{label}</span></div>
|
||||
}
|
||||
|
||||
function DiagnosticsPage({ onNavigate, showNotice }: { onNavigate: (page: Page) => void; showNotice: (message: string) => void }) {
|
||||
return <div className="diagnostics-page"><PageHeader eyebrow="System status" title="Everything is ready." description="A concise view of browser capabilities, local storage and the current document runtime." onBack={() => onNavigate('start')} actions={<button className="button button-outline" onClick={() => showNotice('Diagnostic package prepared')}><Download size={16} />Export report</button>} /><div className="health-grid"><HealthCard label="WebAssembly" value="Ready" detail="BitBybit runtime available" tone="green" icon={Code2} /><HealthCard label="Local storage" value="Available" detail="OPFS · 3.4 GB used" tone="green" icon={HardDrive} /><HealthCard label="Viewport" value="WebGL2" detail="WebGPU can be enabled" tone="cyan" icon={Rotate3D} /><HealthCard label="Document" value="2 warnings" detail="Pump Housing · v18" tone="amber" icon={AlertTriangle} /></div><section className="diagnostic-table panel-surface"><div className="section-title"><div><span className="section-kicker">Runtime</span><h3>Capability checks</h3></div><span className="last-checked">Last checked just now</span></div><DiagnosticRow name="BitBybit Facade" value="Connected" detail="API v0.1 · mock runtime" tone="green" /><DiagnosticRow name="Geometry Worker" value="Idle" detail="No active computation" tone="green" /><DiagnosticRow name="SQLite WASM" value="Connected" detail="Local database · schema v3" tone="green" /><DiagnosticRow name="OPFS" value="Available" detail="SharedAccessHandle pool" tone="green" /><DiagnosticRow name="FreeCAD baseline" value="1.1.1" detail="Compatibility manifest loaded" tone="cyan" /><DiagnosticRow name="Document warnings" value="2" detail="One downstream reference needs review" tone="amber" onClick={() => showNotice('Document diagnostics opened')} /></section></div>
|
||||
}
|
||||
|
||||
function HealthCard({ label, value, detail, tone, icon: HealthIcon }: { label: string; value: string; detail: string; tone: 'green' | 'cyan' | 'amber'; icon: Icon }) {
|
||||
return <div className="health-card panel-surface"><div className={`health-icon ${tone}`}><HealthIcon size={17} /></div><span className="section-kicker">{label}</span><strong>{value}</strong><small>{detail}</small></div>
|
||||
}
|
||||
|
||||
function DiagnosticRow({ name, value, detail, tone, onClick }: { name: string; value: string; detail: string; tone: 'green' | 'cyan' | 'amber'; onClick?: () => void }) {
|
||||
return <button className="diagnostic-row" onClick={onClick}><span className="diagnostic-name"><span className={`status-dot ${tone}`} />{name}</span><span className="diagnostic-detail">{detail}</span><strong className={`diagnostic-value ${tone}`}>{value}</strong><ChevronRight size={15} /></button>
|
||||
}
|
||||
|
||||
function SyncPage({ onNavigate, showNotice }: { onNavigate: (page: Page) => void; showNotice: (message: string) => void }) {
|
||||
return <div className="sync-page"><PageHeader eyebrow="Account and sync" title="Stay local by default." description="Cloud features are optional. Your current workspace is stored in this browser." onBack={() => onNavigate('start')} /><div className="sync-grid"><section className="sync-card panel-surface"><div className="sync-card-header"><span className="sync-logo"><UserRound size={18} /></span><div><span className="section-kicker">Not signed in</span><h2>Local workspace</h2></div><Badge tone="green">Active</Badge></div><p>Projects, recovery snapshots and cached geometry remain on this device until you explicitly export or sync them.</p><div className="sync-stats"><div><strong>4</strong><span>projects</span></div><div><strong>3.4 GB</strong><span>storage used</span></div><div><strong>Just now</strong><span>last backup</span></div></div><button className="button button-outline" onClick={() => showNotice('Sign-in flow is ready for the next phase')}><UserRound size={16} />Connect an account</button></section><section className="sync-card panel-surface"><div className="section-title"><div><span className="section-kicker">Optional services</span><h3>Choose when to share</h3></div><Settings2 size={16} /></div><SyncRow title="Project sync" detail="Keep a remote copy and resolve conflicts" disabled /><SyncRow title="Team review links" detail="Share read-only documents" disabled /><SyncRow title="Diagnostic uploads" detail="Attach reports only when requested" disabled /></section></div></div>
|
||||
}
|
||||
|
||||
function SyncRow({ title, detail, disabled }: { title: string; detail: string; disabled?: boolean }) {
|
||||
return <div className={`sync-row ${disabled ? 'is-disabled' : ''}`}><div><strong>{title}</strong><span>{detail}</span></div><span className="toggle"><span /></span></div>
|
||||
}
|
||||
|
||||
export default App
|
||||
126
src/freecadManifest.ts
Normal file
126
src/freecadManifest.ts
Normal file
@@ -0,0 +1,126 @@
|
||||
export type WorkbenchId =
|
||||
| 'Part Design'
|
||||
| 'Part'
|
||||
| 'Sketcher'
|
||||
| 'Draft'
|
||||
| 'BIM'
|
||||
| 'TechDraw'
|
||||
| 'Spreadsheet'
|
||||
| 'Assembly'
|
||||
| 'CAM'
|
||||
| 'FEM'
|
||||
| 'Mesh'
|
||||
| 'Surface'
|
||||
| 'Inspection'
|
||||
|
||||
export type CommandIntent = 'create' | 'edit' | 'inspect' | 'view' | 'export'
|
||||
|
||||
export type CommandDefinition = {
|
||||
id: string
|
||||
label: string
|
||||
icon: string
|
||||
shortcut?: string
|
||||
intent: CommandIntent
|
||||
}
|
||||
|
||||
export type WorkbenchDefinition = {
|
||||
id: WorkbenchId
|
||||
category: 'Modeling' | 'Documentation' | 'Engineering' | 'Utilities'
|
||||
description: string
|
||||
taskTitle: string
|
||||
taskSummary: string
|
||||
objectType: string
|
||||
groups: { label: string; commands: CommandDefinition[] }[]
|
||||
}
|
||||
|
||||
const command = (id: string, label: string, icon: string, intent: CommandIntent, shortcut?: string): CommandDefinition => ({ id, label, icon, intent, shortcut })
|
||||
|
||||
export const workbenchDefinitions: Record<WorkbenchId, WorkbenchDefinition> = {
|
||||
'Part Design': {
|
||||
id: 'Part Design', category: 'Modeling', description: 'Feature-based parametric solid modeling', taskTitle: 'Part Design task', taskSummary: 'Create or edit an ordered Body feature.', objectType: 'PartDesign::Feature',
|
||||
groups: [
|
||||
{ label: 'Structure', commands: [command('create-body', 'Create body', 'box', 'create', 'Ctrl+B'), command('create-sketch', 'Create sketch', 'circle-dot', 'create', 'G, N'), command('attach-sketch', 'Attach sketch', 'paperclip', 'edit'), command('edit-sketch', 'Edit sketch', 'pencil', 'edit'), command('shape-binder', 'Shape binder', 'copy', 'create'), command('datum', 'Datum geometry', 'layers', 'create')] },
|
||||
{ label: 'Additive', commands: [command('pad', 'Pad', 'arrow-up', 'create', 'P'), command('revolution', 'Revolution', 'rotate', 'create'), command('additive-loft', 'Additive loft', 'route', 'create'), command('additive-pipe', 'Additive pipe', 'git-branch', 'create'), command('additive-primitive', 'Additive primitive', 'box', 'create')] },
|
||||
{ label: 'Subtractive', commands: [command('pocket', 'Pocket', 'arrow-down', 'create', 'K, P'), command('hole', 'Hole', 'circle-dot', 'create'), command('groove', 'Groove', 'minus', 'create'), command('subtractive-loft', 'Subtractive loft', 'route', 'create'), command('subtractive-pipe', 'Subtractive pipe', 'git-branch', 'create')] },
|
||||
{ label: 'Transformation', commands: [command('mirrored', 'Mirrored', 'flip-horizontal', 'create'), command('linear-pattern', 'Linear pattern', 'repeat', 'create'), command('polar-pattern', 'Polar pattern', 'refresh-cw', 'create'), command('multi-transform', 'Multi-transform', 'shuffle', 'create')] },
|
||||
{ label: 'Dress-up', commands: [command('fillet', 'Fillet', 'corner-down-right', 'create'), command('chamfer', 'Chamfer', 'scissors', 'create'), command('thickness', 'Thickness', 'layers-2', 'create'), command('draft', 'Draft', 'sliders-horizontal', 'create')] },
|
||||
],
|
||||
},
|
||||
Part: {
|
||||
id: 'Part', category: 'Modeling', description: 'Primitives, booleans and solid inspection', taskTitle: 'Part task', taskSummary: 'Build independent solids and boolean results.', objectType: 'Part::Feature',
|
||||
groups: [
|
||||
{ label: 'Primitives', commands: [command('primitive', 'Create primitives', 'box', 'create'), command('helix', 'Create helix', 'route', 'create'), command('prism', 'Create prism', 'triangle', 'create')] },
|
||||
{ label: 'Boolean', commands: [command('union', 'Union', 'plus', 'create'), command('cut', 'Cut', 'minus', 'create'), command('intersection', 'Intersection', 'circle', 'create'), command('compound', 'Compound', 'layers', 'create')] },
|
||||
{ label: 'Modify', commands: [command('fillet-part', 'Fillet', 'corner-down-right', 'create'), command('chamfer-part', 'Chamfer', 'scissors', 'create'), command('check-shape', 'Check geometry', 'circle-check', 'inspect'), command('measure-part', 'Measure', 'ruler', 'inspect')] },
|
||||
],
|
||||
},
|
||||
Sketcher: {
|
||||
id: 'Sketcher', category: 'Modeling', description: 'Constrained 2D geometry and profiles', taskTitle: 'Sketcher task', taskSummary: 'Edit geometry, constraints and solver state.', objectType: 'Sketcher::SketchObject',
|
||||
groups: [
|
||||
{ label: 'Sketch', commands: [command('new-sketch', 'Create sketch', 'file-plus', 'create', 'G, N'), command('edit-sketch-mode', 'Edit sketch', 'pencil', 'edit'), command('close-sketch', 'Close sketch', 'x', 'edit')] },
|
||||
{ label: 'Geometry', commands: [command('line', 'Create polyline', 'minus', 'create', 'G, M'), command('arc', 'Create arc', 'circle', 'create'), command('circle', 'Create circle', 'circle-dot', 'create'), command('rectangle', 'Create rectangle', 'square', 'create'), command('trim', 'Trim geometry', 'scissors', 'edit')] },
|
||||
{ label: 'Constraints', commands: [command('constrain-horizontal', 'Horizontal', 'move-horizontal', 'create'), command('constrain-vertical', 'Vertical', 'move-vertical', 'create'), command('constrain-coincident', 'Coincident', 'circle-dot', 'create'), command('constrain-dimension', 'Constrain dimension', 'ruler', 'create')] },
|
||||
{ label: 'Solver', commands: [command('toggle-auto-constraints', 'Auto constraints', 'wand-sparkles', 'view'), command('toggle-degrees', 'Show degrees of freedom', 'activity', 'view')] },
|
||||
],
|
||||
},
|
||||
Draft: {
|
||||
id: 'Draft', category: 'Modeling', description: '2D drafting, working planes and snaps', taskTitle: 'Draft task', taskSummary: 'Draw and modify planar construction geometry.', objectType: 'Draft::Feature',
|
||||
groups: [
|
||||
{ label: 'Working plane', commands: [command('working-plane', 'Working plane', 'layers', 'view'), command('snap-settings', 'Snap settings', 'magnet', 'view')] },
|
||||
{ label: '2D geometry', commands: [command('draft-line', 'Line', 'minus', 'create'), command('draft-wire', 'Polyline', 'route', 'create'), command('draft-arc', 'Arc', 'circle', 'create'), command('draft-text', 'Text', 'type', 'create')] },
|
||||
{ label: 'Modify', commands: [command('move', 'Move', 'move', 'edit'), command('rotate', 'Rotate', 'rotate', 'edit'), command('offset', 'Offset', 'copy', 'edit'), command('array', 'Array', 'repeat', 'create')] },
|
||||
],
|
||||
},
|
||||
BIM: {
|
||||
id: 'BIM', category: 'Engineering', description: 'Architectural and building information modeling', taskTitle: 'BIM task', taskSummary: 'Coordinate building objects and IFC metadata.', objectType: 'Arch::Component',
|
||||
groups: [{ label: 'Architecture', commands: [command('wall', 'Wall', 'square', 'create'), command('structure', 'Structure', 'box', 'create'), command('window', 'Window', 'panels-top-left', 'create'), command('space', 'Space', 'maximize', 'create')] }, { label: 'Documentation', commands: [command('ifc-export', 'Export IFC', 'upload', 'export'), command('schedule', 'Create schedule', 'table', 'create')] }],
|
||||
},
|
||||
TechDraw: {
|
||||
id: 'TechDraw', category: 'Documentation', description: 'Production drawings, views and annotations', taskTitle: 'TechDraw task', taskSummary: 'Compose a page from projected views and dimensions.', objectType: 'TechDraw::DrawPage',
|
||||
groups: [{ label: 'Pages', commands: [command('new-page', 'Create page', 'file-plus', 'create'), command('template', 'Page template', 'file-text', 'edit')] }, { label: 'Views', commands: [command('view-part', 'Insert view', 'eye', 'create'), command('section-view', 'Section view', 'scissors', 'create'), command('detail-view', 'Detail view', 'zoom-in', 'create')] }, { label: 'Annotations', commands: [command('dimension', 'Dimension', 'ruler', 'create'), command('datum-symbol', 'Datum symbol', 'crosshair', 'create'), command('annotation', 'Annotation', 'type', 'create')] }],
|
||||
},
|
||||
Spreadsheet: {
|
||||
id: 'Spreadsheet', category: 'Utilities', description: 'Parameters, expressions and schedules', taskTitle: 'Spreadsheet task', taskSummary: 'Edit cells and bind expressions to model parameters.', objectType: 'Spreadsheet::Sheet',
|
||||
groups: [{ label: 'Cells', commands: [command('new-sheet', 'Create spreadsheet', 'file-plus', 'create'), command('set-alias', 'Set alias', 'tag', 'edit'), command('insert-row', 'Insert row', 'rows-3', 'edit')] }, { label: 'Expressions', commands: [command('expression', 'Expression editor', 'code-2', 'edit'), command('bind-property', 'Bind property', 'link', 'edit')] }, { label: 'Formatting', commands: [command('format-cells', 'Format cells', 'paintbrush', 'edit'), command('freeze', 'Freeze panes', 'pin', 'view')] }],
|
||||
},
|
||||
Assembly: {
|
||||
id: 'Assembly', category: 'Engineering', description: 'Components, constraints and motion studies', taskTitle: 'Assembly task', taskSummary: 'Arrange components and validate assembly constraints.', objectType: 'Assembly::AssemblyObject',
|
||||
groups: [{ label: 'Components', commands: [command('insert-component', 'Insert component', 'file-plus', 'create'), command('ground-component', 'Ground component', 'anchor', 'edit'), command('explode-view', 'Exploded view', 'split', 'view')] }, { label: 'Constraints', commands: [command('coincident', 'Coincident', 'circle-dot', 'create'), command('concentric', 'Concentric', 'target', 'create'), command('distance', 'Distance', 'ruler', 'create'), command('angle', 'Angle', 'protractor', 'create')] }, { label: 'Analysis', commands: [command('solve-assembly', 'Solve assembly', 'circle-check', 'inspect'), command('interference', 'Interference check', 'triangle-alert', 'inspect')] }],
|
||||
},
|
||||
CAM: {
|
||||
id: 'CAM', category: 'Engineering', description: 'Manufacturing jobs, toolpaths and simulation', taskTitle: 'CAM task', taskSummary: 'Define a job, generate toolpaths and inspect simulation.', objectType: 'Path::Job',
|
||||
groups: [{ label: 'Job', commands: [command('new-job', 'Create job', 'file-plus', 'create'), command('stock', 'Stock setup', 'box', 'edit'), command('tools', 'Tool controller', 'settings-2', 'edit')] }, { label: 'Toolpath', commands: [command('profile-path', 'Profile', 'route', 'create'), command('pocket-path', 'Pocket', 'arrow-down', 'create'), command('contour-path', 'Contour', 'repeat', 'create')] }, { label: 'Output', commands: [command('simulate', 'Simulate', 'play', 'inspect'), command('post-process', 'Post process', 'download', 'export')] }],
|
||||
},
|
||||
FEM: {
|
||||
id: 'FEM', category: 'Engineering', description: 'Analysis, materials, meshing and results', taskTitle: 'FEM task', taskSummary: 'Prepare a model, solve it and inspect result fields.', objectType: 'Fem::FemAnalysis',
|
||||
groups: [{ label: 'Analysis', commands: [command('new-analysis', 'Create analysis', 'file-plus', 'create'), command('material', 'Material', 'layers', 'edit'), command('constraint', 'Constraint', 'lock', 'create')] }, { label: 'Mesh', commands: [command('mesh', 'Create mesh', 'grid-3x3', 'create'), command('mesh-check', 'Check mesh', 'circle-check', 'inspect')] }, { label: 'Results', commands: [command('solve', 'Solve', 'play', 'inspect'), command('results', 'Result fields', 'activity', 'inspect'), command('export-results', 'Export results', 'download', 'export')] }],
|
||||
},
|
||||
Mesh: {
|
||||
id: 'Mesh', category: 'Utilities', description: 'Mesh import, repair and conversion', taskTitle: 'Mesh task', taskSummary: 'Inspect topology and repair imported triangulations.', objectType: 'Mesh::Feature',
|
||||
groups: [{ label: 'Import', commands: [command('mesh-import', 'Import mesh', 'upload', 'create'), command('mesh-export', 'Export mesh', 'download', 'export')] }, { label: 'Repair', commands: [command('analyze-mesh', 'Analyze mesh', 'search', 'inspect'), command('repair-mesh', 'Repair mesh', 'wand-sparkles', 'edit'), command('fill-holes', 'Fill holes', 'circle-dot', 'edit')] }, { label: 'Conversion', commands: [command('shape-from-mesh', 'Shape from mesh', 'box', 'create'), command('mesh-from-shape', 'Mesh from shape', 'triangle', 'create')] }],
|
||||
},
|
||||
Surface: {
|
||||
id: 'Surface', category: 'Modeling', description: 'Curves, surfaces and surface operations', taskTitle: 'Surface task', taskSummary: 'Create and trim parametric surface geometry.', objectType: 'Part::Feature',
|
||||
groups: [{ label: 'Curves', commands: [command('bspline', 'B-spline', 'spline', 'create'), command('bezier', 'Bezier curve', 'route', 'create'), command('helix-curve', 'Helix', 'rotate', 'create')] }, { label: 'Surfaces', commands: [command('fill-surface', 'Fill', 'square', 'create'), command('loft-surface', 'Loft', 'route', 'create'), command('sweep-surface', 'Sweep', 'git-branch', 'create')] }, { label: 'Modify', commands: [command('trim-surface', 'Trim', 'scissors', 'edit'), command('offset-surface', 'Offset', 'copy', 'edit')] }],
|
||||
},
|
||||
Inspection: {
|
||||
id: 'Inspection', category: 'Utilities', description: 'Measurements, sections and model validation', taskTitle: 'Inspection task', taskSummary: 'Measure geometry and validate model dependencies.', objectType: 'Part::Feature',
|
||||
groups: [{ label: 'Measure', commands: [command('measure-distance', 'Distance', 'ruler', 'inspect'), command('measure-angle', 'Angle', 'protractor', 'inspect'), command('measure-area', 'Area', 'square', 'inspect')] }, { label: 'Review', commands: [command('section', 'Section', 'scissors', 'inspect'), command('check-dependencies', 'Check dependencies', 'circle-check', 'inspect'), command('report', 'Generate report', 'file-text', 'export')] }],
|
||||
},
|
||||
}
|
||||
|
||||
export const pinnedWorkbenches: WorkbenchId[] = ['Part Design', 'Part', 'Sketcher', 'Draft', 'TechDraw', 'Spreadsheet']
|
||||
|
||||
export const menuDefinitions = {
|
||||
File: [
|
||||
{ label: 'New document', shortcut: 'Ctrl+N', command: 'new-document' }, { label: 'Open...', shortcut: 'Ctrl+O', command: 'open' }, { label: 'Save', shortcut: 'Ctrl+S', command: 'save' }, { label: 'Save as...', command: 'save-as' }, { label: 'Import...', command: 'import' }, { label: 'Export...', command: 'export' }, { label: 'Close document', shortcut: 'Ctrl+W', command: 'close' },
|
||||
],
|
||||
Edit: [{ label: 'Undo', shortcut: 'Ctrl+Z', command: 'undo' }, { label: 'Redo', shortcut: 'Ctrl+Y', command: 'redo' }, { label: 'Cut', shortcut: 'Ctrl+X', command: 'cut' }, { label: 'Copy', shortcut: 'Ctrl+C', command: 'copy' }, { label: 'Paste', shortcut: 'Ctrl+V', command: 'paste' }, { label: 'Preferences', command: 'preferences' }],
|
||||
View: [{ label: 'Standard views', command: 'standard-views' }, { label: 'Axonometric', shortcut: '0', command: 'axonometric' }, { label: 'Fit all', shortcut: 'V, F', command: 'fit-all' }, { label: 'Panels', command: 'panels' }, { label: 'Fullscreen', shortcut: 'F11', command: 'fullscreen' }],
|
||||
Tools: [{ label: 'Customize...', command: 'customize' }, { label: 'Edit parameters...', command: 'parameters' }, { label: 'Dependency graph', command: 'dependency-graph' }, { label: 'Project settings', command: 'project-settings' }],
|
||||
Macro: [{ label: 'Macros...', command: 'macros' }, { label: 'Record macro', command: 'record-macro' }, { label: 'Stop recording', command: 'stop-macro' }, { label: 'Execute macro', command: 'execute-macro' }],
|
||||
Windows: [{ label: 'Tile documents', command: 'tile' }, { label: 'Cascade documents', command: 'cascade' }, { label: 'Next document', shortcut: 'Ctrl+Tab', command: 'next-document' }, { label: 'Close all documents', command: 'close-all' }],
|
||||
Help: [{ label: 'Help contents', shortcut: 'F1', command: 'help' }, { label: 'Keyboard shortcuts', command: 'shortcuts' }, { label: 'Diagnostics', command: 'diagnostics' }, { label: 'About BitBybit CAD', command: 'about' }],
|
||||
} as const
|
||||
|
||||
export type MenuName = keyof typeof menuDefinitions
|
||||
10
src/main.tsx
Normal file
10
src/main.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { StrictMode } from 'react'
|
||||
import { createRoot } from 'react-dom/client'
|
||||
import App from './App'
|
||||
import './styles.css'
|
||||
|
||||
createRoot(document.getElementById('root')!).render(
|
||||
<StrictMode>
|
||||
<App />
|
||||
</StrictMode>,
|
||||
)
|
||||
365
src/styles.css
Normal file
365
src/styles.css
Normal file
@@ -0,0 +1,365 @@
|
||||
:root {
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
color: #e5e9eb;
|
||||
background: #0f1317;
|
||||
font-synthesis: none;
|
||||
text-rendering: optimizeLegibility;
|
||||
--bg: #0f1317;
|
||||
--bg-raised: #151a1f;
|
||||
--bg-panel: #191f24;
|
||||
--bg-soft: #20272d;
|
||||
--bg-hover: #252e35;
|
||||
--line: #2b343b;
|
||||
--line-soft: #232b31;
|
||||
--text: #e5e9eb;
|
||||
--text-soft: #a5afb5;
|
||||
--text-muted: #707c83;
|
||||
--cyan: #5ed6d6;
|
||||
--cyan-soft: #203c40;
|
||||
--green: #73d6a3;
|
||||
--green-soft: #203b31;
|
||||
--amber: #efbe72;
|
||||
--amber-soft: #423621;
|
||||
--red: #ef8582;
|
||||
--red-soft: #452a2c;
|
||||
--violet: #b9a4ec;
|
||||
--blue: #8cbff1;
|
||||
--radius: 6px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html, body, #root { min-height: 100%; margin: 0; }
|
||||
body { min-width: 320px; background: var(--bg); }
|
||||
button, input, select { font: inherit; }
|
||||
button { color: inherit; }
|
||||
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
|
||||
|
||||
.app-shell { min-height: 100vh; background: var(--bg); }
|
||||
.topbar { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 18px; border-bottom: 1px solid var(--line); background: #11161a; position: relative; z-index: 3; }
|
||||
.brand-lockup { display: flex; align-items: center; gap: 9px; width: 174px; cursor: pointer; user-select: none; }
|
||||
.brand-mark { width: 25px; height: 25px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; align-items: end; }
|
||||
.brand-mark span { display: block; border-radius: 2px 2px 1px 1px; background: var(--cyan); }
|
||||
.brand-mark span:nth-child(1) { height: 11px; opacity: .55; }
|
||||
.brand-mark span:nth-child(2) { height: 18px; }
|
||||
.brand-mark span:nth-child(3) { height: 25px; opacity: .75; }
|
||||
.brand-name { font-size: 13px; font-weight: 750; letter-spacing: .03em; line-height: 15px; }
|
||||
.brand-product { color: var(--text-muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; line-height: 12px; }
|
||||
.top-menu { display: flex; align-items: center; gap: 1px; }
|
||||
.menu-wrapper { position: relative; }
|
||||
.top-menu button { border: 0; background: transparent; color: var(--text-soft); font-size: 12px; padding: 8px 9px; border-radius: 4px; cursor: pointer; }
|
||||
.top-menu button:hover { background: var(--bg-hover); color: var(--text); }
|
||||
.top-menu button.is-open { background: var(--bg-soft); color: var(--text); }
|
||||
.menu-popover { position: absolute; top: 35px; left: 0; z-index: 20; min-width: 205px; padding: 5px; border: 1px solid var(--line); border-radius: 4px; background: #171d22; box-shadow: 0 14px 28px rgba(0,0,0,.35); }
|
||||
.menu-popover button { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 9px; border-radius: 3px; text-align: left; color: var(--text-soft); font-size: 11px; }
|
||||
.menu-popover button:hover { background: var(--bg-hover); color: var(--text); }
|
||||
.menu-popover kbd { color: var(--text-muted); font-size: 9px; white-space: nowrap; }
|
||||
.topbar-spacer { flex: 1; }
|
||||
.topbar-context { display: flex; align-items: center; gap: 12px; margin-right: 4px; white-space: nowrap; }
|
||||
.context-document { font-size: 12px; color: var(--text-soft); }
|
||||
.context-dot, .save-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 7px; background: var(--cyan); vertical-align: 1px; }
|
||||
.context-separator { color: var(--text-muted); margin: 0 7px; }
|
||||
.save-state { color: var(--amber); font-size: 11px; }
|
||||
.save-dot { background: var(--amber); }
|
||||
.topbar-divider, .toolbar-divider { width: 1px; height: 22px; background: var(--line); margin: 0 3px; }
|
||||
.icon-button { width: 30px; height: 30px; display: inline-grid; place-items: center; border: 1px solid transparent; border-radius: 4px; background: transparent; color: var(--text-muted); cursor: pointer; padding: 0; }
|
||||
.icon-button:hover { color: var(--text); background: var(--bg-hover); border-color: var(--line); }
|
||||
.icon-button.is-active { color: var(--cyan); background: var(--cyan-soft); border-color: #2e6768; }
|
||||
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
|
||||
.command-search { height: 30px; min-width: 172px; display: flex; align-items: center; gap: 8px; padding: 0 8px 0 10px; background: var(--bg-raised); border: 1px solid var(--line); border-radius: 4px; color: var(--text-muted); font-size: 11px; cursor: pointer; }
|
||||
.command-search:hover { color: var(--text); border-color: #466067; }
|
||||
.command-search kbd { margin-left: auto; color: var(--text-muted); font-size: 10px; border: 1px solid var(--line); border-radius: 3px; padding: 2px 4px; }
|
||||
.avatar-button { height: 30px; display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-soft); padding: 0 8px; cursor: pointer; font-size: 10px; }
|
||||
.avatar-button:hover { border-color: #466067; color: var(--text); }
|
||||
|
||||
.page-shell { min-height: calc(100vh - 56px); overflow: auto; }
|
||||
.page-content { width: min(1240px, calc(100% - 64px)); margin: 0 auto; padding: 56px 0 44px; }
|
||||
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 34px; }
|
||||
.page-heading { max-width: 690px; }
|
||||
.page-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--cyan); font-size: 11px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 12px; }
|
||||
.page-heading h1 { font-size: 33px; line-height: 1.08; letter-spacing: -.01em; margin: 0; font-weight: 680; color: var(--text); }
|
||||
.page-heading p { margin: 12px 0 0; color: var(--text-soft); font-size: 14px; line-height: 1.6; max-width: 620px; }
|
||||
.page-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
|
||||
.back-button { width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-soft); cursor: pointer; }
|
||||
.back-button:hover { color: var(--text); background: var(--bg-hover); }
|
||||
.button { min-height: 34px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 4px; padding: 0 13px; font-size: 12px; font-weight: 650; cursor: pointer; white-space: nowrap; }
|
||||
.button-primary { background: var(--cyan); color: #102124; border-color: var(--cyan); }
|
||||
.button-primary:hover { background: #82e3e0; border-color: #82e3e0; }
|
||||
.button-outline { background: transparent; border-color: var(--line); color: var(--text-soft); }
|
||||
.button-outline:hover { border-color: #567178; color: var(--text); background: var(--bg-hover); }
|
||||
.button-quiet { color: var(--text-soft); background: transparent; }
|
||||
.button-quiet:hover { background: var(--bg-hover); color: var(--text); }
|
||||
.text-button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--cyan); font-size: 12px; padding: 4px 0; cursor: pointer; }
|
||||
.text-button:hover { color: #94ece8; }
|
||||
.panel-surface { background: var(--bg-panel); border: 1px solid var(--line); border-radius: var(--radius); }
|
||||
.section-kicker, .eyebrow { display: flex; align-items: center; gap: 5px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
|
||||
.section-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
|
||||
.section-title h3 { margin: 6px 0 0; font-size: 16px; font-weight: 650; }
|
||||
.badge { height: 20px; display: inline-flex; align-items: center; gap: 5px; border-radius: 3px; padding: 0 7px; font-size: 10px; font-weight: 650; white-space: nowrap; }
|
||||
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
|
||||
.badge-cyan { color: var(--cyan); background: var(--cyan-soft); }
|
||||
.badge-green { color: var(--green); background: var(--green-soft); }
|
||||
.badge-amber { color: var(--amber); background: var(--amber-soft); }
|
||||
.badge-red { color: var(--red); background: var(--red-soft); }
|
||||
.badge-muted { color: var(--text-muted); background: var(--bg-soft); }
|
||||
|
||||
/* Start page */
|
||||
.start-page { padding-bottom: 14px; }
|
||||
.start-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; }
|
||||
.start-hero { min-height: 312px; display: flex; justify-content: space-between; overflow: hidden; position: relative; }
|
||||
.hero-copy { width: 53%; padding: 36px 0 32px 36px; position: relative; z-index: 1; }
|
||||
.hero-copy .section-kicker { color: var(--cyan); }
|
||||
.hero-copy h2 { font-size: 30px; line-height: 1.1; letter-spacing: -.02em; margin: 17px 0 12px; font-weight: 670; }
|
||||
.hero-copy p { color: var(--text-soft); font-size: 14px; line-height: 1.6; margin: 0; max-width: 390px; }
|
||||
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 28px; }
|
||||
.hero-schematic { width: 47%; min-width: 280px; position: relative; overflow: hidden; border-left: 1px solid var(--line-soft); background: #171e23; }
|
||||
.hero-schematic::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(100, 138, 141, .11) 1px, transparent 1px), linear-gradient(90deg, rgba(100, 138, 141, .11) 1px, transparent 1px); background-size: 30px 30px; opacity: .55; }
|
||||
.schematic-axis { position: absolute; background: #46666d; opacity: .7; transform-origin: left center; }
|
||||
.axis-x-line { left: 56%; top: 66%; width: 150px; height: 1px; transform: rotate(-11deg); }
|
||||
.axis-y-line { left: 56%; top: 66%; width: 126px; height: 1px; transform: rotate(-54deg); }
|
||||
.schematic-block { position: absolute; border: 1px solid rgba(123, 210, 208, .48); background: rgba(68, 140, 143, .28); transform: skewY(-26deg) rotate(26deg); box-shadow: inset -12px -10px 0 rgba(9, 17, 20, .19); }
|
||||
.block-a { width: 135px; height: 90px; left: 28%; top: 29%; }
|
||||
.block-b { width: 84px; height: 51px; left: 47%; top: 51%; background: rgba(234, 180, 98, .17); border-color: rgba(238, 190, 114, .6); }
|
||||
.schematic-ring { width: 43px; height: 43px; border: 7px solid rgba(118, 218, 214, .65); border-left-color: transparent; border-radius: 50%; position: absolute; left: 37%; top: 41%; transform: rotate(-23deg); }
|
||||
.schematic-label { position: absolute; color: var(--text-muted); font-size: 10px; letter-spacing: .04em; }
|
||||
.label-a { left: 12%; top: 16%; }
|
||||
.label-b { right: 12%; bottom: 18%; color: var(--amber); }
|
||||
.quick-panel { padding: 22px 18px; }
|
||||
.quick-panel .section-title { margin-bottom: 17px; }
|
||||
.quick-action { width: 100%; display: flex; align-items: center; gap: 11px; border: 0; border-top: 1px solid var(--line-soft); background: transparent; color: var(--text-soft); padding: 15px 0; text-align: left; cursor: pointer; }
|
||||
.quick-action:last-child { border-bottom: 1px solid var(--line-soft); }
|
||||
.quick-action:hover { color: var(--text); }
|
||||
.quick-action:hover > svg { color: var(--cyan); transform: translateX(2px); }
|
||||
.quick-action > svg { margin-left: auto; transition: transform .15s ease; }
|
||||
.quick-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }
|
||||
.quick-action strong, .quick-action small { display: block; }
|
||||
.quick-action strong { font-size: 12px; font-weight: 620; }
|
||||
.quick-action small { color: var(--text-muted); font-size: 10px; margin-top: 3px; }
|
||||
.recent-section { margin-top: 35px; }
|
||||
.recent-section > .section-title { margin-bottom: 14px; }
|
||||
.recent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
|
||||
.project-card { display: block; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--bg-panel); border-radius: var(--radius); text-align: left; cursor: pointer; }
|
||||
.project-card:hover { border-color: #51636a; transform: translateY(-1px); }
|
||||
.project-preview, .list-thumbnail { position: relative; overflow: hidden; background: #12191d; }
|
||||
.project-preview { height: 144px; border-bottom: 1px solid var(--line); }
|
||||
.preview-grid { position: absolute; inset: 0; opacity: .36; background-image: linear-gradient(rgba(95, 141, 146, .16) 1px, transparent 1px), linear-gradient(90deg, rgba(95, 141, 146, .16) 1px, transparent 1px); background-size: 22px 22px; }
|
||||
.preview-shape { position: absolute; z-index: 1; width: 106px; height: 68px; left: 50%; top: 50%; border: 1px solid rgba(123, 212, 211, .78); background: rgba(80, 153, 156, .38); transform: translate(-50%, -44%) skewY(-23deg) rotate(23deg); box-shadow: 23px 13px 0 rgba(41, 90, 95, .33); }
|
||||
.preview-1 .preview-shape { width: 78px; height: 98px; background: rgba(239, 190, 114, .28); border-color: rgba(239, 190, 114, .7); transform: translate(-50%, -46%) skewY(-23deg) rotate(23deg); }
|
||||
.preview-2 .preview-shape { width: 132px; height: 47px; background: rgba(181, 164, 236, .23); border-color: rgba(181, 164, 236, .64); transform: translate(-50%, -44%) skewY(-22deg) rotate(23deg); }
|
||||
.project-card-info { padding: 14px 15px 15px; }
|
||||
.project-card-title { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
|
||||
.project-card-title strong { font-size: 13px; font-weight: 650; }
|
||||
.project-card-title svg { color: var(--text-muted); }
|
||||
.project-card-info > span { display: block; margin-top: 5px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
|
||||
.project-card-meta { display: flex; align-items: center; gap: 9px; margin-top: 13px; color: var(--text-muted); font-size: 10px; }
|
||||
.project-card-meta .badge { margin-left: auto; }
|
||||
.start-footer { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line-soft); margin-top: 38px; padding-top: 15px; color: var(--text-muted); font-size: 10px; }
|
||||
.start-footer > div { display: flex; align-items: center; gap: 8px; }
|
||||
.start-footer svg { color: var(--green); }
|
||||
.footer-separator { color: var(--line); }
|
||||
|
||||
/* Project manager */
|
||||
.manager-toolbar { display: flex; gap: 9px; align-items: center; margin-bottom: 14px; }
|
||||
.large-search { height: 36px; flex: 1; max-width: 440px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-muted); }
|
||||
.large-search input, .tree-search input, .help-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
|
||||
.large-search kbd, .help-search kbd { color: var(--text-muted); font-size: 10px; border: 1px solid var(--line); padding: 2px 5px; border-radius: 3px; }
|
||||
.toolbar-select { height: 36px; display: flex; align-items: center; gap: 6px; margin-left: auto; color: var(--text-muted); font-size: 11px; }
|
||||
.toolbar-select select { appearance: none; border: 1px solid var(--line); background: var(--bg-raised); color: var(--text-soft); border-radius: 4px; height: 36px; padding: 0 28px 0 9px; }
|
||||
.toolbar-select svg { margin-left: -24px; pointer-events: none; }
|
||||
.project-list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-panel); }
|
||||
.project-list-row { min-height: 72px; display: grid; grid-template-columns: 58px minmax(180px, 1fr) 100px 105px 95px 32px; gap: 14px; align-items: center; padding: 7px 14px 7px 8px; border-bottom: 1px solid var(--line-soft); }
|
||||
.project-list-row:last-child { border-bottom: 0; }
|
||||
.project-list-row:hover { background: var(--bg-hover); }
|
||||
.list-thumbnail { width: 58px; height: 56px; border-radius: 3px; }
|
||||
.list-thumbnail .preview-shape { width: 42px; height: 28px; }
|
||||
.list-main strong, .list-main span { display: block; }
|
||||
.list-main strong { font-size: 12px; font-weight: 650; }
|
||||
.list-main span, .list-count, .list-modified { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
|
||||
.list-count, .list-modified { margin-top: 0; }
|
||||
.row-action { width: 28px; height: 28px; display: grid; place-items: center; border: 0; color: var(--text-muted); background: transparent; cursor: pointer; border-radius: 4px; }
|
||||
.row-action:hover { color: var(--text); background: var(--bg-soft); }
|
||||
.storage-banner { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 16px; background: #172024; border: 1px solid #2a4b4d; border-radius: var(--radius); }
|
||||
.storage-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }
|
||||
.storage-banner strong, .storage-banner span { display: block; }
|
||||
.storage-banner strong { font-size: 12px; }
|
||||
.storage-banner span { font-size: 10px; color: var(--text-soft); margin-top: 3px; }
|
||||
.storage-banner .text-button { margin-left: auto; }
|
||||
|
||||
/* Import/export */
|
||||
.flow-page { max-width: 930px; margin: 0 auto; }
|
||||
.flow-layout { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 22px; }
|
||||
.flow-steps { padding-top: 13px; }
|
||||
.flow-step { display: flex; align-items: center; gap: 9px; color: var(--text-muted); font-size: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
|
||||
.flow-step.is-active { color: var(--text); font-weight: 650; }
|
||||
.flow-step.is-complete { color: var(--green); }
|
||||
.flow-index { width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; color: var(--text-muted); }
|
||||
.flow-step.is-active .flow-index { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-soft); }
|
||||
.flow-step.is-complete .flow-index { color: #14231d; border-color: var(--green); background: var(--green); }
|
||||
.flow-card { min-height: 430px; padding: 24px; display: flex; flex-direction: column; }
|
||||
.flow-card-header { display: flex; justify-content: space-between; align-items: flex-start; }
|
||||
.flow-card-header h2 { margin: 8px 0 0; font-size: 20px; font-weight: 650; }
|
||||
.drop-zone { flex: 1; min-height: 245px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; margin: 24px 0; border: 1px dashed #46666d; border-radius: 5px; background: #162024; color: var(--text-soft); }
|
||||
.drop-icon { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #3a6267; color: var(--cyan); background: var(--cyan-soft); border-radius: 50%; margin-bottom: 6px; }
|
||||
.drop-zone strong { color: var(--text); font-size: 13px; }
|
||||
.drop-zone span { font-size: 11px; }
|
||||
.drop-zone .button { margin-top: 12px; }
|
||||
.drop-zone small { color: var(--text-muted); font-size: 9px; letter-spacing: .08em; margin-top: 7px; }
|
||||
.flow-note { display: flex; align-items: flex-start; gap: 8px; padding: 11px; color: var(--amber); background: var(--amber-soft); border: 1px solid #654f2f; border-radius: 4px; font-size: 11px; line-height: 1.4; }
|
||||
.flow-note svg { flex-shrink: 0; }
|
||||
.format-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 28px 0; }
|
||||
.format-card { position: relative; min-height: 106px; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; padding: 14px; background: var(--bg-raised); color: var(--text-soft); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; text-align: left; }
|
||||
.format-card:hover { border-color: #5b7379; }
|
||||
.format-card.is-selected { color: var(--text); border-color: var(--cyan); background: var(--cyan-soft); }
|
||||
.format-icon { color: var(--cyan); }
|
||||
.format-card strong { font-size: 12px; }
|
||||
.format-card small { color: var(--text-muted); font-size: 10px; }
|
||||
.format-check { position: absolute; right: 10px; top: 10px; color: var(--cyan); }
|
||||
.flow-footer { display: flex; justify-content: flex-end; gap: 7px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
|
||||
|
||||
/* Settings, help, diagnostics and sync */
|
||||
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 22px; align-items: start; }
|
||||
.settings-nav { display: flex; flex-direction: column; gap: 2px; }
|
||||
.settings-nav button { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 11px; border: 0; border-radius: 4px; background: transparent; color: var(--text-muted); text-align: left; font-size: 12px; cursor: pointer; }
|
||||
.settings-nav button:hover { color: var(--text); background: var(--bg-hover); }
|
||||
.settings-nav button.is-active { color: var(--text); background: var(--bg-soft); box-shadow: inset 2px 0 0 var(--cyan); }
|
||||
.settings-content { padding: 0 23px; }
|
||||
.setting-section { padding: 23px 0 10px; border-bottom: 1px solid var(--line-soft); }
|
||||
.setting-section:last-child { border-bottom: 0; }
|
||||
.setting-section-heading h2 { font-size: 14px; margin: 0; font-weight: 650; }
|
||||
.setting-section-heading p { margin: 6px 0 15px; font-size: 11px; color: var(--text-muted); }
|
||||
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 54px; border-top: 1px solid var(--line-soft); }
|
||||
.setting-row strong, .setting-row span { display: block; }
|
||||
.setting-row strong { font-size: 12px; font-weight: 600; }
|
||||
.setting-row > div:first-child span { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
|
||||
.setting-control { display: flex; align-items: center; min-width: 190px; justify-content: flex-end; }
|
||||
.setting-control select { width: 190px; height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg-raised); color: var(--text-soft); font-size: 11px; }
|
||||
.setting-control input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--cyan); }
|
||||
.setting-value { color: var(--text-soft); font-size: 11px; }
|
||||
.storage-meter { width: 190px; height: 8px; display: block; background: var(--bg-soft); border-radius: 2px; overflow: hidden; }
|
||||
.storage-meter span { display: block; width: 34%; height: 100%; background: var(--cyan); }
|
||||
.help-search { height: 48px; display: flex; align-items: center; gap: 11px; padding: 0 14px; background: var(--bg-panel); border: 1px solid var(--line); border-radius: 4px; color: var(--text-muted); margin-bottom: 17px; }
|
||||
.help-search input { font-size: 13px; }
|
||||
.help-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
|
||||
.help-card { min-height: 86px; display: flex; align-items: center; gap: 12px; padding: 16px; text-align: left; color: var(--text-soft); cursor: pointer; }
|
||||
.help-card:hover { border-color: #536e74; background: var(--bg-hover); }
|
||||
.help-card > svg { margin-left: auto; color: var(--text-muted); }
|
||||
.help-icon { width: 32px; height: 32px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }
|
||||
.help-card strong, .help-card small { display: block; }
|
||||
.help-card strong { color: var(--text); font-size: 12px; }
|
||||
.help-card small { color: var(--text-muted); font-size: 10px; margin-top: 5px; }
|
||||
.shortcut-panel { margin-top: 18px; padding: 20px; }
|
||||
.shortcut-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px 22px; margin-top: 18px; }
|
||||
.shortcut-row { display: flex; align-items: center; gap: 9px; min-height: 31px; color: var(--text-soft); font-size: 11px; }
|
||||
.shortcut-row kbd { min-width: 42px; color: var(--text); text-align: center; border: 1px solid var(--line); border-bottom-color: #56646b; border-radius: 3px; padding: 4px 5px; font-size: 10px; background: var(--bg-raised); }
|
||||
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
|
||||
.health-card { min-height: 135px; padding: 16px; }
|
||||
.health-icon { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 4px; margin-bottom: 19px; }
|
||||
.health-icon.green { color: var(--green); background: var(--green-soft); }
|
||||
.health-icon.cyan { color: var(--cyan); background: var(--cyan-soft); }
|
||||
.health-icon.amber { color: var(--amber); background: var(--amber-soft); }
|
||||
.health-card strong, .health-card small { display: block; }
|
||||
.health-card strong { font-size: 14px; margin-top: 6px; }
|
||||
.health-card small { color: var(--text-muted); font-size: 10px; margin-top: 4px; }
|
||||
.diagnostic-table { margin-top: 16px; padding: 20px; }
|
||||
.last-checked { color: var(--text-muted); font-size: 10px; }
|
||||
.diagnostic-row { width: 100%; display: grid; grid-template-columns: 180px 1fr 100px 20px; align-items: center; gap: 12px; min-height: 47px; border: 0; border-top: 1px solid var(--line-soft); color: var(--text-soft); background: transparent; text-align: left; cursor: pointer; }
|
||||
.diagnostic-row:hover { color: var(--text); }
|
||||
.diagnostic-name { display: flex; align-items: center; gap: 8px; font-size: 11px; }
|
||||
.diagnostic-detail { font-size: 10px; color: var(--text-muted); }
|
||||
.diagnostic-value { font-size: 10px; text-align: right; }
|
||||
.diagnostic-value.green { color: var(--green); }.diagnostic-value.cyan { color: var(--cyan); }.diagnostic-value.amber { color: var(--amber); }
|
||||
.status-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }.status-dot.green { background: var(--green); }.status-dot.cyan { background: var(--cyan); }.status-dot.amber { background: var(--amber); }
|
||||
.sync-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; }
|
||||
.sync-card { padding: 23px; }
|
||||
.sync-card-header { display: flex; align-items: center; gap: 11px; }
|
||||
.sync-card-header .badge { margin-left: auto; }
|
||||
.sync-logo { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 4px; color: var(--cyan); background: var(--cyan-soft); }
|
||||
.sync-card h2 { margin: 6px 0 0; font-size: 17px; }
|
||||
.sync-card > p { color: var(--text-soft); font-size: 12px; line-height: 1.6; margin: 20px 0; max-width: 440px; }
|
||||
.sync-stats { display: flex; gap: 36px; border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding: 16px 0; margin-bottom: 19px; }
|
||||
.sync-stats strong, .sync-stats span { display: block; }.sync-stats strong { font-size: 15px; }.sync-stats span { color: var(--text-muted); font-size: 10px; margin-top: 4px; }
|
||||
.sync-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 62px; border-top: 1px solid var(--line-soft); }
|
||||
.sync-row strong, .sync-row span { display: block; }.sync-row strong { font-size: 12px; }.sync-row div span { color: var(--text-muted); font-size: 10px; margin-top: 4px; }.sync-row.is-disabled { opacity: .58; }
|
||||
.toggle { width: 32px; height: 18px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); padding: 2px; }.toggle span { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--text-muted); }
|
||||
|
||||
/* Workspace */
|
||||
.workspace-page { height: calc(100vh - 56px); display: flex; flex-direction: column; min-height: 620px; overflow: hidden; }
|
||||
.workspace-toolbar { height: 46px; flex-shrink: 0; display: flex; align-items: center; gap: 5px; padding: 0 12px; border-bottom: 1px solid var(--line); background: var(--bg-raised); }
|
||||
.workbench-picker { height: 31px; min-width: 154px; display: flex; align-items: center; gap: 7px; padding: 0 7px 0 10px; color: var(--cyan); background: var(--cyan-soft); border: 1px solid #2f6567; border-radius: 4px; }
|
||||
.workbench-picker select { appearance: none; min-width: 100px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 11px; cursor: pointer; }.workbench-picker svg:last-child { margin-left: auto; color: var(--text-muted); }
|
||||
.toolbar-spacer { flex: 1; }.toolbar-status { display: flex; align-items: center; gap: 6px; padding: 0 10px; color: var(--text-muted); font-size: 10px; }.status-pulse { width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 0 3px rgba(115, 214, 163, .11); }
|
||||
.document-tabs { height: 36px; flex-shrink: 0; display: flex; align-items: flex-end; gap: 1px; padding: 0 12px; border-bottom: 1px solid var(--line); background: #11161a; }
|
||||
.doc-tab { height: 32px; display: flex; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid transparent; border-bottom: 0; border-radius: 4px 4px 0 0; color: var(--text-muted); background: transparent; font-size: 11px; cursor: pointer; }.doc-tab:hover { color: var(--text-soft); }.doc-tab.is-active { color: var(--text); border-color: var(--line); background: var(--bg-panel); }.doc-tab svg:last-child { margin-left: 8px; color: var(--text-muted); }.doc-unsaved { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }.new-tab { width: 29px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }.new-tab:hover { color: var(--cyan); }.document-tab-spacer { flex: 1; }.document-meta { padding: 0 4px 9px; color: var(--text-muted); font-size: 10px; }
|
||||
.workbench-nav { height: 32px; flex-shrink: 0; display: flex; align-items: center; gap: 2px; padding: 0 11px; overflow: hidden; border-bottom: 1px solid var(--line); background: #13191d; }
|
||||
.nav-caption { color: var(--text-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; margin-right: 7px; }
|
||||
.workbench-nav button { height: 25px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--text-muted); font-size: 10px; cursor: pointer; white-space: nowrap; }
|
||||
.workbench-nav button:hover { color: var(--text); background: var(--bg-hover); }.workbench-nav button.is-active { color: var(--cyan); border-color: #2c6568; background: var(--cyan-soft); }.workbench-nav .nav-more { margin-left: auto; }
|
||||
.workspace-content { min-height: 0; flex: 1; display: grid; grid-template-columns: 300px minmax(0, 1fr) 360px 44px; }
|
||||
.combo-panel, .properties-panel, .task-dock { min-width: 0; background: var(--bg-panel); overflow: hidden; }.left-panel { border-right: 1px solid var(--line); }.right-panel { border-left: 1px solid var(--line); }
|
||||
.panel-tabs { height: 39px; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); background: var(--bg-raised); }.panel-tabs button { display: flex; align-items: center; gap: 6px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-muted); font-size: 11px; cursor: pointer; }.panel-tabs button:hover { color: var(--text-soft); }.panel-tabs button.is-active { color: var(--text); border-bottom-color: var(--cyan); }.tab-count { min-width: 16px; height: 16px; display: inline-grid; place-items: center; padding: 0 4px; color: var(--cyan); background: var(--cyan-soft); border-radius: 3px; font-size: 9px; }.tab-count-green { color: var(--green); background: var(--green-soft); }
|
||||
.combo-model { height: calc(100% - 39px); min-height: 0; display: flex; flex-direction: column; }.model-tree { min-height: 190px; flex: 1 1 58%; display: flex; flex-direction: column; }.tree-toolbar { display: flex; gap: 5px; padding: 10px 9px; }.tree-search { min-width: 0; flex: 1; display: flex; align-items: center; gap: 7px; height: 28px; padding: 0 8px; border: 1px solid var(--line); background: var(--bg-raised); border-radius: 3px; color: var(--text-muted); }.tree-search input { font-size: 11px; }.tree-root { padding: 0 4px; overflow: auto; }.tree-document-row { height: 29px; display: flex; align-items: center; gap: 6px; padding: 0 8px; color: var(--text); font-size: 11px; font-weight: 650; }.tree-version { margin-left: auto; color: var(--text-muted); font-size: 9px; font-weight: 500; }.tree-row { width: 100%; min-height: 29px; display: flex; align-items: center; gap: 5px; padding-right: 8px; border: 0; border-left: 2px solid transparent; background: transparent; color: var(--text-soft); text-align: left; font-size: 11px; cursor: pointer; }.tree-row:hover { background: var(--bg-hover); color: var(--text); }.tree-row.is-selected { color: var(--text); border-left-color: var(--cyan); background: var(--cyan-soft); }.tree-row.is-active .tree-label { color: var(--cyan); }.tree-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tree-spacer { width: 13px; }.tree-child { color: var(--text-muted); }.tree-children .tree-row { padding-left: 29px !important; }.active-marker { width: 5px; height: 5px; margin-left: auto; background: var(--cyan); border-radius: 50%; }.tree-footer { display: flex; gap: 13px; margin-top: auto; padding: 12px 12px 14px; border-top: 1px solid var(--line-soft); color: var(--text-muted); font-size: 9px; }.tree-footer span { display: inline-flex; align-items: center; gap: 5px; }.legend-dot { width: 5px; height: 5px; display: inline-block; border-radius: 50%; }.legend-dot.valid { background: var(--green); }.legend-dot.warning { background: var(--amber); }
|
||||
.task-panel { height: calc(100% - 39px); display: flex; flex-direction: column; overflow: auto; }.task-header { display: flex; align-items: center; gap: 9px; padding: 18px 15px; border-bottom: 1px solid var(--line-soft); }.task-header .badge { margin-left: auto; }.task-icon { width: 30px; height: 30px; display: grid; place-items: center; color: var(--cyan); background: var(--cyan-soft); border-radius: 4px; }.task-header h2 { margin: 4px 0 0; font-size: 13px; }.task-body { padding: 16px 15px; }.task-step { display: flex; gap: 9px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line-soft); }.step-index { width: 19px; height: 19px; display: grid; place-items: center; color: #142124; background: var(--cyan); border-radius: 50%; font-size: 10px; font-weight: 700; flex-shrink: 0; }.task-step strong, .task-step span { display: block; }.task-step strong { font-size: 11px; }.task-step span { color: var(--text-muted); font-size: 10px; line-height: 1.4; margin-top: 3px; }.field-label { display: block; color: var(--text-soft); font-size: 10px; margin-bottom: 14px; }.field-unit { float: right; color: var(--text-muted); }.field-input { width: 100%; height: 30px; display: block; margin-top: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px; background: var(--bg-raised); color: var(--text); font-size: 11px; }.field-input:focus { border-color: #527479; outline: none; }.check-row { display: flex; align-items: center; gap: 7px; color: var(--text-soft); font-size: 10px; margin-top: 3px; }.check-row input { accent-color: var(--cyan); }.task-note { display: flex; align-items: flex-start; gap: 7px; margin-top: 18px; color: var(--amber); font-size: 10px; line-height: 1.4; }.task-footer { display: flex; gap: 5px; margin-top: auto; padding: 11px 12px; border-top: 1px solid var(--line); }.task-footer .button { flex: 1; padding: 0 7px; min-height: 31px; font-size: 11px; }
|
||||
.viewport-region { min-width: 0; position: relative; background: #0e1417; overflow: hidden; }.viewport { position: absolute; inset: 0; display: flex; flex-direction: column; }.viewport-header { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; border-bottom: 1px solid rgba(85, 113, 119, .22); background: rgba(15, 22, 25, .86); z-index: 1; }.viewport-title { display: flex; flex-direction: column; gap: 3px; }.viewport-title strong { font-size: 11px; font-weight: 600; }.viewport-title .eyebrow { color: var(--text-muted); }.viewport-actions { display: flex; gap: 3px; }.viewport-grid { min-height: 0; flex: 1; position: relative; display: grid; place-items: center; overflow: hidden; cursor: crosshair; }.grid-lines { position: absolute; inset: -25%; opacity: .37; transform: perspective(500px) rotateX(62deg) translateY(13%); background-image: linear-gradient(rgba(81, 130, 136, .22) 1px, transparent 1px), linear-gradient(90deg, rgba(81, 130, 136, .22) 1px, transparent 1px); background-size: 28px 28px; }.mock-part { position: relative; z-index: 2; width: 285px; height: 180px; transform: translate(5%, -4%) skewY(-20deg) rotate(21deg); filter: drop-shadow(24px 22px 0 rgba(0, 0, 0, .16)); cursor: pointer; }.part-front { position: absolute; inset: 0; border: 1px solid #8bd2cf; background: #447d82; box-shadow: inset -12px -14px 0 rgba(13, 36, 41, .25); }.part-top { position: absolute; width: 285px; height: 64px; top: -48px; left: 0; border: 1px solid #83c7c6; background: #60999a; transform: skewX(-35deg); transform-origin: bottom left; }.part-side { position: absolute; width: 50px; height: 180px; right: -34px; top: -24px; border: 1px solid #6ba9a9; background: #34636b; transform: skewY(55deg); transform-origin: top left; }.part-hole { position: absolute; z-index: 3; width: 38px; height: 38px; border-radius: 50%; border: 7px solid #223f44; background: #111b1e; box-shadow: 0 0 0 1px #95d9d5, inset 0 0 0 3px #17282c; }.part-hole.one { left: 55px; top: 51px; }.part-hole.two { right: 50px; top: 51px; }.part-cut { position: absolute; width: 125px; height: 25px; left: 81px; bottom: 31px; border: 1px solid rgba(168, 224, 219, .72); background: rgba(31, 70, 74, .42); }.part-selected .part-front { background: #4e9799; border-color: #b9f1eb; box-shadow: 0 0 0 2px rgba(94, 214, 214, .3), inset -12px -14px 0 rgba(13, 36, 41, .25); }.mock-datum-plane { position: absolute; z-index: 1; width: 320px; height: 205px; border: 1px dashed rgba(239, 190, 114, .42); background: rgba(239, 190, 114, .04); transform: translate(28%, 25%) skewY(-22deg) rotate(21deg); }.selection-callout { position: absolute; z-index: 3; top: 25%; left: 68%; display: flex; align-items: center; gap: 7px; color: var(--cyan); font-size: 10px; }.callout-line { width: 42px; height: 1px; background: var(--cyan); position: relative; }.callout-line::after { content: ''; width: 5px; height: 5px; position: absolute; left: 0; top: -2px; border-radius: 50%; background: var(--cyan); }.viewport-legend { position: absolute; z-index: 4; left: 16px; bottom: 14px; display: flex; gap: 12px; color: var(--text-muted); font-size: 9px; }.viewport-legend span { display: inline-flex; align-items: center; gap: 5px; }.legend-swatch { width: 12px; height: 3px; display: inline-block; border-radius: 2px; }.legend-swatch.selected { background: var(--cyan); }.legend-swatch.edge { background: #8cb7b6; }.legend-swatch.datum { border-top: 1px dashed var(--amber); }.viewport-bottom-left { position: absolute; z-index: 5; left: 16px; bottom: 42px; display: flex; gap: 5px; }.view-chip { display: flex; align-items: center; gap: 5px; padding: 5px 7px; color: var(--text-muted); background: rgba(25, 34, 38, .85); border: 1px solid rgba(93, 124, 129, .32); border-radius: 3px; font-size: 9px; }.axis-widget { width: 64px; height: 64px; position: relative; margin: 0 23px 23px 0; }.axis-origin { width: 7px; height: 7px; position: absolute; left: 28px; top: 30px; border-radius: 50%; background: #d9e3e3; }.axis-widget::before, .axis-widget::after { content: ''; position: absolute; left: 31px; top: 31px; width: 29px; height: 1px; transform-origin: left center; }.axis-widget::before { background: #d77f7e; transform: rotate(-18deg); }.axis-widget::after { background: #78d19f; transform: rotate(-80deg); }.axis-x, .axis-y, .axis-z { position: absolute; font-size: 9px; font-weight: 700; }.axis-x { right: 0; top: 19px; color: #e58b88; }.axis-y { left: 18px; top: 0; color: #7bd7a0; }.axis-z { left: 19px; bottom: 0; color: #8abcf0; }
|
||||
.properties-panel { display: flex; flex-direction: column; }.property-heading { display: flex; align-items: flex-start; justify-content: space-between; min-height: 75px; padding: 16px 13px 10px; }.property-heading h2 { margin: 5px 0 0; font-size: 15px; font-weight: 650; }.property-tabs { height: 34px; }.property-tabs button { padding: 0 14px; }.properties-scroll { overflow: auto; padding-bottom: 20px; }.property-group { border-bottom: 1px solid var(--line-soft); padding: 0 13px 10px; }.property-group-title { display: flex; align-items: center; justify-content: space-between; padding: 12px 0 8px; color: var(--text-muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }.property-row { min-height: 28px; display: grid; grid-template-columns: 43% 57%; align-items: center; gap: 5px; }.property-label { color: var(--text-muted); font-size: 10px; }.property-value { min-width: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; border: 0; padding: 4px 0; background: transparent; color: var(--text-soft); text-align: right; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.property-value:disabled { opacity: 1; }.property-value.is-editable, .property-value.is-link { color: var(--text); cursor: pointer; }.property-value.is-editable:hover { color: var(--cyan); }.property-value.is-link { color: var(--cyan); }.status-pill { height: 16px; display: inline-flex; align-items: center; padding: 0 4px; border-radius: 2px; font-size: 8px; }.status-pill.green { color: var(--green); background: var(--green-soft); }.status-pill.amber { color: var(--amber); background: var(--amber-soft); }.expression-row { min-height: 29px; display: flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 10px; }.expression-row .expression-value { margin-left: auto; color: var(--cyan); }.expression-row button { display: grid; place-items: center; border: 0; background: transparent; color: var(--text-muted); cursor: pointer; }.expression-row button:hover { color: var(--text); }
|
||||
.bottom-drawer { height: 35px; flex-shrink: 0; border-top: 1px solid var(--line); background: var(--bg-panel); transition: height .16s ease; }.bottom-drawer.is-open { height: 122px; }.bottom-drawer-header { height: 35px; display: flex; align-items: center; justify-content: space-between; }.drawer-tabs { height: 100%; display: flex; align-items: stretch; gap: 2px; padding-left: 9px; }.drawer-tabs button { display: flex; align-items: center; gap: 6px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--text-muted); font-size: 10px; padding: 0 8px; cursor: pointer; }.drawer-tabs button.is-active { color: var(--text); border-bottom-color: var(--cyan); }.drawer-toggle { width: 32px; height: 30px; margin-right: 5px; display: grid; place-items: center; border: 0; color: var(--text-muted); background: transparent; cursor: pointer; }.drawer-toggle:hover { color: var(--text); }.bottom-drawer-content { padding: 5px 13px 9px; border-top: 1px solid var(--line-soft); }.report-line { min-height: 30px; display: flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 10px; }.report-context { color: var(--text-muted); }.report-line button { border: 0; background: transparent; color: var(--cyan); font-size: 10px; cursor: pointer; }.report-time { margin-left: auto; color: var(--text-muted); }.icon-green { color: var(--green); }.icon-amber { color: var(--amber); }.icon-cyan { color: var(--cyan); }.icon-muted { color: var(--text-muted); }
|
||||
.toast { position: fixed; z-index: 30; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 8px; padding: 11px 13px; color: #10231d; background: var(--green); border-radius: 4px; box-shadow: 0 10px 25px rgba(0, 0, 0, .28); font-size: 11px; font-weight: 650; }
|
||||
|
||||
@media (max-width: 1050px) {
|
||||
.brand-lockup { width: 140px; }
|
||||
.top-menu { display: none; }
|
||||
.topbar-context { margin-left: auto; }
|
||||
.workspace-content { grid-template-columns: 235px minmax(0, 1fr) 230px; }
|
||||
.page-content { width: min(100% - 38px, 920px); }
|
||||
.start-grid { grid-template-columns: 1fr; }.quick-panel { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }.quick-panel .section-title { grid-column: 1 / -1; }.quick-action { border: 1px solid var(--line-soft); padding: 12px; }
|
||||
}
|
||||
|
||||
@media (max-width: 780px) {
|
||||
.topbar { padding: 0 10px; gap: 5px; }.brand-lockup { width: auto; }.brand-product, .topbar-context, .command-search, .topbar-divider { display: none; }.avatar-button { margin-left: 0; }
|
||||
.page-content { width: calc(100% - 26px); padding: 34px 0 30px; }.page-header { display: block; margin-bottom: 24px; }.page-actions { margin-top: 18px; }.page-heading h1 { font-size: 28px; }
|
||||
.recent-grid, .health-grid, .sync-grid { grid-template-columns: 1fr; }.quick-panel { display: block; }.quick-panel .section-title { margin-bottom: 10px; }.quick-action { border-left: 0; border-right: 0; }.hero-copy { width: 100%; padding: 25px; }.hero-schematic { display: none; }.start-hero { min-height: 290px; }.hero-actions { flex-wrap: wrap; }
|
||||
.project-list-row { grid-template-columns: 48px minmax(0, 1fr) 28px; gap: 10px; padding-right: 10px; }.list-thumbnail { width: 48px; height: 48px; }.list-count, .list-modified, .project-list-row > .badge { display: none; }.row-action { grid-column: 3; grid-row: 1; }.list-main { grid-column: 2; }
|
||||
.flow-layout { grid-template-columns: 1fr; }.flow-steps { display: flex; gap: 14px; padding: 0; }.flow-step { border-bottom: 0; padding: 0; }.flow-step span:last-child { display: none; }.flow-card { min-height: 390px; }
|
||||
.settings-layout { grid-template-columns: 1fr; }.settings-nav { display: grid; grid-template-columns: repeat(2, 1fr); gap: 3px; }.settings-nav button { min-height: 34px; }.settings-content { padding: 0 16px; }.setting-row { gap: 12px; }.setting-control, .setting-control select, .storage-meter { min-width: 145px; width: 145px; }
|
||||
.help-grid { grid-template-columns: 1fr; }.shortcut-grid { grid-template-columns: repeat(2, 1fr); }.diagnostic-row { grid-template-columns: 1fr auto 20px; }.diagnostic-detail { display: none; }
|
||||
.workspace-page { min-height: 700px; overflow: auto; }.workspace-content { min-height: 640px; grid-template-columns: 1fr; display: flex; flex-direction: column; overflow: auto; }.left-panel, .right-panel { min-height: 250px; max-height: 310px; border: 0; border-bottom: 1px solid var(--line); order: 2; }.viewport-region { min-height: 470px; order: 1; }.right-panel { order: 3; }.document-meta { display: none; }.workspace-toolbar { overflow: auto; }.toolbar-status { display: none; }.workspace-toolbar .icon-button:nth-of-type(n + 7) { display: none; }.bottom-drawer { order: 4; }.bottom-drawer.is-open { height: 126px; }
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.page-actions { display: grid; grid-template-columns: 1fr 1fr; }.page-actions .button { width: 100%; padding: 0 8px; }.start-footer { display: block; line-height: 1.8; }.start-footer > div + div { margin-top: 8px; }.format-grid { grid-template-columns: 1fr; }.sync-stats { gap: 20px; }.sync-stats strong { font-size: 13px; }.viewport-region { min-height: 420px; }.mock-part { transform: scale(.72) translate(5%, -4%) skewY(-20deg) rotate(21deg); }.selection-callout { left: 60%; }.axis-widget { margin-right: 12px; }.viewport-legend { display: none; }.report-context { display: none; }
|
||||
}
|
||||
|
||||
.viewport-bottom-right { position: absolute; z-index: 5; right: 0; bottom: 0; }
|
||||
|
||||
/* FreeCAD-aligned dock refinements */
|
||||
.task-dock { display: flex; flex-direction: column; }
|
||||
.task-dock-title { min-height: 57px; display: flex; align-items: flex-start; justify-content: space-between; padding: 13px 14px 8px; border-bottom: 1px solid var(--line-soft); }
|
||||
.task-dock-title h2 { margin: 4px 0 0; font-size: 13px; }
|
||||
.task-panel { height: calc(100% - 57px); display: flex; flex-direction: column; overflow: auto; }
|
||||
.task-actions-top { display: flex; justify-content: center; gap: 5px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
|
||||
.task-actions-top .button { min-height: 29px; padding: 0 13px; font-size: 10px; }
|
||||
.function-rail { min-width: 44px; background: #141a1e; border-left: 1px solid var(--line); overflow: auto; }
|
||||
.rail-group { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 7px 3px; border-bottom: 1px solid var(--line-soft); }
|
||||
.rail-group-label { width: 100%; overflow: hidden; color: var(--text-muted); font-size: 7px; text-align: center; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; text-overflow: ellipsis; }
|
||||
.rail-group button { width: 30px; height: 27px; display: grid; place-items: center; border: 1px solid transparent; border-radius: 3px; background: transparent; color: var(--text-muted); cursor: pointer; }
|
||||
.rail-group button:hover { color: var(--cyan); background: var(--cyan-soft); border-color: #2c6568; }
|
||||
.model-task-summary { padding: 17px 14px; color: var(--text-muted); }
|
||||
.model-task-summary p { font-size: 11px; line-height: 1.5; margin: 10px 0 15px; }
|
||||
.model-task-summary .button { width: 100%; }
|
||||
.combo-property { min-height: 210px; flex: 0 1 42%; overflow: hidden; border-top: 1px solid var(--line); }
|
||||
.combo-property .property-heading { min-height: 55px; padding-top: 11px; }
|
||||
.combo-property .properties-scroll { max-height: calc(100% - 89px); }
|
||||
|
||||
@media (max-width: 1050px) {
|
||||
.workspace-content { grid-template-columns: 260px minmax(0, 1fr) 300px 40px; }
|
||||
}
|
||||
|
||||
@media (max-width: 780px) {
|
||||
.workspace-content { grid-template-columns: 1fr; }
|
||||
.function-rail { display: none; }
|
||||
.task-dock { order: 3; min-height: 320px; max-height: 380px; border-left: 0; border-bottom: 1px solid var(--line); }
|
||||
.left-panel { order: 2; min-height: 360px; max-height: 440px; }
|
||||
.combo-model { height: 100%; }
|
||||
.combo-property { min-height: 205px; }
|
||||
.viewport-region { order: 1; }
|
||||
.workbench-nav { overflow-x: auto; }
|
||||
.workbench-nav .nav-more, .nav-caption { display: none; }
|
||||
}
|
||||
21
tsconfig.app.json
Normal file
21
tsconfig.app.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
||||
"target": "ES2022",
|
||||
"useDefineForClassFields": true,
|
||||
"lib": ["ES2022", "DOM", "DOM.Iterable"],
|
||||
"allowJs": false,
|
||||
"skipLibCheck": true,
|
||||
"esModuleInterop": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"strict": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"noEmit": true,
|
||||
"jsx": "react-jsx"
|
||||
},
|
||||
"include": ["src"]
|
||||
}
|
||||
7
tsconfig.json
Normal file
7
tsconfig.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"files": [],
|
||||
"references": [
|
||||
{ "path": "./tsconfig.app.json" },
|
||||
{ "path": "./tsconfig.node.json" }
|
||||
]
|
||||
}
|
||||
16
tsconfig.node.json
Normal file
16
tsconfig.node.json
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
|
||||
"target": "ES2023",
|
||||
"lib": ["ES2023"],
|
||||
"module": "ESNext",
|
||||
"skipLibCheck": true,
|
||||
"moduleResolution": "Bundler",
|
||||
"allowImportingTsExtensions": true,
|
||||
"verbatimModuleSyntax": true,
|
||||
"moduleDetection": "force",
|
||||
"noEmit": true,
|
||||
"strict": true
|
||||
},
|
||||
"include": ["vite.config.ts"]
|
||||
}
|
||||
10
vite.config.ts
Normal file
10
vite.config.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
server: {
|
||||
port: 5173,
|
||||
strictPort: false,
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user