From 03765626cb85c384622edb2db009e7601a783311 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ulysse=20G=C3=A9rard?= Date: Wed, 21 Aug 2024 12:12:37 +0200 Subject: [PATCH] Move brr-lwd-ui to its own package --- bin/db_worker/dune | 2 +- bin/dune | 4 ++-- lib/brr_lwd_ui/dune | 6 ------ lib/db/dune | 2 +- lib/std/std.ml | 1 - vendor/brr_lwd_ui/.ocamlformat | 1 + {lib => vendor/brr_lwd_ui}/brrer/brrer.ml | 0 .../brr_lwd_ui}/brrer/dom_rect_read_only.ml | 0 .../brr_lwd_ui}/brrer/dom_rect_read_only.mli | 0 {lib => vendor/brr_lwd_ui}/brrer/dune | 2 +- .../brr_lwd_ui}/brrer/indexed_db.ml | 0 .../brr_lwd_ui}/brrer/indexed_db.mli | 0 .../brrer/intersection_observer.ml | 0 .../brrer/intersection_observer.mli | 0 .../brr_lwd_ui}/brrer/media_session.ml | 0 .../brr_lwd_ui}/brrer/media_session.mli | 0 .../brr_lwd_ui}/brrer/mutation_observer.ml | 0 .../brr_lwd_ui}/brrer/resize_observer.ml | 0 .../brr_lwd_ui}/brrer/resize_observer.mli | 0 {lib => vendor/brr_lwd_ui}/brrer/style.ml | 0 vendor/brr_lwd_ui/dune-project | 19 +++++++++++++++++++ vendor/brr_lwd_ui/examples/virtual-table/dune | 8 ++++++++ .../examples/virtual-table/index.html | 14 ++++++++++++++ .../brr_lwd_ui/examples/virtual-table/main.ml | 16 ++++++++++++++++ .../brr_lwd_ui/lib}/attrs.ml | 2 +- .../brr_lwd_ui/lib}/button.ml | 2 +- .../brr_lwd_ui/lib}/button.mli | 2 +- .../brr_lwd_ui/lib}/controlled_scroll.ml | 0 .../brr_lwd_ui/lib}/controlled_scroll.mli | 0 vendor/brr_lwd_ui/lib/dune | 6 ++++++ vendor/brr_lwd_ui/lib/encodings.ml | 13 +++++++++++++ .../brr_lwd_ui/lib}/forms/field.ml | 4 ++-- .../brr_lwd_ui/lib}/forms/field_checkboxes.ml | 3 +-- .../brr_lwd_ui/lib}/forms/field_select.ml | 2 +- .../brr_lwd_ui/lib}/forms/field_textinput.ml | 2 +- .../brr_lwd_ui/lib}/forms/form.ml | 2 +- .../brr_lwd_ui/lib}/forms/form.mli | 0 vendor/brr_lwd_ui/lib/import.ml | 16 ++++++++++++++++ .../brr_lwd_ui/lib}/persistent.ml | 2 +- .../brr_lwd_ui/lib}/persistent.mli | 0 .../brr_lwd_ui/lib/table}/FFCache.ml | 0 .../brr_lwd_ui/lib/table}/FFCache.mli | 0 .../brr_lwd_ui/lib}/table/schema.ml | 3 +-- .../brr_lwd_ui/lib}/table/table.ml | 0 .../brr_lwd_ui/lib}/table/virtual_table.ml | 4 ++-- .../brr_lwd_ui/lib}/translated.ml | 0 .../brr_lwd_ui/lib}/utils.ml | 2 +- 47 files changed, 112 insertions(+), 28 deletions(-) delete mode 100644 lib/brr_lwd_ui/dune create mode 100644 vendor/brr_lwd_ui/.ocamlformat rename {lib => vendor/brr_lwd_ui}/brrer/brrer.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/dom_rect_read_only.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/dom_rect_read_only.mli (100%) rename {lib => vendor/brr_lwd_ui}/brrer/dune (56%) rename {lib => vendor/brr_lwd_ui}/brrer/indexed_db.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/indexed_db.mli (100%) rename {lib => vendor/brr_lwd_ui}/brrer/intersection_observer.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/intersection_observer.mli (100%) rename {lib => vendor/brr_lwd_ui}/brrer/media_session.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/media_session.mli (100%) rename {lib => vendor/brr_lwd_ui}/brrer/mutation_observer.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/resize_observer.ml (100%) rename {lib => vendor/brr_lwd_ui}/brrer/resize_observer.mli (100%) rename {lib => vendor/brr_lwd_ui}/brrer/style.ml (100%) create mode 100644 vendor/brr_lwd_ui/dune-project create mode 100644 vendor/brr_lwd_ui/examples/virtual-table/dune create mode 100644 vendor/brr_lwd_ui/examples/virtual-table/index.html create mode 100644 vendor/brr_lwd_ui/examples/virtual-table/main.ml rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/attrs.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/button.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/button.mli (98%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/controlled_scroll.ml (100%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/controlled_scroll.mli (100%) create mode 100644 vendor/brr_lwd_ui/lib/dune create mode 100644 vendor/brr_lwd_ui/lib/encodings.ml rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/forms/field.ml (98%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/forms/field_checkboxes.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/forms/field_select.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/forms/field_textinput.ml (98%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/forms/form.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/forms/form.mli (100%) create mode 100644 vendor/brr_lwd_ui/lib/import.ml rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/persistent.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/persistent.mli (100%) rename {lib/std => vendor/brr_lwd_ui/lib/table}/FFCache.ml (100%) rename {lib/std => vendor/brr_lwd_ui/lib/table}/FFCache.mli (100%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/table/schema.ml (98%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/table/table.ml (100%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/table/virtual_table.ml (99%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/translated.ml (100%) rename {lib/brr_lwd_ui => vendor/brr_lwd_ui/lib}/utils.ml (99%) diff --git a/bin/db_worker/dune b/bin/db_worker/dune index 2cd8933..b455608 100644 --- a/bin/db_worker/dune +++ b/bin/db_worker/dune @@ -4,4 +4,4 @@ (js_of_ocaml (flags (:standard --no-inline --source-map-inline --pretty))) - (libraries js_of_ocaml brrer lib data_source db)) + (libraries js_of_ocaml brr-lwd-ui.brrer lib data_source db)) diff --git a/bin/dune b/bin/dune index 6d31a11..b9aa671 100644 --- a/bin/dune +++ b/bin/dune @@ -7,10 +7,10 @@ (flags :standard -open Brrer) (libraries js_of_ocaml - brrer lwd brr-lwd - ocamix.brr-lwd-ui + brr-lwd-ui + brr-lwd-ui.brrer lib data_source db diff --git a/lib/brr_lwd_ui/dune b/lib/brr_lwd_ui/dune deleted file mode 100644 index b766ce9..0000000 --- a/lib/brr_lwd_ui/dune +++ /dev/null @@ -1,6 +0,0 @@ -(include_subdirs unqualified) - -(library - (name brr_lwd_ui) - (public_name ocamix.brr-lwd-ui) - (libraries ocamix.std ocamix.brrer lwd brr-lwd base64)) diff --git a/lib/db/dune b/lib/db/dune index 026e007..41f21b5 100644 --- a/lib/db/dune +++ b/lib/db/dune @@ -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))) diff --git a/lib/std/std.ml b/lib/std/std.ml index 9941bf9..c4873fa 100644 --- a/lib/std/std.ml +++ b/lib/std/std.ml @@ -1,5 +1,4 @@ include ContainersLabels -module FFCache = FFCache module String = struct include String diff --git a/vendor/brr_lwd_ui/.ocamlformat b/vendor/brr_lwd_ui/.ocamlformat new file mode 100644 index 0000000..1dfb748 --- /dev/null +++ b/vendor/brr_lwd_ui/.ocamlformat @@ -0,0 +1 @@ +version=0.26.2 diff --git a/lib/brrer/brrer.ml b/vendor/brr_lwd_ui/brrer/brrer.ml similarity index 100% rename from lib/brrer/brrer.ml rename to vendor/brr_lwd_ui/brrer/brrer.ml diff --git a/lib/brrer/dom_rect_read_only.ml b/vendor/brr_lwd_ui/brrer/dom_rect_read_only.ml similarity index 100% rename from lib/brrer/dom_rect_read_only.ml rename to vendor/brr_lwd_ui/brrer/dom_rect_read_only.ml diff --git a/lib/brrer/dom_rect_read_only.mli b/vendor/brr_lwd_ui/brrer/dom_rect_read_only.mli similarity index 100% rename from lib/brrer/dom_rect_read_only.mli rename to vendor/brr_lwd_ui/brrer/dom_rect_read_only.mli diff --git a/lib/brrer/dune b/vendor/brr_lwd_ui/brrer/dune similarity index 56% rename from lib/brrer/dune rename to vendor/brr_lwd_ui/brrer/dune index 13e07c9..246b3e5 100644 --- a/lib/brrer/dune +++ b/vendor/brr_lwd_ui/brrer/dune @@ -1,4 +1,4 @@ (library (name brrer) - (public_name ocamix.brrer) + (public_name brr-lwd-ui.brrer) (libraries brr)) diff --git a/lib/brrer/indexed_db.ml b/vendor/brr_lwd_ui/brrer/indexed_db.ml similarity index 100% rename from lib/brrer/indexed_db.ml rename to vendor/brr_lwd_ui/brrer/indexed_db.ml diff --git a/lib/brrer/indexed_db.mli b/vendor/brr_lwd_ui/brrer/indexed_db.mli similarity index 100% rename from lib/brrer/indexed_db.mli rename to vendor/brr_lwd_ui/brrer/indexed_db.mli diff --git a/lib/brrer/intersection_observer.ml b/vendor/brr_lwd_ui/brrer/intersection_observer.ml similarity index 100% rename from lib/brrer/intersection_observer.ml rename to vendor/brr_lwd_ui/brrer/intersection_observer.ml diff --git a/lib/brrer/intersection_observer.mli b/vendor/brr_lwd_ui/brrer/intersection_observer.mli similarity index 100% rename from lib/brrer/intersection_observer.mli rename to vendor/brr_lwd_ui/brrer/intersection_observer.mli diff --git a/lib/brrer/media_session.ml b/vendor/brr_lwd_ui/brrer/media_session.ml similarity index 100% rename from lib/brrer/media_session.ml rename to vendor/brr_lwd_ui/brrer/media_session.ml diff --git a/lib/brrer/media_session.mli b/vendor/brr_lwd_ui/brrer/media_session.mli similarity index 100% rename from lib/brrer/media_session.mli rename to vendor/brr_lwd_ui/brrer/media_session.mli diff --git a/lib/brrer/mutation_observer.ml b/vendor/brr_lwd_ui/brrer/mutation_observer.ml similarity index 100% rename from lib/brrer/mutation_observer.ml rename to vendor/brr_lwd_ui/brrer/mutation_observer.ml diff --git a/lib/brrer/resize_observer.ml b/vendor/brr_lwd_ui/brrer/resize_observer.ml similarity index 100% rename from lib/brrer/resize_observer.ml rename to vendor/brr_lwd_ui/brrer/resize_observer.ml diff --git a/lib/brrer/resize_observer.mli b/vendor/brr_lwd_ui/brrer/resize_observer.mli similarity index 100% rename from lib/brrer/resize_observer.mli rename to vendor/brr_lwd_ui/brrer/resize_observer.mli diff --git a/lib/brrer/style.ml b/vendor/brr_lwd_ui/brrer/style.ml similarity index 100% rename from lib/brrer/style.ml rename to vendor/brr_lwd_ui/brrer/style.ml diff --git a/vendor/brr_lwd_ui/dune-project b/vendor/brr_lwd_ui/dune-project new file mode 100644 index 0000000..ff90e40 --- /dev/null +++ b/vendor/brr_lwd_ui/dune-project @@ -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)) diff --git a/vendor/brr_lwd_ui/examples/virtual-table/dune b/vendor/brr_lwd_ui/examples/virtual-table/dune new file mode 100644 index 0000000..eb1499b --- /dev/null +++ b/vendor/brr_lwd_ui/examples/virtual-table/dune @@ -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)) diff --git a/vendor/brr_lwd_ui/examples/virtual-table/index.html b/vendor/brr_lwd_ui/examples/virtual-table/index.html new file mode 100644 index 0000000..fadc6bf --- /dev/null +++ b/vendor/brr_lwd_ui/examples/virtual-table/index.html @@ -0,0 +1,14 @@ + + + + + OCAMIX + + + + + + + + + \ No newline at end of file diff --git a/vendor/brr_lwd_ui/examples/virtual-table/main.ml b/vendor/brr_lwd_ui/examples/virtual-table/main.ml new file mode 100644 index 0000000..29c5363 --- /dev/null +++ b/vendor/brr_lwd_ui/examples/virtual-table/main.ml @@ -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) diff --git a/lib/brr_lwd_ui/attrs.ml b/vendor/brr_lwd_ui/lib/attrs.ml similarity index 99% rename from lib/brr_lwd_ui/attrs.ml rename to vendor/brr_lwd_ui/lib/attrs.ml index 177b536..fa11f57 100644 --- a/lib/brr_lwd_ui/attrs.ml +++ b/vendor/brr_lwd_ui/lib/attrs.ml @@ -1,4 +1,4 @@ -open Std +open Import module Classes = struct include String.Set diff --git a/lib/brr_lwd_ui/button.ml b/vendor/brr_lwd_ui/lib/button.ml similarity index 99% rename from lib/brr_lwd_ui/button.ml rename to vendor/brr_lwd_ui/lib/button.ml index 9fd90da..7595ac2 100644 --- a/lib/brr_lwd_ui/button.ml +++ b/vendor/brr_lwd_ui/lib/button.ml @@ -1,4 +1,4 @@ -open! Std +open! Import open Brr open Brr_lwd diff --git a/lib/brr_lwd_ui/button.mli b/vendor/brr_lwd_ui/lib/button.mli similarity index 98% rename from lib/brr_lwd_ui/button.mli rename to vendor/brr_lwd_ui/lib/button.mli index aea1d55..4a7ceaa 100644 --- a/lib/brr_lwd_ui/button.mli +++ b/vendor/brr_lwd_ui/lib/button.mli @@ -1,4 +1,4 @@ -open! Std +open! Import open Brr open Brr_lwd diff --git a/lib/brr_lwd_ui/controlled_scroll.ml b/vendor/brr_lwd_ui/lib/controlled_scroll.ml similarity index 100% rename from lib/brr_lwd_ui/controlled_scroll.ml rename to vendor/brr_lwd_ui/lib/controlled_scroll.ml diff --git a/lib/brr_lwd_ui/controlled_scroll.mli b/vendor/brr_lwd_ui/lib/controlled_scroll.mli similarity index 100% rename from lib/brr_lwd_ui/controlled_scroll.mli rename to vendor/brr_lwd_ui/lib/controlled_scroll.mli diff --git a/vendor/brr_lwd_ui/lib/dune b/vendor/brr_lwd_ui/lib/dune new file mode 100644 index 0000000..0eb8ac8 --- /dev/null +++ b/vendor/brr_lwd_ui/lib/dune @@ -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)) diff --git a/vendor/brr_lwd_ui/lib/encodings.ml b/vendor/brr_lwd_ui/lib/encodings.ml new file mode 100644 index 0000000..12e6188 --- /dev/null +++ b/vendor/brr_lwd_ui/lib/encodings.ml @@ -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 diff --git a/lib/brr_lwd_ui/forms/field.ml b/vendor/brr_lwd_ui/lib/forms/field.ml similarity index 98% rename from lib/brr_lwd_ui/forms/field.ml rename to vendor/brr_lwd_ui/lib/forms/field.ml index aaf9cbc..cb1f6b5 100644 --- a/lib/brr_lwd_ui/forms/field.ml +++ b/vendor/brr_lwd_ui/lib/forms/field.ml @@ -1,5 +1,5 @@ -open! Std -open! Brrer.Brr +open! Import +open Brrer.Brr open! Brr_lwd module A = Attrs diff --git a/lib/brr_lwd_ui/forms/field_checkboxes.ml b/vendor/brr_lwd_ui/lib/forms/field_checkboxes.ml similarity index 99% rename from lib/brr_lwd_ui/forms/field_checkboxes.ml rename to vendor/brr_lwd_ui/lib/forms/field_checkboxes.ml index 6f28b8b..7d3c7e0 100644 --- a/lib/brr_lwd_ui/forms/field_checkboxes.ml +++ b/vendor/brr_lwd_ui/lib/forms/field_checkboxes.ml @@ -1,5 +1,4 @@ -open! Std -open! Brrer +open! Import open! Brr open! Brr_lwd diff --git a/lib/brr_lwd_ui/forms/field_select.ml b/vendor/brr_lwd_ui/lib/forms/field_select.ml similarity index 99% rename from lib/brr_lwd_ui/forms/field_select.ml rename to vendor/brr_lwd_ui/lib/forms/field_select.ml index fad2743..6e4519d 100644 --- a/lib/brr_lwd_ui/forms/field_select.ml +++ b/vendor/brr_lwd_ui/lib/forms/field_select.ml @@ -1,4 +1,4 @@ -open! Std +open! Import open! Brrer open! Brr open! Brr_lwd diff --git a/lib/brr_lwd_ui/forms/field_textinput.ml b/vendor/brr_lwd_ui/lib/forms/field_textinput.ml similarity index 98% rename from lib/brr_lwd_ui/forms/field_textinput.ml rename to vendor/brr_lwd_ui/lib/forms/field_textinput.ml index 2d2e1a7..d724731 100644 --- a/lib/brr_lwd_ui/forms/field_textinput.ml +++ b/vendor/brr_lwd_ui/lib/forms/field_textinput.ml @@ -1,4 +1,4 @@ -open! Std +open! Import open! Brrer open! Brr open! Brr_lwd diff --git a/lib/brr_lwd_ui/forms/form.ml b/vendor/brr_lwd_ui/lib/forms/form.ml similarity index 99% rename from lib/brr_lwd_ui/forms/form.ml rename to vendor/brr_lwd_ui/lib/forms/form.ml index fd1b3aa..ffd6da8 100644 --- a/lib/brr_lwd_ui/forms/form.ml +++ b/vendor/brr_lwd_ui/lib/forms/form.ml @@ -1,4 +1,4 @@ -open Std +open Import open Brrer.Brr open Brr_lwd module Field = Field diff --git a/lib/brr_lwd_ui/forms/form.mli b/vendor/brr_lwd_ui/lib/forms/form.mli similarity index 100% rename from lib/brr_lwd_ui/forms/form.mli rename to vendor/brr_lwd_ui/lib/forms/form.mli diff --git a/vendor/brr_lwd_ui/lib/import.ml b/vendor/brr_lwd_ui/lib/import.ml new file mode 100644 index 0000000..ec0d87c --- /dev/null +++ b/vendor/brr_lwd_ui/lib/import.ml @@ -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 diff --git a/lib/brr_lwd_ui/persistent.ml b/vendor/brr_lwd_ui/lib/persistent.ml similarity index 99% rename from lib/brr_lwd_ui/persistent.ml rename to vendor/brr_lwd_ui/lib/persistent.ml index 4552578..b826d7f 100644 --- a/lib/brr_lwd_ui/persistent.ml +++ b/vendor/brr_lwd_ui/lib/persistent.ml @@ -1,4 +1,4 @@ -open! Std +open Import module B64 = Base64 open! Brr module Storage = Brr_io.Storage diff --git a/lib/brr_lwd_ui/persistent.mli b/vendor/brr_lwd_ui/lib/persistent.mli similarity index 100% rename from lib/brr_lwd_ui/persistent.mli rename to vendor/brr_lwd_ui/lib/persistent.mli diff --git a/lib/std/FFCache.ml b/vendor/brr_lwd_ui/lib/table/FFCache.ml similarity index 100% rename from lib/std/FFCache.ml rename to vendor/brr_lwd_ui/lib/table/FFCache.ml diff --git a/lib/std/FFCache.mli b/vendor/brr_lwd_ui/lib/table/FFCache.mli similarity index 100% rename from lib/std/FFCache.mli rename to vendor/brr_lwd_ui/lib/table/FFCache.mli diff --git a/lib/brr_lwd_ui/table/schema.ml b/vendor/brr_lwd_ui/lib/table/schema.ml similarity index 98% rename from lib/brr_lwd_ui/table/schema.ml rename to vendor/brr_lwd_ui/lib/table/schema.ml index c955061..6175772 100644 --- a/lib/brr_lwd_ui/table/schema.ml +++ b/vendor/brr_lwd_ui/lib/table/schema.ml @@ -1,5 +1,4 @@ -open Std -open Brrer +open Import open Brr open Brr_lwd diff --git a/lib/brr_lwd_ui/table/table.ml b/vendor/brr_lwd_ui/lib/table/table.ml similarity index 100% rename from lib/brr_lwd_ui/table/table.ml rename to vendor/brr_lwd_ui/lib/table/table.ml diff --git a/lib/brr_lwd_ui/table/virtual_table.ml b/vendor/brr_lwd_ui/lib/table/virtual_table.ml similarity index 99% rename from lib/brr_lwd_ui/table/virtual_table.ml rename to vendor/brr_lwd_ui/lib/table/virtual_table.ml index 8411cbd..013a235 100644 --- a/lib/brr_lwd_ui/table/virtual_table.ml +++ b/vendor/brr_lwd_ui/lib/table/virtual_table.ml @@ -5,7 +5,7 @@ might be possible to optimize it (especially the "uniqueue" LRU thingy), but having too large a lwd_table is probably a hard limit. *) -open Std +open Import open Brrer open Brr open Brr_lwd @@ -141,7 +141,7 @@ let make (type data) ~(ui_table : Schema.fixed_row_height) (* todo: We do way too much work and rebuild the queue each time... it's very ineficient *) add ~fetch ~max_items:(4 * List.length visible_rows) visible_rows) - in + in Lwd.map2 total_items update ~f:(fun total_items update -> prepare ~total_items ~render; update) diff --git a/lib/brr_lwd_ui/translated.ml b/vendor/brr_lwd_ui/lib/translated.ml similarity index 100% rename from lib/brr_lwd_ui/translated.ml rename to vendor/brr_lwd_ui/lib/translated.ml diff --git a/lib/brr_lwd_ui/utils.ml b/vendor/brr_lwd_ui/lib/utils.ml similarity index 99% rename from lib/brr_lwd_ui/utils.ml rename to vendor/brr_lwd_ui/lib/utils.ml index c2a1596..04d3dbd 100644 --- a/lib/brr_lwd_ui/utils.ml +++ b/vendor/brr_lwd_ui/lib/utils.ml @@ -1,4 +1,4 @@ -open Std +open Import open Brr type 'a one_maybe_reactive = [ `P of 'a | `R of 'a Lwd.t ]