-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
47 changed files
with
112 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
(library | ||
(name db) | ||
(libraries std brrer yojson data_source worker_api) | ||
(libraries std brr-lwd-ui.brrer yojson data_source worker_api) | ||
(flags :standard -open Ppx_yojson_conv_lib.Yojson_conv.Primitives) | ||
(preprocess | ||
(pps ppx_yojson_conv))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
include ContainersLabels | ||
module FFCache = FFCache | ||
|
||
module String = struct | ||
include String | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
version=0.26.2 |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
(library | ||
(name brrer) | ||
(public_name ocamix.brrer) | ||
(public_name brr-lwd-ui.brrer) | ||
(libraries brr)) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(lang dune 3.11) | ||
|
||
(generate_opam_files) | ||
|
||
(source | ||
(github voodoos/brr-lwd-ui)) | ||
|
||
(license AGPL-3.0) | ||
|
||
(authors "Ulysse G\195\169rard") | ||
|
||
(maintainers "") | ||
|
||
(package | ||
(allow_empty) | ||
(name brr-lwd-ui) | ||
(synopsis "UI components for use with with brr_lwd") | ||
(description "A _really_ long description") | ||
(depends containers js_of_ocaml js_of_ocaml-ppx brr lwd brr-lwd)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
(executable | ||
(name main) | ||
(modes js) | ||
(promote (until-clean)) | ||
(js_of_ocaml | ||
(flags | ||
(:standard --no-inline))) | ||
(libraries js_of_ocaml lwd brr-lwd brr-lwd-ui)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<title>OCAMIX</title> | ||
<meta name="viewport" content="width=device-width, initial-scale=1" /> | ||
<link rel="stylesheet" href="./brr_lwd_ui.css"> | ||
</head> | ||
|
||
<body> | ||
<script src="main.bc.js"></script> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
open Brr | ||
open Brr_lwd | ||
|
||
let app = Elwd.div [ `P (El.txt' "toto") ] | ||
|
||
let _ = | ||
let on_load _ = | ||
let app = Lwd.observe @@ app in | ||
let on_invalidate _ = | ||
ignore @@ G.request_animation_frame | ||
@@ fun _ -> ignore @@ Lwd.quick_sample app | ||
in | ||
El.append_children (Document.body G.document) [ Lwd.quick_sample app ]; | ||
Lwd.set_on_invalidate app on_invalidate | ||
in | ||
Ev.listen Ev.dom_content_loaded on_load (Window.as_target G.window) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open Std | ||
open Import | ||
|
||
module Classes = struct | ||
include String.Set | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open! Std | ||
open! Import | ||
open Brr | ||
open Brr_lwd | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open! Std | ||
open! Import | ||
open Brr | ||
open Brr_lwd | ||
|
||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
(include_subdirs unqualified) | ||
|
||
(library | ||
(name brr_lwd_ui) | ||
(public_name brr-lwd-ui) | ||
(libraries containers containers-data brrer lwd brr-lwd base64)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
open Import | ||
|
||
let to_jstr t = Jv.repr t |> Brr.Json.encode | ||
let to_jv t = to_jstr t |> Jv.of_jstr | ||
|
||
let of_jstr jstr = | ||
match Brr.Json.decode jstr with | ||
| Ok v -> Ok (Obj.magic v) | ||
| Error err -> | ||
Brr.Console.error [ err ]; | ||
Error (`Msg "Failed to unmarshal data") | ||
|
||
let of_jv jv = Jv.to_jstr jv |> of_jstr |
4 changes: 2 additions & 2 deletions
4
lib/brr_lwd_ui/forms/field.ml → vendor/brr_lwd_ui/lib/forms/field.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
open! Std | ||
open! Brrer.Brr | ||
open! Import | ||
open Brrer.Brr | ||
open! Brr_lwd | ||
module A = Attrs | ||
|
||
|
3 changes: 1 addition & 2 deletions
3
lib/brr_lwd_ui/forms/field_checkboxes.ml → .../brr_lwd_ui/lib/forms/field_checkboxes.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
open! Std | ||
open! Brrer | ||
open! Import | ||
open! Brr | ||
open! Brr_lwd | ||
|
||
|
2 changes: 1 addition & 1 deletion
2
lib/brr_lwd_ui/forms/field_select.ml → vendor/brr_lwd_ui/lib/forms/field_select.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open! Std | ||
open! Import | ||
open! Brrer | ||
open! Brr | ||
open! Brr_lwd | ||
|
2 changes: 1 addition & 1 deletion
2
lib/brr_lwd_ui/forms/field_textinput.ml → ...r/brr_lwd_ui/lib/forms/field_textinput.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open! Std | ||
open! Import | ||
open! Brrer | ||
open! Brr | ||
open! Brr_lwd | ||
|
2 changes: 1 addition & 1 deletion
2
lib/brr_lwd_ui/forms/form.ml → vendor/brr_lwd_ui/lib/forms/form.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open Std | ||
open Import | ||
open Brrer.Brr | ||
open Brr_lwd | ||
module Field = Field | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
include ContainersLabels | ||
module Brr = Brrer.Brr | ||
|
||
(** [tee f x] applies [f] to [x] and returns [x] *) | ||
let tee f x = | ||
let () = f x in | ||
x | ||
|
||
module String = struct | ||
include String | ||
module Set = Set.Make (String) | ||
end | ||
|
||
module Lwd = struct | ||
include Lwd | ||
end |
2 changes: 1 addition & 1 deletion
2
lib/brr_lwd_ui/persistent.ml → vendor/brr_lwd_ui/lib/persistent.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open! Std | ||
open Import | ||
module B64 = Base64 | ||
open! Brr | ||
module Storage = Brr_io.Storage | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions
3
lib/brr_lwd_ui/table/schema.ml → vendor/brr_lwd_ui/lib/table/schema.ml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
open Std | ||
open Brrer | ||
open Import | ||
open Brr | ||
open Brr_lwd | ||
|
||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
open Std | ||
open Import | ||
open Brr | ||
|
||
type 'a one_maybe_reactive = [ `P of 'a | `R of 'a Lwd.t ] | ||
|