Skip to content

Commit

Permalink
Run prePR with sbt-typelevel
Browse files Browse the repository at this point in the history
Executed command: sbt tlPrePrBotHook
  • Loading branch information
lucuma-steward[bot] committed Oct 11, 2024
1 parent b3c6b15 commit e33892c
Show file tree
Hide file tree
Showing 29 changed files with 146 additions and 148 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ jobs:
timeout-minutes: 60
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt
uses: sbt/setup-sbt@v1

- name: Checkout current branch (full)
uses: actions/checkout@v4
Expand Down Expand Up @@ -103,8 +102,7 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- name: Install sbt
if: contains(runner.os, 'macos')
run: brew install sbt
uses: sbt/setup-sbt@v1

- name: Checkout current branch (full)
uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# this file by hand! Instead, if you wish to make changes, you should
# make a PR to sbt-lucuma.

version = "3.8.0"
version = "3.8.3"
style = default

runner.dialect = scala3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object BeautifulDnDDemo {
final case class State(list: List[Item] = getItems(10))

implicit object CallbackMonoid extends Monoid[Callback] {
def empty: Callback = Callback.empty
def empty: Callback = Callback.empty
def combine(x: Callback, y: Callback): Callback = x *> y
}

Expand Down
20 changes: 10 additions & 10 deletions common/src/main/scala/lucuma/react/common/jsComponents.scala
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ trait GenericJsComponentC[P <: js.Object, CT[-p, +u] <: CtorType[p, u], U, A] {
newComponent: Js.Component[P, Null, CT]
): GenericJsComponentC[P, CT, U, A] =
new GenericJsComponentC[P, CT, U, A] {
override protected def cprops: P = self.cprops
override val children = self.children
override protected def cprops: P = self.cprops
override val children = self.children
override def withChildren(children: CtorType.ChildrenArgs): A = self.withChildren(children)
override protected val component = newComponent
override protected val component = newComponent
}

def withRef(ref: Ref.Handle[Js.RawMounted[P, Null]]): GenericJsComponentC[P, CT, U, A] =
Expand Down Expand Up @@ -241,7 +241,7 @@ trait GenericJsComponentA[P <: js.Object, CT[-p, +u] <: CtorType[p, u], U, A]
override protected def cprops: P = self.cprops
override val modifiers: Seq[japgolly.scalajs.react.vdom.TagMod] = self.modifiers
override protected val component = newComponent
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
}

def withRef(ref: Ref.Handle[Js.RawMounted[P, Null]]): GenericJsComponentA[P, CT, U, A] =
Expand Down Expand Up @@ -287,7 +287,7 @@ trait GenericJsComponentAC[P <: js.Object, CT[-p, +u] <: CtorType[p, u], U, A]
override protected def cprops: P = self.cprops
override val modifiers: Seq[japgolly.scalajs.react.vdom.TagMod] = self.modifiers
override protected val component = newComponent
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
}

def withRef(ref: Ref.Handle[Js.RawMounted[P, Null]]): GenericJsComponentAC[P, CT, U, A] =
Expand Down Expand Up @@ -362,10 +362,10 @@ trait GenericJsComponentCF[P <: js.Object, CT[-p, +u] <: CtorType[p, u], U, A, F
newComponent: Js.ComponentWithFacade[P, Null, F, CT]
): GenericJsComponentCF[P, CT, U, A, F] =
new GenericJsComponentCF[P, CT, U, A, F] {
override protected def cprops: P = self.cprops
override val children = self.children
override protected def cprops: P = self.cprops
override val children = self.children
override def withChildren(children: CtorType.ChildrenArgs): A = self.withChildren(children)
override protected val component = newComponent
override protected val component = newComponent
}

def withRef(
Expand Down Expand Up @@ -400,7 +400,7 @@ trait GenericJsComponentAF[P <: js.Object, CT[-p, +u] <: CtorType[p, u], U, A, F
override protected def cprops: P = self.cprops
override val modifiers: Seq[japgolly.scalajs.react.vdom.TagMod] = self.modifiers
override protected val component = newComponent
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
}

def withRef(
Expand Down Expand Up @@ -438,7 +438,7 @@ trait GenericJsComponentACF[P <: js.Object, CT[-p, +u] <: CtorType[p, u], U, A,
override protected def cprops: P = self.cprops
override val modifiers: Seq[japgolly.scalajs.react.vdom.TagMod] = self.modifiers
override protected val component = newComponent
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
override def addModifiers(modifiers: Seq[TagMod]): A = self.addModifiers(modifiers)
}

def withRef(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ case class CounterLayer(
) extends ReactFnProps(CounterLayer.component)
with IconProps:
def apply(mods: TagMod*): CounterLayer = copy(modifiers = modifiers ++ mods)
override def faClasses: Css = super.faClasses // For some reason this is necessary (?!?!?)
override def faClasses: Css = super.faClasses // For some reason this is necessary (?!?!?)

def addClass(value: Css) = copy(clazz = clazz |+| value)
def withClass(value: Css) = copy(clazz = value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ case class FontAwesomeIcon(
) extends ReactFnProps(FontAwesomeIcon.component)
with IconProps:
def apply(mods: TagMod*): FontAwesomeIcon = copy(modifiers = modifiers ++ mods)
override def faClasses: Css = super.faClasses // For some reason this is necessary (?!?!?)
override def faClasses: Css = super.faClasses // For some reason this is necessary (?!?!?)

def addClass(value: Css) = copy(clazz = clazz |+| value)
def withClass(value: Css) = copy(clazz = value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ case class TextLayer(
) extends ReactFnProps(TextLayer.component)
with IconProps:
def apply(mods: TagMod*): TextLayer = copy(modifiers = modifiers ++ mods)
override def faClasses: Css = super.faClasses // For some reason this is necessary (?!?!?)
override def faClasses: Css = super.faClasses // For some reason this is necessary (?!?!?)

def addClass(value: Css) = copy(clazz = clazz |+| value)
def withClass(value: Css) = copy(clazz = value)
Expand Down
4 changes: 2 additions & 2 deletions font-awesome/src/main/scala/lucuma/react/fa/facade.scala
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ trait Counter extends FontawesomeObject
@js.native
@JSImport("@fortawesome/fontawesome-svg-core", JSImport.Namespace)
object FontAwesome extends js.Object:
def library: Library = js.native
def text(content: String, params: js.UndefOr[TextParams] = js.undefined): Text = js.native
def library: Library = js.native
def text(content: String, params: js.UndefOr[TextParams] = js.undefined): Text = js.native
def counter(
content: String | Float | Double | Int | Short | Byte,
params: js.UndefOr[CounterParams]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ final case class ReactGridLayout(
onDrop: DropCallback = (_, _, _) => Callback.empty,
override val modifiers: Seq[TagMod] = Seq.empty
) extends GenericComponentPAC[ReactGridLayout.ReactGridLayoutProps, ReactGridLayout] {
override def cprops = ReactGridLayout.props(this)
override protected val component = ReactGridLayout.component
override def cprops = ReactGridLayout.props(this)
override protected val component = ReactGridLayout.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ final case class ResponsiveReactGridLayout(
ResponsiveReactGridLayout.ResponsiveReactGridLayoutProps,
ResponsiveReactGridLayout
] {
override def cprops = ResponsiveReactGridLayout.props(this)
override protected val component = ResponsiveReactGridLayout.component
override def cprops = ResponsiveReactGridLayout.props(this)
override protected val component = ResponsiveReactGridLayout.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ case class ReactMarkdown(
rehypePlugins: js.UndefOr[List[RehypePlugin]] = js.undefined,
override val modifiers: Seq[TagMod] = Seq.empty
) extends GenericFnComponentPA[ReactMarkdown.Props, ReactMarkdown] {
override protected def cprops = ReactMarkdown.props(this)
override protected val component = ReactMarkdown.component
override protected def cprops = ReactMarkdown.props(this)
override protected val component = ReactMarkdown.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ case class AccordionTab(
contentClass: js.UndefOr[Css] = js.undefined,
override val modifiers: Seq[TagMod] = Seq.empty
) extends GenericFnComponentPAC[AccordionTab.AccordionTabProps, AccordionTab] {
override protected def cprops = AccordionTab.props(this)
override protected val component = AccordionTab.component
override protected def cprops = AccordionTab.props(this)
override protected val component = AccordionTab.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
def apply(mods: TagMod*) = addModifiers(mods)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,32 +46,32 @@ object ConfirmDialog {
accept: js.UndefOr[Callback] = js.undefined,
reject: js.UndefOr[Callback] = js.undefined
): Callback =
Callback {
val props = ConfirmDialogProps()
message.foreach(v => props.setMessage(v.rawNode))
icon.foreach(v => props.setIcon(v.toPrime))
// header not in the ST facade
header.foreach(v => StObject.set(props, "header", v.rawNode))
footer.foreach(v => props.setFooter(v.rawNode))
acceptLabel.foreach(v => props.setAcceptLabel(v))
rejectLabel.foreach(v => props.setRejectLabel(v))
acceptIcon.foreach(v => props.setAcceptIcon(v.toPrime))
rejectIcon.foreach(v => props.setRejectIcon(v.toPrime))
acceptClass.foreach(v => props.setAcceptClassName(v.htmlClass))
rejectClass.foreach(v => props.setRejectClassName(v.htmlClass))
clazz.foreach(v => props.setClassName(v.htmlClass))
Callback {
val props = ConfirmDialogProps()
message.foreach(v => props.setMessage(v.rawNode))
icon.foreach(v => props.setIcon(v.toPrime))
// header not in the ST facade
header.foreach(v => StObject.set(props, "header", v.rawNode))
footer.foreach(v => props.setFooter(v.rawNode))
acceptLabel.foreach(v => props.setAcceptLabel(v))
rejectLabel.foreach(v => props.setRejectLabel(v))
acceptIcon.foreach(v => props.setAcceptIcon(v.toPrime))
rejectIcon.foreach(v => props.setRejectIcon(v.toPrime))
acceptClass.foreach(v => props.setAcceptClassName(v.htmlClass))
rejectClass.foreach(v => props.setRejectClassName(v.htmlClass))
clazz.foreach(v => props.setClassName(v.htmlClass))

// position not in the ST facade, either
position.foreach(v => StObject.set(props, "position", v.value))
onHide.foreach(v => props.setOnHide(s => v(ConfirmDialogHideParm.fromString(s))))
accept.foreach(v => props.setAccept(v))
reject.foreach(v => props.setReject(v))
// position not in the ST facade, either
position.foreach(v => StObject.set(props, "position", v.value))
onHide.foreach(v => props.setOnHide(s => v(ConfirmDialogHideParm.fromString(s))))
accept.foreach(v => props.setAccept(v))
reject.foreach(v => props.setReject(v))

rawConfirmDialog(props)
}
// In case this ever starts working as advertised, remove the Callback wrapper above
// and uncomment the line below.
// ConfirmDialogReturn(Callback(rawReturn.show()), Callback(rawReturn.hide()))
rawConfirmDialog(props)
}
// In case this ever starts working as advertised, remove the Callback wrapper above
// and uncomment the line below.
// ConfirmDialogReturn(Callback(rawReturn.show()), Callback(rawReturn.hide()))

private val component = ScalaFnComponent[ConfirmDialog] { props =>
CConfirmDialog()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case class Messages(
override protected val component = Messages.component
override def addModifiers(modifiers: Seq[TagMod]): Messages =
copy(modifiers = this.modifiers ++ modifiers)
def withMods(mods: TagMod*) = addModifiers(mods)
def withMods(mods: TagMod*) = addModifiers(mods)

object Messages {
@js.native
Expand All @@ -46,7 +46,7 @@ object Messages {
def show(message: js.Array[MessageItem]): Unit = js.native
def replace(message: js.Array[MessageItem]): Unit = js.native
def remove(message: MessageItem): Unit = js.native
def clear(): Unit = js.native
def clear(): Unit = js.native
}

@js.native
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ object OverlayPanel {

@js.native
trait Facade extends js.Object {
def show(event: ReactEvent): Unit = js.native
def hide: Unit = js.native
def show(event: ReactEvent): Unit = js.native
def hide: Unit = js.native
def toggle(event: ReactEvent): Unit = js.native
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ case class SelectButton[A](
def apply(mods: TagMod*) = addModifiers(mods)

override def getter: js.UndefOr[Int] = optionsWithIndex.indexOfOption(value).orUndefined
override def valueFinder(i: Any): A = selectItemFinder(i).value
override def valueFinder(i: Any): A = selectItemFinder(i).value

override val multiple: js.UndefOr[Boolean] = false
override val unselectable: js.UndefOr[Boolean] = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object SelectItem {
// We're using the index of the options for the CSelectValue so comparisons can
// be made via Eq rather than let javascript do the comparisons.
extension [A: Eq](options: List[(SelectItem[A], Int)])
def indexOfOption(a: A): Option[Int] = options.find(_._1.value === a).map(_._2)
def indexOfOption(a: A): Option[Int] = options.find(_._1.value === a).map(_._2)
def findByIndexOption(index: Int): Option[A] =
findSelectItemByIndexOption(index).map(_.value)
def findSelectItemByIndexOption(index: Int): Option[SelectItem[A]] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ case class SplitterPanel(
clazz: js.UndefOr[Css] = js.undefined,
override val modifiers: Seq[TagMod] = Seq.empty
) extends GenericFnComponentPAC[SplitterPanel.SplitterPanelProps, SplitterPanel] {
override protected def cprops = SplitterPanel.props(this)
override protected val component = SplitterPanel.component
override protected def cprops = SplitterPanel.props(this)
override protected val component = SplitterPanel.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
def apply(mods: TagMod*) = addModifiers(mods)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ case class TabPanel(
contentClass: js.UndefOr[Css] = js.undefined,
override val modifiers: Seq[TagMod] = Seq.empty
) extends GenericFnComponentPAC[TabPanel.TabPanelProps, TabPanel] {
override protected def cprops = TabPanel.props(this)
override protected val component = TabPanel.component
override protected def cprops = TabPanel.props(this)
override protected val component = TabPanel.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
def apply(mods: TagMod*) = addModifiers(mods)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object Toast {
def show(message: js.Array[MessageItem]): Unit = js.native
def replace(message: js.Array[MessageItem]): Unit = js.native
def remove(message: MessageItem): Unit = js.native
def clear(): Unit = js.native
def clear(): Unit = js.native
}

@js.native
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val sbtLucumaVersion = "0.12.1"
val sbtLucumaVersion = "0.12.1"
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % sbtLucumaVersion)
addSbtPlugin("com.armanbilge" % "sbt-scalajs-importmap" % "0.1.1")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ final case class Resizable(
width: Double,
override val modifiers: Seq[TagMod] = Seq.empty
) extends GenericComponentPAC[Resizable.Props, Resizable] {
override protected def cprops = Resizable.props(this)
override protected val component = Resizable.component
override protected def cprops = Resizable.props(this)
override protected val component = Resizable.component
override def addModifiers(modifiers: Seq[TagMod]) = copy(modifiers = this.modifiers ++ modifiers)
}

Expand Down
2 changes: 1 addition & 1 deletion tanstack-table/src/main/scala/lucuma/react/SizePx.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ opaque type SizePx = Int
object SizePx:
inline def apply(value: Int): SizePx = value
extension (opaqueValue: SizePx)
inline def value: Int = opaqueValue
inline def value: Int = opaqueValue
inline def modify(f: Endo[Int]): SizePx = f(opaqueValue)
Loading

0 comments on commit e33892c

Please sign in to comment.