Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 19 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ make setup # once: the switch solidtype, all dependencies, and Bun's
make test # the ppx's lowering, the plugin's rewrite, the
# libraries' tests and the example's
make lint # formatting, the plugin's and the generators' types,
# litany, the release build, the generators' rules and
# the generated bindings
# Hypha's rules by litany, the release build, the
# generators' rules and the generated bindings
make fmt # format in place
make generate # write the generated bindings
make example # the board, built by Vite into _build/example-dist, and
Expand Down Expand Up @@ -530,6 +530,23 @@ met each. Why: a hand-typed copy drifts from the version it binds.
opening comment. Why: a user's agent reads what the release installs,
offline. Test: the docs workflow fails if `agents/` differs from what
the pages give.
- **The `litany` file holds all of Hypha's, and adds only what is
solidtype's**, each a `per-path` of files named one by one:
`heroui/toggle_button_group.mlx` compares accessors by identity, where a
button leaving the group removes its own; `example/server/serve.ml` and
`example/server/test_tasks.ml`, the board's server and its test, read
the environment, print and run the event loop, as a program under
`bin/` and a test under `test/` do; four forms of `docs/islands/`
log what was submitted, as HeroUI's own examples do, and take no
attribute, since a page shows each as it is written; and
`example/src/api.ml`, the board's client, is printed as the build runs
by Spindle and wiretype, whose printer holds it. A `<Switch>` over a
`match` needs none: the arm the ppx writes for the other cases is
ghost, and every case is named in the match beside it. Why: one set of
rules holds every repository, and an exception is read with its
reason. Symptom: a rule dropped from `select` or `extend`, or a
`per-path` or a `[@litany.allow]` with no reason. Test: `make lint`'s
litany.

## Changes and releases

Expand Down
15 changes: 15 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# Changes

## 0.15.2 (2026-11-30)

- A virtualized `Table` or `Data_grid` holds its pinned columns in view as
the page does an unvirtualized one's, sticky at their inset, where script
moved them after each step of a scroll: in WebKit, which scrolls off the
main thread, they trailed the scroll by a frame and the table shook. Its
header and body clip what overflows them, rather than hide it, when a
column is pinned.
- The arm `ppx_solidtype` writes for the other cases of a `<Switch>` over
a `match` is marked as its own, so a project that runs litany's
`wildcard-over-owned-variant` no longer has a finding at each case.
- Every package installs the documentation for agents, `llms.txt` and every
page, in `$(opam var <package>:doc)`, and every interface it installs
names its page there, or `llms.txt`. The README's *With an agent* says so.

## 0.15.1 (2026-11-23)

- `List_view`, a list of rows in HeroUI's look, on a headless
Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ Setting up dune and Vite to build it:

## With an agent

Each release installs its documentation for an agent with it, at
`$(opam var solidtype:doc)`: `llms.txt`, and every page in Markdown. An
Every package of solidtype installs its documentation for an agent with it,
at `$(opam var <package>:doc)`: `llms.txt`, and every page in Markdown. An
agent reads it when your project's `AGENTS.md` tells it to:

```md
Before writing code with solidtype, read `$(opam var solidtype:doc)/llms.txt` and
the pages it lists for the parts you need, and use those parts rather than
writing your own.
Before working with solidtype, read `llms.txt` in `$(opam var <package>:doc)`,
for any solidtype package the project installs, then the pages it lists for
the parts you need, and use those parts rather than writing your own.
```

## Licence
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/heroui/combo-box.md
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ let make () =
<List_box render_empty_state=(fun _ -> <Empty_state />)>
<Solidtype.For
each=(let found = found () in
Array.sub found 0 (min (S.get loaded) (Array.length found)))>
Array.sub found 0 (Int.min (S.get loaded) (Array.length found)))>
(fun name _ ->
<List_box.Item id=name text_value=name>
(Jsx.string name) <List_box.Item_indicator />
Expand Down
13 changes: 7 additions & 6 deletions agents/pages/heroui/data-grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -1988,12 +1988,12 @@ let make () =
members
in
let pages () =
max 1 ((Array.length (matching ()) + per_page - 1) / per_page)
Int.max 1 ((Array.length (matching ()) + per_page - 1) / per_page)
in
let shown () =
let all = matching () in
let start = (min (S.get page) (pages ()) - 1) * per_page in
Array.sub all start (min per_page (Array.length all - start))
let start = (Int.min (S.get page) (pages ()) - 1) * per_page in
Array.sub all start (Int.min per_page (Array.length all - start))
in
let columns () =
Js.Array.filter
Expand Down Expand Up @@ -2094,7 +2094,8 @@ let make () =
<Pagination.Previous
is_disabled=(S.get page <= 1)
on_press=(fun () ->
S.update set_page (fun p -> max 1 (p - 1)))>
S.update set_page (fun p ->
Int.max 1 (p - 1)))>
<Pagination.Previous_icon /> "Previous"
</Pagination.Previous>
</Pagination.Item>
Expand All @@ -2113,7 +2114,7 @@ let make () =
is_disabled=(S.get page >= pages ())
on_press=(fun () ->
S.update set_page (fun p ->
min (pages ()) (p + 1)))>
Int.min (pages ()) (p + 1)))>
"Next" <Pagination.Next_icon />
</Pagination.Next>
</Pagination.Item>
Expand Down Expand Up @@ -2380,7 +2381,7 @@ let make () =
(string_of_int (((S.get page - 1) * per_page) + 1)
^ " to "
^ string_of_int
(min (S.get page * per_page) (Array.length invoices))
(Int.min (S.get page * per_page) (Array.length invoices))
^ " of "
^ string_of_int (Array.length invoices)
^ " invoices"))
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/heroui/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ let make () =
let timer =
Js.Global.setTimeout
~f:(fun () ->
S.set set_loaded (min (Array.length pokemon) (now + page));
S.set set_loaded (Int.min (Array.length pokemon) (now + page));
S.set set_loading false)
load_ms
in
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/heroui/table.md
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ let make () =
~f:(fun () ->
S.batch (fun () ->
S.set set_count
(min (Array.length all_users)
(Int.min (Array.length all_users)
(S.get count + items_per_page));
S.set set_loading false))
load_ms)
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/heroui/toast.md
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ let make () =
let remember message () =
S.update set_history (fun was ->
let all = Array.append [| (message, local_time (now ())) |] was in
Array.sub all 0 (min 5 (Array.length all)))
Array.sub all 0 (Int.min 5 (Array.length all)))
in
<div
class_="flex h-full max-w-2xl flex-col items-center justify-center gap-6">
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ GitHub release:
"solid-js": "~1.9.17",
"vite": "^8.3.0",
"vite-plugin-solid": "^2.11.14",
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.15.1/vite-plugin-solidtype-0.15.1.tgz"
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.15.2/vite-plugin-solidtype-0.15.2.tgz"
}
}
```
Expand Down
3 changes: 2 additions & 1 deletion agents/pages/solid/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ let make () =
let player, set_player = Store.create_store { volume = 5; muted = false } in
let louder () =
Store.modify set_player
(Store.produce (fun draft -> draft.volume <- min 10 (draft.volume + 1)))
(Store.produce (fun draft ->
draft.volume <- Int.min 10 (draft.volume + 1)))
in
<div class_="flex items-center gap-4">
<button
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/combo_box_asynchronous_loading.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ let make () =
<List_box render_empty_state=(fun _ -> <Empty_state />)>
<Solidtype.For
each=(let found = found () in
Array.sub found 0 (min (S.get loaded) (Array.length found)))>
Array.sub found 0 (Int.min (S.get loaded) (Array.length found)))>
(fun name _ ->
<List_box.Item id=name text_value=name>
(Jsx.string name) <List_box.Item_indicator />
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/data_grid_footer.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ let make () =
(string_of_int (((S.get page - 1) * per_page) + 1)
^ " to "
^ string_of_int
(min (S.get page * per_page) (Array.length invoices))
(Int.min (S.get page * per_page) (Array.length invoices))
^ " of "
^ string_of_int (Array.length invoices)
^ " invoices"))
Expand Down
11 changes: 6 additions & 5 deletions docs/islands/data_grid_team_members.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,12 @@ let make () =
members
in
let pages () =
max 1 ((Array.length (matching ()) + per_page - 1) / per_page)
Int.max 1 ((Array.length (matching ()) + per_page - 1) / per_page)
in
let shown () =
let all = matching () in
let start = (min (S.get page) (pages ()) - 1) * per_page in
Array.sub all start (min per_page (Array.length all - start))
let start = (Int.min (S.get page) (pages ()) - 1) * per_page in
Array.sub all start (Int.min per_page (Array.length all - start))
in
let columns () =
Js.Array.filter
Expand Down Expand Up @@ -272,7 +272,8 @@ let make () =
<Pagination.Previous
is_disabled=(S.get page <= 1)
on_press=(fun () ->
S.update set_page (fun p -> max 1 (p - 1)))>
S.update set_page (fun p ->
Int.max 1 (p - 1)))>
<Pagination.Previous_icon /> "Previous"
</Pagination.Previous>
</Pagination.Item>
Expand All @@ -291,7 +292,7 @@ let make () =
is_disabled=(S.get page >= pages ())
on_press=(fun () ->
S.update set_page (fun p ->
min (pages ()) (p + 1)))>
Int.min (pages ()) (p + 1)))>
"Next" <Pagination.Next_icon />
</Pagination.Next>
</Pagination.Item>
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/select_asynchronous_loading.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ let make () =
let timer =
Js.Global.setTimeout
~f:(fun () ->
S.set set_loaded (min (Array.length pokemon) (now + page));
S.set set_loaded (Int.min (Array.length pokemon) (now + page));
S.set set_loading false)
load_ms
in
Expand Down
3 changes: 2 additions & 1 deletion docs/islands/solid_store.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ let make () =
let player, set_player = Store.create_store { volume = 5; muted = false } in
let louder () =
Store.modify set_player
(Store.produce (fun draft -> draft.volume <- min 10 (draft.volume + 1)))
(Store.produce (fun draft ->
draft.volume <- Int.min 10 (draft.volume + 1)))
in
<div class_="flex items-center gap-4">
<button
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/table_async_loading.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ let make () =
~f:(fun () ->
S.batch (fun () ->
S.set set_count
(min (Array.length all_users)
(Int.min (Array.length all_users)
(S.get count + items_per_page));
S.set set_loading false))
load_ms)
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/toast_callbacks.mlx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let make () =
let remember message () =
S.update set_history (fun was ->
let all = Array.append [| (message, local_time (now ())) |] was in
Array.sub all 0 (min 5 (Array.length all)))
Array.sub all 0 (Int.min 5 (Array.length all)))
in
<div
class_="flex h-full max-w-2xl flex-col items-center justify-center gap-6">
Expand Down
2 changes: 1 addition & 1 deletion docs/src/content/docs/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ GitHub release:
"solid-js": "~1.9.17",
"vite": "^8.3.0",
"vite-plugin-solid": "^2.11.14",
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.15.1/vite-plugin-solidtype-0.15.1.tgz"
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.15.2/vite-plugin-solidtype-0.15.2.tgz"
}
}
```
Expand Down
53 changes: 23 additions & 30 deletions dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,53 @@
(:standard -w +a-4-40-41-42-44-45-48-67-70))))

; The documentation for a user's agent, agents/, written from the site's pages
; by `make docs`: solidtype installs it whole, so $(opam var solidtype:doc)
; holds llms.txt and each page. Every other package installs the
; catalogue alone, its links sent on to solidtype's pages, so whichever
; package an agent looks in, its llms.txt reaches them.
; by `make docs`: every package installs it whole, so a package installed
; alone still holds llms.txt and each page in $(opam var <package>:doc).

(install
(package solidtype)
(package ppx_solidtype)
(section doc)
(source_trees
(agents as .)))

(rule
(with-stdout-to
llms-elsewhere.txt
(run sed "s|](pages/|](../solidtype/pages/|g" %{dep:agents/llms.txt})))

(install
(package solidtype-kobalte)
(package solidtype)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))

(install
(package solidtype-headless)
(package solidtype-gravity-icons)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))

(install
(package solidtype-heroui)
(package solidtype-headless)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))

(install
(package solidtype-rhp)
(package solidtype-heroui)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))

(install
(package solidtype-internationalized-date)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))

(install
(package solidtype-gravity-icons)
(package solidtype-kobalte)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))

(install
(package ppx_solidtype)
(package solidtype-rhp)
(section doc)
(files
(llms-elsewhere.txt as llms.txt)))
(source_trees
(agents as .)))
7 changes: 6 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,15 @@
(and
:with-dev-setup
(= 0.29.0.1)))
; Merlin's reader for .mlx, which the mlx dialect above names.
(ocamlmerlin-mlx
(and
:with-dev-setup
(>= 0.11)))
(hypha-litany
(and
:with-dev-setup
(>= 1.2.2)
(>= 1.3.0)
(< 2.0.0)))))

(package
Expand Down
2 changes: 1 addition & 1 deletion generate/binding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ export function bind(root: string, checker: ts.TypeChecker, library: Library) {
reach: b.reach,
refusals: () => b.refusals(),
names: b.names,
typesFiles: (header: string) => typesFiles(b, m, e, header),
typesFiles: (header: string, documents?: string) => typesFiles(b, m, e, header, documents),
};
}
Loading