feat: extract network map builder from PR 124 #137

Merged
chihlasm merged 47 commits from feat/network-map-builder-prod into main 2026-04-13 06:38:01 +00:00
4 changed files with 5 additions and 1 deletions
Showing only changes of commit 5fb865ada8 - Show all commits

View File

@@ -87,6 +87,7 @@ export function ContextMenu({ position, actions, onClose }: ContextMenuProps) {
)
}
// eslint-disable-next-line react-refresh/only-export-components
export function getNodeMenuActions(handlers: {
onCopy: () => void
onDuplicate: () => void
@@ -103,6 +104,7 @@ export function getNodeMenuActions(handlers: {
]
}
// eslint-disable-next-line react-refresh/only-export-components
export function getCanvasMenuActions(handlers: {
onPaste: () => void
onSelectAll: () => void

View File

@@ -69,6 +69,7 @@ export function DiagramHeader({
const formatLastSaved = () => {
if (!lastSavedAt) return null
// eslint-disable-next-line react-hooks/purity
const diff = Date.now() - lastSavedAt.getTime()
if (diff < 60_000) return 'Saved just now'
const mins = Math.floor(diff / 60_000)

View File

@@ -27,7 +27,7 @@ function isInputFocused(): boolean {
}
export function useCanvasShortcuts({
nodes: _nodes,
nodes: _nodes, // eslint-disable-line @typescript-eslint/no-unused-vars
edges,
setNodes,
setEdges,

View File

@@ -82,6 +82,7 @@ export function PropertiesPanel({
const [deleteConfirm, setDeleteConfirm] = useState(false)
// Reset confirm state whenever the selection changes
// eslint-disable-next-line react-hooks/set-state-in-effect
useEffect(() => { setDeleteConfirm(false) }, [selectedNode?.id, selectedEdge?.id])
const handlePropertyChange = useCallback((field: keyof DeviceProperties, value: string) => {