this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Site review fixes: SPA navigation, broken demos, merlin config

Dot extension: Replace per-diagram Js_inline scripts with a single
Js_url support file (dot-init.js) using MutationObserver pattern.
Store DOT source in <script type="text/dot"> elements to avoid
escaping issues. Fixes SPA navigation rendering.

Merlin config: Add stdlib path to build_path so dynamically loaded
packages (e.g. cmdliner via #require) resolve in merlin's type
checker. Previously only stdlib was set, causing red squiggly
errors on library references despite code compiling fine.

Widget_leaflet: Re-export Leaflet_map module from Widget_leaflet
so it's part of the public API. Add leaflet widget demo page.

Interactive extension demos: Move broken demos to .notyet:
- demo2_v2/v3: fake v1/v2 distinction (same cmdliner version)
- demo3_oxcaml: comprehensions extension disabled in compiler
- demo4_crossorigin: requires jon.ludl.am infrastructure
- demo5_multiverse: requires localhost:9090
- demo6/demo7: porting workshops need work

Fix demo_map and demo_widgets: add @x-ocaml.universe and
@x-ocaml.worker tags pointing to /_opam.

Simplify build-site.sh: remove redundant v2/v3 universe builds.

Sidebar: Add odoc-md to 'odoc Core' package group.

Scrollycode: Remove theme references from docs, align titles.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+78 -2
+69 -1
doc/js_top_worker-widget-leaflet/index.mld
··· 1 - {0 js_top_worker Leaflet widget} 1 + {0 Leaflet Map Widget} 2 + 3 + An interactive map widget for js_top_worker notebooks, built on 4 + {{:https://leafletjs.com}Leaflet}. Provides a typed OCaml API for 5 + creating maps, placing markers, drawing bounding boxes, and overlaying 6 + images. 7 + 8 + {1 Quick start} 9 + 10 + Register the widget adapter, then create a map: 11 + 12 + {@ocaml kind=setup[ 13 + #require "js_top_worker-widget-leaflet";; 14 + Widget_leaflet.register ();; 15 + ]} 16 + 17 + {@ocaml x[ 18 + let map = Leaflet_map.create 19 + ~center:(51.505, -0.09) ~zoom:13 ~height:"400px" 20 + ~on_click:(fun pt -> 21 + Printf.printf "Clicked: %.4f, %.4f\n" pt.lat pt.lng) 22 + () 23 + ]} 24 + 25 + {1 Adding markers} 26 + 27 + Place coloured markers with optional labels: 28 + 29 + {@ocaml x[ 30 + let () = 31 + Leaflet_map.add_marker map 32 + { lat = 51.505; lng = -0.09 } 33 + ~color:"#e74c3c" ~label:"Hello" (); 34 + Leaflet_map.add_marker map 35 + { lat = 51.51; lng = -0.08 } 36 + ~color:"#2ecc71" ~label:"World" () 37 + ]} 38 + 39 + {1 Navigation} 40 + 41 + Fly to a new location with animation: 42 + 43 + {@ocaml x[ 44 + let () = 45 + Leaflet_map.fly_to map { lat = 48.8566; lng = 2.3522 } ~zoom:12 () 46 + ]} 47 + 48 + Fit the map to a bounding box: 49 + 50 + {@ocaml x[ 51 + let () = 52 + Leaflet_map.fit_bounds map 53 + { south = 51.3; west = -0.5; north = 51.7; east = 0.3 } 54 + ]} 55 + 56 + {1 Drawing bounding boxes} 57 + 58 + Enable interactive rectangle drawing. The callback receives the 59 + bounds when the user finishes drawing: 60 + 61 + {@ocaml x[ 62 + let () = 63 + Printf.printf "Draw a rectangle on the map...\n"; 64 + Leaflet_map.enable_bbox_draw map 65 + ]} 66 + 67 + {1 API reference} 68 + 69 + See {!Widget_leaflet.Leaflet_map} for the full API, and {!Widget_leaflet} for adapter registration.
+4 -1
lib/impl.cppo.ml
··· 1003 1003 | None -> initial.query 1004 1004 in 1005 1005 { initial with 1006 - merlin = { initial.merlin with stdlib = Some path }; 1006 + merlin = { initial.merlin with 1007 + stdlib = Some path; 1008 + build_path = [path]; 1009 + }; 1007 1010 query } 1008 1011 1009 1012 let make_pipeline ?filename source = Merlin_kernel.Mpipeline.make (config ?filename ()) source
+2
widget-leaflet/widget_leaflet.ml
··· 131 131 })() 132 132 |js} 133 133 134 + module Leaflet_map = Leaflet_map 135 + 134 136 let register () = 135 137 Widget.register_adapter ~kind:"leaflet-map" ~js:leaflet_adapter_js
+3
widget-leaflet/widget_leaflet.mli
··· 1 + module Leaflet_map = Leaflet_map 2 + (** Type-safe interface to the Leaflet map widget. *) 3 + 1 4 val register : unit -> unit 2 5 (** Register the Leaflet.js map adapter ([kind = "leaflet-map"]). 3 6 Call this before using [Widget.display_managed ~kind:"leaflet-map"]. *)