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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .impeccable/config.json

This file was deleted.

18 changes: 0 additions & 18 deletions .ocamlformat-ignore
Original file line number Diff line number Diff line change
@@ -1,20 +1,2 @@
src/html.mli
kobalte/solidtype_kobalte.ml
ppx/html_names.ml
ppx/kobalte_names.ml
kobalte/types.ml
kobalte/types.mli
kobalte/solidtype_kobalte.mli
heroui/styles.ml
heroui/styles.mli
rhp/solidtype_rhp.ml
rhp/solidtype_rhp.mli
rhp/types.ml
rhp/types.mli
ppx/rhp_names.ml
internationalized_date/solidtype_internationalized_date.ml
internationalized_date/solidtype_internationalized_date.mli
internationalized_date/types.ml
internationalized_date/types.mli
gravity_icons/*.ml*
test/gravity_icons/icons.mlx
1,161 changes: 477 additions & 684 deletions AGENTS.md

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,69 @@
# Changes

## 0.15.0 (2026-11-23)

- Breaking: what Kobalte types `any` is no longer a type its reader
chooses. `Types.ListState.collection`,
`Types.SingleSelectListState.collection` and `selected_item` give nodes of
`Types.Unknown.t`, which nothing reads, where they gave `_`; and the node
a `render_item` or `render_section` given to `ComboboxContextValue.make`
or `SelectContextValue.make` takes is one too. A node's `key`,
`text_value` and the rest read as before; its `raw_value` is the caller's
own data only where the caller gave it, by `'data`.
- Breaking: a `bigint` is `Js.Bigint.t`. `Types.NumberFormat.format_to_parts`
takes one where it took `Types.DateTimeFormat_FormatRange.t`, a module
that bound a bigint's methods under the name of where it was first met;
it and `Types.BigIntToLocaleStringOptions` are gone.
- Breaking: a type's module in `Types` is never numbered. One with no name
in its library is named by the path of names to it: what a function
gives by the function, what it takes by the parameter's name after it.
rhp's `Types.Bins` is what `bins` gives, which was `Types.Bins2`, and its
options are `Types.Bins_Options`; `Types.Every`, `Types.Density` and
`Types.Animated` are `Types.Every_Options`, `Types.Density_Options` and
`Types.Animated_Settings`. @internationalized/date's
`Types.ZonedDateTime_Set` is `Types.ZonedDateTime_Set_Fields`. Kobalte's
`Types.GetValueLabelParams` and `Types.GetValueLabelParams2` are
`Types.Meter_GetValueLabelParams` and `Types.Slider_GetValueLabelParams`;
`Types.Pagination_Root_ItemComponent` and `Types.Context_Provider` end in
`_Props`, `Types.Color_GetColorSpaceAxes` in `_XyChannels`,
`Types.ColorAreaContextValue_OnDrag`, `Types.ColorWheelContextValue_OnDrag`
and `Types.SliderContextValue_OnSlideMove` in `_Deltas`, and
`Types.ColorAreaState_SetThumbPercent` and `_SetThumbValue` in `_Value`.
`Types.AlertDialog_Portal_Ref_element_` and its `2`, which nothing named,
are gone.
- Fixed: in the reference of `solidtype-kobalte`, `solidtype-rhp` and
`solidtype-internationalized-date`, a field's or a function's
description is on it. It was written as a line above the declaration,
which OCaml read as the one before's, so 167 of Kobalte's types alone
showed the next field's description.
- Fixed: a function a Kobalte object may not have --
`Types.KeyboardDelegate.get_first_key` and its kind, a
`Create...Props`'s `filter` and handlers -- is called with the arguments
it is given, whatever JavaScript's count of its parameters. Melange
called it by that count, so one with an optional parameter was applied
to too few arguments, and what it gave back called with the rest.
- Fixed: a function of two or more arguments given in JSX runs, however
it takes them. `fun a b -> ...` and a function that takes `a`, works,
and gives a function of `b` are one type, and only the first reached
JavaScript as a function of two: the second, given to `For`, `Index`, a
component's function prop, or Kobalte's `on_open_change`, compiled and
was called wrong, or never. Whoever receives one now applies it as
OCaml applies a function; nothing changes in what is written. The same
holds of a function given to a generated constructor, a translations
object's `color_name`.
- Breaking: `For.component` and `Index.component` are components of their
own over Solid's, `'a Props.t Jsx.component`, where they were Solid's,
`unit Jsx.component`; as a tag, `<For>`, they are written as before.
- Breaking: `Types.Toast_Toaster.make` is gone: the toaster is Kobalte's
to make.
- `Solidtype.Arity`, which a binding gives a JavaScript component's
function props of several arguments through.
- `vite-plugin-solidtype` fails the build, where the marker is written, on
a marker it cannot read and on one left outside an element, which
reached the browser as a name not defined; and it leaves a function the
ppx bound where it is when moving it to its use would change a name it
reads.

## 0.14.0 (2026-11-22)

- Breaking: a value that may be empty is given as `Js.Null.t`, never
Expand Down
16 changes: 4 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SWITCH ?= solidtype
OPAM = opam exec --switch=$(SWITCH) --
DOCS_PORT ?= 4321
GENERATORS = html kobalte heroui rhp internationalized_date gravity_icons
REFERENCE = solidtype solidtype-kobalte solidtype-headless solidtype-heroui solidtype-rhp solidtype-internationalized-date solidtype-gravity-icons ppx_solidtype odoc.support

.DEFAULT_GOAL := help
Expand Down Expand Up @@ -37,12 +38,8 @@ lint: node_modules ## check formatting, types, litany, the release build and bin
$(OPAM) litany check
bun run tsc -p vite-plugin
bun run tsc -p generate
$(OPAM) bun generate/html.ts --check
$(OPAM) bun generate/kobalte.ts --check
$(OPAM) bun generate/heroui.ts --check
$(OPAM) bun generate/rhp.ts --check
$(OPAM) bun generate/internationalized_date.ts --check
$(OPAM) bun generate/gravity_icons.ts --check
$(OPAM) bun test generate/test
@for g in $(GENERATORS); do echo "generate/$$g.ts --check"; $(OPAM) bun generate/$$g.ts --check || exit 1; done

fmt: ## format the code
$(OPAM) dune fmt
Expand Down Expand Up @@ -75,12 +72,7 @@ docs-serve: docs ## serve the built documentation site
cd docs && bun --bun astro preview --open --port $(DOCS_PORT)

generate: node_modules ## write the generated bindings
$(OPAM) bun generate/html.ts
$(OPAM) bun generate/kobalte.ts
$(OPAM) bun generate/heroui.ts
$(OPAM) bun generate/rhp.ts
$(OPAM) bun generate/internationalized_date.ts
$(OPAM) bun generate/gravity_icons.ts
@for g in $(GENERATORS); do echo "generate/$$g.ts"; $(OPAM) bun generate/$$g.ts || exit 1; done

release: node_modules ## tag VERSION and make its release
rm -rf _build/plugin && bun vite-plugin/pack.ts $(VERSION) _build/plugin
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.14.0/vite-plugin-solidtype-0.14.0.tgz"
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.15.0/vite-plugin-solidtype-0.15.0.tgz"
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/rhp/area.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ from the middle of the band.
```ocaml title="rhp_area_violin.mlx"
module Area = Solidtype_rhp.Area
module Chart = Solidtype_rhp.Chart
module Density = Solidtype_rhp.Types.Density
module Density = Solidtype_rhp.Types.Density_Options
module Jsx = Solidtype.Jsx
module Label = Solidtype_rhp.Label
module Plot = Solidtype_rhp.Plot
Expand Down
2 changes: 1 addition & 1 deletion agents/pages/rhp/gallery.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ frame, since a path's points moved by CSS would flatten its rim.
Original rhp documentation: [Pie](https://rhp.vercel.app/examples/pie-chart/).

```ocaml title="rhp_pie.mlx"
module Animated = Solidtype_rhp.Types.Animated
module Animated = Solidtype_rhp.Types.Animated_Settings
module Bar = Solidtype_rhp.Bar
module Chart = Solidtype_rhp.Chart
module Color = Solidtype_rhp.Color
Expand Down
10 changes: 5 additions & 5 deletions agents/pages/rhp/helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ let make () =

```ocaml title="rhp_histogram.mlx"
module Bar = Solidtype_rhp.Bar
module Bins = Solidtype_rhp.Types.Bins
module Bins = Solidtype_rhp.Types.Bins_Options
module Chart = Solidtype_rhp.Chart
module Jsx = Solidtype.Jsx
module Label = Solidtype_rhp.Label
module Plot = Solidtype_rhp.Plot
module Range = Solidtype_rhp.Types.Bins2
module Range = Solidtype_rhp.Types.Bins
module Row = Solidtype_rhp.Row
module Slat = Solidtype_rhp.Slat

Expand Down Expand Up @@ -245,11 +245,11 @@ let make () =
| `running` | `float option array -> Solidtype_rhp.stack` | Running totals, for a waterfall |
| `shares` | `?total:float -> float option array -> float option array` | Each value's share of the sum, scaled to `total`, 100 by default |
| `summary` | `float option array -> Types.Summary.t` | Quartiles, median, whiskers, mean and outliers |
| `bins` | `float option array -> ?options:Types.Bins.t -> unit -> Types.Bins2.t` | Histogram bins, `x0`, `x1` and `tally` |
| `density` | `float option array -> ?options:Types.Density.t -> unit -> (float * float) array` | A kernel density estimate, for an `Area` |
| `bins` | `float option array -> ?options:Types.Bins_Options.t -> unit -> Types.Bins.t` | Histogram bins, `x0`, `x1` and `tally` |
| `density` | `float option array -> ?options:Types.Density_Options.t -> unit -> (float * float) array` | A kernel density estimate, for an `Area` |
| `extent` | `float option array -> float * float` | The smallest and the largest |
| `nice` | `float -> float -> ?count:float -> unit -> Types.Nice.t` | A round scale over a range |
| `every` | `float -> ?options:Types.Every.t -> unit -> (float * float -> float array)` | Ticks at every multiple of a step |
| `every` | `float -> ?options:Types.Every_Options.t -> unit -> (float * float -> float array)` | Ticks at every multiple of a step |
| `series` | `?n:int -> unit -> 'row Row.t -> Color.t` | The theme's series colours through the rows |
| `cycle` | `'a array -> 'row Row.t -> 'a` | A list repeated over the rows |

Expand Down
2 changes: 1 addition & 1 deletion agents/pages/rhp/scale.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ one saying the unit.
module Bar = Solidtype_rhp.Bar
module Chart = Solidtype_rhp.Chart
module Either = Solidtype_rhp.Types.Either
module Every = Solidtype_rhp.Types.Every
module Every = Solidtype_rhp.Types.Every_Options
module Jsx = Solidtype.Jsx
module Label = Solidtype_rhp.Label
module Plot = Solidtype_rhp.Plot
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/rhp_area_violin.mlx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module Area = Solidtype_rhp.Area
module Chart = Solidtype_rhp.Chart
module Density = Solidtype_rhp.Types.Density
module Density = Solidtype_rhp.Types.Density_Options
module Jsx = Solidtype.Jsx
module Label = Solidtype_rhp.Label
module Plot = Solidtype_rhp.Plot
Expand Down
4 changes: 2 additions & 2 deletions docs/islands/rhp_histogram.mlx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module Bar = Solidtype_rhp.Bar
module Bins = Solidtype_rhp.Types.Bins
module Bins = Solidtype_rhp.Types.Bins_Options
module Chart = Solidtype_rhp.Chart
module Jsx = Solidtype.Jsx
module Label = Solidtype_rhp.Label
module Plot = Solidtype_rhp.Plot
module Range = Solidtype_rhp.Types.Bins2
module Range = Solidtype_rhp.Types.Bins
module Row = Solidtype_rhp.Row
module Slat = Solidtype_rhp.Slat

Expand Down
2 changes: 1 addition & 1 deletion docs/islands/rhp_pie.mlx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Animated = Solidtype_rhp.Types.Animated
module Animated = Solidtype_rhp.Types.Animated_Settings
module Bar = Solidtype_rhp.Bar
module Chart = Solidtype_rhp.Chart
module Color = Solidtype_rhp.Color
Expand Down
2 changes: 1 addition & 1 deletion docs/islands/rhp_scale_axis.mlx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Bar = Solidtype_rhp.Bar
module Chart = Solidtype_rhp.Chart
module Either = Solidtype_rhp.Types.Either
module Every = Solidtype_rhp.Types.Every
module Every = Solidtype_rhp.Types.Every_Options
module Jsx = Solidtype.Jsx
module Label = Solidtype_rhp.Label
module Plot = Solidtype_rhp.Plot
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.14.0/vite-plugin-solidtype-0.14.0.tgz"
"vite-plugin-solidtype": "https://github.com/hyphatech/solidtype/releases/download/0.15.0/vite-plugin-solidtype-0.15.0.tgz"
}
}
```
Expand Down
6 changes: 3 additions & 3 deletions docs/src/content/docs/rhp/helpers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ after.
| `running` | `float option array -> Solidtype_rhp.stack` | Running totals, for a waterfall |
| `shares` | `?total:float -> float option array -> float option array` | Each value's share of the sum, scaled to `total`, 100 by default |
| `summary` | `float option array -> Types.Summary.t` | Quartiles, median, whiskers, mean and outliers |
| `bins` | `float option array -> ?options:Types.Bins.t -> unit -> Types.Bins2.t` | Histogram bins, `x0`, `x1` and `tally` |
| `density` | `float option array -> ?options:Types.Density.t -> unit -> (float * float) array` | A kernel density estimate, for an `Area` |
| `bins` | `float option array -> ?options:Types.Bins_Options.t -> unit -> Types.Bins.t` | Histogram bins, `x0`, `x1` and `tally` |
| `density` | `float option array -> ?options:Types.Density_Options.t -> unit -> (float * float) array` | A kernel density estimate, for an `Area` |
| `extent` | `float option array -> float * float` | The smallest and the largest |
| `nice` | `float -> float -> ?count:float -> unit -> Types.Nice.t` | A round scale over a range |
| `every` | `float -> ?options:Types.Every.t -> unit -> (float * float -> float array)` | Ticks at every multiple of a step |
| `every` | `float -> ?options:Types.Every_Options.t -> unit -> (float * float -> float array)` | Ticks at every multiple of a step |
| `series` | `?n:int -> unit -> 'row Row.t -> Color.t` | The theme's series colours through the rows |
| `cycle` | `'a array -> 'row Row.t -> 'a` | A list repeated over the rows |

Expand Down
Loading