Skip to content

Releases: tulz-app/frontroute

0.13.3

27 Jun 16:30
Compare
Choose a tag to compare
  • Breaking: one of the complete overloads is now completeN

The reason for the change is that its argument needs to be by-name (same as the other overload),
and the two overloads would end up having the same byte-code signature.

0.13.2

22 Jun 09:43
Compare
Choose a tag to compare

Sourcemaps are now pointing to GitHub.

v0.13.1

08 May 22:42
Compare
Choose a tag to compare
  • API: new implicit conversion from Regex to a path matcher

v0.13.0 – Airstream 0.13.0 + Scala 3-RC3

08 May 22:41
Compare
Choose a tag to compare

Update to Airstream v0.13.0. Publishing for Scala 3.0.0-RC3.

History and title behavior updates.

  • API: LinkHandler now looks at the data-title attribute of anchors and uses it when pushing state
  • API: LinkHandler.install now accepts a defaultTitle: String = "" argument to use when the data-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 – if true, it will be updating the document title with the title saved by frontroute in
    the PopState event state
  • updateTitleElement: Boolean = true – if true, it will also be updating the content of the head/title element
  • ignoreEmptyTitle: Boolean = false – if true, it will not be doing anything if the title is empty

0.12.2

23 Mar 20:04
Compare
Choose a tag to compare

Update to Airstream v0.12.2. No longer publishing for Scala 3.0.0-RC1.

  • Bugfix: historyState directive was returning undefined due to emitted pop state events did not include the state value

0.12.0

01 Feb 07:31
Compare
Choose a tag to compare

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 into LocationProvider
  • API: new CustomLocationProvider
  • API: renamed completeN into complete
  • API: new state directive
  • API: new makeRoute and makeRouteWithCallback
  • Util: new LocationUtils object with parseLocationParams and encodeLocationParams 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

21 Jan 05:05
Compare
Choose a tag to compare
  • Bugfix: .collect and .mapTo were not storing the mapped value (in the internal state)

An example that would show this behavior:

(pathEnd.mapTo(true) | path("page-1").mapTo(false)) { isIndex =>
  render(Page(isIndex))
}

0.11.6

21 Jan 03:48
Compare
Choose a tag to compare
  • 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 a Directive[A] into a Directive[Option[A]] (with Some(_) value)
    • .none – transforms a Directive[A] into a Directive[Option[A]] (with None value)
    • .mapOption – transforms a Directive[Option[A]] into a Directive[Option[B]] (applying the provided function to the Option)

0.11.5 – bufgixing

02 Jan 21:11
Compare
Choose a tag to compare

Fixing LinkHandler.

0.11.4 – simpler + LinkHandler

01 Jan 03:19
Compare
Choose a tag to compare
  • New: LinkHandler
  • New: directives: origin, host, hostname, port and protocol
  • 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