Hitbox

An optional package that enables the attaching of interaction information to a drop target.

2.2.2

Patch Changes

2.2.1

Patch Changes

2.2.0

Minor Changes

Patch Changes

  • Updated dependencies

2.1.0

Minor Changes

  • 29fd54df69593, (opens new window) - Imports from the package root are deprecated and will be removed in a future release. Migrate to dedicated entry-point imports to reduce upgrade friction. Recommended imports:
    • import { attachClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/attach-closest-edge'
    • import { extractClosestEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/closest-edge/extract-closest-edge'
    • import { attachInstruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/list-item/attach-instruction'
    • import { extractInstruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/list-item/extract-instruction'
    • import { attachInstruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item/attach-instruction'
    • import { extractInstruction } from '@atlaskit/pragmatic-drag-and-drop-hitbox/tree-item/extract-instruction'
    • import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/reorder-with-edge'
    • import { getReorderDestinationIndex } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/get-reorder-destination-index'

2.0.1

Patch Changes

  • Updated dependencies

2.0.0

Major Changes

  • f2dc9097319f0, (opens new window) - ### Dropped support for legacy Typescript 4 types. Typescript 5 is now the new minimum.

    Removes the typesVersions property and dist/types-ts4.5 directory from the dist.

    Types are now exclusively via the "types": "dist/types/index.d.ts" property.

    - "typesVersions": { - ">=4.5 <4.9": { - "*": [ - "dist/types-ts4.5/*", - "dist/types-ts4.5/index.d.ts" - ] - } - },

Patch Changes

  • Updated dependencies

1.2.0

Minor Changes

  • f8b3089961cdf, (opens new window) - Extend StructuredContentSource so *.docs.tsx files can describe packages whose exports are not all renderable React components. The container now accepts optional package, hooks, and utilities (function / constant / type) keys alongside the existing components key. New per-kind schemas: hookDocsSourceSchema, utilityDocsSourceSchema, plus packageMetadataSchema for shared package-level metadata.

    All new fields are optional, so existing components-only *.docs.tsx files continue to work unchanged — this is an additive, non-breaking extension.

    Pilots the new shape with docs.tsx files for @atlaskit/analytics-next, @atlaskit/layering, @af/accessibility-testing, @af/react-unit-testing, @atlaskit/pragmatic-drag-and-drop-hitbox, @atlaskit/pragmatic-drag-and-drop-live-region, @atlaskit/feature-flag-client, @atlaskit/frontend-utilities, and @atlaskit/linking-common. The last two are non-ADS pilots that exercise the new hooks and utilities kinds in helpers/ and linking-platform/. These pilot files are explicitly marked as non-final in their file-level JSDoc.

1.1.0

Minor Changes

1.0.3

Patch Changes

1.0.2

Patch Changes

1.0.1

Patch Changes

1.0.0

Major Changes

Patch Changes

  • Updated dependencies

0.12.1

Patch Changes

  • Updated dependencies

0.12.0

Minor Changes

0.11.9

Patch Changes

  • Updated dependencies

0.11.8

Patch Changes

  • Updated dependencies

0.11.7

Patch Changes

  • Updated dependencies

0.11.6

Patch Changes

  • Updated dependencies

0.11.5

Patch Changes

  • Updated dependencies

0.11.4

Patch Changes

  • Updated dependencies

0.11.3

Patch Changes

0.11.2

Patch Changes

0.11.1

Patch Changes

0.11.0

Minor Changes

Patch Changes

  • Updated dependencies

0.10.0

Minor Changes

  • #33262, (opens new window) 34ed7b2ec63, (opens new window) - We have changed the name of our drag and drop packages to align on the single name of "Pragmatic drag and drop"

    - @atlaskit/drag-and-drop + @atlaskit/pragmatic-drag-and-drop - @atlaskit/drag-and-drop-autoscroll + @atlaskit/pragmatic-drag-and-drop-autoscroll - @atlaskit/drag-and-drop-hitbox + @atlaskit/pragmatic-drag-and-drop-hitbox - @atlaskit/drag-and-drop-indicator + @atlaskit/pragmatic-drag-and-drop-react-indicator # Note: `react` was added to this package name as our indicator package is designed for usage with `react`. - @atlaskit/drag-and-drop-live-region + @atlaskit/pragmatic-drag-and-drop-live-region - @atlaskit/drag-and-drop-react-beautiful-dnd-migration + @atlaskit/pragmatic-drag-and-drop-react-beautiful-dnd-migration - @atlaskit/drag-and-drop-docs + @atlaskit/pragmatic-drag-and-drop-docs

    The new @atlaskit/pragmatic-drag-and-drop* packages will start their initial versions from where the ``@atlaskit/drag-and-drop*` packages left off. Doing this will make it easier to look back on changelogs and see how the packages have progressed.

Patch Changes

  • Updated dependencies

0.9.0

Minor Changes

Patch Changes

  • Updated dependencies

0.8.1

Patch Changes

0.8.0

Minor Changes

0.7.0

Minor Changes

  • #32051, (opens new window) 00434d087d7, (opens new window) - Tree item hitbox data is now memoized. This is helpful to reduce work for consumers who may take actions based on object reference changes.

    If you are using react and putting tree item hitbox instructions into state, react will now only re-render when the content of the instruction changes.

0.6.3

Patch Changes

  • Updated dependencies

0.6.2

Patch Changes

  • Updated dependencies

0.6.1

Patch Changes

  • Updated dependencies

0.6.0

Minor Changes

0.5.0

Minor Changes

Patch Changes

  • Updated dependencies

0.4.1

Patch Changes

  • Updated dependencies

0.4.0

Minor Changes

0.3.2

Patch Changes

  • Updated dependencies

0.3.1

Patch Changes

  • Updated dependencies

0.3.0

Minor Changes

  • #26934, (opens new window) f004dadb4fc, (opens new window) - reorderWithEdge has changed API in order to more accurately reflect the values that are being passed in

    function reorderWithEdge<Value>(args: { list: Value[]; - edge: Edge | null; + // the reorder operation is based on what the closest edge of the target is + closestEdgeOfTarget: Edge | null; startIndex: number; - finalIndex: number + // we are reordering relative to the target + indexOfTarget: number; axis: 'vertical' | 'horizontal'; }): Value[];

    Adding new utility: getReorderDestinationIndex

    When you are rendering drop indicators (eg lines) between items in a list, it can be difficult to know what the index the dropped item should go into. The final index will depend on what the closest Edge is. getReorderDestinationIndex can give you the final index for a reordering operation, taking into account which Edge is closest

    import { getReorderDestinationIndex } from '@atlaskit/drag-and-drop-hitbox/util/get-reorder-destination-index'; // Dragging A on the left of B // A should stay in the same spot expect( getReorderDestinationIndex({ // list: ['A', 'B', 'C'], // move A to left of B startIndex: 0, indexOfTarget: 1, closestEdgeOfTarget: 'left', axis: 'horizontal', }), // results in no change: ['A', 'B', 'C'] ).toEqual(0); // Dragging A on the right of B // A should go after B expect( getReorderDestinationIndex({ // list: ['A', 'B', 'C'], // move A to right of B startIndex: 0, indexOfTarget: 1, closestEdgeOfTarget: 'right', axis: 'horizontal', }), // A moved forward ['B', 'A', 'C'] ).toEqual(1);

0.2.7

Patch Changes

  • Updated dependencies

0.2.6

Patch Changes

0.2.5

Patch Changes

  • Updated dependencies

0.2.4

Patch Changes

  • Updated dependencies

0.2.3

Patch Changes

  • Updated dependencies

0.2.2

Patch Changes

  • Updated dependencies

0.2.1

Patch Changes

  • Updated dependencies

0.2.0

Minor Changes

  • #24613, (opens new window) dcebdf9404e, (opens new window) - We have improved our naming consistency across our drag and drop packages.
    • @atlaskit/drag-and-drop-hitbox/closest-edge has been renamed to @atlaskit/drag-and-drop-hitbox/addon/closest-edge
    • @atlaskit/drag-and-drop-hitbox/reorder-with-edge has been renamed to @atlaskit/drag-and-drop-hitbox/util/reorder-with-edge

Patch Changes

  • Updated dependencies

0.1.0

Minor Changes

Patch Changes

  • Updated dependencies

0.0.1

Patch Changes

Was this page helpful?
We use this feedback to improve our documentation.
© 2026 AtlassianTrademark, (opens new window)Privacy, (opens new window)License