Skip to content

Commit e8e4208

Browse files
committed
update
1 parent d9e3dab commit e8e4208

File tree

10 files changed

+1131
-452
lines changed

10 files changed

+1131
-452
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
language: scala
22

33
scala:
4-
- 2.12.2
5-
- 2.11.11
4+
- 2.12.4
65

76
jdk:
87
- oraclejdk8

build.sbt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
name := "vdom"
22

3-
//version := "2017.7.0-SNAPSHOT"
3+
//version := "2017.12.0-SNAPSHOT"
44

55
enablePlugins(ScalaJSPlugin)
66

7-
val scala211 = "2.11.11"
87

9-
val scala212 = "2.12.2"
8+
val scala212 = "2.12.4"
109

1110
scalaVersion := scala212
1211

13-
crossScalaVersions := Seq(scala211, scala212)
12+
crossScalaVersions := Seq(scala212)
1413

1514
scalacOptions ++= Seq(
1615
"-feature",
@@ -22,8 +21,8 @@ scalacOptions ++= Seq(
2221
//Dependencies
2322
libraryDependencies ++= Seq(
2423
"org.scala-lang" % "scala-reflect" % scalaVersion.value % Provided,
25-
"scalajs-react-interface" %%% "core" % "2017.7.9-RC" % Provided,
26-
"scalajs-react-interface" %%% "universal" % "2017.7.9-RC" % Provided
24+
"scalajs-react-interface" %%% "core" % "2017.12.28-RC" % Provided,
25+
"scalajs-react-interface" %%% "universal" % "2017.12.28-RC" % Provided
2726
)
2827

2928
//bintray
@@ -72,12 +71,13 @@ def runJest() = {
7271
if (jestResult != 0) throw new IllegalStateException("Jest Suite failed")
7372
}
7473

75-
resolvers += Resolver.bintrayRepo("scalajs-react-interface", "maven")
76-
resolvers += Resolver.bintrayRepo("scalajs-jest", "maven")
74+
resolvers ++=Seq(Resolver.bintrayRepo("scalajs-react-interface", "maven"),
75+
Resolver.bintrayRepo("scalajs-jest", "maven"),
76+
Resolver.bintrayRepo("scalajs-plus", "maven"))
7777

7878
libraryDependencies ++= Seq(
79-
"org.scala-js" %%% "scalajs-dom" % "0.9.3" % Test,
80-
"scalajs-jest" %%% "core" % "2017.7.9-beta" % Test
79+
"org.scala-js" %%% "scalajs-dom" % "0.9.4" % Test,
80+
"scalajs-jest" %%% "core" % "2017.12.27-RC" % Test
8181
)
8282
//scalaJSStage in Global := FastOptStage
8383
scalaJSStage in Global := FullOptStage

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,6 @@
1111
},
1212
"devDependencies": {},
1313
"dependencies": {
14-
"jest": "^20.0.4"
14+
"jest": "^22.0.4"
1515
}
1616
}

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sbt.version=0.13.15
1+
sbt.version=1.0.4
22

project/plugins.sbt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M1")
2-
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.0.0")
3-
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "1.3.0")
4-
addSbtPlugin("me.lessis" % "bintray-sbt" % "0.3.0")
1+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M2")
2+
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")
3+
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "2.0.0")
4+
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.2")

src/main/scala/sri/web/vdom/Attributes.scala

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package sri.web.vdom
22

3-
import sri.macros.{FunctionObjectMacro, OptDefault, OptionalParam}
3+
import scalajsplus.{OptDefault, OptionalParam}
4+
import scalajsplus.macros.FunctionObjectMacro
45

56
import scala.scalajs.js
67
import scala.scalajs.js.`|`
@@ -329,8 +330,7 @@ trait SVGProps extends js.Object {
329330
trait EventProps extends js.Object {
330331
val onTimeUpdate: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
331332
js.undefined
332-
val onAnimationStart
333-
: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
333+
val onAnimationStart: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
334334
js.undefined
335335
val onKeyUp: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
336336
js.undefined
@@ -342,8 +342,7 @@ trait EventProps extends js.Object {
342342
val onAnimationIteration
343343
: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
344344
js.undefined
345-
val onCanPlayThrough
346-
: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
345+
val onCanPlayThrough: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
347346
js.undefined
348347
val onDragStart: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
349348
js.undefined
@@ -359,8 +358,7 @@ trait EventProps extends js.Object {
359358
js.undefined
360359
val onSelect: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
361360
js.undefined
362-
val onCompositionEnd
363-
: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
361+
val onCompositionEnd: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
364362
js.undefined
365363
val onTouchCancel: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
366364
js.undefined
@@ -399,8 +397,7 @@ trait EventProps extends js.Object {
399397
js.undefined
400398
val onProgress: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
401399
js.undefined
402-
val onDurationChange
403-
: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
400+
val onDurationChange: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
404401
js.undefined
405402
val onFocus: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
406403
js.undefined
@@ -428,8 +425,7 @@ trait EventProps extends js.Object {
428425
js.undefined
429426
val onSubmit: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
430427
js.undefined
431-
val onLoadedMetadata
432-
: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
428+
val onLoadedMetadata: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
433429
js.undefined
434430
val onContextMenu: js.UndefOr[js.Function1[_ <: SyntheticEvent[_], Unit]] =
435431
js.undefined
@@ -593,7 +589,7 @@ object HTMLProps {
593589
list: OptionalParam[String] = OptDefault,
594590
keyParams: OptionalParam[String] = OptDefault,
595591
controls: OptionalParam[Boolean] = OptDefault): DOMProps = {
596-
import sri.universal.DangerousUnionToJSAnyImplicit._
592+
import scalajsplus.DangerousUnionToJSAnyImplicit._
597593
val p = FunctionObjectMacro()
598594
p.asInstanceOf[DOMProps]
599595

@@ -797,7 +793,7 @@ object SVGProps {
797793
fillRule: OptionalParam[String] = OptDefault,
798794
stitchTiles: OptionalParam[String] = OptDefault,
799795
d: OptionalParam[String] = OptDefault): DOMProps = {
800-
import sri.universal.DangerousUnionToJSAnyImplicit._
796+
import scalajsplus.DangerousUnionToJSAnyImplicit._
801797
val p = FunctionObjectMacro()
802798
p.asInstanceOf[DOMProps]
803799
}
@@ -828,8 +824,7 @@ object EventProps {
828824
OptDefault,
829825
onTouchCancel: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
830826
onTouchEnd: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
831-
onTransitionEnd: OptionalParam[(_ <: SyntheticEvent[_]) => _] =
832-
OptDefault,
827+
onTransitionEnd: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
833828
onSeeking: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
834829
onPlay: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
835830
onDoubleClick: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
@@ -881,7 +876,7 @@ object EventProps {
881876
onInput: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault,
882877
onPaste: OptionalParam[(_ <: SyntheticEvent[_]) => _] = OptDefault)
883878
: DOMProps = {
884-
import sri.universal.DangerousUnionToJSAnyImplicit._
879+
import scalajsplus.DangerousUnionToJSAnyImplicit._
885880
val p = FunctionObjectMacro()
886881
p.asInstanceOf[DOMProps]
887882
}

src/main/scala/sri/web/vdom/Tags.scala

Lines changed: 33 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ package sri.web.vdom
22

33
import org.scalajs.dom
44
import sri.core._
5-
import sri.macros.{
6-
FunctionObjectMacro,
7-
exclude,
8-
OptDefault => NoValue,
9-
OptionalParam => U
10-
}
5+
import scalajsplus.macros.{FunctionObjectMacro, exclude}
6+
import scalajsplus.{OptDefault => NoValue, OptionalParam => U}
7+
118
import sri.universal.MergeJSObjects
129

1310
import scala.scalajs.js
@@ -343,13 +340,12 @@ trait Tags extends ReactEventAliases {
343340
}
344341

345342
@inline
346-
def feDistantLight[T <: dom.Node](
347-
style: U[js.Any] = NoValue,
348-
id: U[String] = NoValue,
349-
className: U[String] = NoValue,
350-
@exclude key: String | Int = null,
351-
@exclude ref: js.Function1[T, Unit] = null,
352-
@exclude extraProps: U[DOMProps] = NoValue)(
343+
def feDistantLight[T <: dom.Node](style: U[js.Any] = NoValue,
344+
id: U[String] = NoValue,
345+
className: U[String] = NoValue,
346+
@exclude key: String | Int = null,
347+
@exclude ref: js.Function1[T, Unit] = null,
348+
@exclude extraProps: U[DOMProps] = NoValue)(
353349
children: ReactNode*): ReactElement = {
354350
val props = FunctionObjectMacro()
355351
extraProps.foreach(v => { MergeJSObjects(props, v) })
@@ -774,7 +770,7 @@ trait Tags extends ReactEventAliases {
774770
@exclude key: String | Int = null,
775771
@exclude ref: js.Function1[T, Unit] = null,
776772
@exclude extraProps: U[DOMProps] = NoValue): ReactElement = {
777-
import sri.universal.DangerousUnionToJSAnyImplicit._
773+
import scalajsplus.DangerousUnionToJSAnyImplicit._
778774
val props = FunctionObjectMacro()
779775
extraProps.foreach(v => { MergeJSObjects(props, v) })
780776
CreateDOMElement("input", props)
@@ -1772,9 +1768,7 @@ trait Tags extends ReactEventAliases {
17721768
children: ReactNode*): ReactElement = {
17731769
val props = FunctionObjectMacro()
17741770
extraProps.foreach(v => { MergeJSObjects(props, v) })
1775-
CreateDOMElement("feSpecularLighting",
1776-
props,
1777-
children = children.toJSArray)
1771+
CreateDOMElement("feSpecularLighting", props, children = children.toJSArray)
17781772
}
17791773

17801774
@inline
@@ -1817,13 +1811,12 @@ trait Tags extends ReactEventAliases {
18171811
}
18181812

18191813
@inline
1820-
def feGaussianBlur[T <: dom.Node](
1821-
style: U[js.Any] = NoValue,
1822-
id: U[String] = NoValue,
1823-
className: U[String] = NoValue,
1824-
@exclude key: String | Int = null,
1825-
@exclude ref: js.Function1[T, Unit] = null,
1826-
@exclude extraProps: U[DOMProps] = NoValue)(
1814+
def feGaussianBlur[T <: dom.Node](style: U[js.Any] = NoValue,
1815+
id: U[String] = NoValue,
1816+
className: U[String] = NoValue,
1817+
@exclude key: String | Int = null,
1818+
@exclude ref: js.Function1[T, Unit] = null,
1819+
@exclude extraProps: U[DOMProps] = NoValue)(
18271820
children: ReactNode*): ReactElement = {
18281821
val props = FunctionObjectMacro()
18291822
extraProps.foreach(v => { MergeJSObjects(props, v) })
@@ -2145,13 +2138,12 @@ trait Tags extends ReactEventAliases {
21452138
}
21462139

21472140
@inline
2148-
def linearGradient[T <: dom.Node](
2149-
style: U[js.Any] = NoValue,
2150-
id: U[String] = NoValue,
2151-
className: U[String] = NoValue,
2152-
@exclude key: String | Int = null,
2153-
@exclude ref: js.Function1[T, Unit] = null,
2154-
@exclude extraProps: U[DOMProps] = NoValue)(
2141+
def linearGradient[T <: dom.Node](style: U[js.Any] = NoValue,
2142+
id: U[String] = NoValue,
2143+
className: U[String] = NoValue,
2144+
@exclude key: String | Int = null,
2145+
@exclude ref: js.Function1[T, Unit] = null,
2146+
@exclude extraProps: U[DOMProps] = NoValue)(
21552147
children: ReactNode*): ReactElement = {
21562148
val props = FunctionObjectMacro()
21572149
extraProps.foreach(v => { MergeJSObjects(props, v) })
@@ -2254,6 +2246,8 @@ trait Tags extends ReactEventAliases {
22542246
def textarea[T <: dom.Node](style: U[js.Any] = NoValue,
22552247
id: U[String] = NoValue,
22562248
className: U[String] = NoValue,
2249+
onChange: U[ReactEventI => _] = NoValue,
2250+
value: U[String] = NoValue,
22572251
@exclude key: String | Int = null,
22582252
@exclude ref: js.Function1[T, Unit] = null,
22592253
@exclude extraProps: U[DOMProps] = NoValue)(
@@ -2316,13 +2310,12 @@ trait Tags extends ReactEventAliases {
23162310
}
23172311

23182312
@inline
2319-
def radialGradient[T <: dom.Node](
2320-
style: U[js.Any] = NoValue,
2321-
id: U[String] = NoValue,
2322-
className: U[String] = NoValue,
2323-
@exclude key: String | Int = null,
2324-
@exclude ref: js.Function1[T, Unit] = null,
2325-
@exclude extraProps: U[DOMProps] = NoValue)(
2313+
def radialGradient[T <: dom.Node](style: U[js.Any] = NoValue,
2314+
id: U[String] = NoValue,
2315+
className: U[String] = NoValue,
2316+
@exclude key: String | Int = null,
2317+
@exclude ref: js.Function1[T, Unit] = null,
2318+
@exclude extraProps: U[DOMProps] = NoValue)(
23262319
children: ReactNode*): ReactElement = {
23272320
val props = FunctionObjectMacro()
23282321
extraProps.foreach(v => { MergeJSObjects(props, v) })
@@ -2456,9 +2449,7 @@ trait Tags extends ReactEventAliases {
24562449

24572450
@inline
24582451
def feDisplacementMapC(children: ReactNode*) = {
2459-
CreateDOMElement("feDisplacementMap",
2460-
json(),
2461-
children = children.toJSArray)
2452+
CreateDOMElement("feDisplacementMap", json(), children = children.toJSArray)
24622453
}
24632454

24642455
@inline
@@ -3232,9 +3223,7 @@ trait Tags extends ReactEventAliases {
32323223

32333224
@inline
32343225
def feDiffuseLightingC(children: ReactNode*) = {
3235-
CreateDOMElement("feDiffuseLighting",
3236-
json(),
3237-
children = children.toJSArray)
3226+
CreateDOMElement("feDiffuseLighting", json(), children = children.toJSArray)
32383227
}
32393228

32403229
@inline

src/main/scala/sri/web/vdom/styles/InlineStylesWebMacro.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package sri.web.vdom.styles
22

3-
import scala.reflect.macros.whitebox
3+
import scala.reflect.macros.blackbox
44

55
private[sri] object InlineStylesWebMacro {
66

7-
def styleMacroImpl(c: whitebox.Context)(props: c.Tree*): c.Tree = {
7+
def styleMacroImpl(c: blackbox.Context)(props: c.Tree*): c.Tree = {
88
import c.universe._
99

1010
val obj = TermName(c.freshName())
@@ -31,13 +31,13 @@ private[sri] object InlineStylesWebMacro {
3131
})
3232
q"""
3333
import scalajs.js
34-
import sri.universal.DangerousUnionToJSAnyImplicit._
34+
import scalajsplus.DangerousUnionToJSAnyImplicit._
3535
val $obj = js.Dynamic.literal(..$keyValues)
3636
$obj
3737
"""
3838
}
3939

40-
def styleRegisterMacroImpl(c: whitebox.Context)(props: c.Tree*): c.Tree = {
40+
def styleRegisterMacroImpl(c: blackbox.Context)(props: c.Tree*): c.Tree = {
4141
import c.universe._
4242
val obj = styleMacroImpl(c)(props: _*)
4343
q"""

src/test/scala/sri/web/vdom/InlineStyleSheetWebTest.scala

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,7 @@ class InlineStyleSheetWebTest extends BaseTest {
1616
background := "red")
1717
}
1818

19-
test(
20-
"InlineStyleSheetWebTest",
21-
() => {
19+
test("InlineStyleSheetWebTest") {
2220

2321
val input = styles.container.asInstanceOf[js.Dynamic]
2422
expect(input).toEqual(
@@ -27,5 +25,4 @@ class InlineStyleSheetWebTest extends BaseTest {
2725
alignItems = "center",
2826
background = "red"))
2927
}
30-
)
3128
}

0 commit comments

Comments
 (0)