diff --git a/.changeset/add-interactive-resize.md b/.changeset/add-interactive-resize.md deleted file mode 100644 index b7c1f94..0000000 --- a/.changeset/add-interactive-resize.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@spatial-kit/core": minor -"@spatial-kit/svg": minor -"@spatial-kit/react": minor ---- - -Add interactive entity resizing via drag handles. - -- `@spatial-kit/core` exports a new `ResizeDirection` type (`'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw'`), `hitTestResizeHandles` to detect which handle is under the cursor in screen space, and `applyResizeDelta` to compute new bounds from a world-space drag delta (with optional snap-to-grid on the edge position) -- `@spatial-kit/svg` adds `paintResizeHandles` painter that draws 8 handles around each selected entity at a consistent pixel size regardless of zoom, and wires resize drag into `attachHandlers` with a priority-over-entity-drag rule -- `@spatial-kit/react` adds a `ResizeHandles` internal component that renders the same 8 handles declaratively, and wires resize drag into `attachHandlers` with the same state machine (`idle → pending → resize → idle`) diff --git a/.changeset/add-snap-to-grid.md b/.changeset/add-snap-to-grid.md deleted file mode 100644 index 827215e..0000000 --- a/.changeset/add-snap-to-grid.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@spatial-kit/core": minor -"@spatial-kit/svg": minor -"@spatial-kit/react": minor ---- - -Add snap-to-grid support for entity drag. - -- `@spatial-kit/core` exports a new `snapToGrid(value, gridSize)` utility that rounds a world-space coordinate to the nearest grid multiple -- `@spatial-kit/svg` accepts a `snapToGrid?: number` option on `mountSvgRenderer`; when set, entity positions are snapped on every drag frame -- `@spatial-kit/react` accepts a `snapToGrid?: number` prop on `SpatialCanvas` with the same behavior diff --git a/.changeset/support-react-19.md b/.changeset/support-react-19.md deleted file mode 100644 index 6a31f6b..0000000 --- a/.changeset/support-react-19.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@spatial-kit/react': minor ---- - -Support React 19. The `react` peer dependency now accepts `^18.0.0 || ^19.0.0`. diff --git a/packages/adapters/react/CHANGELOG.md b/packages/adapters/react/CHANGELOG.md index 517e883..be4f6a7 100644 --- a/packages/adapters/react/CHANGELOG.md +++ b/packages/adapters/react/CHANGELOG.md @@ -1,5 +1,23 @@ # @spatial-kit/react +## 0.2.0 + +### Minor Changes + +- 6c76624: Add interactive entity resizing via drag handles. + + - `@spatial-kit/core` exports a new `ResizeDirection` type (`'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw'`), `hitTestResizeHandles` to detect which handle is under the cursor in screen space, and `applyResizeDelta` to compute new bounds from a world-space drag delta (with optional snap-to-grid on the edge position) + - `@spatial-kit/svg` adds `paintResizeHandles` painter that draws 8 handles around each selected entity at a consistent pixel size regardless of zoom, and wires resize drag into `attachHandlers` with a priority-over-entity-drag rule + - `@spatial-kit/react` adds a `ResizeHandles` internal component that renders the same 8 handles declaratively, and wires resize drag into `attachHandlers` with the same state machine (`idle → pending → resize → idle`) + +- 76f92f8: Add snap-to-grid support for entity drag. + + - `@spatial-kit/core` exports a new `snapToGrid(value, gridSize)` utility that rounds a world-space coordinate to the nearest grid multiple + - `@spatial-kit/svg` accepts a `snapToGrid?: number` option on `mountSvgRenderer`; when set, entity positions are snapped on every drag frame + - `@spatial-kit/react` accepts a `snapToGrid?: number` prop on `SpatialCanvas` with the same behavior + +- 0ba45d2: Support React 19. The `react` peer dependency now accepts `^18.0.0 || ^19.0.0`. + ## 0.1.0 ### Minor Changes diff --git a/packages/adapters/react/package.json b/packages/adapters/react/package.json index c88c266..2051e8e 100644 --- a/packages/adapters/react/package.json +++ b/packages/adapters/react/package.json @@ -1,6 +1,6 @@ { "name": "@spatial-kit/react", - "version": "0.1.0", + "version": "0.2.0", "description": "React adapter for @spatial-kit/core: SpatialCanvas component and hooks for interactive 2D editors.", "keywords": [ "2d", diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 00c2358..e5a48d6 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,21 @@ # @spatial-kit/core +## 0.2.0 + +### Minor Changes + +- 6c76624: Add interactive entity resizing via drag handles. + + - `@spatial-kit/core` exports a new `ResizeDirection` type (`'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw'`), `hitTestResizeHandles` to detect which handle is under the cursor in screen space, and `applyResizeDelta` to compute new bounds from a world-space drag delta (with optional snap-to-grid on the edge position) + - `@spatial-kit/svg` adds `paintResizeHandles` painter that draws 8 handles around each selected entity at a consistent pixel size regardless of zoom, and wires resize drag into `attachHandlers` with a priority-over-entity-drag rule + - `@spatial-kit/react` adds a `ResizeHandles` internal component that renders the same 8 handles declaratively, and wires resize drag into `attachHandlers` with the same state machine (`idle → pending → resize → idle`) + +- 76f92f8: Add snap-to-grid support for entity drag. + + - `@spatial-kit/core` exports a new `snapToGrid(value, gridSize)` utility that rounds a world-space coordinate to the nearest grid multiple + - `@spatial-kit/svg` accepts a `snapToGrid?: number` option on `mountSvgRenderer`; when set, entity positions are snapped on every drag frame + - `@spatial-kit/react` accepts a `snapToGrid?: number` prop on `SpatialCanvas` with the same behavior + ## 0.1.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index 9b07805..ec1a8fb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@spatial-kit/core", - "version": "0.1.0", + "version": "0.2.0", "description": "Framework-agnostic scene engine for interactive 2D editors: entities, viewport, events, hit testing and selection.", "keywords": [ "2d", diff --git a/packages/svg/CHANGELOG.md b/packages/svg/CHANGELOG.md index 6a5f507..fadc4bd 100644 --- a/packages/svg/CHANGELOG.md +++ b/packages/svg/CHANGELOG.md @@ -1,5 +1,21 @@ # @spatial-kit/svg +## 0.2.0 + +### Minor Changes + +- 6c76624: Add interactive entity resizing via drag handles. + + - `@spatial-kit/core` exports a new `ResizeDirection` type (`'n' | 'ne' | 'e' | 'se' | 's' | 'sw' | 'w' | 'nw'`), `hitTestResizeHandles` to detect which handle is under the cursor in screen space, and `applyResizeDelta` to compute new bounds from a world-space drag delta (with optional snap-to-grid on the edge position) + - `@spatial-kit/svg` adds `paintResizeHandles` painter that draws 8 handles around each selected entity at a consistent pixel size regardless of zoom, and wires resize drag into `attachHandlers` with a priority-over-entity-drag rule + - `@spatial-kit/react` adds a `ResizeHandles` internal component that renders the same 8 handles declaratively, and wires resize drag into `attachHandlers` with the same state machine (`idle → pending → resize → idle`) + +- 76f92f8: Add snap-to-grid support for entity drag. + + - `@spatial-kit/core` exports a new `snapToGrid(value, gridSize)` utility that rounds a world-space coordinate to the nearest grid multiple + - `@spatial-kit/svg` accepts a `snapToGrid?: number` option on `mountSvgRenderer`; when set, entity positions are snapped on every drag frame + - `@spatial-kit/react` accepts a `snapToGrid?: number` prop on `SpatialCanvas` with the same behavior + ## 0.1.0 ### Minor Changes diff --git a/packages/svg/package.json b/packages/svg/package.json index 5c24502..5d69f38 100644 --- a/packages/svg/package.json +++ b/packages/svg/package.json @@ -1,6 +1,6 @@ { "name": "@spatial-kit/svg", - "version": "0.1.0", + "version": "0.2.0", "description": "SVG renderer and pointer handlers for @spatial-kit/core: pan, zoom, pinch, selection, drag, resize and grid.", "keywords": [ "2d",