Skip to content

Commit

Permalink
v0.17~preview.129.15+205
Browse files Browse the repository at this point in the history
  • Loading branch information
public-release committed Mar 19, 2024
1 parent da582b1 commit 406529e
Show file tree
Hide file tree
Showing 213 changed files with 16,304 additions and 10,427 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Bonsai is a library for building interactive browser-based UI.

The [Getting Started with Bonsai](./docs/getting_started/open_source/index.md)
The [Getting Started with Bonsai](./docs/getting_started/index.md)
guide is good if you're new to web development entirely or just want to see a
walkthrough of a couple simple example apps.

Expand All @@ -14,4 +14,3 @@ directory.

Documentation can be found in the [docs](./docs) directory, and API documentation
can be found in [src/bonsai.mli](./src/bonsai.mli).

2 changes: 1 addition & 1 deletion bench/example/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(executables
(modes byte exe)
(names main)
(libraries bonsai bonsai_bench incr_dom.javascript_profiling js_of_ocaml)
(libraries bonsai bonsai_bench)
(preprocess
(pps ppx_bonsai ppx_jane js_of_ocaml-ppx)))
3 changes: 2 additions & 1 deletion bindings/dygraph/src/data.ml
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,6 @@ let%expect_test "test [create_from_independent_time_series]" =
("1970-01-01 00:00:00Z" ((1) ()))
("1970-01-02 00:00:00Z" (() (2)))
("1970-01-03 00:00:00Z" ((3) (3)))
("1970-01-04 00:00:00Z" (() (4))) |}]
("1970-01-04 00:00:00Z" (() (4)))
|}]
;;
22 changes: 15 additions & 7 deletions bindings/dygraph/src/graph.ml
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,30 @@ let getArea : t -> Area.t =
fun (x13 : t) -> Area.t_of_js (Ojs.call (t_to_js x13) "getArea" [||])
;;

let isZoomed : t -> bool =
fun (x14 : t) -> Ojs.bool_of_js (Ojs.call (t_to_js x14) "isZoomed" [||])
let isZoomed : t -> [ `x | `y ] -> bool =
fun (x15 : t) (x14 : [ `x | `y ]) ->
Ojs.bool_of_js
(Ojs.call
(t_to_js x15)
"isZoomed"
[| (match x14 with
| `x -> Ojs.string_to_js "x"
| `y -> Ojs.string_to_js "y")
|])
;;

let resetZoom : t -> unit =
fun (x15 : t) -> ignore (Ojs.call (t_to_js x15) "resetZoom" [||])
fun (x16 : t) -> ignore (Ojs.call (t_to_js x16) "resetZoom" [||])
;;

let primary_context : t -> Canvas_rendering_context_2D.t =
fun (x16 : t) ->
Canvas_rendering_context_2D.t_of_js (Ojs.get_prop_ascii (t_to_js x16) "hidden_ctx_")
fun (x17 : t) ->
Canvas_rendering_context_2D.t_of_js (Ojs.get_prop_ascii (t_to_js x17) "hidden_ctx_")
;;

let overlay_context : t -> Canvas_rendering_context_2D.t =
fun (x17 : t) ->
Canvas_rendering_context_2D.t_of_js (Ojs.get_prop_ascii (t_to_js x17) "canvas_ctx_")
fun (x18 : t) ->
Canvas_rendering_context_2D.t_of_js (Ojs.get_prop_ascii (t_to_js x18) "canvas_ctx_")
;;

let toDomCoords ?(axis = `y1) ~(x : float) ~(y : float) (t : t) =
Expand Down
2 changes: 1 addition & 1 deletion bindings/dygraph/src/graph.mli
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ val resize : t -> unit [@@js.call]
val resize_explicit : t -> width:int -> height:int -> unit [@@js.call "resize"]
val updateOptions : t -> Update_options.t -> unit [@@js.call]
val getArea : t -> Area.t [@@js.call]
val isZoomed : t -> bool [@@js.call]
val isZoomed : t -> ([ `x | `y ][@js.enum]) -> bool [@@js.call]
val resetZoom : t -> unit [@@js.call]

(** [primary_context] is the rendering context to which Dygraphs draws data points and
Expand Down
6 changes: 4 additions & 2 deletions bonsai.opam
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ depends: [
"patdiff"
"polling_state_rpc"
"ppx_css"
"ppx_diff"
"ppx_here"
"ppx_jane"
"ppx_let"
"ppx_pattern_bind"
"ppx_quick_test"
"ppx_typed_fields"
"profunctor"
"record_builder"
Expand All @@ -51,8 +53,8 @@ depends: [
"cohttp-async" {>= "2.5.7" & < "3.0.0" | >= "5.1.1" & < "6.0.0"}
"dune" {>= "2.0.0"}
"gen_js_api" {>= "1.0.8"}
"js_of_ocaml" {>= "5.1.1"}
"js_of_ocaml-ppx" {>= "5.1.1"}
"js_of_ocaml" {>= "5.1.1" & < "5.7.0"}
"js_of_ocaml-ppx" {>= "5.1.1" & < "5.7.0"}
"ocaml-embed-file"
"ppxlib" {>= "0.28.0"}
"re" {>= "1.8.0"}
Expand Down
Empty file removed docs/blogs/dune
Empty file.
Loading

0 comments on commit 406529e

Please sign in to comment.