Skip to content

Commit

Permalink
0.1 Release
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticfall committed Feb 4, 2015
1 parent 7e2d4e9 commit 47c211c
Show file tree
Hide file tree
Showing 18 changed files with 97 additions and 94 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ target
.settings
.cache
.README.md.html
/bin/
10 changes: 5 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
scalaJSSettings

name := "scalajs-d3"

description := "D3.js bindings for Scala.js."

organization := "com.greencatsoft"

version := "0.1-SNAPSHOT"
version := "0.1"

scalaVersion := "2.11.2"
scalaVersion := "2.11.5"

scalacOptions ++= Seq("-feature","-deprecation")

homepage := Some(url("http://github.com/greencatsoft/scalajs-d3"))

libraryDependencies ++= Seq(
"org.scala-lang.modules.scalajs" %%% "scalajs-dom" % "0.6")
"org.scala-js" %%% "scalajs-dom" % "0.7.0")

publishTo := {
val nexus = "https://oss.sonatype.org/"
Expand All @@ -29,6 +27,8 @@ publishMavenStyle := true

pomIncludeRepository := { _ => false }

lazy val root = project.in(file(".")).enablePlugins(ScalaJSPlugin)

pomExtra := (
<licenses>
<license>
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
addSbtPlugin("org.scala-lang.modules.scalajs" % "scalajs-sbt-plugin" % "0.5.6")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.0")

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.5.0")
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")

addSbtPlugin("com.github.mpeltonen" % "sbt-idea" % "1.6.0")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.greencatsoft.d3.selection.Selection

trait BehaviorFactory[A <: Node, B <: Selection[A, B]] extends js.Object {

def drag(): Drag[A, B] = ???
def drag(): Drag[A, B] = js.native

def zoom(): Zoom[A, B] = ???
def zoom(): Zoom[A, B] = js.native
}
3 changes: 2 additions & 1 deletion src/main/scala/com/greencatsoft/d3/event/D3Event.scala
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package com.greencatsoft.d3.event

import scala.scalajs.js
import scala.scalajs.js.UndefOr

import org.scalajs.dom.Event

trait D3Event[A <: Event] extends Event {

val sourceEvent: UndefOr[A] = ???
val sourceEvent: UndefOr[A] = js.native
}
12 changes: 6 additions & 6 deletions src/main/scala/com/greencatsoft/d3/event/Drag.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ import com.greencatsoft.d3.selection.{ ElementIterator, Selection }

trait Drag[A <: Node, B <: Selection[A, B]] extends EventSource[A, B] {

def origin[T](): ElementIterator[A, T] = ???
def origin[T](): ElementIterator[A, T] = js.native

def origin[T](fn: ElementIterator[A, T]): B = ???
def origin[T](fn: ElementIterator[A, T]): B = js.native
}

trait D3DragEvent extends D3Event[Event] {

val x: UndefOr[Double] = ???
val x: UndefOr[Double] = js.native

val y: UndefOr[Double] = ???
val y: UndefOr[Double] = js.native

val dx: UndefOr[Double] = ???
val dx: UndefOr[Double] = js.native

val dy: UndefOr[Double] = ???
val dy: UndefOr[Double] = js.native
}

object Drag {
Expand Down
12 changes: 6 additions & 6 deletions src/main/scala/com/greencatsoft/d3/event/EventChain.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,17 @@ import com.greencatsoft.d3.selection.Selection

trait EventChain[A <: Node, B <: Selection[A, B]] extends js.Object {

def event: UndefOr[D3Event[_]] = ???
def event: UndefOr[D3Event[_]] = js.native

def mouse(container: Node): UndefOr[js.Array[Double]] = ???
def mouse(container: Node): UndefOr[js.Array[Double]] = js.native

def touch(container: Node): UndefOr[js.Array[js.Array[Double]]] = ???
def touch(container: Node): UndefOr[js.Array[js.Array[Double]]] = js.native

def touch(container: Node, identifier: String): UndefOr[js.Array[js.Array[Double]]] = ???
def touch(container: Node, identifier: String): UndefOr[js.Array[js.Array[Double]]] = js.native

def touches(container: Node): UndefOr[js.Array[js.Array[Double]]] = ???
def touches(container: Node): UndefOr[js.Array[js.Array[Double]]] = js.native

def behavior: BehaviorFactory[A, B] = ???
def behavior: BehaviorFactory[A, B] = js.native
}

object EventChain {
Expand Down
10 changes: 5 additions & 5 deletions src/main/scala/com/greencatsoft/d3/event/EventSource.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ import com.greencatsoft.d3.selection.{ ElementIterator, Selection }

trait EventSource[A <: Node, B <: Selection[A, B]] extends js.Object {

def on(event: String): UndefOr[js.ThisFunction]
def on(event: String): UndefOr[js.ThisFunction] = js.native

def on[T](event: String, listener: ElementIterator[A, T]): B = ???
def on[T](event: String, listener: ElementIterator[A, T]): B = js.native

def on[T](event: String, listener: ElementIterator[A, T], capture: Boolean): B = ???
def on[T](event: String, listener: ElementIterator[A, T], capture: Boolean): B = js.native

def transition(): B = ???
def transition(): B = js.native

def interrupt(): B = ???
def interrupt(): B = js.native
}
36 changes: 18 additions & 18 deletions src/main/scala/com/greencatsoft/d3/event/Zoom.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,42 +8,42 @@ import com.greencatsoft.d3.selection.Selection

trait Zoom[A <: Node, B <: Selection[A, B]] extends EventSource[A, B] {

def translate(): js.Array[Double] = ???
def translate(): js.Array[Double] = js.native

def translate(translation: js.Array[Double]): B = ???
def translate(translation: js.Array[Double]): B = js.native

def scale(): Double = ???
def scale(): Double = js.native

def scale(scale: Double): B = ???
def scale(scale: Double): B = js.native

def scaleExtent(): js.Array[Double] = ???
def scaleExtent(): js.Array[Double] = js.native

def scaleExtent(extend: js.Array[Double]): B = ???
def scaleExtent(extend: js.Array[Double]): B = js.native

def center(): js.Array[Double] = ???
def center(): js.Array[Double] = js.native

def center(extend: js.Array[Double]): B = ???
def center(extend: js.Array[Double]): B = js.native

def x(): Double = ???
def x(): Double = js.native

def x(x: Double): B = ???
def x(x: Double): B = js.native

def y(): Double = ???
def y(): Double = js.native

def y(y: Double): B = ???
def y(y: Double): B = js.native

def size(): js.Array[Double] = ???
def size(): js.Array[Double] = js.native

def size(extend: js.Array[Double]): B = ???
def size(extend: js.Array[Double]): B = js.native

def apply(selection: B): B = ???
def apply(selection: B): B = js.native

def event(selection: B): B = ???
def event(selection: B): B = js.native
}

trait D3ZoomEvent extends D3Event[Event] {

val translate: js.Array[Double] = ???
val translate: js.Array[Double] = js.native

val scale: Double = ???
val scale: Double = js.native
}
3 changes: 2 additions & 1 deletion src/main/scala/com/greencatsoft/d3/package.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.greencatsoft

import scala.language.implicitConversions

import scala.scalajs.js
import scala.scalajs.js.{ GlobalScope, RegExp, UndefOr }
import scala.scalajs.js.Any.{ jsArrayOps, wrapArray }
Expand Down Expand Up @@ -104,7 +105,7 @@ package object d3 {
}

private[d3] object global extends GlobalScope {
val d3: D3Api[_, _] = ???
val d3: D3Api[_, _] = js.native
}

private[d3] trait D3Provider[A <: Node, B <: Selection[A, B]] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import org.scalajs.dom.Node

trait AttributeHolder[A <: Node, B <: Selection[A, B]] extends js.Object {

def attr(name: String, value: Any): B = ???
def attr(name: String, value: Any): B = js.native

def attr[T](name: String, provider: ElementIterator[A, T]): B = ???
def attr[T](name: String, provider: ElementIterator[A, T]): B = js.native

def attr(name: String): UndefOr[String] = ???
def attr(name: String): UndefOr[String] = js.native
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ import org.scalajs.dom.Node

trait Callable[A <: Node, B <: Selection[A, B]] extends js.Object {

def call(fn: Any): B = ???
def call(fn: Any): B = js.native
}
10 changes: 5 additions & 5 deletions src/main/scala/com/greencatsoft/d3/selection/Container.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ import org.scalajs.dom.Node

trait Appendable[A <: Node, B <: Selection[A, B]] extends js.Object {

def append(name: String): B = ???
def append(name: String): B = js.native

def append(provider: js.Function0[A]): B = ???
def append(provider: js.Function0[A]): B = js.native

def insert(name: String, before: String): B = ???
def insert(name: String, before: String): B = js.native

def insert(name: String, provider: js.Function0[A]): B = ???
def insert(name: String, provider: js.Function0[A]): B = js.native
}

trait Removable[A <: Node, B <: Selection[A, B]] extends js.Object {

def remove(): B = ???
def remove(): B = js.native
}

trait Container[A <: Node, B <: Selection[A, B]] extends Appendable[A, B] with Removable[A, B]
12 changes: 6 additions & 6 deletions src/main/scala/com/greencatsoft/d3/selection/ContentEditor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ import org.scalajs.dom.{ HTMLElement, Node }

trait ContentEditor[A <: Node, B <: Selection[A, B]] extends js.Object {

def text(): UndefOr[String] = ???
def text(): UndefOr[String] = js.native

def text(content: String): B = ???
def text(content: String): B = js.native

def text[B](provider: ElementIterator[A, B]): B = ???
def text[B](provider: ElementIterator[A, B]): B = js.native
}

trait HtmlContentEditor[A <: HTMLElement, B <: Selection[A, B]] extends ContentEditor[A, B] {

def html(): UndefOr[String] = ???
def html(): UndefOr[String] = js.native

def html(content: String): B = ???
def html(content: String): B = js.native

def html[A](provider: ElementIterator[HTMLElement, A]): B = ???
def html[A](provider: ElementIterator[HTMLElement, A]): B = js.native
}
28 changes: 14 additions & 14 deletions src/main/scala/com/greencatsoft/d3/selection/DataDriven.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,29 @@ trait DataDriven[A <: Node, B <: Selection[A, B]] extends js.Object {

import DataDriven._

def data[T](): js.Array[T] = ???
def data[T](): js.Array[T] = js.native

def data(values: js.Array[Any]): BoundSelection[A, B] = ???
def data(values: js.Array[Any]): BoundSelection[A, B] = js.native

def data[T](values: js.Array[T], key: KeyFunction[T]): BoundSelection[A, B] = ???
def data[T](values: js.Array[T], key: KeyFunction[T]): BoundSelection[A, B] = js.native

def data(provider: js.Function1[Any, Any]): BoundSelection[A, B] = ???
def data(provider: js.Function1[Any, Any]): BoundSelection[A, B] = js.native

def data[T](provider: js.Function1[Any, T], key: KeyFunction[T]): BoundSelection[A, B] = ???
def data[T](provider: js.Function1[Any, T], key: KeyFunction[T]): BoundSelection[A, B] = js.native

def datum[T](): UndefOr[T] = ???
def datum[T](): UndefOr[T] = js.native

def datum(value: Any): B = ???
def datum(value: Any): B = js.native

def datum[T](value: ElementIterator[A, T]): B = ???
def datum[T](value: ElementIterator[A, T]): B = js.native

def filter(selector: String): B = ???
def filter(selector: String): B = js.native

def filter[T](filter: ElementIterator[A, T]): B = ???
def filter[T](filter: ElementIterator[A, T]): B = js.native

def sort[T](comparator: js.Function2[T, T, Int]): B = ???
def sort[T](comparator: js.Function2[T, T, Int]): B = js.native

def order(): B = ???
def order(): B = js.native
}

object DataDriven {
Expand All @@ -41,9 +41,9 @@ object DataDriven {
trait BoundSelection[A <: Node, B <: Selection[A, B]] extends js.Object {
this: B =>

def enter(): SelectionBuilder[A, B] = ???
def enter(): SelectionBuilder[A, B] = js.native

def exit(): B = ???
def exit(): B = js.native
}

trait SelectionBuilder[A <: Node, B <: Selection[A, B]] extends Container[A, B]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ import org.scalajs.dom.Node
trait PropertyHolder[A <: Node, B <: Selection[A, B]] extends js.Object {
this: B =>

def property(name: String): UndefOr[String] = ???
def property(name: String): UndefOr[String] = js.native

def property(name: String, value: Any): B = ???
def property(name: String, value: Any): B = js.native

def property[T](name: String, provider: ElementIterator[A, T]): B = ???
def property[T](name: String, provider: ElementIterator[A, T]): B = js.native

def property(values: js.Dictionary[String]): B = ???
def property(values: js.Dictionary[String]): B = js.native
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import org.scalajs.dom.{ Node, NodeList }

trait SelectionSource[A <: Node, B <: Selection[A, B]] extends js.Object {

def select(selector: String): B = ???
def select(selector: String): B = js.native

def select(node: A): B = ???
def select(node: A): B = js.native

def selectAll(selector: String): B = ???
def selectAll(selector: String): B = js.native

def selectAll(nodes: js.Array[A]): B = ???
def selectAll(nodes: js.Array[A]): B = js.native

def selectAll(nodes: NodeList): B = ???
def selectAll(nodes: NodeList): B = js.native

def selection(): B
def selection(): B = js.native
}
Loading

0 comments on commit 47c211c

Please sign in to comment.