items rolled up on both sides of a focus
📜 Scroll
→ good fit for dynamic choice selection: tabs, playlist, ... ↑ examples
Scroll
can even focus a gap
Down
or Up
from every item
import Linear exposing (Direction(..))
import Emptiable exposing (filled)
import Stack exposing (topBelow)
import Scroll exposing (Scroll, FocusGap)
Scroll.empty
--: Scroll item_ FocusGap Possibly
|> Scroll.focusAlter (\_ -> -1 |> filled)
--: Scroll number_ FocusGap never_
|> Scroll.sideAlter Up
(\_ -> topBelow 1 [ 2, 3 ])
--: Scroll number_ FocusGap never_
|> Scroll.toGap Up
--: Scroll number_ FocusGap Possibly
|> Scroll.focusAlter (\_ -> 0 |> filled)
--: Scroll number_ FocusGap never_
|> Scroll.toStack
--> topBelow -1 [ 0, 1, 2, 3 ]
→ See contributing.md
- zwilias/elm-holey-zipper.
unsafe; a bit cluttered; no
map (Location -> ...)
,dragFocus
,toNonEmptyList
,sideAlter
(so no squeezing in multiple items, ...) - turboMaCk/non-empty-list-alias:
List.NonEmpty.Zipper
complete; cluttered (for exampleupdate
&map
); some unintuitive names - miyamoen/select-list
complete; a bit cluttered; no
focusWhere
- yotamDvir/elm-pivot
complete; cluttered; no
map (Location -> ...)
- staeter/ziplist
navigation works; a bit cluttered; no
map (Location -> ...)
,sideAlter
(so no squeezing in multiple items, ...) - wernerdegroot/listzipper
navigation works; no
dragFocus
,map (Location -> ...)
,toNonEmptyList
- stoeffel/list-focus
no clutter included but also no access of before and after, no
length
,toList
,map (Location -> ...)
,toNonEmptyList
- alexanderkiel/list-selection
& NoRedInk/list-selection
very incomplete, impossible to extract focused item safely; no navigation, insertion,
side
, ... - jjant/elm-comonad-zipper
incomplete; no
dragFocus
,toNonEmptyList
,sideAlter
(so no squeezing in multiple items, ...) - guid75/ziplist extremely incomplete
- arowM/elm-reference:
Reference.List
onlyoverList
, sides impossible to access & alter