Skip to content

Commit 8c5701e

Browse files
committed
update deps
1 parent 3975259 commit 8c5701e

File tree

9 files changed

+25
-26
lines changed

9 files changed

+25
-26
lines changed

build.sbt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ inThisBuild(
66
name := "animus",
77
normalizedName := "animus",
88
organization := "com.kitlangton",
9-
scalaVersion := "3.3.3",
9+
scalaVersion := "3.4.1",
1010
crossScalaVersions := Seq("3.3.3"),
1111
organization := "io.github.kitlangton",
1212
homepage := Some(url("https://github.com/kitlangton/animus")),
@@ -57,8 +57,8 @@ lazy val scalacSettings =
5757
"-feature" ::
5858
Nil
5959

60-
val zioVersion = "2.0.21"
61-
val laminarVersion = "16.0.0"
60+
val zioVersion = "2.1.0"
61+
val laminarVersion = "17.0.0"
6262

6363
lazy val commonSettings = Seq(
6464
scalacOptions ++= scalacSettings
@@ -83,7 +83,7 @@ lazy val animus = crossProject(JSPlatform)
8383
commonSettings,
8484
libraryDependencies ++= Seq(
8585
"dev.zio" %%% "zio-test" % zioVersion % Test,
86-
"io.github.kitlangton" %%% "quotidian" % "0.0.14"
86+
"io.github.kitlangton" %%% "quotidian" % "0.0.15"
8787
)
8888
)
8989
.jsSettings(

example/src/main/scala/example/AnimatedTitle.scala

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package example
22

3-
import com.raquo.laminar.api.L._
4-
import animus._
3+
import com.raquo.laminar.api.L.*
4+
import animus.*
55

6-
object AnimatedTitle extends Component {
6+
object AnimatedTitle extends Component:
77
val activeVar = Var(true)
88

99
val $time: Signal[Double] =
@@ -19,8 +19,8 @@ object AnimatedTitle extends Component {
1919
val $opacity = $time.map(i => (Math.sin((i + idx * 15) / 30.0) / -2) + 1)
2020

2121
def activate(signal: Signal[Double], default: Double): Signal[Double] =
22-
activeVar.signal.flatMap { active =>
23-
if (active) signal
22+
activeVar.signal.flatMapSwitch { active =>
23+
if active then signal
2424
else Val(default)
2525
}.spring
2626

@@ -34,4 +34,3 @@ object AnimatedTitle extends Component {
3434
)
3535
}
3636
)
37-
}

modules/core/js/src/main/scala/animus/Transitions.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ object Transitions:
5454
val scrollHeightVar = Var(0.0)
5555

5656
val $scrollHeight = $open.distinct
57-
.flatMap {
57+
.flatMapSwitch {
5858
if _ then scrollHeightVar.signal
5959
else Val(0.0)
6060
}
@@ -83,14 +83,14 @@ object Transitions:
8383
}
8484
},
8585
$scrollHeight --> { _ => () },
86-
maxHeight <-- signalVar.signal.flatten
86+
maxHeight <-- signalVar.signal.flattenSwitch
8787
)
8888

8989
def width($open: Signal[Boolean], speed: Double = 1): Mod[HtmlElement] =
9090
val scrollWidthVar = Var(0.0)
9191

9292
val $scrollWidth = $open.distinct
93-
.flatMap {
93+
.flatMapSwitch {
9494
if _ then scrollWidthVar.signal
9595
else Val(0.0)
9696
}
@@ -119,7 +119,7 @@ object Transitions:
119119
}
120120
},
121121
$scrollWidth --> { _ => () },
122-
maxWidth <-- signalVar.signal.flatten
122+
maxWidth <-- signalVar.signal.flattenSwitch
123123
)
124124

125125
def scale($open: Signal[Boolean], closedScale: Double = 0.0, speed: Double = 1): Mod[HtmlElement] =
@@ -212,7 +212,7 @@ object Transitions:
212212
xs
213213
}
214214

215-
$adding.flatMap(_ =>
215+
$adding.flatMapSwitch(_ =>
216216
$values.map { values =>
217217
ordering.toList.flatMap(key => values.get(key))
218218
}

modules/core/js/src/main/scala/com/raquo/airstream/core/AnimationManager.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import animus.Animator
44
import org.scalajs.dom.window.requestAnimationFrame
55

66
object AnimationManager:
7-
private val animations = scalajs.js.Map.empty[Int, Animator[_]]
7+
private val animations = scalajs.js.Map.empty[Int, Animator[?]]
88
private var animating = false
99
private var animationId: Int = 0
1010

modules/core/js/src/main/scala/com/raquo/airstream/core/SpringSignal.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class SpringSignal[A](
1818
with WritableSignal[A]
1919
with SingleParentSignal[A, A]:
2020

21-
private var spring: Animator[A] = _
21+
private var spring: Animator[A] = scala.compiletime.uninitialized
2222
var animationId: Int = -1
2323

2424
override def onStart(): Unit =

modules/core/js/src/main/scala/com/raquo/airstream/core/TransitioningSignal.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import scala.scalajs.js.timers.{SetTimeoutHandle, clearTimeout, setTimeout}
99
import scala.util.Try
1010

1111
class TransitioningSignal[Input, Output, Key](
12-
override protected[this] val parent: Signal[Seq[Input]],
12+
override protected val parent: Signal[Seq[Input]],
1313
getKey: Input => Key,
1414
project: (Key, Input, Signal[Input], Transition) => Output
1515
) extends Signal[Seq[Output]]
@@ -28,20 +28,20 @@ class TransitioningSignal[Input, Output, Key](
2828

2929
override protected[airstream] val topoRank: Int = Protected.topoRank(parent) + 1
3030

31-
private[this] val timeoutHandles: mutable.Map[Key, SetTimeoutHandle] = mutable.Map.empty
32-
private[this] val memoized: mutable.Map[Key, (Output, Var[Input], Var[TransitionStatus])] = mutable.Map.empty
33-
private[this] val activeKeys: mutable.Set[Key] = mutable.Set.empty
31+
private val timeoutHandles: mutable.Map[Key, SetTimeoutHandle] = mutable.Map.empty
32+
private val memoized: mutable.Map[Key, (Output, Var[Input], Var[TransitionStatus])] = mutable.Map.empty
33+
private val activeKeys: mutable.Set[Key] = mutable.Set.empty
3434

3535
// Used to track the order of the values.
36-
private[this] val ordered = new OrderedSet[Key](Vector.empty)
36+
private val ordered = new OrderedSet[Key](Vector.empty)
3737

3838
protected override def onStop(): Unit =
3939
memoized.clear()
4040
super.onStop()
4141

4242
def refireMemoized(): Unit = fireValue(ordered.toList.map(memoized(_)._1), null)
4343

44-
private[this] def memoizedProject(nextInputs: Seq[Input], first: Boolean = false): Seq[Output] =
44+
private def memoizedProject(nextInputs: Seq[Input], first: Boolean = false): Seq[Output] =
4545
val nextKeys = mutable.HashSet.empty[Key] // HashSet has desirable performance tradeoffs
4646

4747
val nextOutputs = nextInputs.map { input =>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"postcss": "^8.4.38",
2828
"postcss-import": "16.1.0",
2929
"postcss-preset-env": "9.5.11",
30-
"sass": "^1.76.0",
30+
"sass": "^1.77.0",
3131
"stylelint": "16.5.0",
3232
"stylelint-config-recommended": "14.0.0",
3333
"stylelint-config-standard": "36.0.0",

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version = 1.9.9
1+
sbt.version = 1.10.0

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
logLevel := Level.Warn
22

3-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.15.0")
3+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
44
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
55
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
66
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.23.0")

0 commit comments

Comments
 (0)