feat(react): re-export core utilities as namespaces (closes #2025)#2059
Open
timagixe wants to merge 1 commit into
Open
feat(react): re-export core utilities as namespaces (closes #2025)#2059timagixe wants to merge 1 commit into
timagixe wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 4378fae The changes in this PR will be included in the next version bump. This PR includes changesets to release 10 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@dnd-kit/abstract
@dnd-kit/collision
@dnd-kit/dom
@dnd-kit/geometry
@dnd-kit/helpers
@dnd-kit/react
@dnd-kit/solid
@dnd-kit/state
@dnd-kit/svelte
@dnd-kit/vue
commit: |
clauderic
reviewed
May 31, 2026
clauderic
left a comment
Owner
There was a problem hiding this comment.
Summary
Adds namespaced re-exports abstract, collision, and dom to @dnd-kit/react, so consumers can pull collision detectors, plugins, and types through the React entry point without each @dnd-kit/* package becoming a direct app dependency. Matches the request in #2025.
Feedback
Blocking issues
None.
Suggestions
packages/react/src/core/index.ts:28— namespace re-exports rather thanexport *is the right call. It avoids future name collisions when lower-level packages add new symbols, and consumers still get tree-shaking with modern bundlers. Good judgment in the PR notes on this.packages/react/package.json:67—@dnd-kit/collisionis added as a direct dependency. That's appropriate since it's now imported at top level (previously it was reachable only transitively through@dnd-kit/dom).packages/react/tsup.config.ts:7—@dnd-kit/collisioncorrectly added toexternalso it isn't bundled.- One thing for the maintainer to weigh: this is a public API surface expansion (the
abstract,collision,domnamespace names are now part of the contract). The PR is intentionally React-only for a first pass — if the same pattern lands in@dnd-kit/vue/@dnd-kit/svelte/@dnd-kit/solidlater, naming consistency across adapters is worth keeping in mind.
Changeset
- Status: present,
minorfor@dnd-kit/react. Correct — this is a new public API.
Overall
Clean, minimal change. Thanks for following the user's exact example from #2025 and for the thoughtful note explaining the namespaced approach.
[claude-review]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2025.
Adds namespaced re-exports from
@dnd-kit/react:abstractfrom@dnd-kit/abstractcollisionfrom@dnd-kit/collisiondomfrom@dnd-kit/domThis lets React consumers access common lower-level utilities without adding each package as a direct application dependency.
Notes
This is intentionally React-only for the first pass, matching the issue label. The same pattern can be mirrored to other framework adapters if maintainers prefer.
This also keeps the re-exports namespaced rather than using unnamespaced
export *, to avoid expanding the React root API with every lower-level export.Verification
bun run buildinpackages/reactabstract,collision, anddom