Skip to content

Releases: hyphatech/solidtype

0.3.0

Choose a tag to compare

@zaiev zaiev released this 27 Oct 21:44

HeroUI's overlays and lists arrive on Kobalte: Select, ComboBox and Autocomplete, with the ListBox, Dropdown, Modal, AlertDialog, Drawer, Popover and Tooltip they build on, and navigation and disclosure whole. Which are ported.

Upgrading

  • Button.trigger takes described_by, the trigger's aria-describedby, and element, given the button's element as it is made.
  • Number_field keeps a value on its step's grid only while it is given a step, else within its range alone, as React Aria does.
  • Time_field's value is a Time.t Js.Nullable.t, null to control it empty, and on_change is told a Time.t option.

New

  • Autocomplete, Combo_box and Select, their lists a List_box, and List_box, Dropdown, Header, Modal, Alert_dialog, Drawer, Popover and Tooltip.
  • Tabs, Accordion, Disclosure, Disclosure_group, Breadcrumbs and Pagination.
  • List_box.render_empty_state; an Input inside a Combo_box is its input, and a Search_field inside an Autocomplete.Filter its search.
  • Button takes slot=`trigger and slot=`close, as HeroUI's examples give a button to a part.
  • A component takes an attribute's namespace, Jsx.attr, Jsx.bool and Jsx.named, and passes it on to its element.
  • The Form page shows a codec's problems on a form's fields.

Fixed

  • Form shows a server's error that comes after its field was changed and left.
  • Separator has its data-slot, and is a <div> where React Aria's is.
  • Toast is as tall as its content, and Accordion's and Disclosure's content no longer jumps as it first opens.
  • Badge, Checkbox, Chip, Disclosure_group, Link, Radio and Switch keep the class_ they are given.
  • Checkbox shows a Field_error inside it while it is invalid, where it raised.

0.2.0

Choose a tag to compare

@zaiev zaiev released this 24 Oct 08:26

HeroUI's components arrive on Kobalte in a package of their own, and the documentation is online at hyphatech.github.io/solidtype.

Upgrading

  • A spread is props=p, where it was spread=p; on a component it is a rest of its own props, Props.omit or Props.others.
  • A changing value given to a prop is its thunk, count=(fun () -> count ()); a bare name is passed as it is.
  • A data- attribute takes a Jsx.data: Jsx.data s, or Jsx.flag b for a flag.
  • Server.pipe_to_node_writable → Server.writable ~write ~close () with Server.pipe_to, and Server.render_to_string_async answers a result.
  • Kobalte's optional parameters are optional arguments, I18n.create_filter (), and a Kobalte function that throws raises Invalid_argument.

New

  • solidtype-heroui: HeroUI's components on Kobalte's, with HeroUI's own classes, each tested beside the same component in React. Which are ported.
  • The documentation: getting started, how the pieces work, the Solid and Kobalte bindings, and each HeroUI component beside React.
  • Jsx.fragment, and an optional prop passed as it is, ?title=(fun () -> o).
  • A component passes the data- attributes it is given on to its element.

Fixed

  • Store.track subscribes to the whole store, where it did nothing.
  • A string in JSX reaches the page as it reads in OCaml, backslashes, entities and spaces included.
  • catch_error and run_with_owner tell a function that returned None from one that raised.

0.1.0

Choose a tag to compare

@zaiev zaiev released this 19 Oct 15:16

The first release: SolidJS components written in OCaml, compiled by Melange, reaching the browser as the code Solid's own compiler emits.

New

  • ppx_solidtype and vite-plugin-solidtype: OCaml's JSX in .mlx files, handed to Solid's compiler, so a component compiles as its TSX twin does.
  • Types where TSX has none: a reactive read outside a thunk, a prop left out or an attribute an element does not take does not compile.
  • solidtype: Solid 1.9 bound whole, from signals to server rendering, its components included.
  • solidtype-kobalte: Kobalte 0.13 bound whole, generated from its own declarations.
  • An island mounts in an Astro page as any Solid island does, prerendered and hydrated.
  • An example on the whole stack: a Spindle server and the island it serves, typed from its routes.