Releases: tulz-app/frontroute
Releases · tulz-app/frontroute
0.13.3
0.13.2
v0.13.1
v0.13.0 – Airstream 0.13.0 + Scala 3-RC3
Update to Airstream v0.13.0
. Publishing for Scala 3.0.0-RC3.
History and title behavior updates.
- API:
LinkHandler
now looks at thedata-title
attribute of anchors and uses it when pushing state - API:
LinkHandler.install
now accepts adefaultTitle: String = ""
argument to use when thedata-title
is missing - Change:
LinkHandler
will not be pushing state when the current path, search query and hash are equal to the ones in the
anchor - API: new
BrowserNavigation.replaceTitle(title: String)
function, that replaces the document title (and, optionally,
the<title>
element in the<head>
) and stores the new title in the history state.
LocationProvider.browser
now has three new parameters:
setTitleOnPopStateEvents: Boolean = true
– iftrue
, it will be updating the document title with the title saved by frontroute in
the PopState event stateupdateTitleElement: Boolean = true
– iftrue
, it will also be updating the content of the head/title elementignoreEmptyTitle: Boolean = false
– iftrue
, it will not be doing anything if thetitle
is empty
0.12.2
0.12.0
Update to Airstream v0.12.0
. Publishing for Scala 3.0.0-RC1
- Breaking: the
io.frontroute.directives._
no longer exists and importing it is not needed anymore - API: renamed
RouteLocationProvider
intoLocationProvider
- API: new
CustomLocationProvider
- API: renamed
completeN
intocomplete
- API: new
state
directive - API: new
makeRoute
andmakeRouteWithCallback
- Util: new
LocationUtils
object withparseLocationParams
andencodeLocationParams
functions - Bugfix: pop state event processing – event itself was used as
state
- Bugfix: link handler was not verifying if the link was pointing to the URL within the same origin, caused errors
(changing the origin when pushing state is not allowed)
0.11.7
0.11.6
- Bugfix: disjunction
- Bugfix:
.map
was not storing the mapped value (in the internal state)
The value of the disjunction was not stored (in the internal state), thus a disjunction would not
match multiple times in a row (even if the resulting values were different).
An example that would show this behavior:
(pathEnd.map(_ => true) | path("page-1").map(_ => false)) { isIndex =>
render(Page(isIndex))
}
- API: new combinators for directives
.some
– transforms aDirective[A]
into aDirective[Option[A]]
(withSome(_)
value).none
– transforms aDirective[A]
into aDirective[Option[A]]
(withNone
value).mapOption
– transforms aDirective[Option[A]]
into aDirective[Option[B]]
(applying the provided function to theOption
)
0.11.5 – bufgixing
Fixing LinkHandler
.
0.11.4 – simpler + LinkHandler
- New: LinkHandler
- New: directives:
origin
,host
,hostname
,port
andprotocol
- simplified directives and path matchers (single values are now scalars, not Tuple1), no more
Tuple
marker - Breaking: Scala.js 1.3.1+ is now required