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
31 changes: 20 additions & 11 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ headless/ solidtype-headless: the components Kobalte lacks, one
date_picker a date field whose group's trigger opens a popover
of a calendar choosing its date or its range, a time
kept, as React Stately's pickers keep them
command a search that filters a menu of commands, the focus
kept in the search while the keys move through those
shown, as React Aria's autocomplete filters its menu
color_picker one colour its parts share, as React Aria's: the colour
components below read it, given no value of their own;
it draws nothing
Expand Down Expand Up @@ -150,7 +153,7 @@ heroui/ solidtype-heroui: HeroUI's components ported onto
selection_indicator
what a tab's and a segment's indicator share: drawn in
the selected item, it starts where the last one was
segment trend_chip text_shimmer number_stepper
segment trend_chip text_shimmer number_stepper command
components HeroUI ships no stylesheet for, made as
every port is: their look a stylesheet each
table.css what HeroUI's table stylesheet does not draw: a column
Expand Down Expand Up @@ -534,14 +537,18 @@ break.
its component and its check: its own options, then its children by
kind, then its element's attributes' `check`, an `external` nothing
calls. Its options map as an element's attributes do, and further: a
number is a `float`, since a slider's value is fractional; `null` is
`Js.Nullable.t`, since Kobalte reads `undefined` as uncontrolled and
`null` as controlled and empty; `undefined` is absence for an optional
prop, an optional argument, `?name`, then `()`, for a function the user
calls, and an `option` anywhere else; members of different JavaScript
kinds are `Types.Either.t`, built by `left` and `right`, which is each
value as it is; an option accessor that takes a key or a function
takes the function, and one that takes only a key,
number is a `float`, since a slider's value is fractional; `T | null`
given to Kobalte -- an option, an argument, what a callback returns -- is
`Js.Null.t`, since Kobalte reads `undefined` as uncontrolled and `null`
as controlled and empty, and `Js.Null.t` cannot hold `undefined`, so an
`option` becomes one only by `Js.Null.fromOption`, whose `None` is
`null`; read from Kobalte, or `T | null | undefined` given, it is
`Js.Nullable.t`, which takes whatever JavaScript holds; `undefined` is
absence for an optional prop, an optional argument, `?name`, then `()`,
for a function the user calls, and an `option` anywhere else; members
of different JavaScript kinds are `Types.Either.t`, built by `left` and
`right`, which is each value as it is; an option accessor that takes a
key or a function takes the function, and one that takes only a key,
`optionGroupChildren`, a `string`; a root whose value turns on
`multiple` is two modules, `Root` and `Root_multiple`; a named object
type is a module of `Types`, with a getter per field, a curried
Expand All @@ -564,8 +571,10 @@ break.
hooks its lists are made of are, from its root, as `Selection`. Why:
Kobalte's parts are hundreds, and a binding by hand would be a second
copy of its types; a component Kobalte lacks is made of its hooks. Test:
`make lint` runs the generator with `--check`, and
`test/kobalte/selection_test.mlx` makes a list of them.
`make lint` runs the generator with `--check`,
`test/kobalte/selection_test.mlx` makes a list of them, and
`test/does_not_compile.t` refuses `Js.Nullable.fromOption` where
`T | null` is given.
- **HeroUI's variant functions are generated from @heroui/styles'
declarations**, by `generate/heroui.ts` into `heroui/styles.ml` and its
`.mli`, on the same core as Kobalte's: a module per function,
Expand Down
34 changes: 34 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# Changes

## 0.14.0 (2026-11-22)

- Breaking: a value that may be empty is given as `Js.Null.t`, never
`Js.Nullable.t`: a Kobalte prop or argument TypeScript types `T | null`,
and the value of `Date_field`, `Time_field`, `Date_picker`,
`Date_range_picker`, `Calendar`, `Range_calendar` and `Color_field`, in
`solidtype-headless` and `solidtype-heroui`. `Js.Null.fromOption None` is
`null`, controlled and empty; `Js.Nullable.fromOption None`, which the
documented examples wrote, is the `undefined` a component reads as no
value given, and no longer compiles there. What Kobalte tells, an
`on_change`'s argument, stays `Js.Nullable.t`.
- Breaking: `Radio_group`'s `value` is a `string Js.Null.t`, and `null`
controls it with none chosen, as React's does.
- `Command`, a command palette in HeroUI's look with a stylesheet of its own:
a search in a dialog that filters a menu of commands, kept or controlled,
by its text or a `filter` given. The focus stays in the search while the
arrows move through the commands shown, wrapping, and Enter or a press
runs one; typing focuses the first command shown, and Escape empties the
search before it closes the palette. Groups hide with their commands, a
separator with nothing to part, and the list draws `render_empty_state`
while it shows none; `sm`, `md` and `lg` sizes, and opaque, blur and
transparent backdrops. `Solidtype_headless.Command` is the palette itself,
of Kobalte's selection hooks, its words React Aria's in 34 locales.
- A `Date_picker`, `Date_range_picker`, `Calendar` or `Range_calendar` set
to `null` after a date was typed or chosen is empty, where it kept the
last date and sent it with a form.
- `Number_field` set to `nan` is empty, as React's is, where it kept the
last number shown; `Solidtype_headless.Number_field` fixes Kobalte's. Its
`on_change` tells typed text once Enter or a focus that leaves commits
it, as React's does, where it told every key.
- A `Date_range_picker`'s arrows, Backspace and a segment typed whole move
between its start and its end, as React's do; so does
`Solidtype_headless.Date_field.Root_range`'s.

## 0.13.0 (2026-11-22)

- Breaking: the skill, `skills/solidtype`, is no longer installed. The
Expand Down
1 change: 1 addition & 0 deletions agents/llms.txt
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ Each component's page gives HeroUI's own examples in OCaml, and a table of its p
- [AvatarGroup](pages/heroui/avatar-group.md): Display a stacked or grid group of avatars with overflow counting.
- [Accordion](pages/heroui/accordion.md): A collapsible content panel for organizing information in a compact space.
- [Breadcrumbs](pages/heroui/breadcrumbs.md): Navigation breadcrumbs showing the current page's location within a hierarchy.
- [Command](pages/heroui/command.md): A command palette, a search that filters a menu of commands in a dialog.
- [Disclosure](pages/heroui/disclosure.md): A disclosure is a collapsible section with a header containing a heading and a trigger button, and a panel that wraps the content.
- [DisclosureGroup](pages/heroui/disclosure-group.md): Container that manages multiple Disclosure items with coordinated expanded states.
- [Link](pages/heroui/link.md): A styled anchor component for navigation with built-in icon support.
Expand Down
6 changes: 3 additions & 3 deletions agents/pages/heroui/calendar.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ let make () =
<Calendar
aria_label="Event date"
focused_value=(S.get focused)
value=(Js.Nullable.fromOption (S.get value))
value=(Js.Null.fromOption (S.get value))
on_change=(fun d -> S.set set_value (Some d))
on_focus_change=(S.set set_focused)>
<Calendar.Header>
Expand Down Expand Up @@ -834,7 +834,7 @@ let make () =
aria_label="Booking date"
is_date_unavailable
min_value=(D.today (D.get_local_time_zone ()))
value=(Js.Nullable.fromOption (S.get selected))
value=(Js.Null.fromOption (S.get selected))
on_change=(fun d -> S.set set_selected (Some d))>
<Calendar.Header>
<Calendar.Heading />
Expand Down Expand Up @@ -1034,7 +1034,7 @@ Each prop beside the name HeroUI's React component gives it.

| React | solidtype | Type | Default | Description |
|---|---|---|---|---|
| `value` | `value` | `CalendarDate.t Js.Nullable.t` | | Controlled selected date; null controls it empty |
| `value` | `value` | `CalendarDate.t Js.Null.t` | | Controlled selected date; null controls it empty |
| `defaultValue` | `default_value` | `CalendarDate.t` | | Initial selected date (uncontrolled) |
| `onChange` | `on_change` | `CalendarDate.t -> unit` | | Called when a date is chosen |
| `selectionMode` | — | | | `Calendar.Multiple` chooses several dates |
Expand Down
12 changes: 6 additions & 6 deletions agents/pages/heroui/color-field.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ let make () =
<Color_field
class_="w-[280px]"
name="color"
value=(Js.Nullable.fromOption (S.get color))
value=(Js.Null.fromOption (S.get color))
on_change=(S.set set_color)>
<Label>"Color"</Label>
<Color_field.Group>
Expand Down Expand Up @@ -338,7 +338,7 @@ let make () =
class_="w-[100px]"
color_space=`hsl
name
value=(Js.Nullable.fromOption (S.get color))
value=(Js.Null.fromOption (S.get color))
on_change=(S.set set_color)>
<Label>(Jsx.string label)</Label>
<Color_field.Group>
Expand Down Expand Up @@ -404,7 +404,7 @@ let make () =
<Color_field
class_="w-[280px]"
name="color"
value=(Js.Nullable.fromOption (S.get value))
value=(Js.Null.fromOption (S.get value))
on_change=(S.set set_value)>
<Label>"Color"</Label>
<Color_field.Group>
Expand Down Expand Up @@ -491,7 +491,7 @@ let make () =
is_required=true
class_="w-full"
name="brand-color"
value=(Js.Nullable.fromOption (S.get value))
value=(Js.Null.fromOption (S.get value))
on_change=(S.set set_value)>
<Label>"Brand Color"</Label>
<Color_field.Group>
Expand Down Expand Up @@ -544,7 +544,7 @@ let make () =
<Color_field
class_="w-full max-w-xs gap-1.5"
name="accent-color"
value=(Js.Nullable.fromOption (S.get color))
value=(Js.Null.fromOption (S.get color))
on_change=(S.set set_color)>
<Label class_="font-medium text-foreground">"Accent color"</Label>
<Description>"Applied to buttons, links, and focus rings."</Description>
Expand Down Expand Up @@ -613,7 +613,7 @@ Each prop beside the name HeroUI's React component gives it.

| React | solidtype | Type | Default | Description |
|---|---|---|---|---|
| `value` | `value` | `Types.Color.t Js.Nullable.t` | | Current value (controlled), null for none |
| `value` | `value` | `Types.Color.t Js.Null.t` | | Current value (controlled), null for none |
| `defaultValue` | `default_value` | `Types.Color.t` | | Default value (uncontrolled) |
| `onChange` | `on_change` | `Types.Color.t option -> unit` | | Handler called when the value changes, `None` for none |
| `channel` | `channel` | `Color_field.channel` | | The color channel to edit, fixed as it is made. If not provided, edits hex value |
Expand Down
Loading