Skip to content

feature: sync code with internal repository#3

Merged
Areukiddin merged 4 commits intomainfrom
sync-with-internal-repository
May 15, 2025
Merged

feature: sync code with internal repository#3
Areukiddin merged 4 commits intomainfrom
sync-with-internal-repository

Conversation

@no-treasure
Copy link
Contributor

Added smooth scroll logic.

Migrated to React 18.

Navigation updated:

Pan around: Left click + Drag

Multiple selection: Shift + Rectangle select, Shift + Click

Cursor changed to pointer when hovering over a node.

Cursor changed to crosshair when using the selection rectangle.

Fixed package entry point and main.

Output positions are now calculated dynamically. Previously, nodes were translated by Y to 0 (translate(100%)), and only input was dynamic while outputs were fixed.

Outputs are no longer nested in nodes. Now passed separately with onOutputsChange.

File structure and naming standardized.

Deprecated use of action from nanostores.

Removed redundant stopPropagation from mouseDown in ArrowDisconnect to fix useCustomClickOutside.

Removed resetEvent from mouseDown in ArrowConnector to fix useCustomClickOutside.

Removed redundant return in mouseEnter and mouseLeave on nodes.

Fixed isBottomOver calculation in SelectionZone.

Fixed isNodeInSelectionZone calculation.

Added step argument to zoomIn and zoomOut in ScaleComponent.

Fixed issue where changing the TTS message caused the node to jump and misalign the connector. Connectors now follow node resizing correctly.

Fixed bug where all outputs and connections with the same ID were shown as active on hover without checking nodeId.

Fixed error: dragItem.type does not exist.

Multiple bug fixes and improvements:

Keeping a connection selected while starting a new one from the same output now preserves selection state.

Changing node z-index on selection fixes layering issues with active connections.

Deleted connections via hotkey also remove their output.

Bezier curve drawing completely reworked for smoother transitions and consistent gaps (24px) between output/input.

Background updated to meet new requirements.

Arrow icon spacing improved (not flush with node).

New isSelected state added for outputs.

Improved layering for selected and hovered connections (opacity 0.3).

Added ArrowDisconnector for output position (similar to input).

Holding spacebar enables canvas drag with grab cursor (like Mira).

Cursor handling improved via useCursor hook.

Added isNodeHovered prop to OutputComponent and NodeComponent.

Added nodeId to OutputComponent.

Major refactor:

SelectedConnectionAtom and HoveredConnectionAtom now store { nodeId: null, connectionId: null } instead of coordinates, reducing redundant logic.

ConnectionTrack moved to a separate component.

inputPosition and output now use strict origin points: top-left for input, bottom-left for output, independent of node content.

Removed ref from InputConnection.

Node, selected, and hovered connection deletion now handled in useHotKeys.

Added getNodeRelativePosition helper for consistent positioning logic.

Added onSelectionZoneChanged prop to track selection zone changes.

Fixed selected state not updating after dragging if the node wasn't selected initially.

Changed controls for nodes and canvas.

Node z-index now increases on MouseDown, bringing the last selected node to the front.

Added ability to delete selected connections using the Delete key.

Added ability to delete selected connections using the Backspace key.

@no-treasure no-treasure requested a review from Areukiddin May 6, 2025 15:19
@sonarqubecloud
Copy link

sonarqubecloud bot commented May 6, 2025

@Areukiddin Areukiddin merged commit e82cb56 into main May 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants