dnd_kit_jaspr 0.6.0
dnd_kit_jaspr: ^0.6.0 copied to clipboard
Jaspr (web) adapter for the dnd_kit drag-and-drop family, built on the shared dnd_kit engine.
Changelog #
0.6.0 #
- Depends on
dnd_kit: ^0.6.0, inheriting the drag-default fixes: the active item is no longer its own drop target, drag start re-measures droppables, andSortableStrategies.dropOnOverlands the drop where the highlight is. - Breaking behavior:
DndDragOverlaysizes the preview from the drag-start rect instead of the live active rect, so collapsing the source element to open a placeholder gap no longer clips the preview to zero.DndDragOverlayDetailsgains a requiredinitialActiveRectalongside the liveactiveRect. DndControllerexposesinitialActiveRect.- Adds live sortable feedback:
SortableScopeData.previewandSortableMultiScopeData.previewreport where the active item would land, andSortableItemDetailsgainspreviewIndex,previewContainerId, andoffset. SortableScopetakes anoffsetResolver(defaultSortableOffsets.none). SetSortableOffsets.verticalListand applydetails.offsetinside yourSortableItem.builderas a CSS transform to open a placeholder gap. Apply it inside the builder, not on the item, so the transform stays below the measured element.SortableMultiContainerAreais now aStatefulComponentso it can publish its strategy to the scope. Its constructor is unchanged.SortableMultiScopetakes anoffsetResolver(defaultSortableMultiOffsets.none), so a board can open a live gap within and across columns. Applydetails.offsetinside yourSortableMultiItembuilder as a CSS transform.DndControllertakes an optionalcollisionDetectorand exposes it as a settable property.SortableMultiScopetakes an optionalcollisionDetectorand installs its effective detector on whatever controller it is given — including one the application created and passed in — so a board wired to an external controller ranks collisions correctly with no manual setup.- Inherits the core multi-container refinements: cross-container insertion tracks the pointer within the hovered card, the gap between cards (and the space below the last card) resolves to the nearest card, and picking an item up or dropping it back in place no longer reorders.
0.5.0 #
- Depends on
dnd_kit: ^0.5.0(DndCollisionInput.activeId).
0.4.0 #
- Depends on
dnd_kit: ^0.4.0. - Adds the production multi-container adapter surface:
SortableMultiScope,SortableMultiContainerArea, andSortableMultiItem. - Jaspr now shares the same default board/list collision and move-intent
semantics as Flutter through the pure-Dart
dnd_kitcore policy. - Browser proof now exercises the supported multi-container surface instead of only the helper contract.
- Re-exports the shared experimental multi-container helper contract from
dnd_kit, so Jaspr apps can useSortableContainerandSortableMultiContainerwith the same move-intent semantics as Flutter.
0.3.2 #
- Updates the pub.dev homepage metadata to the hosted project website.
- Refreshes the package links for the repository transfer to
iamv4g/dnd_kit. - Depends on
dnd_kit: ^0.3.2with no runtime API changes.
0.3.1 #
- Fixes a framework assertion (
owner._debugCurrentBuildTarget != null) thrown during static/server pre-rendering when aDndDraggablecontains aDndDragHandle. Registering a handle scheduled a deferredsetStatethat ran outside a build owner on the server; it is now guarded to the client. The pre-rendered markup matches the first client build, so hydration reuses the subtree instead of replacing it. - Depends on
dnd_kit: ^0.3.1and now reuses the sharedDndAnnouncementsaccessibility contract from the core package instead of maintaining a local duplicate.
0.3.0 #
- Depends on the renamed engine package
dnd_kit: ^0.3.0(previouslydnd_kit_core, now discontinued). The dependency rename tracks the engine package becomingdnd_kit. See ADR 0017. - Adds the Jaspr sortable preset at parity with the Flutter adapter:
SortableScope(item order + pluggableSortableStrategy, defaultverticalList) andSortableItem(a draggable + droppable that reportsSortableMoveDetailsreorder intent viaonMove). - Reuses the shared
dnd_kitengine reorder math, so Jaspr and Flutter compute identical move intent and Jaspr inherits the vertical/horizontal/grid single-container strategies already re-exported from the engine. See ADR 0019. - Multi-container sorting (
SortableContainer/SortableMultiContainer) is not included; it remains a Flutter-only experimental feature for now. - Extends
DndAutoScrollwith axis-aware browser execution, so Jaspr scroll containers can auto-scroll horizontally through the shareddnd_kitvelocity math while preserving the existing vertical default. - Keeps Jaspr auto-scroll execution component-owned rather than introducing a separate controller surface, because DOM node ownership, timer lifecycle, and SSR guards still belong to the rendered viewport component.
- Fixes
DndDragOverlayrebinding when the nearestDndScopecontroller is replaced, so overlays stay synchronized after a controlled scope/controller swap.
0.2.0-dev.0 #
- First public development release of
dnd_kit_jaspr. - Ships the first shared-runtime Jaspr drag-and-drop surface:
DndScope,DndController,DndDraggable,DndDroppable,DndDragHandle, andDndDragOverlay. - Supports mouse, touch, and keyboard drag activation on top of the shared
DndRuntime, including handle-only activation and keyboard drag flows. - Adds vertical
DndAutoScrollfor browser scroll containers, reusing the shareddnd_kit_coreauto-scroll edge and velocity math. - Adds accessibility support through
DndLiveRegionandDndAnnouncements, plus accessible labels/descriptions for draggables and drag handles. - Includes browser-tested modifier behavior and the
examples/jaspr_basic_drag_dropexample app as the current integration proof. - Keeps the adapter SSR-safe: browser access stays guarded and no Flutter dependency is introduced.
- Sortable presets are not included yet; they follow in a later phase.