Skip to content

refactor(editor): make SpatialIndexManager internal#7699

Merged
MitjaBezensek merged 2 commits intomainfrom
mitja/index
Jan 16, 2026
Merged

refactor(editor): make SpatialIndexManager internal#7699
MitjaBezensek merged 2 commits intomainfrom
mitja/index

Conversation

@MitjaBezensek
Copy link
Copy Markdown
Contributor

@MitjaBezensek MitjaBezensek commented Jan 16, 2026

Follow-up to #7676. I've reconsidered and made the spatial index private.

This PR makes the SpatialIndexManager internal to the editor rather than part of the public API. The spatial index is an implementation detail used for efficient shape queries.

Changes:

  • Mark SpatialIndexManager class as @internal
  • Remove editor.spatialIndex public property (now private _spatialIndex)
  • Mark editor.getShapeIdsInsideBounds() as @internal

The public API for shape queries remains editor.getShapeAtPoint() and editor.getShapesAtPoint(), which handle edge cases like frame labels being outside their bounds.

Change type

  • api

API changes

  • Removed editor.spatialIndex property from public API
  • Changed editor.getShapeIdsInsideBounds() from @public to @internal
  • Changed SpatialIndexManager class from @public to @internal

Test plan

  1. Existing tests pass
  2. Internal usages in brushing/erasing tools still work

Release notes

  • Remove editor.spatialIndex from public API

Note

Makes spatial indexing an internal implementation detail and removes it from the public API.

  • Mark SpatialIndexManager as @internal; update class docs accordingly
  • Remove public editor.spatialIndex; introduce private editor._spatialIndex and update usages in hit-testing and bounds queries
  • Mark editor.getShapeIdsInsideBounds() as @internal and clarify its bounds-only behavior
  • Public querying remains via editor.getShapeAtPoint() / editor.getShapesAtPoint()

Written by Cursor Bugbot for commit f366bfb. This will update automatically on new commits. Configure here.

@huppy-bot huppy-bot bot added the api API change label Jan 16, 2026
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
examples Ready Ready Preview Jan 16, 2026 1:04pm
5 Skipped Deployments
Project Deployment Review Updated (UTC)
analytics Ignored Ignored Jan 16, 2026 1:04pm
chat-template Ignored Ignored Jan 16, 2026 1:04pm
tldraw-docs Ignored Ignored Jan 16, 2026 1:04pm
tldraw-shader Ignored Ignored Jan 16, 2026 1:04pm
workflow-template Ignored Ignored Jan 16, 2026 1:04pm

Review with Vercel Agent

@huppy-bot
Copy link
Copy Markdown
Contributor

huppy-bot bot commented Jan 16, 2026

API Changes Check Passed

Great! The PR description now includes the required "### API changes" section. This helps reviewers and SDK users understand the impact of your changes.

@MitjaBezensek MitjaBezensek added this pull request to the merge queue Jan 16, 2026
Merged via the queue into main with commit 59b6e85 Jan 16, 2026
16 checks passed
@MitjaBezensek MitjaBezensek deleted the mitja/index branch January 16, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant