cdevienne/elm-orus-ui/1.0.0

Renamed to orus-io/elm-orus-ui. It is published under that name, and new versions come out there.

Versions published as cdevienne/elm-orus-ui still install under that name. 1 version of 1 come from the new location (see their notes).

Rerouted (renamed, needs approval). The GitHub user or repository was renamed. The tag is still there, at the new name. The Lamdera package server serves a copy recovered from https://github.com/orus-io/elm-orus-ui.

What we checked: The repo moved to github.com/orus-io/elm-orus-ui and tag 1.0.0 is there; its commit ad645724a38d is from 2024-11-15 10:17 UTC, after the version was published (2024-11-15 09:57 UTC); elm.json differs from package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one and nothing else confirms its contents.

We could not verify this copy against what was published, so the Lamdera compiler asks before using it (y/n). Without a terminal, as in CI, it stops with an error unless approved:

  • lamdera make --auto-approve-package-rerouting approves rerouted versions for that run,
  • LAMDERA_AUTO_APPROVE_PACKAGE_REROUTING=1 does the same for every run in that environment,
  • LAMDERA_CACHE=off skips the Lamdera package server altogether: packages come from package.elm-lang.org and GitHub only, as with elm, and a rerouted version then fails to download.

Details · package.elm-lang.org's zip: https://github.com/cdevienne/elm-orus-ui/zipball/1.0.0/

OUI.Explorer

Explorers

type Explorer themeExt current previous currentMsg previousMsg

explorer type definition

explorer : Explorer () () () () ()

creates an empty Explorer

explorerWithTheme : Theme themeExt -> Explorer themeExt () () () ()

creates an empty Explorer with a customized theme type

Books

type alias Book themeExt model msg =
{ title : String
, init : Shared themeExt -> ( model, Effect SharedMsg msg )
, update :
Shared themeExt -> msg -> model -> ( model, Effect SharedMsg msg )
, subscriptions : Shared themeExt -> model -> Sub msg
, chapters : List (Shared themeExt -> model -> Element (BookMsg msg))
}

A stateless book

type BookMsg msg

A stateless book message

Book themeExt model msg
-> Explorer themeExt current previous currentMsg previousMsg
themeExt
model
(Model SetupError current previous)
(BookMsg msg)
(Msg Route currentMsg previousMsg)

Add a book to the current category

book : String -> Book themeExt () ()

Creates a new static book

String
-> { init : Shared themeExt -> ( model, Effect SharedMsg msg )
, update :
Shared themeExt -> msg -> model -> ( model, Effect SharedMsg msg )
, subscriptions : Shared themeExt -> model -> Sub msg
}
-> Book themeExt model msg

Creates a new stateful book

bookMsg : msg -> BookMsg msg

wrap a book msg into a BookMsg msg. This is needed in views.

Colorschemes

Color scheme light/dark

setColorTheme : Theme -> Explorer themeExt c p cm pm -> Explorer themeExt c p cm pm

takes a color theme sets it as default

addColorTheme : Theme -> Explorer themeExt c p cm pm -> Explorer themeExt c p cm pm

adds a color theme to the list of selectable color themes

Chapters

withMarkdownChapter : String -> Book themeExt model msg -> Book themeExt model msg

Add a mardown chapter to a book

(Shared themeExt -> Element (BookMsg msg))
-> Book themeExt model msg
-> Book themeExt model msg

Add a static content chapter to a book

(Shared themeExt -> model -> Element (BookMsg msg))
-> Book themeExt model msg
-> Book themeExt model msg

Add a chapter to a book

Other

type alias Page msg =
{ title : String
, content : Element msg
}

A explorer page

type alias Route =
String

The explorer routes are simple strings

type alias Shared themeExt =
{ navKey : Key
, lastEvents : List String
, theme : Theme themeExt
, colorThemeList : List Theme
, selectedColorScheme : ( Int, ColorSchemeType )
, selectedBook : String
, colorThemeButton : State
}

The shared state

Shared state message

Theme themeExt
-> Explorer themeExt c p cm pm
-> Explorer themeExt c p cm pm

sets the theme

String
-> Explorer themeExt current previous currentMsg previousMsg
-> Explorer themeExt current previous currentMsg previousMsg

Add a category to a Explorer

All subsequent books will be added to this category, until a new category is added.

logEvent : String -> BookMsg msg

A simple log event

The passed string will be logged in the log event window

logEffect : String -> Effect SharedMsg msg

A simple log event, as a Effect

The passed string will be logged in the log event window

Same as 'logEvent', but for update/init

Explorer themeExt current previous currentMsg previousMsg
-> Application
Value
(Shared themeExt)
String
current
previous
currentMsg
previousMsg

Finalize a explorer and returns Program