diff --git a/.impeccable/config.json b/.impeccable/config.json deleted file mode 100644 index bbaf4622..00000000 --- a/.impeccable/config.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "detector": { - "ignoreRules": [], - "ignoreFiles": [], - "ignoreValues": [ - { - "rule": "overused-font", - "value": "inter", - "createdAt": "2026-10-25T09:40:14.705Z", - "reason": "Claude decided: HeroUI's own face, as heroui.com and docs/src/styles/heroui.css give it; the example matches HeroUI's look by the repository's parity rule" - } - ] - } -} diff --git a/.ocamlformat-ignore b/.ocamlformat-ignore index 3128e590..200bd88a 100644 --- a/.ocamlformat-ignore +++ b/.ocamlformat-ignore @@ -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 diff --git a/AGENTS.md b/AGENTS.md index 26848a02..7381c1d8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,37 +4,43 @@ solidtype is an OCaml library of Hypha Stack: Solid, typed, for OCaml front ends on SolidJS and Kobalte, compiled by Melange. A component is written in OCaml's JSX (`.mlx`), and reaches the browser as the code Solid's own compiler emits for the same JSX. `ppx_solidtype` lowers the JSX; -`vite-plugin-solidtype` hands it to Solid's compiler. Each JavaScript -library bound is an opam package of its own: `solidtype` binds Solid, -`solidtype-kobalte` Kobalte, `solidtype-rhp` rhp's charts, -`solidtype-internationalized-date` the dates HeroUI's date components take, -`solidtype-gravity-icons` Gravity UI's icons, the set HeroUI's examples draw; -`solidtype-headless` holds the components Kobalte lacks, made as Kobalte -makes its own, of its hooks, with no style, and Kobalte's own where they -need a fix; and `solidtype-heroui` is a -maintained port of HeroUI's components onto Kobalte's and those, since -HeroUI's are React's. This file is for anyone changing it, human or agent. Users start at [README.md](README.md). +`vite-plugin-solidtype` hands it to Solid's compiler. This file is for anyone +changing it, human or agent. Users start at [README.md](README.md). + +Each JavaScript library bound is an opam package of its own: + +- `solidtype` binds Solid, and types each element's attributes; +- `solidtype-kobalte` binds Kobalte; +- `solidtype-headless` holds the components Kobalte lacks, made as Kobalte + makes its own, of its hooks, with no style, and Kobalte's own where they + need a fix; +- `solidtype-heroui` is a maintained port of HeroUI's components onto + Kobalte's and those, since HeroUI's are React's; +- `solidtype-rhp` binds rhp's charts; +- `solidtype-internationalized-date` binds the dates HeroUI's date + components take; +- `solidtype-gravity-icons` holds Gravity UI's icons, the set HeroUI's + examples draw. ## Commands ```sh -make setup # once: the switch solidtype, all dependencies, and - # Bun's +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 and the generated bindings + # 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 # its Astro page, into _build/example-astro -make example-serve # the board and its API, served on http://localhost:4420, - # its tasks in BOARD_DB, example/board.db, migrated first -make docs # the documentation site, odoc's reference copied into - # docs/public/reference, built by Astro into _build/docs, - # as .github/workflows/docs.yml publishes it from main, - # and agents/ from its pages -make docs-serve # the documentation site built, served on DOCS_PORT with - # search +make example-serve # the board and its API on http://localhost:4420, its + # tasks in BOARD_DB, example/board.db, migrated first +make docs # the documentation site, built by Astro into + # _build/docs with odoc's reference, and agents/ from + # its pages +make docs-serve # the site built, served on DOCS_PORT with search make release VERSION=1.2.3 # tag and release ``` @@ -43,700 +49,487 @@ builds and tests, and Bun installs, runs and tests it as one binary. ## Layout +A module's `.mli` says what it is; this says where things are and what no +file says of itself. + ``` -src/ solidtype, for Melange alone - jsx the markers the ppx writes and the plugin rewrites - check the types of a component's props check - solid Solid's reactive core, solid-js - web its renderer in the browser, solid-js/web - server its rendering on the server, a module of its own so a - browser build never names what Solid's browser build lacks - store its stores, solid-js/store - for index show switch match suspense suspenseList errorBoundary - dynamic portal noHydration hydration hydrationScript assets - Solid's components, one module each, named as Solid - names them - context a context, as a module made by a functor - html each element's attributes, generated -kobalte/ solidtype-kobalte: Kobalte's components part by part, - its hooks, values and the types they name, generated -headless/ solidtype-headless: the components Kobalte lacks, one - module each, made of Kobalte's hooks: roles, keys and - state, no style, every attribute of a part's element - taken and passed on; and Kobalte's own where they need - a fix, each fixed part Kobalte's beneath, the others - Kobalte's as they are - data_grid a data grid's model, whoever dresses it: its columns, - its rows sorted, and reordered by a drop - table a grid of rows and cells: Kobalte's list of rows, - their selection, the keys through their cells, a row - that loads more, columns laid out and resized as - React Stately lays them out, columns pinned to a side - and a header kept in view, rows reordered by a drag or - the keys, and rows that hold rows, - each row's cells and rows tokens it draws once read - calendar a month's grid of days to choose one date, several or - a range from, the locale's, moved through and paged - as React Stately's calendar is - date_field a date's segments, the locale's in its order and - calendar, each Kobalte's spin button, typed and stepped - as React Stately's date field edits them, of a date, a - date with a time or one in a zone, or two of them, a - range - 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 - color_swatch_picker - a listbox of colours, each option named by its - swatch, walked as a grid by where each option is or - as a stack - tag_group a grid of tags: Kobalte's list of rows, chosen, walked - with a wrap, removed by a button or the keys and the - focus moved on - load_more_sentinel what asks a list for more as its end comes into view - top_layer the browser's top layer: an overlay drawn above the - page and every overlay opened before it, and one - kept above those opened after - virtualizer React Aria's Virtualizer: a collection draws the entries - in view, each placed by a layout - color_swatch Kobalte's, a colour less than opaque one a browser - color_area reads, an area disabled whole, a slider paged by its - color_slider colour's page and told only a change, a field of a hex - color_field whose value is a colour, committed by Enter and - color_channel_field - stepped by the keys and the wheel, and a channel's - field that tells its number and only a change - number_field Kobalte's, its wheel turned as React Aria's turns it - slider Kobalte's, a track given a ref still its slider's -rhp/ solidtype-rhp: rhp's charts, generated where a rule maps - rhp's declarations whole: solidtype_rhp, and the types - it names, types - plot scale what no rule maps, ported by hand, one module each, each - many_dots row .mli saying why: a plot of typed rows and its slat, a - slat order scale, many dots, a plot's order, the types of more - color ticks ease JavaScript kinds than Either holds, and helpers, rhp's - shape helpers functions of rows, which solidtype_rhp includes -internationalized_date/ - solidtype-internationalized-date: @internationalized/date's - functions, and its values in types, each a kind of one - Value, generated -gravity_icons/ solidtype-gravity-icons: every icon of @gravity-ui/icons, - a module each, so a page bundles only those it draws, - generated -heroui/ solidtype-heroui: HeroUI's components ported onto - Kobalte's, one module each - styles HeroUI's variant functions, the classes of each look, - generated - interaction the state React Aria writes on an element and HeroUI's - styles read, kept as React Aria keeps it - field what a switch, a checkbox and a radio share: the state - their content declares, a value controlled or kept, and - the content, on a Kobalte component's label and input - panel what a disclosure's content and an accordion's panel - share: kept on the page, found by find in page, and - sized as HeroUI's styles animate it - theme HeroUI's useTheme: which theme shows, kept across - visits - overlay what every overlay shares: on the page while it opens, - is open, and closes, as HeroUI's styles animate it - dialog_frame what a modal, an alert dialog and a drawer share on Kobalte's - dialog: root, trigger, backdrop, container, dialog, - heading and close trigger, each port's classes its own - status_icon HeroUI's icon for each status, as an alert, a toast and - an alert dialog draw it +src/ solidtype, for Melange alone: jsx, the markers; check, a + props check's types; arity, a JavaScript component's + function props of several arguments, called as OCaml + calls a function; solid, web, store and context; + server, apart so a browser build never names what Solid's + browser build lacks; Solid's components, a module each, + named as Solid names them; html, generated +kobalte/ solidtype-kobalte, generated: solidtype_kobalte, and + types, a file of its own so Melange calls its functions + directly from another library +headless/ solidtype-headless, a module per component: one Kobalte + lacks, or Kobalte's own under a fix +heroui/ solidtype-heroui, a module per port + styles HeroUI's variant functions, generated + interaction field panel theme overlay dialog_frame status_icon 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 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 - pinned, a header kept in view, where a dragged row - would land - data_grid a grid of rows given as data and columns as - definitions, drawn on the Table port, its look - data-grid.css - extras.css those stylesheets in the components layer, which the - plugin's tarball ships as heroui-extras.css -docs/ the documentation, a Starlight site in Hypha's look, - from starlight-theme-hypha: how the pieces work - together and are set up, the Solid and Kobalte - bindings, the charts, and each port's page, which - shows it beside the same component in React, with its - source, and each module's odoc reference; each tab - opens at its section's root, an overview of what that - part of solidtype is; built into _build/docs, - which `dune clean` removes and nothing ignores, and a - link to a page or heading that is not there fails it - package.json the site's dependencies, a member of the root's Bun - workspace, whose one bun.lock is at the root - islands/ the pages' OCaml: each example, compiled, and the - comparison of a port's element with React's, - attribute by attribute; every whole program a page - shows is a file the repository builds -- here or - example/ -- imported raw into Starlight's , a - missing one failing the build; a page imports an - island's source as @islands/.mlx?raw and its - compiled demo as @islands/.jsx, aliases - astro.config.mjs defines, never by a path up the tree - islands/react/ HeroUI's components in React, rendered into a host - an island owns: the one place the documentation runs - React - src/mlx.mjs MLX's JSX highlighted: a grammar injected into Shiki's - OCaml, which highlights no tag of its own - src/content/docs/reference.md - the packages, and a link to each module's odoc page, - which `make docs` copies into public/reference/, - ignored, since Starlight serves public/ as it is - agents.md what an agent knows before any page -- the packages - and how solidtype is written -- which the theme puts - at the head of llms.txt; each group's note is in - astro.config.mjs - src/pages/demo/ the Astro page's demo, pages of Astro's own outside - Starlight: a route per tea, its islands given props, - under a basket the client router keeps; the page - imports their sources as @demo/?raw -agents/ the documentation for a user's agent, generated by - starlight-hypha-agents from the pages, `make docs`: - llms.txt, the catalogue; pages/, each page as - Markdown, its examples written in; installed by the - root dune into $(opam var solidtype:doc), and llms.txt - alone, its links to solidtype's pages, into every other - package's doc/ -prds/ the PRDs of work being decided and built, and which - document owns each kind of fact once it lands -generate/ what writes the generated bindings from Solid's, - Kobalte's, HeroUI's, rhp's and @internationalized/date's - own types: `make generate` - names the one spelling of a name, shared by both - program the browser's library both read declarations under, - with no ambient types: Bun's own would join it - melange what both read of Melange and write for it: Dom's - types, a type that admits any string, a literal a tag - output a generator's files written, or checked by `--check` - ocaml an OCaml type as a generator builds it, and its one - printer - source an OCaml file and its interface, written side by side - binding the core of a binding of a TypeScript library of Solid - components: its types mapped, its parts, functions and - values bound, and the types they name, each a module; - a library's generator says only what is its own - kobalte Kobalte's: which entries, how its parts and options are - named, its shared props, roots split by `multiple` - heroui HeroUI's variant functions, from @heroui/styles - rhp rhp's: its components' elements, the types and exports - ported by hand, each port held to what rhp declares for - it, and a failure on anything else no rule maps - gravity_icons Gravity UI's icons, from the package's SVG files - internationalized_date - @internationalized/date's: its numbers whole, its value - classes kinds of one Value, what throws though no - declaration says so, and what is left out -ppx/ ppx_solidtype: MLX's JSX lowered to the markers - html_names the attributes and props whose JavaScript name the - kobalte_names rule's inverse does not give, generated - rhp_names -vite-plugin/ vite-plugin-solidtype, strict TypeScript over Babel - src/index the plugin Vite runs: a .jsx module's markers rewritten - src/rewrite the markers rewritten into Solid's JSX - src/markers what a build without the plugin reaches: an error - heroui-extras.css heroui/extras.css, which the workspace's export reaches - through this file, since an export names no file - outside its package - pack the plugin compiled and packed, as a release ships it, - with heroui/'s stylesheets - test/rewrite what the plugin writes for a marker form - test/browser every module of the libraries built for the browser, - each import found in Solid's and Kobalte's browser build - test/npm each package's x-npm-depends: what its library imports - from npm, at the workspace's range - test/pack the release's tarball installed in an application, - whose one import puts heroui's extras in the - components layer - test/astro the example's Astro page built: it holds the board - prerendered, to hydrate - test/docs the documentation built, React's compiler beside - Solid's: a port's page holds it prerendered, to hydrate -vitest.config.ts the OCaml tests, as three projects: the browser's in - jsdom, the example's server started for them; the - server's, and the date binding's, in Node; and - hydration, compiled hydratable -example/ a kanban board: a whole application on the - stack -- Solid, Kobalte and HeroUI's ports over a - Spindle server on SQLite -- its README the map - index.html the page, built by Vite with vite.config.ts - pages/ the same board as an Astro page: wiring alone, built - with astro.config.mjs, which lets Vite reach _build - src/ the board's islands in .mlx, and api.ml, its client - printed from server/ as the build runs - migrations/ the tasks' table, which rowtype-migrate applies before - the server starts - server/ a Spindle app: the tasks' store in SQLite, the routes - over it, which the board is called against and `make - example-serve` serves, their tests, and their command line, - Spindle's, which prints the board's client - test/ the board's behaviour, in OCaml, run by vitest - against the server server.ts starts, on a database of - the run's own -test/jsdom.ts what jsdom lacks, stood in for in every vitest file -test/browser/ Solid's bindings in a browser, in OCaml, run by vitest -test/server/ Solid's rendering on the server, in OCaml, run by vitest - in Node -test/hydration/ an island, an rhp chart and a HeroUI select on Kobalte, - rendered on the server and hydrated by Web.hydrate, in - a vitest project of Solid's hydratable compile, Solid, - rhp and Kobalte compiled with it; setup.ts renders them - through Vite's server loading -test/kobalte/ each Kobalte component in OCaml beside its TSX twin in - twins/, the same checks and an axe scan on both -test/headless/ each headless component as a caller meets it: its roles, - keys and state, and an axe scan; each of Kobalte's - fixed, failing on Kobalte's own -test/rhp/ rhp's charts as a caller meets them: rows plotted by - their slat, a scale's range and ticks, a changed row - redrawn in place on the next frame -test/heroui/ each HeroUI port's classes and behaviour, in OCaml, run - by vitest, and its state beside the same component in - React, its twin in twins/; and the variant functions, - each against HeroUI's own call -test/internationalized_date/ - the date binding as a caller meets it: a zone's daylight - saving, values of several kinds, a throw as a value -test/ppx/ what the ppx writes for each JSX form -test/test_docs.ml every island of docs/islands on some page, or a part of - other islands, every rhp page linked to rhp's, every - port's to HeroUI's before its usage, and the plugin a - page installs the newest release's in CHANGES.md -test/does_not_compile.t - each mistake the types refuse, built against the - installed library, with the error a user reads + what several ports share + .css the look of a component HeroUI ships no stylesheet for; + table.css, what HeroUI's table stylesheet does not draw + extras.css those stylesheets in the components layer +rhp/ solidtype-rhp: solidtype_rhp and types, generated, and a + module per declaration no rule maps, ported by hand +internationalized_date/ gravity_icons/ + their packages, generated +generate/ the generators, `make generate`: a file per library + bound, saying only what is that library's own + binding what they share, which a generator binds a library by: + in library, the library and what a run has met of it; + in mapping, each rule that maps a type; in emit, a + part, a function and a value written; in types_file, + the types they name, each a module + names ocaml output package program melange opam + the one spelling of a name; an OCaml type and a + declaration, and the one printer of each; files laid + out by ocamlformat, written or checked, and a run + refused; a package's + declarations and what they export; the browser's + library with no ambient types; what is read of + Melange; the switch + generator a generator as far as every one is alike: a package + read, its library bound, its files written or refused + solid_html Solid's elements and their attributes, which html + writes and a binding asks for an element's module + test what the core writes for a declaration, a rule each +ppx/ ppx_solidtype, and html_names, kobalte_names and + rhp_names, generated: the names whose JavaScript + spelling the rule's inverse does not give +vite-plugin/ vite-plugin-solidtype, strict TypeScript over Babel + src/rewrite the markers rewritten into Solid's JSX + src/markers what a build without the plugin reaches: an error + heroui-extras.css heroui/extras.css, reached through this file, since an + export names no file outside its package + pack the plugin compiled and packed, as a release ships it, + with heroui/'s stylesheets +docs/ the documentation, a Starlight site in Hypha's look, a + member of the root's Bun workspace; built into + _build/docs, where a link to a page or heading that is + not there fails it + islands/ the pages' OCaml. Every whole program a page shows is a + file the repository builds, here or in example/, + imported as @islands/.mlx?raw, its demo as + @islands/.jsx, never by a path up the tree + islands/react/ HeroUI's components in React, beside each port: the one + place the documentation runs React + src/mlx.mjs MLX's JSX highlighted, a grammar injected into Shiki's + OCaml + src/pages/demo/ the Astro page's demo, outside Starlight + agents.md what an agent knows before any page, the head of + llms.txt +agents/ the documentation for a user's agent, generated: + llms.txt and pages/, installed into + $(opam var solidtype:doc), llms.txt alone into every + other package's doc/ +prds/ the PRDs of work being decided and built, and which + document owns each kind of fact once it lands +example/ a kanban board, a whole application on the stack: its + islands in src/, a Spindle server on SQLite in server/, + the same board as an Astro page in pages/; its README + the map +``` + +The tests, each beside what it tests or in `test/`: + +``` +test/ppx/ what the ppx writes for each JSX form +test/does_not_compile.t each mistake the types refuse, built against the + installed library, with the error a user reads +test/browser/ server/ hydration/ + Solid's bindings in jsdom, in Node, and rendered + on the server then hydrated, in three vitest + projects; test/jsdom.ts stands in for what jsdom + lacks +test/kobalte/ each Kobalte component beside its TSX twin +test/headless/ each headless component as a caller meets it +test/heroui/ each port beside the same component in React, and + the variant functions against HeroUI's own calls +test/rhp/ internationalized_date/ + each binding as a caller meets it +test/test_docs.ml every island on a page, every rhp page linked to + rhp's, every port's to HeroUI's, and the plugin a + page installs the newest release's +vite-plugin/test/ rewrite, what the plugin writes for a marker form; + browser, every import found in the browser builds; + npm, each package's x-npm-depends; pack, the + release's tarball installed; astro and docs, the + example's page and the documentation built +example/test/ the board's behaviour against its own server ``` ## The pipeline -MLX parses `.mlx` into OCaml with each element marked `[@JSX]`. -`ppx_solidtype` lowers each one to a call of `Solidtype.Jsx`, reading each -value as Solid's compiler reads JSX: a literal, an element, a handler (`on_` -and its event), a function or a name static, and any other expression a -thunk the ppx writes, read again as what it reads changes, so a read in JSX -is always in Solid's tracking scope; a handler an expression makes, -`on_click=(remove id)`, and a spread are a thunk the ppx writes too, made -once as their element is, since Melange evaluates an expression before the -element it is written in, outside a branch Solid has not drawn, and never -out of a function; an -optional prop, `?name=`, an option read as a required prop's value is, -`undefined` while it is `None`, and `?name:` in the check, so a required -prop refuses it; a child, given by its name or an expression, is a -`Jsx.element`, the one type of what JSX holds, as Solid's `JSX.Element` is: -a node, text from `Jsx.string`, a number from `Jsx.int`; a -name is given back its JavaScript spelling, and a value wrapped in one -of Solid's namespaces, `Jsx.native` and the others, its namespace; a -function is a function wherever it is given, refused by its type where a -value belongs, so a function prop that takes no argument is `(fun () -> -...)`, as OCaml writes it; a component's render -function given by name, a slat rhp reads its layout from, is `render=f`, and -only by name -- one written in place is the child, `(fun ...)` -- -its only child, checked and passed as a function child is, since -ocamlformat cannot print an attribute named `children` beside MLX's own. A string literal, however -quoted, becomes a JavaScript string, `{js|...|js}`, its backslashes -doubled, since Melange reads any other as bytes and reads escapes in -that one; one written `{js|...|js}` is left as it is. An element's attributes are -annotated with their types; a component's element also applies the -component's `Props.check` to its props under `if false`, which the -compiler checks and Melange drops, and binds each prop that can hold JSX -once, to name it in both. `let%component` writes a component's `Props` -from its labelled parameters, and given the element it draws, -`[@@element button]`, a check that ends in that element's, -`Html.Button.check`, after its own props, which an application fills first, -so an own prop takes the place of the element's of its name, as TSX's -`Omit` types a part. The library's own components are `.mlx` -too, lowered with `ppx_solidtype -internal`, which names the library's -modules without `Solidtype.`, a name the library itself cannot use. Melange compiles the calls as -calls, through one import of `vite-plugin-solidtype/markers`. The plugin -rewrites each into JSX -- a function the ppx bound back where it is -used, a thunk into what it returns, a return-only `if` into a -conditional, a string into JSX's own text or quoted attribute only where -JSX reads it back unchanged, else `{"..."}` -- and `vite-plugin-solid` compiles that JSX as -it compiles TSX: for the browser, and under Astro's build for the server -and hydratable too, so an island is prerendered and hydrates as the same -JSX written in TSX would. +1. **MLX** parses `.mlx` into OCaml, each element marked `[@JSX]`. +2. **`ppx_solidtype`** lowers each element to a call of `Solidtype.Jsx`, a + marker, reading each value as Solid's compiler reads JSX: + - a literal, an element, a handler (`on_` and its event), a function or + a name is static; any other expression is a thunk the ppx writes; + - a handler an expression makes, `on_click=(remove id)`, and a spread + are a thunk too, made once as their element is, since Melange + evaluates an expression before the element it is written in; + - `?name=` is an option, `undefined` while it is `None`; + - a child is a `Jsx.element`: a node, `Jsx.string`, `Jsx.int`; + - a render function given by name is `render=f`, and one written in + place is the only child, `(fun ...)`, since ocamlformat cannot + print an attribute named `children` beside MLX's own; + - a string literal becomes `{js|...|js}`, its backslashes doubled, since + Melange reads any other as bytes; one written so is left as it is; + - a component's element also applies its `Props.check` under `if false`, + which the compiler checks and Melange drops. + + `let%component` writes a component's `Props` from its labelled + parameters, and with `[@@element button]` a check that ends in + `Html.Button.check`, an own prop taking the place of the element's of + its name, as TSX's `Omit` types a part. The library's own `.mlx` is + lowered with `-internal`, which names its modules without `Solidtype.`. +3. **Melange** compiles the markers as calls, through one import of + `vite-plugin-solidtype/markers`. +4. **The plugin** rewrites each call into JSX: a function the ppx bound + goes back where it is used, a thunk becomes what it returns, a + return-only `if` a conditional, and a string JSX's own text or quoted + attribute only where JSX reads it back unchanged, else `{"..."}`. +5. **`vite-plugin-solid`** compiles that JSX as it compiles TSX: for the + browser, and under Astro for the server and hydratable. ## Rules that must hold Each rule comes with why it exists and the test or search that catches a break. +### JSX + - **An island compiles as the same JSX in TSX does.** The plugin writes the JSX a TSX author would, and Solid's compiler compiles it the three - ways Astro's integration runs it: for the browser, hydratable, and for - the server. Why: the library promises Solid's own output, and a rewrite - that drifts is a slower or a wrong page nobody sees in a type. Test: - `vite-plugin/test/rewrite.test.ts`, what the plugin writes for each - marker form, and `test/hydration/`, islands prerendered and hydrated. + ways Astro runs it: for the browser, hydratable, and for the server. + Why: the library promises Solid's own output, and a rewrite that drifts + is a slower or a wrong page nobody sees in a type. Test: + `vite-plugin/test/rewrite.test.ts`, `test/hydration/`. - **An island mounts in an Astro page as any Solid island does**, `client:only` or prerendered `client:load`, imported by its namespace - from Melange's output, ``; the page holds - wiring alone. Why: an application on the stack may build its pages - with Astro, and the plugin must run under its server build as under its - client's. Test: `vite-plugin/test/astro.test.ts`, which builds the site. + from Melange's output, ``; the page holds wiring + alone. Why: the plugin must run under Astro's server build as under its + client's. Test: `vite-plugin/test/astro.test.ts`. - **In JSX a value is written as itself, and Solid keeps it current; - outside JSX a thunk is written.** A literal or a name is given as it is; - any other expression is a thunk the ppx writes, read again as what it reads - changes, as Solid's compiler makes an expression in JSX a getter, so - `title=(S.get note)` is `title={note()}`; a function is a function, never a - thunk. Outside JSX -- a memo, an effect, an accessor a part derives -- the - caller writes `fun () -> e`, as Solid's own API takes `() => e`. Why: a read - hoisted out of Solid's tracking scope stops updating without a sound, and a - value written as itself has one form in every position, evaluated as JSX's - form says, as `let%map`'s body is as its form says. Test: - `test/does_not_compile.t`, a thunk refused where a value belongs and every - form that compiles. + outside JSX a thunk is written.** `title=(S.get note)` is + `title={note()}`; a function is a function, never a thunk. Outside JSX + -- a memo, an effect, a function's parameter, a record a part gives + another -- the caller writes `fun () -> e`, as Solid's API takes + `() => e`. Why: a read hoisted out of Solid's tracking scope stops + updating without a sound. Test: `test/does_not_compile.t`, a thunk + refused where a value belongs and every form that compiles. +- **What the library hands out is a `Solid.accessor`, read by `S.get`**: a + signal, a memo, a component's value prop, a field of a part's state or + context. A part that hands on what it derives writes + `S.accessor (fun () -> e)`, which Melange writes as a plain JavaScript + function. In a component's body `S.get name` is the read itself, + `props.name`. Why: a thunk read as a call, `label ()`, looks like + calling a string, and an accessor asked of a caller makes them build + Melange's uncurried function by hand. Test: `test/ppx`. Symptom: + `rg -n '^\s+\w+ : unit -> [a-tv-z]' heroui/*.mli headless/*.mli`, a + public field read as a call; + `rg -n '^\s+\??\w+:[^:]*accessor ->' heroui/*.mli headless/*.mli`, a + parameter that asks for an accessor. +- **`[@u]` is a binding's alone.** Outside `src/`, which binds Solid + itself, it is written only in an `external`, or a `type` an external + names. Why: an uncurried function written by hand is Melange's calling + convention leaking into code that means something else. Symptom: + `rg -n --glob '*.{ml,mlx,mli}' '\[@u\]' heroui headless test docs example + | rg -v ':\s*(external|type) '`. +- **Every thunk the ppx hands Solid is a function of no argument**: each + written uncurried, a function it gives bound apart. Why: Solid calls a + thunk with no argument, and Melange writes a curried + `fun () -> fun h -> e` as one function of two, which that call would run + at once. Test: `test/browser/flow_test.mlx`, `test/ppx`. - **A component's props are its `Props.check`**, a function with one - labelled argument per prop, optional where the prop is, ending in - `()`: a value prop as a `Check.value`, a function prop as the - function, children as `Check.children` of the kinds the component - takes -- elements, a function it calls, or either. The ppx applies it under - `if false`, so it writes nothing. Why: a prop left out, a prop the - component does not take, and two props of one type variable that - disagree are compile errors, as in TSX, and a function given where a - value belongs is refused. A `Check.value` is the value itself, what the - expression gives, and an optional prop, a value or a function alike, is - given as OCaml gives an optional argument: a value, `count=3`, or an - option, `?count=o`, left out while it is `None`. - Test: `test/does_not_compile.t`, `test/browser/optional_test.mlx`. -- **Only the ppx writes a marker, and the plugin reads only markers.** - The plugin finds them by their import alone. It reads Melange's shapes - only to put a function back where it is used -- a thunk's returned - expression, a return-only `if`, a `const` bound to a function and used - once -- and calls any function it does not recognise, which is always - correct. Why: the rewrite keeps its meaning because it reads - one shape it owns. Symptom: `rg -n 'Jsx\.(el|c|s|d|spread|dynamic|render)\b' - example src` finds a call written by hand. -- **What changes is read one way and given one way.** What the library - hands out -- a signal, a memo, a component's value prop, a field of a - part's state or context -- is a `Solid.accessor`, read by `S.get`; what a - caller gives in JSX, an attribute or a child, is the expression itself, - which the ppx reads again as it changes, and what it gives elsewhere -- a - function's parameter, a record a part builds to give another -- is a - thunk, `fun () -> e`, as Solid's own API takes `() => e`. A part that - hands on what it derives makes it an accessor by `S.accessor (fun () -> - e)`, which Melange writes as a plain JavaScript function, so no code but a - binding's writes `[@u]`. A value prop is - an accessor of Solid's props object, and the ppx writes `S.get name` in a - component's body as the read itself, `props.name`, Solid's own. Why: a - thunk read as a call, `label ()`, looks like calling a string, and an - accessor asked of a caller makes them build Melange's uncurried function - by hand. Test: `test/ppx`, a prop read whole and a shadowed one through - its accessor. Symptom: `rg -n '^\s+\w+ : unit -> [a-tv-z]' heroui/*.mli - headless/*.mli` finds a public field a caller reads as a call, and - `rg -n '^\s+\??\w+:[^:]*accessor ->' heroui/*.mli headless/*.mli` a - parameter that asks for an accessor, and `rg -n 'fun ?\[@u\] \(\)' heroui - headless test docs example` an accessor built by hand. -- **Every thunk the ppx hands Solid is a function of no argument.** It writes - each thunk it makes uncurried, a function that thunk gives bound apart, - and `S.accessor (fun () -> e)` as that function itself. Why: Solid calls a - thunk with no argument, and Melange writes a curried `fun () -> fun h -> e` - as one function of two, which that call would run at once. Test: - `test/browser/flow_test.mlx`, an accessor whose value is a function, and - `test/ppx`, the function it gives bound apart. -- **`[@u]` is a binding's alone.** Outside `src/`, which binds Solid itself, - it is written only in an `external`, or a `type` an external names, where - it says how JavaScript calls a function. Why: an uncurried function written - by hand is Melange's calling convention leaking into code that means - something else. Symptom: `rg -n --glob '*.{ml,mlx,mli}' '\[@u\]' heroui - headless test docs example | rg -v ':\s*(external|type) '` finds one. -- **A reactive read is a plain call.** An accessor is an uncurried - JavaScript function and `Solid.get` is inlined, so `Solid.get count` - is `count()`, the call Solid's own JSX makes. Why: a curried read is - `Curry._1(count, undefined)`, an arity check on every read. Symptom: - `rg -n Curry _build/default/example/out/example/src` finds a read. -- **The library has no private modules.** Why: Melange then loses what it - knows of a module across libraries, so a user's every call into the - library goes through `Curry` and `Solid.get` is no longer inlined. A - helper two modules need is public, or a copy in each. Symptom: - `rg -n Curry _build/default/example/out/example/src` finds a call into - `Solidtype__`. -- **A test Solid reads for truth is a `bool`, never an OCaml value.** - `Show`, `Match` and a resource's source take a `bool` or an `option` - the binding boxes. Why: Melange writes `Some 0`, `Some ""` and a first - constant constructor as values JavaScript reads as false. Test: - `test/browser/flow_test.mlx`, `Show.Some` given `Some 0`. -- **An attribute's type is generated from Solid's JSX types**, by - `generate/html.ts` into `src/html.mli`, which nothing else writes and - `ocamlformat` leaves alone. A TypeScript type that admits any string - is `string`; a closed set of literals OCaml can name is a polymorphic - variant, which Melange writes as those strings; a boolean, alone or as - `"true"` and `"false"`, is `bool`; a number alone is `int`; a handler - takes Melange's `Dom` event type, its generic one when Melange has - none, and one Solid also takes in lower case, `onclick`, is bound once, - `on_click`. Each element's signature also gives `'r check`, its attributes - as optional arguments before `'r`, the tail of a check for a - component that passes them on. Why: a hand-typed copy drifts from the - version it binds. Test: `make lint` runs the generator with `--check`. + labelled argument per prop, optional where the prop is, ending in `()`: + a value prop a `Check.value`, a function prop the function, children a + `Check.children` of the kinds the component takes -- elements, a + function it calls, or either. An optional prop is given as OCaml gives + an optional argument, `count=3` or `?count=o`. Why: a prop left out, a + prop the component does not take, two props of one type variable that + disagree and a function where a value belongs are compile errors, as in + TSX. Test: `test/does_not_compile.t`, `test/browser/optional_test.mlx`. +- **A component is a value.** A binding's part is an `external` of type + `_ Jsx.component`, and an OCaml component is `Jsx.component make`. Why: + Melange wraps an external function used as a value in a closure, which + no JSX tag can name. +- **A function of several arguments is applied by whoever receives it.** + A JavaScript component that takes one is bound through `Solidtype.Arity`, + and a function JavaScript hands to OCaml is wrapped at its binding; the + generator and the ppx do both, so only a binding written by hand has it + to keep. Why: `fun a b -> e` and a function that takes `a`, then gives a + function of `b`, are one type and two JavaScript functions, and a caller + cannot be asked which it wrote. Test: `test/browser/flow_test.mlx`, + `test/kobalte/combobox_test.mlx`, `generate/test/rules.test.ts`. +- **Only the ppx writes a marker, and the plugin reads only markers**, + found by their import alone. It reads Melange's shapes only to put a + function back where it is used -- a thunk's returned expression, a + return-only `if`, a `const` bound to a function and used once -- and + calls any function it does not recognise, which is always correct. It + moves a bound function only where every name it reads means the same at + its use, and a marker it cannot read, or one left outside an element, + fails the build where it is written. Why: the rewrite keeps its meaning + because it reads one shape it owns. Test: + `vite-plugin/test/rewrite.test.ts`. Symptom: + `rg -n 'Jsx\.(el|c|s|d|spread|dynamic|render)\b' example src`. - **Every name a user writes is snake case, made by one rule** from the - name in Solid's or Kobalte's documentation: a capital is an underscore - and the lower case, a run of capitals one word, a hyphen an - underscore, and a keyword takes a trailing underscore. The ppx gives a - name back by the rule's inverse -- a capital after each underscore, - but a hyphen after `aria_` and `data_` -- and by the tables the - generators write of the names the inverse does not give, - `stroke_width` and `is_svg`; a hand-written check names its props so - too. Why: one convention reads as OCaml, and one rule lets the - documentation read across. Test: the generators fail on a name two - JavaScript names share, and `test/ppx` holds what each is given back. + name in the library's documentation: a capital is an underscore and the + lower case, a run of capitals one word, a hyphen an underscore, and a + keyword takes a trailing underscore. The ppx gives a name back by the + rule's inverse -- a capital after each underscore, a hyphen after + `aria_` and `data_` -- and by the tables the generators write of the + names the inverse does not give, `stroke_width` and `is_svg`. Why: one + convention reads as OCaml, and one rule lets the documentation read + across. Test: the generators fail on a name two JavaScript names share; + `test/ppx`. - **A namespace of Solid's wraps the value, never the name**: - `on_click=(Jsx.native f)` is `on:click={f}`, read by the ppx where it - is written, in an element's attribute; each wrapper types its value. A - component takes an attribute's, `Jsx.attr`, `Jsx.bool` and `Jsx.named`, - outside its check, and passes it on to its element, as a `data_` - attribute: `?hidden=(Jsx.attr o)` is the one way to write - `hidden="until-found"` that Solid's server keeps, where a plain `hidden` - is a boolean. A handler's and a property's stay an element's, since a - component's props name its own. Why: a wrapper left out is Solid's + `on_click=(Jsx.native f)` is `on:click={f}`. A component takes an + attribute's, `Jsx.attr`, `Jsx.bool` and `Jsx.named`, outside its check + and passes it on to its element: `?hidden=(Jsx.attr o)` is the one way + to write `hidden="until-found"` that Solid's server keeps. A handler's + and a property's stay an element's. Why: a wrapper left out is Solid's default, never another namespace, and a label that spelt the namespace would let a slip change it unseen. Test: `test/does_not_compile.t`, `test/server/panels_test.mlx`. - **A `data-` attribute is declared, never written by hand.** Its value is - a `Jsx.data`, a string or JavaScript's `undefined`, which Solid leaves - out: `Jsx.flag b` is `"true"` or nothing, React Aria's convention. The - ppx takes `data_*` on an element and on a component, which passes it on - to its element, outside the component's check, as TSX leaves a - hyphenated attribute unchecked: a component spreads `Props.others - props`, the props it does not name, on its element, after its own - attributes, as HeroUI's React components spread theirs. A port's state - -- `data-hovered`, `data-selected` -- is so declared, and - `heroui/interaction` only listens. Why: an attribute Solid writes is in the HTML a page is - prerendered with and never races one the component writes itself; one - set from a `ref` is neither. Test: `test/server/data_attributes_test.mlx`, - `test/does_not_compile.t`, `test/heroui/attributes_test.mlx`, which - gives one to every part of every port, and each port's test against its - React twin. -- **A spread is `props=p`, and no prop is named `props`.** MLX has no - syntax for TSX's `{...p}` and writes every attribute as an OCaml label, - so a spread takes one name: the ppx reads it as a spread on an element - or a component, each check takes it beside the props -- a component's - as a rest of its own props, `Props.omit`, or the rest any component - passes on, `Props.others`, and a Kobalte part's as any rest -- `Dynamic` - is given its component's props by it, and a component's parameter may - not take it. Why: one name kept from props, as JSX keeps `key` and `ref`, - lets a spread read as JSX; a prop of the same name would be a duplicate - label, reported far from its cause. Test: `test/does_not_compile.t`. -- **Kobalte's binding is generated from its declarations**, by - `generate/kobalte.ts` into `kobalte/solidtype_kobalte.ml` and the types it - names into `kobalte/types.ml`, a file of their own so Melange calls their - functions directly from another library, each with its `.mli`, which - leaves out the raw external under a wrapper, read with TypeScript's - checker from Kobalte's real path, so a package manager that keeps - dependencies beside each package resolves them. A part is a module of - 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; `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 - wrapper per function it holds and a constructor where it has neither - methods nor a class, and two declarations of one name that TypeScript - takes for each other, Intl's `NumberFormatOptions` and - `@internationalized/number`'s, are one module; a class is each interface - it declares it implements, by a `to_` conversion; Solid's handler - argument, an event with its targets named, is the event; and a type - parameter bound by an element, the element a hook is given, is any - element, `'t Dom.element_like`. A member typed `any` is not bound, nor one - whose value would be a type its caller chooses, an unchecked cast, but - for the caller's own data: in the props a `create` function takes, `any` - is the props' type variable `'data`, given in and handed only to the - caller's functions, and a string beside such a function, a field's name, - is left for the function; and what a callback gives back as `any`, which - JavaScript ignores, is `unit`. Kobalte's building blocks, menu, popper, - dismissable-layer and polymorphic, are not bound as components, though a part - it draws by polymorphic takes `as`, `as_`, a function of its element's props; the - 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`, - `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. + a `Jsx.data`, a string or `undefined`, which Solid leaves out: + `Jsx.flag b` is `"true"` or nothing, React Aria's convention. An element + and a component take `data_*`, a component outside its check: it spreads + `Props.others props`, the props it does not name, on its element after + its own attributes. A port's state -- `data-hovered`, `data-selected` -- + is so declared, and `heroui/interaction` only listens. Why: an attribute + Solid writes is in the HTML a page is prerendered with and never races + one the component writes itself; one set from a `ref` is neither. Test: + `test/server/data_attributes_test.mlx`, `test/does_not_compile.t`, + `test/heroui/attributes_test.mlx`. +- **A spread is `props=p`, and no prop is named `props`.** The ppx reads + it as a spread on an element or a component; each check takes it beside + the props -- a component's as a rest of its own props, `Props.omit`, or + the rest any component passes on, `Props.others`, a Kobalte part's as + any rest -- and `Dynamic` is given its component's props by it. Why: MLX + has no syntax for `{...p}`, and a prop of the same name would be a + duplicate label, reported far from its cause. Test: + `test/does_not_compile.t`. + +### Melange's output + +- **A reactive read is a plain call.** An accessor is an uncurried + JavaScript function and `Solid.get` is inlined, so `Solid.get count` is + `count()`. Why: a curried read is `Curry._1(count, undefined)`, an arity + check on every read. Symptom: + `rg -n Curry _build/default/example/out/example/src`. +- **The library has no private modules.** Why: Melange then loses what it + knows of a module across libraries, so a user's every call into the + library goes through `Curry`. A helper two modules need is public, or a + copy in each. Symptom: the search above finds a call into `Solidtype__`. +- **A test Solid reads for truth is a `bool`, never an OCaml value.** + `Show`, `Match` and a resource's source take a `bool` or an `option` the + binding boxes. Why: Melange writes `Some 0`, `Some ""` and a first + constant constructor as values JavaScript reads as false. Test: + `test/browser/flow_test.mlx`. + +### Generated bindings + +A binding of more than a few TypeScript declarations is written by its +generator, `generate/.ts`, checked by `make lint` with `--check`, +and never edited by hand. A generator says what a file declares, each +declaration with its comment, and one printer writes the file and its +interface from that; ocamlformat lays both out, so `dune fmt` holds them +as it holds any file. A variant's tags are written in the order of +their names, since TypeScript lists a union's members in the order it first +met each. Why: a hand-typed copy drifts from the version it binds. + +- **A generated binding is whole, or says what it lacks.** A declaration + no rule maps fails its generator, unless the generator names it as left + out, by where the core meets it, with why, `leftOut`; and a name left out + that is bound, or no longer declared, fails it too. Why: a prop dropped + without a word is one a user cannot reach and nobody knows is missing, + and a reason nothing checks outlives what it excused. Test: + `generate/test/rules.test.ts`. +- **A module of `Types` is named by one rule, and never numbered.** A type + its library names keeps the name; one it does not is named by the path + of names to where it is met -- a part's prop, + `Combobox_Root_Translations`; what a function gives, `Bins`; what it + takes, the parameter after it, `Bins_Options`. Two types of one name + fail the generator until it names each, `named`. Why: a number is the + order two types were met in, which the next version changes under a + user's code. Test: `generate/test/rules.test.ts`. +- **An attribute's type is generated from Solid's JSX types**, into + `src/html.mli`. A type that admits any string is `string`; a closed set + of literals OCaml can name is a polymorphic variant; a boolean, alone or + as `"true"` and `"false"`, is `bool`; a number alone is `int`; a handler + takes Melange's `Dom` event type, its generic one when Melange has none, + and one Solid also takes in lower case, `onclick`, is bound once, + `on_click`. Each element also gives `'r check`, its attributes as + optional arguments before `'r`: the tail of a check for a component that + passes them on. +- **Kobalte's binding is generated from its declarations**, read from + Kobalte's real path, into `kobalte/solidtype_kobalte.ml` and + `kobalte/types.ml`, each `.mli` leaving out the raw external under a + wrapper. A part is a module of its component and its check: its own + options, then its children by kind, then its element's `check`. Its + options map as an element's attributes do, and further: + - a number is a `float`, since a slider's value is fractional; + - `T | null` given to Kobalte is `Js.Null.t`, made of an `option` only + by `Js.Null.fromOption`, since Kobalte reads `undefined` as + uncontrolled and `null` as controlled and empty; read from Kobalte, or + given as `T | null | undefined`, it is `Js.Nullable.t`; + - `undefined` is absence for an optional prop, `?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`, each the value as it is; + - an option accessor that takes a key or a function takes the function; + one that takes only a key, 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`: a getter per field, a + curried wrapper per function it holds, a constructor where it has + neither methods nor a class; two declarations of one name TypeScript + takes for each other are one module; a class is each interface it + implements, by a `to_` conversion; + - Solid's handler argument, an event with its targets named, is the + event; a type parameter bound by an element is `'t Dom.element_like`; + - a type argument typed `any` is whatever the caller has where it is + given, `_`, and `Types.Unknown.t`, which nothing reads, where it is + read; a `bigint` is `Js.Bigint.t`; a function of several signatures is + its first where OCaml calls it, and not bound where it is given; + - a member typed `any` is not bound, nor one whose value would be a type + its caller chooses; but in the props a `create` function takes, `any` + is the caller's own data, `'data`, and a string beside a function of + it is left for the function; what a callback gives back as `any` is + `unit`; + - menu, popper, dismissable-layer and polymorphic are not bound as + components, though a part drawn by polymorphic takes `as_`; the hooks + Kobalte's lists are made of are bound from its root, as `Selection`. + + Test: `test/kobalte/selection_test.mlx`; `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, + declarations**, into `heroui/styles.ml`: a module per function, `buttonVariants` is `Styles.Button`, with `options`, its variants as - optional arguments and `class_`, and `classes`, its class string, or for - a component of several parts `slots` and a string per part. A variant - whose keys are `true` and `false` is a `bool`; any other is its keys as - tags by the one spelling rule, a space taken as a hyphen, each named by - `[@mel.as]`, since Melange writes `undefined` for a tag left unnamed where - others are. HeroUI's components are React's and are ported, written - in OCaml; only their classes are bound. Why: a port's look is HeroUI's own - classes, never a copy of them. Test: `make lint` runs the generator with - `--check`, and `test/heroui/styles_test.ml` checks calls against - HeroUI's own. + optional arguments and `class_`, and `classes`, or for a component of + several parts `slots` and a string per part. A variant of `true` and + `false` is a `bool`; any other is its keys as tags, a space taken as a + hyphen, each named by `[@mel.as]`, since Melange writes `undefined` for + a tag left unnamed where others are. Only HeroUI's classes are bound; + its components are ported. Why: a port's look is HeroUI's own classes, + never a copy. Test: `test/heroui/styles_test.ml`. - **@internationalized/date's binding is generated from its - declarations**, by `generate/internationalized_date.ts` into - `internationalized_date/`, on the same core: a function an external, a - class a module of `Types`. A date's numbers are small whole ones, an - `int`, but the milliseconds since 1970 `fromAbsolute` takes and what - `compare` gives, a `float`. Its value classes, `CalendarDate`, - `CalendarDateTime`, `Time` and `ZonedDateTime`, are each a kind of one - `Types.Value.t`, and a union of them, or an interface they satisfy, - `AnyTime`, is the kinds TypeScript takes for it, an open set, so a value - of any is passed as it is. A parser, and whatever takes a time zone or a + declarations**: a function an external, a class a module of `Types`. A + date's numbers are `int`, but the milliseconds `fromAbsolute` takes and + what `compare` gives are `float`. `CalendarDate`, `CalendarDateTime`, + `Time` and `ZonedDateTime` are each a kind of one `Types.Value.t`, and a + union of them, or an interface they satisfy, is the kinds TypeScript + takes for it, an open set. A parser, and whatever takes a time zone or a disambiguation, throws though no declaration says so: it raises - `Invalid_argument`, with an `_opt` beside it. Why: HeroUI's date - components take that library's values, and a binding by hand would be - a second copy of its types. Test: `make lint` runs the generator with - `--check`, and `test/internationalized_date` runs it in Node. -- **Gravity UI's icons are generated from @gravity-ui/icons' SVG files**, by - `generate/gravity_icons.ts` into `gravity_icons/`, a module per icon named - by the one spelling rule from its React component's name, `ChevronDown` is - `Chevron_down`: an svg of the file's elements and attributes, which takes - every attribute an svg does, a caller's after its own. An attribute Solid's - JSX types leave off its element is written in Solid's `attr:` namespace, - and the package's clip id, `a` in every icon, is one the icon makes, - `Solid.create_unique_id`, so two icons on a page never share it; an element, - id or reference the generator does not know fails it. The paths are the - library's own, so it imports nothing from npm. Why: HeroUI's examples draw - these icons, and an example copies into an application only if each icon it - draws is there. Test: `make lint` runs the generator with `--check`. -- **A component Kobalte lacks is made headless first, in - `solidtype-headless`, and a design system dresses it.** It is made as - Kobalte makes its own: of Kobalte's hooks, `Solidtype_kobalte.Selection` - first, its parts the elements they name, their roles, keys and state as - attributes, Kobalte's convention for state, present and empty, and its - state a context a style reads, `Table.Context.use`. A part takes every - attribute its element does, its `Props` written by hand, and passes them on - after its own, so a style's attribute wins, and a caller's `ref` and - handlers are called beside its own. Its HeroUI port adds only HeroUI's - classes, `data-slot`, React Aria's state, `"true"`, and HeroUI's own parts. - Why: behaviour and accessibility are the component's whoever dresses it, - tested once, and a port that mixes them with a style cannot be read for - either. A bug of Kobalte's own component is fixed so too, in a module of - `solidtype-headless` named for it, never in a port: its fixed parts wrap - Kobalte's and take Kobalte's props, `include` its `Props`, and its other - parts are Kobalte's own, so a style names one module. A port's own - difference from Kobalte -- HeroUI's literals beside a time field's segments - -- stays the port's. Test: `test/headless/`, each component as a caller - meets it, a fix failing on Kobalte's own, and its port's test against - React's. -- **A port's part takes every attribute of its element.** Its check ends in - its element's `Html` check, given by `[@@element]`, and it spreads - `Props.others` on that element, or on the Kobalte part or port that draws - it, after its own attributes, so a caller's attribute wins, as React Aria's - `mergeProps` lets it. A handler, `ref` or `style` the part sets there is - its own prop, `?ref:(given_ref : ...)`, the caller's called or written - beside its own; what the part's behaviour rests on -- a Kobalte option, an - id another part names, a fix of Kobalte's -- is written after the spread, - since Solid merges props in the order they are written. A part that draws - no element, a root that only gives context, takes none. Why: HeroUI's - parts take every DOM prop, and an attribute a port refuses, or one a - caller's spread replaces, is one an application cannot set without - breaking the port. Test: `test/heroui/attributes_test.mlx`, every part - given a style, a title, a handler and a `ref`; each composition in its - port's test. -- **A part that draws an element takes `as_`**, HeroUI's `render`: a function of - `Html.X.props`, which it spreads on what it draws, and of the part's state - where the part has one, which the part's parameter then names, `?(as_ : - Html.Button.props -> state -> Jsx.element)`. `[@@element]` gives it: a plain element a part - spreads `Props.others props` on stays Solid's template until a part is given - one, then is `Dynamic` given the function, never a tag, which throws on an - element only the browser draws as a page hydrates; a rest spread on a component - carries it to that component. What hands its rest - on to a function rather than an element passes `as_` itself, or reads it, - `Solid.drawn_as` and `Solid.undrawn`. Why: an animated element in a part's - place, typed so that what it draws checks its own props. Test: - `test/heroui/attributes_test.mlx`, every part drawn by an `as_`, its attributes - found on what it drew; `test/ppx`, the template and the function it chooses - between; `test/does_not_compile.t`. -- **A component HeroUI ships no stylesheet for has one of its own.** It is - made as every port is, from scratch on Solid and Kobalte with HeroUI's - look and feel as the reference -- a segmented control, a trend chip, a - text shimmer, widgets most kits have -- its props named as HeroUI names - its own; its look is Tailwind on HeroUI's tokens in a stylesheet of its own, - `heroui/.css`, rules for its BEM classes, as HeroUI writes its - components' CSS, and `heroui/extras.css` imports them into the - `components` layer. The plugin's tarball ships them, so an application - imports them by one line, `@import - "vite-plugin-solidtype/heroui-extras.css"`, as `docs/src/styles/heroui.css` - does: it installs the plugin at the libraries' version, and nothing - resolves a path into `_build`. Its parts carry their classes alone, - a caller's class after them. It has no twin: its test is a caller's, its - classes pinned, with axe. Nothing of a licensed kit is installed, imported - or copied. Why: every component is restyled alike, by a rule for its - class, which a utility on the element would beat; and this repository, - its CI and its site are public. Symptom: a utility in a part's class - string, or `rg -n heroui-pro` finding anything. Test: - `vite-plugin/test/pack.test.ts`. -- **Each Kobalte component is tested against its TSX twin.** Its test - renders the OCaml island and the twin and runs one check on both -- - roles, names, state attributes, the pattern's keys -- and axe on both; - a twin imports Kobalte's namespace, `import * as Switch`, whose - members are the parts. Why: the library promises Kobalte's behaviour - and accessibility, which only a running component shows. Symptom: a - component of `kobalte/solidtype_kobalte.ml` with no - `test/kobalte/*_test.mlx`. -- **rhp's binding is generated from its declarations where a rule maps - them whole, and ported by hand where none does**, by `generate/rhp.ts` - on the core Kobalte's shares: a type or an export no rule maps is a - module of `rhp/`, named in the generator, its `.mli` saying why, and the - generator fails on any other declaration it cannot bind, so no part is - bound by halves; and a hand port is held to the declaration it ports, so - a prop, setting, field or key rhp declares there is bound in its `.mli` - or named in the generator as left out, with the reason. A rule is made general only where it would bind the - next version the same way; a rule written for one declaration is a hand - port instead. Why: a binding half generated leaves out what a user then - cannot reach, and a rule for one declaration breaks on the next version. - Test: `make lint` runs `generate/rhp.ts --check`. -- **Each rhp page links to the page of rhp's documentation it follows.** - Why: rhp's documentation is the reference for what a prop does, and a - copy of it would drift. Test: `test/test_docs.ml`. + `Invalid_argument`, with an `_opt` beside it. Test: + `test/internationalized_date`. +- **Gravity UI's icons are generated from @gravity-ui/icons' SVG files**, + a module per icon, `ChevronDown` is `Chevron_down`: an svg that takes + every attribute an svg does, a caller's after its own. An attribute + Solid's JSX types leave off its element is written in `attr:`, the + package's clip id is one the icon makes, `Solid.create_unique_id`, and + an element, id or reference the generator does not know fails it. Why: + an example copies into an application only if each icon it draws is + there. +- **rhp's binding is generated where a rule maps a declaration whole, and + ported by hand where none does.** A hand port is a module of `rhp/`, + named in the generator, its `.mli` saying why, and held to what rhp + declares for it: each prop, setting, field or key is bound there or + named in the generator as left out, with the reason. The generator fails + on anything else it cannot bind. A rule is made general only where it + would bind the next version the same way; a rule for one declaration is + a hand port. Why: a binding by halves leaves out what a user then cannot + reach, and a rule for one declaration breaks on the next version. - **Each opam package declares what its library imports from npm**, in - `x-npm-depends`, written by its `.opam.template` -- `"@bezda/rhp@~2.2.0"`, - npm's own spelling, at the range the root `package.json` builds and tests - it against -- and nothing else: Kobalte is `solidtype-kobalte`'s, and - `solidtype-heroui` reaches it through that package, never by naming it - again. Why: an application installs a JavaScript library only where it - uses the package that binds it, any of them or none, and reads the list - from the opam package at the version opam resolved - (`opam show solidtype-rhp --field x-npm-depends`), so it is never a copy - kept elsewhere. Test: `vite-plugin/test/npm.test.ts`, against each - library's `mel.module` imports. -- **A component is a value.** A binding's part is an `external` of type - `_ Jsx.component`, never a function type, and an OCaml component is - `Jsx.component make`. Why: Melange wraps an external function used as - a value in a closure, which no JSX tag can name. -- **`agents/` is generated, never edited.** starlight-hypha-agents writes it - from the documentation's pages, `docs/agents.md` and its options in - `docs/astro.config.mjs`: a page changed is `make docs` run in the - same commit. A module with a page of its own names the page's installed - path, `$(opam var solidtype:doc)/pages/.md`, in its `.mli`'s opening - comment, and `generate/rhp.ts` writes it for rhp's generated components. - Why: a user's agent reads what the release installs, offline, and a page - it reads must be the release's. Test: the docs workflow builds the - pages on every pull request and fails if `agents/` then differs. -- **Tests of what runs in a browser are OCaml, run by vitest.** Alcotest - does not build for Melange; `melange-jest` reaches the globals vitest - shares with Jest. The ppx, native, is tested by its expectations. Why: - a test in TypeScript would reach a component through the names Melange + `x-npm-depends`, written by its `.opam.template` at the range the root + `package.json` builds and tests against, `"@bezda/rhp@~2.2.0"`, and + nothing else: `solidtype-heroui` reaches Kobalte through + `solidtype-kobalte`, never by naming it again. Why: an application + installs a JavaScript library only where it uses the package that binds + it, and reads the list from opam at the version it resolved. Test: + `vite-plugin/test/npm.test.ts`. + +### Components and ports + +- **A component Kobalte lacks is made headless first, in + `solidtype-headless`, and a design system dresses it.** It is made of + Kobalte's hooks, `Solidtype_kobalte.Selection` first: its parts the + elements they name, their roles, keys and state as attributes, Kobalte's + convention for state, present and empty, and its state a context a style + reads. Its HeroUI port adds only HeroUI's classes, `data-slot`, React + Aria's state, `"true"`, and HeroUI's own parts. A bug of Kobalte's own + component is fixed so too, in a module of `solidtype-headless` named for + it, never in a port: its fixed parts wrap Kobalte's and `include` its + `Props`, its other parts Kobalte's own. A port's own difference from + Kobalte stays the port's. Why: behaviour and accessibility are the + component's whoever dresses it, tested once. Test: `test/headless/`, a + fix failing on Kobalte's own; its port's test against React's. +- **A part takes every attribute of its element.** Its check ends in its + element's `Html` check, by `[@@element]` or written by hand, and it + spreads `Props.others` on that element, or on the part that draws it, + after its own attributes, so a caller's attribute wins, as React Aria's + `mergeProps` lets it. A handler, `ref` or `style` the part sets is its + own prop, `?ref:(given_ref : ...)`, the caller's called or written + beside its own; what its behaviour rests on -- a Kobalte option, an id + another part names, a fix -- is written after the spread, since Solid + merges props in order. A part that draws no element takes none. Why: an + attribute a port refuses, or one a caller's spread replaces, is one an + application cannot set without breaking the port. Test: + `test/heroui/attributes_test.mlx`, every part given a style, a title, a + handler and a `ref`. +- **A part that draws an element takes `as_`**, HeroUI's `render`: a + function of `Html.X.props`, which it spreads on what it draws, and of + the part's state where it has one. `[@@element]` gives it: a plain + element stays Solid's template until a part is given one, then is + `Dynamic` given the function, never a tag, which throws as a page + hydrates. What hands its rest on to a function passes `as_` itself, or + reads it, `Solid.drawn_as` and `Solid.undrawn`. Why: an animated element + in a part's place, typed so that what it draws checks its own props. + Test: `test/heroui/attributes_test.mlx`, `test/ppx`, + `test/does_not_compile.t`. +- **A component HeroUI ships no stylesheet for has one of its own**, + `heroui/.css`: Tailwind on HeroUI's tokens, rules for its BEM + classes, imported by `heroui/extras.css` into the `components` layer. + The component is made as every port is, its props named as HeroUI names + its own; its parts carry their classes alone, a caller's after them. The + plugin's tarball ships the stylesheets, so an application imports them + by one line, `@import "vite-plugin-solidtype/heroui-extras.css"`. It has + no twin: its test is a caller's, its classes pinned, with axe. Nothing + of a licensed kit is installed, imported or copied. Why: every component + is restyled alike, by a rule for its class, which a utility on the + element would beat; and this repository, its CI and its site are public. + Symptom: a utility in a part's class string, or `rg -n heroui-pro .` + finding anything. Test: `vite-plugin/test/pack.test.ts`. + +### Tests and documents + +- **Tests of what runs in a browser are OCaml, run by vitest** through + `melange-jest`; the ppx, native, is tested by its expectations. Why: a + test in TypeScript would reach a component through the names Melange emits. Symptom: a `.test.ts` or `.test.tsx` that imports an OCaml module. +- **Each Kobalte component is tested against its TSX twin**, in + `test/kobalte/twins/`: one check on both -- roles, names, state + attributes, the pattern's keys -- and axe on both. Why: the library + promises Kobalte's behaviour and accessibility, which only a running + component shows. Symptom: a component of + `kobalte/solidtype_kobalte.ml` with no `test/kobalte/*_test.mlx`. +- **Each rhp page links to the page of rhp's documentation it follows.** + Why: a copy of what a prop does would drift. Test: `test/test_docs.ml`. +- **`agents/` is generated, never edited**: starlight-hypha-agents writes + it from the documentation's pages, `docs/agents.md` and its options in + `docs/astro.config.mjs`, so a page changed is `make docs` run in the + same commit. A module with a page of its own names the page's installed + path, `$(opam var solidtype:doc)/pages/.md`, in its `.mli`'s + 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. ## Changes and releases diff --git a/CHANGES.md b/CHANGES.md index faa6463c..39ecbe67 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -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, ``, 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 diff --git a/Makefile b/Makefile index b515656a..04588727 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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 @@ -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 diff --git a/agents/pages/index.md b/agents/pages/index.md index e2ae216d..820df7f1 100644 --- a/agents/pages/index.md +++ b/agents/pages/index.md @@ -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" } } ``` diff --git a/agents/pages/rhp/area.md b/agents/pages/rhp/area.md index e9b898d7..1a840dca 100644 --- a/agents/pages/rhp/area.md +++ b/agents/pages/rhp/area.md @@ -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 diff --git a/agents/pages/rhp/gallery.md b/agents/pages/rhp/gallery.md index 8c4266c9..da430ceb 100644 --- a/agents/pages/rhp/gallery.md +++ b/agents/pages/rhp/gallery.md @@ -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 diff --git a/agents/pages/rhp/helpers.md b/agents/pages/rhp/helpers.md index 18726a0c..c0027cb4 100644 --- a/agents/pages/rhp/helpers.md +++ b/agents/pages/rhp/helpers.md @@ -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 @@ -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 | diff --git a/agents/pages/rhp/scale.md b/agents/pages/rhp/scale.md index 1fc80429..d1bde315 100644 --- a/agents/pages/rhp/scale.md +++ b/agents/pages/rhp/scale.md @@ -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 diff --git a/docs/islands/rhp_area_violin.mlx b/docs/islands/rhp_area_violin.mlx index 07330f80..a836a782 100644 --- a/docs/islands/rhp_area_violin.mlx +++ b/docs/islands/rhp_area_violin.mlx @@ -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 diff --git a/docs/islands/rhp_histogram.mlx b/docs/islands/rhp_histogram.mlx index 00c89f0b..68bda8c5 100644 --- a/docs/islands/rhp_histogram.mlx +++ b/docs/islands/rhp_histogram.mlx @@ -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 diff --git a/docs/islands/rhp_pie.mlx b/docs/islands/rhp_pie.mlx index 3ffa2d38..d9c111d6 100644 --- a/docs/islands/rhp_pie.mlx +++ b/docs/islands/rhp_pie.mlx @@ -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 diff --git a/docs/islands/rhp_scale_axis.mlx b/docs/islands/rhp_scale_axis.mlx index d66e8bc2..ca24734e 100644 --- a/docs/islands/rhp_scale_axis.mlx +++ b/docs/islands/rhp_scale_axis.mlx @@ -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 diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 2182cc05..392189b5 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -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" } } ``` diff --git a/docs/src/content/docs/rhp/helpers.mdx b/docs/src/content/docs/rhp/helpers.mdx index d6e5fc8e..8c55d32f 100644 --- a/docs/src/content/docs/rhp/helpers.mdx +++ b/docs/src/content/docs/rhp/helpers.mdx @@ -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 | diff --git a/generate/binding.ts b/generate/binding.ts index 4ba8c08d..4d5c47d4 100644 --- a/generate/binding.ts +++ b/generate/binding.ts @@ -3,1002 +3,31 @@ // mapped, each part a component and its props check, each function and value // an external, and the types they name, each a module of Types. What is one // library's own -- which entries it binds, how its parts and their options are -// named -- is its generator's, which binds it once, by bind, and calls these. +// named -- is its generator's, which binds it once, by bind, and calls what +// bind gives. import ts from "typescript"; -import { readFileSync } from "node:fs"; -import { keywords, label, record, snake } from "./names.ts"; -import { domType, isString, isTag } from "./melange.ts"; -import { apply, isArrow, name as tname, paren, print, vars as typeVarsOf, type Param, type Type } from "./ocaml.ts"; -import { Source } from "./source.ts"; - -export type Library = { - // Its name, as its odoc says it: Kobalte. - name: string; - // Whether a function throws though its documentation does not say so, by - // its module and name: Color.toFormat. - throwsUndocumented: (where: string) => boolean; - // The OCaml type of a declared type the library's binding ports by hand, - // by its symbol, its type arguments mapped, and whether undefined is - // already an optional prop's absence; undefined for any other, which the - // core maps by its rules. - ported?: (symbol: ts.Symbol, args: Type[], absent: boolean) => Type | undefined; - // Whether a number is a small whole one where it is met, by where: an int - // where the binding knows it fits 32 bits; a float anywhere else. - whole?: (where: string) => boolean; - // The classes whose values are one type of Types, Value, a kind each, and - // the structural interfaces they satisfy: a union of the classes, or one of - // those interfaces, is the kinds of the classes TypeScript takes for it, an - // open set, so a value of any of them is passed as it is. - kinds?: { classes: ts.Symbol[]; structural: ts.Symbol[] }; - // Whether an object type's members typed any are the caller's own data, - // given in and handed back only to the caller's functions: they are one - // type variable of the type, 'data, never read back out as another. - data?: (symbol: ts.Symbol) => boolean; -}; - -// The type variable the caller's data is, in a type whose any is its data. -const DATA = "Data"; - -// What a run binds: one library, read by one checker, from the repository at -// root. A generator binds one library and then exits, so it is set once. -let root: string; -let checker: ts.TypeChecker; -let library: Library; - -// A type nothing the binding reaches names, bound as a module of Types all -// the same: a class a library exports alone, its constructor the way in. -export function reach(symbol: ts.Symbol): void { - namedModule(symbol, checker.getDeclaredTypeOfSymbol(symbol)); -} - -export function bind(repository: string, typeChecker: ts.TypeChecker, bound: Library): void { - root = repository; - checker = typeChecker; - library = bound; - htmlModules = readHtmlModules(); - attributeNames = readAttributeNames(); -} - -// What a run has not bound, by where it was met, and each name a user writes -// with its JavaScript name, for the ppx's table. -export const unmapped = new Map(); -export const names = new Map(); - -// Read once a run has begun: solidtype's Html, as the build has it. -const html = () => readFileSync(`${root}src/html.mli`, "utf8"); - -// The elements solidtype's Html has a module for. -let htmlModules: Set; -const readHtmlModules = () => new Set( - html().match(/^module [A-Z][A-Za-z0-9]* :/gm)?.map((m) => m.slice(7, -2)) ?? [], -); - - -export const value = (name: string) => (keywords.has(name) ? `${name}_` : name); -export const named = (name: string) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(name); - - -// The named object types the bindings reach, each a module of Types. -type Named = { - module: string; - symbol: ts.Symbol | null; - type: ts.Type; - params: string[]; - // The standard types an intersection is too, each a conversion. - conversions: string[]; -}; -const types = new Map(); -const queue: Named[] = []; -const moduleNames = new Set(); - -function freshModule(name: string): string { - let n = name.replace(/[^A-Za-z0-9_]/g, "_"); - n = n.charAt(0).toUpperCase() + n.slice(1); - let k = n; - for (let i = 2; moduleNames.has(k); i++) k = `${n}${i}`; - moduleNames.add(k); - return k; -} - -// The package a symbol is declared in: the last node_modules in its path, -// since a store such as Bun's nests packages under its own. -function moduleOf(symbol: ts.Symbol): string | null { - const file = symbol.declarations?.[0]?.getSourceFile().fileName ?? ""; - const m = file.match(/.*node_modules\/((?:@[^/]+\/)?[^/]+)\//); - return m ? m[1]! : null; -} - -function isDomLib(symbol: ts.Symbol): boolean { - const file = symbol.declarations?.[0]?.getSourceFile().fileName ?? ""; - return /typescript\/lib\/lib\./.test(file); -} - -type Vars = Map; - -function typeVar(name: string, vars: Vars): Type { - let v = vars.get(name); - if (!v) { - v = { kind: "var", name: snake(name) }; - vars.set(name, v); - } - return v; -} - -// A declaration of a name already bound that TypeScript takes for it both -// ways -- @internationalized/number's NumberFormatOptions, which extends -// Intl's with a member Intl's has -- is that type, so a value of one is -// passed where the other is asked. -function sameAs(symbol: ts.Symbol, type: ts.Type): Named | undefined { - for (const n of types.values()) { - if (n.symbol?.name === symbol.name && n.params.length === 0 - && checker.isTypeAssignableTo(type, n.type) && checker.isTypeAssignableTo(n.type, type)) return n; - } - return undefined; -} - -function namedModule(symbol: ts.Symbol, type: ts.Type): Named { - let n = types.get(symbol) ?? sameAs(symbol, type); - if (n) types.set(symbol, n); - if (!n) { - const decl = symbol.declarations?.[0]; - const params = - decl && (ts.isInterfaceDeclaration(decl) || ts.isClassDeclaration(decl) || ts.isTypeAliasDeclaration(decl)) - ? (decl.typeParameters ?? []).map((p) => p.name.text) - : []; - const hasAny = (t: ts.Type) => /\bany\b/.test(checker.typeToString(t)); - if (library.data?.(symbol) && checker.getPropertiesOfType(type).some((p) => hasAny(checker.getTypeOfSymbol(p)))) params.push(DATA); - n = { module: freshModule(symbol.name), symbol, type, params, conversions: [] }; - types.set(symbol, n); - queue.push(n); - } - return n; -} - -// An object type with no name of its own -- an inline type, an -// intersection, a const's typeof -- named by where it is first met. -function anonymousModule(type: ts.Type, where: string): Named { - let n = types.get(type); - if (!n) { - n = { - module: freshModule(where.split(".").map((w) => w.split("-").map((x) => x.charAt(0).toUpperCase() + x.slice(1)).join("")).join("_")), - symbol: null, - type, - params: [], - conversions: [], - }; - types.set(type, n); - queue.push(n); - } - return n; -} - -const readable = new Set([ - "File", "DateTimeFormatOptions", "NumberFormatOptions", "CollatorOptions", - "Collator", "NumberFormat", "DateTimeFormat", "DateTimeFormatPart", - "ResolvedDateTimeFormatOptions", -]); -const opaques = new Set(); -function opaque(name: string): string { - opaques.add(name); - return name; -} - -const isElement = (t: ts.Type) => t.aliasSymbol?.name === "Element" && moduleOf(t.aliasSymbol) === "solid-js"; - -// A type parameter bound by a DOM element, the element a hook is given, is -// any element, as solidtype's own functions of an element take one: Html -// types an element Melange has no type for, a
    , as Dom.element. -function elementBound(t: ts.Type, vars: Vars): Type | null { - const c = checker.getBaseConstraintOfType(t); - const symbol = c?.getSymbol(); - const dom = symbol && isDomLib(symbol) ? domType(symbol.name) : null; - return dom ? apply("Dom.element_like", typeVar(t.symbol?.name ?? "t", vars)) : null; -} - -// Which way a value being mapped crosses: given to JavaScript, as a prop is; -// read from it, as a function's result is; or both, as a field its object's -// constructor takes and its getter reads. A function's parameters cross the -// other way to the function itself. -type Polarity = "given" | "read" | "both"; -let polarity: Polarity = "both"; -const flip = (p: Polarity): Polarity => (p === "given" ? "read" : p === "read" ? "given" : "both"); -function crossing(p: Polarity, f: () => T): T { - const outer = polarity; - polarity = p; - try { - return f(); - } finally { - polarity = outer; - } -} - -// TypeScript's null, by AGENTS.md's "Kobalte's binding is generated from its -// declarations": given, `T | null` is Js.Null.t, which cannot hold the -// undefined a library reads as no value given, so an option is made one only -// by Js.Null.fromOption, whose None is null; read, or `T | null | undefined` -// given, it is Js.Nullable.t, which takes whatever JavaScript holds. -const nullOf = (undefinable: boolean) => - polarity === "given" && !undefinable ? "Js.Null.t" : "Js.Nullable.t"; - -// [absent] drops undefined, which an optional prop's absence already says; -// anywhere else -- a callback's argument, a result -- it is an option. -// The OCaml type of a TypeScript one, by AGENTS.md's "Kobalte's binding is -// generated from its declarations"; null when none of its mappings covers it. -function map(t: ts.Type, vars: Vars, where: string, absent = false): Type | null { - if (t.flags & ts.TypeFlags.TypeParameter) return elementBound(t, vars) ?? typeVar(t.symbol?.name ?? "t", vars); - const hand = portedType(t, vars, where, absent); - if (hand) return hand; - if (isElement(t)) return jsxElement; - // Exclude and its kind: the type it narrows. - if (t.flags & ts.TypeFlags.Conditional) return map((t as ts.ConditionalType).checkType, vars, where); - if (t.flags & ts.TypeFlags.Substitution) return map((t as ts.SubstitutionType).baseType, vars, where); - if (t.flags & ts.TypeFlags.Any && vars.has(DATA)) return vars.get(DATA)!; - if (t.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown | ts.TypeFlags.Never)) return null; - if (t.flags & ts.TypeFlags.Void) return unit; - if (t.flags & ts.TypeFlags.Undefined) return unit; - if (t.isUnion()) { - const undefinable = t.types.some((m) => m.flags & ts.TypeFlags.Undefined); - let members = t.types.filter((m) => !(m.flags & ts.TypeFlags.Undefined)); - // An accessor that takes a key or a function takes the function alone; - // one that takes only a key, Select's optionGroupChildren, takes its - // name, which OCaml cannot check. - const keys = members.filter((m) => m.flags & ts.TypeFlags.Index); - members = members.filter((m) => !(m.flags & ts.TypeFlags.Index)); - if (members.length === 0 && keys.length > 0) return tname("string"); - // Solid's element, inlined, holds null and undefined of its own. - const isJsx = members.some((m) => m.getSymbol()?.name === "ArrayElement" && moduleOf(m.getSymbol()!) === "solid-js"); - const nullable = !isJsx && members.some((m) => m.flags & ts.TypeFlags.Null); - if (!isJsx) members = members.filter((m) => !(m.flags & ts.TypeFlags.Null)); - const inner = mapUnion(members, vars, where); - if (!inner) return null; - const value = nullable ? apply(nullOf(undefinable && !absent), inner) : inner; - return undefinable && !absent && !isJsx && !isUnit(inner) && !nullable ? apply("option", value) : value; - } - return mapUnion([t], vars, where); -} - -const jsxElement = tname("Solidtype.Jsx.element"); -const unit = tname("unit"); -const isUnit = (t: Type) => t.kind === "name" && t.name === "unit"; -const either = (left: Type, right: Type): Type => ({ kind: "ref", module: "Either", args: [left, right] }); - -// A type as each file names it: inside Types, where the types refer to one -// another, a named type is its flat name; outside, its module's t. -const flatName = (module: string) => `t_${snake(module)}`; -const inside = (module: string) => (module === "Either" ? "either" : flatName(module)); -const outside = (module: string) => `Types.${module}.t`; -const showIn = (t: Type) => print(t, inside); -const argIn = (t: Type) => paren(t, inside); -const showOut = (t: Type) => print(t, outside); -const argOut = (t: Type) => paren(t, outside); - -// Solid's JSX.Element is a union, which TypeScript inlines into a union it is -// part of; its members together are one element. -const isJsxMember = (t: ts.Type) => { - const s = t.getSymbol(); - return s !== undefined && (s.name === "ArrayElement" || s.name === "Node") && - (moduleOf(s) === "solid-js" || isDomLib(s)); -}; - -const number = (where: string) => tname(library.whole?.(where) ? "int" : "float"); - -// A class of the library's kinds, by its kind: CalendarDate's calendar_date. -const kindOf = (symbol: ts.Symbol | undefined) => - symbol && library.kinds?.classes.includes(symbol) ? snake(symbol.name) : null; - -// The kinds a union of the classes is, or a structural interface of theirs: -// those of the classes TypeScript takes for it. -function kindsOf(members: ts.Type[]): Type | null { - const k = library.kinds; - if (!k) return null; - const tags = members.map((m) => kindOf(m.getSymbol())); - if (members.length > 1 && tags.every((t) => t !== null)) return { kind: "kinds", tags: (tags as string[]).sort() }; - const only = members.length === 1 ? members[0]!.getSymbol() : undefined; - if (only && k.structural.includes(only)) { - const taken = k.classes.filter((c) => checker.isTypeAssignableTo(checker.getDeclaredTypeOfSymbol(c), members[0]!)); - if (taken.length > 0) return { kind: "kinds", tags: taken.map((c) => snake(c.name)).sort() }; - } - return null; -} - -function mapUnion(members: ts.Type[], vars: Vars, where: string): Type | null { - if (members.length === 0) return unit; - // A style is a string, as an element's is: Solid's CSSProperties beside - // it is the same declarations as an object. - if (members.some(isString)) { - members = members.filter((m) => !(m.getSymbol()?.name === "CSSProperties" || m.aliasSymbol?.name === "CSSProperties")); - } - if (members.some((m) => m.getSymbol()?.name === "ArrayElement" && moduleOf(m.getSymbol()!) === "solid-js")) { - const rest = members.filter( - (m) => !isJsxMember(m) && !isString(m) && !m.isStringLiteral() && - !(m.flags & (ts.TypeFlags.NumberLike | ts.TypeFlags.BooleanLike | ts.TypeFlags.Null)), - ); - if (rest.length === 0) return jsxElement; - const others = mapUnion(rest, vars, where); - return others ? either(jsxElement, others) : null; - } - if (members.some(isString)) { - const others = members.filter((m) => !isString(m) && !m.isStringLiteral()); - if (others.length === 0) return tname("string"); - // A string beside a function of the caller's data names a field of it, - // which OCaml cannot check: the function is taken alone, as an option - // accessor's key is. - const ofData = others.filter((m) => m.getCallSignatures().some((c) => c.getParameters().some((q) => checker.getTypeOfSymbol(q).flags & ts.TypeFlags.Any))); - if (vars.has(DATA) && ofData.length > 0) return mapUnion(others, vars, where); - } - const booleans = members.filter((m) => m.flags & ts.TypeFlags.BooleanLike); - if (booleans.length === members.length) return tname("bool"); - const strings = members.filter((m) => m.isStringLiteral()).map((m) => (m as ts.StringLiteralType).value); - if (strings.length === members.length) { - return strings.every(isTag) ? { kind: "tags", tags: strings } : tname("string"); - } - if (members.every((m) => m.flags & ts.TypeFlags.NumberLike)) return number(where); - const kinded = kindsOf(members); - if (kinded) return kinded; - if (members.length === 1) return mapOne(members[0]!, vars, where); - // Literals beside other kinds are one member, their own set of tags. - const literals = members.filter((m) => m.isStringLiteral()); - if (literals.length > 0 && literals.length < members.length) { - const rest = members.filter((m) => !m.isStringLiteral()); - const tags = mapUnion(literals, vars, where); - const others = mapUnion(rest, vars, where); - return tags && others ? either(tags, others) : null; - } - // Members of different JavaScript kinds: a type whose values are each - // member as it is, built by a conversion per member. - const kinds = members.map((m) => mapOne(m, vars, where)); - if (kinds.some((k) => k === null)) return null; - const distinct = [...new Map((kinds as Type[]).map((k) => [showIn(k), k])).values()]; - if (distinct.length === 1) return distinct[0]!; - if (distinct.length === 2) return either(distinct[0]!, distinct[1]!); - return null; -} - -// A type the library ports by hand, by its alias or its own name: an alias's -// arguments are its own, an interface's or a class's its reference's. -function portedType(t: ts.Type, vars: Vars, where: string, absent: boolean): Type | null { - const symbol = t.aliasSymbol ?? t.getSymbol(); - if (!library.ported || !symbol) return null; - const given = (t.aliasSymbol ? t.aliasTypeArguments : (t as ts.TypeReference).typeArguments) ?? []; - const args = given.map((a) => map(a, vars, where) ?? tname("_")); - return library.ported(symbol, args, absent) ?? null; -} - -// A property's or a parameter's type as its declaration names it, where that -// is a type the library ports by hand: an optional one's type, made a union -// with undefined, has lost the alias it was declared by. -// A ref is Solid's: given an element or a function of one, it calls the -// function with the element its part draws, so it is that function, as an -// element's ref and Solid's Portal's are, of the element it declares; one -// declared as any of several, a portal's div or g, is any element. -function refOf(t: ts.Type, vars: Vars, where: string): Type { - const fn = (t.isUnion() ? t.types : [t]).find((m) => m.getCallSignatures().length > 0); - const param = fn?.getCallSignatures()[0]?.parameters[0]; - const at = `${where}(element)`; - const element = param ? map(checker.getTypeOfSymbol(param), vars, at, false) : null; - unmapped.delete(at); - return { kind: "arrow", params: [{ type: element ?? tname("Dom.element") }], result: tname("unit") }; -} - -function declaredPorted(p: ts.Symbol, vars: Vars, where: string, absent: boolean): Type | null { - const d = p.valueDeclaration; - const node = d && (ts.isPropertySignature(d) || ts.isPropertyDeclaration(d) || ts.isParameter(d)) ? d.type : undefined; - return node && ts.isTypeReferenceNode(node) ? portedType(checker.getTypeFromTypeNode(node), vars, where, absent) : null; -} - -function mapOne(t: ts.Type, vars: Vars, where: string): Type | null { - if (t.isUnion() || isElement(t) || t.flags & (ts.TypeFlags.Conditional | ts.TypeFlags.Substitution)) - return map(t, vars, where); - const hand = portedType(t, vars, where, false); - if (hand) return hand; - if (t.flags & ts.TypeFlags.TypeParameter) return elementBound(t, vars) ?? typeVar(t.symbol?.name ?? "t", vars); - if (t.flags & ts.TypeFlags.Index) return tname("string"); - if (checker.isTupleType(t)) { - const items = checker.getTypeArguments(t as ts.TypeReference).map((a) => map(a, vars, where)); - return items.some((i) => i === null) ? null : { kind: "tuple", items: items as Type[] }; - } - if (isString(t) || t.isStringLiteral()) return tname("string"); - if (t.flags & ts.TypeFlags.BooleanLike) return tname("bool"); - if (t.flags & ts.TypeFlags.NumberLike) return number(where); - if (t.flags & (ts.TypeFlags.Void | ts.TypeFlags.Undefined)) return unit; - if (t.flags & ts.TypeFlags.Any && vars.has(DATA)) return vars.get(DATA)!; - if (t.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown | ts.TypeFlags.Never | ts.TypeFlags.Null)) return null; - const libraryAlias = t.aliasSymbol && isDomLib(t.aliasSymbol); - if (libraryAlias && t.aliasSymbol!.name === "NonNullable" && t.aliasTypeArguments?.[0]) - return map(t.aliasTypeArguments[0], vars, where); - // Required: a type of its own, whose every field is there, - // named for both. - const required = libraryAlias && t.aliasSymbol!.name === "Required" ? t.aliasTypeArguments?.[0] : undefined; - const requiredName = required && (required.aliasSymbol ?? required.getSymbol())?.name; - if (requiredName && named(requiredName)) return reference(anonymousModule(t, `Required${requiredName}`), t, undefined, vars, where); - // A standard alias -- Partial, Omit -- is the type it makes. - const alias = libraryAlias ? undefined : t.aliasSymbol; - // A type of one argument, the argument mapped. - const of = (n: string, arg: ts.Type | undefined) => { - const a = arg ? map(arg, vars, where) : null; - return a ? apply(n, a) : null; - }; - if (alias?.name === "Accessor") return of("Solidtype.Solid.accessor", t.aliasTypeArguments?.[0]); - if (alias?.name === "Setter") return of("Solidtype.Solid.setter", t.aliasTypeArguments?.[0]); - const symbol = t.getSymbol(); - const name = symbol?.name ?? ""; - if (name === "Element" && moduleOf(symbol!) === "solid-js") return jsxElement; - if (alias?.name === "Element" || /JSX\.Element/.test(checker.typeToString(t))) return jsxElement; - if (checker.isArrayType(t)) return of("array", checker.getTypeArguments(t as ts.TypeReference)[0]); - if (name === "Set" && symbol && isDomLib(symbol)) return of("Js.Set.t", checker.getTypeArguments(t as ts.TypeReference)[0]); - if (name === "Iterable") { - return of("array", (t as ts.TypeReference).typeArguments?.[0] ?? checker.getTypeArguments(t as ts.TypeReference)[0]); - } - if (symbol && isDomLib(symbol)) { - if (name === "Date") return tname("Js.Date.t"); - if (name === "RegExp") return tname("Js.Re.t"); - if (name === "Map") { - const [k, v] = checker.getTypeArguments(t as ts.TypeReference).map((a) => map(a, vars, where)); - return k && v ? apply("Js.Map.t", k, v) : null; - } - if (name === "Promise") return of("Js.Promise.t", checker.getTypeArguments(t as ts.TypeReference)[0]); - // An interface or a class named for an event or an element is one, but - // never a method that happens to be named so, initEvent. - const kind = symbol.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.Class); - const dom = domType(name) ?? (kind && /Event$/.test(name) ? "Dom.event" : kind && /Element$/.test(name) ? "Dom.element" : null); - if (dom) return tname(dom); - // A standard interface is opaque but for those a user builds or reads; - // anything else of the standard library is a function or not bound. - const declared = symbol.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.Class); - if (declared && named(name) && !name.startsWith("__") && !readable.has(name)) return { kind: "ref", module: opaque(name), args: [] }; - if (!readable.has(name)) { - const calls = t.getCallSignatures(); - return calls.length > 0 && t.getProperties().length === 0 ? mapFunction(calls[0]!, vars, where) : null; - } - } - const calls = t.getCallSignatures(); - if (calls.length > 0 && t.getProperties().length === 0) return mapFunction(calls[0]!, vars, where); - if (calls.length > 0 && name === "Component") { - // A component prop: a function from the props Kobalte gives it. - return mapFunction(calls[0]!, vars, where); - } - const anonymous = !symbol || symbol.name === "__type" || symbol.name === "__object"; - // Solid's handler argument, an event with its current target and target - // named, is the event, as an element's handler in Html takes it. - if (t.isIntersection()) { - const event = t.types.find((m) => { - const e = m.getSymbol(); - return e !== undefined && isDomLib(e) && /Event$/.test(e.name); - }); - const targets = t.types.filter((m) => m !== event); - if (event && targets.every((m) => checker.getPropertiesOfType(m).every((p) => p.name === "currentTarget" || p.name === "target"))) { - return mapOne(event, vars, where); - } - } - if (t.isIntersection()) { - // Its own members are the module's; a standard member is a conversion. - const standard = t.types.filter((m) => m.getSymbol() && isDomLib(m.getSymbol()!)); - const own = t.types.filter((m) => !standard.includes(m) && m.getProperties().length > 0); - if (own.length === 0) return standard[0] ? mapOne(standard[0], vars, where) : null; - const n = alias ? namedModule(alias, t) : anonymousModule(t, where); - const ref = reference(n, t, alias, vars, where); - if (n.conversions.length === 0) { - for (const m of standard) { - const d = mapOne(m, vars, where); - if (d?.kind === "name" && d.name.startsWith("Dom.")) n.conversions.push(d.name); - } - } - return ref; - } - if (anonymous && t.getProperties().length > 0) { - const n = alias ? namedModule(alias, t) : anonymousModule(t, where); - return reference(n, t, alias, vars, where); - } - if (symbol && (symbol.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.Class | ts.SymbolFlags.TypeLiteral | ts.SymbolFlags.TypeAlias))) { - const owner = alias ?? symbol; - return reference(namedModule(owner, t), t, alias, vars, where); - } - return null; -} - -// A named type's reference, its type arguments applied, one it cannot map -// left to the compiler, _. -function reference(n: Named, t: ts.Type, alias: ts.Symbol | undefined, vars: Vars, where: string): Type { - const args = (alias ? t.aliasTypeArguments : (t as ts.TypeReference).typeArguments) ?? []; - return { kind: "ref", module: n.module, args: n.params.map((_, i) => (args[i] ? map(args[i]!, vars, where) : null) ?? tname("_")) }; -} - -// Whether a parameter may be left out: optional, or with a default, but not -// a rest of them. -function leftOut(q: ts.Symbol): boolean { - const d = q.valueDeclaration; - return !!d && ts.isParameter(d) && !d.dotDotDotToken && (d.questionToken !== undefined || d.initializer !== undefined); -} - -// A function's OCaml type. [labelled], for a function the user calls, an -// external, writes a parameter that may be left out as an optional argument, -// ?name, followed by unit, as the stdlib does; a function JavaScript calls -// takes its arguments by position, so there it is an option. -function mapFunction(sig: ts.Signature, vars: Vars, where: string, labelled = false): Extract | null { - const ps = sig.getParameters(); - const params: (Param | null)[] = ps.map((q) => { - const optional = labelled && leftOut(q); - const t = checker.getTypeOfSymbol(q); - const m = crossing(flip(polarity), () => - declaredPorted(q, vars, where, optional) ?? map(optional ? checker.getNonNullableType(t) : t, vars, where)); - if (m === null) return null; - return optional ? { label: value(snake(q.name)), optional: true, type: m } : { type: m }; - }); - if (params.some((p) => p === null)) return null; - // What a function JavaScript calls gives back as any, JavaScript ignores. - const returned = sig.getReturnType(); - const result = !labelled && returned.flags & ts.TypeFlags.Any ? unit : map(returned, vars, where); - if (!result) return null; - const args = params.length === 0 ? [{ type: unit }] : (params as Param[]); - if (labelled && ps.some(leftOut)) args.push({ type: unit }); - return { kind: "arrow", params: args, result }; -} - -// Whether reading a member gives a type variable that neither its module nor -// its own arguments fix: a value whose type its caller would choose, an -// unchecked cast, so it is not read. A variable an argument fixes, a generic -// function's, is the function's own. -function unbound(t: Type, params: string[]): boolean { - const fixed = new Set([...params, ...(isArrow(t) ? t.params.flatMap((p) => typeVarsOf(p.type)) : [])]); - return typeVarsOf(isArrow(t) ? t.result : t).some((v) => !fixed.has(v)); -} - -// Every attribute any element has, from Html: a CommonProps member that is -// none of them, Search.Indicator's loadingComponent, is the part's own. -let attributeNames: Set; -const readAttributeNames = () => new Set( - html().match(/^ type [A-Za-z_0-9]+ =/gm)?.map((t) => t.slice(7, -2)) ?? [], -); - -function fixedElement(decl: ts.SignatureDeclaration): { element: string; own: ts.Symbol[] } | null { - const param = decl.parameters[0]?.type; - if (!param || !ts.isTypeReferenceNode(param)) return null; - const symbol = checker.getSymbolAtLocation(param.typeName); - const alias = symbol && real(symbol).declarations?.find(ts.isTypeAliasDeclaration); - if (alias && ts.isTypeReferenceNode(alias.type) && /ComponentProps$/.test(alias.type.typeName.getText())) { - const arg = alias.type.typeArguments?.[0]; - if (arg && ts.isLiteralTypeNode(arg) && ts.isStringLiteral(arg.literal)) return { element: arg.literal.text, own: [] }; - } - const props = symbol && real(symbol).declarations?.find(ts.isInterfaceDeclaration); - if (!props) return null; - for (const clause of props.heritageClauses ?? []) { - for (const base of clause.types) { - const arg = base.typeArguments?.[0]; - if (/ComponentProps$/.test(base.expression.getText()) && arg && ts.isLiteralTypeNode(arg) && ts.isStringLiteral(arg.literal)) { - const type = checker.getTypeAtLocation(props.name); - const own = checker.getPropertiesOfType(type).filter((p) => p.declarations?.some((d) => d.parent === props)); - return { element: arg.literal.text, own }; - } - } - } - return null; -} - -export type Given = { element: string | null; own: ts.Symbol[] }; - -// The attributes of an element solidtype's Html has a module for, each as a -// user writes it: those of the signature its module has, and the ones every -// element has, which that signature includes. -export function elementAttributes(element: string): Set { - const text = html(); - const m = element.charAt(0).toUpperCase() + element.slice(1); - const signature = text.match(new RegExp(`^module ${m} : (\\w+) with`, "m"))?.[1]; - if (!signature) throw new Error(`Html has no module ${m}`); - const body = (name: string) => text.match(new RegExp(`^module type ${name} = sig\\n([\\s\\S]*?)^end$`, "m"))?.[1] ?? ""; - const types = (b: string) => b.match(/^ type [A-Za-z_0-9]+ =/gm)?.map((t) => t.slice(7, -2)) ?? []; - return new Set([...types(body("Dom_attributes")), ...types(body(signature))]); -} - -// One part's binding, its component [js] from [jsModule] and its props -// check -- its options, a spread, then its children, then its element's -// attributes -- -// [where] naming it in what is not bound. [extra] are props of its own its -// options do not hold, a library's shared props that are no attribute. -// [given], where the library's generator knows them, are the element the -// part renders and the props of its own, in place of what the core reads -// from Kobalte's shapes of a declaration. -export function part(src: Source, jsModule: string, where: string, decl: ts.SignatureDeclaration, options: ts.Type | null, extra: ts.Symbol[], js: string, given?: Given): void { - const vars: Vars = new Map(); - const tp = decl.typeParameters?.find((p) => p.default && /ValidComponent/.test(p.constraint?.getText() ?? "")); - const polymorphic = tp?.default && ts.isLiteralTypeNode(tp.default) ? (tp.default.literal as ts.StringLiteral).text : null; - // A part that is not polymorphic renders the element its props extend, - // ComponentProps<"input">, and its options are that interface's own. - const fixed = polymorphic ? null : fixedElement(decl); - const element = given ? given.element : (polymorphic ?? fixed?.element ?? null); - const commons = extra.filter((p) => !attributeNames.has(label(p.name))); - // A part with neither options nor an element, I18nProvider, takes the - // props its signature declares. - const declaredProps = (): ts.Symbol[] => { - const param = decl.parameters[0]; - return param ? checker.getPropertiesOfType(checker.getTypeAtLocation(param)) : []; +import { emitters } from "./emit.ts"; +import { Binding, type Library } from "./library.ts"; +import { mapping } from "./mapping.ts"; +import { typesFiles } from "./types_file.ts"; + +export type { Library } from "./library.ts"; +export type { Given } from "./emit.ts"; + +export function bind(root: string, checker: ts.TypeChecker, library: Library) { + const b = new Binding(root, checker, library); + const m = mapping(b); + const e = emitters(b, m); + return { + part: e.part, + doc: e.doc, + functionBinding: e.functionBinding, + valueBinding: e.valueBinding, + real: b.real, + reach: b.reach, + refusals: () => b.refusals(), + names: b.names, + typesFiles: (header: string) => typesFiles(b, m, e, header), }; - const own = given - ? given.own - : [...(options ? checker.getPropertiesOfType(options) : (fixed?.own ?? (polymorphic ? [] : declaredProps()))), ...commons]; - const args: string[] = []; - let children = "?children:('f, [ `elements ]) Solidtype.Check.children ->"; - for (const p of own) { - if (!named(p.name)) continue; - const pt = checker.getTypeOfSymbol(p); - const optional = (p.flags & ts.SymbolFlags.Optional) !== 0; - // A prop only false, as a single-value root's multiple, is not given. - if (pt.isUnion() && pt.types.every((m) => m.flags & (ts.TypeFlags.BooleanLiteral | ts.TypeFlags.Undefined)) && - pt.types.filter((m) => m.flags & ts.TypeFlags.BooleanLiteral).length === 1 && checker.typeToString(pt).includes("false")) continue; - const t: Type | null = - p.name === "ref" - ? refOf(pt, vars, `${where}.${p.name}`) - : crossing("given", () => - declaredPorted(p, vars, `${where}.${p.name}`, optional) ?? map(pt, vars, `${where}.${p.name}`, optional)); - if (!t) { - unmapped.set(`${where}.${p.name}`, checker.typeToString(pt)); - continue; - } - if (p.name === "children") { - // Children: elements, a function of the part's own, or either. - const render = t.kind === "ref" && t.module === "Either" && showOut(t.args[0]!) === showOut(jsxElement) ? t.args[1] : undefined; - const q = optional ? "?" : ""; - children = render - ? `${q}children:(${showOut(render)}, [ \`elements | \`render ]) Solidtype.Check.children ->` - : isArrow(t) - ? `${q}children:(${showOut(t)}, [ \`render ]) Solidtype.Check.children ->` - : `${q}children:('f, [ \`elements ]) Solidtype.Check.children ->`; - continue; - } - const name = record(names, p.name); - const checked = isArrow(t) ? `(${showOut(t)})` : `${argOut(t)} Solidtype.Check.value`; - args.push(`${optional ? "?" : ""}${name}:${checked} ->`); - } - // A spread, props=p, as TSX's {...p}: the rest of a component's props - // passed on, its data- attributes, which any part takes. - const html = element ? element.charAt(0).toUpperCase() + element.slice(1) : null; - // What a part Kobalte draws by its polymorphic `as` draws in its place: a - // function of the props it is to spread, which Solid takes for a component. - if (polymorphic && html && htmlModules.has(html)) args.push(`?as_:(Solidtype.Html.${html}.props -> Solidtype.Jsx.element) ->`); - args.push("?props:'spread Solidtype.Solid.rest ->"); - const tail = `${children} unit -> unit`; - const check = html && htmlModules.has(html) ? `(${tail}) Solidtype.Html.${html}.check` : tail; - src.module(" ", "Props", () => - src.both( - ` external check :`, - ...args.map((a) => ` ${a}`), - ` ${check} = "check"`, - ` [@@mel.module "vite-plugin-solidtype/markers"]`, - ), - ); - src.both( - ``, - ` external component : unit Solidtype.Jsx.component = "${js}"`, - ` [@@mel.module "${jsModule}"]`, - ); -} - -// The library's comment on a declaration, as odoc: its documentation is the -// binding's. -export function doc(symbol: ts.Symbol, indent: string, raises = false): string[] { - // A package a comment names, @bezda/rhp/rhp.css, is read by TypeScript as - // a tag, and the comment after it with it: it is given back as written. - const named = symbol.getJsDocTags(checker).filter((t) => ts.displayPartsToString(t.text).startsWith("/")); - const text = [ts.displayPartsToString(symbol.getDocumentationComment(checker)), ...named.map((t) => `@${t.name}${ts.displayPartsToString(t.text)}`)] - .join(" ") - .trim(); - const escaped = text.replace(/\*\)/g, "* )").replace(/[{}\[\]@]/g, (c) => `\\${c}`); - // odoc reads an @ as a tag's, so a library's scope is escaped. - const raise = raises ? `Raises [Invalid_argument] with ${library.name.replace(/@/g, "\\@")}'s message, where it throws.` : ""; - const all = [escaped, raise].filter((t) => t !== "").join("\n\n"); - if (!all) return []; - return [`${indent}(** ${all.split("\n").join(`\n${indent} `)} *)`]; -} - -// A function the library documents as throwing, or one it names as throwing -// undocumented: a precondition the caller broke, raised as Invalid_argument -// with the library's message. One at the top of a module reads input from -// outside, so it also has an _opt that gives None for it. -const throws = (symbol: ts.Symbol, where: string) => - library.throwsUndocumented(where) || /\bthrows\b/i.test(ts.displayPartsToString(symbol.getDocumentationComment(checker))); - -// The OCaml function over [js], an external that may throw, of [type], -// written into [src]: [self] its object where it is a method, and [opt] -// whether an _opt is written beside. It takes [sig]'s arguments as the -// external does: by position, and one that may be left out as ?name, then (). -// The interface declares each function, and leaves the external out. -function guarded(src: Source, indent: string, name: string, type: Extract, show: (t: Type) => string, js: string, sig: ts.Signature, self: boolean, opt: boolean): void { - const ps = sig.getParameters(); - const named = ps.map((q, i) => (leftOut(q) ? `?${value(snake(q.name))}` : `x${i}`)); - if (ps.some(leftOut)) named.push("()"); - const xs = named.length === 0 ? "()" : named.join(" "); - const args = self ? `o ${xs}` : xs; - src.implementation( - `${indent}let ${name} ${args} =`, - `${indent} match ${js} ${args} with`, - `${indent} | v -> v`, - `${indent} | exception Js.Exn.Error e -> invalid_arg ("${name}: " ^ Option.value (Js.Exn.message e) ~default:"")`, - ); - src.interface(`${indent}val ${name} : ${show(type)}`); - if (opt) { - src.implementation(`${indent}let ${name}_opt ${args} = match ${js} ${args} with v -> Some v | exception Js.Exn.Error _ -> None`); - src.interface(`${indent}val ${name}_opt : ${show({ ...type, result: apply("option", type.result) })}`); - } -} - -export const real = (s: ts.Symbol) => (s.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(s) : s); - -// A function the library exports, [jsName] of [jsModule], as an external: -// one that may throw under a wrapper that raises, with an _opt beside it. -export function functionBinding(src: Source, symbol: ts.Symbol, jsName: string, jsModule: string, where: string): void { - const sig = checker.getSignaturesOfType(checker.getTypeOfSymbol(symbol), ts.SignatureKind.Call)[0]; - const t = sig ? crossing("read", () => mapFunction(sig, new Map(), where, true)) : null; - if (!t) { - unmapped.set(where, sig ? checker.signatureToString(sig) : "?"); - return; - } - const name = value(snake(jsName)); - if (sig && isArrow(t.result)) { - returnsFunction(src, symbol, name, t, t.result, sig, jsName, jsModule); - return; - } - if (sig && throws(symbol, jsName)) { - src.implementation(` external ${name}_js : ${showOut(t)} = "${jsName}"`, ` [@@mel.module "${jsModule}"]`); - src.both(...doc(symbol, " ", true)); - guarded(src, " ", name, t, showOut, `${name}_js`, sig, false, true); - src.both(``); - return; - } - src.both(...doc(symbol, " ")); - src.both(` external ${name} : ${showOut(t)} = "${jsName}"`, ` [@@mel.module "${jsModule}"]`, ``); -} - -// A function that returns one, every(step): Melange counts an external's -// arguments through the parentheses of its result, so a curried result would -// make every(step) wait for the result's own arguments and call rhp with all -// of them at once. The external returns it uncurried, and the function wraps -// it once, curried; one that may throw raises where it is called, with an -// _opt beside it. -function returnsFunction(src: Source, symbol: ts.Symbol, name: string, t: Extract, returned: Extract, sig: ts.Signature, jsName: string, jsModule: string): void { - const uncurried = tname(`(${returned.params.map((p) => argOut(p.type)).join(" -> ")} -> ${argOut(returned.result)} [@u])`); - const ps = sig.getParameters(); - const named = ps.map((q, i) => (leftOut(q) ? `?${value(snake(q.name))}` : `x${i}`)); - if (ps.some(leftOut)) named.push("()"); - const xs = named.length === 0 ? "()" : named.join(" "); - // A function of no arguments takes (), as JavaScript calls it with none. - const none = returned.params.length === 1 && isUnit(returned.params[0]!.type); - const ys = none ? "()" : returned.params.map((_, i) => `y${i}`).join(" "); - const curried = `fun ${ys} -> (r ${ys} [@u])`; - const raises = throws(symbol, jsName); - src.implementation(` external ${name}_js : ${showOut({ ...t, result: uncurried })} = "${jsName}"`, ` [@@mel.module "${jsModule}"]`); - src.both(...doc(symbol, " ", raises)); - if (raises) { - src.implementation( - ` let ${name} ${xs} =`, - ` match ${name}_js ${xs} with`, - ` | r -> ${curried}`, - ` | exception Js.Exn.Error e -> invalid_arg ("${name}: " ^ Option.value (Js.Exn.message e) ~default:"")`, - ` let ${name}_opt ${xs} = match ${name}_js ${xs} with r -> Some (${curried}) | exception Js.Exn.Error _ -> None`, - ); - src.interface(` val ${name} : ${showOut(t)}`, ` val ${name}_opt : ${showOut({ ...t, result: apply("option", t.result) })}`); - } else { - src.implementation(` let ${name} ${xs} = let r = ${name}_js ${xs} in ${curried}`); - src.interface(` val ${name} : ${showOut(t)}`); - } - src.both(``); -} - -// A value the library exports, as an external. -export function valueBinding(src: Source, symbol: ts.Symbol, jsName: string, jsModule: string, where: string): void { - // A value: toaster, the storage managers, the default translations. - const vt = checker.getTypeOfSymbol(symbol); - if (vt.getCallSignatures().length > 0 && vt.getProperties().length > 0) return; - const t = crossing("read", () => map(vt, new Map(), where)); - if (!t || typeVarsOf(t).length > 0) { - unmapped.set(where, checker.typeToString(vt)); - return; - } - src.both(` external ${value(snake(jsName))} : ${showOut(t)} = "${jsName}"`, ` [@@mel.module "${jsModule}"]`, ``); -} - -// Types, as its file and its interface: each named type the bindings reached, -// abstract, a getter per property, a method per method, and a constructor -// where it has none and is not a class, under [header], a comment. -export function typesFiles(header: string): { ml: string; mli: string } { -const abstracts: string[] = []; -const done = new Set(); -const signatures: Source[] = []; -while (queue.length > 0) { - const n = queue.shift()!; - const key = n.symbol ?? n.type; - if (done.has(key)) continue; - done.add(key); - const vars: Vars = new Map(); - const vs = n.params.map((p) => typeVar(p, vars)); - const params = vs.flatMap(typeVarsOf); - const self: Type = vs.length === 0 ? tname("t") : apply("t", ...vs); - const t = showIn(self); - const declared = n.symbol && !(n.symbol.flags & ts.SymbolFlags.TypeAlias) ? checker.getDeclaredTypeOfSymbol(n.symbol) : n.type; - const flat = showIn(vs.length === 0 ? tname(flatName(n.module)) : apply(flatName(n.module), ...vs)); - const kind = kindOf(n.symbol ?? undefined); - abstracts.push(kind ? ` type ${flat} = [ \`${kind} ] t_value` : ` type ${flat}`); - const src = new Source(); - signatures.push(src); - src.both(...(n.symbol ? doc(n.symbol, " ") : [])); - src.module(" ", n.module, () => { - src.both(` type ${t} = ${flat}`); - const isClass = n.symbol !== null && (n.symbol.flags & ts.SymbolFlags.Class) !== 0; - // A standard type is Melange's to bind, but for one a user builds or - // reads, whose fields, methods and constructor are bound here. - const library = n.symbol !== null && isDomLib(n.symbol) && !readable.has(n.symbol.name); - const fields: [string, Type, boolean][] = []; - // A function a field holds, wrapped once by [make] into the shape its type - // declares: OCaml writes [fun id () -> ...] and [fun id -> fun () -> ...] - // as one type but not one arity, and a [let] between two [fun]s keeps - // Melange from merging them. The field stays curried, since Melange drops - // [@mel.as] from an uncurried field of a [@@mel.obj]. - const shaped = new Map string>(); - let methods = 0; - for (const p of checker.getPropertiesOfType(declared)) { - if (!named(p.name)) continue; - // A class's private or protected member is its own, never a user's. - if ((p.declarations ?? []).some((d) => ts.getCombinedModifierFlags(d) & (ts.ModifierFlags.Private | ts.ModifierFlags.Protected))) continue; - // A standard type's members are Melange's, through a conversion. - if (!library && n.conversions.length > 0 && p.declarations?.every((d) => /typescript\/lib\/lib\./.test(d.getSourceFile().fileName))) continue; - const pt = checker.getTypeOfSymbol(p); - const optional = (p.flags & ts.SymbolFlags.Optional) !== 0; - // A standard type's method stays one where a mapped type, Omit, gives it - // back as a property: its declaration is still a method's. - const method = (p.flags & ts.SymbolFlags.Method) !== 0 || (p.declarations ?? []).some((d) => ts.isMethodSignature(d) || ts.isMethodDeclaration(d)); - if (method) { - // The standard library's methods are Melange's to bind. - if (library) continue; - const sig = pt.getCallSignatures()[0]; - const f = sig ? crossing("read", () => mapFunction(sig, vars, `${n.module}.${p.name}`, true)) : null; - if (!f || unbound(f, params)) { - unmapped.set(`${n.module}.${p.name}()`, sig ? checker.signatureToString(sig) : "?"); - continue; - } - methods++; - const name = value(snake(p.name)); - if (sig && throws(p, `${n.module}.${p.name}`)) { - src.implementation(` external ${name}_js : ${t} -> ${showIn(f)} = "${p.name}" [@@mel.send]`); - src.both(...doc(p, " ", true)); - guarded(src, " ", name, { ...f, params: [{ type: self }, ...f.params] }, showIn, `${name}_js`, sig, true, true); - continue; - } - src.both(` external ${name} : ${t} -> ${showIn(f)} = "${p.name}" [@@mel.send]`); - continue; - } - const ft = declaredPorted(p, vars, `${n.module}.${p.name}`, optional) ?? map(pt, vars, `${n.module}.${p.name}`, optional); - if (!ft) { - unmapped.set(`${n.module}.${p.name}`, checker.typeToString(pt)); - continue; - } - fields.push([p.name, ft, optional]); - // Its constructor takes it, but reading it would be a cast. - if (unbound(ft, params)) { - unmapped.set(`${n.module}.${p.name}`, `read as ${showIn(ft)}`); - continue; - } - src.both(...doc(p, " ")); - const sig = checker.getNonNullableType(pt).getCallSignatures()[0]; - // A function is one the mapping writes as an arrow, not a setter, an - // accessor or a type of its own that happens to be callable. - const fn = sig && isArrow(ft) && checker.getNonNullableType(pt).getProperties().length === 0 && !optional - ? mapFunction(sig, vars, `${n.module}.${p.name}`) - : null; - if (sig && library) continue; - if (sig && fn) { - // A function a property holds: read uncurried, as Melange counts an - // external's arguments through parentheses, and called curried. - const arity = sig.getParameters().length; - const xs = Array.from({ length: arity }, (_, i) => `x${i}`); - const getter = `${value(snake(p.name))}_js`; - const args = arity === 0 ? "()" : xs.join(" "); - // A function it returns is uncurried too, since OCaml reads - // a -> (b -> c) as a -> b -> c, and is given back curried. - const returned = sig.getReturnType().getCallSignatures()[0]; - const result = returned ? mapFunction(returned, vars, `${n.module}.${p.name}`) : null; - if (returned && result) { - const argTypes = sig.getParameters().map((q) => map(checker.getTypeOfSymbol(q), vars, n.module)); - const inner = returned.getParameters().length; - const ys = Array.from({ length: inner }, (_, i) => `y${i}`); - const yargs = inner === 0 ? "()" : ys.join(" "); - const params = argTypes.length === 0 ? "unit" : argTypes.map((a) => argIn(a ?? tname("_"))).join(" -> "); - src.implementation( - ` external ${getter} : ${t} -> (${params} -> (${showIn(result)} [@u]) [@u]) = "${p.name}" [@@mel.get]`, - ` let ${value(snake(p.name))} o ${args} = let r = (${getter} o) ${args} [@u] in fun ${yargs} -> r ${yargs} [@u]`, - ); - src.interface(` val ${value(snake(p.name))} : ${t} -> ${params} -> ${argIn(result)}`); - shaped.set(p.name, (f) => `(fun ${args} -> let r = ${f} ${args} in fun ${yargs} -> r ${yargs})`); - } else { - // Called as a method of the object that holds it: an external is - // called directly from another library, where a [let] in a nested - // module goes through Curry, its arity lost. - src.both(` external ${value(snake(p.name))} : ${t} -> ${showIn(crossing("read", () => mapFunction(sig, vars, `${n.module}.${p.name}`, true)) ?? fn)} = "${p.name}" [@@mel.send]`); - } - } else { - src.both(` external ${value(snake(p.name))} : ${t} -> ${optional ? `${argIn(ft)} option` : argIn(ft)} = "${p.name}" [@@mel.get]`); - } - } - // A value Kobalte declares as a DOM node or event, extended, is that value: - // the conversion only forgets what Kobalte added, so it is %identity, named - // as the stdlib names a conversion, to_html_div_element. - for (const d of n.conversions) { - src.both(` external to_${snake(d.slice(4))} : ${t} -> ${d} = "%identity"`); - } - // A class is each interface it declares it implements, which a function - // that takes the interface takes it as: SelectionManager a - // MultipleSelectionManager. - const classDecl = isClass ? n.symbol!.declarations?.find(ts.isClassDeclaration) : undefined; - for (const clause of classDecl?.heritageClauses ?? []) { - if (clause.token !== ts.SyntaxKind.ImplementsKeyword) continue; - for (const e of clause.types) { - // The library's own interfaces; a standard one is Melange's. - const implemented = checker.getTypeAtLocation(e); - const symbol = implemented.getSymbol(); - if (!symbol || isDomLib(symbol)) continue; - const it = map(implemented, vars, n.module); - if (it?.kind === "ref") src.both(` external to_${snake(it.module)} : ${t} -> ${showIn(it)} = "%identity"`); - } - } - if (!isClass && !library && methods === 0 && fields.length > 0 && n.conversions.length === 0) { - const label = ([k, ft, opt]: [string, Type, boolean]) => - `${opt ? "?" : ""}${value(snake(k))}:(${argIn(ft)} [@mel.as "${k}"]) ->`; - if (shaped.size === 0) { - src.both(` external make : ${fields.map(label).join(" ")} unit -> ${t} = "" [@@mel.obj]`); - } else { - const params = fields.map(([k, , opt]) => `${opt ? "?" : "~"}${value(snake(k))}`); - const passed = fields.map(([k, , opt]) => { - const v = value(snake(k)); - const shape = shaped.get(k); - return opt ? `?${v}` : shape ? `~${v}:${shape(v)}` : `~${v}`; - }); - src.implementation( - ` external make_js : ${fields.map(label).join(" ")} unit -> ${t} = "" [@@mel.obj]`, - ` let make ${params.join(" ")} () = make_js ${passed.join(" ")} ()`, - ); - const labels = fields.map(([k, ft, opt]) => `${opt ? "?" : ""}${value(snake(k))}:${argIn(ft)} ->`); - src.interface(` val make : ${labels.join(" ")} unit -> ${t}`); - } - } - if (isClass && n.symbol?.valueDeclaration) { - const mod = moduleOf(n.symbol); - const ctor = checker.getTypeOfSymbolAtLocation(n.symbol, n.symbol.valueDeclaration).getConstructSignatures()[0]; - const f = ctor ? crossing("read", () => mapFunction(ctor, vars, `${n.module}.constructor`, true)) : null; - if (f && mod) { - src.both(` external make : ${showIn({ ...f, result: self })} = "${n.module}" [@@mel.new] [@@mel.module "${mod}"]`); - } - } - }); -} - -// What Types holds, a module one deep in its own file, as its file or its -// interface writes it. -const opaqueOnly = [...opaques].sort().filter((o) => !moduleNames.has(o)); -const typesInner = (lines: (s: Source) => string[], open: (m: string) => string) => ` (* Members of different JavaScript kinds, each as it is. *) - type ('a, 'b) either -${library.kinds ? " type 'k t_value\n" : ""}${opaqueOnly.map((o) => ` type ${flatName(o)}`).join("\n")} -${abstracts.join("\n")} - - ${open("Either")} - type ('a, 'b) t = ('a, 'b) either - - external left : 'a -> ('a, 'b) t = "%identity" - external right : 'b -> ('a, 'b) t = "%identity" - end${library.kinds ? ` - - (* A value of one of ${library.kinds.classes.map((c) => c.name).join(", ")}, its kind - the class it is of: what a union of them, or an interface they - satisfy, takes, as the kinds it names. *) - ${open("Value")} - type 'k t = 'k t_value - end` : ""} -${opaqueOnly.map((o) => `\n (* The standard library's ${o}, opaque. *)\n ${open(o)}\n type t = ${flatName(o)}\n end\n`).join("")} -${signatures.map((s) => lines(s).join("\n")).join("\n\n")}`; - -const typesFile = (inner: string) => `${header} - -${inner.replace(/^ /gm, "")} -`; -return { - ml: typesFile(typesInner((s) => s.ml, (m) => `module ${m} = struct`)), - mli: typesFile(typesInner((s) => s.mli, (m) => `module ${m} : sig`)), -}; } diff --git a/generate/emit.ts b/generate/emit.ts new file mode 100644 index 00000000..f72067ba --- /dev/null +++ b/generate/emit.ts @@ -0,0 +1,253 @@ +import ts from "typescript"; +import type { Binding } from "./library.ts"; +import { named, value } from "./library.ts"; +import { isUnit, jsxElement, leftOut, type Arrow, type Mapping, type Vars } from "./mapping.ts"; +import { label, record, snake } from "./names.ts"; +import { apply, isArrow, name as tname, vars as typeVarsOf, type Item, type Type } from "./ocaml.ts"; + +export type Given = { element: string | null; own: ts.Symbol[] }; + +export type Emitters = ReturnType; + +export function emitters(b: Binding, { map, mapFunction, refOf, declaredPorted, argOut, givenArgOut, givenOut, showOut }: Mapping) { + const { checker, library } = b; + + function fixedElement(decl: ts.SignatureDeclaration): { element: string; own: ts.Symbol[] } | null { + const param = decl.parameters[0]?.type; + if (!param || !ts.isTypeReferenceNode(param)) return null; + const symbol = checker.getSymbolAtLocation(param.typeName); + const alias = symbol && b.real(symbol).declarations?.find(ts.isTypeAliasDeclaration); + if (alias && ts.isTypeReferenceNode(alias.type) && /ComponentProps$/.test(alias.type.typeName.getText())) { + const arg = alias.type.typeArguments?.[0]; + if (arg && ts.isLiteralTypeNode(arg) && ts.isStringLiteral(arg.literal)) return { element: arg.literal.text, own: [] }; + } + const props = symbol && b.real(symbol).declarations?.find(ts.isInterfaceDeclaration); + if (!props) return null; + for (const clause of props.heritageClauses ?? []) { + for (const base of clause.types) { + const arg = base.typeArguments?.[0]; + if (/ComponentProps$/.test(base.expression.getText()) && arg && ts.isLiteralTypeNode(arg) && ts.isStringLiteral(arg.literal)) { + const type = checker.getTypeAtLocation(props.name); + const own = checker.getPropertiesOfType(type).filter((p) => p.declarations?.some((d) => d.parent === props)); + return { element: arg.literal.text, own }; + } + } + } + return null; + } + + // One part's binding, its component [js] from [jsModule] and its props + // check -- its options, a spread, then its children, then its element's + // attributes -- + // [where] naming it in what is not bound. [extra] are props of its own its + // options do not hold, a library's shared props that are no attribute. + // [given], where the library's generator knows them, are the element the + // part renders and the props of its own, in place of what the core reads + // from Kobalte's shapes of a declaration. + function part(jsModule: string, where: string, decl: ts.SignatureDeclaration, options: ts.Type | null, extra: ts.Symbol[], js: string, given?: Given): Item[] { + const vars: Vars = new Map(); + const tp = decl.typeParameters?.find((p) => p.default && /ValidComponent/.test(p.constraint?.getText() ?? "")); + const polymorphic = tp?.default && ts.isLiteralTypeNode(tp.default) ? (tp.default.literal as ts.StringLiteral).text : null; + // A part that is not polymorphic renders the element its props extend, + // ComponentProps<"input">, and its options are that interface's own. + const fixed = polymorphic ? null : fixedElement(decl); + const element = given ? given.element : (polymorphic ?? fixed?.element ?? null); + const commons = extra.filter((p) => !b.attributeNames.has(label(p.name))); + // A part with neither options nor an element, I18nProvider, takes the + // props its signature declares. + const declaredProps = (): ts.Symbol[] => { + const param = decl.parameters[0]; + return param ? checker.getPropertiesOfType(checker.getTypeAtLocation(param)) : []; + }; + const own = given + ? given.own + : [...(options ? checker.getPropertiesOfType(options) : (fixed?.own ?? (polymorphic ? [] : declaredProps()))), ...commons]; + const args: string[] = []; + const severalArguments: [js: string, arity: number][] = []; + let children = "?children:('f, [ `elements ]) Solidtype.Check.children ->"; + for (const p of own) { + if (!named(p.name)) continue; + const pt = checker.getTypeOfSymbol(p); + const optional = (p.flags & ts.SymbolFlags.Optional) !== 0; + // A prop only false, as a single-value root's multiple, is not given. + if (pt.isUnion() && pt.types.every((m) => m.flags & (ts.TypeFlags.BooleanLiteral | ts.TypeFlags.Undefined)) && + pt.types.filter((m) => m.flags & ts.TypeFlags.BooleanLiteral).length === 1 && pt.types.includes(checker.getFalseType())) continue; + const t: Type | null = + p.name === "ref" + ? refOf(pt, { vars, where: `${where}.${p.name}`, polarity: "both" }) + : (declaredPorted(p, { vars, where: `${where}.${p.name}`, polarity: "given" }, optional) ?? + map(pt, { vars, where: `${where}.${p.name}`, polarity: "given" }, optional)); + if (!t) { + b.unmapped.set(`${where}.${p.name}`, checker.typeToString(pt)); + continue; + } + if (p.name === "children") { + // Children: elements, a function of the part's own, or either. + const render = t.kind === "ref" && t.module === "Either" && givenOut(t.args[0]!) === givenOut(jsxElement) ? t.args[1] : undefined; + const q = optional ? "?" : ""; + children = render + ? `${q}children:(${givenOut(render)}, [ \`elements | \`render ]) Solidtype.Check.children ->` + : isArrow(t) + ? `${q}children:(${givenOut(t)}, [ \`render ]) Solidtype.Check.children ->` + : `${q}children:('f, [ \`elements ]) Solidtype.Check.children ->`; + continue; + } + const name = record(b.names, p.name); + if (isArrow(t) && t.params.length > 1) severalArguments.push([p.name, t.params.length]); + const checked = isArrow(t) ? `(${givenOut(t)})` : `${givenArgOut(t)} Solidtype.Check.value`; + args.push(`${optional ? "?" : ""}${name}:${checked} ->`); + } + // A spread, props=p, as TSX's {...p}: the rest of a component's props + // passed on, its data- attributes, which any part takes. + const html = element ? element.charAt(0).toUpperCase() + element.slice(1) : null; + // What a part Kobalte draws by its polymorphic `as` draws in its place: a + // function of the props it is to spread, which Solid takes for a component. + if (polymorphic && html && b.htmlModules.has(html)) args.push(`?as_:(Solidtype.Html.${html}.props -> Solidtype.Jsx.element) ->`); + args.push("?props:'spread Solidtype.Solid.rest ->"); + const tail = `${children} unit -> unit`; + const check = html && b.htmlModules.has(html) ? `(${tail}) Solidtype.Html.${html}.check` : tail; + const props: Item = { + kind: "module", + name: "Props", + items: [{ kind: "external", name: "check", type: `${args.join(" ")} ${check}`, js: "check", attributes: [`mel.module "vite-plugin-solidtype/markers"`] }], + }; + const component = "unit Solidtype.Jsx.component"; + if (severalArguments.length === 0) { + return [props, { kind: "external", name: "component", type: component, js, attributes: [`mel.module ${JSON.stringify(jsModule)}`] }]; + } + // JavaScript calls such a prop with every argument at once, which an OCaml + // function's type does not promise: Arity calls it as OCaml does. + const adapted = severalArguments + .map(([name, arity]) => { + const xs = Array.from({ length: arity }, (_, i) => `x${i}`).join(" "); + return `|> Solidtype.Arity.adapted ${JSON.stringify(name)} (fun f -> fun [@u] ${xs} -> f ${xs})`; + }) + .join(" "); + return [ + props, + { kind: "external", name: "component_js", type: component, js, attributes: [`mel.module ${JSON.stringify(jsModule)}`], hidden: true }, + { kind: "let", name: "component", type: component, definition: `let component = component_js ${adapted}` }, + ]; + } + + // The library's comment on a declaration, as odoc: its documentation is the + // binding's. + function doc(symbol: ts.Symbol, raises = false): string | undefined { + // A package a comment names, @bezda/rhp/rhp.css, is read by TypeScript as + // a tag, and the comment after it with it: it is given back as written. + const named = symbol.getJsDocTags(checker).filter((t) => ts.displayPartsToString(t.text).startsWith("/")); + const text = [ts.displayPartsToString(symbol.getDocumentationComment(checker)), ...named.map((t) => `@${t.name}${ts.displayPartsToString(t.text)}`)] + .join(" ") + .trim(); + const escaped = text.replace(/\*\)/g, "* )").replace(/[{}\[\]@]/g, (c) => `\\${c}`); + // odoc reads an @ as a tag's, so a library's scope is escaped. + const raise = raises ? `Raises [Invalid_argument] with ${library.name.replace(/@/g, "\\@")}'s message, where it throws.` : ""; + const all = [escaped, raise].filter((t) => t !== "").join("\n\n"); + return all === "" ? undefined : all; + } + + // A function the library documents as throwing, or one it names as throwing + // undocumented: a precondition the caller broke, raised as Invalid_argument + // with the library's message. One at the top of a module reads input from + // outside, so it also has an _opt that gives None for it. + const throws = (symbol: ts.Symbol, where: string) => + library.throwsUndocumented(where) || /\bthrows\b/i.test(ts.displayPartsToString(symbol.getDocumentationComment(checker))); + + function guarded(name: string, type: Arrow, show: (t: Type) => string, js: string, sig: ts.Signature, self: boolean, documentation: string | undefined): Item[] { + const ps = sig.getParameters(); + const named = ps.map((q, i) => (leftOut(q) ? `?${value(snake(q.name))}` : `x${i}`)); + if (ps.some(leftOut)) named.push("()"); + const xs = named.length === 0 ? "()" : named.join(" "); + const args = self ? `o ${xs}` : xs; + return [ + { + kind: "let", + name, + type: show(type), + doc: documentation, + definition: `let ${name} ${args} = match ${js} ${args} with v -> v | exception Js.Exn.Error e -> invalid_arg ("${name}: " ^ Option.value (Js.Exn.message e) ~default:"")`, + }, + { + kind: "let", + name: `${name}_opt`, + type: show({ ...type, result: apply("option", type.result) }), + definition: `let ${name}_opt ${args} = match ${js} ${args} with v -> Some v | exception Js.Exn.Error _ -> None`, + }, + ]; + } + + // A function the library exports, [jsName] of [jsModule], as an external: + // one that may throw under a wrapper that raises, with an _opt beside it. + function functionBinding(symbol: ts.Symbol, jsName: string, jsModule: string, where: string): Item[] { + const sig = checker.getSignaturesOfType(checker.getTypeOfSymbol(symbol), ts.SignatureKind.Call)[0]; + const t = sig ? mapFunction(sig, { vars: new Map(), where, polarity: "read" }, true) : null; + if (!sig || !t) { + b.unmapped.set(where, sig ? checker.signatureToString(sig) : "?"); + return []; + } + const name = value(snake(jsName)); + const from = [`mel.module ${JSON.stringify(jsModule)}`]; + if (isArrow(t.result)) return returnsFunction(symbol, name, t, t.result, sig, jsName, jsModule); + if (throws(symbol, jsName)) { + return [ + { kind: "external", name: `${name}_js`, type: showOut(t), js: jsName, attributes: from, hidden: true }, + ...guarded(name, t, showOut, `${name}_js`, sig, false, doc(symbol, true)), + ]; + } + return [{ kind: "external", name, type: showOut(t), js: jsName, attributes: from, doc: doc(symbol) }]; + } + + // A function that returns one, every(step): Melange counts an external's + // arguments through the parentheses of its result, so a curried result would + // make every(step) wait for the result's own arguments and call rhp with all + // of them at once. The external returns it uncurried, and the function wraps + // it once, curried; one that may throw raises where it is called, with an + // _opt beside it. + function returnsFunction(symbol: ts.Symbol, name: string, t: Arrow, returned: Arrow, sig: ts.Signature, jsName: string, jsModule: string): Item[] { + const uncurried = tname(`(${returned.params.map((p) => argOut(p.type)).join(" -> ")} -> ${argOut(returned.result)} [@u])`); + const ps = sig.getParameters(); + const named = ps.map((q, i) => (leftOut(q) ? `?${value(snake(q.name))}` : `x${i}`)); + if (ps.some(leftOut)) named.push("()"); + const xs = named.length === 0 ? "()" : named.join(" "); + // A function of no arguments takes (), as JavaScript calls it with none. + const none = returned.params.length === 1 && isUnit(returned.params[0]!.type); + const ys = none ? "()" : returned.params.map((_, i) => `y${i}`).join(" "); + const curried = `fun ${ys} -> (r ${ys} [@u])`; + const raises = throws(symbol, jsName); + const raw: Item = { kind: "external", name: `${name}_js`, type: showOut({ ...t, result: uncurried }), js: jsName, attributes: [`mel.module ${JSON.stringify(jsModule)}`], hidden: true }; + if (!raises) { + return [raw, { kind: "let", name, type: showOut(t), doc: doc(symbol), definition: `let ${name} ${xs} = let r = ${name}_js ${xs} in ${curried}` }]; + } + return [ + raw, + { + kind: "let", + name, + type: showOut(t), + doc: doc(symbol, true), + definition: `let ${name} ${xs} = match ${name}_js ${xs} with r -> ${curried} | exception Js.Exn.Error e -> invalid_arg ("${name}: " ^ Option.value (Js.Exn.message e) ~default:"")`, + }, + { + kind: "let", + name: `${name}_opt`, + type: showOut({ ...t, result: apply("option", t.result) }), + definition: `let ${name}_opt ${xs} = match ${name}_js ${xs} with r -> Some (${curried}) | exception Js.Exn.Error _ -> None`, + }, + ]; + } + + // A value the library exports, as an external. + function valueBinding(symbol: ts.Symbol, jsName: string, jsModule: string, where: string): Item[] { + // A value: toaster, the storage managers, the default translations. + const vt = checker.getTypeOfSymbol(symbol); + if (vt.getCallSignatures().length > 0 && vt.getProperties().length > 0) return []; + const t = map(vt, { vars: new Map(), where, polarity: "read" }); + if (!t || typeVarsOf(t).length > 0) { + b.unmapped.set(where, checker.typeToString(vt)); + return []; + } + return [{ kind: "external", name: value(snake(jsName)), type: showOut(t), js: jsName, attributes: [`mel.module ${JSON.stringify(jsModule)}`] }]; + } + + return { part, doc, functionBinding, valueBinding, guarded, throws }; +} diff --git a/generate/generator.ts b/generate/generator.ts new file mode 100644 index 00000000..4fb95412 --- /dev/null +++ b/generate/generator.ts @@ -0,0 +1,65 @@ +import ts from "typescript"; +import { bind } from "./binding.ts"; +import type { Library } from "./library.ts"; +import { table } from "./names.ts"; +import { printItems, type Item } from "./ocaml.ts"; +import { formatted, refuse, writeOrCheck } from "./output.ts"; +import { byName, declarations, installed, root, type Declarations } from "./package.ts"; + +export type Reading = { + package: string; + entries: (dir: string) => string[]; + jsx?: boolean; +}; + +export type Written = { + // From the repository's root, without its extension; Types is written beside it. + module: string; + header: string; + typesHeader: string; + items: Item[]; + names?: string; + by: string; + whose: string; + otherwise?: string; +}; + +export function reading(of: Reading) { + const { dir, version } = installed(of.package); + const read: Declarations = declarations(of.entries(dir), of.jsx ? { jsx: ts.JsxEmit.Preserve } : {}); + return { ...read, dir, version, bind: (library: Library) => bound(read, library) }; +} + +function bound(read: Declarations, library: Library) { + const bound = bind(root, read.checker, library); + return { + ...bound, + functions(entry: string, jsModule: string): Item[] { + return byName(read.exportsOf(entry)).flatMap((symbol) => { + const real = read.real(symbol); + return real.flags & ts.SymbolFlags.Function ? bound.functionBinding(real, symbol.name, jsModule, symbol.name) : []; + }); + }, + write(w: Written): void { + const types = bound.typesFiles(w.typesHeader); + refuse( + bound.refusals(), + `${w.whose} declarations above are not bound: map each by a rule${w.otherwise ? `, ${w.otherwise}` : ""}, or name it as left out, with why, in ${w.by}`, + ); + const items: Item[] = [{ kind: "alias", name: "Types", of: "Types" }, ...w.items]; + const file = (which: "ml" | "mli") => `${w.header}\n\n${printItems(items, which)}\n`; + const typesOut = `${root}${w.module.replace(/[^/]+$/, "types")}`; + const written = (path: string, text: string): [string, string] => [path, formatted(path, text)]; + writeOrCheck( + [ + written(`${root}${w.module}.ml`, file("ml")), + written(`${root}${w.module}.mli`, file("mli")), + written(`${typesOut}.ml`, types.ml), + written(`${typesOut}.mli`, types.mli), + ...(w.names ? [written(`${root}${w.names}`, table(bound.names, w.by))] : []), + ], + `${w.whose} types`, + ); + }, + }; +} diff --git a/generate/heroui.ts b/generate/heroui.ts index 1c71bd48..2db0c1e0 100644 --- a/generate/heroui.ts +++ b/generate/heroui.ts @@ -6,31 +6,18 @@ // HeroUI's types give. import ts from "typescript"; -import { readFileSync, realpathSync } from "node:fs"; -import { fileURLToPath } from "node:url"; import { isTag } from "./melange.ts"; import { label } from "./names.ts"; -import { name as tname, print, type Type } from "./ocaml.ts"; -import { writeOrCheck } from "./output.ts"; -import { browser } from "./program.ts"; -import { Source } from "./source.ts"; +import { name as tname, print, printItems, type Item, type Type } from "./ocaml.ts"; +import { formatted, writeOrCheck } from "./output.ts"; +import { declarations, installed, root } from "./package.ts"; -const root = fileURLToPath(new URL("../", import.meta.url)); -// HeroUI's real path: tailwind-variants, whose types its declarations name, -// is installed beside it, not here. -const entry = realpathSync(`${root}node_modules/@heroui/styles/dist/index.d.ts`); +const { dir, version: heroui } = installed("@heroui/styles"); +const entry = `${dir}/dist/index.d.ts`; const out = `${root}heroui/styles.ml`; -const heroui = JSON.parse(readFileSync(`${root}node_modules/@heroui/styles/package.json`, "utf8")).version as string; -const program = ts.createProgram([entry], { - ...browser, - module: ts.ModuleKind.ESNext, - moduleResolution: ts.ModuleResolutionKind.Bundler, -}); -const checker = program.getTypeChecker(); -const source = program.getSourceFile(entry); -const exported = source && checker.getSymbolAtLocation(source); -if (!exported) throw new Error(`no ${entry}`); +const { checker, exportsOf, real } = declarations([entry]); +const exported = exportsOf(entry); const properties = (t: ts.Type | undefined) => (t && !(t.flags & ts.TypeFlags.Undefined) ? checker.getPropertiesOfType(t) : []); @@ -54,69 +41,65 @@ const show = (t: Type) => // Each variant function, a module by its component: buttonVariants is // Button. The capitalised exports, ButtonVariants, are types. -const src = new Source(); -for (const symbol of checker.getExportsOfModule(exported)) { +const items: Item[] = []; +for (const symbol of exported) { if (!/^[a-z]\w*Variants$/.test(symbol.name)) continue; - const real = symbol.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(symbol) : symbol; - const type = checker.getTypeOfSymbol(real); + const type = checker.getTypeOfSymbol(real(symbol)); if (type.getSymbol()?.name !== "TVReturnType") throw new Error(`${symbol.name} is no variant function`); const [variants, slots] = checker.getTypeArguments(type as ts.TypeReference); const component = symbol.name.charAt(0).toUpperCase() + symbol.name.slice(1, -"Variants".length); const options = properties(variants).map((v) => { const keys = properties(checker.getTypeOfSymbol(v)).map((k) => k.name); - return ` ?${label(v.name)}:(${show(variant(`${symbol.name}.${v.name}`, keys))} [@mel.as ${JSON.stringify(v.name)}]) ->`; + return `?${label(v.name)}:(${show(variant(`${symbol.name}.${v.name}`, keys))} [@mel.as ${JSON.stringify(v.name)}]) ->`; }); const parts = properties(slots).map((s) => s.name); - src.both(`(** HeroUI's [${symbol.name}]. *)`); - src.module("", component, () => { - src.both( - ` type options`, - ``, - ` external options :`, - ...options, - ` ?class_:(string [@mel.as "class"]) ->`, - ` unit ->`, - ` options = ""`, - ` [@@mel.obj]`, - ``, - ); - if (parts.length === 0) { - src.both(` external classes : options -> string = ${JSON.stringify(symbol.name)}`, ` [@@mel.module "@heroui/styles"]`); - } else { - src.both(` type slots`, ``, ` external slots : options -> slots = ${JSON.stringify(symbol.name)}`, ` [@@mel.module "@heroui/styles"]`, ``); - for (const part of parts) src.both(` external ${label(part)} : slots -> string = ${JSON.stringify(part)} [@@mel.send]`); - } + const from = [`mel.module "@heroui/styles"`]; + items.push({ + kind: "module", + name: component, + doc: `HeroUI's [${symbol.name}].`, + items: [ + { kind: "type", name: "options" }, + { kind: "external", name: "options", type: `${options.join(" ")} ?class_:(string [@mel.as "class"]) -> unit -> options`, js: "", attributes: ["mel.obj"] }, + ...(parts.length === 0 + ? [{ kind: "external", name: "classes", type: "options -> string", js: symbol.name, attributes: from } as Item] + : [ + { kind: "type", name: "slots" } as Item, + { kind: "external", name: "slots", type: "options -> slots", js: symbol.name, attributes: from } as Item, + ...parts.map((part): Item => ({ kind: "external", name: label(part), type: "slots -> string", js: part, attributes: ["mel.send"] })), + ]), + ], }); - src.both(``); } // cn, which the variant functions merge a class by: a component styled here // rather than by a variant function merges a caller's class by it too, so the // caller's utility wins as it does over HeroUI's own. -const cn = checker.getExportsOfModule(exported).find((s) => s.name === "cn"); -const cnType = cn && checker.getTypeOfSymbol(cn.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(cn) : cn); +const cn = exported.find((s) => s.name === "cn"); +const cnType = cn && checker.getTypeOfSymbol(real(cn)); if (!cnType || cnType.getCallSignatures().length === 0) throw new Error("@heroui/styles exports no cn function"); -src.both( - `(** HeroUI's [cn]: [cn a b] is [a]'s classes and [b]'s, a Tailwind utility of`, - ` [b] winning over one of [a] that sets the same property, as a variant`, - ` function merges its [class]; none where both are empty. *)`, - `external cn : string -> string -> string Js.undefined = "cn"`, - `[@@mel.module "@heroui/styles"]`, - ``, -); +items.push({ + kind: "external", + name: "cn", + type: "string -> string -> string Js.undefined", + js: "cn", + attributes: [`mel.module "@heroui/styles"`], + doc: "HeroUI's [cn]: [cn a b] is [a]'s classes and [b]'s, a Tailwind utility of [b] winning over one of [a] that sets the same property, as a variant function merges its [class]; none where both are empty.", +}); -const file = (lines: string[]) => `(* Each of HeroUI's variant functions, by its component: [options] built +const file = (which: "ml" | "mli") => `(* Each of HeroUI's variant functions, by its component: [options] built from its variants, then [classes], its class string, or for a component of several parts [slots], a class string per part; and [cn], the merge they give a class by. Generated from the declarations of @heroui/styles ${heroui} by generate/heroui.ts; never edited by hand. *) -${lines.join("\n")}`; +${printItems(items, which)} +`; writeOrCheck( [ - [out, file(src.ml)], - [`${out}i`, file(src.mli)], + [out, formatted(out, file("ml"))], + [`${out}i`, formatted(`${out}i`, file("mli"))], ], "HeroUI's types", ); diff --git a/generate/html.ts b/generate/html.ts index 79286935..9e6f15af 100644 --- a/generate/html.ts +++ b/generate/html.ts @@ -4,158 +4,15 @@ // ppx cannot spell back by rule. `make generate` writes them; `make lint`'s // `--check` fails when a file differs from what Solid's types give. -import ts from "typescript"; -import { readFileSync } from "node:fs"; -import { fileURLToPath } from "node:url"; -import { domType, isString, isTag } from "./melange.ts"; -import { record, table } from "./names.ts"; -import { writeOrCheck } from "./output.ts"; -import { browser } from "./program.ts"; +import { formatted, refuse, writeOrCheck } from "./output.ts"; +import { table } from "./names.ts"; +import { root } from "./package.ts"; +import { solidHtml, type Members } from "./solid_html.ts"; -const root = fileURLToPath(new URL("../", import.meta.url)); -const jsx = `${root}node_modules/solid-js/types/jsx.d.ts`; const out = `${root}src/html.mli`; const namesOut = `${root}ppx/html_names.ml`; -const solid = JSON.parse(readFileSync(`${root}node_modules/solid-js/package.json`, "utf8")).version as string; +const { version: solid, elements, membersOf, common, names, unmapped } = solidHtml(); -const program = ts.createProgram([jsx], browser); -const checker = program.getTypeChecker(); -const source = program.getSourceFile(jsx); -if (!source) throw new Error(`no ${jsx}`); - -function namespace(node: ts.Node): ts.ModuleDeclaration | undefined { - let found: ts.ModuleDeclaration | undefined; - node.forEachChild((n) => { - if (ts.isModuleDeclaration(n) && n.name.getText() === "JSX") found = n; - }); - return found; -} -const ns = namespace(source); -if (!ns?.body || !ts.isModuleBlock(ns.body)) throw new Error("no JSX namespace"); -const interfaces = new Map(); -for (const s of ns.body.statements) if (ts.isInterfaceDeclaration(s)) interfaces.set(s.name.text, s); - -// Each attribute's name as a user writes it, with its JavaScript name. -const names = new Map(); - -// An attribute's OCaml name, by the one spelling rule. A handler Solid also -// takes in lower case, onclick beside onClick, is the same handler, so it -// has the one name, on_click. -function label(name: string): string | null { - if (!/^[a-z][A-Za-z0-9-]*$/.test(name)) return null; - if (/^on[a-z]/.test(name)) return null; - return record(names, name); -} - -const eventUnions = new Set([ - "EventHandlerUnion", "InputEventHandlerUnion", "FocusEventHandlerUnion", - "ChangeEventHandlerUnion", "EventHandlerWithOptionsUnion", -]); - -const unmapped = new Map(); - -// What an attribute holds, from Solid's declared type, by AGENTS.md's "An -// attribute's type is generated from Solid's JSX types", and null for a -// type none of its mappings covers. -function ocamlType(name: string, node: ts.TypeNode | undefined): string | null { - if (!node) return null; - if (name === "ref") return "element -> unit"; - if (name === "classList") return "bool Js.Dict.t"; - if (name === "style") return "string"; - const parts = ts.isUnionTypeNode(node) ? node.types : [node]; - for (const p of parts) { - if (ts.isTypeReferenceNode(p) && eventUnions.has(p.typeName.getText())) { - const event = p.typeArguments?.[1]?.getText() ?? "Event"; - return `${domType(event) ?? "Dom.event"} -> unit`; - } - } - const type = checker.getTypeFromTypeNode(node); - const members = (type.isUnion() ? type.types : [type]).filter( - (t) => !(t.flags & (ts.TypeFlags.Undefined | ts.TypeFlags.Null)), - ); - const flags = members.map((t) => t.flags); - const has = (f: ts.TypeFlags) => flags.some((x) => (x & f) !== 0); - const only = (f: ts.TypeFlags) => flags.every((x) => (x & f) !== 0); - if (members.length === 0 || has(ts.TypeFlags.Any | ts.TypeFlags.Never)) return null; - if (members.some(isString)) return "string"; - if (only(ts.TypeFlags.BooleanLike)) return "bool"; - const strings = members.filter((t) => t.isStringLiteral()).map((t) => (t as ts.StringLiteralType).value); - const booleans = members.filter((t) => t.flags & ts.TypeFlags.BooleanLike); - if (booleans.length > 0 && strings.length + booleans.length === members.length) { - // A boolean among other words is any of those words. - return strings.every((s) => s === "true" || s === "false") ? "bool" : "string"; - } - // Solid writes a boolean attribute as the text "true" or "false". - if (strings.length === members.length && strings.every((s) => s === "true" || s === "false")) return "bool"; - if (strings.length === members.length) { - return strings.every(isTag) ? `[ ${strings.map((s) => `\`${s}`).join(" | ")} ]` : "string"; - } - if (only(ts.TypeFlags.NumberLike)) return "int"; - if (has(ts.TypeFlags.Number) && members.every((t) => t.flags & (ts.TypeFlags.NumberLike | ts.TypeFlags.StringLike))) return "string"; - return null; -} - -type Members = Map; - -// The string literals a type node lists, "a" | "b". -function literals(node: ts.TypeNode): string[] { - const parts = ts.isUnionTypeNode(node) ? node.types : [node]; - return parts.flatMap((p) => (ts.isLiteralTypeNode(p) && ts.isStringLiteral(p.literal) ? [p.literal.text] : [])); -} - -// An interface's members, its bases' included, with the element type T left -// as [element]. -function membersOf(name: string, seen = new Set()): Members { - const decl = interfaces.get(name); - const members: Members = new Map(); - if (!decl || seen.has(name)) return members; - seen.add(name); - for (const clause of decl.heritageClauses ?? []) { - for (const base of clause.types) { - const target = base.expression.getText(); - // Pick is the members of X it names, and Omit the - // rest: an SVG shape takes its fill and stroke so. X is read again, - // whoever else has, since each takes its own few. - if (target === "Pick" || target === "Omit") { - const [from, keys] = base.typeArguments ?? []; - if (!from || !keys || !ts.isTypeReferenceNode(from)) continue; - const listed = new Set(literals(keys).map(label)); - for (const [k, v] of membersOf(from.typeName.getText(), new Set(seen))) { - if (listed.has(k) === (target === "Pick")) members.set(k, v); - } - continue; - } - for (const [k, v] of membersOf(target, seen)) members.set(k, v); - } - } - for (const m of decl.members) { - if (!ts.isPropertySignature(m) || !m.name) continue; - const raw = m.name.getText().replace(/^["']|["']$/g, ""); - if (raw === "children" || raw.startsWith("$")) continue; - const l = label(raw); - if (!l) continue; - const t = ocamlType(raw, m.type); - if (t) members.set(l, t); - else unmapped.set(`${name}.${raw}`, m.type?.getText() ?? "?"); - } - return members; -} - -// Each element: its tag, the interface of its attributes, and its DOM type. -const elements: { tag: string; attributes: string; element: string }[] = []; -for (const tags of ["HTMLElementTags", "HTMLElementDeprecatedTags", "SVGElementTags"]) { - const decl = interfaces.get(tags); - if (!decl) throw new Error(`no ${tags}`); - for (const m of decl.members) { - if (!ts.isPropertySignature(m) || !m.type || !ts.isTypeReferenceNode(m.type)) continue; - const tag = m.name.getText(); - if (!/^[a-z][A-Za-z0-9]*$/.test(tag) || elements.some((e) => e.tag === tag)) continue; - const element = m.type.typeArguments?.[0]?.getText() ?? "Element"; - elements.push({ tag, attributes: m.type.typeName.getText(), element: domType(element) ?? "Dom.element" }); - } -} - -const common = membersOf("DOMAttributes"); const sharesCommon = (ms: Members) => [...common].every(([k, v]) => ms.get(k) === v); // Each signature also gives ['r check], every attribute as an optional @@ -202,14 +59,22 @@ text += `\n(** An element whose tag is known only as the page runs: the attribut every HTML element takes. *) module Element : HTMLAttributes with type element = Dom.htmlElement\n`; -if (unmapped.size > 0 && process.argv.includes("--unmapped")) { - for (const [k, v] of unmapped) console.error(`${k}: ${v}`); -} +const leftOut: Record = { + "HTMLAttributes.inlist": "RDFa's, which Solid types any", + "DialogHtmlAttributes.tabindex": "a dialog takes none, which Solid types never", +}; +refuse( + [ + ...[...unmapped].filter(([k]) => !(k in leftOut)).map(([k, v]) => `${k}: no rule maps ${v}`), + ...Object.keys(leftOut).filter((k) => !unmapped.has(k)).map((k) => `${k}: named as left out, but it is mapped, or no longer declared`), + ], + "Solid's attributes above are not typed: map each by a rule, or name it as left out, with why, in generate/html.ts", +); writeOrCheck( [ - [out, text], - [namesOut, table(names, "generate/html.ts")], + [out, formatted(out, text)], + [namesOut, formatted(namesOut, table(names, "generate/html.ts"))], ], "Solid's types", ); diff --git a/generate/internationalized_date.ts b/generate/internationalized_date.ts index 7299b17f..935aaf64 100644 --- a/generate/internationalized_date.ts +++ b/generate/internationalized_date.ts @@ -7,33 +7,17 @@ // lint`'s `--check` fails when a file differs from what its types give. import ts from "typescript"; -import { readFileSync, realpathSync } from "node:fs"; -import { fileURLToPath } from "node:url"; -import { bind, functionBinding, reach, typesFiles, unmapped } from "./binding.ts"; -import { writeOrCheck } from "./output.ts"; -import { Source } from "./source.ts"; -import { browser } from "./program.ts"; +import { reading } from "./generator.ts"; -const root = fileURLToPath(new URL("../", import.meta.url)); -const pkg = realpathSync(`${root}node_modules/@internationalized/date`); -const entry = `${pkg}/dist/types/src/index.d.ts`; -const out = `${root}internationalized_date/solidtype_internationalized_date.ml`; -const typesOut = `${root}internationalized_date/types.ml`; -const version = JSON.parse(readFileSync(`${pkg}/package.json`, "utf8")).version as string; - -const program = ts.createProgram([entry], { - ...browser, - module: ts.ModuleKind.ESNext, - moduleResolution: ts.ModuleResolutionKind.Bundler, +const by = "generate/internationalized_date.ts"; +const { dir, version, checker, exportsOf, real, bind } = reading({ + package: "@internationalized/date", + entries: (dir) => [`${dir}/dist/types/src/index.d.ts`], }); -const checker = program.getTypeChecker(); - -const source = program.getSourceFile(entry); -const mod = source && checker.getSymbolAtLocation(source); -if (!mod) throw new Error(`no ${entry}`); -const real = (s: ts.Symbol) => (s.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(s) : s); +const entry = `${dir}/dist/types/src/index.d.ts`; +const exports = exportsOf(entry); const exported = (name: string) => { - const s = checker.getExportsOfModule(mod).find((e) => e.name === name); + const s = exports.find((e) => e.name === name); if (!s) throw new Error(`@internationalized/date exports no ${name}`); return real(s); }; @@ -46,7 +30,7 @@ const exported = (name: string) => { const throwing = new Set(); const takesZone = (sig: ts.Signature) => sig.getParameters().some((q) => q.name === "timeZone" || q.name === "disambiguation"); -for (const sym of checker.getExportsOfModule(mod)) { +for (const sym of exports) { const r = real(sym); if (r.flags & ts.SymbolFlags.Function) { const sigs = checker.getTypeOfSymbol(r).getCallSignatures(); @@ -59,7 +43,7 @@ for (const sym of checker.getExportsOfModule(mod)) { } } -bind(root, checker, { +const { functions, reach, write } = bind({ name: "@internationalized/date", throwsUndocumented: (where) => throwing.has(where), // A date's every number is a small whole one, but the milliseconds since @@ -70,57 +54,35 @@ bind(root, checker, { classes: ["CalendarDate", "CalendarDateTime", "Time", "ZonedDateTime"].map(exported), structural: ["AnyCalendarDate", "AnyDateTime", "AnyTime"].map(exported), }, + // A calendar's optional methods are ones it may not have, which the + // library calls through its own functions where a user needs them -- + // getMinimumMonthInYear, getMinimumDayInMonth, isEqualCalendar -- or + // that mutate a date in place inside it. + leftOut: Object.fromEntries([ + "getMinimumMonthInYear", "getMinimumDayInMonth", "getFormattableMonth", "isEqual", + "balanceDate", "balanceYearMonth", "constrainDate", "isInverseEra", + ].map((m) => [`Calendar.${m}()`, "a calendar's optional method, reached through the library's own functions"])), }); // The one class nothing else names: a date's formatter, made by its // constructor. reach(exported("DateFormatter")); -// What is left out, each with why. A calendar's optional methods are ones it -// may not have, which the library calls through its own functions where a -// user needs them -- getMinimumMonthInYear, getMinimumDayInMonth, -// isEqualCalendar -- or mutate a date in place inside it. -const leftOut = new Set([ - "getMinimumMonthInYear", "getMinimumDayInMonth", "getFormattableMonth", "isEqual", - "balanceDate", "balanceYearMonth", "constrainDate", "isInverseEra", -].map((m) => `Calendar.${m}()`)); - -const src = new Source(); -for (const sym of [...checker.getExportsOfModule(mod)].sort((a, b) => (a.name < b.name ? -1 : 1))) { - const r = real(sym); - // A class is a module of Types, which the functions name; a type alone is - // bound where it is named. - if (r.flags & ts.SymbolFlags.Function) functionBinding(src, r, sym.name, "@internationalized/date", sym.name); -} +// A class is a module of Types, which the functions name; a type alone is +// bound where it is named. +const items = functions(entry, "@internationalized/date"); -const { ml: typesText, mli: typesMli } = typesFiles(`(* The values @internationalized/date makes and takes, each a module: a +write({ + module: "internationalized_date/solidtype_internationalized_date", + by, + whose: "@internationalized/date's", + header: `(* @internationalized/date's functions: its conversions, queries and + parsers, and the values they make and take, in Types. Generated from the + declarations of @internationalized/date ${version} by + ${by}; never edited by hand. *)`, + typesHeader: `(* The values @internationalized/date makes and takes, each a module: a CalendarDate, a CalendarDateTime, a Time and a ZonedDateTime are each a kind of Value, so a function that takes several takes any of them as it is. Generated from the declarations of @internationalized/date ${version} - by generate/internationalized_date.ts; never edited by hand. *)`); - -const missing = [...unmapped].filter(([k]) => !leftOut.has(k)); -if (missing.length > 0) { - for (const [k, v] of missing) console.error(`${k}: ${v}`); - console.error("@internationalized/date's declarations above map by no rule: map each, or name it as left out in generate/internationalized_date.ts"); - process.exit(1); -} - -const top = (lines: string[]) => lines.map((l) => l.replace(/^ /gm, "")); -const file = (modules: string[]) => `(* @internationalized/date's functions: its conversions, queries and - parsers, and the values they make and take, in Types. Generated from the - declarations of @internationalized/date ${version} by - generate/internationalized_date.ts; never edited by hand. *) - -module Types = Types - -${modules.join("\n")}`; - -writeOrCheck( - [ - [out, file(top(src.ml))], - [`${out}i`, file(top(src.mli))], - [typesOut, typesText], - [`${typesOut}i`, typesMli], - ], - "@internationalized/date's types", -); + by ${by}; never edited by hand. *)`, + items, +}); diff --git a/generate/kobalte.ts b/generate/kobalte.ts index 778aa207..5bc45da9 100644 --- a/generate/kobalte.ts +++ b/generate/kobalte.ts @@ -8,49 +8,66 @@ // a file differs from what Kobalte's types give. import ts from "typescript"; -import { readdirSync, existsSync, readFileSync, realpathSync } from "node:fs"; -import { fileURLToPath } from "node:url"; -import { bind, doc, functionBinding, names, part, real, typesFiles, unmapped, valueBinding } from "./binding.ts"; -import { table } from "./names.ts"; -import { writeOrCheck } from "./output.ts"; -import { Source } from "./source.ts"; -import { browser } from "./program.ts"; - -const root = fileURLToPath(new URL("../", import.meta.url)); -// Kobalte's real path: a package manager that links each package's -// dependencies beside it, as Bun does, is resolved from there. -const dist = realpathSync(`${root}node_modules/@kobalte/core/dist`); -const out = `${root}kobalte/solidtype_kobalte.ml`; -// The types, a file of their own: Melange keeps a function's arity, and so -// calls it directly from another library, one module deep in a file, not two. -const typesOut = `${root}kobalte/types.ml`; -const namesOut = `${root}ppx/kobalte_names.ml`; -const kobalte = JSON.parse(readFileSync(`${root}node_modules/@kobalte/core/package.json`, "utf8")).version as string; +import { readdirSync, existsSync } from "node:fs"; +import { reading } from "./generator.ts"; +import type { Item } from "./ocaml.ts"; +import { byName } from "./package.ts"; +const by = "generate/kobalte.ts"; // The building blocks Kobalte's components are made of, which its // documentation does not offer as components. const blocks = new Set(["menu", "popper", "dismissable-layer", "polymorphic"]); - -const entries = readdirSync(dist) - .filter((d) => existsSync(`${dist}/${d}/index.d.ts`) && !blocks.has(d)) - .sort(); -const program = ts.createProgram([...entries.map((d) => `${dist}/${d}/index.d.ts`), `${dist}/index.d.ts`], { - ...browser, - jsx: ts.JsxEmit.Preserve, - module: ts.ModuleKind.ESNext, - moduleResolution: ts.ModuleResolutionKind.Bundler, +const components = (dist: string) => + readdirSync(dist) + .filter((d) => existsSync(`${dist}/${d}/index.d.ts`) && !blocks.has(d)) + .sort(); + +const { dir, version: kobalte, checker, exportsOf, bind } = reading({ + package: "@kobalte/core", + entries: (dir) => [...components(`${dir}/dist`).map((d) => `${dir}/dist/${d}/index.d.ts`), `${dir}/dist/index.d.ts`], + jsx: true, }); -const checker = program.getTypeChecker(); +const dist = `${dir}/dist`; +const entries = components(dist); -bind(root, checker, { +const anyOption = "an option, the caller's data, which the context types any"; +const threeKinds = "takes a number, a bigint or a third kind, and Either holds two"; +const readersChoice = "a context's value, of a type its reader would choose"; + +const { doc, functionBinding, part, real, valueBinding, write } = bind({ name: "Kobalte", // toFormat throws converting HSL or HSB to hex without saying so. throwsUndocumented: (where) => where === "Color.toFormat", // The props a create function is given, whose any is the caller's data: // createListState's dataSource, and the getKey it is read by. data: (symbol) => /^Create[A-Za-z]*Props$/.test(symbol.name), + // Meter and Slider each declare a GetValueLabelParams, of its own fields. + named: (symbol) => { + if (symbol.name !== "GetValueLabelParams") return undefined; + const file = symbol.declarations?.[0]?.getSourceFile().fileName ?? ""; + const component = ["Meter", "Slider"].find((c) => file.includes(`/${c.toLowerCase()}-`)); + if (!component) throw new Error(`GetValueLabelParams of ${file} is neither Meter's nor Slider's`); + return `${component}_GetValueLabelParams`; + }, + leftOut: { + "ComboboxContextValue.selectedOptions": anyOption, + "ComboboxContextValue.removeOptionFromSelection": anyOption, + "SelectContextValue.selectedOptions": anyOption, + "SelectContextValue.removeOptionFromSelection": anyOption, + "DateTimeFormat.formatRange()": threeKinds, + "DateTimeFormat.formatRangeToParts()": threeKinds, + "NumberFormat.formatRange()": threeKinds, + "NumberFormat.formatRangeToParts()": threeKinds, + "FlowProps.value": readersChoice, + "Context_Provider_Props.value": readersChoice, + "Toast_Toaster.make": "the toaster is Kobalte's to make: one made here would be handed Kobalte's functions, which OCaml calls by their length", + }, }); +// A type as TypeScript writes it, whole: it cuts a long one short unless +// told not to, and what is read of it here may be past the cut. +const whole = (t: ts.Type) => checker.typeToString(t, undefined, ts.TypeFormatFlags.NoTruncation); + const pascal = (s: string) => s.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(""); // The members of the CommonProps its signature's props are made of, that @@ -64,9 +81,9 @@ function commonProps(decl: ts.SignatureDeclaration): ts.Symbol[] { const visit = (t: ts.Type) => { for (const part of t.isIntersection() ? t.types : [t]) { const name = part.aliasSymbol?.name ?? part.getSymbol()?.name ?? ""; - if (/CommonProps$/.test(name) || (part.aliasSymbol?.name === "Partial" && /CommonProps/.test(checker.typeToString(part)))) { + if (/CommonProps$/.test(name) || (part.aliasSymbol?.name === "Partial" && /CommonProps/.test(whole(part)))) { for (const p of checker.getPropertiesOfType(part)) { - if (!/ElementOf|\bT\b/.test(checker.typeToString(checker.getTypeOfSymbol(p)))) found.push(p); + if (!/ElementOf|\bT\b/.test(whole(checker.getTypeOfSymbol(p)))) found.push(p); } } } @@ -75,18 +92,13 @@ function commonProps(decl: ts.SignatureDeclaration): ts.Symbol[] { return found; } -// Each entry's module, its lines ending in an empty one, then end. -let body = ""; -let bodyMli = ""; +const modules: Item[] = []; for (const entry of entries) { - const source = program.getSourceFile(`${dist}/${entry}/index.d.ts`); - const mod = source && checker.getSymbolAtLocation(source); - if (!mod) continue; - const exports = checker.getExportsOfModule(mod); - const byName = new Map(exports.map((s) => [s.name, s])); + const exports = exportsOf(`${dist}/${entry}/index.d.ts`); + const exported = new Map(exports.map((s) => [s.name, s])); const component = pascal(entry); - const src = new Source(); - for (const sym of [...exports].sort((a, b) => (a.name < b.name ? -1 : 1))) { + const items: Item[] = []; + for (const sym of byName(exports)) { const r = real(sym); const declared = r.declarations?.[0]; if (!declared) continue; @@ -102,7 +114,7 @@ for (const entry of entries) { if (signature && /^[A-Z]/.test(sym.name)) { if (sym.name === component) continue; const optionsName = `${component}${sym.name}Options`; - const opt = byName.get(optionsName) ?? byName.get(`${sym.name}Options`) ?? byName.get(`${sym.name}Props`); + const opt = exported.get(optionsName) ?? exported.get(`${sym.name}Options`) ?? exported.get(`${sym.name}Props`); // Without an Options interface, the props its signature gives: // PolymorphicProps, SegmentedControl's an alias of // RadioGroup's. @@ -112,73 +124,64 @@ for (const entry of entries) { : null; const optType = opt ? checker.getDeclaredTypeOfSymbol(real(opt)) : given; // A root whose value type turns on [multiple] is two modules. - if (optType?.isUnion() && optType.types.some((t) => /Multiple/.test(checker.typeToString(t)))) { + if (optType?.isUnion() && optType.types.some((t) => /Multiple/.test(whole(t)))) { for (const variant of optType.types) { - const multiple = /Multiple/.test(checker.typeToString(variant)); - src.both(...doc(r, " ")); - src.module(" ", `${sym.name}${multiple ? "_multiple" : ""}`, () => part(src, `@kobalte/core/${entry}`, `${entry}.${sym.name}`, signature, variant, commonProps(signature), sym.name)); - src.both(``); + const multiple = /Multiple/.test(whole(variant)); + items.push({ + kind: "module", + name: `${sym.name}${multiple ? "_multiple" : ""}`, + doc: doc(r), + items: part(`@kobalte/core/${entry}`, `${entry}.${sym.name}`, signature, variant, commonProps(signature), sym.name), + }); } continue; } - src.both(...doc(r, " ")); - src.module(" ", sym.name, () => part(src, `@kobalte/core/${entry}`, `${entry}.${sym.name}`, signature, optType, commonProps(signature), sym.name)); - src.both(``); + items.push({ + kind: "module", + name: sym.name, + doc: doc(r), + items: part(`@kobalte/core/${entry}`, `${entry}.${sym.name}`, signature, optType, commonProps(signature), sym.name), + }); } else if ((r.flags & ts.SymbolFlags.Function) && ts.isFunctionDeclaration(decl)) { - functionBinding(src, r, sym.name, `@kobalte/core/${entry}`, `${entry}.${sym.name}`); - } else if (r.flags & ts.SymbolFlags.Variable && sym.name !== component && !byName.get(sym.name)?.getDeclarations()?.some(ts.isFunctionDeclaration)) { - valueBinding(src, r, sym.name, `@kobalte/core/${entry}`, `${entry}.${sym.name}`); + items.push(...functionBinding(r, sym.name, `@kobalte/core/${entry}`, `${entry}.${sym.name}`)); + } else if (r.flags & ts.SymbolFlags.Variable && sym.name !== component && !exported.get(sym.name)?.getDeclarations()?.some(ts.isFunctionDeclaration)) { + items.push(...valueBinding(r, sym.name, `@kobalte/core/${entry}`, `${entry}.${sym.name}`)); } } - if (src.ml.length === 0) continue; - body += `\nmodule ${component} = struct\n${src.ml.join("\n")}end\n`; - bodyMli += `\nmodule ${component} : sig\n${src.mli.join("\n")}end\n`; + if (items.length > 0) modules.push({ kind: "module", name: component, items }); } // The building blocks of Kobalte's lists, from its root, which a component // Kobalte lacks is made of: a list's state and selection, and the handlers // that make an element a list of selectable items. const selectionNames = ["createListState", "createSelectableCollection", "createSelectableItem", "createSelectableList", "createTypeSelect"]; -const rootSource = program.getSourceFile(`${dist}/index.d.ts`); -const rootModule = rootSource && checker.getSymbolAtLocation(rootSource); -if (rootModule) { - const exports = new Map(checker.getExportsOfModule(rootModule).map((s) => [s.name, s])); - const src = new Source(); - for (const name of selectionNames) { +{ + const exports = new Map(exportsOf(`${dist}/index.d.ts`).map((s) => [s.name, s])); + const items = selectionNames.flatMap((name) => { const sym = exports.get(name); - if (sym) functionBinding(src, real(sym), name, "@kobalte/core", `Selection.${name}`); - } - body += `\nmodule Selection = struct\n${src.ml.join("\n")}end\n`; - bodyMli += `\nmodule Selection : sig\n${src.mli.join("\n")}end\n`; + if (!sym) throw new Error(`@kobalte/core exports no ${name}`); + return functionBinding(real(sym), name, "@kobalte/core", `Selection.${name}`); + }); + modules.push({ kind: "module", name: "Selection", items }); } -const { ml: typesText, mli: typesMli } = typesFiles(`(* The types Kobalte's components and functions name, each a module. - Generated from the declarations of @kobalte/core ${kobalte} by - generate/kobalte.ts; never edited by hand. *)`); - - -const componentsFile = (modules: string) => `(* Every Kobalte component, part by part, its hooks and utilities, and the +// The types are a file of their own: Melange keeps a function's arity, and +// so calls it directly from another library, one module deep in a file, not +// two. +write({ + module: "kobalte/solidtype_kobalte", + names: "ppx/kobalte_names.ml", + by, + whose: "Kobalte's", + header: `(* Every Kobalte component, part by part, its hooks and utilities, and the types they name, in Types. Generated from the declarations of - @kobalte/core ${kobalte} by generate/kobalte.ts; never edited by hand. + @kobalte/core ${kobalte} by ${by}; never edited by hand. A part's props check takes its own props, then its children, then the attributes of the element it renders, which it passes on. Each check is - external, since the compiler checks it and Melange writes none of it. *) - -module Types = Types -${modules}`; -const text = componentsFile(body); -const textMli = componentsFile(bodyMli); - -if (process.argv.includes("--unmapped")) for (const [k, v] of unmapped) console.error(`${k}: ${v}`); - -writeOrCheck( - [ - [out, text], - [`${out}i`, textMli], - [typesOut, typesText], - [`${typesOut}i`, typesMli], - [namesOut, table(names, "generate/kobalte.ts")], - ], - "Kobalte's types", -); + external, since the compiler checks it and Melange writes none of it. *)`, + typesHeader: `(* The types Kobalte's components and functions name, each a module. + Generated from the declarations of @kobalte/core ${kobalte} by + ${by}; never edited by hand. *)`, + items: modules, +}); diff --git a/generate/library.ts b/generate/library.ts new file mode 100644 index 00000000..df22fa30 --- /dev/null +++ b/generate/library.ts @@ -0,0 +1,186 @@ +import ts from "typescript"; +import { keywords } from "./names.ts"; +import type { Type } from "./ocaml.ts"; +import { solidHtml } from "./solid_html.ts"; + +export type Library = { + // Its name, as its odoc says it: Kobalte. + name: string; + // Whether a function throws though its documentation does not say so, by + // its module and name: Color.toFormat. + throwsUndocumented: (where: string) => boolean; + // The OCaml type of a declared type the library's binding ports by hand, + // by its symbol, its type arguments mapped, and whether undefined is + // already an optional prop's absence; undefined for any other, which the + // core maps by its rules. + ported?: (symbol: ts.Symbol, args: Type[], absent: boolean) => Type | undefined; + // Whether a number is a small whole one where it is met, by where: an int + // where the binding knows it fits 32 bits; a float anywhere else. + whole?: (where: string) => boolean; + // The classes whose values are one type of Types, Value, a kind each, and + // the structural interfaces they satisfy: a union of the classes, or one of + // those interfaces, is the kinds of the classes TypeScript takes for it, an + // open set, so a value of any of them is passed as it is. + kinds?: { classes: ts.Symbol[]; structural: ts.Symbol[] }; + // Two types of one name fail the run until each is named here. + named?: (symbol: ts.Symbol) => string | undefined; + // By where the core meets it, each with why: a name here that no longer + // applies fails the run. + leftOut?: Record; + // Whether an object type's members typed any are the caller's own data, + // given in and handed back only to the caller's functions: they are one + // type variable of the type, 'data, never read back out as another. + data?: (symbol: ts.Symbol) => boolean; +}; + +// The type variable the caller's data is, in a type whose any is its data. +export const DATA = "Data"; + +export type Named = { + module: string; + symbol: ts.Symbol | null; + type: ts.Type; + params: string[]; + // The standard types an intersection is too, each a conversion. + conversions: string[]; +}; + +export const readable = new Set([ + "File", "DateTimeFormatOptions", "NumberFormatOptions", "CollatorOptions", + "Collator", "NumberFormat", "DateTimeFormat", "DateTimeFormatPart", + "ResolvedDateTimeFormatOptions", +]); + +export const value = (name: string) => (keywords.has(name) ? `${name}_` : name); +export const named = (name: string) => /^[A-Za-z_][A-Za-z0-9_]*$/.test(name); + +// The package a symbol is declared in: the last node_modules in its path, +// since a store such as Bun's nests packages under its own. +export function moduleOf(symbol: ts.Symbol): string | null { + const file = symbol.declarations?.[0]?.getSourceFile().fileName ?? ""; + const m = file.match(/.*node_modules\/((?:@[^/]+\/)?[^/]+)\//); + return m ? m[1]! : null; +} + +export function isDomLib(symbol: ts.Symbol): boolean { + const file = symbol.declarations?.[0]?.getSourceFile().fileName ?? ""; + return /typescript\/lib\/lib\./.test(file); +} + +export class Binding { + readonly unmapped = new Map(); + readonly names = new Map(); + readonly types = new Map(); + readonly queue: Named[] = []; + readonly moduleNames = new Map(); + readonly opaques = new Set(); + namesUnknown = false; + readonly htmlModules: Set; + readonly attributeNames: Set; + + constructor( + readonly root: string, + readonly checker: ts.TypeChecker, + readonly library: Library, + ) { + const html = solidHtml(); + this.htmlModules = html.modules; + this.attributeNames = html.attributeNames; + } + + real = (s: ts.Symbol) => (s.flags & ts.SymbolFlags.Alias ? this.checker.getAliasedSymbol(s) : s); + + opaque(name: string): string { + this.opaques.add(name); + return name; + } + + // Never numbered: a number would be the order two types were met in. + private module(name: string, of: string): string { + let n = name.replace(/[^A-Za-z0-9_]/g, "_"); + n = n.charAt(0).toUpperCase() + n.slice(1); + const taken = this.moduleNames.get(n); + if (taken !== undefined) { + throw new Error(`two types would be Types.${n}: ${taken}, and ${of}. Name each in the library's generator, by named`); + } + this.moduleNames.set(n, of); + return n; + } + + // A declaration of a name already bound that TypeScript takes for it both + // ways -- @internationalized/number's NumberFormatOptions, which extends + // Intl's with a member Intl's has -- is that type, so a value of one is + // passed where the other is asked. + private sameAs(symbol: ts.Symbol, type: ts.Type): Named | undefined { + for (const n of this.types.values()) { + if (n.symbol?.name === symbol.name && n.params.length === 0 + && this.checker.isTypeAssignableTo(type, n.type) && this.checker.isTypeAssignableTo(n.type, type)) return n; + } + return undefined; + } + + // Asked of the type, never of its text, which TypeScript cuts short. + private holdsAny(t: ts.Type, seen = new Set()): boolean { + if (t.flags & ts.TypeFlags.Any) return true; + if (seen.has(t)) return false; + seen.add(t); + const any = (ts: readonly ts.Type[] | undefined) => (ts ?? []).some((m) => this.holdsAny(m, seen)); + if (t.isUnionOrIntersection()) return any(t.types); + if (any(t.aliasTypeArguments) || any(this.checker.getTypeArguments(t as ts.TypeReference))) return true; + return t.getCallSignatures().some((s) => + this.holdsAny(s.getReturnType(), seen) || s.getParameters().some((q) => this.holdsAny(this.checker.getTypeOfSymbol(q), seen))); + } + + namedModule(symbol: ts.Symbol, type: ts.Type): Named { + const { checker, library } = this; + let n = this.types.get(symbol) ?? this.sameAs(symbol, type); + if (n) this.types.set(symbol, n); + if (!n) { + const decl = symbol.declarations?.[0]; + const params = + decl && (ts.isInterfaceDeclaration(decl) || ts.isClassDeclaration(decl) || ts.isTypeAliasDeclaration(decl)) + ? (decl.typeParameters ?? []).map((p) => p.name.text) + : []; + if (library.data?.(symbol) && checker.getPropertiesOfType(type).some((p) => this.holdsAny(checker.getTypeOfSymbol(p)))) params.push(DATA); + const declaredIn = decl?.getSourceFile().fileName.replace(/.*node_modules\//, "") ?? "the standard library"; + n = { module: this.module(library.named?.(symbol) ?? symbol.name, `${symbol.name} of ${declaredIn}`), symbol, type, params, conversions: [] }; + this.types.set(symbol, n); + this.queue.push(n); + } + return n; + } + + // An object type with no name of its own -- an inline type, an + // intersection, a const's typeof -- named by the path of names to where it + // is first met: a part's prop, Combobox_Root_Translations; what a function + // gives, Bins; what it takes, the parameter's name after it, Bins_Options. + anonymousModule(type: ts.Type, where: string): Named { + let n = this.types.get(type); + if (!n) { + n = { + module: this.module(where.split(".").map((w) => w.split("-").map((x) => x.charAt(0).toUpperCase() + x.slice(1)).join("")).join("_"), `the type met at ${where}`), + symbol: null, + type, + params: [], + conversions: [], + }; + this.types.set(type, n); + this.queue.push(n); + } + return n; + } + + refusals(): string[] { + const leftOut = this.library.leftOut ?? {}; + return [ + ...[...this.unmapped].filter(([where]) => !(where in leftOut)).map(([where, type]) => `${where}: no rule maps ${type}`), + ...Object.keys(leftOut).filter((where) => !this.unmapped.has(where)).map((where) => `${where}: named as left out, but it is bound, or no longer declared`), + ]; + } + + // A type nothing the binding reaches names, bound as a module of Types all + // the same: a class a library exports alone, its constructor the way in. + reach = (symbol: ts.Symbol): void => { + this.namedModule(symbol, this.checker.getDeclaredTypeOfSymbol(symbol)); + }; +} diff --git a/generate/mapping.ts b/generate/mapping.ts new file mode 100644 index 00000000..4f904b96 --- /dev/null +++ b/generate/mapping.ts @@ -0,0 +1,416 @@ +// The OCaml type of a TypeScript one, by AGENTS.md's "Kobalte's binding is +// generated from its declarations"; null where no rule maps it. + +import ts from "typescript"; +import { DATA, isDomLib, moduleOf, named, readable, value, type Binding, type Named } from "./library.ts"; +import { domType, isString, isTag } from "./melange.ts"; +import { snake } from "./names.ts"; +import { apply, isArrow, name as tname, paren, print, vars as typeVarsOf, type Param, type Type } from "./ocaml.ts"; + +export type Vars = Map; + +// Which way a value being mapped crosses: given to JavaScript, as a prop is; +// read from it, as a function's result is; or both, as a field its object's +// constructor takes and its getter reads. A function's parameters cross the +// other way to the function itself. +export type Polarity = "given" | "read" | "both"; +const flip = (p: Polarity): Polarity => (p === "given" ? "read" : p === "read" ? "given" : "both"); + +// [path] names a type with no name of its own: a parameter's is its +// function's path and its own name. +export type At = { vars: Vars; where: string; polarity: Polarity; path?: string }; +const pathOf = (at: At) => at.path ?? at.where; + +export type Arrow = Extract; + +export const jsxElement = tname("Solidtype.Jsx.element"); +export const unit = tname("unit"); +export const unknown: Type = { kind: "unknown" }; +export const isUnit = (t: Type) => t.kind === "name" && t.name === "unit"; +const either = (left: Type, right: Type): Type => ({ kind: "ref", module: "Either", args: [left, right] }); + +// A type as each file names it: inside Types, where the types refer to one +// another, a named type is its flat name; outside, its module's t. +export const flatName = (module: string) => `t_${snake(module)}`; + +export function typeVar(name: string, vars: Vars): Type { + let v = vars.get(name); + if (!v) { + v = { kind: "var", name: snake(name) }; + vars.set(name, v); + } + return v; +} + +// Whether a parameter may be left out: optional, or with a default, but not +// a rest of them. +export function leftOut(q: ts.Symbol): boolean { + const d = q.valueDeclaration; + return !!d && ts.isParameter(d) && !d.dotDotDotToken && (d.questionToken !== undefined || d.initializer !== undefined); +} + +// Whether reading a member gives a type variable that neither its module nor +// its own arguments fix: a value whose type its caller would choose, an +// unchecked cast, so it is not read. A variable an argument fixes, a generic +// function's, is the function's own. +export function unbound(t: Type, params: string[]): boolean { + const fixed = new Set([...params, ...(isArrow(t) ? t.params.flatMap((p) => typeVarsOf(p.type)) : [])]); + return typeVarsOf(isArrow(t) ? t.result : t).some((v) => !fixed.has(v)); +} + +export type Mapping = ReturnType; + +export function mapping(b: Binding) { + const { checker, library } = b; + + const naming = (name: (module: string) => string) => (module: string) => { + if (module === "Unknown") b.namesUnknown = true; + return name(module); + }; + const inside = naming((module) => (module === "Either" ? "either" : flatName(module))); + const outside = naming((module) => `Types.${module}.t`); + const showIn = (t: Type) => print(t, inside); + const argIn = (t: Type) => paren(t, inside); + const showOut = (t: Type) => print(t, outside); + const argOut = (t: Type) => paren(t, outside); + const givenIn = (t: Type) => paren(t, inside, false); + const givenOut = (t: Type) => print(t, outside, false); + const givenArgOut = (t: Type) => paren(t, outside, false); + + const isElement = (t: ts.Type) => t.aliasSymbol?.name === "Element" && moduleOf(t.aliasSymbol) === "solid-js"; + + // A type parameter bound by a DOM element, the element a hook is given, is + // any element, as solidtype's own functions of an element take one: Html + // types an element Melange has no type for, a
      , as Dom.element. + function elementBound(t: ts.Type, vars: Vars): Type | null { + const c = checker.getBaseConstraintOfType(t); + const symbol = c?.getSymbol(); + const dom = symbol && isDomLib(symbol) ? domType(symbol.name) : null; + return dom ? apply("Dom.element_like", typeVar(t.symbol?.name ?? "t", vars)) : null; + } + + // TypeScript's null: given, `T | null` is Js.Null.t, which cannot hold the + // undefined a library reads as no value given, so an option is made one + // only by Js.Null.fromOption, whose None is null; read, or `T | null | + // undefined` given, it is Js.Nullable.t, which takes whatever JavaScript + // holds. + const nullOf = (polarity: Polarity, undefinable: boolean) => + polarity === "given" && !undefinable ? "Js.Null.t" : "Js.Nullable.t"; + + // [absent] drops undefined, which an optional prop's absence already says; + // anywhere else -- a callback's argument, a result -- it is an option. + function map(t: ts.Type, at: At, absent = false): Type | null { + const { vars } = at; + if (t.flags & ts.TypeFlags.TypeParameter) return elementBound(t, vars) ?? typeVar(t.symbol?.name ?? "t", vars); + const hand = portedType(t, at, absent); + if (hand) return hand; + if (isElement(t)) return jsxElement; + // Exclude and its kind: the type it narrows. + if (t.flags & ts.TypeFlags.Conditional) return map((t as ts.ConditionalType).checkType, at); + if (t.flags & ts.TypeFlags.Substitution) return map((t as ts.SubstitutionType).baseType, at); + if (t.flags & ts.TypeFlags.Any && vars.has(DATA)) return vars.get(DATA)!; + if (t.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown | ts.TypeFlags.Never)) return null; + if (t.flags & ts.TypeFlags.Void) return unit; + if (t.flags & ts.TypeFlags.Undefined) return unit; + if (t.isUnion()) { + const undefinable = t.types.some((m) => m.flags & ts.TypeFlags.Undefined); + let members = t.types.filter((m) => !(m.flags & ts.TypeFlags.Undefined)); + // An accessor that takes a key or a function takes the function alone; + // one that takes only a key, Select's optionGroupChildren, takes its + // name, which OCaml cannot check. + const keys = members.filter((m) => m.flags & ts.TypeFlags.Index); + members = members.filter((m) => !(m.flags & ts.TypeFlags.Index)); + if (members.length === 0 && keys.length > 0) return tname("string"); + // Solid's element, inlined, holds null and undefined of its own. + const isJsx = members.some((m) => m.getSymbol()?.name === "ArrayElement" && moduleOf(m.getSymbol()!) === "solid-js"); + const nullable = !isJsx && members.some((m) => m.flags & ts.TypeFlags.Null); + if (!isJsx) members = members.filter((m) => !(m.flags & ts.TypeFlags.Null)); + const inner = mapUnion(members, at); + if (!inner) return null; + const value = nullable ? apply(nullOf(at.polarity, undefinable && !absent), inner) : inner; + return undefinable && !absent && !isJsx && !isUnit(inner) && !nullable ? apply("option", value) : value; + } + return mapUnion([t], at); + } + + // Solid's JSX.Element is a union, which TypeScript inlines into a union it + // is part of; its members together are one element. + const isJsxMember = (t: ts.Type) => { + const s = t.getSymbol(); + return s !== undefined && (s.name === "ArrayElement" || s.name === "Node") && + (moduleOf(s) === "solid-js" || isDomLib(s)); + }; + + const number = (where: string) => tname(library.whole?.(where) ? "int" : "float"); + + // A class of the library's kinds, by its kind: CalendarDate's + // calendar_date. + const kindOf = (symbol: ts.Symbol | undefined) => + symbol && library.kinds?.classes.includes(symbol) ? snake(symbol.name) : null; + + // The kinds a union of the classes is, or a structural interface of + // theirs: those of the classes TypeScript takes for it. + function kindsOf(members: ts.Type[]): Type | null { + const k = library.kinds; + if (!k) return null; + const tags = members.map((m) => kindOf(m.getSymbol())); + if (members.length > 1 && tags.every((t) => t !== null)) return { kind: "kinds", tags: (tags as string[]).sort() }; + const only = members.length === 1 ? members[0]!.getSymbol() : undefined; + if (only && k.structural.includes(only)) { + const taken = k.classes.filter((c) => checker.isTypeAssignableTo(checker.getDeclaredTypeOfSymbol(c), members[0]!)); + if (taken.length > 0) return { kind: "kinds", tags: taken.map((c) => snake(c.name)).sort() }; + } + return null; + } + + function mapUnion(members: ts.Type[], at: At): Type | null { + const { vars, where } = at; + if (members.length === 0) return unit; + // A style is a string, as an element's is: Solid's CSSProperties beside + // it is the same declarations as an object. + if (members.some(isString)) { + members = members.filter((m) => !(m.getSymbol()?.name === "CSSProperties" || m.aliasSymbol?.name === "CSSProperties")); + } + if (members.some((m) => m.getSymbol()?.name === "ArrayElement" && moduleOf(m.getSymbol()!) === "solid-js")) { + const rest = members.filter( + (m) => !isJsxMember(m) && !isString(m) && !m.isStringLiteral() && + !(m.flags & (ts.TypeFlags.NumberLike | ts.TypeFlags.BooleanLike | ts.TypeFlags.Null)), + ); + if (rest.length === 0) return jsxElement; + const others = mapUnion(rest, at); + return others ? either(jsxElement, others) : null; + } + if (members.some(isString)) { + const others = members.filter((m) => !isString(m) && !m.isStringLiteral()); + if (others.length === 0) return tname("string"); + // A string beside a function of the caller's data names a field of it, + // which OCaml cannot check: the function is taken alone, as an option + // accessor's key is. + const ofData = others.filter((m) => m.getCallSignatures().some((c) => c.getParameters().some((q) => checker.getTypeOfSymbol(q).flags & ts.TypeFlags.Any))); + if (vars.has(DATA) && ofData.length > 0) return mapUnion(others, at); + } + const booleans = members.filter((m) => m.flags & ts.TypeFlags.BooleanLike); + if (booleans.length === members.length) return tname("bool"); + const strings = members.filter((m) => m.isStringLiteral()).map((m) => (m as ts.StringLiteralType).value); + if (strings.length === members.length) { + return strings.every(isTag) ? { kind: "tags", tags: strings } : tname("string"); + } + if (members.every((m) => m.flags & ts.TypeFlags.NumberLike)) return number(where); + const kinded = kindsOf(members); + if (kinded) return kinded; + if (members.length === 1) return mapOne(members[0]!, at); + // Literals beside other kinds are one member, their own set of tags. + const literals = members.filter((m) => m.isStringLiteral()); + if (literals.length > 0 && literals.length < members.length) { + const rest = members.filter((m) => !m.isStringLiteral()); + const tags = mapUnion(literals, at); + const others = mapUnion(rest, at); + return tags && others ? either(tags, others) : null; + } + // Members of different JavaScript kinds: a type whose values are each + // member as it is, built by a conversion per member. + const kinds = members.map((m) => mapOne(m, at)); + if (kinds.some((k) => k === null)) return null; + const distinct = [...new Map((kinds as Type[]).map((k) => [showIn(k), k])).values()]; + if (distinct.length === 1) return distinct[0]!; + if (distinct.length === 2) return either(distinct[0]!, distinct[1]!); + return null; + } + + // A type the library ports by hand, by its alias or its own name: an + // alias's arguments are its own, an interface's or a class's its + // reference's. + function portedType(t: ts.Type, at: At, absent: boolean): Type | null { + const symbol = t.aliasSymbol ?? t.getSymbol(); + if (!library.ported || !symbol) return null; + const given = (t.aliasSymbol ? t.aliasTypeArguments : (t as ts.TypeReference).typeArguments) ?? []; + const args = given.map((a) => map(a, at) ?? unknown); + return library.ported(symbol, args, absent) ?? null; + } + + // A ref is Solid's: given an element or a function of one, it calls the + // function with the element its part draws, so it is that function, as an + // element's ref and Solid's Portal's are, of the element it declares; one + // declared as any of several, a portal's div or g, is any element. + function refOf(t: ts.Type, at: At): Type { + const fn = (t.isUnion() ? t.types : [t]).find((m) => m.getCallSignatures().length > 0); + const param = fn?.getCallSignatures()[0]?.parameters[0]; + const inElement = { ...at, where: `${at.where}(element)` }; + // Any of several is not mapped at all: mapping it would make a module of + // each, which nothing names. + const declared = param ? checker.getTypeOfSymbol(param) : undefined; + const element = declared && !declared.isUnion() ? map(declared, inElement, false) : null; + b.unmapped.delete(inElement.where); + return { kind: "arrow", params: [{ type: element ?? tname("Dom.element") }], result: tname("unit") }; + } + + // A property's or a parameter's type as its declaration names it, where + // that is a type the library ports by hand: an optional one's type, made a + // union with undefined, has lost the alias it was declared by. + function declaredPorted(p: ts.Symbol, at: At, absent: boolean): Type | null { + const d = p.valueDeclaration; + const node = d && (ts.isPropertySignature(d) || ts.isPropertyDeclaration(d) || ts.isParameter(d)) ? d.type : undefined; + return node && ts.isTypeReferenceNode(node) ? portedType(checker.getTypeFromTypeNode(node), at, absent) : null; + } + + // A function of several signatures is its first where OCaml calls it, + // since each is true of it and TypeScript tries them in order; one given + // to JavaScript would have to be all of them, which no one OCaml function + // is, so it is not bound. + const mustBeAll = (calls: readonly ts.Signature[], at: At) => calls.length > 1 && at.polarity !== "read"; + + function mapOne(t: ts.Type, at: At): Type | null { + const { vars, where } = at; + if (t.isUnion() || isElement(t) || t.flags & (ts.TypeFlags.Conditional | ts.TypeFlags.Substitution)) + return map(t, at); + const hand = portedType(t, at, false); + if (hand) return hand; + if (t.flags & ts.TypeFlags.TypeParameter) return elementBound(t, vars) ?? typeVar(t.symbol?.name ?? "t", vars); + if (t.flags & ts.TypeFlags.Index) return tname("string"); + if (checker.isTupleType(t)) { + const items = checker.getTypeArguments(t as ts.TypeReference).map((a) => map(a, at)); + return items.some((i) => i === null) ? null : { kind: "tuple", items: items as Type[] }; + } + if (isString(t) || t.isStringLiteral()) return tname("string"); + if (t.flags & ts.TypeFlags.BooleanLike) return tname("bool"); + if (t.flags & ts.TypeFlags.NumberLike) return number(where); + if (t.flags & ts.TypeFlags.BigIntLike) return tname("Js.Bigint.t"); + if (t.flags & (ts.TypeFlags.Void | ts.TypeFlags.Undefined)) return unit; + if (t.flags & ts.TypeFlags.Any && vars.has(DATA)) return vars.get(DATA)!; + if (t.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown | ts.TypeFlags.Never | ts.TypeFlags.Null)) return null; + const libraryAlias = t.aliasSymbol && isDomLib(t.aliasSymbol); + if (libraryAlias && t.aliasSymbol!.name === "NonNullable" && t.aliasTypeArguments?.[0]) + return map(t.aliasTypeArguments[0], at); + // Required: a type of its own, whose every field is there, + // named for both. + const required = libraryAlias && t.aliasSymbol!.name === "Required" ? t.aliasTypeArguments?.[0] : undefined; + const requiredName = required && (required.aliasSymbol ?? required.getSymbol())?.name; + if (requiredName && named(requiredName)) return reference(b.anonymousModule(t, `Required${requiredName}`), t, undefined, at); + const path = pathOf(at); + // A standard alias -- Partial, Omit -- is the type it makes. + const alias = libraryAlias ? undefined : t.aliasSymbol; + // A type of one argument, the argument mapped. + const of = (n: string, arg: ts.Type | undefined) => { + const a = arg ? map(arg, at) : null; + return a ? apply(n, a) : null; + }; + if (alias?.name === "Accessor") return of("Solidtype.Solid.accessor", t.aliasTypeArguments?.[0]); + if (alias?.name === "Setter") return of("Solidtype.Solid.setter", t.aliasTypeArguments?.[0]); + const symbol = t.getSymbol(); + const name = symbol?.name ?? ""; + if (name === "Element" && moduleOf(symbol!) === "solid-js") return jsxElement; + if (alias?.name === "Element" || /JSX\.Element/.test(checker.typeToString(t, undefined, ts.TypeFormatFlags.NoTruncation))) return jsxElement; + if (checker.isArrayType(t)) return of("array", checker.getTypeArguments(t as ts.TypeReference)[0]); + if (name === "Set" && symbol && isDomLib(symbol)) return of("Js.Set.t", checker.getTypeArguments(t as ts.TypeReference)[0]); + if (name === "Iterable") { + return of("array", (t as ts.TypeReference).typeArguments?.[0] ?? checker.getTypeArguments(t as ts.TypeReference)[0]); + } + if (symbol && isDomLib(symbol)) { + if (name === "Date") return tname("Js.Date.t"); + if (name === "RegExp") return tname("Js.Re.t"); + if (name === "Map") { + const [k, v] = checker.getTypeArguments(t as ts.TypeReference).map((a) => map(a, at)); + return k && v ? apply("Js.Map.t", k, v) : null; + } + if (name === "Promise") return of("Js.Promise.t", checker.getTypeArguments(t as ts.TypeReference)[0]); + // An interface or a class named for an event or an element is one, but + // never a method that happens to be named so, initEvent. + const kind = symbol.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.Class); + const dom = domType(name) ?? (kind && /Event$/.test(name) ? "Dom.event" : kind && /Element$/.test(name) ? "Dom.element" : null); + if (dom) return tname(dom); + // A standard interface is opaque but for those a user builds or reads; + // anything else of the standard library is a function or not bound. + const declared = symbol.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.Class); + if (declared && named(name) && !name.startsWith("__") && !readable.has(name)) return { kind: "ref", module: b.opaque(name), args: [] }; + if (!readable.has(name)) { + const calls = t.getCallSignatures(); + return calls.length > 0 && t.getProperties().length === 0 && !mustBeAll(calls, at) ? mapFunction(calls[0]!, at) : null; + } + } + const calls = t.getCallSignatures(); + if (mustBeAll(calls, at)) return null; + if (calls.length > 0 && t.getProperties().length === 0) return mapFunction(calls[0]!, at); + if (calls.length > 0 && name === "Component") { + // A component prop: a function from the props Kobalte gives it. + return mapFunction(calls[0]!, at); + } + const anonymous = !symbol || symbol.name === "__type" || symbol.name === "__object"; + // Solid's handler argument, an event with its current target and target + // named, is the event, as an element's handler in Html takes it. + if (t.isIntersection()) { + const event = t.types.find((m) => { + const e = m.getSymbol(); + return e !== undefined && isDomLib(e) && /Event$/.test(e.name); + }); + const targets = t.types.filter((m) => m !== event); + if (event && targets.every((m) => checker.getPropertiesOfType(m).every((p) => p.name === "currentTarget" || p.name === "target"))) { + return mapOne(event, at); + } + } + if (t.isIntersection()) { + // Its own members are the module's; a standard member is a conversion. + const standard = t.types.filter((m) => m.getSymbol() && isDomLib(m.getSymbol()!)); + const own = t.types.filter((m) => !standard.includes(m) && m.getProperties().length > 0); + if (own.length === 0) return standard[0] ? mapOne(standard[0], at) : null; + const n = alias ? b.namedModule(alias, t) : b.anonymousModule(t, path); + const ref = reference(n, t, alias, at); + if (n.conversions.length === 0) { + for (const m of standard) { + const d = mapOne(m, at); + if (d?.kind === "name" && d.name.startsWith("Dom.")) n.conversions.push(d.name); + } + } + return ref; + } + if (anonymous && t.getProperties().length > 0) { + const n = alias ? b.namedModule(alias, t) : b.anonymousModule(t, path); + return reference(n, t, alias, at); + } + if (symbol && (symbol.flags & (ts.SymbolFlags.Interface | ts.SymbolFlags.Class | ts.SymbolFlags.TypeLiteral | ts.SymbolFlags.TypeAlias))) { + const owner = alias ?? symbol; + return reference(b.namedModule(owner, t), t, alias, at); + } + return null; + } + + // A named type's reference, its type arguments applied, one it cannot map + // unknown. + function reference(n: Named, t: ts.Type, alias: ts.Symbol | undefined, at: At): Type { + const args = (alias ? t.aliasTypeArguments : (t as ts.TypeReference).typeArguments) ?? []; + return { kind: "ref", module: n.module, args: n.params.map((_, i) => (args[i] ? map(args[i]!, at) : null) ?? unknown) }; + } + + // A function's OCaml type. [labelled], for a function the user calls, an + // external, writes a parameter that may be left out as an optional + // argument, ?name, followed by unit, as the stdlib does; a function + // JavaScript calls takes its arguments by position, so there it is an + // option. + function mapFunction(sig: ts.Signature, at: At, labelled = false): Arrow | null { + const ps = sig.getParameters(); + const params: (Param | null)[] = ps.map((q) => { + const crossed = { ...at, polarity: flip(at.polarity), path: `${pathOf(at)}.${q.name}` }; + const optional = labelled && leftOut(q); + const t = checker.getTypeOfSymbol(q); + const m = declaredPorted(q, crossed, optional) ?? map(optional ? checker.getNonNullableType(t) : t, crossed); + if (m === null) return null; + // A function of several arguments the user gives: an OCaml function's + // type does not say whether it takes them at once, so Melange is told + // to pass it so; it does that for no optional argument, so one left + // out is not bound. + const several = labelled && isArrow(m) && m.params.length > 1; + if (several && optional) return null; + if (several) return { type: m, uncurry: true }; + return optional ? { label: value(snake(q.name)), optional: true, type: m } : { type: m }; + }); + if (params.some((p) => p === null)) return null; + // What a function JavaScript calls gives back as any, JavaScript ignores. + const returned = sig.getReturnType(); + const result = !labelled && returned.flags & ts.TypeFlags.Any ? unit : map(returned, at); + if (!result) return null; + const args = params.length === 0 ? [{ type: unit }] : (params as Param[]); + if (labelled && ps.some(leftOut)) args.push({ type: unit }); + return { kind: "arrow", params: args, result }; + } + + return { map, mapFunction, refOf, declaredPorted, kindOf, showIn, argIn, showOut, argOut, givenIn, givenOut, givenArgOut }; +} diff --git a/generate/ocaml.ts b/generate/ocaml.ts index a9799458..17856d2c 100644 --- a/generate/ocaml.ts +++ b/generate/ocaml.ts @@ -2,7 +2,9 @@ // asks what a type is -- a function, its arguments, its variables -- of the // tree, never of the text it prints. -export type Param = { label?: string; optional?: boolean; type: Type }; +// [uncurry] marks a function of several arguments given to an external: +// Melange then passes it at the arity its type says, whatever its shape. +export type Param = { label?: string; optional?: boolean; uncurry?: boolean; type: Type }; export type Type = // A type with no arguments, as written: string, Dom.event, 'a t. @@ -21,6 +23,11 @@ export type Type = // class's: [< `time | `zoned_date_time ] Value.t, an open set, so a value // of any kind in it is taken. | { kind: "kinds"; tags: string[] } + // What TypeScript types any, where a type is asked: given to JavaScript it + // is whatever the caller has, _; read from it, it is Unknown, a type of + // the binding's own that nothing reads, since a type its reader chose + // would be an unchecked cast. + | { kind: "unknown" } | { kind: "tuple"; items: Type[] } | { kind: "arrow"; params: Param[]; result: Type }; @@ -40,6 +47,7 @@ export function vars(t: Type): string[] { case "name": case "tags": case "kinds": + case "unknown": return; case "apply": case "ref": @@ -58,18 +66,29 @@ export function vars(t: Type): string[] { return [...found]; } +// A variant's tags in the order of their names. TypeScript lists a union's +// members in the order it first met each, which is whatever was read before, +// so a variant written in that order changes with what else a run reads. +export function byTag(tags: string[], written: T[]): T[] { + return tags + .map((tag, i) => [tag, written[i]!] as const) + .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)) + .map(([, w]) => w); +} + // A type in a position where an arrow must be parenthesized: an argument, a // tuple's item, a function's result. -export const paren = (t: Type, ref: (module: string) => string): string => - isArrow(t) ? `(${print(t, ref)})` : print(t, ref); +export const paren = (t: Type, ref: (module: string) => string, read = true): string => + isArrow(t) ? `(${print(t, ref, read)})` : print(t, ref, read); -export function print(t: Type, ref: (module: string) => string): string { +// A function's arguments cross the other way to the function itself. +export function print(t: Type, ref: (module: string) => string, read = true): string { const applied = (n: string, args: Type[]) => args.length === 0 ? n : args.length === 1 - ? `${paren(args[0]!, ref)} ${n}` - : `(${args.map((a) => print(a, ref)).join(", ")}) ${n}`; + ? `${paren(args[0]!, ref, read)} ${n}` + : `(${args.map((a) => print(a, ref, read)).join(", ")}) ${n}`; switch (t.kind) { case "name": return t.name; @@ -81,18 +100,60 @@ export function print(t: Type, ref: (module: string) => string): string { return applied(ref(t.module), t.args); case "tags": { const js = t.js; - return `[ ${t.tags.map((s, i) => (js ? `\`${s} [@mel.as ${JSON.stringify(js[i])}]` : `\`${s}`)).join(" | ")} ]`; + const written = t.tags.map((s, i) => (js ? `\`${s} [@mel.as ${JSON.stringify(js[i])}]` : `\`${s}`)); + return `[ ${byTag(t.tags, written).join(" | ")} ]`; } case "kinds": return `[< ${t.tags.map((s) => `\`${s}`).join(" | ")} ] ${ref("Value")}`; + case "unknown": + return read ? ref("Unknown") : "_"; case "tuple": - return `(${t.items.map((i) => paren(i, ref)).join(" * ")})`; + return `(${t.items.map((i) => paren(i, ref, read)).join(" * ")})`; case "arrow": { const params = t.params.map((p) => { - const type = paren(p.type, ref); + const given = paren(p.type, ref, !read); + const type = p.uncurry ? `(${given} [@mel.uncurry])` : given; return p.label === undefined ? type : `${p.optional ? "?" : "~"}${p.label}:${type}`; }); - return `${params.join(" -> ")} -> ${paren(t.result, ref)}`; + return `${params.join(" -> ")} -> ${paren(t.result, ref, read)}`; } } } + +export type Item = + // [hidden]: in the file alone, under the wrapper its interface declares. + | { kind: "external"; name: string; type: string; js: string; attributes?: string[]; doc?: string | undefined; hidden?: boolean } + | { kind: "let"; name: string; type: string; definition: string; doc?: string | undefined } + | { kind: "type"; name: string; manifest?: string; doc?: string | undefined; note?: string } + | { kind: "module"; name: string; items: Item[]; doc?: string | undefined; note?: string } + | { kind: "alias"; name: string; of: string } + | { kind: "include"; ml: string; mli: string }; + +const documented = (doc: string | undefined, declaration: string) => (doc ? `(** ${doc} *)\n${declaration}` : declaration); +const noted = (note: string | undefined, declaration: string) => (note ? `(* ${note} *)\n${declaration}` : declaration); + +export function printItems(items: Item[], file: "ml" | "mli"): string { + const one = (item: Item): string | null => { + switch (item.kind) { + case "external": { + if (item.hidden && file === "mli") return null; + const attributes = (item.attributes ?? []).map((a) => ` [@@${a}]`).join(""); + return documented(item.doc, `external ${item.name} : ${item.type} = ${JSON.stringify(item.js)}${attributes}`); + } + case "let": + return file === "ml" ? item.definition : documented(item.doc, `val ${item.name} : ${item.type}`); + case "type": + return noted(item.note, documented(item.doc, `type ${item.name}${item.manifest ? ` = ${item.manifest}` : ""}`)); + case "module": { + const body = printItems(item.items, file); + const opened = file === "ml" ? `module ${item.name} = struct` : `module ${item.name} : sig`; + return noted(item.note, documented(item.doc, `${opened}\n${body}\nend`)); + } + case "alias": + return `module ${item.name} = ${item.of}`; + case "include": + return file === "ml" ? item.ml : item.mli; + } + }; + return items.map(one).filter((text) => text !== null).join("\n\n"); +} diff --git a/generate/output.ts b/generate/output.ts index f3e7676f..6f65b37e 100644 --- a/generate/output.ts +++ b/generate/output.ts @@ -4,6 +4,23 @@ import { readFileSync, writeFileSync } from "node:fs"; +export function refuse(lines: string[], advice: string): void { + if (lines.length === 0) return; + for (const line of lines) console.error(line); + console.error(advice); + process.exit(1); +} + +// ocamlformat is the switch's, which `make` runs each generator under. +export function formatted(path: string, text: string): string { + const run = Bun.spawnSync(["ocamlformat", `--name=${path}`, "-"], { stdin: Buffer.from(text), stdout: "pipe", stderr: "pipe" }); + if (run.exitCode !== 0) { + console.error(run.stderr.toString()); + throw new Error(`ocamlformat refuses what the generator wrote for ${path}`); + } + return run.stdout.toString(); +} + export function writeOrCheck(files: [path: string, text: string][], from: string): void { if (process.argv.includes("--check")) { for (const [path, text] of files) { diff --git a/generate/package.ts b/generate/package.ts new file mode 100644 index 00000000..05d9109e --- /dev/null +++ b/generate/package.ts @@ -0,0 +1,43 @@ +import ts from "typescript"; +import { readFileSync, realpathSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { browser } from "./program.ts"; + +export const root = fileURLToPath(new URL("../", import.meta.url)); + +// Its real path: a package manager that links each package's dependencies +// beside it, as Bun does, resolves them from there. +export function installed(name: string): { dir: string; version: string } { + const dir = realpathSync(`${root}node_modules/${name}`); + return { dir, version: JSON.parse(readFileSync(`${dir}/package.json`, "utf8")).version as string }; +} + +export type Declarations = { + program: ts.Program; + checker: ts.TypeChecker; + exportsOf: (entry: string) => ts.Symbol[]; + real: (symbol: ts.Symbol) => ts.Symbol; +}; + +export function declarations(entries: string[], options: ts.CompilerOptions = {}): Declarations { + const program = ts.createProgram(entries, { + ...browser, + module: ts.ModuleKind.ESNext, + moduleResolution: ts.ModuleResolutionKind.Bundler, + ...options, + }); + const checker = program.getTypeChecker(); + return { + program, + checker, + exportsOf: (entry) => { + const source = program.getSourceFile(entry); + const module = source && checker.getSymbolAtLocation(source); + if (!module) throw new Error(`${entry} is no module`); + return checker.getExportsOfModule(module); + }, + real: (s) => (s.flags & ts.SymbolFlags.Alias ? checker.getAliasedSymbol(s) : s), + }; +} + +export const byName = (symbols: ts.Symbol[]) => [...symbols].sort((a, b) => (a.name < b.name ? -1 : 1)); diff --git a/generate/rhp.ts b/generate/rhp.ts index ae7a9017..b89d41ca 100644 --- a/generate/rhp.ts +++ b/generate/rhp.ts @@ -12,30 +12,20 @@ // `--check` fails when one differs from what rhp's types give. import ts from "typescript"; -import { existsSync, readFileSync, realpathSync } from "node:fs"; -import { fileURLToPath } from "node:url"; -import { bind, doc, functionBinding, names, part, real, typesFiles, unmapped, valueBinding } from "./binding.ts"; -import { label, table } from "./names.ts"; -import { apply, name as tname, type Type } from "./ocaml.ts"; -import { writeOrCheck } from "./output.ts"; -import { Source } from "./source.ts"; -import { browser } from "./program.ts"; - -const root = fileURLToPath(new URL("../", import.meta.url)); -const dist = realpathSync(`${root}node_modules/@bezda/rhp/dist`); -const entry = `${dist}/index.d.ts`; -const out = `${root}rhp/solidtype_rhp.ml`; -const typesOut = `${root}rhp/types.ml`; -const namesOut = `${root}ppx/rhp_names.ml`; -const rhp = JSON.parse(readFileSync(`${root}node_modules/@bezda/rhp/package.json`, "utf8")).version as string; - -const program = ts.createProgram([entry], { - ...browser, - jsx: ts.JsxEmit.Preserve, - module: ts.ModuleKind.ESNext, - moduleResolution: ts.ModuleResolutionKind.Bundler, +import { existsSync, readFileSync } from "node:fs"; +import { reading } from "./generator.ts"; +import { label } from "./names.ts"; +import { apply, name as tname, type Item, type Type } from "./ocaml.ts"; +import { refuse } from "./output.ts"; +import { byName, root } from "./package.ts"; + +const by = "generate/rhp.ts"; +const { dir, version: rhp, checker, exportsOf, bind } = reading({ + package: "@bezda/rhp", + entries: (dir) => [`${dir}/dist/index.d.ts`], + jsx: true, }); -const checker = program.getTypeChecker(); +const exports = exportsOf(`${dir}/dist/index.d.ts`); const declaredIn = (symbol: ts.Symbol, pattern: RegExp) => (symbol.declarations ?? []).some((d) => pattern.test(d.getSourceFile().fileName)); @@ -73,7 +63,7 @@ const portedExports = new Set([ const handModules = ["Animate", "Color", "Ease", "Many_dots", "Order", "Plot", "Row", "Scale", "Shape", "Slat", "Ticks"]; const included = "Helpers"; -bind(root, checker, { +const { doc, functionBinding, part, real, valueBinding, write } = bind({ name: "rhp", throwsUndocumented: () => false, // Solid's CSSProperties alone is a style rhp spreads into its own, an @@ -125,25 +115,19 @@ function elementOf(node: ts.Node): string | null { return null; } -const source = program.getSourceFile(entry); -const mod = source && checker.getSymbolAtLocation(source); -if (!mod) throw new Error(`no ${entry}`); - // A component with a page of its own names it in its comment, the page's // path as the solidtype package installs it, so an agent reading the // signature is sent to how the component is used. Indented as a module's // comment is, which top() takes back to the file's margin. -function pageDoc(comment: string[], name: string): string[] { +function pageDoc(comment: string | undefined, name: string): string | undefined { const page = `rhp/${name.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase()}`; if (!existsSync(`${root}docs/src/content/docs/${page}.mdx`)) return comment; - const line = `Its page, with its examples:\n [$(opam var solidtype:doc)/pages/${page}.md].`; - const last = comment.at(-1); - if (last === undefined) return [` (** ${line} *)`]; - return [...comment.slice(0, -1), last.replace(/ \*\)$/, `\n\n ${line} *)`)]; + const line = `Its page, with its examples: [$(opam var solidtype:doc)/pages/${page}.md].`; + return comment === undefined ? line : `${comment}\n\n${line}`; } -const src = new Source(); -for (const sym of [...checker.getExportsOfModule(mod)].sort((a, b) => (a.name < b.name ? -1 : 1))) { +const items: Item[] = []; +for (const sym of byName(exports)) { if (portedExports.has(sym.name)) continue; const r = real(sym); const type = checker.getTypeOfSymbol(r); @@ -155,20 +139,14 @@ for (const sym of [...checker.getExportsOfModule(mod)].sort((a, b) => (a.name < const props = checker.getTypeOfSymbol(signature.getParameters()[0]!); const element = renders[sym.name] ?? (param?.type ? elementOf(param.type) : null); const own = checker.getPropertiesOfType(props).filter(ofRhp); - src.both(...pageDoc(doc(r, " "), sym.name)); - src.module(" ", sym.name, () => part(src, "@bezda/rhp", sym.name, decl, null, [], sym.name, { element, own })); - src.both(``); + items.push({ kind: "module", name: sym.name, doc: pageDoc(doc(r), sym.name), items: part("@bezda/rhp", sym.name, decl, null, [], sym.name, { element, own }) }); } else if (r.flags & ts.SymbolFlags.Function) { - functionBinding(src, r, sym.name, "@bezda/rhp", sym.name); + items.push(...functionBinding(r, sym.name, "@bezda/rhp", sym.name)); } else if (r.flags & ts.SymbolFlags.Variable && signature === undefined) { - valueBinding(src, r, sym.name, "@bezda/rhp", sym.name); + items.push(...valueBinding(r, sym.name, "@bezda/rhp", sym.name)); } } -const { ml: typesText, mli: typesMli } = typesFiles(`(* The types rhp's components and functions name, each a module. - Generated from the declarations of @bezda/rhp ${rhp} by generate/rhp.ts; - never edited by hand. *)`); - // What a hand port is held to: each prop, setting, field or key rhp declares // for it is bound in its .mli, or named here as left out, with the reason, // so one rhp adds fails the run as a type no rule maps does, rather than @@ -197,7 +175,7 @@ function boundIn(mli: string): Set { // What rhp declares for a port: an object type's own members, or a union's // keys, a template's head the key of its family, series-${number}'s series. function declaredNames(name: string): string[] { - const symbol = checker.getExportsOfModule(mod!).find((s) => s.name === name); + const symbol = exports.find((s) => s.name === name); if (!symbol) throw new Error(`rhp declares no ${name}`); const type = checker.getDeclaredTypeOfSymbol(real(symbol)); if (type.isUnion()) { @@ -209,7 +187,7 @@ function declaredNames(name: string): string[] { } const drift: string[] = []; -const exported = new Set(checker.getExportsOfModule(mod).map((s) => s.name)); +const exported = new Set(exports.map((s) => s.name)); for (const name of portedExports) if (!exported.has(name)) drift.push(`${name}: ported by hand, but rhp no longer exports it`); for (const { port, declared, leftOut = {} } of held) { const mli = `${root}rhp/${port}.mli`; @@ -218,53 +196,40 @@ for (const { port, declared, leftOut = {} } of held) { continue; } const bound = boundIn(mli); - for (const name of declaredNames(declared)) { + const declaredHere = declaredNames(declared); + for (const name of Object.keys(leftOut)) { + if (!declaredHere.includes(name)) drift.push(`${declared}.${name}: named as left out, but rhp no longer declares it`); + } + for (const name of declaredHere) { if (!(name in leftOut) && !bound.has(label(name))) drift.push(`${declared}.${name}: rhp declares it, and rhp/${port}.mli neither binds it nor is said to leave it out`); } } // Whole or failing: a declaration no rule maps and nothing ports by hand, // and a hand port behind what rhp declares. -if (drift.length > 0) { - for (const d of drift) console.error(d); - console.error("rhp's hand ports above are behind its declarations: bind each, or name it as left out in generate/rhp.ts"); - process.exit(1); -} -if (unmapped.size > 0) { - for (const [k, v] of unmapped) console.error(`${k}: ${v}`); - console.error("rhp's declarations above map by no rule: port each by hand, in generate/rhp.ts and rhp/"); - process.exit(1); -} - -// Each module is at the top of the file, where the core writes it one deep. -const top = (lines: string[]) => lines.map((l) => l.replace(/^ /gm, "")); - -// The included module, as the file or its interface writes it: the -// interface strengthened, so its types are the module's own. -const include = (mli: boolean) => (mli ? `include module type of struct include ${included} end` : `include ${included}`); - -const file = (modules: string[], mli: boolean) => `(* rhp's components and functions, and the types they name, in Types. - Generated from the declarations of @bezda/rhp ${rhp} by generate/rhp.ts; +refuse(drift, "rhp's hand ports above are not what its declarations give: bind each, or name it as left out in generate/rhp.ts"); + +write({ + module: "rhp/solidtype_rhp", + names: "ppx/rhp_names.ml", + by, + whose: "rhp's", + otherwise: "port it by hand, in rhp/", + header: `(* rhp's components and functions, and the types they name, in Types. + Generated from the declarations of @bezda/rhp ${rhp} by ${by}; never edited by hand. A component's props check takes its own props, then its children, then the attributes of the element it passes them on to. Each check is external, since the compiler checks it and Melange writes none of it. - What no rule maps is ported by hand, a module each, re-exported here. *) - -module Types = Types -${handModules.map((m) => `module ${m} = ${m}`).join("\n")} -${include(mli)} - -${modules.join("\n")}`; - -writeOrCheck( - [ - [out, file(top(src.ml), false)], - [`${out}i`, file(top(src.mli), true)], - [typesOut, typesText], - [`${typesOut}i`, typesMli], - [namesOut, table(names, "generate/rhp.ts")], + What no rule maps is ported by hand, a module each, re-exported here. *)`, + typesHeader: `(* The types rhp's components and functions name, each a module. + Generated from the declarations of @bezda/rhp ${rhp} by ${by}; + never edited by hand. *)`, + items: [ + ...handModules.map((m): Item => ({ kind: "alias", name: m, of: m })), + // The interface strengthened, so the included module's types are its own. + { kind: "include", ml: `include ${included}`, mli: `include module type of struct include ${included} end` }, + ...items, ], - "rhp's types", -); +}); diff --git a/generate/solid_html.ts b/generate/solid_html.ts new file mode 100644 index 00000000..498ddb7a --- /dev/null +++ b/generate/solid_html.ts @@ -0,0 +1,185 @@ +import ts from "typescript"; +import { readFileSync } from "node:fs"; +import { domType, isString, isTag } from "./melange.ts"; +import { record } from "./names.ts"; +import { byTag } from "./ocaml.ts"; +import { root } from "./package.ts"; +import { browser } from "./program.ts"; + +export type Members = Map; + +export type SolidHtml = { + version: string; + elements: { tag: string; attributes: string; element: string }[]; + membersOf: (name: string) => Members; + common: Members; + // Each attribute's name as a user writes it, with its JavaScript name. + names: Map; + unmapped: Map; + modules: Set; + attributeNames: Set; +}; + +let read: SolidHtml | undefined; + +export function solidHtml(): SolidHtml { + read ??= readSolidHtml(); + return read; +} + +function readSolidHtml(): SolidHtml { +const jsx = `${root}node_modules/solid-js/types/jsx.d.ts`; +const version = JSON.parse(readFileSync(`${root}node_modules/solid-js/package.json`, "utf8")).version as string; +const program = ts.createProgram([jsx], browser); +const checker = program.getTypeChecker(); +const source = program.getSourceFile(jsx); +if (!source) throw new Error(`no ${jsx}`); + +function namespace(node: ts.Node): ts.ModuleDeclaration | undefined { + let found: ts.ModuleDeclaration | undefined; + node.forEachChild((n) => { + if (ts.isModuleDeclaration(n) && n.name.getText() === "JSX") found = n; + }); + return found; +} +const ns = namespace(source); +if (!ns?.body || !ts.isModuleBlock(ns.body)) throw new Error("no JSX namespace"); +const interfaces = new Map(); +for (const s of ns.body.statements) if (ts.isInterfaceDeclaration(s)) interfaces.set(s.name.text, s); + +// Each attribute's name as a user writes it, with its JavaScript name. +const names = new Map(); + +// An attribute's OCaml name, by the one spelling rule. A handler Solid also +// takes in lower case, onclick beside onClick, is the same handler, so it +// has the one name, on_click. +function label(name: string): string | null { + if (!/^[a-z][A-Za-z0-9-]*$/.test(name)) return null; + if (/^on[a-z]/.test(name)) return null; + return record(names, name); +} + +const eventUnions = new Set([ + "EventHandlerUnion", "InputEventHandlerUnion", "FocusEventHandlerUnion", + "ChangeEventHandlerUnion", "EventHandlerWithOptionsUnion", +]); + +const unmapped = new Map(); + +// What an attribute holds, from Solid's declared type, by AGENTS.md's "An +// attribute's type is generated from Solid's JSX types", and null for a +// type none of its mappings covers. +function ocamlType(name: string, node: ts.TypeNode | undefined): string | null { + if (!node) return null; + if (name === "ref") return "element -> unit"; + if (name === "classList") return "bool Js.Dict.t"; + if (name === "style") return "string"; + const parts = ts.isUnionTypeNode(node) ? node.types : [node]; + for (const p of parts) { + if (ts.isTypeReferenceNode(p) && eventUnions.has(p.typeName.getText())) { + const event = p.typeArguments?.[1]?.getText() ?? "Event"; + return `${domType(event) ?? "Dom.event"} -> unit`; + } + } + const type = checker.getTypeFromTypeNode(node); + const members = (type.isUnion() ? type.types : [type]).filter( + (t) => !(t.flags & (ts.TypeFlags.Undefined | ts.TypeFlags.Null)), + ); + const flags = members.map((t) => t.flags); + const has = (f: ts.TypeFlags) => flags.some((x) => (x & f) !== 0); + const only = (f: ts.TypeFlags) => flags.every((x) => (x & f) !== 0); + if (members.length === 0 || has(ts.TypeFlags.Any | ts.TypeFlags.Never)) return null; + if (members.some(isString)) return "string"; + if (only(ts.TypeFlags.BooleanLike)) return "bool"; + const strings = members.filter((t) => t.isStringLiteral()).map((t) => (t as ts.StringLiteralType).value); + const booleans = members.filter((t) => t.flags & ts.TypeFlags.BooleanLike); + if (booleans.length > 0 && strings.length + booleans.length === members.length) { + // A boolean among other words is any of those words. + return strings.every((s) => s === "true" || s === "false") ? "bool" : "string"; + } + // Solid writes a boolean attribute as the text "true" or "false". + if (strings.length === members.length && strings.every((s) => s === "true" || s === "false")) return "bool"; + if (strings.length === members.length) { + return strings.every(isTag) ? `[ ${byTag(strings, strings.map((s) => `\`${s}`)).join(" | ")} ]` : "string"; + } + if (only(ts.TypeFlags.NumberLike)) return "int"; + if (has(ts.TypeFlags.Number) && members.every((t) => t.flags & (ts.TypeFlags.NumberLike | ts.TypeFlags.StringLike))) return "string"; + return null; +} + +// The string literals a type node lists, "a" | "b". +function literals(node: ts.TypeNode): string[] { + const parts = ts.isUnionTypeNode(node) ? node.types : [node]; + return parts.flatMap((p) => (ts.isLiteralTypeNode(p) && ts.isStringLiteral(p.literal) ? [p.literal.text] : [])); +} + +// An interface's members, its bases' included, with the element type T left +// as [element]. +function membersOf(name: string, seen = new Set()): Members { + const decl = interfaces.get(name); + const members: Members = new Map(); + if (!decl || seen.has(name)) return members; + seen.add(name); + for (const clause of decl.heritageClauses ?? []) { + for (const base of clause.types) { + const target = base.expression.getText(); + // Pick is the members of X it names, and Omit the + // rest: an SVG shape takes its fill and stroke so. X is read again, + // whoever else has, since each takes its own few. + if (target === "Pick" || target === "Omit") { + const [from, keys] = base.typeArguments ?? []; + if (!from || !keys || !ts.isTypeReferenceNode(from)) continue; + const listed = new Set(literals(keys).map(label)); + for (const [k, v] of membersOf(from.typeName.getText(), new Set(seen))) { + if (listed.has(k) === (target === "Pick")) members.set(k, v); + } + continue; + } + for (const [k, v] of membersOf(target, seen)) members.set(k, v); + } + } + for (const m of decl.members) { + if (!ts.isPropertySignature(m) || !m.name) continue; + const raw = m.name.getText().replace(/^["']|["']$/g, ""); + if (raw === "children" || raw.startsWith("$")) continue; + const l = label(raw); + if (!l) continue; + const t = ocamlType(raw, m.type); + if (t) members.set(l, t); + else unmapped.set(`${name}.${raw}`, m.type?.getText() ?? "?"); + } + return members; +} + +// Each element: its tag, the interface of its attributes, and its DOM type. +const elements: { tag: string; attributes: string; element: string }[] = []; +for (const tags of ["HTMLElementTags", "HTMLElementDeprecatedTags", "SVGElementTags"]) { + const decl = interfaces.get(tags); + if (!decl) throw new Error(`no ${tags}`); + for (const m of decl.members) { + if (!ts.isPropertySignature(m) || !m.type || !ts.isTypeReferenceNode(m.type)) continue; + const tag = m.name.getText(); + if (!/^[a-z][A-Za-z0-9]*$/.test(tag) || elements.some((e) => e.tag === tag)) continue; + const element = m.type.typeArguments?.[0]?.getText() ?? "Element"; + elements.push({ tag, attributes: m.type.typeName.getText(), element: domType(element) ?? "Dom.element" }); + } +} + +const common = membersOf("DOMAttributes"); +const module = (tag: string) => tag.charAt(0).toUpperCase() + tag.slice(1); +return { + version, + elements, + membersOf: (name) => membersOf(name), + common, + names, + unmapped, + // Element is the module of a tag known only as the page runs. + modules: new Set([...elements.map((e) => module(e.tag)), "Element"]), + get attributeNames() { + const all = new Set(common.keys()); + for (const attributes of new Set(elements.map((e) => e.attributes))) for (const k of membersOf(attributes).keys()) all.add(k); + return all; + }, +}; +} diff --git a/generate/source.ts b/generate/source.ts deleted file mode 100644 index d3ddfa65..00000000 --- a/generate/source.ts +++ /dev/null @@ -1,36 +0,0 @@ -// An OCaml file and its interface, written side by side: a line is both -// files', the implementation's alone -- a let's body, a raw external under -// it -- or the interface's alone, the let's val. Nothing reads the -// implementation back to find its interface. - -export class Source { - readonly ml: string[] = []; - readonly mli: string[] = []; - - both(...lines: string[]): void { - this.ml.push(...lines); - this.mli.push(...lines); - } - - implementation(...lines: string[]): void { - this.ml.push(...lines); - } - - interface(...lines: string[]): void { - this.mli.push(...lines); - } - - // A module, a struct in the file and a sig in its interface. - module(indent: string, name: string, body: () => void): void { - this.ml.push(`${indent}module ${name} = struct`); - this.mli.push(`${indent}module ${name} : sig`); - body(); - this.both(`${indent}end`); - } - - // Another source's lines, after this one's. - append(other: Source): void { - this.ml.push(...other.ml); - this.mli.push(...other.mli); - } -} diff --git a/generate/test/bound.ts b/generate/test/bound.ts new file mode 100644 index 00000000..d1120227 --- /dev/null +++ b/generate/test/bound.ts @@ -0,0 +1,46 @@ +// Read from memory at a path inside the repository, so the declarations name +// solid-js as a library's do. + +import ts from "typescript"; +import { fileURLToPath } from "node:url"; +import { bind, type Library } from "../binding.ts"; +import { browser } from "../program.ts"; +import { printItems, type Item } from "../ocaml.ts"; + +const root = fileURLToPath(new URL("../../", import.meta.url)); +const path = `${root}generate/test/declarations.d.ts`; + +export type Bound = { + mli: string; + ml: string; + types: string; + refusals: string[]; +}; + +export function bound(declarations: string, library: Partial = {}): Bound { + const options: ts.CompilerOptions = { ...browser, module: ts.ModuleKind.ESNext, moduleResolution: ts.ModuleResolutionKind.Bundler }; + const host = ts.createCompilerHost(options); + const { fileExists, readFile, getSourceFile } = host; + host.fileExists = (f) => f === path || fileExists(f); + host.readFile = (f) => (f === path ? declarations : readFile(f)); + host.getSourceFile = (f, ...rest) => (f === path ? ts.createSourceFile(f, declarations, ts.ScriptTarget.ESNext, true) : getSourceFile(f, ...rest)); + const program = ts.createProgram([path], options, host); + const checker = program.getTypeChecker(); + const source = program.getSourceFile(path); + const module = source && checker.getSymbolAtLocation(source); + if (!module) throw new Error("the declarations export nothing"); + const { functionBinding, part, valueBinding, reach, refusals, typesFiles } = bind(root, checker, { name: "lib", throwsUndocumented: () => false, ...library }); + const items: Item[] = []; + for (const symbol of checker.getExportsOfModule(module)) { + const signature = checker.getTypeOfSymbol(symbol).getCallSignatures()[0]; + const declaration = signature?.getDeclaration(); + if (/^[A-Z]/.test(symbol.name) && signature && declaration && signature.getParameters().length === 1) { + const own = checker.getPropertiesOfType(checker.getTypeOfSymbol(signature.getParameters()[0]!)); + items.push({ kind: "module", name: symbol.name, items: part("lib", symbol.name, declaration, null, [], symbol.name, { element: null, own }) }); + } else if (symbol.flags & ts.SymbolFlags.Function) items.push(...functionBinding(symbol, symbol.name, "lib", symbol.name)); + else if (symbol.flags & ts.SymbolFlags.Variable) items.push(...valueBinding(symbol, symbol.name, "lib", symbol.name)); + else if (symbol.flags & ts.SymbolFlags.Class) reach(symbol); + } + const types = typesFiles(""); + return { mli: printItems(items, "mli"), ml: printItems(items, "ml"), types: types.mli, refusals: refusals() }; +} diff --git a/generate/test/rules.test.ts b/generate/test/rules.test.ts new file mode 100644 index 00000000..2fdb2d5d --- /dev/null +++ b/generate/test/rules.test.ts @@ -0,0 +1,196 @@ +import { expect, test } from "bun:test"; +import { bound } from "./bound.ts"; + +const one = (declaration: string, library = {}) => bound(declaration, library).mli; + +test("a number is a float, and an int where the library says it is whole", () => { + expect(one(`export declare function half(n: number): number;`)).toContain(`external half : float -> float = "half"`); + expect(one(`export declare function next(n: number): number;`, { whole: () => true })).toContain(`external next : int -> int = "next"`); +}); + +test("null given is Js.Null.t, and read, or given beside undefined, Js.Nullable.t", () => { + expect(one(`export declare function set(v: string | null): void;`)).toContain(`external set : string Js.Null.t -> unit`); + expect(one(`export declare function get(): string | null;`)).toContain(`external get : unit -> string Js.Nullable.t`); + expect(one(`export declare function set(v: string | null | undefined): void;`)).toContain(`external set : string Js.Nullable.t -> unit`); +}); + +test("undefined read is an option, and a parameter left out an optional argument before unit", () => { + expect(one(`export declare function find(): string | undefined;`)).toContain(`external find : unit -> string option`); + expect(one(`export declare function pad(s: string, width?: number): string;`)).toContain(`external pad : string -> ?width:float -> unit -> string`); +}); + +test("literals OCaml can name are tags, and any other set of them a string", () => { + expect(one(`export declare function side(): "left" | "right";`)).toContain("external side : unit -> [ `left | `right ]"); + expect(one(`export declare function size(): "sm" | "md" | "lg";`)).toContain("external size : unit -> [ `lg | `md | `sm ]"); + expect(one(`export declare function size(): "2xl" | "sm";`)).toContain(`external size : unit -> string`); +}); + +test("members of two JavaScript kinds are an Either, and of three are not bound", () => { + expect(one(`export declare function id(v: string | number): void;`)).toContain(`external id : (string, float) Types.Either.t -> unit`); + const three = bound(`export declare function id(v: string | number | Date): void;`); + expect(three.mli).toBe(""); + expect(three.refusals).toEqual(["id: no rule maps (v: string | number | Date): void"]); +}); + +test("a bigint is Melange's", () => { + expect(one(`export declare function big(): bigint;`)).toContain(`external big : unit -> Js.Bigint.t`); +}); + +test("what TypeScript types any is not bound", () => { + const b = bound(`export declare function parse(text: string): any;`); + expect(b.mli).toBe(""); + expect(b.refusals).toEqual(["parse: no rule maps (text: string): any"]); +}); + +test("a type argument typed any is Unknown where it is read, and whatever is given where it is given", () => { + const b = bound(` + export interface Box { value: T } + export declare function open(): Box; + export declare function close(box: Box): void;`); + expect(b.mli).toContain(`external open_ : unit -> Types.Unknown.t Types.Box.t`); + expect(b.mli).toContain(`external close : _ Types.Box.t -> unit`); + expect(b.types).toContain("module Unknown : sig"); +}); + +test("Unknown is declared only where a type names it", () => { + expect(bound(`export declare function half(n: number): number;`).types).not.toContain("Unknown"); +}); + +test("what is left out is named with why, and a name that leaves nothing out is refused", () => { + const declaration = `export declare function parse(text: string): any;`; + expect(bound(declaration, { leftOut: { parse: "its result is the caller's to decode" } }).refusals).toEqual([]); + expect(bound(declaration, { leftOut: { parse: "why", format: "why" } }).refusals).toEqual([ + "format: named as left out, but it is bound, or no longer declared", + ]); +}); + +test("a function of several signatures is its first where OCaml calls it", () => { + expect(one(` + export declare function start(of: string): string; + export declare function start(of: number): number;`)).toContain(`external start : string -> string`); +}); + +test("a function of several signatures given to JavaScript is not bound", () => { + const b = bound(` + export declare function listen(handler: { (key: string): void; (index: number): void }): void;`); + expect(b.mli).toBe(""); + expect(b.refusals.length).toBe(1); +}); + +test("a function that says it throws raises Invalid_argument, with an _opt beside it", () => { + const b = bound(` + /** Reads a colour. Throws on a string that is none. */ + export declare function parseColor(text: string): string;`); + expect(b.mli).toContain(`val parse_color : string -> string`); + expect(b.mli).toContain(`val parse_color_opt : string -> string option`); + expect(b.mli).not.toContain("external"); + expect(b.ml).toContain(`| exception Js.Exn.Error e -> invalid_arg`); +}); + +test("a function a function returns is read uncurried and given back curried", () => { + const b = bound(`export declare function every(step: number): (value: number) => boolean;`); + expect(b.ml).toContain(`external every_js : float -> (float -> bool [@u]) = "every"`); + expect(b.ml).toContain(`let every x0 = let r = every_js x0 in fun y0 -> (r y0 [@u])`); + expect(b.mli).toContain(`val every : float -> (float -> bool)`); +}); + +test("a function its object may not have is read uncurried and given back curried", () => { + const b = bound(` + export interface Keys { first?: (from: string, wrap: boolean) => string } + export declare function keys(): Keys;`); + expect(b.types).toContain(`val first : t -> (string -> bool -> string) option`); + expect(b.types).not.toContain(`external first`); +}); + +test("an object type is a module of Types: a getter per field, and a constructor", () => { + const b = bound(` + export interface Point { x: number; label?: string } + export declare function origin(): Point;`); + expect(b.types).toContain(`external x : t -> float = "x" [@@mel.get]`); + expect(b.types).toContain(`external label : t -> string option = "label" [@@mel.get]`); + expect(b.types).toContain(`external make : x:(float [@mel.as "x"]) -> ?label:(string [@mel.as "label"]) -> unit -> t = "" [@@mel.obj]`); +}); + +test("a name is snake case, and a keyword takes an underscore", () => { + expect(one(`export declare function toHTMLString(): string;`)).toContain(`external to_html_string :`); + expect(one(`export declare function open(): void;`)).toContain(`external open_ :`); +}); + +test("a part whose prop is a function of several arguments is made with Arity, which calls it as OCaml does", () => { + const b = bound(` + export declare function Root(props: { onOpenChange?: (open: boolean, by: string) => void; onClose?: () => void }): void;`); + expect(b.ml).toContain(`external component_js : unit Solidtype.Jsx.component = "Root"`); + expect(b.ml).toContain(`|> Solidtype.Arity.adapted "onOpenChange" (fun f -> fun [@u] x0 x1 -> f x0 x1)`); + expect(b.mli).toContain(`val component : unit Solidtype.Jsx.component`); +}); + +test("a part's function prop is adapted at whatever arity it has", () => { + const b = bound(`export declare function Root(props: { name: (a: string, b: string, c: string, d: string) => string }): void;`); + expect(b.ml).toContain(`|> Solidtype.Arity.adapted "name" (fun f -> fun [@u] x0 x1 x2 x3 -> f x0 x1 x2 x3)`); +}); + +test("a part with no such prop is the library's component itself", () => { + const b = bound(`export declare function Root(props: { onClose?: () => void; onChange?: (value: string) => void }): void;`); + expect(b.mli).toContain(`external component : unit Solidtype.Jsx.component = "Root"`); + expect(b.ml).not.toContain("Arity"); +}); + +test("a function of several arguments given to a function is passed at its arity", () => { + expect(one(`export declare function each(visit: (key: string, index: number) => void): void;`)) + .toContain(`external each : ((string -> float -> unit) [@mel.uncurry]) -> unit = "each"`); +}); + +test("one that may be left out is not bound, since Melange passes none so", () => { + const b = bound(`export declare function each(visit?: (key: string, index: number) => void): void;`); + expect(b.mli).toBe(""); + expect(b.refusals.length).toBe(1); +}); + +test("a constructor gives a function of several arguments under one that takes them at once", () => { + const b = bound(` + export interface Words { join: (a: string, b: string) => string; maybe?: (a: string, b: string) => string } + export declare function words(): Words;`); + expect(bound(` + export interface Words { join: (a: string, b: string) => string; maybe?: (a: string, b: string) => string } + export declare function say(words: Words): void;`).types).toContain(`val make : join:(string -> string -> string) -> ?maybe:(string -> string -> string) -> unit -> t`); + expect(b.types).not.toContain(`external make`); +}); + +test("an object JavaScript would hand a function has no constructor", () => { + const b = bound(` + export interface Toaster { show: (draw: (id: number) => string) => number } + export declare function toaster(): Toaster;`); + expect(b.types).not.toContain("make"); + expect(b.refusals).toEqual(["Toaster.make: no rule maps a constructor whose show JavaScript would hand a function"]); +}); + +test("a type with no name is named by the path to it: what a function gives by the function, what it takes by its parameter too", () => { + const b = bound(`export declare function bins(values: number[], options?: { count: number }): { edges: number[] };`); + expect(b.mli).toContain(`external bins : float array -> ?options:Types.Bins_Options.t -> unit -> Types.Bins.t`); +}); + +test("two types of one name fail the run, until the library names each", () => { + const declarations = ` + declare namespace meter { interface Params { min: number } } + declare namespace slider { interface Params { values: number[] } } + export declare function ofMeter(): meter.Params; + export declare function ofSlider(): slider.Params;`; + expect(() => bound(declarations)).toThrow(/two types would be Types\.Params/); + const fields = (s: { declarations?: { getText(): string }[] }) => s.declarations?.[0]?.getText() ?? ""; + const b = bound(declarations, { named: (s) => (fields(s).includes("values") ? "Slider_Params" : "Meter_Params") }); + expect(b.mli).toContain(`external of_meter : unit -> Types.Meter_Params.t`); + expect(b.mli).toContain(`external of_slider : unit -> Types.Slider_Params.t`); +}); + +test("a declaration's comment is its own, in the file and in its interface, whatever is declared before it", () => { + const b = bound(` + export interface Box { + /** How wide it is. */ + width: number; + /** How tall it is. */ + height: number; + } + export declare function box(): Box;`); + expect(b.types).toContain(`(** How wide it is. *)\nexternal width : t -> float = "width" [@@mel.get]`); + expect(b.types).toContain(`(** How tall it is. *)\nexternal height : t -> float = "height" [@@mel.get]`); +}); diff --git a/generate/tsconfig.json b/generate/tsconfig.json index 814d0cb2..bf833975 100644 --- a/generate/tsconfig.json +++ b/generate/tsconfig.json @@ -11,5 +11,5 @@ "noEmit": true, "skipLibCheck": true }, - "include": ["*.ts"] + "include": ["*.ts", "test"] } diff --git a/generate/types_file.ts b/generate/types_file.ts new file mode 100644 index 00000000..02002df1 --- /dev/null +++ b/generate/types_file.ts @@ -0,0 +1,278 @@ +import ts from "typescript"; +import type { Emitters } from "./emit.ts"; +import { isDomLib, moduleOf, named, readable, value, type Binding } from "./library.ts"; +import { flatName, isUnit, typeVar, unbound, unknown, type At, type Mapping, type Vars } from "./mapping.ts"; +import { snake } from "./names.ts"; +import { apply, isArrow, name as tname, printItems, vars as typeVarsOf, type Item, type Type } from "./ocaml.ts"; + +const optionOf = (t: Type): Type | null => (t.kind === "apply" && t.name === "option" ? (t.args[0] ?? null) : null); + +export function typesFiles(b: Binding, { map, mapFunction, declaredPorted, kindOf, argIn, givenIn, showIn }: Mapping, { doc, guarded, throws }: Emitters, header: string): { ml: string; mli: string } { +const { checker, queue, unmapped, moduleNames, opaques } = b; +const both = (vars: Vars, where: string): At => ({ vars, where, polarity: "both" }); +const read = (vars: Vars, where: string): At => ({ vars, where, polarity: "read" }); +const abstracts: Item[] = []; +const done = new Set(); +const modules: Item[] = []; +while (queue.length > 0) { + const n = queue.shift()!; + const key = n.symbol ?? n.type; + if (done.has(key)) continue; + done.add(key); + const vars: Vars = new Map(); + const vs = n.params.map((p) => typeVar(p, vars)); + const params = vs.flatMap(typeVarsOf); + const self: Type = vs.length === 0 ? tname("t") : apply("t", ...vs); + const t = showIn(self); + const declared = n.symbol && !(n.symbol.flags & ts.SymbolFlags.TypeAlias) ? checker.getDeclaredTypeOfSymbol(n.symbol) : n.type; + const flat = showIn(vs.length === 0 ? tname(flatName(n.module)) : apply(flatName(n.module), ...vs)); + const kind = kindOf(n.symbol ?? undefined); + abstracts.push(kind ? { kind: "type", name: flat, manifest: `[ \`${kind} ] t_value` } : { kind: "type", name: flat }); + const items: Item[] = [{ kind: "type", name: t, manifest: flat }]; + modules.push({ kind: "module", name: n.module, items, doc: n.symbol ? doc(n.symbol) : undefined }); + { + const isClass = n.symbol !== null && (n.symbol.flags & ts.SymbolFlags.Class) !== 0; + // A standard type is Melange's to bind, but for one a user builds or + // reads, whose fields, methods and constructor are bound here. + const library = n.symbol !== null && isDomLib(n.symbol) && !readable.has(n.symbol.name); + const fields: [string, Type, boolean][] = []; + // A function a field holds, wrapped once by [make] into the shape its type + // declares: OCaml writes [fun id () -> ...] and [fun id -> fun () -> ...] + // as one type but not one arity, and a [let] between two [fun]s keeps + // Melange from merging them. The field stays curried, since Melange drops + // [@mel.as] from an uncurried field of a [@@mel.obj]. + const shaped = new Map string>(); + let methods = 0; + for (const p of checker.getPropertiesOfType(declared)) { + if (!named(p.name)) continue; + // A class's private or protected member is its own, never a user's. + if ((p.declarations ?? []).some((d) => ts.getCombinedModifierFlags(d) & (ts.ModifierFlags.Private | ts.ModifierFlags.Protected))) continue; + // A standard type's members are Melange's, through a conversion. + if (!library && n.conversions.length > 0 && p.declarations?.every((d) => /typescript\/lib\/lib\./.test(d.getSourceFile().fileName))) continue; + const pt = checker.getTypeOfSymbol(p); + const optional = (p.flags & ts.SymbolFlags.Optional) !== 0; + // A standard type's method stays one where a mapped type, Omit, gives it + // back as a property: its declaration is still a method's. + const method = (p.flags & ts.SymbolFlags.Method) !== 0 || (p.declarations ?? []).some((d) => ts.isMethodSignature(d) || ts.isMethodDeclaration(d)); + if (method) { + // The standard library's methods are Melange's to bind. + if (library) continue; + const sig = pt.getCallSignatures()[0]; + const f = sig ? mapFunction(sig, read(vars, `${n.module}.${p.name}`), true) : null; + if (!f || unbound(f, params)) { + unmapped.set(`${n.module}.${p.name}()`, sig ? checker.signatureToString(sig) : "?"); + continue; + } + methods++; + const name = value(snake(p.name)); + if (sig && throws(p, `${n.module}.${p.name}`)) { + items.push( + { kind: "external", name: `${name}_js`, type: `${t} -> ${showIn(f)}`, js: p.name, attributes: ["mel.send"], hidden: true }, + ...guarded(name, { ...f, params: [{ type: self }, ...f.params] }, showIn, `${name}_js`, sig, true, doc(p, true)), + ); + continue; + } + items.push({ kind: "external", name, type: `${t} -> ${showIn(f)}`, js: p.name, attributes: ["mel.send"] }); + continue; + } + const ft = declaredPorted(p, both(vars, `${n.module}.${p.name}`), optional) ?? map(pt, both(vars, `${n.module}.${p.name}`), optional); + if (!ft) { + unmapped.set(`${n.module}.${p.name}`, checker.typeToString(pt)); + continue; + } + fields.push([p.name, ft, optional]); + // Its constructor takes it, but reading it would be a cast. + if (unbound(ft, params)) { + unmapped.set(`${n.module}.${p.name}`, `read as ${showIn(ft)}`); + continue; + } + const documentation = doc(p); + const sig = checker.getNonNullableType(pt).getCallSignatures()[0]; + // A function is one the mapping writes as an arrow, not a setter, an + // accessor or a type of its own that happens to be callable. + const fn = sig && isArrow(ft) && checker.getNonNullableType(pt).getProperties().length === 0 && !optional + ? mapFunction(sig, both(vars, `${n.module}.${p.name}`)) + : null; + if (sig && library) continue; + if (sig && fn) { + // A function a property holds: read uncurried, as Melange counts an + // external's arguments through parentheses, and called curried. + const arity = sig.getParameters().length; + const xs = Array.from({ length: arity }, (_, i) => `x${i}`); + const getter = `${value(snake(p.name))}_js`; + const args = arity === 0 ? "()" : xs.join(" "); + // A function it returns is uncurried too, since OCaml reads + // a -> (b -> c) as a -> b -> c, and is given back curried. + const returned = sig.getReturnType().getCallSignatures()[0]; + const result = returned ? mapFunction(returned, both(vars, `${n.module}.${p.name}`)) : null; + if (returned && result) { + const argTypes = sig.getParameters().map((q) => map(checker.getTypeOfSymbol(q), both(vars, n.module))); + const inner = returned.getParameters().length; + const ys = Array.from({ length: inner }, (_, i) => `y${i}`); + const yargs = inner === 0 ? "()" : ys.join(" "); + const params = argTypes.length === 0 ? "unit" : argTypes.map((a) => givenIn(a ?? unknown)).join(" -> "); + const name = value(snake(p.name)); + items.push( + { kind: "external", name: getter, type: `${t} -> (${params} -> (${showIn(result)} [@u]) [@u])`, js: p.name, attributes: ["mel.get"], hidden: true }, + { + kind: "let", + name, + type: `${t} -> ${params} -> ${argIn(result)}`, + doc: documentation, + definition: `let ${name} o ${args} = let r = (${getter} o) ${args} [@u] in fun ${yargs} -> r ${yargs} [@u]`, + }, + ); + shaped.set(p.name, (f) => `(fun ${args} -> let r = ${f} ${args} in fun ${yargs} -> r ${yargs})`); + } else { + // Called as a method of the object that holds it: an external is + // called directly from another library, where a [let] in a nested + // module goes through Curry, its arity lost. + items.push({ + kind: "external", + name: value(snake(p.name)), + type: `${t} -> ${showIn(mapFunction(sig, read(vars, `${n.module}.${p.name}`), true) ?? fn)}`, + js: p.name, + attributes: ["mel.send"], + doc: documentation, + }); + } + } else if (optional && isArrow(ft)) { + // Read uncurried and given back curried: Melange calls a curried function it + // did not make by its length. + const name = value(snake(p.name)); + const none = ft.params.length === 1 && isUnit(ft.params[0]!.type); + const xs = none ? "()" : ft.params.map((_, i) => `x${i}`).join(" "); + const uncurried = `(${ft.params.map((q) => argIn(q.type)).join(" -> ")} -> ${argIn(ft.result)} [@u])`; + items.push( + { kind: "external", name: `${name}_js`, type: `${t} -> ${uncurried} option`, js: p.name, attributes: ["mel.get"], hidden: true }, + { + kind: "let", + name, + type: `${t} -> ${argIn(ft)} option`, + doc: documentation, + definition: `let ${name} o = match ${name}_js o with None -> None | Some f -> Some (fun ${xs} -> f ${xs} [@u])`, + }, + ); + } else { + items.push({ + kind: "external", + name: value(snake(p.name)), + type: `${t} -> ${optional ? `${argIn(ft)} option` : argIn(ft)}`, + js: p.name, + attributes: ["mel.get"], + doc: documentation, + }); + } + } + // A value Kobalte declares as a DOM node or event, extended, is that value: + // the conversion only forgets what Kobalte added, so it is %identity, named + // as the stdlib names a conversion, to_html_div_element. + for (const d of n.conversions) { + items.push({ kind: "external", name: `to_${snake(d.slice(4))}`, type: `${t} -> ${d}`, js: "%identity" }); + } + // A class is each interface it declares it implements, which a function + // that takes the interface takes it as: SelectionManager a + // MultipleSelectionManager. + const classDecl = isClass ? n.symbol!.declarations?.find(ts.isClassDeclaration) : undefined; + for (const clause of classDecl?.heritageClauses ?? []) { + if (clause.token !== ts.SyntaxKind.ImplementsKeyword) continue; + for (const e of clause.types) { + // The library's own interfaces; a standard one is Melange's. + const implemented = checker.getTypeAtLocation(e); + const symbol = implemented.getSymbol(); + if (!symbol || isDomLib(symbol)) continue; + const it = map(implemented, both(vars, n.module)); + if (it?.kind === "ref") items.push({ kind: "external", name: `to_${snake(it.module)}`, type: `${t} -> ${showIn(it)}`, js: "%identity" }); + } + } + // A function a field holds that JavaScript would call with a function: + // what it is handed is JavaScript's, which OCaml calls by its length, + // so the type is read, never built here. + const handedFunction = fields.find(([, ft]) => { + const f = isArrow(ft) ? ft : optionOf(ft); + return f !== null && isArrow(f) && f.params.some((q) => isArrow(q.type)); + }); + const constructed = !isClass && !library && methods === 0 && fields.length > 0 && n.conversions.length === 0; + if (constructed && handedFunction) unmapped.set(`${n.module}.make`, `a constructor whose ${handedFunction[0]} JavaScript would hand a function`); + if (constructed && !handedFunction) { + const label = ([k, ft, opt]: [string, Type, boolean]) => + `${opt ? "?" : ""}${value(snake(k))}:(${givenIn(ft)} [@mel.as "${k}"]) ->`; + // A function of several arguments a field holds: an OCaml function's + // type does not say whether it takes them at once, as JavaScript + // calls it, so [make] gives it under one that does. + for (const [k, ft] of fields) { + const f = isArrow(ft) ? ft : optionOf(ft); + if (shaped.has(k) || f === null || !isArrow(f) || f.params.length < 2) continue; + const xs = f.params.map((_, i) => `x${i}`).join(" "); + shaped.set(k, (g) => `(fun ${xs} -> ${g} ${xs})`); + } + if (shaped.size === 0) { + items.push({ kind: "external", name: "make", type: `${fields.map(label).join(" ")} unit -> ${t}`, js: "", attributes: ["mel.obj"] }); + } else { + const params = fields.map(([k, , opt]) => `${opt ? "?" : "~"}${value(snake(k))}`); + const passed = fields.map(([k, ft, opt]) => { + const v = value(snake(k)); + const shape = shaped.get(k); + if (!shape) return opt ? `?${v}` : `~${v}`; + const mapped = `(Option.map (fun f -> ${shape("f")}) ${v})`; + return opt ? `?${v}:${mapped}` : optionOf(ft) ? `~${v}:${mapped}` : `~${v}:${shape(v)}`; + }); + const labels = fields.map(([k, ft, opt]) => `${opt ? "?" : ""}${value(snake(k))}:${givenIn(ft)} ->`); + items.push( + { kind: "external", name: "make_js", type: `${fields.map(label).join(" ")} unit -> ${t}`, js: "", attributes: ["mel.obj"], hidden: true }, + { kind: "let", name: "make", type: `${labels.join(" ")} unit -> ${t}`, definition: `let make ${params.join(" ")} () = make_js ${passed.join(" ")} ()` }, + ); + } + } + if (isClass && n.symbol?.valueDeclaration) { + const mod = moduleOf(n.symbol); + const ctor = checker.getTypeOfSymbolAtLocation(n.symbol, n.symbol.valueDeclaration).getConstructSignatures()[0]; + const f = ctor ? mapFunction(ctor, read(vars, `${n.module}.constructor`), true) : null; + if (f && mod) { + items.push({ kind: "external", name: "make", type: showIn({ ...f, result: self }), js: n.module, attributes: ["mel.new", `mel.module ${JSON.stringify(mod)}`] }); + } + } + } +} + +// Each type by its flat name first, so that they name one another. +const opaqueOnly = [...opaques].sort().filter((o) => !moduleNames.has(o)); +const all: Item[] = [ + { kind: "type", name: "('a, 'b) either", note: "Members of different JavaScript kinds, each as it is." }, + ...(b.namesUnknown ? [{ kind: "type", name: "t_unknown" } as Item] : []), + ...(b.library.kinds ? [{ kind: "type", name: "'k t_value" } as Item] : []), + ...opaqueOnly.map((o): Item => ({ kind: "type", name: flatName(o) })), + ...abstracts, + { + kind: "module", + name: "Either", + items: [ + { kind: "type", name: "('a, 'b) t", manifest: "('a, 'b) either" }, + { kind: "external", name: "left", type: "'a -> ('a, 'b) t", js: "%identity" }, + { kind: "external", name: "right", type: "'b -> ('a, 'b) t", js: "%identity" }, + ], + }, + ...(b.namesUnknown + ? [{ + kind: "module", + name: "Unknown", + note: "What TypeScript types any, read from JavaScript: nothing reads it, since a type its reader chose would be an unchecked cast.", + items: [{ kind: "type", name: "t", manifest: "t_unknown" }], + } as Item] + : []), + ...(b.library.kinds + ? [{ + kind: "module", + name: "Value", + note: `A value of one of ${b.library.kinds.classes.map((c) => c.name).join(", ")}, its kind the class it is of: what a union of them, or an interface they satisfy, takes, as the kinds it names.`, + items: [{ kind: "type", name: "'k t", manifest: "'k t_value" }], + } as Item] + : []), + ...opaqueOnly.map((o): Item => ({ kind: "module", name: o, note: `The standard library's ${o}, opaque.`, items: [{ kind: "type", name: "t", manifest: flatName(o) }] })), + ...modules, +]; +return { + ml: `${header}\n\n${printItems(all, "ml")}\n`, + mli: `${header}\n\n${printItems(all, "mli")}\n`, +}; +} diff --git a/headless/date_field.mlx b/headless/date_field.mlx index abdbefb0..9d31a822 100644 --- a/headless/date_field.mlx +++ b/headless/date_field.mlx @@ -289,7 +289,7 @@ let date_kind : Dt.CalendarDate.t kind = } let time_fields w = - Dt.ZonedDateTime_Set.make ~era:w.w_era ~year:w.w_year ~month:w.w_month + Dt.ZonedDateTime_Set_Fields.make ~era:w.w_era ~year:w.w_year ~month:w.w_month ~day:w.w_day ~hour:w.w_hour ~minute:w.w_minute ~second:w.w_second ~millisecond:w.w_millisecond () diff --git a/headless/date_picker.mlx b/headless/date_picker.mlx index 30a9ce66..d88d617c 100644 --- a/headless/date_picker.mlx +++ b/headless/date_picker.mlx @@ -718,8 +718,8 @@ module Root_zoned = struct | None -> Props.placeholder_value_given props in Dt.ZonedDateTime.set t - (Dt.ZonedDateTime_Set.make ~era:(C.era d) ~year:(C.year d) - ~month:(C.month d) ~day:(C.day d) ()) + (Dt.ZonedDateTime_Set_Fields.make ~era:(C.era d) + ~year:(C.year d) ~month:(C.month d) ~day:(C.day d) ()) ()); timed = S.accessor (fun () -> @@ -1267,8 +1267,8 @@ module Root_range_zoned = struct | None -> Props.placeholder_value_given props in Dt.ZonedDateTime.set t - (Dt.ZonedDateTime_Set.make ~era:(C.era d) ~year:(C.year d) - ~month:(C.month d) ~day:(C.day d) ()) + (Dt.ZonedDateTime_Set_Fields.make ~era:(C.era d) + ~year:(C.year d) ~month:(C.month d) ~day:(C.day d) ()) ()); timed = S.accessor (fun () -> diff --git a/heroui/meter.mlx b/heroui/meter.mlx index cc072baf..7bc2aeaf 100644 --- a/heroui/meter.mlx +++ b/heroui/meter.mlx @@ -124,9 +124,9 @@ let%component make ~(value : float) ?(min_value : float = 0.) in let value_label params = text - ~value:(Types.GetValueLabelParams.value params) - ~min:(Types.GetValueLabelParams.min params) - ~max:(Types.GetValueLabelParams.max params) + ~value:(Types.Meter_GetValueLabelParams.value params) + ~min:(Types.Meter_GetValueLabelParams.min params) + ~max:(Types.Meter_GetValueLabelParams.max params) in let m = { diff --git a/heroui/progress_bar.mlx b/heroui/progress_bar.mlx index e0200a8c..7b3df985 100644 --- a/heroui/progress_bar.mlx +++ b/heroui/progress_bar.mlx @@ -131,9 +131,9 @@ let%component make ?(value : float = 0.) ?(is_indeterminate : bool = false) in let value_label params = text - ~value:(Types.GetValueLabelParams.value params) - ~min:(Types.GetValueLabelParams.min params) - ~max:(Types.GetValueLabelParams.max params) + ~value:(Types.Meter_GetValueLabelParams.value params) + ~min:(Types.Meter_GetValueLabelParams.min params) + ~max:(Types.Meter_GetValueLabelParams.max params) in let m = { diff --git a/heroui/progress_circle.mlx b/heroui/progress_circle.mlx index 16c693bb..503221aa 100644 --- a/heroui/progress_circle.mlx +++ b/heroui/progress_circle.mlx @@ -145,9 +145,9 @@ let%component make ?(value : float = 0.) ?(is_indeterminate : bool = false) in let value_label params = text - ~value:(Types.GetValueLabelParams.value params) - ~min:(Types.GetValueLabelParams.min params) - ~max:(Types.GetValueLabelParams.max params) + ~value:(Types.Meter_GetValueLabelParams.value params) + ~min:(Types.Meter_GetValueLabelParams.min params) + ~max:(Types.Meter_GetValueLabelParams.max params) in let c = { diff --git a/heroui/styles.ml b/heroui/styles.ml index bb60d792..f6ecef40 100644 --- a/heroui/styles.ml +++ b/heroui/styles.ml @@ -9,8 +9,10 @@ module Accordion = struct type options external options : - ?variant:([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -35,8 +37,14 @@ module Alert = struct type options external options : - ?status:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "status"]) -> - ?class_:(string [@mel.as "class"]) -> + ?status: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "status"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -58,10 +66,26 @@ module AlertDialog = struct type options external options : - ?size:([ `cover [@mel.as "cover"] | `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?status:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "status"]) -> - ?variant:([ `blur [@mel.as "blur"] | `opaque [@mel.as "opaque"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `cover [@mel.as "cover"] + | `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?status: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "status"]) -> + ?variant: + ([ `blur [@mel.as "blur"] + | `opaque [@mel.as "opaque"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -88,9 +112,11 @@ module Autocomplete = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -114,10 +140,20 @@ module Avatar = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `default [@mel.as "default"] | `soft [@mel.as "soft"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `default [@mel.as "default"] | `soft [@mel.as "soft"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -137,9 +173,10 @@ module AvatarGroup = struct type options external options : - ?is_grid:(bool [@mel.as "isGrid"]) -> - ?overlap:([ `clip [@mel.as "clip"] | `ring [@mel.as "ring"] ] [@mel.as "overlap"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_grid:(bool[@mel.as "isGrid"]) -> + ?overlap: + ([ `clip [@mel.as "clip"] | `ring [@mel.as "ring"] ][@mel.as "overlap"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -158,11 +195,28 @@ module Badge = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?placement:([ `bottom_left [@mel.as "bottom-left"] | `bottom_right [@mel.as "bottom-right"] | `top_left [@mel.as "top-left"] | `top_right [@mel.as "top-right"] ] [@mel.as "placement"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] | `soft [@mel.as "soft"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?placement: + ([ `bottom_left [@mel.as "bottom-left"] + | `bottom_right [@mel.as "bottom-right"] + | `top_left [@mel.as "top-left"] + | `top_right [@mel.as "top-right"] ] + [@mel.as "placement"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `primary [@mel.as "primary"] + | `secondary [@mel.as "secondary"] + | `soft [@mel.as "soft"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -181,10 +235,7 @@ end module Breadcrumbs = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -203,11 +254,21 @@ module Button = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?is_icon_only:(bool [@mel.as "isIconOnly"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `danger [@mel.as "danger"] | `danger_soft [@mel.as "danger-soft"] | `ghost [@mel.as "ghost"] | `outline [@mel.as "outline"] | `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?is_icon_only:(bool[@mel.as "isIconOnly"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `danger [@mel.as "danger"] + | `danger_soft [@mel.as "danger-soft"] + | `ghost [@mel.as "ghost"] + | `outline [@mel.as "outline"] + | `primary [@mel.as "primary"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -221,9 +282,11 @@ module ButtonGroup = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -241,10 +304,7 @@ end module Calendar = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -270,10 +330,7 @@ end module CalendarYearPicker = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -292,10 +349,7 @@ end module RangeCalendar = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -322,8 +376,13 @@ module Card = struct type options external options : - ?variant:([ `default [@mel.as "default"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -346,8 +405,10 @@ module Checkbox = struct type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -368,8 +429,10 @@ module CheckboxGroup = struct type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -383,10 +446,23 @@ module Chip = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] | `soft [@mel.as "soft"] | `tertiary [@mel.as "tertiary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `primary [@mel.as "primary"] + | `secondary [@mel.as "secondary"] + | `soft [@mel.as "soft"] + | `tertiary [@mel.as "tertiary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -405,8 +481,8 @@ module ColorArea = struct type options external options : - ?show_dots:(bool [@mel.as "showDots"]) -> - ?class_:(string [@mel.as "class"]) -> + ?show_dots:(bool[@mel.as "showDots"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -425,8 +501,8 @@ module ColorField = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -440,9 +516,11 @@ module ColorInputGroup = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -462,10 +540,7 @@ end module ColorPicker = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -482,10 +557,7 @@ end module ColorSlider = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -504,9 +576,17 @@ module ColorSwatch = struct type options external options : - ?shape:([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] [@mel.as "shape"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xl [@mel.as "xl"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?shape: + ([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] + [@mel.as "shape"]) -> + ?size: + ([ `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xl [@mel.as "xl"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -520,8 +600,8 @@ module CloseButton = struct type options external options : - ?variant:([ `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant:([ `default [@mel.as "default"] ][@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -535,10 +615,19 @@ module ColorSwatchPicker = struct type options external options : - ?layout:([ `grid [@mel.as "grid"] | `stack [@mel.as "stack"] ] [@mel.as "layout"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xl [@mel.as "xl"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?variant:([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?layout: + ([ `grid [@mel.as "grid"] | `stack [@mel.as "stack"] ][@mel.as "layout"]) -> + ?size: + ([ `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xl [@mel.as "xl"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?variant: + ([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -559,8 +648,8 @@ module ComboBox = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -582,8 +671,8 @@ module DateField = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -596,10 +685,7 @@ end module DatePicker = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -617,10 +703,7 @@ end module DateRangePicker = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -640,9 +723,11 @@ module DateInputGroup = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -664,10 +749,7 @@ end module Description = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "descriptionVariants" @@ -679,9 +761,18 @@ module Drawer = struct type options external options : - ?placement:([ `bottom [@mel.as "bottom"] | `left [@mel.as "left"] | `right [@mel.as "right"] | `top [@mel.as "top"] ] [@mel.as "placement"]) -> - ?variant:([ `blur [@mel.as "blur"] | `opaque [@mel.as "opaque"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?placement: + ([ `bottom [@mel.as "bottom"] + | `left [@mel.as "left"] + | `right [@mel.as "right"] + | `top [@mel.as "top"] ] + [@mel.as "placement"]) -> + ?variant: + ([ `blur [@mel.as "blur"] + | `opaque [@mel.as "opaque"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -707,10 +798,7 @@ end module Disclosure = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -731,10 +819,7 @@ end module DisclosureGroup = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -749,10 +834,7 @@ end module Dropdown = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -770,10 +852,7 @@ end module EmptyState = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "emptyStateVariants" @@ -784,10 +863,7 @@ end module ErrorMessage = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "errorMessageVariants" @@ -798,10 +874,7 @@ end module FieldError = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "fieldErrorVariants" @@ -812,10 +885,7 @@ end module Fieldset = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -834,10 +904,7 @@ end module Header = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "headerVariants" @@ -849,9 +916,11 @@ module Input = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -865,9 +934,11 @@ module InputGroup = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -888,8 +959,10 @@ module InputOTP = struct type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -913,8 +986,10 @@ module Kbd = struct type options external options : - ?variant:([ `default [@mel.as "default"] | `light [@mel.as "light"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] | `light [@mel.as "light"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -934,10 +1009,10 @@ module Label = struct type options external options : - ?is_disabled:(bool [@mel.as "isDisabled"]) -> - ?is_invalid:(bool [@mel.as "isInvalid"]) -> - ?is_required:(bool [@mel.as "isRequired"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_disabled:(bool[@mel.as "isDisabled"]) -> + ?is_invalid:(bool[@mel.as "isInvalid"]) -> + ?is_required:(bool[@mel.as "isRequired"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -950,10 +1025,7 @@ end module Link = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -970,8 +1042,10 @@ module Listbox = struct type options external options : - ?variant:([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -985,8 +1059,10 @@ module ListboxItem = struct type options external options : - ?variant:([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1004,10 +1080,7 @@ end module ListboxSection = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "listboxSectionVariants" @@ -1018,10 +1091,7 @@ end module Menu = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "menuVariants" @@ -1033,9 +1103,17 @@ module Meter = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1056,9 +1134,17 @@ module ProgressBar = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1079,9 +1165,17 @@ module ProgressCircle = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1102,8 +1196,10 @@ module MenuItem = struct type options external options : - ?variant:([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1122,10 +1218,7 @@ end module MenuSection = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "menuSectionVariants" @@ -1137,10 +1230,23 @@ module Modal = struct type options external options : - ?scroll:([ `inside [@mel.as "inside"] | `outside [@mel.as "outside"] ] [@mel.as "scroll"]) -> - ?size:([ `cover [@mel.as "cover"] | `full [@mel.as "full"] | `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?variant:([ `blur [@mel.as "blur"] | `opaque [@mel.as "opaque"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?scroll: + ([ `inside [@mel.as "inside"] | `outside [@mel.as "outside"] ] + [@mel.as "scroll"]) -> + ?size: + ([ `cover [@mel.as "cover"] + | `full [@mel.as "full"] + | `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?variant: + ([ `blur [@mel.as "blur"] + | `opaque [@mel.as "opaque"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1167,9 +1273,11 @@ module NumberField = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1191,8 +1299,10 @@ module Pagination = struct type options external options : - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1214,10 +1324,7 @@ end module Popover = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1235,10 +1342,7 @@ end module Radio = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1257,8 +1361,10 @@ module RadioGroup = struct type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1272,10 +1378,12 @@ module ScrollShadow = struct type options external options : - ?hide_scroll_bar:(bool [@mel.as "hideScrollBar"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?variant:([ `fade [@mel.as "fade"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?hide_scroll_bar:(bool[@mel.as "hideScrollBar"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?variant:([ `fade [@mel.as "fade"] ][@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1293,9 +1401,11 @@ module SearchField = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1317,9 +1427,11 @@ module Select = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1342,9 +1454,15 @@ module Separator = struct type options external options : - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?variant:([ `default [@mel.as "default"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?variant: + ([ `default [@mel.as "default"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1358,8 +1476,12 @@ module Skeleton = struct type options external options : - ?animation_type:([ `none [@mel.as "none"] | `pulse [@mel.as "pulse"] | `shimmer [@mel.as "shimmer"] ] [@mel.as "animationType"]) -> - ?class_:(string [@mel.as "class"]) -> + ?animation_type: + ([ `none [@mel.as "none"] + | `pulse [@mel.as "pulse"] + | `shimmer [@mel.as "shimmer"] ] + [@mel.as "animationType"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1376,10 +1498,7 @@ end module Slider = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1400,9 +1519,20 @@ module Spinner = struct type options external options : - ?color:([ `accent [@mel.as "accent"] | `current [@mel.as "current"] | `danger [@mel.as "danger"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xl [@mel.as "xl"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `current [@mel.as "current"] + | `danger [@mel.as "danger"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xl [@mel.as "xl"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1416,8 +1546,13 @@ module Surface = struct type options external options : - ?variant:([ `default [@mel.as "default"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1431,8 +1566,10 @@ module Switch = struct type options external options : - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1454,8 +1591,10 @@ module SwitchGroup = struct type options external options : - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1474,8 +1613,10 @@ module Table = struct type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1495,11 +1636,19 @@ module Table = struct external header : slots -> string = "header" [@@mel.send] external load_more : slots -> string = "loadMore" [@@mel.send] external load_more_content : slots -> string = "loadMoreContent" [@@mel.send] - external resizable_container : slots -> string = "resizableContainer" [@@mel.send] + + external resizable_container : slots -> string = "resizableContainer" + [@@mel.send] + external row : slots -> string = "row" [@@mel.send] external scroll_container : slots -> string = "scrollContainer" [@@mel.send] - external sortable_column_header : slots -> string = "sortableColumnHeader" [@@mel.send] - external sortable_column_indicator : slots -> string = "sortableColumnIndicator" [@@mel.send] + + external sortable_column_header : slots -> string = "sortableColumnHeader" + [@@mel.send] + + external sortable_column_indicator : slots -> string + = "sortableColumnIndicator" + [@@mel.send] end (** HeroUI's [tabsVariants]. *) @@ -1507,9 +1656,15 @@ module Tabs = struct type options external options : - ?align:([ `center [@mel.as "center"] | `end_ [@mel.as "end"] | `start [@mel.as "start"] ] [@mel.as "align"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?align: + ([ `center [@mel.as "center"] + | `end_ [@mel.as "end"] + | `start [@mel.as "start"] ] + [@mel.as "align"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1527,7 +1682,10 @@ module Tabs = struct external tab : slots -> string = "tab" [@@mel.send] external tab_indicator : slots -> string = "tabIndicator" [@@mel.send] external tab_list : slots -> string = "tabList" [@@mel.send] - external tab_list_container : slots -> string = "tabListContainer" [@@mel.send] + + external tab_list_container : slots -> string = "tabListContainer" + [@@mel.send] + external tab_panel : slots -> string = "tabPanel" [@@mel.send] end @@ -1536,9 +1694,13 @@ module Tag = struct type options external options : - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1556,10 +1718,7 @@ end module TagGroup = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1576,12 +1735,35 @@ module Typography = struct type options external options : - ?align:([ `center [@mel.as "center"] | `end_ [@mel.as "end"] | `justify [@mel.as "justify"] | `start [@mel.as "start"] ] [@mel.as "align"]) -> - ?color:([ `default [@mel.as "default"] | `muted [@mel.as "muted"] ] [@mel.as "color"]) -> - ?truncate:(bool [@mel.as "truncate"]) -> - ?type_:([ `body [@mel.as "body"] | `body_sm [@mel.as "body-sm"] | `body_xs [@mel.as "body-xs"] | `code [@mel.as "code"] | `h1 [@mel.as "h1"] | `h2 [@mel.as "h2"] | `h3 [@mel.as "h3"] | `h4 [@mel.as "h4"] | `h5 [@mel.as "h5"] | `h6 [@mel.as "h6"] ] [@mel.as "type"]) -> - ?weight:([ `bold [@mel.as "bold"] | `medium [@mel.as "medium"] | `normal [@mel.as "normal"] | `semibold [@mel.as "semibold"] ] [@mel.as "weight"]) -> - ?class_:(string [@mel.as "class"]) -> + ?align: + ([ `center [@mel.as "center"] + | `end_ [@mel.as "end"] + | `justify [@mel.as "justify"] + | `start [@mel.as "start"] ] + [@mel.as "align"]) -> + ?color: + ([ `default [@mel.as "default"] | `muted [@mel.as "muted"] ] + [@mel.as "color"]) -> + ?truncate:(bool[@mel.as "truncate"]) -> + ?type_: + ([ `body [@mel.as "body"] + | `body_sm [@mel.as "body-sm"] + | `body_xs [@mel.as "body-xs"] + | `code [@mel.as "code"] + | `h1 [@mel.as "h1"] + | `h2 [@mel.as "h2"] + | `h3 [@mel.as "h3"] + | `h4 [@mel.as "h4"] + | `h5 [@mel.as "h5"] + | `h6 [@mel.as "h6"] ] + [@mel.as "type"]) -> + ?weight: + ([ `bold [@mel.as "bold"] + | `medium [@mel.as "medium"] + | `normal [@mel.as "normal"] + | `semibold [@mel.as "semibold"] ] + [@mel.as "weight"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1600,8 +1782,8 @@ module TextField = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1615,9 +1797,11 @@ module TextArea = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1631,8 +1815,8 @@ module TimeField = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1646,9 +1830,22 @@ module Toast = struct type options external options : - ?placement:([ `bottom [@mel.as "bottom"] | `bottom_end [@mel.as "bottom end"] | `bottom_start [@mel.as "bottom start"] | `top [@mel.as "top"] | `top_end [@mel.as "top end"] | `top_start [@mel.as "top start"] ] [@mel.as "placement"]) -> - ?variant:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?placement: + ([ `bottom [@mel.as "bottom"] + | `bottom_end [@mel.as "bottom end"] + | `bottom_start [@mel.as "bottom start"] + | `top [@mel.as "top"] + | `top_end [@mel.as "top end"] + | `top_start [@mel.as "top start"] ] + [@mel.as "placement"]) -> + ?variant: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1673,10 +1870,14 @@ module ToggleButton = struct type options external options : - ?is_icon_only:(bool [@mel.as "isIconOnly"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `default [@mel.as "default"] | `ghost [@mel.as "ghost"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_icon_only:(bool[@mel.as "isIconOnly"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `default [@mel.as "default"] | `ghost [@mel.as "ghost"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1690,10 +1891,12 @@ module ToggleButtonGroup = struct type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?is_detached:(bool [@mel.as "isDetached"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?is_detached:(bool[@mel.as "isDetached"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1712,9 +1915,11 @@ module Toolbar = struct type options external options : - ?is_attached:(bool [@mel.as "isAttached"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_attached:(bool[@mel.as "isAttached"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1727,10 +1932,7 @@ end module Tooltip = struct type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1742,8 +1944,8 @@ module Tooltip = struct external trigger : slots -> string = "trigger" [@@mel.send] end +external cn : string -> string -> string Js.undefined = "cn" +[@@mel.module "@heroui/styles"] (** HeroUI's [cn]: [cn a b] is [a]'s classes and [b]'s, a Tailwind utility of [b] winning over one of [a] that sets the same property, as a variant function merges its [class]; none where both are empty. *) -external cn : string -> string -> string Js.undefined = "cn" -[@@mel.module "@heroui/styles"] diff --git a/heroui/styles.mli b/heroui/styles.mli index c08dbe72..3d048eba 100644 --- a/heroui/styles.mli +++ b/heroui/styles.mli @@ -9,8 +9,10 @@ module Accordion : sig type options external options : - ?variant:([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -35,8 +37,14 @@ module Alert : sig type options external options : - ?status:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "status"]) -> - ?class_:(string [@mel.as "class"]) -> + ?status: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "status"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -58,10 +66,26 @@ module AlertDialog : sig type options external options : - ?size:([ `cover [@mel.as "cover"] | `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?status:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "status"]) -> - ?variant:([ `blur [@mel.as "blur"] | `opaque [@mel.as "opaque"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `cover [@mel.as "cover"] + | `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?status: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "status"]) -> + ?variant: + ([ `blur [@mel.as "blur"] + | `opaque [@mel.as "opaque"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -88,9 +112,11 @@ module Autocomplete : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -114,10 +140,20 @@ module Avatar : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `default [@mel.as "default"] | `soft [@mel.as "soft"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `default [@mel.as "default"] | `soft [@mel.as "soft"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -137,9 +173,10 @@ module AvatarGroup : sig type options external options : - ?is_grid:(bool [@mel.as "isGrid"]) -> - ?overlap:([ `clip [@mel.as "clip"] | `ring [@mel.as "ring"] ] [@mel.as "overlap"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_grid:(bool[@mel.as "isGrid"]) -> + ?overlap: + ([ `clip [@mel.as "clip"] | `ring [@mel.as "ring"] ][@mel.as "overlap"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -158,11 +195,28 @@ module Badge : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?placement:([ `bottom_left [@mel.as "bottom-left"] | `bottom_right [@mel.as "bottom-right"] | `top_left [@mel.as "top-left"] | `top_right [@mel.as "top-right"] ] [@mel.as "placement"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] | `soft [@mel.as "soft"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?placement: + ([ `bottom_left [@mel.as "bottom-left"] + | `bottom_right [@mel.as "bottom-right"] + | `top_left [@mel.as "top-left"] + | `top_right [@mel.as "top-right"] ] + [@mel.as "placement"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `primary [@mel.as "primary"] + | `secondary [@mel.as "secondary"] + | `soft [@mel.as "soft"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -181,10 +235,7 @@ end module Breadcrumbs : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -203,11 +254,21 @@ module Button : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?is_icon_only:(bool [@mel.as "isIconOnly"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `danger [@mel.as "danger"] | `danger_soft [@mel.as "danger-soft"] | `ghost [@mel.as "ghost"] | `outline [@mel.as "outline"] | `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?is_icon_only:(bool[@mel.as "isIconOnly"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `danger [@mel.as "danger"] + | `danger_soft [@mel.as "danger-soft"] + | `ghost [@mel.as "ghost"] + | `outline [@mel.as "outline"] + | `primary [@mel.as "primary"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -221,9 +282,11 @@ module ButtonGroup : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -241,10 +304,7 @@ end module Calendar : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -270,10 +330,7 @@ end module CalendarYearPicker : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -292,10 +349,7 @@ end module RangeCalendar : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -322,8 +376,13 @@ module Card : sig type options external options : - ?variant:([ `default [@mel.as "default"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -346,8 +405,10 @@ module Checkbox : sig type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -368,8 +429,10 @@ module CheckboxGroup : sig type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -383,10 +446,23 @@ module Chip : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] | `soft [@mel.as "soft"] | `tertiary [@mel.as "tertiary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `primary [@mel.as "primary"] + | `secondary [@mel.as "secondary"] + | `soft [@mel.as "soft"] + | `tertiary [@mel.as "tertiary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -405,8 +481,8 @@ module ColorArea : sig type options external options : - ?show_dots:(bool [@mel.as "showDots"]) -> - ?class_:(string [@mel.as "class"]) -> + ?show_dots:(bool[@mel.as "showDots"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -425,8 +501,8 @@ module ColorField : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -440,9 +516,11 @@ module ColorInputGroup : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -462,10 +540,7 @@ end module ColorPicker : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -482,10 +557,7 @@ end module ColorSlider : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -504,9 +576,17 @@ module ColorSwatch : sig type options external options : - ?shape:([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] [@mel.as "shape"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xl [@mel.as "xl"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?shape: + ([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] + [@mel.as "shape"]) -> + ?size: + ([ `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xl [@mel.as "xl"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -520,8 +600,8 @@ module CloseButton : sig type options external options : - ?variant:([ `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant:([ `default [@mel.as "default"] ][@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -535,10 +615,19 @@ module ColorSwatchPicker : sig type options external options : - ?layout:([ `grid [@mel.as "grid"] | `stack [@mel.as "stack"] ] [@mel.as "layout"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xl [@mel.as "xl"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?variant:([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?layout: + ([ `grid [@mel.as "grid"] | `stack [@mel.as "stack"] ][@mel.as "layout"]) -> + ?size: + ([ `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xl [@mel.as "xl"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?variant: + ([ `circle [@mel.as "circle"] | `square [@mel.as "square"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -559,8 +648,8 @@ module ComboBox : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -582,8 +671,8 @@ module DateField : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -596,10 +685,7 @@ end module DatePicker : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -617,10 +703,7 @@ end module DateRangePicker : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -640,9 +723,11 @@ module DateInputGroup : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -664,10 +749,7 @@ end module Description : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "descriptionVariants" @@ -679,9 +761,18 @@ module Drawer : sig type options external options : - ?placement:([ `bottom [@mel.as "bottom"] | `left [@mel.as "left"] | `right [@mel.as "right"] | `top [@mel.as "top"] ] [@mel.as "placement"]) -> - ?variant:([ `blur [@mel.as "blur"] | `opaque [@mel.as "opaque"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?placement: + ([ `bottom [@mel.as "bottom"] + | `left [@mel.as "left"] + | `right [@mel.as "right"] + | `top [@mel.as "top"] ] + [@mel.as "placement"]) -> + ?variant: + ([ `blur [@mel.as "blur"] + | `opaque [@mel.as "opaque"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -707,10 +798,7 @@ end module Disclosure : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -731,10 +819,7 @@ end module DisclosureGroup : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -749,10 +834,7 @@ end module Dropdown : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -770,10 +852,7 @@ end module EmptyState : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "emptyStateVariants" @@ -784,10 +863,7 @@ end module ErrorMessage : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "errorMessageVariants" @@ -798,10 +874,7 @@ end module FieldError : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "fieldErrorVariants" @@ -812,10 +885,7 @@ end module Fieldset : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -834,10 +904,7 @@ end module Header : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "headerVariants" @@ -849,9 +916,11 @@ module Input : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -865,9 +934,11 @@ module InputGroup : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -888,8 +959,10 @@ module InputOTP : sig type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -913,8 +986,10 @@ module Kbd : sig type options external options : - ?variant:([ `default [@mel.as "default"] | `light [@mel.as "light"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] | `light [@mel.as "light"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -934,10 +1009,10 @@ module Label : sig type options external options : - ?is_disabled:(bool [@mel.as "isDisabled"]) -> - ?is_invalid:(bool [@mel.as "isInvalid"]) -> - ?is_required:(bool [@mel.as "isRequired"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_disabled:(bool[@mel.as "isDisabled"]) -> + ?is_invalid:(bool[@mel.as "isInvalid"]) -> + ?is_required:(bool[@mel.as "isRequired"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -950,10 +1025,7 @@ end module Link : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -970,8 +1042,10 @@ module Listbox : sig type options external options : - ?variant:([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -985,8 +1059,10 @@ module ListboxItem : sig type options external options : - ?variant:([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1004,10 +1080,7 @@ end module ListboxSection : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "listboxSectionVariants" @@ -1018,10 +1091,7 @@ end module Menu : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "menuVariants" @@ -1033,9 +1103,17 @@ module Meter : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1056,9 +1134,17 @@ module ProgressBar : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1079,9 +1165,17 @@ module ProgressCircle : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1102,8 +1196,10 @@ module MenuItem : sig type options external options : - ?variant:([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `danger [@mel.as "danger"] | `default [@mel.as "default"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1122,10 +1218,7 @@ end module MenuSection : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] external classes : options -> string = "menuSectionVariants" @@ -1137,10 +1230,23 @@ module Modal : sig type options external options : - ?scroll:([ `inside [@mel.as "inside"] | `outside [@mel.as "outside"] ] [@mel.as "scroll"]) -> - ?size:([ `cover [@mel.as "cover"] | `full [@mel.as "full"] | `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xs [@mel.as "xs"] ] [@mel.as "size"]) -> - ?variant:([ `blur [@mel.as "blur"] | `opaque [@mel.as "opaque"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?scroll: + ([ `inside [@mel.as "inside"] | `outside [@mel.as "outside"] ] + [@mel.as "scroll"]) -> + ?size: + ([ `cover [@mel.as "cover"] + | `full [@mel.as "full"] + | `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xs [@mel.as "xs"] ] + [@mel.as "size"]) -> + ?variant: + ([ `blur [@mel.as "blur"] + | `opaque [@mel.as "opaque"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1167,9 +1273,11 @@ module NumberField : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1191,8 +1299,10 @@ module Pagination : sig type options external options : - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1214,10 +1324,7 @@ end module Popover : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1235,10 +1342,7 @@ end module Radio : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1257,8 +1361,10 @@ module RadioGroup : sig type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1272,10 +1378,12 @@ module ScrollShadow : sig type options external options : - ?hide_scroll_bar:(bool [@mel.as "hideScrollBar"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?variant:([ `fade [@mel.as "fade"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?hide_scroll_bar:(bool[@mel.as "hideScrollBar"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?variant:([ `fade [@mel.as "fade"] ][@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1293,9 +1401,11 @@ module SearchField : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1317,9 +1427,11 @@ module Select : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1342,9 +1454,15 @@ module Separator : sig type options external options : - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?variant:([ `default [@mel.as "default"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?variant: + ([ `default [@mel.as "default"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1358,8 +1476,12 @@ module Skeleton : sig type options external options : - ?animation_type:([ `none [@mel.as "none"] | `pulse [@mel.as "pulse"] | `shimmer [@mel.as "shimmer"] ] [@mel.as "animationType"]) -> - ?class_:(string [@mel.as "class"]) -> + ?animation_type: + ([ `none [@mel.as "none"] + | `pulse [@mel.as "pulse"] + | `shimmer [@mel.as "shimmer"] ] + [@mel.as "animationType"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1376,10 +1498,7 @@ end module Slider : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1400,9 +1519,20 @@ module Spinner : sig type options external options : - ?color:([ `accent [@mel.as "accent"] | `current [@mel.as "current"] | `danger [@mel.as "danger"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "color"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] | `xl [@mel.as "xl"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?color: + ([ `accent [@mel.as "accent"] + | `current [@mel.as "current"] + | `danger [@mel.as "danger"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "color"]) -> + ?size: + ([ `lg [@mel.as "lg"] + | `md [@mel.as "md"] + | `sm [@mel.as "sm"] + | `xl [@mel.as "xl"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1416,8 +1546,13 @@ module Surface : sig type options external options : - ?variant:([ `default [@mel.as "default"] | `secondary [@mel.as "secondary"] | `tertiary [@mel.as "tertiary"] | `transparent [@mel.as "transparent"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `default [@mel.as "default"] + | `secondary [@mel.as "secondary"] + | `tertiary [@mel.as "tertiary"] + | `transparent [@mel.as "transparent"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1431,8 +1566,10 @@ module Switch : sig type options external options : - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1454,8 +1591,10 @@ module SwitchGroup : sig type options external options : - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1474,8 +1613,10 @@ module Table : sig type options external options : - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1495,11 +1636,19 @@ module Table : sig external header : slots -> string = "header" [@@mel.send] external load_more : slots -> string = "loadMore" [@@mel.send] external load_more_content : slots -> string = "loadMoreContent" [@@mel.send] - external resizable_container : slots -> string = "resizableContainer" [@@mel.send] + + external resizable_container : slots -> string = "resizableContainer" + [@@mel.send] + external row : slots -> string = "row" [@@mel.send] external scroll_container : slots -> string = "scrollContainer" [@@mel.send] - external sortable_column_header : slots -> string = "sortableColumnHeader" [@@mel.send] - external sortable_column_indicator : slots -> string = "sortableColumnIndicator" [@@mel.send] + + external sortable_column_header : slots -> string = "sortableColumnHeader" + [@@mel.send] + + external sortable_column_indicator : slots -> string + = "sortableColumnIndicator" + [@@mel.send] end (** HeroUI's [tabsVariants]. *) @@ -1507,9 +1656,15 @@ module Tabs : sig type options external options : - ?align:([ `center [@mel.as "center"] | `end_ [@mel.as "end"] | `start [@mel.as "start"] ] [@mel.as "align"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?align: + ([ `center [@mel.as "center"] + | `end_ [@mel.as "end"] + | `start [@mel.as "start"] ] + [@mel.as "align"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1527,7 +1682,10 @@ module Tabs : sig external tab : slots -> string = "tab" [@@mel.send] external tab_indicator : slots -> string = "tabIndicator" [@@mel.send] external tab_list : slots -> string = "tabList" [@@mel.send] - external tab_list_container : slots -> string = "tabListContainer" [@@mel.send] + + external tab_list_container : slots -> string = "tabListContainer" + [@@mel.send] + external tab_panel : slots -> string = "tabPanel" [@@mel.send] end @@ -1536,9 +1694,13 @@ module Tag : sig type options external options : - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `default [@mel.as "default"] | `surface [@mel.as "surface"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1556,10 +1718,7 @@ end module TagGroup : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1576,12 +1735,35 @@ module Typography : sig type options external options : - ?align:([ `center [@mel.as "center"] | `end_ [@mel.as "end"] | `justify [@mel.as "justify"] | `start [@mel.as "start"] ] [@mel.as "align"]) -> - ?color:([ `default [@mel.as "default"] | `muted [@mel.as "muted"] ] [@mel.as "color"]) -> - ?truncate:(bool [@mel.as "truncate"]) -> - ?type_:([ `body [@mel.as "body"] | `body_sm [@mel.as "body-sm"] | `body_xs [@mel.as "body-xs"] | `code [@mel.as "code"] | `h1 [@mel.as "h1"] | `h2 [@mel.as "h2"] | `h3 [@mel.as "h3"] | `h4 [@mel.as "h4"] | `h5 [@mel.as "h5"] | `h6 [@mel.as "h6"] ] [@mel.as "type"]) -> - ?weight:([ `bold [@mel.as "bold"] | `medium [@mel.as "medium"] | `normal [@mel.as "normal"] | `semibold [@mel.as "semibold"] ] [@mel.as "weight"]) -> - ?class_:(string [@mel.as "class"]) -> + ?align: + ([ `center [@mel.as "center"] + | `end_ [@mel.as "end"] + | `justify [@mel.as "justify"] + | `start [@mel.as "start"] ] + [@mel.as "align"]) -> + ?color: + ([ `default [@mel.as "default"] | `muted [@mel.as "muted"] ] + [@mel.as "color"]) -> + ?truncate:(bool[@mel.as "truncate"]) -> + ?type_: + ([ `body [@mel.as "body"] + | `body_sm [@mel.as "body-sm"] + | `body_xs [@mel.as "body-xs"] + | `code [@mel.as "code"] + | `h1 [@mel.as "h1"] + | `h2 [@mel.as "h2"] + | `h3 [@mel.as "h3"] + | `h4 [@mel.as "h4"] + | `h5 [@mel.as "h5"] + | `h6 [@mel.as "h6"] ] + [@mel.as "type"]) -> + ?weight: + ([ `bold [@mel.as "bold"] + | `medium [@mel.as "medium"] + | `normal [@mel.as "normal"] + | `semibold [@mel.as "semibold"] ] + [@mel.as "weight"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1600,8 +1782,8 @@ module TextField : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1615,9 +1797,11 @@ module TextArea : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?variant:([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?variant: + ([ `primary [@mel.as "primary"] | `secondary [@mel.as "secondary"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1631,8 +1815,8 @@ module TimeField : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1646,9 +1830,22 @@ module Toast : sig type options external options : - ?placement:([ `bottom [@mel.as "bottom"] | `bottom_end [@mel.as "bottom end"] | `bottom_start [@mel.as "bottom start"] | `top [@mel.as "top"] | `top_end [@mel.as "top end"] | `top_start [@mel.as "top start"] ] [@mel.as "placement"]) -> - ?variant:([ `accent [@mel.as "accent"] | `danger [@mel.as "danger"] | `default [@mel.as "default"] | `success [@mel.as "success"] | `warning [@mel.as "warning"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?placement: + ([ `bottom [@mel.as "bottom"] + | `bottom_end [@mel.as "bottom end"] + | `bottom_start [@mel.as "bottom start"] + | `top [@mel.as "top"] + | `top_end [@mel.as "top end"] + | `top_start [@mel.as "top start"] ] + [@mel.as "placement"]) -> + ?variant: + ([ `accent [@mel.as "accent"] + | `danger [@mel.as "danger"] + | `default [@mel.as "default"] + | `success [@mel.as "success"] + | `warning [@mel.as "warning"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1673,10 +1870,14 @@ module ToggleButton : sig type options external options : - ?is_icon_only:(bool [@mel.as "isIconOnly"]) -> - ?size:([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] [@mel.as "size"]) -> - ?variant:([ `default [@mel.as "default"] | `ghost [@mel.as "ghost"] ] [@mel.as "variant"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_icon_only:(bool[@mel.as "isIconOnly"]) -> + ?size: + ([ `lg [@mel.as "lg"] | `md [@mel.as "md"] | `sm [@mel.as "sm"] ] + [@mel.as "size"]) -> + ?variant: + ([ `default [@mel.as "default"] | `ghost [@mel.as "ghost"] ] + [@mel.as "variant"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1690,10 +1891,12 @@ module ToggleButtonGroup : sig type options external options : - ?full_width:(bool [@mel.as "fullWidth"]) -> - ?is_detached:(bool [@mel.as "isDetached"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?full_width:(bool[@mel.as "fullWidth"]) -> + ?is_detached:(bool[@mel.as "isDetached"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1712,9 +1915,11 @@ module Toolbar : sig type options external options : - ?is_attached:(bool [@mel.as "isAttached"]) -> - ?orientation:([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] [@mel.as "orientation"]) -> - ?class_:(string [@mel.as "class"]) -> + ?is_attached:(bool[@mel.as "isAttached"]) -> + ?orientation: + ([ `horizontal [@mel.as "horizontal"] | `vertical [@mel.as "vertical"] ] + [@mel.as "orientation"]) -> + ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] @@ -1727,10 +1932,7 @@ end module Tooltip : sig type options - external options : - ?class_:(string [@mel.as "class"]) -> - unit -> - options = "" + external options : ?class_:(string[@mel.as "class"]) -> unit -> options = "" [@@mel.obj] type slots @@ -1742,8 +1944,8 @@ module Tooltip : sig external trigger : slots -> string = "trigger" [@@mel.send] end +external cn : string -> string -> string Js.undefined = "cn" +[@@mel.module "@heroui/styles"] (** HeroUI's [cn]: [cn a b] is [a]'s classes and [b]'s, a Tailwind utility of [b] winning over one of [a] that sets the same property, as a variant function merges its [class]; none where both are empty. *) -external cn : string -> string -> string Js.undefined = "cn" -[@@mel.module "@heroui/styles"] diff --git a/heroui/time_field.mlx b/heroui/time_field.mlx index d9040ea7..b1b9b9ad 100644 --- a/heroui/time_field.mlx +++ b/heroui/time_field.mlx @@ -302,8 +302,8 @@ let of_clock c = ~second:(part Clock.second) () let fields t = - D.Types.ZonedDateTime_Set.make ~hour:(Time.hour t) ~minute:(Time.minute t) - ~second:(Time.second t) () + D.Types.ZonedDateTime_Set_Fields.make ~hour:(Time.hour t) + ~minute:(Time.minute t) ~second:(Time.second t) () (* What a kind of value is to a field, which edits its time of day alone: that time, the same value at another, its zone, and what a form is sent. *) diff --git a/internationalized_date/solidtype_internationalized_date.ml b/internationalized_date/solidtype_internationalized_date.ml index 009c1928..6fec568d 100644 --- a/internationalized_date/solidtype_internationalized_date.ml +++ b/internationalized_date/solidtype_internationalized_date.ml @@ -5,309 +5,439 @@ module Types = Types -(** Creates a `Calendar` instance from a Unicode calendar identifier string. *) external create_calendar : string -> Types.Calendar.t = "createCalendar" [@@mel.module "@internationalized/date"] +(** Creates a `Calendar` instance from a Unicode calendar identifier string. *) -(** Returns the last date of the month for the given date. *) -external end_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "endOfMonth" +external end_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "endOfMonth" [@@mel.module "@internationalized/date"] +(** Returns the last date of the month for the given date. *) -(** Returns the last date of the week for the given date and locale. *) -external end_of_week : Types.ZonedDateTime.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> Types.ZonedDateTime.t = "endOfWeek" +external end_of_week : + Types.ZonedDateTime.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + Types.ZonedDateTime.t = "endOfWeek" [@@mel.module "@internationalized/date"] +(** Returns the last date of the week for the given date and locale. *) -(** Returns the last day of the year for the given date. *) -external end_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "endOfYear" +external end_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "endOfYear" [@@mel.module "@internationalized/date"] +(** Returns the last day of the year for the given date. *) -external from_absolute_js : float -> string -> Types.ZonedDateTime.t = "fromAbsolute" +external from_absolute_js : float -> string -> Types.ZonedDateTime.t + = "fromAbsolute" [@@mel.module "@internationalized/date"] -(** Takes a Unix epoch (milliseconds since 1970) and converts it to the provided time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let from_absolute x0 x1 = match from_absolute_js x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("from_absolute: " ^ Option.value (Js.Exn.message e) ~default:"") -let from_absolute_opt x0 x1 = match from_absolute_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("from_absolute: " ^ Option.value (Js.Exn.message e) ~default:"") + +let from_absolute_opt x0 x1 = + match from_absolute_js x0 x1 with + | v -> Some v + | exception Js.Exn.Error _ -> None -external from_date_js : Js.Date.t -> string -> Types.ZonedDateTime.t = "fromDate" +external from_date_js : Js.Date.t -> string -> Types.ZonedDateTime.t + = "fromDate" [@@mel.module "@internationalized/date"] -(** Takes a `Date` object and converts it to the provided time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let from_date x0 x1 = match from_date_js x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("from_date: " ^ Option.value (Js.Exn.message e) ~default:"") -let from_date_opt x0 x1 = match from_date_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("from_date: " ^ Option.value (Js.Exn.message e) ~default:"") + +let from_date_opt x0 x1 = + match from_date_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None -(** Takes a `Date` object and converts it to the time zone identifier for the current user. *) -external from_date_to_local : Js.Date.t -> Types.ZonedDateTime.t = "fromDateToLocal" +external from_date_to_local : Js.Date.t -> Types.ZonedDateTime.t + = "fromDateToLocal" [@@mel.module "@internationalized/date"] +(** Takes a `Date` object and converts it to the time zone identifier for the + current user. *) -(** Returns the day of week for the given date and locale. Days are numbered from zero to six, - where zero is the first day of the week in the given locale. For example, in the United States, - the first day of the week is Sunday, but in France it is Monday. *) -external get_day_of_week : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> int = "getDayOfWeek" +external get_day_of_week : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + int = "getDayOfWeek" [@@mel.module "@internationalized/date"] +(** Returns the day of week for the given date and locale. Days are numbered + from zero to six, where zero is the first day of the week in the given + locale. For example, in the United States, the first day of the week is + Sunday, but in France it is Monday. *) -external get_hours_in_day_js : Types.CalendarDate.t -> string -> int = "getHoursInDay" +external get_hours_in_day_js : Types.CalendarDate.t -> string -> int + = "getHoursInDay" [@@mel.module "@internationalized/date"] -(** Returns the number of hours in the given date and time zone. - Usually this is 24, but it could be 23 or 25 if the date is on a daylight saving transition. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let get_hours_in_day x0 x1 = match get_hours_in_day_js x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("get_hours_in_day: " ^ Option.value (Js.Exn.message e) ~default:"") -let get_hours_in_day_opt x0 x1 = match get_hours_in_day_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("get_hours_in_day: " ^ Option.value (Js.Exn.message e) ~default:"") + +let get_hours_in_day_opt x0 x1 = + match get_hours_in_day_js x0 x1 with + | v -> Some v + | exception Js.Exn.Error _ -> None -(** Returns the time zone identifier for the current user. *) external get_local_time_zone : unit -> string = "getLocalTimeZone" [@@mel.module "@internationalized/date"] +(** Returns the time zone identifier for the current user. *) -external get_minimum_day_in_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> int = "getMinimumDayInMonth" +external get_minimum_day_in_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + int = "getMinimumDayInMonth" [@@mel.module "@internationalized/date"] -external get_minimum_month_in_year : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> int = "getMinimumMonthInYear" +external get_minimum_month_in_year : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + int = "getMinimumMonthInYear" [@@mel.module "@internationalized/date"] -(** Returns the number of weeks in the given month and locale. *) -external get_weeks_in_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> int = "getWeeksInMonth" +external get_weeks_in_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + int = "getWeeksInMonth" [@@mel.module "@internationalized/date"] +(** Returns the number of weeks in the given month and locale. *) -(** Returns whether two calendars are the same. *) -external is_equal_calendar : Types.Calendar.t -> Types.Calendar.t -> bool = "isEqualCalendar" +external is_equal_calendar : Types.Calendar.t -> Types.Calendar.t -> bool + = "isEqualCalendar" [@@mel.module "@internationalized/date"] +(** Returns whether two calendars are the same. *) -(** Returns whether the given dates occur on the same day, and are of the same calendar system. *) -external is_equal_day : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isEqualDay" +external is_equal_day : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isEqualDay" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur on the same day, and are of the same + calendar system. *) -(** Returns whether the given dates occur in the same month, and are of the same calendar system. *) -external is_equal_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isEqualMonth" +external is_equal_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isEqualMonth" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same month, and are of the same + calendar system. *) -(** Returns whether the given dates occur in the same year, and are of the same calendar system. *) -external is_equal_year : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isEqualYear" +external is_equal_year : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isEqualYear" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same year, and are of the same + calendar system. *) -(** Returns whether the given dates occur on the same day, regardless of the time or calendar system. *) -external is_same_day : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isSameDay" +external is_same_day : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isSameDay" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur on the same day, regardless of the + time or calendar system. *) -(** Returns whether the given dates occur in the same month, using the calendar system of the first - date. *) -external is_same_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isSameMonth" +external is_same_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isSameMonth" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same month, using the calendar + system of the first date. *) -(** Returns whether the given dates occur in the same year, using the calendar system of the first - date. *) -external is_same_year : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isSameYear" +external is_same_year : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isSameYear" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same year, using the calendar + system of the first date. *) -external is_today_js : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool = "isToday" +external is_today_js : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool = "isToday" [@@mel.module "@internationalized/date"] -(** Returns whether the date is today in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let is_today x0 x1 = match is_today_js x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("is_today: " ^ Option.value (Js.Exn.message e) ~default:"") -let is_today_opt x0 x1 = match is_today_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("is_today: " ^ Option.value (Js.Exn.message e) ~default:"") -(** Returns whether the given date is on a weekday in the given locale. *) -external is_weekday : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool = "isWeekday" +let is_today_opt x0 x1 = + match is_today_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + +external is_weekday : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool = "isWeekday" [@@mel.module "@internationalized/date"] +(** Returns whether the given date is on a weekday in the given locale. *) -(** Returns whether the given date is on a weekend in the given locale. *) -external is_weekend : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool = "isWeekend" +external is_weekend : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool = "isWeekend" [@@mel.module "@internationalized/date"] +(** Returns whether the given date is on a weekend in the given locale. *) -(** Returns the greater of the two provider dates. *) -external max_date : ?a:'a -> ?b:'b -> unit -> ('a, 'b) Types.Either.t Js.Nullable.t = "maxDate" +external max_date : + ?a:'a -> ?b:'b -> unit -> ('a, 'b) Types.Either.t Js.Nullable.t = "maxDate" [@@mel.module "@internationalized/date"] +(** Returns the greater of the two provider dates. *) -(** Returns the lesser of the two provider dates. *) external min_date : 'a -> 'b -> ('a, 'b) Types.Either.t = "minDate" [@@mel.module "@internationalized/date"] +(** Returns the lesser of the two provider dates. *) external now_js : string -> Types.ZonedDateTime.t = "now" [@@mel.module "@internationalized/date"] -(** Returns the current time in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let now x0 = match now_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("now: " ^ Option.value (Js.Exn.message e) ~default:"") -let now_opt x0 = match now_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("now: " ^ Option.value (Js.Exn.message e) ~default:"") -external parse_absolute_js : string -> string -> Types.ZonedDateTime.t = "parseAbsolute" +let now_opt x0 = + match now_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + +external parse_absolute_js : string -> string -> Types.ZonedDateTime.t + = "parseAbsolute" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 date and time string with a UTC offset (e.g. "2021-11-07T07:45:00Z" - or "2021-11-07T07:45:00-07:00"). The result is converted to the provided time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_absolute x0 x1 = match parse_absolute_js x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_absolute: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_absolute_opt x0 x1 = match parse_absolute_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("parse_absolute: " ^ Option.value (Js.Exn.message e) ~default:"") -external parse_absolute_to_local_js : string -> Types.ZonedDateTime.t = "parseAbsoluteToLocal" +let parse_absolute_opt x0 x1 = + match parse_absolute_js x0 x1 with + | v -> Some v + | exception Js.Exn.Error _ -> None + +external parse_absolute_to_local_js : string -> Types.ZonedDateTime.t + = "parseAbsoluteToLocal" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 date and time string with a UTC offset (e.g. "2021-11-07T07:45:00Z" - or "2021-11-07T07:45:00-07:00"). The result is converted to the user's local time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_absolute_to_local x0 = match parse_absolute_to_local_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_absolute_to_local: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_absolute_to_local_opt x0 = match parse_absolute_to_local_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("parse_absolute_to_local: " + ^ Option.value (Js.Exn.message e) ~default:"") + +let parse_absolute_to_local_opt x0 = + match parse_absolute_to_local_js x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None external parse_date_js : string -> Types.CalendarDate.t = "parseDate" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 date string, with no time components. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_date x0 = match parse_date_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_date: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_date_opt x0 = match parse_date_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("parse_date: " ^ Option.value (Js.Exn.message e) ~default:"") + +let parse_date_opt x0 = + match parse_date_js x0 with v -> Some v | exception Js.Exn.Error _ -> None -external parse_date_time_js : string -> Types.CalendarDateTime.t = "parseDateTime" +external parse_date_time_js : string -> Types.CalendarDateTime.t + = "parseDateTime" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 date and time string, with no time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_date_time x0 = match parse_date_time_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_date_time: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_date_time_opt x0 = match parse_date_time_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("parse_date_time: " ^ Option.value (Js.Exn.message e) ~default:"") + +let parse_date_time_opt x0 = + match parse_date_time_js x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None -external parse_duration_js : string -> Types.RequiredDateTimeDuration.t = "parseDuration" +external parse_duration_js : string -> Types.RequiredDateTimeDuration.t + = "parseDuration" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 duration string (e.g. "P3Y6M6W4DT12H30M5S"). - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_duration x0 = match parse_duration_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_duration: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_duration_opt x0 = match parse_duration_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("parse_duration: " ^ Option.value (Js.Exn.message e) ~default:"") + +let parse_duration_opt x0 = + match parse_duration_js x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None external parse_time_js : string -> Types.Time.t = "parseTime" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 time string. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_time x0 = match parse_time_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_time: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_time_opt x0 = match parse_time_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("parse_time: " ^ Option.value (Js.Exn.message e) ~default:"") -external parse_zoned_date_time_js : string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Types.ZonedDateTime.t = "parseZonedDateTime" +let parse_time_opt x0 = + match parse_time_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + +external parse_zoned_date_time_js : + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Types.ZonedDateTime.t = "parseZonedDateTime" [@@mel.module "@internationalized/date"] -(** Parses an ISO 8601 date and time string with a time zone extension and optional UTC offset (e.g. - "2021-11-07T00:45\[America/Los_Angeles\]" or "2021-11-07T00:45-07:00\[America/Los_Angeles\]"). - Ambiguous times due to daylight saving time transitions are resolved according to the - `disambiguation` parameter. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let parse_zoned_date_time x0 ?disambiguation () = match parse_zoned_date_time_js x0 ?disambiguation () with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_zoned_date_time: " ^ Option.value (Js.Exn.message e) ~default:"") -let parse_zoned_date_time_opt x0 ?disambiguation () = match parse_zoned_date_time_js x0 ?disambiguation () with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("parse_zoned_date_time: " ^ Option.value (Js.Exn.message e) ~default:"") + +let parse_zoned_date_time_opt x0 ?disambiguation () = + match parse_zoned_date_time_js x0 ?disambiguation () with + | v -> Some v + | exception Js.Exn.Error _ -> None -(** Resets the time zone identifier for the current user. *) external reset_local_time_zone : unit -> unit = "resetLocalTimeZone" [@@mel.module "@internationalized/date"] +(** Resets the time zone identifier for the current user. *) external set_local_time_zone_js : string -> unit = "setLocalTimeZone" [@@mel.module "@internationalized/date"] -(** Sets the time zone identifier for the current user. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let set_local_time_zone x0 = match set_local_time_zone_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("set_local_time_zone: " ^ Option.value (Js.Exn.message e) ~default:"") -let set_local_time_zone_opt x0 = match set_local_time_zone_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("set_local_time_zone: " ^ Option.value (Js.Exn.message e) ~default:"") -(** Returns the first date of the month for the given date. *) -external start_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "startOfMonth" +let set_local_time_zone_opt x0 = + match set_local_time_zone_js x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None + +external start_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "startOfMonth" [@@mel.module "@internationalized/date"] +(** Returns the first date of the month for the given date. *) -(** Returns the first date of the week for the given date and locale. *) -external start_of_week : Types.ZonedDateTime.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> Types.ZonedDateTime.t = "startOfWeek" +external start_of_week : + Types.ZonedDateTime.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + Types.ZonedDateTime.t = "startOfWeek" [@@mel.module "@internationalized/date"] +(** Returns the first date of the week for the given date and locale. *) -(** Returns the first day of the year for the given date. *) -external start_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "startOfYear" +external start_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "startOfYear" [@@mel.module "@internationalized/date"] +(** Returns the first day of the year for the given date. *) -(** Converts a date from one calendar system to another. *) external to_calendar : 't -> Types.Calendar.t -> 't = "toCalendar" [@@mel.module "@internationalized/date"] +(** Converts a date from one calendar system to another. *) -(** Converts a value with date components such as a `CalendarDateTime` or `ZonedDateTime` into a - `CalendarDate`. *) -external to_calendar_date : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> Types.CalendarDate.t = "toCalendarDate" +external to_calendar_date : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + Types.CalendarDate.t = "toCalendarDate" [@@mel.module "@internationalized/date"] +(** Converts a value with date components such as a `CalendarDateTime` or + `ZonedDateTime` into a `CalendarDate`. *) -(** Converts a date value to a `CalendarDateTime`. An optional `Time` value can be passed to set the - time of the resulting value, otherwise it will default to midnight. *) -external to_calendar_date_time : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> ?time:[< `calendar_date_time | `time | `zoned_date_time ] Types.Value.t -> unit -> Types.CalendarDateTime.t = "toCalendarDateTime" +external to_calendar_date_time : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + ?time:[< `calendar_date_time | `time | `zoned_date_time ] Types.Value.t -> + unit -> + Types.CalendarDateTime.t = "toCalendarDateTime" [@@mel.module "@internationalized/date"] +(** Converts a date value to a `CalendarDateTime`. An optional `Time` value can + be passed to set the time of the resulting value, otherwise it will default + to midnight. *) -(** Converts the given `ZonedDateTime` into the user's local time zone. *) -external to_local_time_zone : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "toLocalTimeZone" +external to_local_time_zone : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "toLocalTimeZone" [@@mel.module "@internationalized/date"] +(** Converts the given `ZonedDateTime` into the user's local time zone. *) -(** Extracts the time components from a value containing a date and time. *) -external to_time : [< `calendar_date_time | `zoned_date_time ] Types.Value.t -> Types.Time.t = "toTime" +external to_time : + [< `calendar_date_time | `zoned_date_time ] Types.Value.t -> Types.Time.t + = "toTime" [@@mel.module "@internationalized/date"] +(** Extracts the time components from a value containing a date and time. *) -external to_time_zone_js : Types.ZonedDateTime.t -> string -> Types.ZonedDateTime.t = "toTimeZone" +external to_time_zone_js : + Types.ZonedDateTime.t -> string -> Types.ZonedDateTime.t = "toTimeZone" [@@mel.module "@internationalized/date"] -(** Converts a `ZonedDateTime` from one time zone to another. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let to_time_zone x0 x1 = match to_time_zone_js x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("to_time_zone: " ^ Option.value (Js.Exn.message e) ~default:"") -let to_time_zone_opt x0 x1 = match to_time_zone_js x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("to_time_zone: " ^ Option.value (Js.Exn.message e) ~default:"") -external to_zoned_js : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Types.ZonedDateTime.t = "toZoned" +let to_time_zone_opt x0 x1 = + match to_time_zone_js x0 x1 with + | v -> Some v + | exception Js.Exn.Error _ -> None + +external to_zoned_js : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Types.ZonedDateTime.t = "toZoned" [@@mel.module "@internationalized/date"] -(** Converts a date value to a `ZonedDateTime` in the provided time zone. The `disambiguation` option - can be set to control how values that fall on daylight saving time changes are interpreted. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let to_zoned x0 x1 ?disambiguation () = match to_zoned_js x0 x1 ?disambiguation () with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("to_zoned: " ^ Option.value (Js.Exn.message e) ~default:"") -let to_zoned_opt x0 x1 ?disambiguation () = match to_zoned_js x0 x1 ?disambiguation () with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("to_zoned: " ^ Option.value (Js.Exn.message e) ~default:"") + +let to_zoned_opt x0 x1 ?disambiguation () = + match to_zoned_js x0 x1 ?disambiguation () with + | v -> Some v + | exception Js.Exn.Error _ -> None external today_js : string -> Types.CalendarDate.t = "today" [@@mel.module "@internationalized/date"] -(** Returns today's date in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let today x0 = match today_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("today: " ^ Option.value (Js.Exn.message e) ~default:"") -let today_opt x0 = match today_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("today: " ^ Option.value (Js.Exn.message e) ~default:"") + +let today_opt x0 = + match today_js x0 with v -> Some v | exception Js.Exn.Error _ -> None diff --git a/internationalized_date/solidtype_internationalized_date.mli b/internationalized_date/solidtype_internationalized_date.mli index 30a32aec..521f7af3 100644 --- a/internationalized_date/solidtype_internationalized_date.mli +++ b/internationalized_date/solidtype_internationalized_date.mli @@ -5,229 +5,362 @@ module Types = Types -(** Creates a `Calendar` instance from a Unicode calendar identifier string. *) external create_calendar : string -> Types.Calendar.t = "createCalendar" [@@mel.module "@internationalized/date"] +(** Creates a `Calendar` instance from a Unicode calendar identifier string. *) -(** Returns the last date of the month for the given date. *) -external end_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "endOfMonth" +external end_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "endOfMonth" [@@mel.module "@internationalized/date"] +(** Returns the last date of the month for the given date. *) -(** Returns the last date of the week for the given date and locale. *) -external end_of_week : Types.ZonedDateTime.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> Types.ZonedDateTime.t = "endOfWeek" +external end_of_week : + Types.ZonedDateTime.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + Types.ZonedDateTime.t = "endOfWeek" [@@mel.module "@internationalized/date"] +(** Returns the last date of the week for the given date and locale. *) -(** Returns the last day of the year for the given date. *) -external end_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "endOfYear" +external end_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "endOfYear" [@@mel.module "@internationalized/date"] +(** Returns the last day of the year for the given date. *) -(** Takes a Unix epoch (milliseconds since 1970) and converts it to the provided time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val from_absolute : float -> string -> Types.ZonedDateTime.t +(** Takes a Unix epoch (milliseconds since 1970) and converts it to the provided + time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val from_absolute_opt : float -> string -> Types.ZonedDateTime.t option -(** Takes a `Date` object and converts it to the provided time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val from_date : Js.Date.t -> string -> Types.ZonedDateTime.t +(** Takes a `Date` object and converts it to the provided time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val from_date_opt : Js.Date.t -> string -> Types.ZonedDateTime.t option -(** Takes a `Date` object and converts it to the time zone identifier for the current user. *) -external from_date_to_local : Js.Date.t -> Types.ZonedDateTime.t = "fromDateToLocal" +external from_date_to_local : Js.Date.t -> Types.ZonedDateTime.t + = "fromDateToLocal" [@@mel.module "@internationalized/date"] - -(** Returns the day of week for the given date and locale. Days are numbered from zero to six, - where zero is the first day of the week in the given locale. For example, in the United States, - the first day of the week is Sunday, but in France it is Monday. *) -external get_day_of_week : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> int = "getDayOfWeek" +(** Takes a `Date` object and converts it to the time zone identifier for the + current user. *) + +external get_day_of_week : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + int = "getDayOfWeek" [@@mel.module "@internationalized/date"] +(** Returns the day of week for the given date and locale. Days are numbered + from zero to six, where zero is the first day of the week in the given + locale. For example, in the United States, the first day of the week is + Sunday, but in France it is Monday. *) -(** Returns the number of hours in the given date and time zone. - Usually this is 24, but it could be 23 or 25 if the date is on a daylight saving transition. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val get_hours_in_day : Types.CalendarDate.t -> string -> int +(** Returns the number of hours in the given date and time zone. Usually this is + 24, but it could be 23 or 25 if the date is on a daylight saving transition. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val get_hours_in_day_opt : Types.CalendarDate.t -> string -> int option -(** Returns the time zone identifier for the current user. *) external get_local_time_zone : unit -> string = "getLocalTimeZone" [@@mel.module "@internationalized/date"] +(** Returns the time zone identifier for the current user. *) -external get_minimum_day_in_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> int = "getMinimumDayInMonth" +external get_minimum_day_in_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + int = "getMinimumDayInMonth" [@@mel.module "@internationalized/date"] -external get_minimum_month_in_year : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> int = "getMinimumMonthInYear" +external get_minimum_month_in_year : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + int = "getMinimumMonthInYear" [@@mel.module "@internationalized/date"] -(** Returns the number of weeks in the given month and locale. *) -external get_weeks_in_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> int = "getWeeksInMonth" +external get_weeks_in_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + int = "getWeeksInMonth" [@@mel.module "@internationalized/date"] +(** Returns the number of weeks in the given month and locale. *) -(** Returns whether two calendars are the same. *) -external is_equal_calendar : Types.Calendar.t -> Types.Calendar.t -> bool = "isEqualCalendar" +external is_equal_calendar : Types.Calendar.t -> Types.Calendar.t -> bool + = "isEqualCalendar" [@@mel.module "@internationalized/date"] +(** Returns whether two calendars are the same. *) -(** Returns whether the given dates occur on the same day, and are of the same calendar system. *) -external is_equal_day : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isEqualDay" +external is_equal_day : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isEqualDay" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur on the same day, and are of the same + calendar system. *) -(** Returns whether the given dates occur in the same month, and are of the same calendar system. *) -external is_equal_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isEqualMonth" +external is_equal_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isEqualMonth" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same month, and are of the same + calendar system. *) -(** Returns whether the given dates occur in the same year, and are of the same calendar system. *) -external is_equal_year : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isEqualYear" +external is_equal_year : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isEqualYear" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same year, and are of the same + calendar system. *) -(** Returns whether the given dates occur on the same day, regardless of the time or calendar system. *) -external is_same_day : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isSameDay" +external is_same_day : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isSameDay" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur on the same day, regardless of the + time or calendar system. *) -(** Returns whether the given dates occur in the same month, using the calendar system of the first - date. *) -external is_same_month : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isSameMonth" +external is_same_month : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isSameMonth" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same month, using the calendar + system of the first date. *) -(** Returns whether the given dates occur in the same year, using the calendar system of the first - date. *) -external is_same_year : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> bool = "isSameYear" +external is_same_year : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + bool = "isSameYear" [@@mel.module "@internationalized/date"] +(** Returns whether the given dates occur in the same year, using the calendar + system of the first date. *) +val is_today : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool (** Returns whether the date is today in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) -val is_today : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool -val is_today_opt : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool option -(** Returns whether the given date is on a weekday in the given locale. *) -external is_weekday : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool = "isWeekday" + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + +val is_today_opt : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool option + +external is_weekday : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool = "isWeekday" [@@mel.module "@internationalized/date"] +(** Returns whether the given date is on a weekday in the given locale. *) -(** Returns whether the given date is on a weekend in the given locale. *) -external is_weekend : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> bool = "isWeekend" +external is_weekend : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + bool = "isWeekend" [@@mel.module "@internationalized/date"] +(** Returns whether the given date is on a weekend in the given locale. *) -(** Returns the greater of the two provider dates. *) -external max_date : ?a:'a -> ?b:'b -> unit -> ('a, 'b) Types.Either.t Js.Nullable.t = "maxDate" +external max_date : + ?a:'a -> ?b:'b -> unit -> ('a, 'b) Types.Either.t Js.Nullable.t = "maxDate" [@@mel.module "@internationalized/date"] +(** Returns the greater of the two provider dates. *) -(** Returns the lesser of the two provider dates. *) external min_date : 'a -> 'b -> ('a, 'b) Types.Either.t = "minDate" [@@mel.module "@internationalized/date"] +(** Returns the lesser of the two provider dates. *) -(** Returns the current time in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val now : string -> Types.ZonedDateTime.t +(** Returns the current time in the given time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val now_opt : string -> Types.ZonedDateTime.t option -(** Parses an ISO 8601 date and time string with a UTC offset (e.g. "2021-11-07T07:45:00Z" - or "2021-11-07T07:45:00-07:00"). The result is converted to the provided time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val parse_absolute : string -> string -> Types.ZonedDateTime.t +(** Parses an ISO 8601 date and time string with a UTC offset (e.g. + "2021-11-07T07:45:00Z" or "2021-11-07T07:45:00-07:00"). The result is + converted to the provided time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val parse_absolute_opt : string -> string -> Types.ZonedDateTime.t option -(** Parses an ISO 8601 date and time string with a UTC offset (e.g. "2021-11-07T07:45:00Z" - or "2021-11-07T07:45:00-07:00"). The result is converted to the user's local time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val parse_absolute_to_local : string -> Types.ZonedDateTime.t +(** Parses an ISO 8601 date and time string with a UTC offset (e.g. + "2021-11-07T07:45:00Z" or "2021-11-07T07:45:00-07:00"). The result is + converted to the user's local time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val parse_absolute_to_local_opt : string -> Types.ZonedDateTime.t option -(** Parses an ISO 8601 date string, with no time components. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val parse_date : string -> Types.CalendarDate.t +(** Parses an ISO 8601 date string, with no time components. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val parse_date_opt : string -> Types.CalendarDate.t option -(** Parses an ISO 8601 date and time string, with no time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val parse_date_time : string -> Types.CalendarDateTime.t +(** Parses an ISO 8601 date and time string, with no time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val parse_date_time_opt : string -> Types.CalendarDateTime.t option -(** Parses an ISO 8601 duration string (e.g. "P3Y6M6W4DT12H30M5S"). - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val parse_duration : string -> Types.RequiredDateTimeDuration.t +(** Parses an ISO 8601 duration string (e.g. "P3Y6M6W4DT12H30M5S"). + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val parse_duration_opt : string -> Types.RequiredDateTimeDuration.t option -(** Parses an ISO 8601 time string. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val parse_time : string -> Types.Time.t +(** Parses an ISO 8601 time string. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val parse_time_opt : string -> Types.Time.t option -(** Parses an ISO 8601 date and time string with a time zone extension and optional UTC offset (e.g. - "2021-11-07T00:45\[America/Los_Angeles\]" or "2021-11-07T00:45-07:00\[America/Los_Angeles\]"). - Ambiguous times due to daylight saving time transitions are resolved according to the +val parse_zoned_date_time : + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Types.ZonedDateTime.t +(** Parses an ISO 8601 date and time string with a time zone extension and + optional UTC offset (e.g. "2021-11-07T00:45\[America/Los_Angeles\]" or + "2021-11-07T00:45-07:00\[America/Los_Angeles\]"). Ambiguous times due to + daylight saving time transitions are resolved according to the `disambiguation` parameter. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) -val parse_zoned_date_time : string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Types.ZonedDateTime.t -val parse_zoned_date_time_opt : string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Types.ZonedDateTime.t option -(** Resets the time zone identifier for the current user. *) + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + +val parse_zoned_date_time_opt : + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Types.ZonedDateTime.t option + external reset_local_time_zone : unit -> unit = "resetLocalTimeZone" [@@mel.module "@internationalized/date"] +(** Resets the time zone identifier for the current user. *) -(** Sets the time zone identifier for the current user. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val set_local_time_zone : string -> unit +(** Sets the time zone identifier for the current user. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val set_local_time_zone_opt : string -> unit option -(** Returns the first date of the month for the given date. *) -external start_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "startOfMonth" +external start_of_month : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "startOfMonth" [@@mel.module "@internationalized/date"] +(** Returns the first date of the month for the given date. *) -(** Returns the first date of the week for the given date and locale. *) -external start_of_week : Types.ZonedDateTime.t -> string -> ?first_day_of_week:[ `sun | `mon | `tue | `wed | `thu | `fri | `sat ] -> unit -> Types.ZonedDateTime.t = "startOfWeek" +external start_of_week : + Types.ZonedDateTime.t -> + string -> + ?first_day_of_week:[ `fri | `mon | `sat | `sun | `thu | `tue | `wed ] -> + unit -> + Types.ZonedDateTime.t = "startOfWeek" [@@mel.module "@internationalized/date"] +(** Returns the first date of the week for the given date and locale. *) -(** Returns the first day of the year for the given date. *) -external start_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "startOfYear" +external start_of_year : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "startOfYear" [@@mel.module "@internationalized/date"] +(** Returns the first day of the year for the given date. *) -(** Converts a date from one calendar system to another. *) external to_calendar : 't -> Types.Calendar.t -> 't = "toCalendar" [@@mel.module "@internationalized/date"] +(** Converts a date from one calendar system to another. *) -(** Converts a value with date components such as a `CalendarDateTime` or `ZonedDateTime` into a - `CalendarDate`. *) -external to_calendar_date : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> Types.CalendarDate.t = "toCalendarDate" +external to_calendar_date : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + Types.CalendarDate.t = "toCalendarDate" [@@mel.module "@internationalized/date"] - -(** Converts a date value to a `CalendarDateTime`. An optional `Time` value can be passed to set the - time of the resulting value, otherwise it will default to midnight. *) -external to_calendar_date_time : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> ?time:[< `calendar_date_time | `time | `zoned_date_time ] Types.Value.t -> unit -> Types.CalendarDateTime.t = "toCalendarDateTime" +(** Converts a value with date components such as a `CalendarDateTime` or + `ZonedDateTime` into a `CalendarDate`. *) + +external to_calendar_date_time : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + ?time:[< `calendar_date_time | `time | `zoned_date_time ] Types.Value.t -> + unit -> + Types.CalendarDateTime.t = "toCalendarDateTime" [@@mel.module "@internationalized/date"] +(** Converts a date value to a `CalendarDateTime`. An optional `Time` value can + be passed to set the time of the resulting value, otherwise it will default + to midnight. *) -(** Converts the given `ZonedDateTime` into the user's local time zone. *) -external to_local_time_zone : Types.ZonedDateTime.t -> Types.ZonedDateTime.t = "toLocalTimeZone" +external to_local_time_zone : Types.ZonedDateTime.t -> Types.ZonedDateTime.t + = "toLocalTimeZone" [@@mel.module "@internationalized/date"] +(** Converts the given `ZonedDateTime` into the user's local time zone. *) -(** Extracts the time components from a value containing a date and time. *) -external to_time : [< `calendar_date_time | `zoned_date_time ] Types.Value.t -> Types.Time.t = "toTime" +external to_time : + [< `calendar_date_time | `zoned_date_time ] Types.Value.t -> Types.Time.t + = "toTime" [@@mel.module "@internationalized/date"] +(** Extracts the time components from a value containing a date and time. *) -(** Converts a `ZonedDateTime` from one time zone to another. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val to_time_zone : Types.ZonedDateTime.t -> string -> Types.ZonedDateTime.t -val to_time_zone_opt : Types.ZonedDateTime.t -> string -> Types.ZonedDateTime.t option +(** Converts a `ZonedDateTime` from one time zone to another. -(** Converts a date value to a `ZonedDateTime` in the provided time zone. The `disambiguation` option - can be set to control how values that fall on daylight saving time changes are interpreted. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) -val to_zoned : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Types.ZonedDateTime.t -val to_zoned_opt : [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Types.ZonedDateTime.t option + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + +val to_time_zone_opt : + Types.ZonedDateTime.t -> string -> Types.ZonedDateTime.t option + +val to_zoned : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Types.ZonedDateTime.t +(** Converts a date value to a `ZonedDateTime` in the provided time zone. The + `disambiguation` option can be set to control how values that fall on + daylight saving time changes are interpreted. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + +val to_zoned_opt : + [< `calendar_date | `calendar_date_time | `zoned_date_time ] Types.Value.t -> + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Types.ZonedDateTime.t option -(** Returns today's date in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) val today : string -> Types.CalendarDate.t +(** Returns today's date in the given time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where it + throws. *) + val today_opt : string -> Types.CalendarDate.t option diff --git a/internationalized_date/types.ml b/internationalized_date/types.ml index adf26978..4ccc528d 100644 --- a/internationalized_date/types.ml +++ b/internationalized_date/types.ml @@ -7,7 +7,6 @@ (* Members of different JavaScript kinds, each as it is. *) type ('a, 'b) either type 'k t_value - type t_date_formatter type t_calendar type t_zoned_date_time = [ `zoned_date_time ] t_value @@ -20,7 +19,7 @@ type t_date_range_format_part type t_resolved_date_time_format_options type t_date_time_format_options type t_date_time_duration -type t_zoned_date_time_set +type t_zoned_date_time_set_fields type t_cycle_time_options type t_date_duration type t_date_fields @@ -35,226 +34,571 @@ module Either = struct external right : 'b -> ('a, 'b) t = "%identity" end -(* A value of one of CalendarDate, CalendarDateTime, Time, ZonedDateTime, its kind - the class it is of: what a union of them, or an interface they - satisfy, takes, as the kinds it names. *) +(* A value of one of CalendarDate, CalendarDateTime, Time, ZonedDateTime, its kind the class it is of: what a union of them, or an interface they satisfy, takes, as the kinds it names. *) module Value = struct type 'k t = 'k t_value end -(** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and polyfills new features. *) +(** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and + polyfills new features. *) module DateFormatter = struct type t = t_date_formatter + external format : t -> Js.Date.t -> string = "format" [@@mel.send] - external format_to_parts : t -> Js.Date.t -> t_date_time_format_part array = "formatToParts" [@@mel.send] - external format_range : t -> Js.Date.t -> Js.Date.t -> string = "formatRange" [@@mel.send] - external format_range_to_parts : t -> Js.Date.t -> Js.Date.t -> t_date_range_format_part array = "formatRangeToParts" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_date_time_format_options = "resolvedOptions" [@@mel.send] - external make : string -> ?options:t_date_time_format_options -> unit -> t = "DateFormatter" [@@mel.new] [@@mel.module "@internationalized/date"] + + external format_to_parts : t -> Js.Date.t -> t_date_time_format_part array + = "formatToParts" + [@@mel.send] + + external format_range : t -> Js.Date.t -> Js.Date.t -> string = "formatRange" + [@@mel.send] + + external format_range_to_parts : + t -> Js.Date.t -> Js.Date.t -> t_date_range_format_part array + = "formatRangeToParts" + [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_date_time_format_options + = "resolvedOptions" + [@@mel.send] + + external make : string -> ?options:t_date_time_format_options -> unit -> t + = "DateFormatter" + [@@mel.new] [@@mel.module "@internationalized/date"] end (** The Calendar interface represents a calendar system, including information - about how days, months, years, and eras are organized, and methods to perform - arithmetic on dates. *) + about how days, months, years, and eras are organized, and methods to + perform arithmetic on dates. *) module Calendar = struct type t = t_calendar + + external identifier : t -> string = "identifier" + [@@mel.get] (** A string identifier for the calendar, as defined by Unicode CLDR. See - \[MDN\](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types). *) - external identifier : t -> string = "identifier" [@@mel.get] - external from_julian_day : t -> int -> t_calendar_date = "fromJulianDay" [@@mel.send] - external to_julian_day : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "toJulianDay" [@@mel.send] - external get_days_in_month : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "getDaysInMonth" [@@mel.send] - external get_months_in_year : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "getMonthsInYear" [@@mel.send] - external get_years_in_era : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "getYearsInEra" [@@mel.send] + \[MDN\](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types). + *) + + external from_julian_day : t -> int -> t_calendar_date = "fromJulianDay" + [@@mel.send] + + external to_julian_day : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "toJulianDay" + [@@mel.send] + + external get_days_in_month : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "getDaysInMonth" + [@@mel.send] + + external get_months_in_year : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "getMonthsInYear" + [@@mel.send] + + external get_years_in_era : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "getYearsInEra" + [@@mel.send] + external get_eras : t -> unit -> string array = "getEras" [@@mel.send] - external get_maximum_months_in_year : t -> unit -> int = "getMaximumMonthsInYear" [@@mel.send] - external get_maximum_days_in_month : t -> unit -> int = "getMaximumDaysInMonth" [@@mel.send] + + external get_maximum_months_in_year : t -> unit -> int + = "getMaximumMonthsInYear" + [@@mel.send] + + external get_maximum_days_in_month : t -> unit -> int + = "getMaximumDaysInMonth" + [@@mel.send] end -(** A ZonedDateTime represents a date and time in a specific time zone and calendar system. *) +(** A ZonedDateTime represents a date and time in a specific time zone and + calendar system. *) module ZonedDateTime = struct type t = t_zoned_date_time + + external calendar : t -> t_calendar = "calendar" + [@@mel.get] (** The calendar system associated with this date, e.g. Gregorian. *) - external calendar : t -> t_calendar = "calendar" [@@mel.get] + + external era : t -> string = "era" + [@@mel.get] (** The calendar era for this date, e.g. "BC" or "AD". *) - external era : t -> string = "era" [@@mel.get] + + external year : t -> int = "year" + [@@mel.get] (** The year of this date within the era. *) - external year : t -> int = "year" [@@mel.get] - (** The month number within the year. Note that some calendar systems such as Hebrew - may have a variable number of months per year. Therefore, month numbers may not - always correspond to the same month names in different years. *) - external month : t -> int = "month" [@@mel.get] + + external month : t -> int = "month" + [@@mel.get] + (** The month number within the year. Note that some calendar systems such as + Hebrew may have a variable number of months per year. Therefore, month + numbers may not always correspond to the same month names in different + years. *) + + external day : t -> int = "day" + [@@mel.get] (** The day number within the month. *) - external day : t -> int = "day" [@@mel.get] + + external hour : t -> int = "hour" + [@@mel.get] (** The hour in the day, numbered from 0 to 23. *) - external hour : t -> int = "hour" [@@mel.get] + + external minute : t -> int = "minute" + [@@mel.get] (** The minute in the hour. *) - external minute : t -> int = "minute" [@@mel.get] + + external second : t -> int = "second" + [@@mel.get] (** The second in the minute. *) - external second : t -> int = "second" [@@mel.get] + + external millisecond : t -> int = "millisecond" + [@@mel.get] (** The millisecond in the second. *) - external millisecond : t -> int = "millisecond" [@@mel.get] - (** The IANA time zone identifier that this date and time is represented in. *) - external time_zone : t -> string = "timeZone" [@@mel.get] + + external time_zone : t -> string = "timeZone" + [@@mel.get] + (** The IANA time zone identifier that this date and time is represented in. + *) + + external offset : t -> int = "offset" + [@@mel.get] (** The UTC offset for this time, in milliseconds. *) - external offset : t -> int = "offset" [@@mel.get] + external copy : t -> unit -> t_zoned_date_time = "copy" [@@mel.send] - external add : t -> t_date_time_duration -> t_zoned_date_time = "add" [@@mel.send] - external subtract : t -> t_date_time_duration -> t_zoned_date_time = "subtract" [@@mel.send] - external set_js : t -> t_zoned_date_time_set -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> t_zoned_date_time = "set" [@@mel.send] - (** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields - will be constrained accordingly. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + + external add : t -> t_date_time_duration -> t_zoned_date_time = "add" + [@@mel.send] + + external subtract : t -> t_date_time_duration -> t_zoned_date_time + = "subtract" + [@@mel.send] + + external set_js : + t -> + t_zoned_date_time_set_fields -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + t_zoned_date_time = "set" + [@@mel.send] + let set o x0 ?disambiguation () = match set_js o x0 ?disambiguation () with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("set: " ^ Option.value (Js.Exn.message e) ~default:"") - let set_opt o x0 ?disambiguation () = match set_js o x0 ?disambiguation () with v -> Some v | exception Js.Exn.Error _ -> None - external cycle : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `millisecond ] -> int -> ?options:t_cycle_time_options -> unit -> t_zoned_date_time = "cycle" [@@mel.send] + | exception Js.Exn.Error e -> + invalid_arg ("set: " ^ Option.value (Js.Exn.message e) ~default:"") + + let set_opt o x0 ?disambiguation () = + match set_js o x0 ?disambiguation () with + | v -> Some v + | exception Js.Exn.Error _ -> None + + external cycle : + t -> + [ `day | `era | `hour | `millisecond | `minute | `month | `second | `year ] -> + int -> + ?options:t_cycle_time_options -> + unit -> + t_zoned_date_time = "cycle" + [@@mel.send] + external to_date : t -> unit -> Js.Date.t = "toDate" [@@mel.send] external to_string : t -> unit -> string = "toString" [@@mel.send] - external to_absolute_string : t -> unit -> string = "toAbsoluteString" [@@mel.send] - external compare : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : int -> int -> int -> string -> int -> ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t = "ZonedDateTime" [@@mel.new] [@@mel.module "@internationalized/date"] + + external to_absolute_string : t -> unit -> string = "toAbsoluteString" + [@@mel.send] + + external compare : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + float = "compare" + [@@mel.send] + + external make : + int -> + int -> + int -> + string -> + int -> + ?hour:int -> + ?minute:int -> + ?second:int -> + ?millisecond:int -> + unit -> + t = "ZonedDateTime" + [@@mel.new] [@@mel.module "@internationalized/date"] end -(** A CalendarDate represents a date without any time components in a specific calendar system. *) +(** A CalendarDate represents a date without any time components in a specific + calendar system. *) module CalendarDate = struct type t = t_calendar_date + + external calendar : t -> t_calendar = "calendar" + [@@mel.get] (** The calendar system associated with this date, e.g. Gregorian. *) - external calendar : t -> t_calendar = "calendar" [@@mel.get] + + external era : t -> string = "era" + [@@mel.get] (** The calendar era for this date, e.g. "BC" or "AD". *) - external era : t -> string = "era" [@@mel.get] + + external year : t -> int = "year" + [@@mel.get] (** The year of this date within the era. *) - external year : t -> int = "year" [@@mel.get] - (** The month number within the year. Note that some calendar systems such as Hebrew - may have a variable number of months per year. Therefore, month numbers may not - always correspond to the same month names in different years. *) - external month : t -> int = "month" [@@mel.get] + + external month : t -> int = "month" + [@@mel.get] + (** The month number within the year. Note that some calendar systems such as + Hebrew may have a variable number of months per year. Therefore, month + numbers may not always correspond to the same month names in different + years. *) + + external day : t -> int = "day" + [@@mel.get] (** The day number within the month. *) - external day : t -> int = "day" [@@mel.get] + external copy : t -> unit -> t_calendar_date = "copy" [@@mel.send] external add : t -> t_date_duration -> t_calendar_date = "add" [@@mel.send] - external subtract : t -> t_date_duration -> t_calendar_date = "subtract" [@@mel.send] + + external subtract : t -> t_date_duration -> t_calendar_date = "subtract" + [@@mel.send] + external set : t -> t_date_fields -> t_calendar_date = "set" [@@mel.send] - external cycle : t -> [ `era | `year | `month | `day ] -> int -> ?options:t_cycle_options -> unit -> t_calendar_date = "cycle" [@@mel.send] + + external cycle : + t -> + [ `day | `era | `month | `year ] -> + int -> + ?options:t_cycle_options -> + unit -> + t_calendar_date = "cycle" + [@@mel.send] + external to_date_js : t -> string -> Js.Date.t = "toDate" [@@mel.send] - (** Converts the date to a native JavaScript Date object, with the time set to midnight in the - given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + let to_date o x0 = match to_date_js o x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("to_date: " ^ Option.value (Js.Exn.message e) ~default:"") - let to_date_opt o x0 = match to_date_js o x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("to_date: " ^ Option.value (Js.Exn.message e) ~default:"") + + let to_date_opt o x0 = + match to_date_js o x0 with v -> Some v | exception Js.Exn.Error _ -> None + external to_string : t -> unit -> string = "toString" [@@mel.send] - external compare : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : int -> int -> int -> t = "CalendarDate" [@@mel.new] [@@mel.module "@internationalized/date"] + + external compare : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + float = "compare" + [@@mel.send] + + external make : int -> int -> int -> t = "CalendarDate" + [@@mel.new] [@@mel.module "@internationalized/date"] end -(** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. *) +(** A CalendarDateTime represents a date and time without a time zone, in a + specific calendar system. *) module CalendarDateTime = struct type t = t_calendar_date_time + + external calendar : t -> t_calendar = "calendar" + [@@mel.get] (** The calendar system associated with this date, e.g. Gregorian. *) - external calendar : t -> t_calendar = "calendar" [@@mel.get] + + external era : t -> string = "era" + [@@mel.get] (** The calendar era for this date, e.g. "BC" or "AD". *) - external era : t -> string = "era" [@@mel.get] + + external year : t -> int = "year" + [@@mel.get] (** The year of this date within the era. *) - external year : t -> int = "year" [@@mel.get] - (** The month number within the year. Note that some calendar systems such as Hebrew - may have a variable number of months per year. Therefore, month numbers may not - always correspond to the same month names in different years. *) - external month : t -> int = "month" [@@mel.get] + + external month : t -> int = "month" + [@@mel.get] + (** The month number within the year. Note that some calendar systems such as + Hebrew may have a variable number of months per year. Therefore, month + numbers may not always correspond to the same month names in different + years. *) + + external day : t -> int = "day" + [@@mel.get] (** The day number within the month. *) - external day : t -> int = "day" [@@mel.get] + + external hour : t -> int = "hour" + [@@mel.get] (** The hour in the day, numbered from 0 to 23. *) - external hour : t -> int = "hour" [@@mel.get] + + external minute : t -> int = "minute" + [@@mel.get] (** The minute in the hour. *) - external minute : t -> int = "minute" [@@mel.get] + + external second : t -> int = "second" + [@@mel.get] (** The second in the minute. *) - external second : t -> int = "second" [@@mel.get] + + external millisecond : t -> int = "millisecond" + [@@mel.get] (** The millisecond in the second. *) - external millisecond : t -> int = "millisecond" [@@mel.get] + external copy : t -> unit -> t_calendar_date_time = "copy" [@@mel.send] - external add : t -> t_date_time_duration -> t_calendar_date_time = "add" [@@mel.send] - external subtract : t -> t_date_time_duration -> t_calendar_date_time = "subtract" [@@mel.send] - external set : t -> t_zoned_date_time_set -> t_calendar_date_time = "set" [@@mel.send] - external cycle : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `millisecond ] -> int -> ?options:t_cycle_time_options -> unit -> t_calendar_date_time = "cycle" [@@mel.send] - external to_date_js : t -> string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Js.Date.t = "toDate" [@@mel.send] - (** Converts the date to a native JavaScript Date object in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + + external add : t -> t_date_time_duration -> t_calendar_date_time = "add" + [@@mel.send] + + external subtract : t -> t_date_time_duration -> t_calendar_date_time + = "subtract" + [@@mel.send] + + external set : t -> t_zoned_date_time_set_fields -> t_calendar_date_time + = "set" + [@@mel.send] + + external cycle : + t -> + [ `day | `era | `hour | `millisecond | `minute | `month | `second | `year ] -> + int -> + ?options:t_cycle_time_options -> + unit -> + t_calendar_date_time = "cycle" + [@@mel.send] + + external to_date_js : + t -> + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Js.Date.t = "toDate" + [@@mel.send] + let to_date o x0 ?disambiguation () = match to_date_js o x0 ?disambiguation () with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("to_date: " ^ Option.value (Js.Exn.message e) ~default:"") - let to_date_opt o x0 ?disambiguation () = match to_date_js o x0 ?disambiguation () with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("to_date: " ^ Option.value (Js.Exn.message e) ~default:"") + + let to_date_opt o x0 ?disambiguation () = + match to_date_js o x0 ?disambiguation () with + | v -> Some v + | exception Js.Exn.Error _ -> None + external to_string : t -> unit -> string = "toString" [@@mel.send] - external compare : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : int -> int -> int -> ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t = "CalendarDateTime" [@@mel.new] [@@mel.module "@internationalized/date"] + + external compare : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + float = "compare" + [@@mel.send] + + external make : + int -> + int -> + int -> + ?hour:int -> + ?minute:int -> + ?second:int -> + ?millisecond:int -> + unit -> + t = "CalendarDateTime" + [@@mel.new] [@@mel.module "@internationalized/date"] end module RequiredDateTimeDuration = struct type t = t_required_date_time_duration + + external years : t -> int = "years" + [@@mel.get] (** The number of years to add or subtract. *) - external years : t -> int = "years" [@@mel.get] + + external months : t -> int = "months" + [@@mel.get] (** The number of months to add or subtract. *) - external months : t -> int = "months" [@@mel.get] + + external weeks : t -> int = "weeks" + [@@mel.get] (** The number of weeks to add or subtract. *) - external weeks : t -> int = "weeks" [@@mel.get] + + external days : t -> int = "days" + [@@mel.get] (** The number of days to add or subtract. *) - external days : t -> int = "days" [@@mel.get] + + external hours : t -> int = "hours" + [@@mel.get] (** The number of hours to add or subtract. *) - external hours : t -> int = "hours" [@@mel.get] + + external minutes : t -> int = "minutes" + [@@mel.get] (** The number of minutes to add or subtract. *) - external minutes : t -> int = "minutes" [@@mel.get] + + external seconds : t -> int = "seconds" + [@@mel.get] (** The number of seconds to add or subtract. *) - external seconds : t -> int = "seconds" [@@mel.get] + + external milliseconds : t -> int = "milliseconds" + [@@mel.get] (** The number of milliseconds to add or subtract. *) - external milliseconds : t -> int = "milliseconds" [@@mel.get] - external make : years:(int [@mel.as "years"]) -> months:(int [@mel.as "months"]) -> weeks:(int [@mel.as "weeks"]) -> days:(int [@mel.as "days"]) -> hours:(int [@mel.as "hours"]) -> minutes:(int [@mel.as "minutes"]) -> seconds:(int [@mel.as "seconds"]) -> milliseconds:(int [@mel.as "milliseconds"]) -> unit -> t = "" [@@mel.obj] + + external make : + years:(int[@mel.as "years"]) -> + months:(int[@mel.as "months"]) -> + weeks:(int[@mel.as "weeks"]) -> + days:(int[@mel.as "days"]) -> + hours:(int[@mel.as "hours"]) -> + minutes:(int[@mel.as "minutes"]) -> + seconds:(int[@mel.as "seconds"]) -> + milliseconds:(int[@mel.as "milliseconds"]) -> + unit -> + t = "" + [@@mel.obj] end (** A Time represents a clock time without any date components. *) module Time = struct type t = t_time + + external hour : t -> int = "hour" + [@@mel.get] (** The hour, numbered from 0 to 23. *) - external hour : t -> int = "hour" [@@mel.get] + + external minute : t -> int = "minute" + [@@mel.get] (** The minute in the hour. *) - external minute : t -> int = "minute" [@@mel.get] + + external second : t -> int = "second" + [@@mel.get] (** The second in the minute. *) - external second : t -> int = "second" [@@mel.get] + + external millisecond : t -> int = "millisecond" + [@@mel.get] (** The millisecond in the second. *) - external millisecond : t -> int = "millisecond" [@@mel.get] + external copy : t -> unit -> t_time = "copy" [@@mel.send] external add : t -> t_time_duration -> t_time = "add" [@@mel.send] external subtract : t -> t_time_duration -> t_time = "subtract" [@@mel.send] external set : t -> t_time_fields -> t_time = "set" [@@mel.send] - external cycle : t -> [ `hour | `minute | `second | `millisecond ] -> int -> ?options:t_cycle_time_options -> unit -> t_time = "cycle" [@@mel.send] + + external cycle : + t -> + [ `hour | `millisecond | `minute | `second ] -> + int -> + ?options:t_cycle_time_options -> + unit -> + t_time = "cycle" + [@@mel.send] + external to_string : t -> unit -> string = "toString" [@@mel.send] - external compare : t -> [< `calendar_date_time | `time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t = "Time" [@@mel.new] [@@mel.module "@internationalized/date"] + + external compare : + t -> [< `calendar_date_time | `time | `zoned_date_time ] t_value -> float + = "compare" + [@@mel.send] + + external make : + ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t + = "Time" + [@@mel.new] [@@mel.module "@internationalized/date"] end module DateTimeFormatPart = struct type t = t_date_time_format_part - external type_ : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] = "type" [@@mel.get] + + external type_ : + t -> + [ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] = "type" + [@@mel.get] + external value : t -> string = "value" [@@mel.get] - external make : type_:([ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] [@mel.as "type"]) -> value:(string [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] + + external make : + type_: + ([ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] + [@mel.as "type"]) -> + value:(string[@mel.as "value"]) -> + unit -> + t = "" + [@@mel.obj] end module DateRangeFormatPart = struct type t = t_date_range_format_part - external source : t -> [ `startRange | `endRange | `shared ] = "source" [@@mel.get] - external type_ : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] = "type" [@@mel.get] + + external source : t -> [ `endRange | `shared | `startRange ] = "source" + [@@mel.get] + + external type_ : + t -> + [ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] = "type" + [@@mel.get] + external value : t -> string = "value" [@@mel.get] - external make : source:([ `startRange | `endRange | `shared ] [@mel.as "source"]) -> type_:([ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] [@mel.as "type"]) -> value:(string [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] + + external make : + source:([ `endRange | `shared | `startRange ][@mel.as "source"]) -> + type_: + ([ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] + [@mel.as "type"]) -> + value:(string[@mel.as "value"]) -> + unit -> + t = "" + [@@mel.obj] end module ResolvedDateTimeFormatOptions = struct type t = t_resolved_date_time_format_options + external locale : t -> string = "locale" [@@mel.get] external calendar : t -> string = "calendar" [@@mel.get] external numbering_system : t -> string = "numberingSystem" [@@mel.get] @@ -270,64 +614,188 @@ module ResolvedDateTimeFormatOptions = struct external second : t -> string option = "second" [@@mel.get] external time_zone_name : t -> string option = "timeZoneName" [@@mel.get] external format_matcher : t -> string option = "formatMatcher" [@@mel.get] - external date_style : t -> [ `full | `long | `medium | `short ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `full | `long | `medium | `short ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] - external fractional_second_digits : t -> int option = "fractionalSecondDigits" [@@mel.get] - external make : locale:(string [@mel.as "locale"]) -> calendar:(string [@mel.as "calendar"]) -> numbering_system:(string [@mel.as "numberingSystem"]) -> time_zone:(string [@mel.as "timeZone"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?weekday:(string [@mel.as "weekday"]) -> ?era:(string [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:(string [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?date_style:([ `full | `long | `medium | `short ] [@mel.as "dateStyle"]) -> ?time_style:([ `full | `long | `medium | `short ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?fractional_second_digits:(int [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + + external fractional_second_digits : t -> int option = "fractionalSecondDigits" + [@@mel.get] + + external make : + locale:(string[@mel.as "locale"]) -> + calendar:(string[@mel.as "calendar"]) -> + numbering_system:(string[@mel.as "numberingSystem"]) -> + time_zone:(string[@mel.as "timeZone"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?weekday:(string[@mel.as "weekday"]) -> + ?era:(string[@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name:(string[@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?fractional_second_digits:(int[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end module DateTimeFormatOptions = struct type t = t_date_time_format_options + external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] - external weekday : t -> [ `long | `short | `narrow ] option = "weekday" [@@mel.get] - external era : t -> [ `long | `short | `narrow ] option = "era" [@@mel.get] + + external weekday : t -> [ `long | `narrow | `short ] option = "weekday" + [@@mel.get] + + external era : t -> [ `long | `narrow | `short ] option = "era" [@@mel.get] external year : t -> string option = "year" [@@mel.get] external month : t -> string option = "month" [@@mel.get] external day : t -> string option = "day" [@@mel.get] external hour : t -> string option = "hour" [@@mel.get] external minute : t -> string option = "minute" [@@mel.get] external second : t -> string option = "second" [@@mel.get] - external time_zone_name : t -> [ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] option = "timeZoneName" [@@mel.get] + + external time_zone_name : + t -> + [ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + option = "timeZoneName" + [@@mel.get] + external format_matcher : t -> string option = "formatMatcher" [@@mel.get] external hour12 : t -> bool option = "hour12" [@@mel.get] external time_zone : t -> string option = "timeZone" [@@mel.get] external calendar : t -> string option = "calendar" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + external numbering_system : t -> string option = "numberingSystem" [@@mel.get] - external date_style : t -> [ `full | `long | `medium | `short ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `full | `long | `medium | `short ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external fractional_second_digits : t -> int option = "fractionalSecondDigits" [@@mel.get] - external make : ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?weekday:([ `long | `short | `narrow ] [@mel.as "weekday"]) -> ?era:([ `long | `short | `narrow ] [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:([ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?time_zone:(string [@mel.as "timeZone"]) -> ?calendar:(string [@mel.as "calendar"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?numbering_system:(string [@mel.as "numberingSystem"]) -> ?date_style:([ `full | `long | `medium | `short ] [@mel.as "dateStyle"]) -> ?time_style:([ `full | `long | `medium | `short ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?fractional_second_digits:(int [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external fractional_second_digits : t -> int option = "fractionalSecondDigits" + [@@mel.get] + + external make : + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?weekday:([ `long | `narrow | `short ][@mel.as "weekday"]) -> + ?era:([ `long | `narrow | `short ][@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name: + ([ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + [@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?time_zone:(string[@mel.as "timeZone"]) -> + ?calendar:(string[@mel.as "calendar"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?numbering_system:(string[@mel.as "numberingSystem"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?fractional_second_digits:(int[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end -(** Represents an amount of time with both date and time components, for use when performing - arithmetic. *) +(** Represents an amount of time with both date and time components, for use + when performing arithmetic. *) module DateTimeDuration = struct type t = t_date_time_duration + + external years : t -> int option = "years" + [@@mel.get] (** The number of years to add or subtract. *) - external years : t -> int option = "years" [@@mel.get] + + external months : t -> int option = "months" + [@@mel.get] (** The number of months to add or subtract. *) - external months : t -> int option = "months" [@@mel.get] + + external weeks : t -> int option = "weeks" + [@@mel.get] (** The number of weeks to add or subtract. *) - external weeks : t -> int option = "weeks" [@@mel.get] + + external days : t -> int option = "days" + [@@mel.get] (** The number of days to add or subtract. *) - external days : t -> int option = "days" [@@mel.get] + + external hours : t -> int option = "hours" + [@@mel.get] (** The number of hours to add or subtract. *) - external hours : t -> int option = "hours" [@@mel.get] + + external minutes : t -> int option = "minutes" + [@@mel.get] (** The number of minutes to add or subtract. *) - external minutes : t -> int option = "minutes" [@@mel.get] + + external seconds : t -> int option = "seconds" + [@@mel.get] (** The number of seconds to add or subtract. *) - external seconds : t -> int option = "seconds" [@@mel.get] + + external milliseconds : t -> int option = "milliseconds" + [@@mel.get] (** The number of milliseconds to add or subtract. *) - external milliseconds : t -> int option = "milliseconds" [@@mel.get] - external make : ?years:(int [@mel.as "years"]) -> ?months:(int [@mel.as "months"]) -> ?weeks:(int [@mel.as "weeks"]) -> ?days:(int [@mel.as "days"]) -> ?hours:(int [@mel.as "hours"]) -> ?minutes:(int [@mel.as "minutes"]) -> ?seconds:(int [@mel.as "seconds"]) -> ?milliseconds:(int [@mel.as "milliseconds"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?years:(int[@mel.as "years"]) -> + ?months:(int[@mel.as "months"]) -> + ?weeks:(int[@mel.as "weeks"]) -> + ?days:(int[@mel.as "days"]) -> + ?hours:(int[@mel.as "hours"]) -> + ?minutes:(int[@mel.as "minutes"]) -> + ?seconds:(int[@mel.as "seconds"]) -> + ?milliseconds:(int[@mel.as "milliseconds"]) -> + unit -> + t = "" + [@@mel.obj] end -module ZonedDateTime_Set = struct - type t = t_zoned_date_time_set +module ZonedDateTime_Set_Fields = struct + type t = t_zoned_date_time_set_fields + external era : t -> string option = "era" [@@mel.get] external year : t -> int option = "year" [@@mel.get] external month : t -> int option = "month" [@@mel.get] @@ -336,69 +804,145 @@ module ZonedDateTime_Set = struct external minute : t -> int option = "minute" [@@mel.get] external second : t -> int option = "second" [@@mel.get] external millisecond : t -> int option = "millisecond" [@@mel.get] - external make : ?era:(string [@mel.as "era"]) -> ?year:(int [@mel.as "year"]) -> ?month:(int [@mel.as "month"]) -> ?day:(int [@mel.as "day"]) -> ?hour:(int [@mel.as "hour"]) -> ?minute:(int [@mel.as "minute"]) -> ?second:(int [@mel.as "second"]) -> ?millisecond:(int [@mel.as "millisecond"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?era:(string[@mel.as "era"]) -> + ?year:(int[@mel.as "year"]) -> + ?month:(int[@mel.as "month"]) -> + ?day:(int[@mel.as "day"]) -> + ?hour:(int[@mel.as "hour"]) -> + ?minute:(int[@mel.as "minute"]) -> + ?second:(int[@mel.as "second"]) -> + ?millisecond:(int[@mel.as "millisecond"]) -> + unit -> + t = "" + [@@mel.obj] end module CycleTimeOptions = struct type t = t_cycle_time_options - (** Whether to use 12 or 24 hour time. If 12 hour time is chosen, the resulting value - will remain in the same day period as the original value (e.g. if the value is AM, - the resulting value also be AM). *) - external hour_cycle : t -> int option = "hourCycle" [@@mel.get] + + external hour_cycle : t -> int option = "hourCycle" + [@@mel.get] + (** Whether to use 12 or 24 hour time. If 12 hour time is chosen, the + resulting value will remain in the same day period as the original value + (e.g. if the value is AM, the resulting value also be AM). *) + + external round : t -> bool option = "round" + [@@mel.get] (** Whether to round the field value to the nearest interval of the amount. *) - external round : t -> bool option = "round" [@@mel.get] - external make : ?hour_cycle:(int [@mel.as "hourCycle"]) -> ?round:(bool [@mel.as "round"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hour_cycle:(int[@mel.as "hourCycle"]) -> + ?round:(bool[@mel.as "round"]) -> + unit -> + t = "" + [@@mel.obj] end -(** Represents an amount of time in calendar-specific units, for use when performing arithmetic. *) +(** Represents an amount of time in calendar-specific units, for use when + performing arithmetic. *) module DateDuration = struct type t = t_date_duration + + external years : t -> int option = "years" + [@@mel.get] (** The number of years to add or subtract. *) - external years : t -> int option = "years" [@@mel.get] + + external months : t -> int option = "months" + [@@mel.get] (** The number of months to add or subtract. *) - external months : t -> int option = "months" [@@mel.get] + + external weeks : t -> int option = "weeks" + [@@mel.get] (** The number of weeks to add or subtract. *) - external weeks : t -> int option = "weeks" [@@mel.get] + + external days : t -> int option = "days" + [@@mel.get] (** The number of days to add or subtract. *) - external days : t -> int option = "days" [@@mel.get] - external make : ?years:(int [@mel.as "years"]) -> ?months:(int [@mel.as "months"]) -> ?weeks:(int [@mel.as "weeks"]) -> ?days:(int [@mel.as "days"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?years:(int[@mel.as "years"]) -> + ?months:(int[@mel.as "months"]) -> + ?weeks:(int[@mel.as "weeks"]) -> + ?days:(int[@mel.as "days"]) -> + unit -> + t = "" + [@@mel.obj] end module DateFields = struct type t = t_date_fields + external era : t -> string option = "era" [@@mel.get] external year : t -> int option = "year" [@@mel.get] external month : t -> int option = "month" [@@mel.get] external day : t -> int option = "day" [@@mel.get] - external make : ?era:(string [@mel.as "era"]) -> ?year:(int [@mel.as "year"]) -> ?month:(int [@mel.as "month"]) -> ?day:(int [@mel.as "day"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?era:(string[@mel.as "era"]) -> + ?year:(int[@mel.as "year"]) -> + ?month:(int[@mel.as "month"]) -> + ?day:(int[@mel.as "day"]) -> + unit -> + t = "" + [@@mel.obj] end module CycleOptions = struct type t = t_cycle_options + + external round : t -> bool option = "round" + [@@mel.get] (** Whether to round the field value to the nearest interval of the amount. *) - external round : t -> bool option = "round" [@@mel.get] - external make : ?round:(bool [@mel.as "round"]) -> unit -> t = "" [@@mel.obj] + + external make : ?round:(bool[@mel.as "round"]) -> unit -> t = "" [@@mel.obj] end (** Represents an amount of time, for use whe performing arithmetic. *) module TimeDuration = struct type t = t_time_duration + + external hours : t -> int option = "hours" + [@@mel.get] (** The number of hours to add or subtract. *) - external hours : t -> int option = "hours" [@@mel.get] + + external minutes : t -> int option = "minutes" + [@@mel.get] (** The number of minutes to add or subtract. *) - external minutes : t -> int option = "minutes" [@@mel.get] + + external seconds : t -> int option = "seconds" + [@@mel.get] (** The number of seconds to add or subtract. *) - external seconds : t -> int option = "seconds" [@@mel.get] + + external milliseconds : t -> int option = "milliseconds" + [@@mel.get] (** The number of milliseconds to add or subtract. *) - external milliseconds : t -> int option = "milliseconds" [@@mel.get] - external make : ?hours:(int [@mel.as "hours"]) -> ?minutes:(int [@mel.as "minutes"]) -> ?seconds:(int [@mel.as "seconds"]) -> ?milliseconds:(int [@mel.as "milliseconds"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hours:(int[@mel.as "hours"]) -> + ?minutes:(int[@mel.as "minutes"]) -> + ?seconds:(int[@mel.as "seconds"]) -> + ?milliseconds:(int[@mel.as "milliseconds"]) -> + unit -> + t = "" + [@@mel.obj] end module TimeFields = struct type t = t_time_fields + external hour : t -> int option = "hour" [@@mel.get] external minute : t -> int option = "minute" [@@mel.get] external second : t -> int option = "second" [@@mel.get] external millisecond : t -> int option = "millisecond" [@@mel.get] - external make : ?hour:(int [@mel.as "hour"]) -> ?minute:(int [@mel.as "minute"]) -> ?second:(int [@mel.as "second"]) -> ?millisecond:(int [@mel.as "millisecond"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hour:(int[@mel.as "hour"]) -> + ?minute:(int[@mel.as "minute"]) -> + ?second:(int[@mel.as "second"]) -> + ?millisecond:(int[@mel.as "millisecond"]) -> + unit -> + t = "" + [@@mel.obj] end diff --git a/internationalized_date/types.mli b/internationalized_date/types.mli index 499529ba..a07fc77c 100644 --- a/internationalized_date/types.mli +++ b/internationalized_date/types.mli @@ -7,7 +7,6 @@ (* Members of different JavaScript kinds, each as it is. *) type ('a, 'b) either type 'k t_value - type t_date_formatter type t_calendar type t_zoned_date_time = [ `zoned_date_time ] t_value @@ -20,7 +19,7 @@ type t_date_range_format_part type t_resolved_date_time_format_options type t_date_time_format_options type t_date_time_duration -type t_zoned_date_time_set +type t_zoned_date_time_set_fields type t_cycle_time_options type t_date_duration type t_date_fields @@ -35,214 +34,568 @@ module Either : sig external right : 'b -> ('a, 'b) t = "%identity" end -(* A value of one of CalendarDate, CalendarDateTime, Time, ZonedDateTime, its kind - the class it is of: what a union of them, or an interface they - satisfy, takes, as the kinds it names. *) +(* A value of one of CalendarDate, CalendarDateTime, Time, ZonedDateTime, its kind the class it is of: what a union of them, or an interface they satisfy, takes, as the kinds it names. *) module Value : sig type 'k t = 'k t_value end -(** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and polyfills new features. *) +(** A wrapper around Intl.DateTimeFormat that fixes various browser bugs, and + polyfills new features. *) module DateFormatter : sig type t = t_date_formatter + external format : t -> Js.Date.t -> string = "format" [@@mel.send] - external format_to_parts : t -> Js.Date.t -> t_date_time_format_part array = "formatToParts" [@@mel.send] - external format_range : t -> Js.Date.t -> Js.Date.t -> string = "formatRange" [@@mel.send] - external format_range_to_parts : t -> Js.Date.t -> Js.Date.t -> t_date_range_format_part array = "formatRangeToParts" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_date_time_format_options = "resolvedOptions" [@@mel.send] - external make : string -> ?options:t_date_time_format_options -> unit -> t = "DateFormatter" [@@mel.new] [@@mel.module "@internationalized/date"] + + external format_to_parts : t -> Js.Date.t -> t_date_time_format_part array + = "formatToParts" + [@@mel.send] + + external format_range : t -> Js.Date.t -> Js.Date.t -> string = "formatRange" + [@@mel.send] + + external format_range_to_parts : + t -> Js.Date.t -> Js.Date.t -> t_date_range_format_part array + = "formatRangeToParts" + [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_date_time_format_options + = "resolvedOptions" + [@@mel.send] + + external make : string -> ?options:t_date_time_format_options -> unit -> t + = "DateFormatter" + [@@mel.new] [@@mel.module "@internationalized/date"] end (** The Calendar interface represents a calendar system, including information - about how days, months, years, and eras are organized, and methods to perform - arithmetic on dates. *) + about how days, months, years, and eras are organized, and methods to + perform arithmetic on dates. *) module Calendar : sig type t = t_calendar + + external identifier : t -> string = "identifier" + [@@mel.get] (** A string identifier for the calendar, as defined by Unicode CLDR. See - \[MDN\](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types). *) - external identifier : t -> string = "identifier" [@@mel.get] - external from_julian_day : t -> int -> t_calendar_date = "fromJulianDay" [@@mel.send] - external to_julian_day : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "toJulianDay" [@@mel.send] - external get_days_in_month : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "getDaysInMonth" [@@mel.send] - external get_months_in_year : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "getMonthsInYear" [@@mel.send] - external get_years_in_era : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> int = "getYearsInEra" [@@mel.send] + \[MDN\](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/supportedValuesOf#supported_calendar_types). + *) + + external from_julian_day : t -> int -> t_calendar_date = "fromJulianDay" + [@@mel.send] + + external to_julian_day : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "toJulianDay" + [@@mel.send] + + external get_days_in_month : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "getDaysInMonth" + [@@mel.send] + + external get_months_in_year : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "getMonthsInYear" + [@@mel.send] + + external get_years_in_era : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + int = "getYearsInEra" + [@@mel.send] + external get_eras : t -> unit -> string array = "getEras" [@@mel.send] - external get_maximum_months_in_year : t -> unit -> int = "getMaximumMonthsInYear" [@@mel.send] - external get_maximum_days_in_month : t -> unit -> int = "getMaximumDaysInMonth" [@@mel.send] + + external get_maximum_months_in_year : t -> unit -> int + = "getMaximumMonthsInYear" + [@@mel.send] + + external get_maximum_days_in_month : t -> unit -> int + = "getMaximumDaysInMonth" + [@@mel.send] end -(** A ZonedDateTime represents a date and time in a specific time zone and calendar system. *) +(** A ZonedDateTime represents a date and time in a specific time zone and + calendar system. *) module ZonedDateTime : sig type t = t_zoned_date_time + + external calendar : t -> t_calendar = "calendar" + [@@mel.get] (** The calendar system associated with this date, e.g. Gregorian. *) - external calendar : t -> t_calendar = "calendar" [@@mel.get] + + external era : t -> string = "era" + [@@mel.get] (** The calendar era for this date, e.g. "BC" or "AD". *) - external era : t -> string = "era" [@@mel.get] + + external year : t -> int = "year" + [@@mel.get] (** The year of this date within the era. *) - external year : t -> int = "year" [@@mel.get] - (** The month number within the year. Note that some calendar systems such as Hebrew - may have a variable number of months per year. Therefore, month numbers may not - always correspond to the same month names in different years. *) - external month : t -> int = "month" [@@mel.get] + + external month : t -> int = "month" + [@@mel.get] + (** The month number within the year. Note that some calendar systems such as + Hebrew may have a variable number of months per year. Therefore, month + numbers may not always correspond to the same month names in different + years. *) + + external day : t -> int = "day" + [@@mel.get] (** The day number within the month. *) - external day : t -> int = "day" [@@mel.get] + + external hour : t -> int = "hour" + [@@mel.get] (** The hour in the day, numbered from 0 to 23. *) - external hour : t -> int = "hour" [@@mel.get] + + external minute : t -> int = "minute" + [@@mel.get] (** The minute in the hour. *) - external minute : t -> int = "minute" [@@mel.get] + + external second : t -> int = "second" + [@@mel.get] (** The second in the minute. *) - external second : t -> int = "second" [@@mel.get] + + external millisecond : t -> int = "millisecond" + [@@mel.get] (** The millisecond in the second. *) - external millisecond : t -> int = "millisecond" [@@mel.get] - (** The IANA time zone identifier that this date and time is represented in. *) - external time_zone : t -> string = "timeZone" [@@mel.get] + + external time_zone : t -> string = "timeZone" + [@@mel.get] + (** The IANA time zone identifier that this date and time is represented in. + *) + + external offset : t -> int = "offset" + [@@mel.get] (** The UTC offset for this time, in milliseconds. *) - external offset : t -> int = "offset" [@@mel.get] + external copy : t -> unit -> t_zoned_date_time = "copy" [@@mel.send] - external add : t -> t_date_time_duration -> t_zoned_date_time = "add" [@@mel.send] - external subtract : t -> t_date_time_duration -> t_zoned_date_time = "subtract" [@@mel.send] - (** Returns a new `ZonedDateTime` with the given fields set to the provided values. Other fields - will be constrained accordingly. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) - val set : t -> t_zoned_date_time_set -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> t_zoned_date_time - val set_opt : t -> t_zoned_date_time_set -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> t_zoned_date_time option - external cycle : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `millisecond ] -> int -> ?options:t_cycle_time_options -> unit -> t_zoned_date_time = "cycle" [@@mel.send] + + external add : t -> t_date_time_duration -> t_zoned_date_time = "add" + [@@mel.send] + + external subtract : t -> t_date_time_duration -> t_zoned_date_time + = "subtract" + [@@mel.send] + + val set : + t -> + t_zoned_date_time_set_fields -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + t_zoned_date_time + (** Returns a new `ZonedDateTime` with the given fields set to the provided + values. Other fields will be constrained accordingly. + + Raises [Invalid_argument] with \@internationalized/date's message, where + it throws. *) + + val set_opt : + t -> + t_zoned_date_time_set_fields -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + t_zoned_date_time option + + external cycle : + t -> + [ `day | `era | `hour | `millisecond | `minute | `month | `second | `year ] -> + int -> + ?options:t_cycle_time_options -> + unit -> + t_zoned_date_time = "cycle" + [@@mel.send] + external to_date : t -> unit -> Js.Date.t = "toDate" [@@mel.send] external to_string : t -> unit -> string = "toString" [@@mel.send] - external to_absolute_string : t -> unit -> string = "toAbsoluteString" [@@mel.send] - external compare : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : int -> int -> int -> string -> int -> ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t = "ZonedDateTime" [@@mel.new] [@@mel.module "@internationalized/date"] + + external to_absolute_string : t -> unit -> string = "toAbsoluteString" + [@@mel.send] + + external compare : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + float = "compare" + [@@mel.send] + + external make : + int -> + int -> + int -> + string -> + int -> + ?hour:int -> + ?minute:int -> + ?second:int -> + ?millisecond:int -> + unit -> + t = "ZonedDateTime" + [@@mel.new] [@@mel.module "@internationalized/date"] end -(** A CalendarDate represents a date without any time components in a specific calendar system. *) +(** A CalendarDate represents a date without any time components in a specific + calendar system. *) module CalendarDate : sig type t = t_calendar_date + + external calendar : t -> t_calendar = "calendar" + [@@mel.get] (** The calendar system associated with this date, e.g. Gregorian. *) - external calendar : t -> t_calendar = "calendar" [@@mel.get] + + external era : t -> string = "era" + [@@mel.get] (** The calendar era for this date, e.g. "BC" or "AD". *) - external era : t -> string = "era" [@@mel.get] + + external year : t -> int = "year" + [@@mel.get] (** The year of this date within the era. *) - external year : t -> int = "year" [@@mel.get] - (** The month number within the year. Note that some calendar systems such as Hebrew - may have a variable number of months per year. Therefore, month numbers may not - always correspond to the same month names in different years. *) - external month : t -> int = "month" [@@mel.get] + + external month : t -> int = "month" + [@@mel.get] + (** The month number within the year. Note that some calendar systems such as + Hebrew may have a variable number of months per year. Therefore, month + numbers may not always correspond to the same month names in different + years. *) + + external day : t -> int = "day" + [@@mel.get] (** The day number within the month. *) - external day : t -> int = "day" [@@mel.get] + external copy : t -> unit -> t_calendar_date = "copy" [@@mel.send] external add : t -> t_date_duration -> t_calendar_date = "add" [@@mel.send] - external subtract : t -> t_date_duration -> t_calendar_date = "subtract" [@@mel.send] + + external subtract : t -> t_date_duration -> t_calendar_date = "subtract" + [@@mel.send] + external set : t -> t_date_fields -> t_calendar_date = "set" [@@mel.send] - external cycle : t -> [ `era | `year | `month | `day ] -> int -> ?options:t_cycle_options -> unit -> t_calendar_date = "cycle" [@@mel.send] - (** Converts the date to a native JavaScript Date object, with the time set to midnight in the - given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) + + external cycle : + t -> + [ `day | `era | `month | `year ] -> + int -> + ?options:t_cycle_options -> + unit -> + t_calendar_date = "cycle" + [@@mel.send] + val to_date : t -> string -> Js.Date.t + (** Converts the date to a native JavaScript Date object, with the time set to + midnight in the given time zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where + it throws. *) + val to_date_opt : t -> string -> Js.Date.t option external to_string : t -> unit -> string = "toString" [@@mel.send] - external compare : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : int -> int -> int -> t = "CalendarDate" [@@mel.new] [@@mel.module "@internationalized/date"] + + external compare : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + float = "compare" + [@@mel.send] + + external make : int -> int -> int -> t = "CalendarDate" + [@@mel.new] [@@mel.module "@internationalized/date"] end -(** A CalendarDateTime represents a date and time without a time zone, in a specific calendar system. *) +(** A CalendarDateTime represents a date and time without a time zone, in a + specific calendar system. *) module CalendarDateTime : sig type t = t_calendar_date_time + + external calendar : t -> t_calendar = "calendar" + [@@mel.get] (** The calendar system associated with this date, e.g. Gregorian. *) - external calendar : t -> t_calendar = "calendar" [@@mel.get] + + external era : t -> string = "era" + [@@mel.get] (** The calendar era for this date, e.g. "BC" or "AD". *) - external era : t -> string = "era" [@@mel.get] + + external year : t -> int = "year" + [@@mel.get] (** The year of this date within the era. *) - external year : t -> int = "year" [@@mel.get] - (** The month number within the year. Note that some calendar systems such as Hebrew - may have a variable number of months per year. Therefore, month numbers may not - always correspond to the same month names in different years. *) - external month : t -> int = "month" [@@mel.get] + + external month : t -> int = "month" + [@@mel.get] + (** The month number within the year. Note that some calendar systems such as + Hebrew may have a variable number of months per year. Therefore, month + numbers may not always correspond to the same month names in different + years. *) + + external day : t -> int = "day" + [@@mel.get] (** The day number within the month. *) - external day : t -> int = "day" [@@mel.get] + + external hour : t -> int = "hour" + [@@mel.get] (** The hour in the day, numbered from 0 to 23. *) - external hour : t -> int = "hour" [@@mel.get] + + external minute : t -> int = "minute" + [@@mel.get] (** The minute in the hour. *) - external minute : t -> int = "minute" [@@mel.get] + + external second : t -> int = "second" + [@@mel.get] (** The second in the minute. *) - external second : t -> int = "second" [@@mel.get] + + external millisecond : t -> int = "millisecond" + [@@mel.get] (** The millisecond in the second. *) - external millisecond : t -> int = "millisecond" [@@mel.get] + external copy : t -> unit -> t_calendar_date_time = "copy" [@@mel.send] - external add : t -> t_date_time_duration -> t_calendar_date_time = "add" [@@mel.send] - external subtract : t -> t_date_time_duration -> t_calendar_date_time = "subtract" [@@mel.send] - external set : t -> t_zoned_date_time_set -> t_calendar_date_time = "set" [@@mel.send] - external cycle : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `millisecond ] -> int -> ?options:t_cycle_time_options -> unit -> t_calendar_date_time = "cycle" [@@mel.send] - (** Converts the date to a native JavaScript Date object in the given time zone. - - Raises [Invalid_argument] with \@internationalized/date's message, where it throws. *) - val to_date : t -> string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Js.Date.t - val to_date_opt : t -> string -> ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> unit -> Js.Date.t option + + external add : t -> t_date_time_duration -> t_calendar_date_time = "add" + [@@mel.send] + + external subtract : t -> t_date_time_duration -> t_calendar_date_time + = "subtract" + [@@mel.send] + + external set : t -> t_zoned_date_time_set_fields -> t_calendar_date_time + = "set" + [@@mel.send] + + external cycle : + t -> + [ `day | `era | `hour | `millisecond | `minute | `month | `second | `year ] -> + int -> + ?options:t_cycle_time_options -> + unit -> + t_calendar_date_time = "cycle" + [@@mel.send] + + val to_date : + t -> + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Js.Date.t + (** Converts the date to a native JavaScript Date object in the given time + zone. + + Raises [Invalid_argument] with \@internationalized/date's message, where + it throws. *) + + val to_date_opt : + t -> + string -> + ?disambiguation:[ `compatible | `earlier | `later | `reject ] -> + unit -> + Js.Date.t option + external to_string : t -> unit -> string = "toString" [@@mel.send] - external compare : t -> [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : int -> int -> int -> ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t = "CalendarDateTime" [@@mel.new] [@@mel.module "@internationalized/date"] + + external compare : + t -> + [< `calendar_date | `calendar_date_time | `zoned_date_time ] t_value -> + float = "compare" + [@@mel.send] + + external make : + int -> + int -> + int -> + ?hour:int -> + ?minute:int -> + ?second:int -> + ?millisecond:int -> + unit -> + t = "CalendarDateTime" + [@@mel.new] [@@mel.module "@internationalized/date"] end module RequiredDateTimeDuration : sig type t = t_required_date_time_duration + + external years : t -> int = "years" + [@@mel.get] (** The number of years to add or subtract. *) - external years : t -> int = "years" [@@mel.get] + + external months : t -> int = "months" + [@@mel.get] (** The number of months to add or subtract. *) - external months : t -> int = "months" [@@mel.get] + + external weeks : t -> int = "weeks" + [@@mel.get] (** The number of weeks to add or subtract. *) - external weeks : t -> int = "weeks" [@@mel.get] + + external days : t -> int = "days" + [@@mel.get] (** The number of days to add or subtract. *) - external days : t -> int = "days" [@@mel.get] + + external hours : t -> int = "hours" + [@@mel.get] (** The number of hours to add or subtract. *) - external hours : t -> int = "hours" [@@mel.get] + + external minutes : t -> int = "minutes" + [@@mel.get] (** The number of minutes to add or subtract. *) - external minutes : t -> int = "minutes" [@@mel.get] + + external seconds : t -> int = "seconds" + [@@mel.get] (** The number of seconds to add or subtract. *) - external seconds : t -> int = "seconds" [@@mel.get] + + external milliseconds : t -> int = "milliseconds" + [@@mel.get] (** The number of milliseconds to add or subtract. *) - external milliseconds : t -> int = "milliseconds" [@@mel.get] - external make : years:(int [@mel.as "years"]) -> months:(int [@mel.as "months"]) -> weeks:(int [@mel.as "weeks"]) -> days:(int [@mel.as "days"]) -> hours:(int [@mel.as "hours"]) -> minutes:(int [@mel.as "minutes"]) -> seconds:(int [@mel.as "seconds"]) -> milliseconds:(int [@mel.as "milliseconds"]) -> unit -> t = "" [@@mel.obj] + + external make : + years:(int[@mel.as "years"]) -> + months:(int[@mel.as "months"]) -> + weeks:(int[@mel.as "weeks"]) -> + days:(int[@mel.as "days"]) -> + hours:(int[@mel.as "hours"]) -> + minutes:(int[@mel.as "minutes"]) -> + seconds:(int[@mel.as "seconds"]) -> + milliseconds:(int[@mel.as "milliseconds"]) -> + unit -> + t = "" + [@@mel.obj] end (** A Time represents a clock time without any date components. *) module Time : sig type t = t_time + + external hour : t -> int = "hour" + [@@mel.get] (** The hour, numbered from 0 to 23. *) - external hour : t -> int = "hour" [@@mel.get] + + external minute : t -> int = "minute" + [@@mel.get] (** The minute in the hour. *) - external minute : t -> int = "minute" [@@mel.get] + + external second : t -> int = "second" + [@@mel.get] (** The second in the minute. *) - external second : t -> int = "second" [@@mel.get] + + external millisecond : t -> int = "millisecond" + [@@mel.get] (** The millisecond in the second. *) - external millisecond : t -> int = "millisecond" [@@mel.get] + external copy : t -> unit -> t_time = "copy" [@@mel.send] external add : t -> t_time_duration -> t_time = "add" [@@mel.send] external subtract : t -> t_time_duration -> t_time = "subtract" [@@mel.send] external set : t -> t_time_fields -> t_time = "set" [@@mel.send] - external cycle : t -> [ `hour | `minute | `second | `millisecond ] -> int -> ?options:t_cycle_time_options -> unit -> t_time = "cycle" [@@mel.send] + + external cycle : + t -> + [ `hour | `millisecond | `minute | `second ] -> + int -> + ?options:t_cycle_time_options -> + unit -> + t_time = "cycle" + [@@mel.send] + external to_string : t -> unit -> string = "toString" [@@mel.send] - external compare : t -> [< `calendar_date_time | `time | `zoned_date_time ] t_value -> float = "compare" [@@mel.send] - external make : ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t = "Time" [@@mel.new] [@@mel.module "@internationalized/date"] + + external compare : + t -> [< `calendar_date_time | `time | `zoned_date_time ] t_value -> float + = "compare" + [@@mel.send] + + external make : + ?hour:int -> ?minute:int -> ?second:int -> ?millisecond:int -> unit -> t + = "Time" + [@@mel.new] [@@mel.module "@internationalized/date"] end module DateTimeFormatPart : sig type t = t_date_time_format_part - external type_ : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] = "type" [@@mel.get] + + external type_ : + t -> + [ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] = "type" + [@@mel.get] + external value : t -> string = "value" [@@mel.get] - external make : type_:([ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] [@mel.as "type"]) -> value:(string [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] + + external make : + type_: + ([ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] + [@mel.as "type"]) -> + value:(string[@mel.as "value"]) -> + unit -> + t = "" + [@@mel.obj] end module DateRangeFormatPart : sig type t = t_date_range_format_part - external source : t -> [ `startRange | `endRange | `shared ] = "source" [@@mel.get] - external type_ : t -> [ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] = "type" [@@mel.get] + + external source : t -> [ `endRange | `shared | `startRange ] = "source" + [@@mel.get] + + external type_ : + t -> + [ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] = "type" + [@@mel.get] + external value : t -> string = "value" [@@mel.get] - external make : source:([ `startRange | `endRange | `shared ] [@mel.as "source"]) -> type_:([ `era | `year | `month | `day | `hour | `minute | `second | `dayPeriod | `literal | `timeZoneName | `weekday | `unknown | `fractionalSecond ] [@mel.as "type"]) -> value:(string [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] + + external make : + source:([ `endRange | `shared | `startRange ][@mel.as "source"]) -> + type_: + ([ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] + [@mel.as "type"]) -> + value:(string[@mel.as "value"]) -> + unit -> + t = "" + [@@mel.obj] end module ResolvedDateTimeFormatOptions : sig type t = t_resolved_date_time_format_options + external locale : t -> string = "locale" [@@mel.get] external calendar : t -> string = "calendar" [@@mel.get] external numbering_system : t -> string = "numberingSystem" [@@mel.get] @@ -258,64 +611,188 @@ module ResolvedDateTimeFormatOptions : sig external second : t -> string option = "second" [@@mel.get] external time_zone_name : t -> string option = "timeZoneName" [@@mel.get] external format_matcher : t -> string option = "formatMatcher" [@@mel.get] - external date_style : t -> [ `full | `long | `medium | `short ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `full | `long | `medium | `short ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] - external fractional_second_digits : t -> int option = "fractionalSecondDigits" [@@mel.get] - external make : locale:(string [@mel.as "locale"]) -> calendar:(string [@mel.as "calendar"]) -> numbering_system:(string [@mel.as "numberingSystem"]) -> time_zone:(string [@mel.as "timeZone"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?weekday:(string [@mel.as "weekday"]) -> ?era:(string [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:(string [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?date_style:([ `full | `long | `medium | `short ] [@mel.as "dateStyle"]) -> ?time_style:([ `full | `long | `medium | `short ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?fractional_second_digits:(int [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + + external fractional_second_digits : t -> int option = "fractionalSecondDigits" + [@@mel.get] + + external make : + locale:(string[@mel.as "locale"]) -> + calendar:(string[@mel.as "calendar"]) -> + numbering_system:(string[@mel.as "numberingSystem"]) -> + time_zone:(string[@mel.as "timeZone"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?weekday:(string[@mel.as "weekday"]) -> + ?era:(string[@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name:(string[@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?fractional_second_digits:(int[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end module DateTimeFormatOptions : sig type t = t_date_time_format_options + external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] - external weekday : t -> [ `long | `short | `narrow ] option = "weekday" [@@mel.get] - external era : t -> [ `long | `short | `narrow ] option = "era" [@@mel.get] + + external weekday : t -> [ `long | `narrow | `short ] option = "weekday" + [@@mel.get] + + external era : t -> [ `long | `narrow | `short ] option = "era" [@@mel.get] external year : t -> string option = "year" [@@mel.get] external month : t -> string option = "month" [@@mel.get] external day : t -> string option = "day" [@@mel.get] external hour : t -> string option = "hour" [@@mel.get] external minute : t -> string option = "minute" [@@mel.get] external second : t -> string option = "second" [@@mel.get] - external time_zone_name : t -> [ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] option = "timeZoneName" [@@mel.get] + + external time_zone_name : + t -> + [ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + option = "timeZoneName" + [@@mel.get] + external format_matcher : t -> string option = "formatMatcher" [@@mel.get] external hour12 : t -> bool option = "hour12" [@@mel.get] external time_zone : t -> string option = "timeZone" [@@mel.get] external calendar : t -> string option = "calendar" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + external numbering_system : t -> string option = "numberingSystem" [@@mel.get] - external date_style : t -> [ `full | `long | `medium | `short ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `full | `long | `medium | `short ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external fractional_second_digits : t -> int option = "fractionalSecondDigits" [@@mel.get] - external make : ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?weekday:([ `long | `short | `narrow ] [@mel.as "weekday"]) -> ?era:([ `long | `short | `narrow ] [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:([ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?time_zone:(string [@mel.as "timeZone"]) -> ?calendar:(string [@mel.as "calendar"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?numbering_system:(string [@mel.as "numberingSystem"]) -> ?date_style:([ `full | `long | `medium | `short ] [@mel.as "dateStyle"]) -> ?time_style:([ `full | `long | `medium | `short ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?fractional_second_digits:(int [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external fractional_second_digits : t -> int option = "fractionalSecondDigits" + [@@mel.get] + + external make : + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?weekday:([ `long | `narrow | `short ][@mel.as "weekday"]) -> + ?era:([ `long | `narrow | `short ][@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name: + ([ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + [@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?time_zone:(string[@mel.as "timeZone"]) -> + ?calendar:(string[@mel.as "calendar"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?numbering_system:(string[@mel.as "numberingSystem"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?fractional_second_digits:(int[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end -(** Represents an amount of time with both date and time components, for use when performing - arithmetic. *) +(** Represents an amount of time with both date and time components, for use + when performing arithmetic. *) module DateTimeDuration : sig type t = t_date_time_duration + + external years : t -> int option = "years" + [@@mel.get] (** The number of years to add or subtract. *) - external years : t -> int option = "years" [@@mel.get] + + external months : t -> int option = "months" + [@@mel.get] (** The number of months to add or subtract. *) - external months : t -> int option = "months" [@@mel.get] + + external weeks : t -> int option = "weeks" + [@@mel.get] (** The number of weeks to add or subtract. *) - external weeks : t -> int option = "weeks" [@@mel.get] + + external days : t -> int option = "days" + [@@mel.get] (** The number of days to add or subtract. *) - external days : t -> int option = "days" [@@mel.get] + + external hours : t -> int option = "hours" + [@@mel.get] (** The number of hours to add or subtract. *) - external hours : t -> int option = "hours" [@@mel.get] + + external minutes : t -> int option = "minutes" + [@@mel.get] (** The number of minutes to add or subtract. *) - external minutes : t -> int option = "minutes" [@@mel.get] + + external seconds : t -> int option = "seconds" + [@@mel.get] (** The number of seconds to add or subtract. *) - external seconds : t -> int option = "seconds" [@@mel.get] + + external milliseconds : t -> int option = "milliseconds" + [@@mel.get] (** The number of milliseconds to add or subtract. *) - external milliseconds : t -> int option = "milliseconds" [@@mel.get] - external make : ?years:(int [@mel.as "years"]) -> ?months:(int [@mel.as "months"]) -> ?weeks:(int [@mel.as "weeks"]) -> ?days:(int [@mel.as "days"]) -> ?hours:(int [@mel.as "hours"]) -> ?minutes:(int [@mel.as "minutes"]) -> ?seconds:(int [@mel.as "seconds"]) -> ?milliseconds:(int [@mel.as "milliseconds"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?years:(int[@mel.as "years"]) -> + ?months:(int[@mel.as "months"]) -> + ?weeks:(int[@mel.as "weeks"]) -> + ?days:(int[@mel.as "days"]) -> + ?hours:(int[@mel.as "hours"]) -> + ?minutes:(int[@mel.as "minutes"]) -> + ?seconds:(int[@mel.as "seconds"]) -> + ?milliseconds:(int[@mel.as "milliseconds"]) -> + unit -> + t = "" + [@@mel.obj] end -module ZonedDateTime_Set : sig - type t = t_zoned_date_time_set +module ZonedDateTime_Set_Fields : sig + type t = t_zoned_date_time_set_fields + external era : t -> string option = "era" [@@mel.get] external year : t -> int option = "year" [@@mel.get] external month : t -> int option = "month" [@@mel.get] @@ -324,69 +801,145 @@ module ZonedDateTime_Set : sig external minute : t -> int option = "minute" [@@mel.get] external second : t -> int option = "second" [@@mel.get] external millisecond : t -> int option = "millisecond" [@@mel.get] - external make : ?era:(string [@mel.as "era"]) -> ?year:(int [@mel.as "year"]) -> ?month:(int [@mel.as "month"]) -> ?day:(int [@mel.as "day"]) -> ?hour:(int [@mel.as "hour"]) -> ?minute:(int [@mel.as "minute"]) -> ?second:(int [@mel.as "second"]) -> ?millisecond:(int [@mel.as "millisecond"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?era:(string[@mel.as "era"]) -> + ?year:(int[@mel.as "year"]) -> + ?month:(int[@mel.as "month"]) -> + ?day:(int[@mel.as "day"]) -> + ?hour:(int[@mel.as "hour"]) -> + ?minute:(int[@mel.as "minute"]) -> + ?second:(int[@mel.as "second"]) -> + ?millisecond:(int[@mel.as "millisecond"]) -> + unit -> + t = "" + [@@mel.obj] end module CycleTimeOptions : sig type t = t_cycle_time_options - (** Whether to use 12 or 24 hour time. If 12 hour time is chosen, the resulting value - will remain in the same day period as the original value (e.g. if the value is AM, - the resulting value also be AM). *) - external hour_cycle : t -> int option = "hourCycle" [@@mel.get] + + external hour_cycle : t -> int option = "hourCycle" + [@@mel.get] + (** Whether to use 12 or 24 hour time. If 12 hour time is chosen, the + resulting value will remain in the same day period as the original value + (e.g. if the value is AM, the resulting value also be AM). *) + + external round : t -> bool option = "round" + [@@mel.get] (** Whether to round the field value to the nearest interval of the amount. *) - external round : t -> bool option = "round" [@@mel.get] - external make : ?hour_cycle:(int [@mel.as "hourCycle"]) -> ?round:(bool [@mel.as "round"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hour_cycle:(int[@mel.as "hourCycle"]) -> + ?round:(bool[@mel.as "round"]) -> + unit -> + t = "" + [@@mel.obj] end -(** Represents an amount of time in calendar-specific units, for use when performing arithmetic. *) +(** Represents an amount of time in calendar-specific units, for use when + performing arithmetic. *) module DateDuration : sig type t = t_date_duration + + external years : t -> int option = "years" + [@@mel.get] (** The number of years to add or subtract. *) - external years : t -> int option = "years" [@@mel.get] + + external months : t -> int option = "months" + [@@mel.get] (** The number of months to add or subtract. *) - external months : t -> int option = "months" [@@mel.get] + + external weeks : t -> int option = "weeks" + [@@mel.get] (** The number of weeks to add or subtract. *) - external weeks : t -> int option = "weeks" [@@mel.get] + + external days : t -> int option = "days" + [@@mel.get] (** The number of days to add or subtract. *) - external days : t -> int option = "days" [@@mel.get] - external make : ?years:(int [@mel.as "years"]) -> ?months:(int [@mel.as "months"]) -> ?weeks:(int [@mel.as "weeks"]) -> ?days:(int [@mel.as "days"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?years:(int[@mel.as "years"]) -> + ?months:(int[@mel.as "months"]) -> + ?weeks:(int[@mel.as "weeks"]) -> + ?days:(int[@mel.as "days"]) -> + unit -> + t = "" + [@@mel.obj] end module DateFields : sig type t = t_date_fields + external era : t -> string option = "era" [@@mel.get] external year : t -> int option = "year" [@@mel.get] external month : t -> int option = "month" [@@mel.get] external day : t -> int option = "day" [@@mel.get] - external make : ?era:(string [@mel.as "era"]) -> ?year:(int [@mel.as "year"]) -> ?month:(int [@mel.as "month"]) -> ?day:(int [@mel.as "day"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?era:(string[@mel.as "era"]) -> + ?year:(int[@mel.as "year"]) -> + ?month:(int[@mel.as "month"]) -> + ?day:(int[@mel.as "day"]) -> + unit -> + t = "" + [@@mel.obj] end module CycleOptions : sig type t = t_cycle_options + + external round : t -> bool option = "round" + [@@mel.get] (** Whether to round the field value to the nearest interval of the amount. *) - external round : t -> bool option = "round" [@@mel.get] - external make : ?round:(bool [@mel.as "round"]) -> unit -> t = "" [@@mel.obj] + + external make : ?round:(bool[@mel.as "round"]) -> unit -> t = "" [@@mel.obj] end (** Represents an amount of time, for use whe performing arithmetic. *) module TimeDuration : sig type t = t_time_duration + + external hours : t -> int option = "hours" + [@@mel.get] (** The number of hours to add or subtract. *) - external hours : t -> int option = "hours" [@@mel.get] + + external minutes : t -> int option = "minutes" + [@@mel.get] (** The number of minutes to add or subtract. *) - external minutes : t -> int option = "minutes" [@@mel.get] + + external seconds : t -> int option = "seconds" + [@@mel.get] (** The number of seconds to add or subtract. *) - external seconds : t -> int option = "seconds" [@@mel.get] + + external milliseconds : t -> int option = "milliseconds" + [@@mel.get] (** The number of milliseconds to add or subtract. *) - external milliseconds : t -> int option = "milliseconds" [@@mel.get] - external make : ?hours:(int [@mel.as "hours"]) -> ?minutes:(int [@mel.as "minutes"]) -> ?seconds:(int [@mel.as "seconds"]) -> ?milliseconds:(int [@mel.as "milliseconds"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hours:(int[@mel.as "hours"]) -> + ?minutes:(int[@mel.as "minutes"]) -> + ?seconds:(int[@mel.as "seconds"]) -> + ?milliseconds:(int[@mel.as "milliseconds"]) -> + unit -> + t = "" + [@@mel.obj] end module TimeFields : sig type t = t_time_fields + external hour : t -> int option = "hour" [@@mel.get] external minute : t -> int option = "minute" [@@mel.get] external second : t -> int option = "second" [@@mel.get] external millisecond : t -> int option = "millisecond" [@@mel.get] - external make : ?hour:(int [@mel.as "hour"]) -> ?minute:(int [@mel.as "minute"]) -> ?second:(int [@mel.as "second"]) -> ?millisecond:(int [@mel.as "millisecond"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hour:(int[@mel.as "hour"]) -> + ?minute:(int[@mel.as "minute"]) -> + ?second:(int[@mel.as "second"]) -> + ?millisecond:(int[@mel.as "millisecond"]) -> + unit -> + t = "" + [@@mel.obj] end diff --git a/kobalte/solidtype_kobalte.ml b/kobalte/solidtype_kobalte.ml index a14ca482..6b7973e1 100644 --- a/kobalte/solidtype_kobalte.ml +++ b/kobalte/solidtype_kobalte.ml @@ -9,13 +9,15 @@ module Types = Types module Accordion = struct - (** Contains the content to be rendered when the `Accordion.Item` is expanded. *) + (** Contains the content to be rendered when the `Accordion.Item` is expanded. + *) module Content = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -23,14 +25,15 @@ module Accordion = struct [@@mel.module "@kobalte/core/accordion"] end - (** Wraps an `Accordion.Trigger`. - Use the `as` prop to update it to the appropriate heading level for your page. *) + (** Wraps an `Accordion.Trigger`. Use the `as` prop to update it to the + appropriate heading level for your page. *) module Header = struct module Props = struct external check : ?as_:(Solidtype.Html.H3.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H3.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H3.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -38,7 +41,8 @@ module Accordion = struct [@@mel.module "@kobalte/core/accordion"] end - (** An item of the accordion, contains all the parts of a collapsible section. *) + (** An item of the accordion, contains all the parts of a collapsible section. + *) module Item = struct module Props = struct external check : @@ -47,7 +51,8 @@ module Accordion = struct ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -55,7 +60,8 @@ module Accordion = struct [@@mel.module "@kobalte/core/accordion"] end - (** A vertically stacked set of interactive headings that each reveal an associated section of content. *) + (** A vertically stacked set of interactive headings that each reveal an + associated section of content. *) module Root = struct module Props = struct external check : @@ -67,7 +73,8 @@ module Accordion = struct ?should_focus_wrap:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -75,13 +82,15 @@ module Accordion = struct [@@mel.module "@kobalte/core/accordion"] end - (** Toggles the collapsed state of its associated item. It should be nested inside an `Accordion.Header`. *) + (** Toggles the collapsed state of its associated item. It should be nested + inside an `Accordion.Header`. *) module Trigger = struct module Props = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -89,19 +98,21 @@ module Accordion = struct [@@mel.module "@kobalte/core/accordion"] end - external use_accordion_context : unit -> Types.AccordionContextValue.t = "useAccordionContext" + external use_accordion_context : unit -> Types.AccordionContextValue.t + = "useAccordionContext" [@@mel.module "@kobalte/core/accordion"] end module Alert = struct - (** Alert displays a brief, important message - in a way that attracts the user's attention without interrupting the user's task. *) + (** Alert displays a brief, important message in a way that attracts the + user's attention without interrupting the user's task. *) module Root = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -117,7 +128,8 @@ module AlertDialog = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -125,7 +137,8 @@ module AlertDialog = struct [@@mel.module "@kobalte/core/alert-dialog"] end - (** Overrides the regular `Dialog.Content` with role="alertdialog" to interrupt the user. *) + (** Overrides the regular `Dialog.Content` with role="alertdialog" to + interrupt the user. *) module Content = struct module Props = struct external check : @@ -137,7 +150,8 @@ module AlertDialog = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -145,13 +159,15 @@ module AlertDialog = struct [@@mel.module "@kobalte/core/alert-dialog"] end - (** An optional accessible description to be announced when the dialog is open. *) + (** An optional accessible description to be announced when the dialog is + open. *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.P.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.P.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.P.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -159,13 +175,15 @@ module AlertDialog = struct [@@mel.module "@kobalte/core/alert-dialog"] end - (** A layer that covers the inert portion of the view when the dialog is open. *) + (** A layer that covers the inert portion of the view when the dialog is open. + *) module Overlay = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -182,7 +200,9 @@ module AlertDialog = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -190,11 +210,13 @@ module AlertDialog = struct [@@mel.module "@kobalte/core/alert-dialog"] end - (** A dialog is a window overlaid on either the primary window or another dialog window. *) + (** A dialog is a window overlaid on either the primary window or another + dialog window. *) module Root = struct module Props = struct external check : - ?translations:Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> ?open_:bool Solidtype.Check.value -> ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> @@ -203,7 +225,9 @@ module AlertDialog = struct ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -217,7 +241,8 @@ module AlertDialog = struct external check : ?as_:(Solidtype.Html.H2.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H2.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H2.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -231,7 +256,8 @@ module AlertDialog = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -247,7 +273,8 @@ module Badge = struct ?text_value:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -264,7 +291,8 @@ module Breadcrumbs = struct ?current:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -272,15 +300,18 @@ module Breadcrumbs = struct [@@mel.module "@kobalte/core/breadcrumbs"] end - (** Breadcrumbs show hierarchy and navigational context for a user’s location within an application. *) + (** Breadcrumbs show hierarchy and navigational context for a user’s location + within an application. *) module Root = struct module Props = struct external check : ?separator:Solidtype.Jsx.element Solidtype.Check.value -> - ?translations:Types.Breadcrumbs_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.Breadcrumbs_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Nav.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Nav.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Nav.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -288,14 +319,15 @@ module Breadcrumbs = struct [@@mel.module "@kobalte/core/breadcrumbs"] end - (** The visual separator between each breadcrumb items. - It will not be visible by screen readers. *) + (** The visual separator between each breadcrumb items. It will not be visible + by screen readers. *) module Separator = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -303,20 +335,23 @@ module Breadcrumbs = struct [@@mel.module "@kobalte/core/breadcrumbs"] end - external use_breadcrumbs_context : unit -> Types.BreadcrumbsContextValue.t = "useBreadcrumbsContext" + external use_breadcrumbs_context : unit -> Types.BreadcrumbsContextValue.t + = "useBreadcrumbsContext" [@@mel.module "@kobalte/core/breadcrumbs"] end module Button = struct - (** Button enables users to trigger an action or event, such as submitting a form, - opening a dialog, canceling an action, or performing a delete operation. - This component is based on the \[WAI-ARIA Button Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) + (** Button enables users to trigger an action or event, such as submitting a + form, opening a dialog, canceling an action, or performing a delete + operation. This component is based on the \[WAI-ARIA Button + Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) module Root = struct module Props = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -332,7 +367,8 @@ module Checkbox = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -347,7 +383,8 @@ module Checkbox = struct ?id:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -355,7 +392,8 @@ module Checkbox = struct [@@mel.module "@kobalte/core/checkbox"] end - (** The error message that gives the user information about how to fix a validation error on the checkbox. *) + (** The error message that gives the user information about how to fix a + validation error on the checkbox. *) module ErrorMessage = struct module Props = struct external check : @@ -363,7 +401,8 @@ module Checkbox = struct ?id:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -371,15 +410,17 @@ module Checkbox = struct [@@mel.module "@kobalte/core/checkbox"] end - (** The visual indicator rendered when the checkbox is in a checked or indeterminate state. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the checkbox is in a checked or + indeterminate state. You can style this element directly, or you can use + it as a wrapper to put an icon into, or both. *) module Indicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -393,7 +434,8 @@ module Checkbox = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -407,7 +449,8 @@ module Checkbox = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -415,7 +458,8 @@ module Checkbox = struct [@@mel.module "@kobalte/core/checkbox"] end - (** A control that allows the user to toggle between checked and not checked. *) + (** A control that allows the user to toggle between checked and not checked. + *) module Root = struct module Props = struct external check : @@ -425,13 +469,19 @@ module Checkbox = struct ?indeterminate:bool Solidtype.Check.value -> ?value:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.CheckboxRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( Types.CheckboxRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -439,7 +489,8 @@ module Checkbox = struct [@@mel.module "@kobalte/core/checkbox"] end - external use_checkbox_context : unit -> Types.CheckboxContextValue.t = "useCheckboxContext" + external use_checkbox_context : unit -> Types.CheckboxContextValue.t + = "useCheckboxContext" [@@mel.module "@kobalte/core/checkbox"] end @@ -450,7 +501,8 @@ module Collapsible = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -469,7 +521,8 @@ module Collapsible = struct ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -483,7 +536,8 @@ module Collapsible = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -491,7 +545,8 @@ module Collapsible = struct [@@mel.module "@kobalte/core/collapsible"] end - external use_collapsible_context : unit -> Types.CollapsibleContextValue.t = "useCollapsibleContext" + external use_collapsible_context : unit -> Types.CollapsibleContextValue.t + = "useCollapsibleContext" [@@mel.module "@kobalte/core/collapsible"] end @@ -501,7 +556,8 @@ module ColorArea = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -509,13 +565,15 @@ module ColorArea = struct [@@mel.module "@kobalte/core/color-area"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -523,14 +581,16 @@ module ColorArea = struct [@@mel.module "@kobalte/core/color-area"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -542,7 +602,8 @@ module ColorArea = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -554,7 +615,8 @@ module ColorArea = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -568,7 +630,8 @@ module ColorArea = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -584,20 +647,39 @@ module ColorArea = struct ?default_value:Types.Color.t Solidtype.Check.value -> ?on_change:(Types.Color.t -> unit) -> ?on_change_end:(Types.Color.t -> unit) -> - ?x_channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?y_channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?color_space:[ `rgb | `hsl | `hsb ] Solidtype.Check.value -> + ?x_channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?y_channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?color_space:[ `hsb | `hsl | `rgb ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> ?x_name:string Solidtype.Check.value -> ?y_name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -610,7 +692,8 @@ module ColorArea = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -618,7 +701,8 @@ module ColorArea = struct [@@mel.module "@kobalte/core/color-area"] end - external use_color_area_context : unit -> Types.ColorAreaContextValue.t = "useColorAreaContext" + external use_color_area_context : unit -> Types.ColorAreaContextValue.t + = "useColorAreaContext" [@@mel.module "@kobalte/core/color-area"] end @@ -628,7 +712,8 @@ module ColorChannelField = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -636,13 +721,15 @@ module ColorChannelField = struct [@@mel.module "@kobalte/core/color-channel-field"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -650,14 +737,16 @@ module ColorChannelField = struct [@@mel.module "@kobalte/core/color-channel-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -669,7 +758,8 @@ module ColorChannelField = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -682,7 +772,8 @@ module ColorChannelField = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -695,7 +786,8 @@ module ColorChannelField = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -709,7 +801,8 @@ module ColorChannelField = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -723,12 +816,22 @@ module ColorChannelField = struct ?value:Types.Color.t Solidtype.Check.value -> ?default_value:Types.Color.t Solidtype.Check.value -> ?on_change:(Types.Color.t -> unit) -> - channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?color_space:[ `rgb | `hsl | `hsb ] Solidtype.Check.value -> + channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?color_space:[ `hsb | `hsl | `rgb ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?text_value:string Solidtype.Check.value -> - ?translations:Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> ?step:float Solidtype.Check.value -> @@ -736,12 +839,13 @@ module ColorChannelField = struct ?change_on_wheel:bool Solidtype.Check.value -> ?format:bool Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -751,13 +855,15 @@ module ColorChannelField = struct end module ColorField = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -765,14 +871,16 @@ module ColorField = struct [@@mel.module "@kobalte/core/color-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -785,7 +893,8 @@ module ColorField = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -799,7 +908,8 @@ module ColorField = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -815,13 +925,14 @@ module ColorField = struct ?on_change:(string -> unit) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -829,7 +940,8 @@ module ColorField = struct [@@mel.module "@kobalte/core/color-field"] end - external use_color_field_context : unit -> Types.ColorFieldContextValue.t = "useColorFieldContext" + external use_color_field_context : unit -> Types.ColorFieldContextValue.t + = "useColorFieldContext" [@@mel.module "@kobalte/core/color-field"] end @@ -837,19 +949,22 @@ module ColorMode = struct external color_mode_storage_key : string = "COLOR_MODE_STORAGE_KEY" [@@mel.module "@kobalte/core/color-mode"] - external color_mode_context : Types.ColorModeContextType.t option Types.Context.t = "ColorModeContext" + external color_mode_context : + Types.ColorModeContextType.t option Types.Context.t = "ColorModeContext" [@@mel.module "@kobalte/core/color-mode"] - (** Provides context for the color mode based on config in `theme` - Returns the color mode and function to toggle the color mode *) + (** Provides context for the color mode based on config in `theme` Returns the + color mode and function to toggle the color mode *) module ColorModeProvider = struct module Props = struct external check : - ?initial_color_mode:[ `light | `dark | `system ] Solidtype.Check.value -> + ?initial_color_mode:[ `dark | `light | `system ] Solidtype.Check.value -> ?disable_transition_on_change:bool Solidtype.Check.value -> ?storage_manager:Types.ColorModeStorageManager.t Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -860,12 +975,14 @@ module ColorMode = struct module ColorModeScript = struct module Props = struct external check : - ?initial_color_mode:[ `light | `dark | `system ] Solidtype.Check.value -> - ?storage_type:[ `localStorage | `cookie ] Solidtype.Check.value -> + ?initial_color_mode:[ `dark | `light | `system ] Solidtype.Check.value -> + ?storage_type:[ `cookie | `localStorage ] Solidtype.Check.value -> ?storage_key:string Solidtype.Check.value -> ?nonce:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -873,39 +990,52 @@ module ColorMode = struct [@@mel.module "@kobalte/core/color-mode"] end - external cookie_storage_manager : Types.ColorModeStorageManager.t = "cookieStorageManager" + external cookie_storage_manager : Types.ColorModeStorageManager.t + = "cookieStorageManager" [@@mel.module "@kobalte/core/color-mode"] - external cookie_storage_manager_ssr : string -> Types.ColorModeStorageManager.t = "cookieStorageManagerSSR" + external cookie_storage_manager_ssr : + string -> Types.ColorModeStorageManager.t = "cookieStorageManagerSSR" [@@mel.module "@kobalte/core/color-mode"] - external create_cookie_storage_manager : string -> ?cookie:string -> unit -> Types.ColorModeStorageManager.t = "createCookieStorageManager" + external create_cookie_storage_manager : + string -> ?cookie:string -> unit -> Types.ColorModeStorageManager.t + = "createCookieStorageManager" [@@mel.module "@kobalte/core/color-mode"] - external create_local_storage_manager : string -> Types.ColorModeStorageManager.t = "createLocalStorageManager" + external create_local_storage_manager : + string -> Types.ColorModeStorageManager.t = "createLocalStorageManager" [@@mel.module "@kobalte/core/color-mode"] - external local_storage_manager : Types.ColorModeStorageManager.t = "localStorageManager" + external local_storage_manager : Types.ColorModeStorageManager.t + = "localStorageManager" [@@mel.module "@kobalte/core/color-mode"] - (** Primitive that reads from `ColorModeProvider` context, - Returns the color mode and function to toggle it. *) - external use_color_mode : unit -> Types.ColorModeContextType.t = "useColorMode" + external use_color_mode : unit -> Types.ColorModeContextType.t + = "useColorMode" [@@mel.module "@kobalte/core/color-mode"] - - (** Change value based on color mode. *) - external use_color_mode_value : 't_light -> 't_dark -> ('t_light, 't_dark) Types.Either.t Solidtype.Solid.accessor = "useColorModeValue" + (** Primitive that reads from `ColorModeProvider` context, Returns the color + mode and function to toggle it. *) + + external use_color_mode_value : + 't_light -> + 't_dark -> + ('t_light, 't_dark) Types.Either.t Solidtype.Solid.accessor + = "useColorModeValue" [@@mel.module "@kobalte/core/color-mode"] + (** Change value based on color mode. *) end module ColorSlider = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -913,14 +1043,16 @@ module ColorSlider = struct [@@mel.module "@kobalte/core/color-slider"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -934,7 +1066,8 @@ module ColorSlider = struct external check : ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -948,7 +1081,8 @@ module ColorSlider = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -963,20 +1097,31 @@ module ColorSlider = struct ?default_value:Types.Color.t Solidtype.Check.value -> ?on_change:(Types.Color.t -> unit) -> ?on_change_end:(Types.Color.t -> unit) -> - channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?color_space:[ `rgb | `hsl | `hsb ] Solidtype.Check.value -> + channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?color_space:[ `hsb | `hsl | `rgb ] Solidtype.Check.value -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?get_value_label:(Types.Color.t -> string) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> - ?translations:Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -989,7 +1134,8 @@ module ColorSlider = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1002,7 +1148,8 @@ module ColorSlider = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1010,13 +1157,15 @@ module ColorSlider = struct [@@mel.module "@kobalte/core/color-slider"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1024,7 +1173,8 @@ module ColorSlider = struct [@@mel.module "@kobalte/core/color-slider"] end - external use_color_slider_context : unit -> Types.ColorSliderContextValue.t = "useColorSliderContext" + external use_color_slider_context : unit -> Types.ColorSliderContextValue.t + = "useColorSliderContext" [@@mel.module "@kobalte/core/color-slider"] end @@ -1034,10 +1184,12 @@ module ColorSwatch = struct external check : value:Types.Color.t Solidtype.Check.value -> ?color_name:string Solidtype.Check.value -> - ?translations:Types.ColorSwatch_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorSwatch_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1047,13 +1199,15 @@ module ColorSwatch = struct end module ColorWheel = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1061,14 +1215,16 @@ module ColorWheel = struct [@@mel.module "@kobalte/core/color-wheel"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1081,7 +1237,8 @@ module ColorWheel = struct external check : ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1095,7 +1252,8 @@ module ColorWheel = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1106,7 +1264,8 @@ module ColorWheel = struct module Root = struct module Props = struct external check : - ?translations:Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> ?value:Types.Color.t Solidtype.Check.value -> ?default_value:Types.Color.t Solidtype.Check.value -> ?thickness:float Solidtype.Check.value -> @@ -1115,13 +1274,14 @@ module ColorWheel = struct ?get_value_label:(Types.Color.t -> string) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1134,7 +1294,8 @@ module ColorWheel = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1147,7 +1308,8 @@ module ColorWheel = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1160,7 +1322,8 @@ module ColorWheel = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1168,47 +1331,80 @@ module ColorWheel = struct [@@mel.module "@kobalte/core/color-wheel"] end - external use_color_wheel_context : unit -> Types.ColorWheelContextValue.t = "useColorWheelContext" + external use_color_wheel_context : unit -> Types.ColorWheelContextValue.t + = "useColorWheelContext" [@@mel.module "@kobalte/core/color-wheel"] end module Colors = struct - external color_intl_translations : Types.ColorSlider_Root_Translations.t = "COLOR_INTL_TRANSLATIONS" + external color_intl_translations : Types.ColorSlider_Root_Translations.t + = "COLOR_INTL_TRANSLATIONS" [@@mel.module "@kobalte/core/colors"] - (** Returns a list of color channels for a given color space. *) - external get_color_channels : [ `rgb | `hsl | `hsb ] -> ([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ]) = "getColorChannels" + external get_color_channels : + [ `hsb | `hsl | `rgb ] -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "getColorChannels" [@@mel.module "@kobalte/core/colors"] + (** Returns a list of color channels for a given color space. *) - external normalize_color : (string, Types.Color.t) Types.Either.t -> Types.Color.t = "normalizeColor" + external normalize_color : + (string, Types.Color.t) Types.Either.t -> Types.Color.t = "normalizeColor" [@@mel.module "@kobalte/core/colors"] - (** Returns the hue value normalized to the range of 0 to 360. *) external normalize_hue : float -> float = "normalizeHue" [@@mel.module "@kobalte/core/colors"] + (** Returns the hue value normalized to the range of 0 to 360. *) external parse_color_js : string -> Types.Color.t = "parseColor" [@@mel.module "@kobalte/core/colors"] - (** Parses a color from a string value. Throws an error if the string could not be parsed. - - Raises [Invalid_argument] with Kobalte's message, where it throws. *) + let parse_color x0 = match parse_color_js x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("parse_color: " ^ Option.value (Js.Exn.message e) ~default:"") - let parse_color_opt x0 = match parse_color_js x0 with v -> Some v | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg + ("parse_color: " ^ Option.value (Js.Exn.message e) ~default:"") + + let parse_color_opt x0 = + match parse_color_js x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None end module Combobox = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1226,7 +1422,8 @@ module Combobox = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1240,7 +1437,13 @@ module Combobox = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('option Types.ComboboxControlState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( 'option Types.ComboboxControlState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1248,13 +1451,15 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1262,14 +1467,16 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1281,7 +1488,8 @@ module Combobox = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Select.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Select.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1289,14 +1497,16 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** A small icon often displayed next to the value as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon `children`. *) + (** A small icon often displayed next to the value as a visual affordance for + the fact it can be open. It renders a `▼` by default, but you can use your + own icon `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1309,7 +1519,8 @@ module Combobox = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1324,7 +1535,8 @@ module Combobox = struct item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1332,14 +1544,16 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1347,15 +1561,17 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** The visual indicator rendered when the item is selected. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the item is selected. You can style + this element directly, or you can use it as a wrapper to put an icon into, + or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1363,14 +1579,15 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1384,7 +1601,8 @@ module Combobox = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1396,11 +1614,21 @@ module Combobox = struct module Listbox = struct module Props = struct external check : - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1417,7 +1645,9 @@ module Combobox = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1425,7 +1655,8 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - (** A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query. *) + (** A combo box combines a text input with a listbox, allowing users to filter + a list of options to items matching a query. *) module Root = struct module Props = struct external check : @@ -1436,7 +1667,7 @@ module Combobox = struct ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -1466,31 +1697,46 @@ module Combobox = struct ?option_disabled:('option -> bool) -> ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> - ?default_filter:([ `contains | `startsWith | `endsWith ], 'option -> string -> bool) Types.Either.t Solidtype.Check.value -> + ?default_filter: + ( [ `contains | `endsWith | `startsWith ], + 'option -> string -> bool ) + Types.Either.t + Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" + external component_js : unit Solidtype.Jsx.component = "Root" [@@mel.module "@kobalte/core/combobox"] + + let component = + component_js + |> Solidtype.Arity.adapted "onOpenChange" (fun f -> + fun[@u] x0 x1 -> f x0 x1) end - (** A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query. *) + (** A combo box combines a text input with a listbox, allowing users to filter + a list of options to items matching a query. *) module Root_multiple = struct module Props = struct external check : @@ -1502,7 +1748,7 @@ module Combobox = struct ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -1532,38 +1778,53 @@ module Combobox = struct ?option_disabled:('option -> bool) -> ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> - ?default_filter:([ `contains | `startsWith | `endsWith ], 'option -> string -> bool) Types.Either.t Solidtype.Check.value -> + ?default_filter: + ( [ `contains | `endsWith | `startsWith ], + 'option -> string -> bool ) + Types.Either.t + Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" + external component_js : unit Solidtype.Jsx.component = "Root" [@@mel.module "@kobalte/core/combobox"] + + let component = + component_js + |> Solidtype.Arity.adapted "onOpenChange" (fun f -> + fun[@u] x0 x1 -> f x0 x1) end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section = struct module Props = struct external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1576,7 +1837,8 @@ module Combobox = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1584,20 +1846,22 @@ module Combobox = struct [@@mel.module "@kobalte/core/combobox"] end - external use_combobox_context : unit -> Types.ComboboxContextValue.t = "useComboboxContext" + external use_combobox_context : unit -> Types.ComboboxContextValue.t + = "useComboboxContext" [@@mel.module "@kobalte/core/combobox"] end module ContextMenu = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1619,7 +1883,8 @@ module ContextMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1638,7 +1903,8 @@ module ContextMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1652,7 +1918,8 @@ module ContextMenu = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1660,14 +1927,15 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1675,14 +1943,16 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1700,7 +1970,8 @@ module ContextMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1709,13 +1980,15 @@ module ContextMenu = struct end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1723,15 +1996,17 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1739,14 +2014,16 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1763,7 +2040,9 @@ module ContextMenu = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1771,7 +2050,8 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup = struct module Props = struct external check : @@ -1781,7 +2061,8 @@ module ContextMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1800,7 +2081,8 @@ module ContextMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1808,7 +2090,8 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - (** Displays a menu located at the pointer, triggered by a right-click or a long-press. *) + (** Displays a menu located at the pointer, triggered by a right-click or a + long-press. *) module Root = struct module Props = struct external check : @@ -1832,7 +2115,9 @@ module ContextMenu = struct ?force_mount:bool Solidtype.Check.value -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1847,7 +2132,8 @@ module ContextMenu = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1873,7 +2159,9 @@ module ContextMenu = struct ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1891,7 +2179,8 @@ module ContextMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1907,7 +2196,8 @@ module ContextMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1921,7 +2211,8 @@ module ContextMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1929,7 +2220,8 @@ module ContextMenu = struct [@@mel.module "@kobalte/core/context-menu"] end - external use_context_menu_context : unit -> Types.ContextMenuContextValue.t = "useContextMenuContext" + external use_context_menu_context : unit -> Types.ContextMenuContextValue.t + = "useContextMenuContext" [@@mel.module "@kobalte/core/context-menu"] end @@ -1940,7 +2232,8 @@ module Dialog = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1960,7 +2253,8 @@ module Dialog = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1968,13 +2262,15 @@ module Dialog = struct [@@mel.module "@kobalte/core/dialog"] end - (** An optional accessible description to be announced when the dialog is open. *) + (** An optional accessible description to be announced when the dialog is + open. *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.P.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.P.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.P.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1982,13 +2278,15 @@ module Dialog = struct [@@mel.module "@kobalte/core/dialog"] end - (** A layer that covers the inert portion of the view when the dialog is open. *) + (** A layer that covers the inert portion of the view when the dialog is open. + *) module Overlay = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2005,7 +2303,9 @@ module Dialog = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2013,11 +2313,13 @@ module Dialog = struct [@@mel.module "@kobalte/core/dialog"] end - (** A dialog is a window overlaid on either the primary window or another dialog window. *) + (** A dialog is a window overlaid on either the primary window or another + dialog window. *) module Root = struct module Props = struct external check : - ?translations:Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> ?open_:bool Solidtype.Check.value -> ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> @@ -2026,7 +2328,9 @@ module Dialog = struct ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2040,7 +2344,8 @@ module Dialog = struct external check : ?as_:(Solidtype.Html.H2.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H2.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H2.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2054,7 +2359,8 @@ module Dialog = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2062,20 +2368,22 @@ module Dialog = struct [@@mel.module "@kobalte/core/dialog"] end - external use_dialog_context : unit -> Types.DialogContextValue.t = "useDialogContext" + external use_dialog_context : unit -> Types.DialogContextValue.t + = "useDialogContext" [@@mel.module "@kobalte/core/dialog"] end module DropdownMenu = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2097,7 +2405,8 @@ module DropdownMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2117,7 +2426,8 @@ module DropdownMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2131,7 +2441,8 @@ module DropdownMenu = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2139,14 +2450,15 @@ module DropdownMenu = struct [@@mel.module "@kobalte/core/dropdown-menu"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2154,14 +2466,16 @@ module DropdownMenu = struct [@@mel.module "@kobalte/core/dropdown-menu"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2179,7 +2493,8 @@ module DropdownMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2188,13 +2503,15 @@ module DropdownMenu = struct end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2202,15 +2519,17 @@ module DropdownMenu = struct [@@mel.module "@kobalte/core/dropdown-menu"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2218,14 +2537,16 @@ module DropdownMenu = struct [@@mel.module "@kobalte/core/dropdown-menu"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2242,7 +2563,9 @@ module DropdownMenu = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2250,7 +2573,8 @@ module DropdownMenu = struct [@@mel.module "@kobalte/core/dropdown-menu"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup = struct module Props = struct external check : @@ -2260,7 +2584,8 @@ module DropdownMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2279,7 +2604,8 @@ module DropdownMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2287,7 +2613,8 @@ module DropdownMenu = struct [@@mel.module "@kobalte/core/dropdown-menu"] end - (** Displays a menu to the user —such as a set of actions or functions— triggered by a button. *) + (** Displays a menu to the user —such as a set of actions or functions— + triggered by a button. *) module Root = struct module Props = struct external check : @@ -2314,7 +2641,9 @@ module DropdownMenu = struct ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2329,7 +2658,8 @@ module DropdownMenu = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2355,7 +2685,9 @@ module DropdownMenu = struct ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2373,7 +2705,8 @@ module DropdownMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2389,7 +2722,8 @@ module DropdownMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2403,7 +2737,8 @@ module DropdownMenu = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2413,16 +2748,19 @@ module DropdownMenu = struct end module FileField = struct - external context : Types.FileFieldContextValue.t option Types.Context.t = "Context" + external context : Types.FileFieldContextValue.t option Types.Context.t + = "Context" [@@mel.module "@kobalte/core/file-field"] - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2435,7 +2773,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2443,14 +2782,16 @@ module FileField = struct [@@mel.module "@kobalte/core/file-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2463,7 +2804,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2476,7 +2818,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2489,7 +2832,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2502,7 +2846,13 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (children:(Types.File.t -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (children: + ( Types.File.t -> Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2515,7 +2865,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2529,7 +2880,8 @@ module FileField = struct type_:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2542,7 +2894,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Img.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Img.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Img.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2556,7 +2909,8 @@ module FileField = struct ?precision:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2569,7 +2923,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2590,16 +2945,24 @@ module FileField = struct ?on_file_accept:(Types.File.t array -> unit) -> ?on_file_reject:(Types.FileRejection.t array -> unit) -> ?on_file_change:(Types.Details.t -> unit) -> - ?validate:(Types.File.t -> [ `TOO_MANY_FILES | `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL ] array Js.Null.t) -> + ?validate: + (Types.File.t -> + [ `FILE_INVALID_TYPE + | `FILE_TOO_LARGE + | `FILE_TOO_SMALL + | `TOO_MANY_FILES ] + array + Js.Null.t) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2612,7 +2975,8 @@ module FileField = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2620,20 +2984,22 @@ module FileField = struct [@@mel.module "@kobalte/core/file-field"] end - external use_file_field_context : unit -> Types.FileFieldContextValue.t = "useFileFieldContext" + external use_file_field_context : unit -> Types.FileFieldContextValue.t + = "useFileFieldContext" [@@mel.module "@kobalte/core/file-field"] end module HoverCard = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2647,7 +3013,8 @@ module HoverCard = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2664,7 +3031,9 @@ module HoverCard = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2672,7 +3041,8 @@ module HoverCard = struct [@@mel.module "@kobalte/core/hover-card"] end - (** A popover that allows sighted users to preview content available behind a link. *) + (** A popover that allows sighted users to preview content available behind a + link. *) module Root = struct module Props = struct external check : @@ -2698,7 +3068,9 @@ module HoverCard = struct ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2712,7 +3084,8 @@ module HoverCard = struct external check : ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2720,7 +3093,8 @@ module HoverCard = struct [@@mel.module "@kobalte/core/hover-card"] end - external use_hover_card_context : unit -> Types.HoverCardContextValue.t = "useHoverCardContext" + external use_hover_card_context : unit -> Types.HoverCardContextValue.t + = "useHoverCardContext" [@@mel.module "@kobalte/core/hover-card"] end @@ -2731,7 +3105,9 @@ module I18n = struct external check : ?locale:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2742,56 +3118,77 @@ module I18n = struct external rtl_langs : string Js.Set.t = "RTL_LANGS" [@@mel.module "@kobalte/core/i18n"] - (** Provides localized string collation for the current locale. Automatically updates when the locale changes, - and handles caching of the collator for performance. *) - external create_collator : ?options:Types.CollatorOptions.t -> unit -> Types.Collator.t Solidtype.Solid.accessor = "createCollator" + external create_collator : + ?options:Types.CollatorOptions.t -> + unit -> + Types.Collator.t Solidtype.Solid.accessor = "createCollator" [@@mel.module "@kobalte/core/i18n"] - - (** Provides localized date formatting for the current locale. Automatically updates when the locale changes, - and handles caching of the date formatter for performance. *) - external create_date_formatter : (Types.DateTimeFormatOptions.t, Types.DateTimeFormatOptions.t Solidtype.Solid.accessor) Types.Either.t -> Types.DateTimeFormat.t Solidtype.Solid.accessor = "createDateFormatter" + (** Provides localized string collation for the current locale. Automatically + updates when the locale changes, and handles caching of the collator for + performance. *) + + external create_date_formatter : + ( Types.DateTimeFormatOptions.t, + Types.DateTimeFormatOptions.t Solidtype.Solid.accessor ) + Types.Either.t -> + Types.DateTimeFormat.t Solidtype.Solid.accessor = "createDateFormatter" [@@mel.module "@kobalte/core/i18n"] + (** Provides localized date formatting for the current locale. Automatically + updates when the locale changes, and handles caching of the date formatter + for performance. *) - (** Returns an accessor for the current browser/system language, and updates when it changes. *) - external create_default_locale : unit -> Types.I18n_CreateDefaultLocale.t = "createDefaultLocale" + external create_default_locale : unit -> Types.I18n_CreateDefaultLocale.t + = "createDefaultLocale" [@@mel.module "@kobalte/core/i18n"] + (** Returns an accessor for the current browser/system language, and updates + when it changes. *) - (** Provides localized string search functionality that is useful for filtering or matching items - in a list. Options can be provided to adjust the sensitivity to case, diacritics, and other parameters. *) - external create_filter : ?options:Types.CollatorOptions.t -> unit -> Types.Filter.t = "createFilter" + external create_filter : + ?options:Types.CollatorOptions.t -> unit -> Types.Filter.t = "createFilter" [@@mel.module "@kobalte/core/i18n"] - - (** Provides localized number formatting for the current locale. Automatically updates when the locale changes, - and handles caching of the number formatter for performance. *) - external create_number_formatter : (Types.NumberFormatOptions.t, Types.NumberFormatOptions.t Solidtype.Solid.accessor) Types.Either.t -> Types.NumberFormat.t Solidtype.Solid.accessor = "createNumberFormatter" + (** Provides localized string search functionality that is useful for + filtering or matching items in a list. Options can be provided to adjust + the sensitivity to case, diacritics, and other parameters. *) + + external create_number_formatter : + ( Types.NumberFormatOptions.t, + Types.NumberFormatOptions.t Solidtype.Solid.accessor ) + Types.Either.t -> + Types.NumberFormat.t Solidtype.Solid.accessor = "createNumberFormatter" [@@mel.module "@kobalte/core/i18n"] + (** Provides localized number formatting for the current locale. Automatically + updates when the locale changes, and handles caching of the number + formatter for performance. *) - (** Gets the locale setting of the browser. *) external get_default_locale : unit -> Types.Locale.t = "getDefaultLocale" [@@mel.module "@kobalte/core/i18n"] + (** Gets the locale setting of the browser. *) - external get_reading_direction : string -> [ `rtl | `ltr ] = "getReadingDirection" + external get_reading_direction : string -> [ `ltr | `rtl ] + = "getReadingDirection" [@@mel.module "@kobalte/core/i18n"] - (** Determines if a locale is read right to left using \[Intl.Locale\] - \{\@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale\}. *) external is_rtl : string -> bool = "isRTL" [@@mel.module "@kobalte/core/i18n"] + (** Determines if a locale is read right to left using \[Intl.Locale\] \{@link + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale\}. + *) - (** Returns an accessor for the current locale and layout direction. *) external use_locale : unit -> Types.I18n_UseLocale.t = "useLocale" [@@mel.module "@kobalte/core/i18n"] + (** Returns an accessor for the current locale and layout direction. *) end module Image = struct - (** An element that renders when the image hasn't loaded. - This means whilst it's loading, or if there was an error. *) + (** An element that renders when the image hasn't loaded. This means whilst + it's loading, or if there was an error. *) module Fallback = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2799,13 +3196,15 @@ module Image = struct [@@mel.module "@kobalte/core/image"] end - (** The image to render. By default, it will only render when it has loaded. *) + (** The image to render. By default, it will only render when it has loaded. + *) module Img = struct module Props = struct external check : ?as_:(Solidtype.Html.Img.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Img.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Img.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2813,15 +3212,18 @@ module Image = struct [@@mel.module "@kobalte/core/image"] end - (** An image element with an optional fallback for loading and error status. *) + (** An image element with an optional fallback for loading and error status. + *) module Root = struct module Props = struct external check : ?fallback_delay:float Solidtype.Check.value -> - ?on_loading_status_change:([ `idle | `loading | `loaded | `error ] -> unit) -> + ?on_loading_status_change: + ([ `error | `idle | `loaded | `loading ] -> unit) -> ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2829,19 +3231,22 @@ module Image = struct [@@mel.module "@kobalte/core/image"] end - external use_image_context : unit -> Types.ImageContextValue.t = "useImageContext" + external use_image_context : unit -> Types.ImageContextValue.t + = "useImageContext" [@@mel.module "@kobalte/core/image"] end module Link = struct - (** Link allows a user to navigate to another page or resource within a web page or application. *) + (** Link allows a user to navigate to another page or resource within a web + page or application. *) module Root = struct module Props = struct external check : ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2858,7 +3263,8 @@ module Listbox = struct item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2866,14 +3272,16 @@ module Listbox = struct [@@mel.module "@kobalte/core/listbox"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2881,15 +3289,17 @@ module Listbox = struct [@@mel.module "@kobalte/core/listbox"] end - (** The visual indicator rendered when the item is selected. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the item is selected. You can style + this element directly, or you can use it as a wrapper to put an icon into, + or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2897,14 +3307,15 @@ module Listbox = struct [@@mel.module "@kobalte/core/listbox"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2912,40 +3323,54 @@ module Listbox = struct [@@mel.module "@kobalte/core/listbox"] end - (** Listbox presents a list of options and allows a user to select one or more of them. *) + (** Listbox presents a list of options and allows a user to select one or more + of them. *) module Root = struct module Props = struct external check : ?value:string array Solidtype.Check.value -> ?default_value:string array Solidtype.Check.value -> ?on_change:(string Js.Set.t -> unit) -> - ?options:('option, 'opt_group) Types.Either.t array Solidtype.Check.value -> + ?options: + ('option, 'opt_group) Types.Either.t array Solidtype.Check.value -> ?option_value:('option -> string) -> ?option_text_value:('option -> string) -> ?option_disabled:('option -> bool) -> ?option_group_children:('opt_group -> 'option array) -> ?state:Types.ListState.t Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> - ?auto_focus:([ `first | `last ], bool) Types.Either.t Solidtype.Check.value -> + ?auto_focus: + ([ `first | `last ], bool) Types.Either.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?should_use_virtual_focus:bool Solidtype.Check.value -> ?should_select_on_press_up:bool Solidtype.Check.value -> ?should_focus_on_hover:bool Solidtype.Check.value -> - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> - ?selection_mode:[ `none | `single | `multiple ] Solidtype.Check.value -> + ?selection_mode:[ `multiple | `none | `single ] Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?select_on_focus:bool Solidtype.Check.value -> ?disallow_type_ahead:bool Solidtype.Check.value -> ?allows_tab_navigation:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> ?render_item:('option Types.CollectionNode.t -> Solidtype.Jsx.element) -> - ?render_section:('opt_group Types.CollectionNode.t -> Solidtype.Jsx.element) -> + ?render_section: + ('opt_group Types.CollectionNode.t -> Solidtype.Jsx.element) -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2953,14 +3378,15 @@ module Listbox = struct [@@mel.module "@kobalte/core/listbox"] end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section = struct module Props = struct external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2968,20 +3394,22 @@ module Listbox = struct [@@mel.module "@kobalte/core/listbox"] end - external use_listbox_context : unit -> Types.ListboxContextValue.t = "useListboxContext" + external use_listbox_context : unit -> Types.ListboxContextValue.t + = "useListboxContext" [@@mel.module "@kobalte/core/listbox"] end module Menubar = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3003,7 +3431,8 @@ module Menubar = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3022,7 +3451,8 @@ module Menubar = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3036,7 +3466,8 @@ module Menubar = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3044,14 +3475,15 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3059,14 +3491,16 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3084,7 +3518,8 @@ module Menubar = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3093,13 +3528,15 @@ module Menubar = struct end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3107,15 +3544,17 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3123,14 +3562,16 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3138,7 +3579,8 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** Displays a menu to the user —such as a set of actions or functions— triggered by a button. *) + (** Displays a menu to the user —such as a set of actions or functions— + triggered by a button. *) module Menu = struct module Props = struct external check : @@ -3165,7 +3607,9 @@ module Menubar = struct ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3182,7 +3626,9 @@ module Menubar = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3190,7 +3636,8 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup = struct module Props = struct external check : @@ -3200,7 +3647,8 @@ module Menubar = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3219,7 +3667,8 @@ module Menubar = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3227,7 +3676,8 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - (** A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands. *) + (** A visually persistent menu common in desktop applications that provides + quick access to a consistent set of commands. *) module Root = struct module Props = struct external check : @@ -3238,10 +3688,12 @@ module Menubar = struct ?focus_on_alt:bool Solidtype.Check.value -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?auto_focus_menu:bool Solidtype.Check.value -> - ?on_auto_focus_menu_change:bool Solidtype.Solid.setter Solidtype.Check.value -> + ?on_auto_focus_menu_change: + bool Solidtype.Solid.setter Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3256,7 +3708,8 @@ module Menubar = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3282,7 +3735,9 @@ module Menubar = struct ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3300,7 +3755,8 @@ module Menubar = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3316,7 +3772,8 @@ module Menubar = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3330,7 +3787,8 @@ module Menubar = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3338,19 +3796,21 @@ module Menubar = struct [@@mel.module "@kobalte/core/menubar"] end - external use_menubar_context : unit -> Types.MenubarContextValue.t = "useMenubarContext" + external use_menubar_context : unit -> Types.MenubarContextValue.t + = "useMenubarContext" [@@mel.module "@kobalte/core/menubar"] end module Meter = struct - (** The component that visually represents the meter value. - Used to visually show the fill of `Meter.Track`. *) + (** The component that visually represents the meter value. Used to visually + show the fill of `Meter.Track`. *) module Fill = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3364,7 +3824,8 @@ module Meter = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3379,10 +3840,11 @@ module Meter = struct ?value:float Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> - ?get_value_label:(Types.GetValueLabelParams.t -> string) -> + ?get_value_label:(Types.Meter_GetValueLabelParams.t -> string) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3390,14 +3852,15 @@ module Meter = struct [@@mel.module "@kobalte/core/meter"] end - (** The component that visually represents the meter track. - Act as a container for `Meter.Fill`. *) + (** The component that visually represents the meter track. Act as a container + for `Meter.Fill`. *) module Track = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3405,13 +3868,15 @@ module Meter = struct [@@mel.module "@kobalte/core/meter"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3419,20 +3884,22 @@ module Meter = struct [@@mel.module "@kobalte/core/meter"] end - external use_meter_context : unit -> Types.MeterContextValue.t = "useMeterContext" + external use_meter_context : unit -> Types.MeterContextValue.t + = "useMeterContext" [@@mel.module "@kobalte/core/meter"] end module NavigationMenu = struct - (** An optional arrow element to render alongside the viewport content. - Must be rendered in the viewport. *) + (** An optional arrow element to render alongside the viewport content. Must + be rendered in the viewport. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3454,7 +3921,8 @@ module NavigationMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3473,7 +3941,8 @@ module NavigationMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3487,7 +3956,8 @@ module NavigationMenu = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3495,14 +3965,15 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3510,14 +3981,16 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3535,7 +4008,8 @@ module NavigationMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3544,13 +4018,15 @@ module NavigationMenu = struct end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3558,15 +4034,17 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3574,14 +4052,16 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3589,7 +4069,8 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** Displays a menu to the user —such as a set of actions or functions— triggered by a button. *) + (** Displays a menu to the user —such as a set of actions or functions— + triggered by a button. *) module Menu = struct module Props = struct external check : @@ -3616,7 +4097,9 @@ module NavigationMenu = struct ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3624,7 +4107,8 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** Portals its children into the NavigationMenu.Viewport when the menu is open. *) + (** Portals its children into the NavigationMenu.Viewport when the menu is + open. *) module Portal = struct module Props = struct external check : @@ -3633,7 +4117,9 @@ module NavigationMenu = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3641,7 +4127,8 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup = struct module Props = struct external check : @@ -3651,7 +4138,8 @@ module NavigationMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3670,7 +4158,8 @@ module NavigationMenu = struct ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3678,7 +4167,8 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - (** A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands. *) + (** A visually persistent menu common in desktop applications that provides + quick access to a consistent set of commands. *) module Root = struct module Props = struct external check : @@ -3686,7 +4176,8 @@ module NavigationMenu = struct ?skip_delay_duration:float Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?auto_focus_menu:bool Solidtype.Check.value -> - ?on_auto_focus_menu_change:bool Solidtype.Solid.setter Solidtype.Check.value -> + ?on_auto_focus_menu_change: + bool Solidtype.Solid.setter Solidtype.Check.value -> ?default_value:string Solidtype.Check.value -> ?value:string Js.Null.t Solidtype.Check.value -> ?on_value_change:(string Js.Nullable.t -> unit) -> @@ -3708,7 +4199,8 @@ module NavigationMenu = struct ?overflow_padding:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3723,7 +4215,8 @@ module NavigationMenu = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3749,7 +4242,9 @@ module NavigationMenu = struct ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3767,7 +4262,8 @@ module NavigationMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3783,7 +4279,8 @@ module NavigationMenu = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3797,7 +4294,8 @@ module NavigationMenu = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3814,7 +4312,8 @@ module NavigationMenu = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3822,7 +4321,8 @@ module NavigationMenu = struct [@@mel.module "@kobalte/core/navigation-menu"] end - external use_navigation_menu_context : unit -> Types.NavigationMenuContextValue.t = "useNavigationMenuContext" + external use_navigation_menu_context : + unit -> Types.NavigationMenuContextValue.t = "useNavigationMenuContext" [@@mel.module "@kobalte/core/navigation-menu"] end @@ -3832,7 +4332,8 @@ module NumberField = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3840,13 +4341,15 @@ module NumberField = struct [@@mel.module "@kobalte/core/number-field"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3854,14 +4357,16 @@ module NumberField = struct [@@mel.module "@kobalte/core/number-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3873,7 +4378,8 @@ module NumberField = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3886,7 +4392,8 @@ module NumberField = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3899,7 +4406,8 @@ module NumberField = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3913,7 +4421,8 @@ module NumberField = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3921,7 +4430,8 @@ module NumberField = struct [@@mel.module "@kobalte/core/number-field"] end - (** A text input that allow users to input custom text entries with a keyboard. *) + (** A text input that allow users to input custom text entries with a + keyboard. *) module Root = struct module Props = struct external check : @@ -3940,15 +4450,17 @@ module NumberField = struct ?allowed_input:Js.Re.t Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?text_value:string Solidtype.Check.value -> - ?translations:Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3956,7 +4468,8 @@ module NumberField = struct [@@mel.module "@kobalte/core/number-field"] end - external use_number_field_context : unit -> Types.NumberFieldContextValue.t = "useNumberFieldContext" + external use_number_field_context : unit -> Types.NumberFieldContextValue.t + = "useNumberFieldContext" [@@mel.module "@kobalte/core/number-field"] end @@ -3966,7 +4479,8 @@ module Pagination = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3980,7 +4494,8 @@ module Pagination = struct page:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3992,7 +4507,9 @@ module Pagination = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4005,7 +4522,8 @@ module Pagination = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4018,7 +4536,8 @@ module Pagination = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4038,12 +4557,14 @@ module Pagination = struct ?show_first:bool Solidtype.Check.value -> ?show_last:bool Solidtype.Check.value -> ?fixed_items:(string, bool) Types.Either.t Solidtype.Check.value -> - item_component:(Types.Pagination_Root_ItemComponent.t -> Solidtype.Jsx.element) -> + item_component: + (Types.Pagination_Root_ItemComponent_Props.t -> Solidtype.Jsx.element) -> ellipsis_component:(unit -> Solidtype.Jsx.element) -> ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Nav.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Nav.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Nav.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4051,19 +4572,22 @@ module Pagination = struct [@@mel.module "@kobalte/core/pagination"] end - external use_pagination_context : unit -> Types.PaginationContextValue.t = "usePaginationContext" + external use_pagination_context : unit -> Types.PaginationContextValue.t + = "usePaginationContext" [@@mel.module "@kobalte/core/pagination"] end module Popover = struct - (** An optional element to position the `Popover.Content` against. - If this part is not used, the content will position alongside the `Popover.Trigger`. *) + (** An optional element to position the `Popover.Content` against. If this + part is not used, the content will position alongside the + `Popover.Trigger`. *) module Anchor = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4071,15 +4595,16 @@ module Popover = struct [@@mel.module "@kobalte/core/popover"] end - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4093,7 +4618,8 @@ module Popover = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4113,7 +4639,8 @@ module Popover = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4121,13 +4648,15 @@ module Popover = struct [@@mel.module "@kobalte/core/popover"] end - (** An optional accessible description to be announced when the popover is open. *) + (** An optional accessible description to be announced when the popover is + open. *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.P.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.P.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.P.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4144,7 +4673,9 @@ module Popover = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4156,7 +4687,8 @@ module Popover = struct module Root = struct module Props = struct external check : - ?anchor_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?anchor_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?open_:bool Solidtype.Check.value -> ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> @@ -4179,7 +4711,9 @@ module Popover = struct ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4193,7 +4727,8 @@ module Popover = struct external check : ?as_:(Solidtype.Html.H2.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H2.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H2.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4207,7 +4742,8 @@ module Popover = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4215,19 +4751,21 @@ module Popover = struct [@@mel.module "@kobalte/core/popover"] end - external use_popover_context : unit -> Types.PopoverContextValue.t = "usePopoverContext" + external use_popover_context : unit -> Types.PopoverContextValue.t + = "usePopoverContext" [@@mel.module "@kobalte/core/popover"] end module Progress = struct - (** The component that visually represents the progress value. - Used to visually show the fill of `Progress.Track`. *) + (** The component that visually represents the progress value. Used to + visually show the fill of `Progress.Track`. *) module Fill = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4241,7 +4779,8 @@ module Progress = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4249,7 +4788,8 @@ module Progress = struct [@@mel.module "@kobalte/core/progress"] end - (** Progress show either determinate or indeterminate progress of an operation over time. *) + (** Progress show either determinate or indeterminate progress of an operation + over time. *) module Root = struct module Props = struct external check : @@ -4257,10 +4797,11 @@ module Progress = struct ?value:float Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> - ?get_value_label:(Types.GetValueLabelParams.t -> string) -> + ?get_value_label:(Types.Meter_GetValueLabelParams.t -> string) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4268,14 +4809,15 @@ module Progress = struct [@@mel.module "@kobalte/core/progress"] end - (** The component that visually represents the progress track. - Act as a container for `Progress.Fill`. *) + (** The component that visually represents the progress track. Act as a + container for `Progress.Fill`. *) module Track = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4283,13 +4825,15 @@ module Progress = struct [@@mel.module "@kobalte/core/progress"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4297,18 +4841,21 @@ module Progress = struct [@@mel.module "@kobalte/core/progress"] end - external use_progress_context : unit -> Types.ProgressContextValue.t = "useProgressContext" + external use_progress_context : unit -> Types.ProgressContextValue.t + = "useProgressContext" [@@mel.module "@kobalte/core/progress"] end module RadioGroup = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4316,14 +4863,16 @@ module RadioGroup = struct [@@mel.module "@kobalte/core/radio-group"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4339,7 +4888,8 @@ module RadioGroup = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4353,7 +4903,8 @@ module RadioGroup = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4361,13 +4912,15 @@ module RadioGroup = struct [@@mel.module "@kobalte/core/radio-group"] end - (** The description that gives the user more information on the radio button. *) + (** The description that gives the user more information on the radio button. + *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4376,14 +4929,16 @@ module RadioGroup = struct end (** The visual indicator rendered when the radio item is in a checked state. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + You can style this element directly, or you can use it as a wrapper to put + an icon into, or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4397,7 +4952,8 @@ module RadioGroup = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4411,7 +4967,8 @@ module RadioGroup = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4425,7 +4982,8 @@ module RadioGroup = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4433,8 +4991,10 @@ module RadioGroup = struct [@@mel.module "@kobalte/core/radio-group"] end - (** A set of checkable buttons, known as radio buttons, where no more than one of the buttons can be checked at a time. - This component is based on the \[WAI-ARIA Radio Group Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/) *) + (** A set of checkable buttons, known as radio buttons, where no more than one + of the buttons can be checked at a time. This component is based on the + \[WAI-ARIA Radio Group + Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/) *) module Root = struct module Props = struct external check : @@ -4444,13 +5004,14 @@ module RadioGroup = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4458,7 +5019,8 @@ module RadioGroup = struct [@@mel.module "@kobalte/core/radio-group"] end - external use_radio_group_context : unit -> Types.RadioGroupContextValue.t = "useRadioGroupContext" + external use_radio_group_context : unit -> Types.RadioGroupContextValue.t + = "useRadioGroupContext" [@@mel.module "@kobalte/core/radio-group"] end @@ -4468,7 +5030,8 @@ module Rating = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4476,13 +5039,15 @@ module Rating = struct [@@mel.module "@kobalte/core/rating"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4490,14 +5055,16 @@ module Rating = struct [@@mel.module "@kobalte/core/rating"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4509,7 +5076,8 @@ module Rating = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4522,7 +5090,8 @@ module Rating = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4535,7 +5104,13 @@ module Rating = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.RatingItemState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( Types.RatingItemState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4548,7 +5123,8 @@ module Rating = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4561,7 +5137,8 @@ module Rating = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4574,7 +5151,8 @@ module Rating = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4592,13 +5170,14 @@ module Rating = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4608,15 +5187,16 @@ module Rating = struct end module Search = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4634,7 +5214,8 @@ module Search = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4648,7 +5229,13 @@ module Search = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('option Types.ComboboxControlState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( 'option Types.ComboboxControlState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4656,13 +5243,15 @@ module Search = struct [@@mel.module "@kobalte/core/search"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4674,7 +5263,8 @@ module Search = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Select.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Select.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4682,14 +5272,16 @@ module Search = struct [@@mel.module "@kobalte/core/search"] end - (** A small icon often displayed next to the value as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon `children`. *) + (** A small icon often displayed next to the value as a visual affordance for + the fact it can be open. It renders a `▼` by default, but you can use your + own icon `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4703,7 +5295,8 @@ module Search = struct ?loading_component:Solidtype.Jsx.element Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4716,7 +5309,8 @@ module Search = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4731,7 +5325,8 @@ module Search = struct item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4739,14 +5334,16 @@ module Search = struct [@@mel.module "@kobalte/core/search"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4754,14 +5351,15 @@ module Search = struct [@@mel.module "@kobalte/core/search"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4775,7 +5373,8 @@ module Search = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4787,11 +5386,21 @@ module Search = struct module Listbox = struct module Props = struct external check : - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4805,7 +5414,8 @@ module Search = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4822,7 +5432,9 @@ module Search = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4841,7 +5453,7 @@ module Search = struct ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -4873,26 +5485,36 @@ module Search = struct ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?debounce_options_millisecond:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" + external component_js : unit Solidtype.Jsx.component = "Root" [@@mel.module "@kobalte/core/search"] + + let component = + component_js + |> Solidtype.Arity.adapted "onOpenChange" (fun f -> + fun[@u] x0 x1 -> f x0 x1) end (** A search is a combobox where the filter is external. *) @@ -4907,7 +5529,7 @@ module Search = struct ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -4939,36 +5561,47 @@ module Search = struct ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?debounce_options_millisecond:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" + external component_js : unit Solidtype.Jsx.component = "Root" [@@mel.module "@kobalte/core/search"] + + let component = + component_js + |> Solidtype.Arity.adapted "onOpenChange" (fun f -> + fun[@u] x0 x1 -> f x0 x1) end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section = struct module Props = struct external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4976,18 +5609,21 @@ module Search = struct [@@mel.module "@kobalte/core/search"] end - external use_search_context : unit -> Types.SearchContextValue.t = "useSearchContext" + external use_search_context : unit -> Types.SearchContextValue.t + = "useSearchContext" [@@mel.module "@kobalte/core/search"] end module SegmentedControl = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4995,14 +5631,16 @@ module SegmentedControl = struct [@@mel.module "@kobalte/core/segmented-control"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5015,7 +5653,8 @@ module SegmentedControl = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5030,7 +5669,8 @@ module SegmentedControl = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5044,7 +5684,8 @@ module SegmentedControl = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5052,13 +5693,15 @@ module SegmentedControl = struct [@@mel.module "@kobalte/core/segmented-control"] end - (** The description that gives the user more information on the radio button. *) + (** The description that gives the user more information on the radio button. + *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5067,14 +5710,16 @@ module SegmentedControl = struct end (** The visual indicator rendered when the radio item is in a checked state. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + You can style this element directly, or you can use it as a wrapper to put + an icon into, or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5087,7 +5732,8 @@ module SegmentedControl = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5101,7 +5747,8 @@ module SegmentedControl = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5115,7 +5762,8 @@ module SegmentedControl = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5132,14 +5780,15 @@ module SegmentedControl = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?ref:(Dom.htmlElement -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5147,20 +5796,22 @@ module SegmentedControl = struct [@@mel.module "@kobalte/core/segmented-control"] end - external use_segmented_control_context : unit -> Types.SegmentedControlContextValue.t = "useSegmentedControlContext" + external use_segmented_control_context : + unit -> Types.SegmentedControlContextValue.t = "useSegmentedControlContext" [@@mel.module "@kobalte/core/segmented-control"] end module Select = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5178,7 +5829,8 @@ module Select = struct ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5186,13 +5838,15 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5200,14 +5854,16 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5219,7 +5875,8 @@ module Select = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Select.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Select.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5227,14 +5884,16 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** A small icon often displayed next to the value as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon `children`. *) + (** A small icon often displayed next to the value as a visual affordance for + the fact it can be open. It renders a `▼` by default, but you can use your + own icon `children`. *) module Icon = struct module Props = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5249,7 +5908,8 @@ module Select = struct item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5257,14 +5917,16 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5272,15 +5934,17 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** The visual indicator rendered when the item is selected. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the item is selected. You can style + this element directly, or you can use it as a wrapper to put an icon into, + or both. *) module ItemIndicator = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5288,14 +5952,15 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5309,7 +5974,8 @@ module Select = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5321,11 +5987,21 @@ module Select = struct module Listbox = struct module Props = struct external check : - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5342,7 +6018,9 @@ module Select = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5350,7 +6028,8 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** Displays a list of options for the user to pick from — triggered by a button. *) + (** Displays a list of options for the user to pick from — triggered by a + button. *) module Root = struct module Props = struct external check : @@ -5360,7 +6039,7 @@ module Select = struct ?id:string Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -5387,20 +6066,25 @@ module Select = struct ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.SelectBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.SelectBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.SelectBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.SelectBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?disallow_type_ahead:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5408,7 +6092,8 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** Displays a list of options for the user to pick from — triggered by a button. *) + (** Displays a list of options for the user to pick from — triggered by a + button. *) module Root_multiple = struct module Props = struct external check : @@ -5419,7 +6104,7 @@ module Select = struct ?id:string Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -5446,20 +6131,25 @@ module Select = struct ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.SelectBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.SelectBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.SelectBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.SelectBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?disallow_type_ahead:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5467,14 +6157,15 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section = struct module Props = struct external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5487,7 +6178,8 @@ module Select = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5501,7 +6193,13 @@ module Select = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('option Types.SelectValueState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children: + ( 'option Types.SelectValueState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5509,7 +6207,8 @@ module Select = struct [@@mel.module "@kobalte/core/select"] end - external use_select_context : unit -> Types.SelectContextValue.t = "useSelectContext" + external use_select_context : unit -> Types.SelectContextValue.t + = "useSelectContext" [@@mel.module "@kobalte/core/select"] end @@ -5521,7 +6220,8 @@ module Separator = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5542,7 +6242,8 @@ module Skeleton = struct ?animate:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5552,13 +6253,15 @@ module Skeleton = struct end module Slider = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5566,14 +6269,16 @@ module Slider = struct [@@mel.module "@kobalte/core/slider"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5581,14 +6286,15 @@ module Slider = struct [@@mel.module "@kobalte/core/slider"] end - (** The component that visually represents the slider value. - Used to visually show the fill of `Slider.Track`. *) + (** The component that visually represents the slider value. Used to visually + show the fill of `Slider.Track`. *) module Fill = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5602,7 +6308,8 @@ module Slider = struct external check : ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5616,7 +6323,8 @@ module Slider = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5636,17 +6344,18 @@ module Slider = struct ?max_value:float Solidtype.Check.value -> ?step:float Solidtype.Check.value -> ?min_steps_between_thumbs:float Solidtype.Check.value -> - ?get_value_label:(Types.GetValueLabelParams2.t -> string) -> + ?get_value_label:(Types.Slider_GetValueLabelParams.t -> string) -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5659,7 +6368,8 @@ module Slider = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5667,14 +6377,15 @@ module Slider = struct [@@mel.module "@kobalte/core/slider"] end - (** The component that visually represents the slider track. - Act as a container for `Slider.Fill`. *) + (** The component that visually represents the slider track. Act as a + container for `Slider.Fill`. *) module Track = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5682,13 +6393,15 @@ module Slider = struct [@@mel.module "@kobalte/core/slider"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5696,7 +6409,8 @@ module Slider = struct [@@mel.module "@kobalte/core/slider"] end - external use_slider_context : unit -> Types.SliderContextValue.t = "useSliderContext" + external use_slider_context : unit -> Types.SliderContextValue.t + = "useSliderContext" [@@mel.module "@kobalte/core/slider"] end @@ -5704,12 +6418,13 @@ module SpinButton = struct module Root = struct module Props = struct external check : - ?translations:Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> ?value:(string, float) Types.Either.t Solidtype.Check.value -> ?text_value:string Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> @@ -5721,7 +6436,8 @@ module SpinButton = struct ?on_increment_to_max:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5737,7 +6453,8 @@ module Switch = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5751,7 +6468,8 @@ module Switch = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5759,14 +6477,16 @@ module Switch = struct [@@mel.module "@kobalte/core/switch"] end - (** The error message that gives the user information about how to fix a validation error on the switch. *) + (** The error message that gives the user information about how to fix a + validation error on the switch. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5780,7 +6500,8 @@ module Switch = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5794,7 +6515,8 @@ module Switch = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5811,13 +6533,19 @@ module Switch = struct ?on_change:(bool -> unit) -> ?value:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.SwitchRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( Types.SwitchRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5825,13 +6553,15 @@ module Switch = struct [@@mel.module "@kobalte/core/switch"] end - (** The thumb that is used to visually indicate whether the switch is on or off. *) + (** The thumb that is used to visually indicate whether the switch is on or + off. *) module Thumb = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5839,7 +6569,8 @@ module Switch = struct [@@mel.module "@kobalte/core/switch"] end - external use_switch_context : unit -> Types.SwitchContextValue.t = "useSwitchContext" + external use_switch_context : unit -> Types.SwitchContextValue.t + = "useSwitchContext" [@@mel.module "@kobalte/core/switch"] end @@ -5852,7 +6583,8 @@ module Tabs = struct ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5860,14 +6592,16 @@ module Tabs = struct [@@mel.module "@kobalte/core/tabs"] end - (** The visual indicator displayed at the bottom of the tab list to indicate the selected tab. - It provides the base style needed to display a smooth transition to the new selected tab. *) + (** The visual indicator displayed at the bottom of the tab list to indicate + the selected tab. It provides the base style needed to display a smooth + transition to the new selected tab. *) module Indicator = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5875,13 +6609,15 @@ module Tabs = struct [@@mel.module "@kobalte/core/tabs"] end - (** Contains the tabs that are aligned along the edge of the active tab panel. *) + (** Contains the tabs that are aligned along the edge of the active tab panel. + *) module List = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5889,8 +6625,9 @@ module Tabs = struct [@@mel.module "@kobalte/core/tabs"] end - (** A set of layered sections of content, known as tab panels, that display one panel of content at a time. - `Tabs` contains all the parts of a tabs component and provide context for its children. *) + (** A set of layered sections of content, known as tab panels, that display + one panel of content at a time. `Tabs` contains all the parts of a tabs + component and provide context for its children. *) module Root = struct module Props = struct external check : @@ -5898,11 +6635,12 @@ module Tabs = struct ?default_value:string Solidtype.Check.value -> ?on_change:(string -> unit) -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> - ?activation_mode:[ `manual | `automatic ] Solidtype.Check.value -> + ?activation_mode:[ `automatic | `manual ] Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5918,7 +6656,8 @@ module Tabs = struct ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5926,18 +6665,21 @@ module Tabs = struct [@@mel.module "@kobalte/core/tabs"] end - external use_tabs_context : unit -> Types.TabsContextValue.t = "useTabsContext" + external use_tabs_context : unit -> Types.TabsContextValue.t + = "useTabsContext" [@@mel.module "@kobalte/core/tabs"] end module TextField = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5945,14 +6687,16 @@ module TextField = struct [@@mel.module "@kobalte/core/text-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5965,7 +6709,8 @@ module TextField = struct external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5979,7 +6724,8 @@ module TextField = struct external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5987,7 +6733,8 @@ module TextField = struct [@@mel.module "@kobalte/core/text-field"] end - (** A text input that allow users to input custom text entries with a keyboard. *) + (** A text input that allow users to input custom text entries with a + keyboard. *) module Root = struct module Props = struct external check : @@ -5996,13 +6743,14 @@ module TextField = struct ?on_change:(string -> unit) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6018,7 +6766,8 @@ module TextField = struct ?submit_on_enter:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Textarea.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Textarea.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Textarea.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6026,18 +6775,21 @@ module TextField = struct [@@mel.module "@kobalte/core/text-field"] end - external use_text_field_context : unit -> Types.TextFieldContextValue.t = "useTextFieldContext" + external use_text_field_context : unit -> Types.TextFieldContextValue.t + = "useTextFieldContext" [@@mel.module "@kobalte/core/text-field"] end module TimeField = struct - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6045,14 +6797,16 @@ module TimeField = struct [@@mel.module "@kobalte/core/time-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage = struct module Props = struct external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6064,7 +6818,8 @@ module TimeField = struct module Props = struct external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6077,7 +6832,14 @@ module TimeField = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:([ `hour | `minute | `second | `dayPeriod ] Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( [ `dayPeriod | `hour | `minute | `second ] Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6090,7 +6852,8 @@ module TimeField = struct external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6105,21 +6868,26 @@ module TimeField = struct ?default_value:Types.Time.t Solidtype.Check.value -> ?on_change:(Types.Time.t -> unit) -> ?hour_cycle:float Solidtype.Check.value -> - ?granularity:([ `hour | `minute | `second ], Types.TimeField_Root_Granularity.t) Types.Either.t Solidtype.Check.value -> + ?granularity: + ( [ `hour | `minute | `second ], + Types.TimeField_Root_Granularity.t ) + Types.Either.t + Solidtype.Check.value -> ?force_leading_zeros:bool Solidtype.Check.value -> ?placeholder:Types.Time.t Solidtype.Check.value -> ?min:Types.Time.t Solidtype.Check.value -> ?max:Types.Time.t Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?translations:Types.TimeField_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6130,10 +6898,11 @@ module TimeField = struct module Segment = struct module Props = struct external check : - segment:[ `hour | `minute | `second | `dayPeriod ] Solidtype.Check.value -> + segment:[ `dayPeriod | `hour | `minute | `second ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6149,7 +6918,8 @@ module Toast = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6157,13 +6927,15 @@ module Toast = struct [@@mel.module "@kobalte/core/toast"] end - (** An optional accessible description to be announced when the toast is open. *) + (** An optional accessible description to be announced when the toast is open. + *) module Description = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6171,14 +6943,15 @@ module Toast = struct [@@mel.module "@kobalte/core/toast"] end - (** The list containing all rendered toasts. - Must be inside a `Toast.Region`. *) + (** The list containing all rendered toasts. Must be inside a `Toast.Region`. + *) module List = struct module Props = struct external check : ?as_:(Solidtype.Html.Ol.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ol.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Ol.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6186,14 +6959,15 @@ module Toast = struct [@@mel.module "@kobalte/core/toast"] end - (** The component that visually represents the toast remaining lifetime. - Used to visually show the fill of `Toast.ProgressTrack`. *) + (** The component that visually represents the toast remaining lifetime. Used + to visually show the fill of `Toast.ProgressTrack`. *) module ProgressFill = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6201,14 +6975,15 @@ module Toast = struct [@@mel.module "@kobalte/core/toast"] end - (** The component that visually represents the toast lifetime. - Act as a container for `Toast.ProgressFill`. *) + (** The component that visually represents the toast lifetime. Act as a + container for `Toast.ProgressFill`. *) module ProgressTrack = struct module Props = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6216,8 +6991,9 @@ module Toast = struct [@@mel.module "@kobalte/core/toast"] end - (** The fixed area where toasts appear. Users can jump to by pressing a hotkey. - It is up to you to ensure the discoverability of the hotkey for keyboard users. *) + (** The fixed area where toasts appear. Users can jump to by pressing a + hotkey. It is up to you to ensure the discoverability of the hotkey for + keyboard users. *) module Region = struct module Props = struct external check : @@ -6225,7 +7001,7 @@ module Toast = struct ?hotkey:string array Solidtype.Check.value -> ?duration:float Solidtype.Check.value -> ?limit:float Solidtype.Check.value -> - ?swipe_direction:[ `left | `right | `up | `down ] Solidtype.Check.value -> + ?swipe_direction:[ `down | `left | `right | `up ] Solidtype.Check.value -> ?swipe_threshold:float Solidtype.Check.value -> ?pause_on_interaction:bool Solidtype.Check.value -> ?pause_on_page_idle:bool Solidtype.Check.value -> @@ -6233,7 +7009,8 @@ module Toast = struct ?region_id:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6258,7 +7035,8 @@ module Toast = struct ?on_escape_key_down:(Dom.keyboardEvent -> unit) -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6272,7 +7050,8 @@ module Toast = struct external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6283,13 +7062,15 @@ module Toast = struct external toaster : Types.Toast_Toaster.t = "toaster" [@@mel.module "@kobalte/core/toast"] - external use_toast_context : unit -> Types.ToastContextValue.t = "useToastContext" + external use_toast_context : unit -> Types.ToastContextValue.t + = "useToastContext" [@@mel.module "@kobalte/core/toast"] end module ToggleButton = struct - (** A two-state button that allow users to toggle a selection on or off. - This component is based on the \[WAI-ARIA Button Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) + (** A two-state button that allow users to toggle a selection on or off. This + component is based on the \[WAI-ARIA Button + Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) module Root = struct module Props = struct external check : @@ -6298,7 +7079,13 @@ module ToggleButton = struct ?on_change:(bool -> unit) -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children: + ( Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6314,7 +7101,13 @@ module ToggleGroup = struct value:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children: + ( Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6332,7 +7125,8 @@ module ToggleGroup = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6351,7 +7145,8 @@ module ToggleGroup = struct ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6359,20 +7154,22 @@ module ToggleGroup = struct [@@mel.module "@kobalte/core/toggle-group"] end - external use_toggle_group_context : unit -> Types.ToggleGroupContextValue.t = "useToggleGroupContext" + external use_toggle_group_context : unit -> Types.ToggleGroupContextValue.t + = "useToggleGroupContext" [@@mel.module "@kobalte/core/toggle-group"] end module Tooltip = struct - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow = struct module Props = struct external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6388,7 +7185,8 @@ module Tooltip = struct ?on_pointer_down_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6405,7 +7203,9 @@ module Tooltip = struct ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6413,8 +7213,8 @@ module Tooltip = struct [@@mel.module "@kobalte/core/tooltip"] end - (** A popup that displays information related to an element - when the element receives keyboard focus or the mouse hovers over it. *) + (** A popup that displays information related to an element when the element + receives keyboard focus or the mouse hovers over it. *) module Root = struct module Props = struct external check : @@ -6444,7 +7244,9 @@ module Tooltip = struct ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6458,7 +7260,8 @@ module Tooltip = struct external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6466,29 +7269,46 @@ module Tooltip = struct [@@mel.module "@kobalte/core/tooltip"] end - external use_tooltip_context : unit -> Types.TooltipContextValue.t = "useTooltipContext" + external use_tooltip_context : unit -> Types.TooltipContextValue.t + = "useTooltipContext" [@@mel.module "@kobalte/core/tooltip"] end module Selection = struct - (** Provides state management for list-like components. - Handles building a collection of items from props, and manages multiple selection state. *) - external create_list_state : _ Types.CreateListStateProps.t -> Types.ListState.t = "createListState" + external create_list_state : + _ Types.CreateListStateProps.t -> Types.ListState.t = "createListState" [@@mel.module "@kobalte/core"] - - (** Handles interactions with selectable collections. *) - external create_selectable_collection : Types.CreateSelectableCollectionProps.t -> 't Dom.element_like option Solidtype.Solid.accessor -> ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> unit -> Types.Selection_CreateSelectableCollection.t = "createSelectableCollection" + (** Provides state management for list-like components. Handles building a + collection of items from props, and manages multiple selection state. *) + + external create_selectable_collection : + Types.CreateSelectableCollectionProps.t -> + 't Dom.element_like option Solidtype.Solid.accessor -> + ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> + unit -> + Types.Selection_CreateSelectableCollection.t = "createSelectableCollection" [@@mel.module "@kobalte/core"] + (** Handles interactions with selectable collections. *) - (** Handles interactions with an item in a selectable collection. *) - external create_selectable_item : Types.CreateSelectableItemProps.t -> 't Dom.element_like option Solidtype.Solid.accessor -> Types.Selection_CreateSelectableItem.t = "createSelectableItem" + external create_selectable_item : + Types.CreateSelectableItemProps.t -> + 't Dom.element_like option Solidtype.Solid.accessor -> + Types.Selection_CreateSelectableItem.t = "createSelectableItem" [@@mel.module "@kobalte/core"] + (** Handles interactions with an item in a selectable collection. *) - (** Handles interactions with a selectable list. *) - external create_selectable_list : _ Types.CreateSelectableListProps.t -> 't Dom.element_like option Solidtype.Solid.accessor -> ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> unit -> Types.Selection_CreateSelectableList.t = "createSelectableList" + external create_selectable_list : + _ Types.CreateSelectableListProps.t -> + 't Dom.element_like option Solidtype.Solid.accessor -> + ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> + unit -> + Types.Selection_CreateSelectableList.t = "createSelectableList" [@@mel.module "@kobalte/core"] + (** Handles interactions with a selectable list. *) - (** Handles typeahead interactions with collections. *) - external create_type_select : Types.CreateTypeSelectProps.t -> Types.Selection_CreateTypeSelect.t = "createTypeSelect" + external create_type_select : + Types.CreateTypeSelectProps.t -> Types.Selection_CreateTypeSelect.t + = "createTypeSelect" [@@mel.module "@kobalte/core"] + (** Handles typeahead interactions with collections. *) end diff --git a/kobalte/solidtype_kobalte.mli b/kobalte/solidtype_kobalte.mli index 907c9627..cd8b3859 100644 --- a/kobalte/solidtype_kobalte.mli +++ b/kobalte/solidtype_kobalte.mli @@ -9,13 +9,15 @@ module Types = Types module Accordion : sig - (** Contains the content to be rendered when the `Accordion.Item` is expanded. *) + (** Contains the content to be rendered when the `Accordion.Item` is expanded. + *) module Content : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -23,14 +25,15 @@ module Accordion : sig [@@mel.module "@kobalte/core/accordion"] end - (** Wraps an `Accordion.Trigger`. - Use the `as` prop to update it to the appropriate heading level for your page. *) + (** Wraps an `Accordion.Trigger`. Use the `as` prop to update it to the + appropriate heading level for your page. *) module Header : sig module Props : sig external check : ?as_:(Solidtype.Html.H3.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H3.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H3.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -38,7 +41,8 @@ module Accordion : sig [@@mel.module "@kobalte/core/accordion"] end - (** An item of the accordion, contains all the parts of a collapsible section. *) + (** An item of the accordion, contains all the parts of a collapsible section. + *) module Item : sig module Props : sig external check : @@ -47,7 +51,8 @@ module Accordion : sig ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -55,7 +60,8 @@ module Accordion : sig [@@mel.module "@kobalte/core/accordion"] end - (** A vertically stacked set of interactive headings that each reveal an associated section of content. *) + (** A vertically stacked set of interactive headings that each reveal an + associated section of content. *) module Root : sig module Props : sig external check : @@ -67,7 +73,8 @@ module Accordion : sig ?should_focus_wrap:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -75,13 +82,15 @@ module Accordion : sig [@@mel.module "@kobalte/core/accordion"] end - (** Toggles the collapsed state of its associated item. It should be nested inside an `Accordion.Header`. *) + (** Toggles the collapsed state of its associated item. It should be nested + inside an `Accordion.Header`. *) module Trigger : sig module Props : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -89,19 +98,21 @@ module Accordion : sig [@@mel.module "@kobalte/core/accordion"] end - external use_accordion_context : unit -> Types.AccordionContextValue.t = "useAccordionContext" + external use_accordion_context : unit -> Types.AccordionContextValue.t + = "useAccordionContext" [@@mel.module "@kobalte/core/accordion"] end module Alert : sig - (** Alert displays a brief, important message - in a way that attracts the user's attention without interrupting the user's task. *) + (** Alert displays a brief, important message in a way that attracts the + user's attention without interrupting the user's task. *) module Root : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -117,7 +128,8 @@ module AlertDialog : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -125,7 +137,8 @@ module AlertDialog : sig [@@mel.module "@kobalte/core/alert-dialog"] end - (** Overrides the regular `Dialog.Content` with role="alertdialog" to interrupt the user. *) + (** Overrides the regular `Dialog.Content` with role="alertdialog" to + interrupt the user. *) module Content : sig module Props : sig external check : @@ -137,7 +150,8 @@ module AlertDialog : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -145,13 +159,15 @@ module AlertDialog : sig [@@mel.module "@kobalte/core/alert-dialog"] end - (** An optional accessible description to be announced when the dialog is open. *) + (** An optional accessible description to be announced when the dialog is + open. *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.P.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.P.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.P.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -159,13 +175,15 @@ module AlertDialog : sig [@@mel.module "@kobalte/core/alert-dialog"] end - (** A layer that covers the inert portion of the view when the dialog is open. *) + (** A layer that covers the inert portion of the view when the dialog is open. + *) module Overlay : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -182,7 +200,9 @@ module AlertDialog : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -190,11 +210,13 @@ module AlertDialog : sig [@@mel.module "@kobalte/core/alert-dialog"] end - (** A dialog is a window overlaid on either the primary window or another dialog window. *) + (** A dialog is a window overlaid on either the primary window or another + dialog window. *) module Root : sig module Props : sig external check : - ?translations:Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> ?open_:bool Solidtype.Check.value -> ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> @@ -203,7 +225,9 @@ module AlertDialog : sig ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -217,7 +241,8 @@ module AlertDialog : sig external check : ?as_:(Solidtype.Html.H2.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H2.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H2.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -231,7 +256,8 @@ module AlertDialog : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -247,7 +273,8 @@ module Badge : sig ?text_value:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -264,7 +291,8 @@ module Breadcrumbs : sig ?current:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -272,15 +300,18 @@ module Breadcrumbs : sig [@@mel.module "@kobalte/core/breadcrumbs"] end - (** Breadcrumbs show hierarchy and navigational context for a user’s location within an application. *) + (** Breadcrumbs show hierarchy and navigational context for a user’s location + within an application. *) module Root : sig module Props : sig external check : ?separator:Solidtype.Jsx.element Solidtype.Check.value -> - ?translations:Types.Breadcrumbs_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.Breadcrumbs_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Nav.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Nav.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Nav.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -288,14 +319,15 @@ module Breadcrumbs : sig [@@mel.module "@kobalte/core/breadcrumbs"] end - (** The visual separator between each breadcrumb items. - It will not be visible by screen readers. *) + (** The visual separator between each breadcrumb items. It will not be visible + by screen readers. *) module Separator : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -303,20 +335,23 @@ module Breadcrumbs : sig [@@mel.module "@kobalte/core/breadcrumbs"] end - external use_breadcrumbs_context : unit -> Types.BreadcrumbsContextValue.t = "useBreadcrumbsContext" + external use_breadcrumbs_context : unit -> Types.BreadcrumbsContextValue.t + = "useBreadcrumbsContext" [@@mel.module "@kobalte/core/breadcrumbs"] end module Button : sig - (** Button enables users to trigger an action or event, such as submitting a form, - opening a dialog, canceling an action, or performing a delete operation. - This component is based on the \[WAI-ARIA Button Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) + (** Button enables users to trigger an action or event, such as submitting a + form, opening a dialog, canceling an action, or performing a delete + operation. This component is based on the \[WAI-ARIA Button + Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) module Root : sig module Props : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -332,7 +367,8 @@ module Checkbox : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -347,7 +383,8 @@ module Checkbox : sig ?id:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -355,7 +392,8 @@ module Checkbox : sig [@@mel.module "@kobalte/core/checkbox"] end - (** The error message that gives the user information about how to fix a validation error on the checkbox. *) + (** The error message that gives the user information about how to fix a + validation error on the checkbox. *) module ErrorMessage : sig module Props : sig external check : @@ -363,7 +401,8 @@ module Checkbox : sig ?id:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -371,15 +410,17 @@ module Checkbox : sig [@@mel.module "@kobalte/core/checkbox"] end - (** The visual indicator rendered when the checkbox is in a checked or indeterminate state. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the checkbox is in a checked or + indeterminate state. You can style this element directly, or you can use + it as a wrapper to put an icon into, or both. *) module Indicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -393,7 +434,8 @@ module Checkbox : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -407,7 +449,8 @@ module Checkbox : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -415,7 +458,8 @@ module Checkbox : sig [@@mel.module "@kobalte/core/checkbox"] end - (** A control that allows the user to toggle between checked and not checked. *) + (** A control that allows the user to toggle between checked and not checked. + *) module Root : sig module Props : sig external check : @@ -425,13 +469,19 @@ module Checkbox : sig ?indeterminate:bool Solidtype.Check.value -> ?value:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.CheckboxRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( Types.CheckboxRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -439,7 +489,8 @@ module Checkbox : sig [@@mel.module "@kobalte/core/checkbox"] end - external use_checkbox_context : unit -> Types.CheckboxContextValue.t = "useCheckboxContext" + external use_checkbox_context : unit -> Types.CheckboxContextValue.t + = "useCheckboxContext" [@@mel.module "@kobalte/core/checkbox"] end @@ -450,7 +501,8 @@ module Collapsible : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -469,7 +521,8 @@ module Collapsible : sig ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -483,7 +536,8 @@ module Collapsible : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -491,7 +545,8 @@ module Collapsible : sig [@@mel.module "@kobalte/core/collapsible"] end - external use_collapsible_context : unit -> Types.CollapsibleContextValue.t = "useCollapsibleContext" + external use_collapsible_context : unit -> Types.CollapsibleContextValue.t + = "useCollapsibleContext" [@@mel.module "@kobalte/core/collapsible"] end @@ -501,7 +556,8 @@ module ColorArea : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -509,13 +565,15 @@ module ColorArea : sig [@@mel.module "@kobalte/core/color-area"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -523,14 +581,16 @@ module ColorArea : sig [@@mel.module "@kobalte/core/color-area"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -542,7 +602,8 @@ module ColorArea : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -554,7 +615,8 @@ module ColorArea : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -568,7 +630,8 @@ module ColorArea : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -584,20 +647,39 @@ module ColorArea : sig ?default_value:Types.Color.t Solidtype.Check.value -> ?on_change:(Types.Color.t -> unit) -> ?on_change_end:(Types.Color.t -> unit) -> - ?x_channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?y_channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?color_space:[ `rgb | `hsl | `hsb ] Solidtype.Check.value -> + ?x_channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?y_channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?color_space:[ `hsb | `hsl | `rgb ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> ?x_name:string Solidtype.Check.value -> ?y_name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -610,7 +692,8 @@ module ColorArea : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -618,7 +701,8 @@ module ColorArea : sig [@@mel.module "@kobalte/core/color-area"] end - external use_color_area_context : unit -> Types.ColorAreaContextValue.t = "useColorAreaContext" + external use_color_area_context : unit -> Types.ColorAreaContextValue.t + = "useColorAreaContext" [@@mel.module "@kobalte/core/color-area"] end @@ -628,7 +712,8 @@ module ColorChannelField : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -636,13 +721,15 @@ module ColorChannelField : sig [@@mel.module "@kobalte/core/color-channel-field"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -650,14 +737,16 @@ module ColorChannelField : sig [@@mel.module "@kobalte/core/color-channel-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -669,7 +758,8 @@ module ColorChannelField : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -682,7 +772,8 @@ module ColorChannelField : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -695,7 +786,8 @@ module ColorChannelField : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -709,7 +801,8 @@ module ColorChannelField : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -723,12 +816,22 @@ module ColorChannelField : sig ?value:Types.Color.t Solidtype.Check.value -> ?default_value:Types.Color.t Solidtype.Check.value -> ?on_change:(Types.Color.t -> unit) -> - channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?color_space:[ `rgb | `hsl | `hsb ] Solidtype.Check.value -> + channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?color_space:[ `hsb | `hsl | `rgb ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?text_value:string Solidtype.Check.value -> - ?translations:Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> ?step:float Solidtype.Check.value -> @@ -736,12 +839,13 @@ module ColorChannelField : sig ?change_on_wheel:bool Solidtype.Check.value -> ?format:bool Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -751,13 +855,15 @@ module ColorChannelField : sig end module ColorField : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -765,14 +871,16 @@ module ColorField : sig [@@mel.module "@kobalte/core/color-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -785,7 +893,8 @@ module ColorField : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -799,7 +908,8 @@ module ColorField : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -815,13 +925,14 @@ module ColorField : sig ?on_change:(string -> unit) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -829,7 +940,8 @@ module ColorField : sig [@@mel.module "@kobalte/core/color-field"] end - external use_color_field_context : unit -> Types.ColorFieldContextValue.t = "useColorFieldContext" + external use_color_field_context : unit -> Types.ColorFieldContextValue.t + = "useColorFieldContext" [@@mel.module "@kobalte/core/color-field"] end @@ -837,19 +949,22 @@ module ColorMode : sig external color_mode_storage_key : string = "COLOR_MODE_STORAGE_KEY" [@@mel.module "@kobalte/core/color-mode"] - external color_mode_context : Types.ColorModeContextType.t option Types.Context.t = "ColorModeContext" + external color_mode_context : + Types.ColorModeContextType.t option Types.Context.t = "ColorModeContext" [@@mel.module "@kobalte/core/color-mode"] - (** Provides context for the color mode based on config in `theme` - Returns the color mode and function to toggle the color mode *) + (** Provides context for the color mode based on config in `theme` Returns the + color mode and function to toggle the color mode *) module ColorModeProvider : sig module Props : sig external check : - ?initial_color_mode:[ `light | `dark | `system ] Solidtype.Check.value -> + ?initial_color_mode:[ `dark | `light | `system ] Solidtype.Check.value -> ?disable_transition_on_change:bool Solidtype.Check.value -> ?storage_manager:Types.ColorModeStorageManager.t Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -860,12 +975,14 @@ module ColorMode : sig module ColorModeScript : sig module Props : sig external check : - ?initial_color_mode:[ `light | `dark | `system ] Solidtype.Check.value -> - ?storage_type:[ `localStorage | `cookie ] Solidtype.Check.value -> + ?initial_color_mode:[ `dark | `light | `system ] Solidtype.Check.value -> + ?storage_type:[ `cookie | `localStorage ] Solidtype.Check.value -> ?storage_key:string Solidtype.Check.value -> ?nonce:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -873,39 +990,52 @@ module ColorMode : sig [@@mel.module "@kobalte/core/color-mode"] end - external cookie_storage_manager : Types.ColorModeStorageManager.t = "cookieStorageManager" + external cookie_storage_manager : Types.ColorModeStorageManager.t + = "cookieStorageManager" [@@mel.module "@kobalte/core/color-mode"] - external cookie_storage_manager_ssr : string -> Types.ColorModeStorageManager.t = "cookieStorageManagerSSR" + external cookie_storage_manager_ssr : + string -> Types.ColorModeStorageManager.t = "cookieStorageManagerSSR" [@@mel.module "@kobalte/core/color-mode"] - external create_cookie_storage_manager : string -> ?cookie:string -> unit -> Types.ColorModeStorageManager.t = "createCookieStorageManager" + external create_cookie_storage_manager : + string -> ?cookie:string -> unit -> Types.ColorModeStorageManager.t + = "createCookieStorageManager" [@@mel.module "@kobalte/core/color-mode"] - external create_local_storage_manager : string -> Types.ColorModeStorageManager.t = "createLocalStorageManager" + external create_local_storage_manager : + string -> Types.ColorModeStorageManager.t = "createLocalStorageManager" [@@mel.module "@kobalte/core/color-mode"] - external local_storage_manager : Types.ColorModeStorageManager.t = "localStorageManager" + external local_storage_manager : Types.ColorModeStorageManager.t + = "localStorageManager" [@@mel.module "@kobalte/core/color-mode"] - (** Primitive that reads from `ColorModeProvider` context, - Returns the color mode and function to toggle it. *) - external use_color_mode : unit -> Types.ColorModeContextType.t = "useColorMode" + external use_color_mode : unit -> Types.ColorModeContextType.t + = "useColorMode" [@@mel.module "@kobalte/core/color-mode"] - - (** Change value based on color mode. *) - external use_color_mode_value : 't_light -> 't_dark -> ('t_light, 't_dark) Types.Either.t Solidtype.Solid.accessor = "useColorModeValue" + (** Primitive that reads from `ColorModeProvider` context, Returns the color + mode and function to toggle it. *) + + external use_color_mode_value : + 't_light -> + 't_dark -> + ('t_light, 't_dark) Types.Either.t Solidtype.Solid.accessor + = "useColorModeValue" [@@mel.module "@kobalte/core/color-mode"] + (** Change value based on color mode. *) end module ColorSlider : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -913,14 +1043,16 @@ module ColorSlider : sig [@@mel.module "@kobalte/core/color-slider"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -934,7 +1066,8 @@ module ColorSlider : sig external check : ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -948,7 +1081,8 @@ module ColorSlider : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -963,20 +1097,31 @@ module ColorSlider : sig ?default_value:Types.Color.t Solidtype.Check.value -> ?on_change:(Types.Color.t -> unit) -> ?on_change_end:(Types.Color.t -> unit) -> - channel:[ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Check.value -> - ?color_space:[ `rgb | `hsl | `hsb ] Solidtype.Check.value -> + channel: + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Check.value -> + ?color_space:[ `hsb | `hsl | `rgb ] Solidtype.Check.value -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?get_value_label:(Types.Color.t -> string) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> - ?translations:Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -989,7 +1134,8 @@ module ColorSlider : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1002,7 +1148,8 @@ module ColorSlider : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1010,13 +1157,15 @@ module ColorSlider : sig [@@mel.module "@kobalte/core/color-slider"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1024,7 +1173,8 @@ module ColorSlider : sig [@@mel.module "@kobalte/core/color-slider"] end - external use_color_slider_context : unit -> Types.ColorSliderContextValue.t = "useColorSliderContext" + external use_color_slider_context : unit -> Types.ColorSliderContextValue.t + = "useColorSliderContext" [@@mel.module "@kobalte/core/color-slider"] end @@ -1034,10 +1184,12 @@ module ColorSwatch : sig external check : value:Types.Color.t Solidtype.Check.value -> ?color_name:string Solidtype.Check.value -> - ?translations:Types.ColorSwatch_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorSwatch_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1047,13 +1199,15 @@ module ColorSwatch : sig end module ColorWheel : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1061,14 +1215,16 @@ module ColorWheel : sig [@@mel.module "@kobalte/core/color-wheel"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1081,7 +1237,8 @@ module ColorWheel : sig external check : ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1095,7 +1252,8 @@ module ColorWheel : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1106,7 +1264,8 @@ module ColorWheel : sig module Root : sig module Props : sig external check : - ?translations:Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorSlider_Root_Translations.t Solidtype.Check.value -> ?value:Types.Color.t Solidtype.Check.value -> ?default_value:Types.Color.t Solidtype.Check.value -> ?thickness:float Solidtype.Check.value -> @@ -1115,13 +1274,14 @@ module ColorWheel : sig ?get_value_label:(Types.Color.t -> string) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1134,7 +1294,8 @@ module ColorWheel : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1147,7 +1308,8 @@ module ColorWheel : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1160,7 +1322,8 @@ module ColorWheel : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1168,42 +1331,73 @@ module ColorWheel : sig [@@mel.module "@kobalte/core/color-wheel"] end - external use_color_wheel_context : unit -> Types.ColorWheelContextValue.t = "useColorWheelContext" + external use_color_wheel_context : unit -> Types.ColorWheelContextValue.t + = "useColorWheelContext" [@@mel.module "@kobalte/core/color-wheel"] end module Colors : sig - external color_intl_translations : Types.ColorSlider_Root_Translations.t = "COLOR_INTL_TRANSLATIONS" + external color_intl_translations : Types.ColorSlider_Root_Translations.t + = "COLOR_INTL_TRANSLATIONS" [@@mel.module "@kobalte/core/colors"] - (** Returns a list of color channels for a given color space. *) - external get_color_channels : [ `rgb | `hsl | `hsb ] -> ([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ]) = "getColorChannels" + external get_color_channels : + [ `hsb | `hsl | `rgb ] -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "getColorChannels" [@@mel.module "@kobalte/core/colors"] + (** Returns a list of color channels for a given color space. *) - external normalize_color : (string, Types.Color.t) Types.Either.t -> Types.Color.t = "normalizeColor" + external normalize_color : + (string, Types.Color.t) Types.Either.t -> Types.Color.t = "normalizeColor" [@@mel.module "@kobalte/core/colors"] - (** Returns the hue value normalized to the range of 0 to 360. *) external normalize_hue : float -> float = "normalizeHue" [@@mel.module "@kobalte/core/colors"] + (** Returns the hue value normalized to the range of 0 to 360. *) - (** Parses a color from a string value. Throws an error if the string could not be parsed. - - Raises [Invalid_argument] with Kobalte's message, where it throws. *) val parse_color : string -> Types.Color.t + (** Parses a color from a string value. Throws an error if the string could + not be parsed. + + Raises [Invalid_argument] with Kobalte's message, where it throws. *) + val parse_color_opt : string -> Types.Color.t option end module Combobox : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1221,7 +1415,8 @@ module Combobox : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1235,7 +1430,13 @@ module Combobox : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('option Types.ComboboxControlState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( 'option Types.ComboboxControlState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1243,13 +1444,15 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1257,14 +1460,16 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1276,7 +1481,8 @@ module Combobox : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Select.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Select.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1284,14 +1490,16 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** A small icon often displayed next to the value as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon `children`. *) + (** A small icon often displayed next to the value as a visual affordance for + the fact it can be open. It renders a `▼` by default, but you can use your + own icon `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1304,7 +1512,8 @@ module Combobox : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1319,7 +1528,8 @@ module Combobox : sig item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1327,14 +1537,16 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1342,15 +1554,17 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** The visual indicator rendered when the item is selected. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the item is selected. You can style + this element directly, or you can use it as a wrapper to put an icon into, + or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1358,14 +1572,15 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1379,7 +1594,8 @@ module Combobox : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1391,11 +1607,21 @@ module Combobox : sig module Listbox : sig module Props : sig external check : - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1412,7 +1638,9 @@ module Combobox : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1420,7 +1648,8 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - (** A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query. *) + (** A combo box combines a text input with a listbox, allowing users to filter + a list of options to items matching a query. *) module Root : sig module Props : sig external check : @@ -1431,7 +1660,7 @@ module Combobox : sig ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -1461,31 +1690,40 @@ module Combobox : sig ?option_disabled:('option -> bool) -> ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> - ?default_filter:([ `contains | `startsWith | `endsWith ], 'option -> string -> bool) Types.Either.t Solidtype.Check.value -> + ?default_filter: + ( [ `contains | `endsWith | `startsWith ], + 'option -> string -> bool ) + Types.Either.t + Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" - [@@mel.module "@kobalte/core/combobox"] + val component : unit Solidtype.Jsx.component end - (** A combo box combines a text input with a listbox, allowing users to filter a list of options to items matching a query. *) + (** A combo box combines a text input with a listbox, allowing users to filter + a list of options to items matching a query. *) module Root_multiple : sig module Props : sig external check : @@ -1497,7 +1735,7 @@ module Combobox : sig ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -1527,38 +1765,47 @@ module Combobox : sig ?option_disabled:('option -> bool) -> ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> - ?default_filter:([ `contains | `startsWith | `endsWith ], 'option -> string -> bool) Types.Either.t Solidtype.Check.value -> + ?default_filter: + ( [ `contains | `endsWith | `startsWith ], + 'option -> string -> bool ) + Types.Either.t + Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" - [@@mel.module "@kobalte/core/combobox"] + val component : unit Solidtype.Jsx.component end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section : sig module Props : sig external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1571,7 +1818,8 @@ module Combobox : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1579,20 +1827,22 @@ module Combobox : sig [@@mel.module "@kobalte/core/combobox"] end - external use_combobox_context : unit -> Types.ComboboxContextValue.t = "useComboboxContext" + external use_combobox_context : unit -> Types.ComboboxContextValue.t + = "useComboboxContext" [@@mel.module "@kobalte/core/combobox"] end module ContextMenu : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1614,7 +1864,8 @@ module ContextMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1633,7 +1884,8 @@ module ContextMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1647,7 +1899,8 @@ module ContextMenu : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1655,14 +1908,15 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1670,14 +1924,16 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1695,7 +1951,8 @@ module ContextMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1704,13 +1961,15 @@ module ContextMenu : sig end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1718,15 +1977,17 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1734,14 +1995,16 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1758,7 +2021,9 @@ module ContextMenu : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1766,7 +2031,8 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup : sig module Props : sig external check : @@ -1776,7 +2042,8 @@ module ContextMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1795,7 +2062,8 @@ module ContextMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1803,7 +2071,8 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - (** Displays a menu located at the pointer, triggered by a right-click or a long-press. *) + (** Displays a menu located at the pointer, triggered by a right-click or a + long-press. *) module Root : sig module Props : sig external check : @@ -1827,7 +2096,9 @@ module ContextMenu : sig ?force_mount:bool Solidtype.Check.value -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1842,7 +2113,8 @@ module ContextMenu : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1868,7 +2140,9 @@ module ContextMenu : sig ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1886,7 +2160,8 @@ module ContextMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1902,7 +2177,8 @@ module ContextMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1916,7 +2192,8 @@ module ContextMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1924,7 +2201,8 @@ module ContextMenu : sig [@@mel.module "@kobalte/core/context-menu"] end - external use_context_menu_context : unit -> Types.ContextMenuContextValue.t = "useContextMenuContext" + external use_context_menu_context : unit -> Types.ContextMenuContextValue.t + = "useContextMenuContext" [@@mel.module "@kobalte/core/context-menu"] end @@ -1935,7 +2213,8 @@ module Dialog : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1955,7 +2234,8 @@ module Dialog : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1963,13 +2243,15 @@ module Dialog : sig [@@mel.module "@kobalte/core/dialog"] end - (** An optional accessible description to be announced when the dialog is open. *) + (** An optional accessible description to be announced when the dialog is + open. *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.P.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.P.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.P.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -1977,13 +2259,15 @@ module Dialog : sig [@@mel.module "@kobalte/core/dialog"] end - (** A layer that covers the inert portion of the view when the dialog is open. *) + (** A layer that covers the inert portion of the view when the dialog is open. + *) module Overlay : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2000,7 +2284,9 @@ module Dialog : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2008,11 +2294,13 @@ module Dialog : sig [@@mel.module "@kobalte/core/dialog"] end - (** A dialog is a window overlaid on either the primary window or another dialog window. *) + (** A dialog is a window overlaid on either the primary window or another + dialog window. *) module Root : sig module Props : sig external check : - ?translations:Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.AlertDialog_Root_Translations.t Solidtype.Check.value -> ?open_:bool Solidtype.Check.value -> ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> @@ -2021,7 +2309,9 @@ module Dialog : sig ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2035,7 +2325,8 @@ module Dialog : sig external check : ?as_:(Solidtype.Html.H2.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H2.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H2.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2049,7 +2340,8 @@ module Dialog : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2057,20 +2349,22 @@ module Dialog : sig [@@mel.module "@kobalte/core/dialog"] end - external use_dialog_context : unit -> Types.DialogContextValue.t = "useDialogContext" + external use_dialog_context : unit -> Types.DialogContextValue.t + = "useDialogContext" [@@mel.module "@kobalte/core/dialog"] end module DropdownMenu : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2092,7 +2386,8 @@ module DropdownMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2112,7 +2407,8 @@ module DropdownMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2126,7 +2422,8 @@ module DropdownMenu : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2134,14 +2431,15 @@ module DropdownMenu : sig [@@mel.module "@kobalte/core/dropdown-menu"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2149,14 +2447,16 @@ module DropdownMenu : sig [@@mel.module "@kobalte/core/dropdown-menu"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2174,7 +2474,8 @@ module DropdownMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2183,13 +2484,15 @@ module DropdownMenu : sig end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2197,15 +2500,17 @@ module DropdownMenu : sig [@@mel.module "@kobalte/core/dropdown-menu"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2213,14 +2518,16 @@ module DropdownMenu : sig [@@mel.module "@kobalte/core/dropdown-menu"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2237,7 +2544,9 @@ module DropdownMenu : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2245,7 +2554,8 @@ module DropdownMenu : sig [@@mel.module "@kobalte/core/dropdown-menu"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup : sig module Props : sig external check : @@ -2255,7 +2565,8 @@ module DropdownMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2274,7 +2585,8 @@ module DropdownMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2282,7 +2594,8 @@ module DropdownMenu : sig [@@mel.module "@kobalte/core/dropdown-menu"] end - (** Displays a menu to the user —such as a set of actions or functions— triggered by a button. *) + (** Displays a menu to the user —such as a set of actions or functions— + triggered by a button. *) module Root : sig module Props : sig external check : @@ -2309,7 +2622,9 @@ module DropdownMenu : sig ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2324,7 +2639,8 @@ module DropdownMenu : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2350,7 +2666,9 @@ module DropdownMenu : sig ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2368,7 +2686,8 @@ module DropdownMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2384,7 +2703,8 @@ module DropdownMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2398,7 +2718,8 @@ module DropdownMenu : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2408,16 +2729,19 @@ module DropdownMenu : sig end module FileField : sig - external context : Types.FileFieldContextValue.t option Types.Context.t = "Context" + external context : Types.FileFieldContextValue.t option Types.Context.t + = "Context" [@@mel.module "@kobalte/core/file-field"] - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2430,7 +2754,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2438,14 +2763,16 @@ module FileField : sig [@@mel.module "@kobalte/core/file-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2458,7 +2785,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2471,7 +2799,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2484,7 +2813,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2497,7 +2827,13 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (children:(Types.File.t -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (children: + ( Types.File.t -> Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2510,7 +2846,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2524,7 +2861,8 @@ module FileField : sig type_:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2537,7 +2875,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Img.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Img.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Img.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2551,7 +2890,8 @@ module FileField : sig ?precision:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2564,7 +2904,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2585,16 +2926,24 @@ module FileField : sig ?on_file_accept:(Types.File.t array -> unit) -> ?on_file_reject:(Types.FileRejection.t array -> unit) -> ?on_file_change:(Types.Details.t -> unit) -> - ?validate:(Types.File.t -> [ `TOO_MANY_FILES | `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL ] array Js.Null.t) -> + ?validate: + (Types.File.t -> + [ `FILE_INVALID_TYPE + | `FILE_TOO_LARGE + | `FILE_TOO_SMALL + | `TOO_MANY_FILES ] + array + Js.Null.t) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2607,7 +2956,8 @@ module FileField : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2615,20 +2965,22 @@ module FileField : sig [@@mel.module "@kobalte/core/file-field"] end - external use_file_field_context : unit -> Types.FileFieldContextValue.t = "useFileFieldContext" + external use_file_field_context : unit -> Types.FileFieldContextValue.t + = "useFileFieldContext" [@@mel.module "@kobalte/core/file-field"] end module HoverCard : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2642,7 +2994,8 @@ module HoverCard : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2659,7 +3012,9 @@ module HoverCard : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2667,7 +3022,8 @@ module HoverCard : sig [@@mel.module "@kobalte/core/hover-card"] end - (** A popover that allows sighted users to preview content available behind a link. *) + (** A popover that allows sighted users to preview content available behind a + link. *) module Root : sig module Props : sig external check : @@ -2693,7 +3049,9 @@ module HoverCard : sig ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2707,7 +3065,8 @@ module HoverCard : sig external check : ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2715,7 +3074,8 @@ module HoverCard : sig [@@mel.module "@kobalte/core/hover-card"] end - external use_hover_card_context : unit -> Types.HoverCardContextValue.t = "useHoverCardContext" + external use_hover_card_context : unit -> Types.HoverCardContextValue.t + = "useHoverCardContext" [@@mel.module "@kobalte/core/hover-card"] end @@ -2726,7 +3086,9 @@ module I18n : sig external check : ?locale:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2737,56 +3099,77 @@ module I18n : sig external rtl_langs : string Js.Set.t = "RTL_LANGS" [@@mel.module "@kobalte/core/i18n"] - (** Provides localized string collation for the current locale. Automatically updates when the locale changes, - and handles caching of the collator for performance. *) - external create_collator : ?options:Types.CollatorOptions.t -> unit -> Types.Collator.t Solidtype.Solid.accessor = "createCollator" + external create_collator : + ?options:Types.CollatorOptions.t -> + unit -> + Types.Collator.t Solidtype.Solid.accessor = "createCollator" [@@mel.module "@kobalte/core/i18n"] - - (** Provides localized date formatting for the current locale. Automatically updates when the locale changes, - and handles caching of the date formatter for performance. *) - external create_date_formatter : (Types.DateTimeFormatOptions.t, Types.DateTimeFormatOptions.t Solidtype.Solid.accessor) Types.Either.t -> Types.DateTimeFormat.t Solidtype.Solid.accessor = "createDateFormatter" + (** Provides localized string collation for the current locale. Automatically + updates when the locale changes, and handles caching of the collator for + performance. *) + + external create_date_formatter : + ( Types.DateTimeFormatOptions.t, + Types.DateTimeFormatOptions.t Solidtype.Solid.accessor ) + Types.Either.t -> + Types.DateTimeFormat.t Solidtype.Solid.accessor = "createDateFormatter" [@@mel.module "@kobalte/core/i18n"] + (** Provides localized date formatting for the current locale. Automatically + updates when the locale changes, and handles caching of the date formatter + for performance. *) - (** Returns an accessor for the current browser/system language, and updates when it changes. *) - external create_default_locale : unit -> Types.I18n_CreateDefaultLocale.t = "createDefaultLocale" + external create_default_locale : unit -> Types.I18n_CreateDefaultLocale.t + = "createDefaultLocale" [@@mel.module "@kobalte/core/i18n"] + (** Returns an accessor for the current browser/system language, and updates + when it changes. *) - (** Provides localized string search functionality that is useful for filtering or matching items - in a list. Options can be provided to adjust the sensitivity to case, diacritics, and other parameters. *) - external create_filter : ?options:Types.CollatorOptions.t -> unit -> Types.Filter.t = "createFilter" + external create_filter : + ?options:Types.CollatorOptions.t -> unit -> Types.Filter.t = "createFilter" [@@mel.module "@kobalte/core/i18n"] - - (** Provides localized number formatting for the current locale. Automatically updates when the locale changes, - and handles caching of the number formatter for performance. *) - external create_number_formatter : (Types.NumberFormatOptions.t, Types.NumberFormatOptions.t Solidtype.Solid.accessor) Types.Either.t -> Types.NumberFormat.t Solidtype.Solid.accessor = "createNumberFormatter" + (** Provides localized string search functionality that is useful for + filtering or matching items in a list. Options can be provided to adjust + the sensitivity to case, diacritics, and other parameters. *) + + external create_number_formatter : + ( Types.NumberFormatOptions.t, + Types.NumberFormatOptions.t Solidtype.Solid.accessor ) + Types.Either.t -> + Types.NumberFormat.t Solidtype.Solid.accessor = "createNumberFormatter" [@@mel.module "@kobalte/core/i18n"] + (** Provides localized number formatting for the current locale. Automatically + updates when the locale changes, and handles caching of the number + formatter for performance. *) - (** Gets the locale setting of the browser. *) external get_default_locale : unit -> Types.Locale.t = "getDefaultLocale" [@@mel.module "@kobalte/core/i18n"] + (** Gets the locale setting of the browser. *) - external get_reading_direction : string -> [ `rtl | `ltr ] = "getReadingDirection" + external get_reading_direction : string -> [ `ltr | `rtl ] + = "getReadingDirection" [@@mel.module "@kobalte/core/i18n"] - (** Determines if a locale is read right to left using \[Intl.Locale\] - \{\@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale\}. *) external is_rtl : string -> bool = "isRTL" [@@mel.module "@kobalte/core/i18n"] + (** Determines if a locale is read right to left using \[Intl.Locale\] \{@link + https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale\}. + *) - (** Returns an accessor for the current locale and layout direction. *) external use_locale : unit -> Types.I18n_UseLocale.t = "useLocale" [@@mel.module "@kobalte/core/i18n"] + (** Returns an accessor for the current locale and layout direction. *) end module Image : sig - (** An element that renders when the image hasn't loaded. - This means whilst it's loading, or if there was an error. *) + (** An element that renders when the image hasn't loaded. This means whilst + it's loading, or if there was an error. *) module Fallback : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2794,13 +3177,15 @@ module Image : sig [@@mel.module "@kobalte/core/image"] end - (** The image to render. By default, it will only render when it has loaded. *) + (** The image to render. By default, it will only render when it has loaded. + *) module Img : sig module Props : sig external check : ?as_:(Solidtype.Html.Img.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Img.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Img.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2808,15 +3193,18 @@ module Image : sig [@@mel.module "@kobalte/core/image"] end - (** An image element with an optional fallback for loading and error status. *) + (** An image element with an optional fallback for loading and error status. + *) module Root : sig module Props : sig external check : ?fallback_delay:float Solidtype.Check.value -> - ?on_loading_status_change:([ `idle | `loading | `loaded | `error ] -> unit) -> + ?on_loading_status_change: + ([ `error | `idle | `loaded | `loading ] -> unit) -> ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2824,19 +3212,22 @@ module Image : sig [@@mel.module "@kobalte/core/image"] end - external use_image_context : unit -> Types.ImageContextValue.t = "useImageContext" + external use_image_context : unit -> Types.ImageContextValue.t + = "useImageContext" [@@mel.module "@kobalte/core/image"] end module Link : sig - (** Link allows a user to navigate to another page or resource within a web page or application. *) + (** Link allows a user to navigate to another page or resource within a web + page or application. *) module Root : sig module Props : sig external check : ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2853,7 +3244,8 @@ module Listbox : sig item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2861,14 +3253,16 @@ module Listbox : sig [@@mel.module "@kobalte/core/listbox"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2876,15 +3270,17 @@ module Listbox : sig [@@mel.module "@kobalte/core/listbox"] end - (** The visual indicator rendered when the item is selected. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the item is selected. You can style + this element directly, or you can use it as a wrapper to put an icon into, + or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2892,14 +3288,15 @@ module Listbox : sig [@@mel.module "@kobalte/core/listbox"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2907,40 +3304,54 @@ module Listbox : sig [@@mel.module "@kobalte/core/listbox"] end - (** Listbox presents a list of options and allows a user to select one or more of them. *) + (** Listbox presents a list of options and allows a user to select one or more + of them. *) module Root : sig module Props : sig external check : ?value:string array Solidtype.Check.value -> ?default_value:string array Solidtype.Check.value -> ?on_change:(string Js.Set.t -> unit) -> - ?options:('option, 'opt_group) Types.Either.t array Solidtype.Check.value -> + ?options: + ('option, 'opt_group) Types.Either.t array Solidtype.Check.value -> ?option_value:('option -> string) -> ?option_text_value:('option -> string) -> ?option_disabled:('option -> bool) -> ?option_group_children:('opt_group -> 'option array) -> ?state:Types.ListState.t Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> - ?auto_focus:([ `first | `last ], bool) Types.Either.t Solidtype.Check.value -> + ?auto_focus: + ([ `first | `last ], bool) Types.Either.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?should_use_virtual_focus:bool Solidtype.Check.value -> ?should_select_on_press_up:bool Solidtype.Check.value -> ?should_focus_on_hover:bool Solidtype.Check.value -> - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> - ?selection_mode:[ `none | `single | `multiple ] Solidtype.Check.value -> + ?selection_mode:[ `multiple | `none | `single ] Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?select_on_focus:bool Solidtype.Check.value -> ?disallow_type_ahead:bool Solidtype.Check.value -> ?allows_tab_navigation:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> ?render_item:('option Types.CollectionNode.t -> Solidtype.Jsx.element) -> - ?render_section:('opt_group Types.CollectionNode.t -> Solidtype.Jsx.element) -> + ?render_section: + ('opt_group Types.CollectionNode.t -> Solidtype.Jsx.element) -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2948,14 +3359,15 @@ module Listbox : sig [@@mel.module "@kobalte/core/listbox"] end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section : sig module Props : sig external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2963,20 +3375,22 @@ module Listbox : sig [@@mel.module "@kobalte/core/listbox"] end - external use_listbox_context : unit -> Types.ListboxContextValue.t = "useListboxContext" + external use_listbox_context : unit -> Types.ListboxContextValue.t + = "useListboxContext" [@@mel.module "@kobalte/core/listbox"] end module Menubar : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -2998,7 +3412,8 @@ module Menubar : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3017,7 +3432,8 @@ module Menubar : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3031,7 +3447,8 @@ module Menubar : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3039,14 +3456,15 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3054,14 +3472,16 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3079,7 +3499,8 @@ module Menubar : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3088,13 +3509,15 @@ module Menubar : sig end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3102,15 +3525,17 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3118,14 +3543,16 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3133,7 +3560,8 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** Displays a menu to the user —such as a set of actions or functions— triggered by a button. *) + (** Displays a menu to the user —such as a set of actions or functions— + triggered by a button. *) module Menu : sig module Props : sig external check : @@ -3160,7 +3588,9 @@ module Menubar : sig ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3177,7 +3607,9 @@ module Menubar : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3185,7 +3617,8 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup : sig module Props : sig external check : @@ -3195,7 +3628,8 @@ module Menubar : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3214,7 +3648,8 @@ module Menubar : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3222,7 +3657,8 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - (** A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands. *) + (** A visually persistent menu common in desktop applications that provides + quick access to a consistent set of commands. *) module Root : sig module Props : sig external check : @@ -3233,10 +3669,12 @@ module Menubar : sig ?focus_on_alt:bool Solidtype.Check.value -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?auto_focus_menu:bool Solidtype.Check.value -> - ?on_auto_focus_menu_change:bool Solidtype.Solid.setter Solidtype.Check.value -> + ?on_auto_focus_menu_change: + bool Solidtype.Solid.setter Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3251,7 +3689,8 @@ module Menubar : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3277,7 +3716,9 @@ module Menubar : sig ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3295,7 +3736,8 @@ module Menubar : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3311,7 +3753,8 @@ module Menubar : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3325,7 +3768,8 @@ module Menubar : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3333,19 +3777,21 @@ module Menubar : sig [@@mel.module "@kobalte/core/menubar"] end - external use_menubar_context : unit -> Types.MenubarContextValue.t = "useMenubarContext" + external use_menubar_context : unit -> Types.MenubarContextValue.t + = "useMenubarContext" [@@mel.module "@kobalte/core/menubar"] end module Meter : sig - (** The component that visually represents the meter value. - Used to visually show the fill of `Meter.Track`. *) + (** The component that visually represents the meter value. Used to visually + show the fill of `Meter.Track`. *) module Fill : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3359,7 +3805,8 @@ module Meter : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3374,10 +3821,11 @@ module Meter : sig ?value:float Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> - ?get_value_label:(Types.GetValueLabelParams.t -> string) -> + ?get_value_label:(Types.Meter_GetValueLabelParams.t -> string) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3385,14 +3833,15 @@ module Meter : sig [@@mel.module "@kobalte/core/meter"] end - (** The component that visually represents the meter track. - Act as a container for `Meter.Fill`. *) + (** The component that visually represents the meter track. Act as a container + for `Meter.Fill`. *) module Track : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3400,13 +3849,15 @@ module Meter : sig [@@mel.module "@kobalte/core/meter"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3414,20 +3865,22 @@ module Meter : sig [@@mel.module "@kobalte/core/meter"] end - external use_meter_context : unit -> Types.MeterContextValue.t = "useMeterContext" + external use_meter_context : unit -> Types.MeterContextValue.t + = "useMeterContext" [@@mel.module "@kobalte/core/meter"] end module NavigationMenu : sig - (** An optional arrow element to render alongside the viewport content. - Must be rendered in the viewport. *) + (** An optional arrow element to render alongside the viewport content. Must + be rendered in the viewport. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3449,7 +3902,8 @@ module NavigationMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3468,7 +3922,8 @@ module NavigationMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3482,7 +3937,8 @@ module NavigationMenu : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3490,14 +3946,15 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** A component used to render the label of a `Menu.Group`. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a `Menu.Group`. It won't be + focusable using arrow keys. *) module GroupLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3505,14 +3962,16 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** A small icon often displayed inside the menu trigger as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon by providing a `children`. *) + (** A small icon often displayed inside the menu trigger as a visual + affordance for the fact it can be open. It renders a `▼` by default, but + you can use your own icon by providing a `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3530,7 +3989,8 @@ module NavigationMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.A.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.A.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.A.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3539,13 +3999,15 @@ module NavigationMenu : sig end (** An optional accessible description to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + Useful for menu items that have more complex content (e.g. icons, multiple + lines of text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3553,15 +4015,17 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** The visual indicator rendered when the parent menu `CheckboxItem` or `RadioItem` is checked. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the parent menu `CheckboxItem` or + `RadioItem` is checked. You can style this element directly, or you can + use it as a wrapper to put an icon into, or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3569,14 +4033,16 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** An accessible label to be announced for the menu item. - Useful for menu items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the menu item. Useful for menu + items that have more complex content (e.g. icons, multiple lines of text, + etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3584,7 +4050,8 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** Displays a menu to the user —such as a set of actions or functions— triggered by a button. *) + (** Displays a menu to the user —such as a set of actions or functions— + triggered by a button. *) module Menu : sig module Props : sig external check : @@ -3611,7 +4078,9 @@ module NavigationMenu : sig ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3619,7 +4088,8 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** Portals its children into the NavigationMenu.Viewport when the menu is open. *) + (** Portals its children into the NavigationMenu.Viewport when the menu is + open. *) module Portal : sig module Props : sig external check : @@ -3628,7 +4098,9 @@ module NavigationMenu : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3636,7 +4108,8 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** A container used to group multiple `Menu.RadioItem`s and manage the selection. *) + (** A container used to group multiple `Menu.RadioItem`s and manage the + selection. *) module RadioGroup : sig module Props : sig external check : @@ -3646,7 +4119,8 @@ module NavigationMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3665,7 +4139,8 @@ module NavigationMenu : sig ?on_select:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3673,7 +4148,8 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - (** A visually persistent menu common in desktop applications that provides quick access to a consistent set of commands. *) + (** A visually persistent menu common in desktop applications that provides + quick access to a consistent set of commands. *) module Root : sig module Props : sig external check : @@ -3681,7 +4157,8 @@ module NavigationMenu : sig ?skip_delay_duration:float Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?auto_focus_menu:bool Solidtype.Check.value -> - ?on_auto_focus_menu_change:bool Solidtype.Solid.setter Solidtype.Check.value -> + ?on_auto_focus_menu_change: + bool Solidtype.Solid.setter Solidtype.Check.value -> ?default_value:string Solidtype.Check.value -> ?value:string Js.Null.t Solidtype.Check.value -> ?on_value_change:(string Js.Nullable.t -> unit) -> @@ -3703,7 +4180,8 @@ module NavigationMenu : sig ?overflow_padding:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3718,7 +4196,8 @@ module NavigationMenu : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3744,7 +4223,9 @@ module NavigationMenu : sig ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3762,7 +4243,8 @@ module NavigationMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3778,7 +4260,8 @@ module NavigationMenu : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3792,7 +4275,8 @@ module NavigationMenu : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3809,7 +4293,8 @@ module NavigationMenu : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3817,7 +4302,8 @@ module NavigationMenu : sig [@@mel.module "@kobalte/core/navigation-menu"] end - external use_navigation_menu_context : unit -> Types.NavigationMenuContextValue.t = "useNavigationMenuContext" + external use_navigation_menu_context : + unit -> Types.NavigationMenuContextValue.t = "useNavigationMenuContext" [@@mel.module "@kobalte/core/navigation-menu"] end @@ -3827,7 +4313,8 @@ module NumberField : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3835,13 +4322,15 @@ module NumberField : sig [@@mel.module "@kobalte/core/number-field"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3849,14 +4338,16 @@ module NumberField : sig [@@mel.module "@kobalte/core/number-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3868,7 +4359,8 @@ module NumberField : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3881,7 +4373,8 @@ module NumberField : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3894,7 +4387,8 @@ module NumberField : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3908,7 +4402,8 @@ module NumberField : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3916,7 +4411,8 @@ module NumberField : sig [@@mel.module "@kobalte/core/number-field"] end - (** A text input that allow users to input custom text entries with a keyboard. *) + (** A text input that allow users to input custom text entries with a + keyboard. *) module Root : sig module Props : sig external check : @@ -3935,15 +4431,17 @@ module NumberField : sig ?allowed_input:Js.Re.t Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?text_value:string Solidtype.Check.value -> - ?translations:Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3951,7 +4449,8 @@ module NumberField : sig [@@mel.module "@kobalte/core/number-field"] end - external use_number_field_context : unit -> Types.NumberFieldContextValue.t = "useNumberFieldContext" + external use_number_field_context : unit -> Types.NumberFieldContextValue.t + = "useNumberFieldContext" [@@mel.module "@kobalte/core/number-field"] end @@ -3961,7 +4460,8 @@ module Pagination : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3975,7 +4475,8 @@ module Pagination : sig page:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -3987,7 +4488,9 @@ module Pagination : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4000,7 +4503,8 @@ module Pagination : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4013,7 +4517,8 @@ module Pagination : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4033,12 +4538,14 @@ module Pagination : sig ?show_first:bool Solidtype.Check.value -> ?show_last:bool Solidtype.Check.value -> ?fixed_items:(string, bool) Types.Either.t Solidtype.Check.value -> - item_component:(Types.Pagination_Root_ItemComponent.t -> Solidtype.Jsx.element) -> + item_component: + (Types.Pagination_Root_ItemComponent_Props.t -> Solidtype.Jsx.element) -> ellipsis_component:(unit -> Solidtype.Jsx.element) -> ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Nav.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Nav.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Nav.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4046,19 +4553,22 @@ module Pagination : sig [@@mel.module "@kobalte/core/pagination"] end - external use_pagination_context : unit -> Types.PaginationContextValue.t = "usePaginationContext" + external use_pagination_context : unit -> Types.PaginationContextValue.t + = "usePaginationContext" [@@mel.module "@kobalte/core/pagination"] end module Popover : sig - (** An optional element to position the `Popover.Content` against. - If this part is not used, the content will position alongside the `Popover.Trigger`. *) + (** An optional element to position the `Popover.Content` against. If this + part is not used, the content will position alongside the + `Popover.Trigger`. *) module Anchor : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4066,15 +4576,16 @@ module Popover : sig [@@mel.module "@kobalte/core/popover"] end - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4088,7 +4599,8 @@ module Popover : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4108,7 +4620,8 @@ module Popover : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4116,13 +4629,15 @@ module Popover : sig [@@mel.module "@kobalte/core/popover"] end - (** An optional accessible description to be announced when the popover is open. *) + (** An optional accessible description to be announced when the popover is + open. *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.P.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.P.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.P.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4139,7 +4654,9 @@ module Popover : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4151,7 +4668,8 @@ module Popover : sig module Root : sig module Props : sig external check : - ?anchor_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?anchor_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?open_:bool Solidtype.Check.value -> ?default_open:bool Solidtype.Check.value -> ?on_open_change:(bool -> unit) -> @@ -4174,7 +4692,9 @@ module Popover : sig ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4188,7 +4708,8 @@ module Popover : sig external check : ?as_:(Solidtype.Html.H2.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.H2.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.H2.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4202,7 +4723,8 @@ module Popover : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4210,19 +4732,21 @@ module Popover : sig [@@mel.module "@kobalte/core/popover"] end - external use_popover_context : unit -> Types.PopoverContextValue.t = "usePopoverContext" + external use_popover_context : unit -> Types.PopoverContextValue.t + = "usePopoverContext" [@@mel.module "@kobalte/core/popover"] end module Progress : sig - (** The component that visually represents the progress value. - Used to visually show the fill of `Progress.Track`. *) + (** The component that visually represents the progress value. Used to + visually show the fill of `Progress.Track`. *) module Fill : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4236,7 +4760,8 @@ module Progress : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4244,7 +4769,8 @@ module Progress : sig [@@mel.module "@kobalte/core/progress"] end - (** Progress show either determinate or indeterminate progress of an operation over time. *) + (** Progress show either determinate or indeterminate progress of an operation + over time. *) module Root : sig module Props : sig external check : @@ -4252,10 +4778,11 @@ module Progress : sig ?value:float Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> - ?get_value_label:(Types.GetValueLabelParams.t -> string) -> + ?get_value_label:(Types.Meter_GetValueLabelParams.t -> string) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4263,14 +4790,15 @@ module Progress : sig [@@mel.module "@kobalte/core/progress"] end - (** The component that visually represents the progress track. - Act as a container for `Progress.Fill`. *) + (** The component that visually represents the progress track. Act as a + container for `Progress.Fill`. *) module Track : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4278,13 +4806,15 @@ module Progress : sig [@@mel.module "@kobalte/core/progress"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4292,18 +4822,21 @@ module Progress : sig [@@mel.module "@kobalte/core/progress"] end - external use_progress_context : unit -> Types.ProgressContextValue.t = "useProgressContext" + external use_progress_context : unit -> Types.ProgressContextValue.t + = "useProgressContext" [@@mel.module "@kobalte/core/progress"] end module RadioGroup : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4311,14 +4844,16 @@ module RadioGroup : sig [@@mel.module "@kobalte/core/radio-group"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4334,7 +4869,8 @@ module RadioGroup : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4348,7 +4884,8 @@ module RadioGroup : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4356,13 +4893,15 @@ module RadioGroup : sig [@@mel.module "@kobalte/core/radio-group"] end - (** The description that gives the user more information on the radio button. *) + (** The description that gives the user more information on the radio button. + *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4371,14 +4910,16 @@ module RadioGroup : sig end (** The visual indicator rendered when the radio item is in a checked state. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + You can style this element directly, or you can use it as a wrapper to put + an icon into, or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4392,7 +4933,8 @@ module RadioGroup : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4406,7 +4948,8 @@ module RadioGroup : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4420,7 +4963,8 @@ module RadioGroup : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4428,8 +4972,10 @@ module RadioGroup : sig [@@mel.module "@kobalte/core/radio-group"] end - (** A set of checkable buttons, known as radio buttons, where no more than one of the buttons can be checked at a time. - This component is based on the \[WAI-ARIA Radio Group Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/) *) + (** A set of checkable buttons, known as radio buttons, where no more than one + of the buttons can be checked at a time. This component is based on the + \[WAI-ARIA Radio Group + Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton/) *) module Root : sig module Props : sig external check : @@ -4439,13 +4985,14 @@ module RadioGroup : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4453,7 +5000,8 @@ module RadioGroup : sig [@@mel.module "@kobalte/core/radio-group"] end - external use_radio_group_context : unit -> Types.RadioGroupContextValue.t = "useRadioGroupContext" + external use_radio_group_context : unit -> Types.RadioGroupContextValue.t + = "useRadioGroupContext" [@@mel.module "@kobalte/core/radio-group"] end @@ -4463,7 +5011,8 @@ module Rating : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4471,13 +5020,15 @@ module Rating : sig [@@mel.module "@kobalte/core/rating"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4485,14 +5036,16 @@ module Rating : sig [@@mel.module "@kobalte/core/rating"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4504,7 +5057,8 @@ module Rating : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4517,7 +5071,8 @@ module Rating : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4530,7 +5085,13 @@ module Rating : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.RatingItemState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( Types.RatingItemState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4543,7 +5104,8 @@ module Rating : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4556,7 +5118,8 @@ module Rating : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4569,7 +5132,8 @@ module Rating : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4587,13 +5151,14 @@ module Rating : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4603,15 +5168,16 @@ module Rating : sig end module Search : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4629,7 +5195,8 @@ module Search : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4643,7 +5210,13 @@ module Search : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('option Types.ComboboxControlState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( 'option Types.ComboboxControlState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4651,13 +5224,15 @@ module Search : sig [@@mel.module "@kobalte/core/search"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4669,7 +5244,8 @@ module Search : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Select.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Select.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4677,14 +5253,16 @@ module Search : sig [@@mel.module "@kobalte/core/search"] end - (** A small icon often displayed next to the value as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon `children`. *) + (** A small icon often displayed next to the value as a visual affordance for + the fact it can be open. It renders a `▼` by default, but you can use your + own icon `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4698,7 +5276,8 @@ module Search : sig ?loading_component:Solidtype.Jsx.element Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4711,7 +5290,8 @@ module Search : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4726,7 +5306,8 @@ module Search : sig item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4734,14 +5315,16 @@ module Search : sig [@@mel.module "@kobalte/core/search"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4749,14 +5332,15 @@ module Search : sig [@@mel.module "@kobalte/core/search"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4770,7 +5354,8 @@ module Search : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4782,11 +5367,21 @@ module Search : sig module Listbox : sig module Props : sig external check : - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4800,7 +5395,8 @@ module Search : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4817,7 +5413,9 @@ module Search : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4836,7 +5434,7 @@ module Search : sig ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -4868,26 +5466,30 @@ module Search : sig ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?debounce_options_millisecond:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" - [@@mel.module "@kobalte/core/search"] + val component : unit Solidtype.Jsx.component end (** A search is a combobox where the filter is external. *) @@ -4902,7 +5504,7 @@ module Search : sig ?disabled:bool Solidtype.Check.value -> ?translations:Types.Combobox_Root_Translations.t Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -4934,36 +5536,41 @@ module Search : sig ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> ?allows_empty_collection:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?remove_on_backspace:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.ComboboxBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.ComboboxBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.ComboboxBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.ComboboxBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?debounce_options_millisecond:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end - external component : unit Solidtype.Jsx.component = "Root" - [@@mel.module "@kobalte/core/search"] + val component : unit Solidtype.Jsx.component end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section : sig module Props : sig external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4971,18 +5578,21 @@ module Search : sig [@@mel.module "@kobalte/core/search"] end - external use_search_context : unit -> Types.SearchContextValue.t = "useSearchContext" + external use_search_context : unit -> Types.SearchContextValue.t + = "useSearchContext" [@@mel.module "@kobalte/core/search"] end module SegmentedControl : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -4990,14 +5600,16 @@ module SegmentedControl : sig [@@mel.module "@kobalte/core/segmented-control"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5010,7 +5622,8 @@ module SegmentedControl : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5025,7 +5638,8 @@ module SegmentedControl : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5039,7 +5653,8 @@ module SegmentedControl : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5047,13 +5662,15 @@ module SegmentedControl : sig [@@mel.module "@kobalte/core/segmented-control"] end - (** The description that gives the user more information on the radio button. *) + (** The description that gives the user more information on the radio button. + *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5062,14 +5679,16 @@ module SegmentedControl : sig end (** The visual indicator rendered when the radio item is in a checked state. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + You can style this element directly, or you can use it as a wrapper to put + an icon into, or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5082,7 +5701,8 @@ module SegmentedControl : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5096,7 +5716,8 @@ module SegmentedControl : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5110,7 +5731,8 @@ module SegmentedControl : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5127,14 +5749,15 @@ module SegmentedControl : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?ref:(Dom.htmlElement -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5142,20 +5765,22 @@ module SegmentedControl : sig [@@mel.module "@kobalte/core/segmented-control"] end - external use_segmented_control_context : unit -> Types.SegmentedControlContextValue.t = "useSegmentedControlContext" + external use_segmented_control_context : + unit -> Types.SegmentedControlContextValue.t = "useSegmentedControlContext" [@@mel.module "@kobalte/core/segmented-control"] end module Select : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5173,7 +5798,8 @@ module Select : sig ?on_interact_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5181,13 +5807,15 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5195,14 +5823,16 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5214,7 +5844,8 @@ module Select : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Select.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Select.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5222,14 +5853,16 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** A small icon often displayed next to the value as a visual affordance for the fact it can be open. - It renders a `▼` by default, but you can use your own icon `children`. *) + (** A small icon often displayed next to the value as a visual affordance for + the fact it can be open. It renders a `▼` by default, but you can use your + own icon `children`. *) module Icon : sig module Props : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5244,7 +5877,8 @@ module Select : sig item:_ Types.CollectionNode.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5252,14 +5886,16 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** An optional accessible description to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An optional accessible description to be announced for the item. Useful + for items that have more complex content (e.g. icons, multiple lines of + text, etc.) *) module ItemDescription : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5267,15 +5903,17 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** The visual indicator rendered when the item is selected. - You can style this element directly, or you can use it as a wrapper to put an icon into, or both. *) + (** The visual indicator rendered when the item is selected. You can style + this element directly, or you can use it as a wrapper to put an icon into, + or both. *) module ItemIndicator : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5283,14 +5921,15 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** An accessible label to be announced for the item. - Useful for items that have more complex content (e.g. icons, multiple lines of text, etc.) *) + (** An accessible label to be announced for the item. Useful for items that + have more complex content (e.g. icons, multiple lines of text, etc.) *) module ItemLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5304,7 +5943,8 @@ module Select : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5316,11 +5956,21 @@ module Select : sig module Listbox : sig module Props : sig external check : - ?scroll_ref:Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> + ?scroll_ref: + Dom.htmlElement option Solidtype.Solid.accessor Solidtype.Check.value -> ?scroll_to_item:(string -> unit) -> ?as_:(Solidtype.Html.Ul.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(('option, 'opt_group) Types.Either.t Types.CollectionNode.t Types.Collection.t Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ul.check = "check" + (?children: + ( ('option, 'opt_group) Types.Either.t Types.CollectionNode.t + Types.Collection.t + Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Ul.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5337,7 +5987,9 @@ module Select : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5345,7 +5997,8 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** Displays a list of options for the user to pick from — triggered by a button. *) + (** Displays a list of options for the user to pick from — triggered by a + button. *) module Root : sig module Props : sig external check : @@ -5355,7 +6008,7 @@ module Select : sig ?id:string Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -5382,20 +6035,25 @@ module Select : sig ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.SelectBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.SelectBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.SelectBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.SelectBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?disallow_type_ahead:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5403,7 +6061,8 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** Displays a list of options for the user to pick from — triggered by a button. *) + (** Displays a list of options for the user to pick from — triggered by a + button. *) module Root_multiple : sig module Props : sig external check : @@ -5414,7 +6073,7 @@ module Select : sig ?id:string Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?get_anchor_rect:(Dom.htmlElement option -> Types.AnchorRect.t option) -> @@ -5441,20 +6100,25 @@ module Select : sig ?option_group_children:string Solidtype.Check.value -> ?keyboard_delegate:Types.KeyboardDelegate.t Solidtype.Check.value -> ?should_focus_wrap:bool Solidtype.Check.value -> - ?selection_behavior:[ `toggle | `replace ] Solidtype.Check.value -> + ?selection_behavior:[ `replace | `toggle ] Solidtype.Check.value -> ?allow_duplicate_selection_events:bool Solidtype.Check.value -> ?disallow_empty_selection:bool Solidtype.Check.value -> ?close_on_selection:bool Solidtype.Check.value -> ?virtualized:bool Solidtype.Check.value -> - ?item_component:('option Types.SelectBaseItemComponentProps.t -> Solidtype.Jsx.element) -> - ?section_component:('opt_group Types.SelectBaseSectionComponentProps.t -> Solidtype.Jsx.element) -> + ?item_component: + ('option Types.SelectBaseItemComponentProps.t -> + Solidtype.Jsx.element) -> + ?section_component: + ('opt_group Types.SelectBaseSectionComponentProps.t -> + Solidtype.Jsx.element) -> ?modal:bool Solidtype.Check.value -> ?prevent_scroll:bool Solidtype.Check.value -> ?force_mount:bool Solidtype.Check.value -> ?disallow_type_ahead:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5462,14 +6126,15 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - (** A component used to render the label of a listbox option group. - It won't be focusable using arrow keys. *) + (** A component used to render the label of a listbox option group. It won't + be focusable using arrow keys. *) module Section : sig module Props : sig external check : ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5482,7 +6147,8 @@ module Select : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5496,7 +6162,13 @@ module Select : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('option Types.SelectValueState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children: + ( 'option Types.SelectValueState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5504,7 +6176,8 @@ module Select : sig [@@mel.module "@kobalte/core/select"] end - external use_select_context : unit -> Types.SelectContextValue.t = "useSelectContext" + external use_select_context : unit -> Types.SelectContextValue.t + = "useSelectContext" [@@mel.module "@kobalte/core/select"] end @@ -5516,7 +6189,8 @@ module Separator : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Hr.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Hr.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Hr.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5537,7 +6211,8 @@ module Skeleton : sig ?animate:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5547,13 +6222,15 @@ module Skeleton : sig end module Slider : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5561,14 +6238,16 @@ module Slider : sig [@@mel.module "@kobalte/core/slider"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5576,14 +6255,15 @@ module Slider : sig [@@mel.module "@kobalte/core/slider"] end - (** The component that visually represents the slider value. - Used to visually show the fill of `Slider.Track`. *) + (** The component that visually represents the slider value. Used to visually + show the fill of `Slider.Track`. *) module Fill : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5597,7 +6277,8 @@ module Slider : sig external check : ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5611,7 +6292,8 @@ module Slider : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5631,17 +6313,18 @@ module Slider : sig ?max_value:float Solidtype.Check.value -> ?step:float Solidtype.Check.value -> ?min_steps_between_thumbs:float Solidtype.Check.value -> - ?get_value_label:(Types.GetValueLabelParams2.t -> string) -> + ?get_value_label:(Types.Slider_GetValueLabelParams.t -> string) -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5654,7 +6337,8 @@ module Slider : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5662,14 +6346,15 @@ module Slider : sig [@@mel.module "@kobalte/core/slider"] end - (** The component that visually represents the slider track. - Act as a container for `Slider.Fill`. *) + (** The component that visually represents the slider track. Act as a + container for `Slider.Fill`. *) module Track : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5677,13 +6362,15 @@ module Slider : sig [@@mel.module "@kobalte/core/slider"] end - (** The accessible label text representing the current value in a human-readable format. *) + (** The accessible label text representing the current value in a + human-readable format. *) module ValueLabel : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5691,7 +6378,8 @@ module Slider : sig [@@mel.module "@kobalte/core/slider"] end - external use_slider_context : unit -> Types.SliderContextValue.t = "useSliderContext" + external use_slider_context : unit -> Types.SliderContextValue.t + = "useSliderContext" [@@mel.module "@kobalte/core/slider"] end @@ -5699,12 +6387,13 @@ module SpinButton : sig module Root : sig module Props : sig external check : - ?translations:Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> + ?translations: + Types.ColorChannelField_Root_Translations.t Solidtype.Check.value -> ?value:(string, float) Types.Either.t Solidtype.Check.value -> ?text_value:string Solidtype.Check.value -> ?min_value:float Solidtype.Check.value -> ?max_value:float Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> @@ -5716,7 +6405,8 @@ module SpinButton : sig ?on_increment_to_max:(unit -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5732,7 +6422,8 @@ module Switch : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5746,7 +6437,8 @@ module Switch : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5754,14 +6446,16 @@ module Switch : sig [@@mel.module "@kobalte/core/switch"] end - (** The error message that gives the user information about how to fix a validation error on the switch. *) + (** The error message that gives the user information about how to fix a + validation error on the switch. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5775,7 +6469,8 @@ module Switch : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5789,7 +6484,8 @@ module Switch : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5806,13 +6502,19 @@ module Switch : sig ?on_change:(bool -> unit) -> ?value:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.SwitchRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( Types.SwitchRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5820,13 +6522,15 @@ module Switch : sig [@@mel.module "@kobalte/core/switch"] end - (** The thumb that is used to visually indicate whether the switch is on or off. *) + (** The thumb that is used to visually indicate whether the switch is on or + off. *) module Thumb : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5834,7 +6538,8 @@ module Switch : sig [@@mel.module "@kobalte/core/switch"] end - external use_switch_context : unit -> Types.SwitchContextValue.t = "useSwitchContext" + external use_switch_context : unit -> Types.SwitchContextValue.t + = "useSwitchContext" [@@mel.module "@kobalte/core/switch"] end @@ -5847,7 +6552,8 @@ module Tabs : sig ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5855,14 +6561,16 @@ module Tabs : sig [@@mel.module "@kobalte/core/tabs"] end - (** The visual indicator displayed at the bottom of the tab list to indicate the selected tab. - It provides the base style needed to display a smooth transition to the new selected tab. *) + (** The visual indicator displayed at the bottom of the tab list to indicate + the selected tab. It provides the base style needed to display a smooth + transition to the new selected tab. *) module Indicator : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5870,13 +6578,15 @@ module Tabs : sig [@@mel.module "@kobalte/core/tabs"] end - (** Contains the tabs that are aligned along the edge of the active tab panel. *) + (** Contains the tabs that are aligned along the edge of the active tab panel. + *) module List : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5884,8 +6594,9 @@ module Tabs : sig [@@mel.module "@kobalte/core/tabs"] end - (** A set of layered sections of content, known as tab panels, that display one panel of content at a time. - `Tabs` contains all the parts of a tabs component and provide context for its children. *) + (** A set of layered sections of content, known as tab panels, that display + one panel of content at a time. `Tabs` contains all the parts of a tabs + component and provide context for its children. *) module Root : sig module Props : sig external check : @@ -5893,11 +6604,12 @@ module Tabs : sig ?default_value:string Solidtype.Check.value -> ?on_change:(string -> unit) -> ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> - ?activation_mode:[ `manual | `automatic ] Solidtype.Check.value -> + ?activation_mode:[ `automatic | `manual ] Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5913,7 +6625,8 @@ module Tabs : sig ?disabled:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5921,18 +6634,21 @@ module Tabs : sig [@@mel.module "@kobalte/core/tabs"] end - external use_tabs_context : unit -> Types.TabsContextValue.t = "useTabsContext" + external use_tabs_context : unit -> Types.TabsContextValue.t + = "useTabsContext" [@@mel.module "@kobalte/core/tabs"] end module TextField : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5940,14 +6656,16 @@ module TextField : sig [@@mel.module "@kobalte/core/text-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5960,7 +6678,8 @@ module TextField : sig external check : ?as_:(Solidtype.Html.Input.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5974,7 +6693,8 @@ module TextField : sig external check : ?as_:(Solidtype.Html.Label.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Label.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Label.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -5982,7 +6702,8 @@ module TextField : sig [@@mel.module "@kobalte/core/text-field"] end - (** A text input that allow users to input custom text entries with a keyboard. *) + (** A text input that allow users to input custom text entries with a + keyboard. *) module Root : sig module Props : sig external check : @@ -5991,13 +6712,14 @@ module TextField : sig ?on_change:(string -> unit) -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6013,7 +6735,8 @@ module TextField : sig ?submit_on_enter:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Textarea.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Textarea.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Textarea.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6021,18 +6744,21 @@ module TextField : sig [@@mel.module "@kobalte/core/text-field"] end - external use_text_field_context : unit -> Types.TextFieldContextValue.t = "useTextFieldContext" + external use_text_field_context : unit -> Types.TextFieldContextValue.t + = "useTextFieldContext" [@@mel.module "@kobalte/core/text-field"] end module TimeField : sig - (** The description that gives the user more information on the form control. *) + (** The description that gives the user more information on the form control. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6040,14 +6766,16 @@ module TimeField : sig [@@mel.module "@kobalte/core/time-field"] end - (** The error message that gives the user information about how to fix a validation error on the form control. *) + (** The error message that gives the user information about how to fix a + validation error on the form control. *) module ErrorMessage : sig module Props : sig external check : ?force_mount:bool Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6059,7 +6787,8 @@ module TimeField : sig module Props : sig external check : ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Input.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Input.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6072,7 +6801,14 @@ module TimeField : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:([ `hour | `minute | `second | `dayPeriod ] Solidtype.Solid.accessor -> Solidtype.Jsx.element, [ `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children: + ( [ `dayPeriod | `hour | `minute | `second ] Solidtype.Solid.accessor -> + Solidtype.Jsx.element, + [ `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6085,7 +6821,8 @@ module TimeField : sig external check : ?as_:(Solidtype.Html.Span.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Span.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Span.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6100,21 +6837,26 @@ module TimeField : sig ?default_value:Types.Time.t Solidtype.Check.value -> ?on_change:(Types.Time.t -> unit) -> ?hour_cycle:float Solidtype.Check.value -> - ?granularity:([ `hour | `minute | `second ], Types.TimeField_Root_Granularity.t) Types.Either.t Solidtype.Check.value -> + ?granularity: + ( [ `hour | `minute | `second ], + Types.TimeField_Root_Granularity.t ) + Types.Either.t + Solidtype.Check.value -> ?force_leading_zeros:bool Solidtype.Check.value -> ?placeholder:Types.Time.t Solidtype.Check.value -> ?min:Types.Time.t Solidtype.Check.value -> ?max:Types.Time.t Solidtype.Check.value -> ?id:string Solidtype.Check.value -> ?name:string Solidtype.Check.value -> - ?validation_state:[ `valid | `invalid ] Solidtype.Check.value -> + ?validation_state:[ `invalid | `valid ] Solidtype.Check.value -> ?required:bool Solidtype.Check.value -> ?disabled:bool Solidtype.Check.value -> ?read_only:bool Solidtype.Check.value -> ?translations:Types.TimeField_Root_Translations.t Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6125,10 +6867,11 @@ module TimeField : sig module Segment : sig module Props : sig external check : - segment:[ `hour | `minute | `second | `dayPeriod ] Solidtype.Check.value -> + segment:[ `dayPeriod | `hour | `minute | `second ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6144,7 +6887,8 @@ module Toast : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6152,13 +6896,15 @@ module Toast : sig [@@mel.module "@kobalte/core/toast"] end - (** An optional accessible description to be announced when the toast is open. *) + (** An optional accessible description to be announced when the toast is open. + *) module Description : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6166,14 +6912,15 @@ module Toast : sig [@@mel.module "@kobalte/core/toast"] end - (** The list containing all rendered toasts. - Must be inside a `Toast.Region`. *) + (** The list containing all rendered toasts. Must be inside a `Toast.Region`. + *) module List : sig module Props : sig external check : ?as_:(Solidtype.Html.Ol.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Ol.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Ol.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6181,14 +6928,15 @@ module Toast : sig [@@mel.module "@kobalte/core/toast"] end - (** The component that visually represents the toast remaining lifetime. - Used to visually show the fill of `Toast.ProgressTrack`. *) + (** The component that visually represents the toast remaining lifetime. Used + to visually show the fill of `Toast.ProgressTrack`. *) module ProgressFill : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6196,14 +6944,15 @@ module Toast : sig [@@mel.module "@kobalte/core/toast"] end - (** The component that visually represents the toast lifetime. - Act as a container for `Toast.ProgressFill`. *) + (** The component that visually represents the toast lifetime. Act as a + container for `Toast.ProgressFill`. *) module ProgressTrack : sig module Props : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6211,8 +6960,9 @@ module Toast : sig [@@mel.module "@kobalte/core/toast"] end - (** The fixed area where toasts appear. Users can jump to by pressing a hotkey. - It is up to you to ensure the discoverability of the hotkey for keyboard users. *) + (** The fixed area where toasts appear. Users can jump to by pressing a + hotkey. It is up to you to ensure the discoverability of the hotkey for + keyboard users. *) module Region : sig module Props : sig external check : @@ -6220,7 +6970,7 @@ module Toast : sig ?hotkey:string array Solidtype.Check.value -> ?duration:float Solidtype.Check.value -> ?limit:float Solidtype.Check.value -> - ?swipe_direction:[ `left | `right | `up | `down ] Solidtype.Check.value -> + ?swipe_direction:[ `down | `left | `right | `up ] Solidtype.Check.value -> ?swipe_threshold:float Solidtype.Check.value -> ?pause_on_interaction:bool Solidtype.Check.value -> ?pause_on_page_idle:bool Solidtype.Check.value -> @@ -6228,7 +6978,8 @@ module Toast : sig ?region_id:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6253,7 +7004,8 @@ module Toast : sig ?on_escape_key_down:(Dom.keyboardEvent -> unit) -> ?as_:(Solidtype.Html.Li.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Li.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Li.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6267,7 +7019,8 @@ module Toast : sig external check : ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6278,13 +7031,15 @@ module Toast : sig external toaster : Types.Toast_Toaster.t = "toaster" [@@mel.module "@kobalte/core/toast"] - external use_toast_context : unit -> Types.ToastContextValue.t = "useToastContext" + external use_toast_context : unit -> Types.ToastContextValue.t + = "useToastContext" [@@mel.module "@kobalte/core/toast"] end module ToggleButton : sig - (** A two-state button that allow users to toggle a selection on or off. - This component is based on the \[WAI-ARIA Button Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) + (** A two-state button that allow users to toggle a selection on or off. This + component is based on the \[WAI-ARIA Button + Pattern\](https://www.w3.org/WAI/ARIA/apg/patterns/button/) *) module Root : sig module Props : sig external check : @@ -6293,7 +7048,13 @@ module ToggleButton : sig ?on_change:(bool -> unit) -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children: + ( Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6309,7 +7070,13 @@ module ToggleGroup : sig value:string Solidtype.Check.value -> ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:(Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, [ `elements | `render ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children: + ( Types.ToggleButtonRootState.t -> Solidtype.Jsx.element, + [ `elements | `render ] ) + Solidtype.Check.children -> + unit -> + unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6327,7 +7094,8 @@ module ToggleGroup : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6346,7 +7114,8 @@ module ToggleGroup : sig ?orientation:[ `horizontal | `vertical ] Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6354,20 +7123,22 @@ module ToggleGroup : sig [@@mel.module "@kobalte/core/toggle-group"] end - external use_toggle_group_context : unit -> Types.ToggleGroupContextValue.t = "useToggleGroupContext" + external use_toggle_group_context : unit -> Types.ToggleGroupContextValue.t + = "useToggleGroupContext" [@@mel.module "@kobalte/core/toggle-group"] end module Tooltip : sig - (** An optional arrow element to render alongside the popper content. - Must be rendered in the popper content. *) + (** An optional arrow element to render alongside the popper content. Must be + rendered in the popper content. *) module Arrow : sig module Props : sig external check : ?size:float Solidtype.Check.value -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6383,7 +7154,8 @@ module Tooltip : sig ?on_pointer_down_outside:(Dom.customEvent -> unit) -> ?as_:(Solidtype.Html.Div.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6400,7 +7172,9 @@ module Tooltip : sig ?is_svg:bool Solidtype.Check.value -> ?ref:(Dom.element -> unit) -> ?props:'spread Solidtype.Solid.rest -> - children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6408,8 +7182,8 @@ module Tooltip : sig [@@mel.module "@kobalte/core/tooltip"] end - (** A popup that displays information related to an element - when the element receives keyboard focus or the mouse hovers over it. *) + (** A popup that displays information related to an element when the element + receives keyboard focus or the mouse hovers over it. *) module Root : sig module Props : sig external check : @@ -6439,7 +7213,9 @@ module Tooltip : sig ?arrow_padding:float Solidtype.Check.value -> ?overflow_padding:float Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6453,7 +7229,8 @@ module Tooltip : sig external check : ?as_:(Solidtype.Html.Button.props -> Solidtype.Jsx.element) -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Button.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Button.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -6461,29 +7238,46 @@ module Tooltip : sig [@@mel.module "@kobalte/core/tooltip"] end - external use_tooltip_context : unit -> Types.TooltipContextValue.t = "useTooltipContext" + external use_tooltip_context : unit -> Types.TooltipContextValue.t + = "useTooltipContext" [@@mel.module "@kobalte/core/tooltip"] end module Selection : sig - (** Provides state management for list-like components. - Handles building a collection of items from props, and manages multiple selection state. *) - external create_list_state : _ Types.CreateListStateProps.t -> Types.ListState.t = "createListState" + external create_list_state : + _ Types.CreateListStateProps.t -> Types.ListState.t = "createListState" [@@mel.module "@kobalte/core"] - - (** Handles interactions with selectable collections. *) - external create_selectable_collection : Types.CreateSelectableCollectionProps.t -> 't Dom.element_like option Solidtype.Solid.accessor -> ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> unit -> Types.Selection_CreateSelectableCollection.t = "createSelectableCollection" + (** Provides state management for list-like components. Handles building a + collection of items from props, and manages multiple selection state. *) + + external create_selectable_collection : + Types.CreateSelectableCollectionProps.t -> + 't Dom.element_like option Solidtype.Solid.accessor -> + ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> + unit -> + Types.Selection_CreateSelectableCollection.t = "createSelectableCollection" [@@mel.module "@kobalte/core"] + (** Handles interactions with selectable collections. *) - (** Handles interactions with an item in a selectable collection. *) - external create_selectable_item : Types.CreateSelectableItemProps.t -> 't Dom.element_like option Solidtype.Solid.accessor -> Types.Selection_CreateSelectableItem.t = "createSelectableItem" + external create_selectable_item : + Types.CreateSelectableItemProps.t -> + 't Dom.element_like option Solidtype.Solid.accessor -> + Types.Selection_CreateSelectableItem.t = "createSelectableItem" [@@mel.module "@kobalte/core"] + (** Handles interactions with an item in a selectable collection. *) - (** Handles interactions with a selectable list. *) - external create_selectable_list : _ Types.CreateSelectableListProps.t -> 't Dom.element_like option Solidtype.Solid.accessor -> ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> unit -> Types.Selection_CreateSelectableList.t = "createSelectableList" + external create_selectable_list : + _ Types.CreateSelectableListProps.t -> + 't Dom.element_like option Solidtype.Solid.accessor -> + ?scroll_ref:'u Dom.element_like option Solidtype.Solid.accessor -> + unit -> + Types.Selection_CreateSelectableList.t = "createSelectableList" [@@mel.module "@kobalte/core"] + (** Handles interactions with a selectable list. *) - (** Handles typeahead interactions with collections. *) - external create_type_select : Types.CreateTypeSelectProps.t -> Types.Selection_CreateTypeSelect.t = "createTypeSelect" + external create_type_select : + Types.CreateTypeSelectProps.t -> Types.Selection_CreateTypeSelect.t + = "createTypeSelect" [@@mel.module "@kobalte/core"] + (** Handles typeahead interactions with collections. *) end diff --git a/kobalte/types.ml b/kobalte/types.ml index 025c305d..79067428 100644 --- a/kobalte/types.ml +++ b/kobalte/types.ml @@ -4,8 +4,8 @@ (* Members of different JavaScript kinds, each as it is. *) type ('a, 'b) either +type t_unknown type t_array_buffer -type t_big_int_to_locale_string_options type t_blob type t_number_format_part type t_readable_stream @@ -13,8 +13,6 @@ type t_resolved_collator_options type t_resolved_number_format_options type t_uint8_array type t_accordion_context_value -type t_alert_dialog_portal_ref_element_ -type t_alert_dialog_portal_ref_element_2 type t_alert_dialog_root_translations type t_breadcrumbs_root_translations type t_breadcrumbs_context_value @@ -64,11 +62,11 @@ type t_image_context_value type t_list_state type t_listbox_context_value type t_menubar_context_value -type t_get_value_label_params +type t_meter_get_value_label_params type t_meter_context_value type t_navigation_menu_context_value type t_number_field_context_value -type t_pagination_root_item_component +type t_pagination_root_item_component_props type t_pagination_context_value type t_popover_root_translations type t_popover_context_value @@ -81,7 +79,7 @@ type 't t_select_base_item_component_props type 't t_select_base_section_component_props type 'option t_select_value_state type t_select_context_value -type t_get_value_label_params2 +type t_slider_get_value_label_params type t_slider_context_value type t_switch_root_state type t_switch_context_value @@ -110,22 +108,21 @@ type t_selection_create_type_select type t_checkbox_data_set type t_collapsible_data_set type t_color_channel_range -type t_color_get_color_space_axes +type t_color_get_color_space_axes_xy_channels type t_color_axes type t_color_area_state -type t_color_area_context_value_on_drag +type t_color_area_context_value_on_drag_deltas type ('t, 'e, 'e_handler) t_bound_event_handler type t_context_id type ('p, 'c) t_flow_props -type t_context_provider +type t_context_provider_props type t_color_wheel_state -type t_color_wheel_context_value_on_drag +type t_color_wheel_context_value_on_drag_deltas type t_combobox_data_set type t_context_menu_context_value_set_anchor_rect type t_hover_card_data_set type t_resolved_date_time_format_options type t_date_time_format_part -type t_date_time_format_format_range type t_selection_manager type t_menubar_data_set type t_meter_data_set @@ -136,7 +133,7 @@ type t_select_data_set type t_slider_data_set type t_slider_state type t_collection_item_with_ref -type t_slider_context_value_on_slide_move +type t_slider_context_value_on_slide_move_deltas type t_switch_data_set type t_single_select_list_state type t_swipe_event_detail @@ -149,8 +146,8 @@ type t_selection_create_type_select_type_select_handlers type t_color_area_state_get_thumb_position type t_color_area_state_channels type t_color_area_state_get_thumb_percent -type t_color_area_state_set_thumb_percent -type t_color_area_state_set_thumb_value +type t_color_area_state_set_thumb_percent_value +type t_color_area_state_set_thumb_value_value type t_color_wheel_state_get_thumb_position type t_multiple_selection_state type t_swipe_event_detail_delta @@ -162,16 +159,16 @@ module Either = struct external right : 'b -> ('a, 'b) t = "%identity" end +(* What TypeScript types any, read from JavaScript: nothing reads it, since a type its reader chose would be an unchecked cast. *) +module Unknown = struct + type t = t_unknown +end + (* The standard library's ArrayBuffer, opaque. *) module ArrayBuffer = struct type t = t_array_buffer end -(* The standard library's BigIntToLocaleStringOptions, opaque. *) -module BigIntToLocaleStringOptions = struct - type t = t_big_int_to_locale_string_options -end - (* The standard library's Blob, opaque. *) module Blob = struct type t = t_blob @@ -204,201 +201,561 @@ end module AccordionContextValue = struct type t = t_accordion_context_value - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external generate_id : t -> string -> string = "generateId" [@@mel.send] - external make : list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> unit -> t = "" [@@mel.obj] -end -module AlertDialog_Portal_Ref_element_ = struct - type t = t_alert_dialog_portal_ref_element_ - (** The `Element.shadowRoot` read-only property represents the shadow root hosted by the element. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) *) - external shadow_root : t -> Dom.shadowRoot = "shadowRoot" [@@mel.get] - external to_element : t -> Dom.element = "%identity" -end + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] -module AlertDialog_Portal_Ref_element_2 = struct - type t = t_alert_dialog_portal_ref_element_2 - (** The `Element.shadowRoot` read-only property represents the shadow root hosted by the element. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) *) - external shadow_root : t -> Dom.shadowRoot = "shadowRoot" [@@mel.get] - external to_html_div_element : t -> Dom.htmlDivElement = "%identity" + external generate_id : t -> string -> string = "generateId" [@@mel.send] + + external make : + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + unit -> + t = "" + [@@mel.obj] end module AlertDialog_Root_Translations = struct type t = t_alert_dialog_root_translations + external dismiss : t -> string = "dismiss" [@@mel.get] - external make : dismiss:(string [@mel.as "dismiss"]) -> unit -> t = "" [@@mel.obj] + + external make : dismiss:(string[@mel.as "dismiss"]) -> unit -> t = "" + [@@mel.obj] end module Breadcrumbs_Root_Translations = struct type t = t_breadcrumbs_root_translations + external breadcrumbs : t -> string = "breadcrumbs" [@@mel.get] - external make : breadcrumbs:(string [@mel.as "breadcrumbs"]) -> unit -> t = "" [@@mel.obj] + + external make : breadcrumbs:(string[@mel.as "breadcrumbs"]) -> unit -> t = "" + [@@mel.obj] end module BreadcrumbsContextValue = struct type t = t_breadcrumbs_context_value - external separator : t -> unit -> Solidtype.Jsx.element = "separator" [@@mel.send] - external make : separator:((unit -> Solidtype.Jsx.element) [@mel.as "separator"]) -> unit -> t = "" [@@mel.obj] + + external separator : t -> unit -> Solidtype.Jsx.element = "separator" + [@@mel.send] + + external make : + separator:((unit -> Solidtype.Jsx.element)[@mel.as "separator"]) -> + unit -> + t = "" + [@@mel.obj] end module CheckboxRootState = struct type t = t_checkbox_root_state + + external checked : t -> bool Solidtype.Solid.accessor = "checked" + [@@mel.get] (** Whether the checkbox is checked or not. *) - external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] + + external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" + [@@mel.get] (** Whether the checkbox is in an indeterminate state. *) - external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" [@@mel.get] - external make : checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> indeterminate:(bool Solidtype.Solid.accessor [@mel.as "indeterminate"]) -> unit -> t = "" [@@mel.obj] + + external make : + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> + indeterminate:(bool Solidtype.Solid.accessor[@mel.as "indeterminate"]) -> + unit -> + t = "" + [@@mel.obj] end module CheckboxContextValue = struct type t = t_checkbox_context_value + external value : t -> string Solidtype.Solid.accessor = "value" [@@mel.get] - external dataset : t -> t_checkbox_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_checkbox_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] - external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] + + external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" + [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] external set_is_checked : t -> bool -> unit = "setIsChecked" [@@mel.send] external set_is_focused : t -> bool -> unit = "setIsFocused" [@@mel.send] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external make : value:(string Solidtype.Solid.accessor [@mel.as "value"]) -> dataset:(t_checkbox_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> indeterminate:(bool Solidtype.Solid.accessor [@mel.as "indeterminate"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> set_is_checked:((bool -> unit) [@mel.as "setIsChecked"]) -> set_is_focused:((bool -> unit) [@mel.as "setIsFocused"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> unit -> t = "" [@@mel.obj] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external make : + value:(string Solidtype.Solid.accessor[@mel.as "value"]) -> + dataset:(t_checkbox_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> + indeterminate:(bool Solidtype.Solid.accessor[@mel.as "indeterminate"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + set_is_checked:((bool -> unit)[@mel.as "setIsChecked"]) -> + set_is_focused:((bool -> unit)[@mel.as "setIsFocused"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + unit -> + t = "" + [@@mel.obj] end module CollapsibleContextValue = struct type t = t_collapsible_context_value - external dataset : t -> t_collapsible_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_collapsible_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external disabled : t -> bool Solidtype.Solid.accessor = "disabled" [@@mel.get] - external should_mount : t -> bool Solidtype.Solid.accessor = "shouldMount" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] + + external disabled : t -> bool Solidtype.Solid.accessor = "disabled" + [@@mel.get] + + external should_mount : t -> bool Solidtype.Solid.accessor = "shouldMount" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + external toggle : t -> unit -> unit = "toggle" [@@mel.send] external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_content_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerContentId" [@@mel.get] - let register_content_id o x0 = let r = (register_content_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : dataset:(t_collapsible_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> disabled:(bool Solidtype.Solid.accessor [@mel.as "disabled"]) -> should_mount:(bool Solidtype.Solid.accessor [@mel.as "shouldMount"]) -> content_id:(string option Solidtype.Solid.accessor [@mel.as "contentId"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_content_id:((string -> (unit -> unit)) [@mel.as "registerContentId"]) -> unit -> t = "" [@@mel.obj] - let make ~dataset ~is_open ~disabled ~should_mount ~content_id ~toggle ~generate_id ~register_content_id () = make_js ~dataset ~is_open ~disabled ~should_mount ~content_id ~toggle ~generate_id ~register_content_id:(fun x0 -> let r = register_content_id x0 in fun () -> r ()) () + + external register_content_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerContentId" + [@@mel.get] + + let register_content_id o x0 = + let r = ((register_content_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + dataset:(t_collapsible_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + disabled:(bool Solidtype.Solid.accessor[@mel.as "disabled"]) -> + should_mount:(bool Solidtype.Solid.accessor[@mel.as "shouldMount"]) -> + content_id:(string option Solidtype.Solid.accessor[@mel.as "contentId"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_content_id:((string -> unit -> unit)[@mel.as "registerContentId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~is_open ~disabled ~should_mount ~content_id ~toggle + ~generate_id ~register_content_id () = + make_js ~dataset ~is_open ~disabled ~should_mount ~content_id ~toggle + ~generate_id + ~register_content_id:(fun x0 -> + let r = register_content_id x0 in + fun () -> r ()) + () end module ColorArea_Root_Translations = struct type t = t_color_area_root_translations + external color_picker : t -> string = "colorPicker" [@@mel.get] - external two_dimensional_slider : t -> string = "twoDimensionalSlider" [@@mel.get] - external make : color_picker:(string [@mel.as "colorPicker"]) -> two_dimensional_slider:(string [@mel.as "twoDimensionalSlider"]) -> unit -> t = "" [@@mel.obj] + + external two_dimensional_slider : t -> string = "twoDimensionalSlider" + [@@mel.get] + + external make : + color_picker:(string[@mel.as "colorPicker"]) -> + two_dimensional_slider:(string[@mel.as "twoDimensionalSlider"]) -> + unit -> + t = "" + [@@mel.obj] end (** Represents a color value. *) module Color = struct type t = t_color - external to_format_js : t -> [ `rgb | `hsl | `hsb | `hex | `hexa | `rgba | `hsla | `hsba ] -> t_color = "toFormat" [@@mel.send] - (** Converts the color to the given color format, and returns a new Color object. - - Raises [Invalid_argument] with Kobalte's message, where it throws. *) + + external to_format_js : + t -> + [ `hex | `hexa | `hsb | `hsba | `hsl | `hsla | `rgb | `rgba ] -> + t_color = "toFormat" + [@@mel.send] + let to_format o x0 = match to_format_js o x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("to_format: " ^ Option.value (Js.Exn.message e) ~default:"") - let to_format_opt o x0 = match to_format_js o x0 with v -> Some v | exception Js.Exn.Error _ -> None - external to_string : t -> ?format:[ `rgb | `hsl | `hsb | `hex | `hexa | `rgba | `hsla | `hsba | `css ] -> unit -> string = "toString" [@@mel.send] + | exception Js.Exn.Error e -> + invalid_arg ("to_format: " ^ Option.value (Js.Exn.message e) ~default:"") + + let to_format_opt o x0 = + match to_format_js o x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None + + external to_string : + t -> + ?format:[ `css | `hex | `hexa | `hsb | `hsba | `hsl | `hsla | `rgb | `rgba ] -> + unit -> + string = "toString" + [@@mel.send] + external clone : t -> unit -> t_color = "clone" [@@mel.send] external to_hex_int : t -> unit -> float = "toHexInt" [@@mel.send] - external get_channel_value_js : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> float = "getChannelValue" [@@mel.send] - (** Returns the numeric value for a given channel. - Throws an error if the channel is unsupported in the current color format. - - Raises [Invalid_argument] with Kobalte's message, where it throws. *) + + external get_channel_value_js : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + float = "getChannelValue" + [@@mel.send] + let get_channel_value o x0 = match get_channel_value_js o x0 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("get_channel_value: " ^ Option.value (Js.Exn.message e) ~default:"") - let get_channel_value_opt o x0 = match get_channel_value_js o x0 with v -> Some v | exception Js.Exn.Error _ -> None - external with_channel_value_js : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> float -> t_color = "withChannelValue" [@@mel.send] - (** Sets the numeric value for a given channel, and returns a new Color object. - Throws an error if the channel is unsupported in the current color format. - - Raises [Invalid_argument] with Kobalte's message, where it throws. *) + | exception Js.Exn.Error e -> + invalid_arg + ("get_channel_value: " ^ Option.value (Js.Exn.message e) ~default:"") + + let get_channel_value_opt o x0 = + match get_channel_value_js o x0 with + | v -> Some v + | exception Js.Exn.Error _ -> None + + external with_channel_value_js : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + float -> + t_color = "withChannelValue" + [@@mel.send] + let with_channel_value o x0 x1 = match with_channel_value_js o x0 x1 with | v -> v - | exception Js.Exn.Error e -> invalid_arg ("with_channel_value: " ^ Option.value (Js.Exn.message e) ~default:"") - let with_channel_value_opt o x0 x1 = match with_channel_value_js o x0 x1 with v -> Some v | exception Js.Exn.Error _ -> None - external get_channel_range : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> t_color_channel_range = "getChannelRange" [@@mel.send] - external get_channel_name : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> t_color_slider_root_translations -> string = "getChannelName" [@@mel.send] - external get_channel_format_options : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> t_number_format_options = "getChannelFormatOptions" [@@mel.send] - external format_channel_value : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> string = "formatChannelValue" [@@mel.send] - external get_color_space : t -> unit -> [ `rgb | `hsl | `hsb ] = "getColorSpace" [@@mel.send] - external get_color_space_axes : t -> t_color_get_color_space_axes -> t_color_axes = "getColorSpaceAxes" [@@mel.send] - external get_color_channels : t -> unit -> ([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ]) = "getColorChannels" [@@mel.send] - external get_color_name : t -> t_color_slider_root_translations -> string = "getColorName" [@@mel.send] - external get_hue_name : t -> t_color_slider_root_translations -> string = "getHueName" [@@mel.send] + | exception Js.Exn.Error e -> + invalid_arg + ("with_channel_value: " ^ Option.value (Js.Exn.message e) ~default:"") + + let with_channel_value_opt o x0 x1 = + match with_channel_value_js o x0 x1 with + | v -> Some v + | exception Js.Exn.Error _ -> None + + external get_channel_range : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + t_color_channel_range = "getChannelRange" + [@@mel.send] + + external get_channel_name : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + t_color_slider_root_translations -> + string = "getChannelName" + [@@mel.send] + + external get_channel_format_options : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + t_number_format_options = "getChannelFormatOptions" + [@@mel.send] + + external format_channel_value : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + string = "formatChannelValue" + [@@mel.send] + + external get_color_space : t -> unit -> [ `hsb | `hsl | `rgb ] + = "getColorSpace" + [@@mel.send] + + external get_color_space_axes : + t -> t_color_get_color_space_axes_xy_channels -> t_color_axes + = "getColorSpaceAxes" + [@@mel.send] + + external get_color_channels : + t -> + unit -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "getColorChannels" + [@@mel.send] + + external get_color_name : t -> t_color_slider_root_translations -> string + = "getColorName" + [@@mel.send] + + external get_hue_name : t -> t_color_slider_root_translations -> string + = "getHueName" + [@@mel.send] end module ColorAreaContextValue = struct type t = t_color_area_context_value + external state : t -> t_color_area_state = "state" [@@mel.get] - external x_name : t -> string option Solidtype.Solid.accessor = "xName" [@@mel.get] - external y_name : t -> string option Solidtype.Solid.accessor = "yName" [@@mel.get] - external on_drag_start : t -> (float array -> unit) option = "onDragStart" [@@mel.get] - external on_drag : t -> (t_color_area_context_value_on_drag -> unit) option = "onDrag" [@@mel.get] + + external x_name : t -> string option Solidtype.Solid.accessor = "xName" + [@@mel.get] + + external y_name : t -> string option Solidtype.Solid.accessor = "yName" + [@@mel.get] + + external on_drag_start : t -> (float array -> unit) option = "onDragStart" + [@@mel.get] + + external on_drag : + t -> (t_color_area_context_value_on_drag_deltas -> unit) option = "onDrag" + [@@mel.get] + external on_drag_end : t -> (unit -> unit) option = "onDragEnd" [@@mel.get] - external translations : t -> t_color_area_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external get_display_color : t -> unit -> t_color = "getDisplayColor" [@@mel.send] - external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" [@@mel.send] - external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "thumbRef" [@@mel.get] - external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" [@@mel.send] - external background_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "backgroundRef" [@@mel.get] - external set_background_ref : t -> Dom.htmlElement -> unit = "setBackgroundRef" [@@mel.send] + + external translations : + t -> t_color_area_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external get_display_color : t -> unit -> t_color = "getDisplayColor" + [@@mel.send] + + external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" + [@@mel.send] + + external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "thumbRef" + [@@mel.get] + + external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" + [@@mel.send] + + external background_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "backgroundRef" + [@@mel.get] + + external set_background_ref : t -> Dom.htmlElement -> unit + = "setBackgroundRef" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external make : state:(t_color_area_state [@mel.as "state"]) -> x_name:(string option Solidtype.Solid.accessor [@mel.as "xName"]) -> y_name:(string option Solidtype.Solid.accessor [@mel.as "yName"]) -> on_drag_start:((float array -> unit) option [@mel.as "onDragStart"]) -> on_drag:((t_color_area_context_value_on_drag -> unit) option [@mel.as "onDrag"]) -> on_drag_end:((unit -> unit) option [@mel.as "onDragEnd"]) -> translations:(t_color_area_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> get_display_color:((unit -> t_color) [@mel.as "getDisplayColor"]) -> on_step_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onStepKeyDown"]) -> thumb_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "thumbRef"]) -> set_thumb_ref:((Dom.htmlElement -> unit) [@mel.as "setThumbRef"]) -> background_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "backgroundRef"]) -> set_background_ref:((Dom.htmlElement -> unit) [@mel.as "setBackgroundRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> unit -> t = "" [@@mel.obj] + + external make : + state:(t_color_area_state[@mel.as "state"]) -> + x_name:(string option Solidtype.Solid.accessor[@mel.as "xName"]) -> + y_name:(string option Solidtype.Solid.accessor[@mel.as "yName"]) -> + on_drag_start:((float array -> unit) option[@mel.as "onDragStart"]) -> + on_drag: + ((t_color_area_context_value_on_drag_deltas -> unit) option + [@mel.as "onDrag"]) -> + on_drag_end:((unit -> unit) option[@mel.as "onDragEnd"]) -> + translations: + (t_color_area_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + get_display_color:((unit -> t_color)[@mel.as "getDisplayColor"]) -> + on_step_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onStepKeyDown"]) -> + thumb_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "thumbRef"]) -> + set_thumb_ref:((Dom.htmlElement -> unit)[@mel.as "setThumbRef"]) -> + background_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "backgroundRef"]) -> + set_background_ref:((Dom.htmlElement -> unit)[@mel.as "setBackgroundRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorChannelField_Root_Translations = struct type t = t_color_channel_field_root_translations + external empty : t -> string = "empty" [@@mel.get] - external make : empty:(string [@mel.as "empty"]) -> unit -> t = "" [@@mel.obj] + external make : empty:(string[@mel.as "empty"]) -> unit -> t = "" [@@mel.obj] end module ColorFieldContextValue = struct type t = t_color_field_context_value - external on_blur : t -> (Dom.focusEvent -> unit, (Dom.htmlInputElement, Dom.focusEvent, Dom.focusEvent -> unit) t_bound_event_handler) either = "onBlur" [@@mel.get] - external make : on_blur:((Dom.focusEvent -> unit, (Dom.htmlInputElement, Dom.focusEvent, Dom.focusEvent -> unit) t_bound_event_handler) either [@mel.as "onBlur"]) -> unit -> t = "" [@@mel.obj] + + external on_blur : + t -> + ( Dom.focusEvent -> unit, + ( Dom.htmlInputElement, + Dom.focusEvent, + Dom.focusEvent -> unit ) + t_bound_event_handler ) + either = "onBlur" + [@@mel.get] + + external make : + on_blur: + (( Dom.focusEvent -> unit, + ( Dom.htmlInputElement, + Dom.focusEvent, + Dom.focusEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onBlur"]) -> + unit -> + t = "" + [@@mel.obj] end module Context = struct type 't t = 't t_context + external id : 't t -> t_context_id = "id" [@@mel.get] - external provider : 't t -> (t_context_provider, Solidtype.Jsx.element) t_flow_props -> Solidtype.Jsx.element = "Provider" [@@mel.send] + + external provider : + 't t -> + (t_context_provider_props, Solidtype.Jsx.element) t_flow_props -> + Solidtype.Jsx.element = "Provider" + [@@mel.send] + external default_value : 't t -> 't = "defaultValue" [@@mel.get] - external make : id:(t_context_id [@mel.as "id"]) -> provider:(((t_context_provider, Solidtype.Jsx.element) t_flow_props -> Solidtype.Jsx.element) [@mel.as "Provider"]) -> default_value:('t [@mel.as "defaultValue"]) -> unit -> 't t = "" [@@mel.obj] + + external make : + id:(t_context_id[@mel.as "id"]) -> + provider: + (((t_context_provider_props, Solidtype.Jsx.element) t_flow_props -> + Solidtype.Jsx.element) + [@mel.as "Provider"]) -> + default_value:('t[@mel.as "defaultValue"]) -> + unit -> + 't t = "" + [@@mel.obj] end module ColorModeContextType = struct type t = t_color_mode_context_type - external color_mode : t -> [ `light | `dark ] Solidtype.Solid.accessor = "colorMode" [@@mel.get] - external set_color_mode : t -> [ `light | `dark | `system ] -> unit = "setColorMode" [@@mel.send] - external toggle_color_mode : t -> unit -> unit = "toggleColorMode" [@@mel.send] - external make : color_mode:([ `light | `dark ] Solidtype.Solid.accessor [@mel.as "colorMode"]) -> set_color_mode:(([ `light | `dark | `system ] -> unit) [@mel.as "setColorMode"]) -> toggle_color_mode:((unit -> unit) [@mel.as "toggleColorMode"]) -> unit -> t = "" [@@mel.obj] + + external color_mode : t -> [ `dark | `light ] Solidtype.Solid.accessor + = "colorMode" + [@@mel.get] + + external set_color_mode : t -> [ `dark | `light | `system ] -> unit + = "setColorMode" + [@@mel.send] + + external toggle_color_mode : t -> unit -> unit = "toggleColorMode" + [@@mel.send] + + external make : + color_mode: + ([ `dark | `light ] Solidtype.Solid.accessor[@mel.as "colorMode"]) -> + set_color_mode: + (([ `dark | `light | `system ] -> unit)[@mel.as "setColorMode"]) -> + toggle_color_mode:((unit -> unit)[@mel.as "toggleColorMode"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorModeStorageManager = struct type t = t_color_mode_storage_manager + + external type_ : t -> [ `cookie | `localStorage ] = "type" + [@@mel.get] (** The type of storage. *) - external type_ : t -> [ `localStorage | `cookie ] = "type" [@@mel.get] + + external ssr : t -> bool option = "ssr" + [@@mel.get] (** Whether it's an SSR environment. *) - external ssr : t -> bool option = "ssr" [@@mel.get] + + external get : + t -> + ?fallback:[ `dark | `light | `system ] -> + unit -> + [ `dark | `light | `system ] option = "get" + [@@mel.send] (** Get the color mode from the storage. *) - external get : t -> ?fallback:[ `light | `dark | `system ] -> unit -> [ `light | `dark | `system ] option = "get" [@@mel.send] + + external set : t -> [ `dark | `light | `system ] -> unit = "set" + [@@mel.send] (** Save the color mode in the storage. *) - external set : t -> [ `light | `dark | `system ] -> unit = "set" [@@mel.send] - external make : type_:([ `localStorage | `cookie ] [@mel.as "type"]) -> ?ssr:(bool [@mel.as "ssr"]) -> get:(([ `light | `dark | `system ] option -> [ `light | `dark | `system ] option) [@mel.as "get"]) -> set:(([ `light | `dark | `system ] -> unit) [@mel.as "set"]) -> unit -> t = "" [@@mel.obj] + + external make : + type_:([ `cookie | `localStorage ][@mel.as "type"]) -> + ?ssr:(bool[@mel.as "ssr"]) -> + get: + (([ `dark | `light | `system ] option -> + [ `dark | `light | `system ] option) + [@mel.as "get"]) -> + set:(([ `dark | `light | `system ] -> unit)[@mel.as "set"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorSlider_Root_Translations = struct type t = t_color_slider_root_translations + external hue : t -> string = "hue" [@@mel.get] external saturation : t -> string = "saturation" [@@mel.get] external lightness : t -> string = "lightness" [@@mel.get] @@ -407,8 +764,14 @@ module ColorSlider_Root_Translations = struct external green : t -> string = "green" [@@mel.get] external blue : t -> string = "blue" [@@mel.get] external alpha : t -> string = "alpha" [@@mel.get] - external color_name : t -> string -> string -> string -> string = "colorName" [@@mel.send] - external transparent_color_name : t -> string -> string -> string -> string -> string = "transparentColorName" [@@mel.send] + + external color_name : t -> string -> string -> string -> string = "colorName" + [@@mel.send] + + external transparent_color_name : + t -> string -> string -> string -> string -> string = "transparentColorName" + [@@mel.send] + external dark : t -> string = "dark" [@@mel.get] external light : t -> string = "light" [@@mel.get] external pale : t -> string = "pale" [@@mel.get] @@ -424,832 +787,2991 @@ module ColorSlider_Root_Translations = struct external cyan : t -> string = "cyan" [@@mel.get] external purple : t -> string = "purple" [@@mel.get] external magenta : t -> string = "magenta" [@@mel.get] - external make : hue:(string [@mel.as "hue"]) -> saturation:(string [@mel.as "saturation"]) -> lightness:(string [@mel.as "lightness"]) -> brightness:(string [@mel.as "brightness"]) -> red:(string [@mel.as "red"]) -> green:(string [@mel.as "green"]) -> blue:(string [@mel.as "blue"]) -> alpha:(string [@mel.as "alpha"]) -> color_name:((string -> string -> string -> string) [@mel.as "colorName"]) -> transparent_color_name:((string -> string -> string -> string -> string) [@mel.as "transparentColorName"]) -> dark:(string [@mel.as "dark"]) -> light:(string [@mel.as "light"]) -> pale:(string [@mel.as "pale"]) -> grayish:(string [@mel.as "grayish"]) -> vibrant:(string [@mel.as "vibrant"]) -> black:(string [@mel.as "black"]) -> white:(string [@mel.as "white"]) -> gray:(string [@mel.as "gray"]) -> pink:(string [@mel.as "pink"]) -> brown:(string [@mel.as "brown"]) -> orange:(string [@mel.as "orange"]) -> yellow:(string [@mel.as "yellow"]) -> cyan:(string [@mel.as "cyan"]) -> purple:(string [@mel.as "purple"]) -> magenta:(string [@mel.as "magenta"]) -> unit -> t = "" [@@mel.obj] + + external make_js : + hue:(string[@mel.as "hue"]) -> + saturation:(string[@mel.as "saturation"]) -> + lightness:(string[@mel.as "lightness"]) -> + brightness:(string[@mel.as "brightness"]) -> + red:(string[@mel.as "red"]) -> + green:(string[@mel.as "green"]) -> + blue:(string[@mel.as "blue"]) -> + alpha:(string[@mel.as "alpha"]) -> + color_name:((string -> string -> string -> string)[@mel.as "colorName"]) -> + transparent_color_name: + ((string -> string -> string -> string -> string) + [@mel.as "transparentColorName"]) -> + dark:(string[@mel.as "dark"]) -> + light:(string[@mel.as "light"]) -> + pale:(string[@mel.as "pale"]) -> + grayish:(string[@mel.as "grayish"]) -> + vibrant:(string[@mel.as "vibrant"]) -> + black:(string[@mel.as "black"]) -> + white:(string[@mel.as "white"]) -> + gray:(string[@mel.as "gray"]) -> + pink:(string[@mel.as "pink"]) -> + brown:(string[@mel.as "brown"]) -> + orange:(string[@mel.as "orange"]) -> + yellow:(string[@mel.as "yellow"]) -> + cyan:(string[@mel.as "cyan"]) -> + purple:(string[@mel.as "purple"]) -> + magenta:(string[@mel.as "magenta"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~hue ~saturation ~lightness ~brightness ~red ~green ~blue ~alpha + ~color_name ~transparent_color_name ~dark ~light ~pale ~grayish ~vibrant + ~black ~white ~gray ~pink ~brown ~orange ~yellow ~cyan ~purple ~magenta () + = + make_js ~hue ~saturation ~lightness ~brightness ~red ~green ~blue ~alpha + ~color_name:(fun x0 x1 x2 -> color_name x0 x1 x2) + ~transparent_color_name:(fun x0 x1 x2 x3 -> + transparent_color_name x0 x1 x2 x3) + ~dark ~light ~pale ~grayish ~vibrant ~black ~white ~gray ~pink ~brown + ~orange ~yellow ~cyan ~purple ~magenta () end module ColorSliderContextValue = struct type t = t_color_slider_context_value + external value : t -> t_color Solidtype.Solid.accessor = "value" [@@mel.get] - external channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Solid.accessor = "channel" [@@mel.get] - external get_display_color : t -> unit -> t_color = "getDisplayColor" [@@mel.send] - external translations : t -> t_color_slider_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external make : value:(t_color Solidtype.Solid.accessor [@mel.as "value"]) -> channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Solid.accessor [@mel.as "channel"]) -> get_display_color:((unit -> t_color) [@mel.as "getDisplayColor"]) -> translations:(t_color_slider_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> unit -> t = "" [@@mel.obj] + + external channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Solid.accessor = "channel" + [@@mel.get] + + external get_display_color : t -> unit -> t_color = "getDisplayColor" + [@@mel.send] + + external translations : + t -> t_color_slider_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external make : + value:(t_color Solidtype.Solid.accessor[@mel.as "value"]) -> + channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Solid.accessor + [@mel.as "channel"]) -> + get_display_color:((unit -> t_color)[@mel.as "getDisplayColor"]) -> + translations: + (t_color_slider_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorSwatch_Root_Translations = struct type t = t_color_swatch_root_translations + external role_description : t -> string = "roleDescription" [@@mel.get] external transparent : t -> string = "transparent" [@@mel.get] - external make : role_description:(string [@mel.as "roleDescription"]) -> transparent:(string [@mel.as "transparent"]) -> unit -> t = "" [@@mel.obj] + + external make : + role_description:(string[@mel.as "roleDescription"]) -> + transparent:(string[@mel.as "transparent"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorWheelContextValue = struct type t = t_color_wheel_context_value + external state : t -> t_color_wheel_state = "state" [@@mel.get] - external outer_radius : t -> float option Solidtype.Solid.accessor = "outerRadius" [@@mel.get] - external thickness : t -> float Solidtype.Solid.accessor = "thickness" [@@mel.get] - external on_drag_start : t -> (float array -> unit) option = "onDragStart" [@@mel.get] - external on_drag : t -> (t_color_wheel_context_value_on_drag -> unit) option = "onDrag" [@@mel.get] + + external outer_radius : t -> float option Solidtype.Solid.accessor + = "outerRadius" + [@@mel.get] + + external thickness : t -> float Solidtype.Solid.accessor = "thickness" + [@@mel.get] + + external on_drag_start : t -> (float array -> unit) option = "onDragStart" + [@@mel.get] + + external on_drag : + t -> (t_color_wheel_context_value_on_drag_deltas -> unit) option = "onDrag" + [@@mel.get] + external on_drag_end : t -> (unit -> unit) option = "onDragEnd" [@@mel.get] - external get_thumb_value_label : t -> unit -> string = "getThumbValueLabel" [@@mel.send] - external get_value_label : t -> t_color -> string = "getValueLabel" [@@mel.send] - external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" [@@mel.send] - external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "thumbRef" [@@mel.get] - external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" [@@mel.send] - external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "trackRef" [@@mel.get] - external set_track_ref : t -> Dom.htmlElement -> unit = "setTrackRef" [@@mel.send] + + external get_thumb_value_label : t -> unit -> string = "getThumbValueLabel" + [@@mel.send] + + external get_value_label : t -> t_color -> string = "getValueLabel" + [@@mel.send] + + external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" + [@@mel.send] + + external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "thumbRef" + [@@mel.get] + + external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" + [@@mel.send] + + external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "trackRef" + [@@mel.get] + + external set_track_ref : t -> Dom.htmlElement -> unit = "setTrackRef" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external make : state:(t_color_wheel_state [@mel.as "state"]) -> outer_radius:(float option Solidtype.Solid.accessor [@mel.as "outerRadius"]) -> thickness:(float Solidtype.Solid.accessor [@mel.as "thickness"]) -> on_drag_start:((float array -> unit) option [@mel.as "onDragStart"]) -> on_drag:((t_color_wheel_context_value_on_drag -> unit) option [@mel.as "onDrag"]) -> on_drag_end:((unit -> unit) option [@mel.as "onDragEnd"]) -> get_thumb_value_label:((unit -> string) [@mel.as "getThumbValueLabel"]) -> get_value_label:((t_color -> string) [@mel.as "getValueLabel"]) -> on_step_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onStepKeyDown"]) -> thumb_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "thumbRef"]) -> set_thumb_ref:((Dom.htmlElement -> unit) [@mel.as "setThumbRef"]) -> track_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "trackRef"]) -> set_track_ref:((Dom.htmlElement -> unit) [@mel.as "setTrackRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> unit -> t = "" [@@mel.obj] + + external make : + state:(t_color_wheel_state[@mel.as "state"]) -> + outer_radius:(float option Solidtype.Solid.accessor[@mel.as "outerRadius"]) -> + thickness:(float Solidtype.Solid.accessor[@mel.as "thickness"]) -> + on_drag_start:((float array -> unit) option[@mel.as "onDragStart"]) -> + on_drag: + ((t_color_wheel_context_value_on_drag_deltas -> unit) option + [@mel.as "onDrag"]) -> + on_drag_end:((unit -> unit) option[@mel.as "onDragEnd"]) -> + get_thumb_value_label:((unit -> string)[@mel.as "getThumbValueLabel"]) -> + get_value_label:((t_color -> string)[@mel.as "getValueLabel"]) -> + on_step_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onStepKeyDown"]) -> + thumb_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "thumbRef"]) -> + set_thumb_ref:((Dom.htmlElement -> unit)[@mel.as "setThumbRef"]) -> + track_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "trackRef"]) -> + set_track_ref:((Dom.htmlElement -> unit)[@mel.as "setTrackRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + unit -> + t = "" + [@@mel.obj] end module ComboboxControlState = struct type 'option t = 'option t_combobox_control_state + + external selected_options : + 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" + [@@mel.get] (** The selected options. *) - external selected_options : 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" [@@mel.get] + + external remove : 'option t -> 'option -> unit = "remove" + [@@mel.send] (** A function to remove an option from the selection. *) - external remove : 'option t -> 'option -> unit = "remove" [@@mel.send] + + external clear : 'option t -> unit -> unit = "clear" + [@@mel.send] (** A function to clear the selection. *) - external clear : 'option t -> unit -> unit = "clear" [@@mel.send] - external make : selected_options:('option array Solidtype.Solid.accessor [@mel.as "selectedOptions"]) -> remove:(('option -> unit) [@mel.as "remove"]) -> clear:((unit -> unit) [@mel.as "clear"]) -> unit -> 'option t = "" [@@mel.obj] + + external make : + selected_options: + ('option array Solidtype.Solid.accessor[@mel.as "selectedOptions"]) -> + remove:(('option -> unit)[@mel.as "remove"]) -> + clear:((unit -> unit)[@mel.as "clear"]) -> + unit -> + 'option t = "" + [@@mel.obj] end module CollectionNode = struct type 't t = 't t_collection_node + + external type_ : 't t -> [ `item | `section ] = "type" + [@@mel.get] (** The type of item this node represents. *) - external type_ : 't t -> [ `section | `item ] = "type" [@@mel.get] + + external key : 't t -> string = "key" + [@@mel.get] (** A unique key for the node. *) - external key : 't t -> string = "key" [@@mel.get] + + external raw_value : 't t -> 't = "rawValue" + [@@mel.get] (** The source object this node was created from. *) - external raw_value : 't t -> 't = "rawValue" [@@mel.get] + + external text_value : 't t -> string = "textValue" + [@@mel.get] (** A string value for the node, used for features like typeahead. *) - external text_value : 't t -> string = "textValue" [@@mel.get] + + external disabled : 't t -> bool = "disabled" + [@@mel.get] (** Whether the node is disabled. *) - external disabled : 't t -> bool = "disabled" [@@mel.get] + + external level : 't t -> float = "level" + [@@mel.get] (** The level of depth this node is at in the hierarchy. *) - external level : 't t -> float = "level" [@@mel.get] + + external index : 't t -> float = "index" + [@@mel.get] (** The index of this node within its parent. *) - external index : 't t -> float = "index" [@@mel.get] + + external prev_key : 't t -> string option = "prevKey" + [@@mel.get] (** The key of the node before this node. *) - external prev_key : 't t -> string option = "prevKey" [@@mel.get] + + external next_key : 't t -> string option = "nextKey" + [@@mel.get] (** The key of the node after this node. *) - external next_key : 't t -> string option = "nextKey" [@@mel.get] - external make : type_:([ `section | `item ] [@mel.as "type"]) -> key:(string [@mel.as "key"]) -> raw_value:('t [@mel.as "rawValue"]) -> text_value:(string [@mel.as "textValue"]) -> disabled:(bool [@mel.as "disabled"]) -> level:(float [@mel.as "level"]) -> index:(float [@mel.as "index"]) -> ?prev_key:(string [@mel.as "prevKey"]) -> ?next_key:(string [@mel.as "nextKey"]) -> unit -> 't t = "" [@@mel.obj] -end -(** A generic interface to access a readonly sequential - collection of unique keyed items. *) + external make : + type_:([ `item | `section ][@mel.as "type"]) -> + key:(string[@mel.as "key"]) -> + raw_value:('t[@mel.as "rawValue"]) -> + text_value:(string[@mel.as "textValue"]) -> + disabled:(bool[@mel.as "disabled"]) -> + level:(float[@mel.as "level"]) -> + index:(float[@mel.as "index"]) -> + ?prev_key:(string[@mel.as "prevKey"]) -> + ?next_key:(string[@mel.as "nextKey"]) -> + unit -> + 't t = "" + [@@mel.obj] +end + +(** A generic interface to access a readonly sequential collection of unique + keyed items. *) module Collection = struct type 't t = 't t_collection + + external get_size : 't t -> unit -> float = "getSize" + [@@mel.send] (** The number of items in the collection. *) - external get_size : 't t -> unit -> float = "getSize" [@@mel.send] + + external get_keys : 't t -> unit -> string array = "getKeys" + [@@mel.send] (** Iterate over all keys in the collection. *) - external get_keys : 't t -> unit -> string array = "getKeys" [@@mel.send] + + external get_item : 't t -> string -> 't option = "getItem" + [@@mel.send] (** Get an item by its key. *) - external get_item : 't t -> string -> 't option = "getItem" [@@mel.send] + + external at : 't t -> float -> 't option = "at" + [@@mel.send] (** Get an item by the index of its key. *) - external at : 't t -> float -> 't option = "at" [@@mel.send] + + external get_key_before : 't t -> string -> string option = "getKeyBefore" + [@@mel.send] (** Get the key that comes before the given key in the collection. *) - external get_key_before : 't t -> string -> string option = "getKeyBefore" [@@mel.send] + + external get_key_after : 't t -> string -> string option = "getKeyAfter" + [@@mel.send] (** Get the key that comes after the given key in the collection. *) - external get_key_after : 't t -> string -> string option = "getKeyAfter" [@@mel.send] + + external get_first_key : 't t -> unit -> string option = "getFirstKey" + [@@mel.send] (** Get the first key in the collection. *) - external get_first_key : 't t -> unit -> string option = "getFirstKey" [@@mel.send] + + external get_last_key : 't t -> unit -> string option = "getLastKey" + [@@mel.send] (** Get the last key in the collection. *) - external get_last_key : 't t -> unit -> string option = "getLastKey" [@@mel.send] - external make : get_size:((unit -> float) [@mel.as "getSize"]) -> get_keys:((unit -> string array) [@mel.as "getKeys"]) -> get_item:((string -> 't option) [@mel.as "getItem"]) -> at:((float -> 't option) [@mel.as "at"]) -> get_key_before:((string -> string option) [@mel.as "getKeyBefore"]) -> get_key_after:((string -> string option) [@mel.as "getKeyAfter"]) -> get_first_key:((unit -> string option) [@mel.as "getFirstKey"]) -> get_last_key:((unit -> string option) [@mel.as "getLastKey"]) -> unit -> 't t = "" [@@mel.obj] + + external make : + get_size:((unit -> float)[@mel.as "getSize"]) -> + get_keys:((unit -> string array)[@mel.as "getKeys"]) -> + get_item:((string -> 't option)[@mel.as "getItem"]) -> + at:((float -> 't option)[@mel.as "at"]) -> + get_key_before:((string -> string option)[@mel.as "getKeyBefore"]) -> + get_key_after:((string -> string option)[@mel.as "getKeyAfter"]) -> + get_first_key:((unit -> string option)[@mel.as "getFirstKey"]) -> + get_last_key:((unit -> string option)[@mel.as "getLastKey"]) -> + unit -> + 't t = "" + [@@mel.obj] end module Combobox_Root_Translations = struct type t = t_combobox_root_translations - external focus_announcement : t -> string -> bool -> string = "focusAnnouncement" [@@mel.send] - external count_announcement : t -> float -> string option = "countAnnouncement" [@@mel.send] - external selected_announcement : t -> string -> string = "selectedAnnouncement" [@@mel.send] + + external focus_announcement : t -> string -> bool -> string + = "focusAnnouncement" + [@@mel.send] + + external count_announcement : t -> float -> string option + = "countAnnouncement" + [@@mel.send] + + external selected_announcement : t -> string -> string + = "selectedAnnouncement" + [@@mel.send] + external trigger_label : t -> string = "triggerLabel" [@@mel.get] external listbox_label : t -> string = "listboxLabel" [@@mel.get] - external make : focus_announcement:((string -> bool -> string) [@mel.as "focusAnnouncement"]) -> count_announcement:((float -> string option) [@mel.as "countAnnouncement"]) -> selected_announcement:((string -> string) [@mel.as "selectedAnnouncement"]) -> trigger_label:(string [@mel.as "triggerLabel"]) -> listbox_label:(string [@mel.as "listboxLabel"]) -> unit -> t = "" [@@mel.obj] + + external make_js : + focus_announcement:((string -> bool -> string)[@mel.as "focusAnnouncement"]) -> + count_announcement:((float -> string option)[@mel.as "countAnnouncement"]) -> + selected_announcement:((string -> string)[@mel.as "selectedAnnouncement"]) -> + trigger_label:(string[@mel.as "triggerLabel"]) -> + listbox_label:(string[@mel.as "listboxLabel"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~focus_announcement ~count_announcement ~selected_announcement + ~trigger_label ~listbox_label () = + make_js + ~focus_announcement:(fun x0 x1 -> focus_announcement x0 x1) + ~count_announcement ~selected_announcement ~trigger_label ~listbox_label + () end module AnchorRect = struct type t = t_anchor_rect + external x : t -> float option = "x" [@@mel.get] external y : t -> float option = "y" [@@mel.get] external width : t -> float option = "width" [@@mel.get] external height : t -> float option = "height" [@@mel.get] - external make : ?x:(float [@mel.as "x"]) -> ?y:(float [@mel.as "y"]) -> ?width:(float [@mel.as "width"]) -> ?height:(float [@mel.as "height"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?x:(float[@mel.as "x"]) -> + ?y:(float[@mel.as "y"]) -> + ?width:(float[@mel.as "width"]) -> + ?height:(float[@mel.as "height"]) -> + unit -> + t = "" + [@@mel.obj] end module KeyboardDelegate = struct type t = t_keyboard_delegate - (** Returns the key visually below the given one, or `undefined` for none. *) - external get_key_below : t -> (string -> string option) option = "getKeyBelow" [@@mel.get] - (** Returns the key visually above the given one, or `undefined` for none. *) - external get_key_above : t -> (string -> string option) option = "getKeyAbove" [@@mel.get] - (** Returns the key visually to the left of the given one, or `undefined` for none. *) - external get_key_left_of : t -> (string -> string option) option = "getKeyLeftOf" [@@mel.get] - (** Returns the key visually to the right of the given one, or `undefined` for none. *) - external get_key_right_of : t -> (string -> string option) option = "getKeyRightOf" [@@mel.get] - (** Returns the key visually one page below the given one, or `undefined` for none. *) - external get_key_page_below : t -> (string -> string option) option = "getKeyPageBelow" [@@mel.get] - (** Returns the key visually one page above the given one, or `undefined` for none. *) - external get_key_page_above : t -> (string -> string option) option = "getKeyPageAbove" [@@mel.get] - (** Returns the first key, or `undefined` for none. *) - external get_first_key : t -> (string option -> bool option -> string option) option = "getFirstKey" [@@mel.get] - (** Returns the last key, or `undefined` for none. *) - external get_last_key : t -> (string option -> bool option -> string option) option = "getLastKey" [@@mel.get] - (** Returns the next key after `fromKey` that matches the given search string, or `undefined` for none. *) - external get_key_for_search : t -> (string -> string option -> string option) option = "getKeyForSearch" [@@mel.get] - external make : ?get_key_below:((string -> string option) [@mel.as "getKeyBelow"]) -> ?get_key_above:((string -> string option) [@mel.as "getKeyAbove"]) -> ?get_key_left_of:((string -> string option) [@mel.as "getKeyLeftOf"]) -> ?get_key_right_of:((string -> string option) [@mel.as "getKeyRightOf"]) -> ?get_key_page_below:((string -> string option) [@mel.as "getKeyPageBelow"]) -> ?get_key_page_above:((string -> string option) [@mel.as "getKeyPageAbove"]) -> ?get_first_key:((string option -> bool option -> string option) [@mel.as "getFirstKey"]) -> ?get_last_key:((string option -> bool option -> string option) [@mel.as "getLastKey"]) -> ?get_key_for_search:((string -> string option -> string option) [@mel.as "getKeyForSearch"]) -> unit -> t = "" [@@mel.obj] + + external get_key_below_js : t -> ((string -> string option)[@u]) option + = "getKeyBelow" + [@@mel.get] + + let get_key_below o = + match get_key_below_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external get_key_above_js : t -> ((string -> string option)[@u]) option + = "getKeyAbove" + [@@mel.get] + + let get_key_above o = + match get_key_above_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external get_key_left_of_js : t -> ((string -> string option)[@u]) option + = "getKeyLeftOf" + [@@mel.get] + + let get_key_left_of o = + match get_key_left_of_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external get_key_right_of_js : t -> ((string -> string option)[@u]) option + = "getKeyRightOf" + [@@mel.get] + + let get_key_right_of o = + match get_key_right_of_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external get_key_page_below_js : t -> ((string -> string option)[@u]) option + = "getKeyPageBelow" + [@@mel.get] + + let get_key_page_below o = + match get_key_page_below_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external get_key_page_above_js : t -> ((string -> string option)[@u]) option + = "getKeyPageAbove" + [@@mel.get] + + let get_key_page_above o = + match get_key_page_above_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external get_first_key_js : + t -> ((string option -> bool option -> string option)[@u]) option + = "getFirstKey" + [@@mel.get] + + let get_first_key o = + match get_first_key_js o with + | None -> None + | Some f -> Some (fun x0 x1 -> (f x0 x1 [@u])) + + external get_last_key_js : + t -> ((string option -> bool option -> string option)[@u]) option + = "getLastKey" + [@@mel.get] + + let get_last_key o = + match get_last_key_js o with + | None -> None + | Some f -> Some (fun x0 x1 -> (f x0 x1 [@u])) + + external get_key_for_search_js : + t -> ((string -> string option -> string option)[@u]) option + = "getKeyForSearch" + [@@mel.get] + + let get_key_for_search o = + match get_key_for_search_js o with + | None -> None + | Some f -> Some (fun x0 x1 -> (f x0 x1 [@u])) + + external make_js : + ?get_key_below:((string -> string option)[@mel.as "getKeyBelow"]) -> + ?get_key_above:((string -> string option)[@mel.as "getKeyAbove"]) -> + ?get_key_left_of:((string -> string option)[@mel.as "getKeyLeftOf"]) -> + ?get_key_right_of:((string -> string option)[@mel.as "getKeyRightOf"]) -> + ?get_key_page_below:((string -> string option)[@mel.as "getKeyPageBelow"]) -> + ?get_key_page_above:((string -> string option)[@mel.as "getKeyPageAbove"]) -> + ?get_first_key: + ((string option -> bool option -> string option)[@mel.as "getFirstKey"]) -> + ?get_last_key: + ((string option -> bool option -> string option)[@mel.as "getLastKey"]) -> + ?get_key_for_search: + ((string -> string option -> string option)[@mel.as "getKeyForSearch"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ?get_key_below ?get_key_above ?get_key_left_of ?get_key_right_of + ?get_key_page_below ?get_key_page_above ?get_first_key ?get_last_key + ?get_key_for_search () = + make_js ?get_key_below ?get_key_above ?get_key_left_of ?get_key_right_of + ?get_key_page_below ?get_key_page_above + ?get_first_key:(Option.map (fun f -> fun x0 x1 -> f x0 x1) get_first_key) + ?get_last_key:(Option.map (fun f -> fun x0 x1 -> f x0 x1) get_last_key) + ?get_key_for_search: + (Option.map (fun f -> fun x0 x1 -> f x0 x1) get_key_for_search) + () end module ComboboxBaseItemComponentProps = struct type 'option t = 'option t_combobox_base_item_component_props + + external item : 'option t -> 'option t_collection_node = "item" + [@@mel.get] (** The item to render. *) - external item : 'option t -> 'option t_collection_node = "item" [@@mel.get] - external make : item:('option t_collection_node [@mel.as "item"]) -> unit -> 'option t = "" [@@mel.obj] + + external make : + item:('option t_collection_node[@mel.as "item"]) -> unit -> 'option t = "" + [@@mel.obj] end module ComboboxBaseSectionComponentProps = struct type 'opt_group t = 'opt_group t_combobox_base_section_component_props + + external section : 'opt_group t -> 'opt_group t_collection_node = "section" + [@@mel.get] (** The section to render. *) - external section : 'opt_group t -> 'opt_group t_collection_node = "section" [@@mel.get] - external make : section:('opt_group t_collection_node [@mel.as "section"]) -> unit -> 'opt_group t = "" [@@mel.obj] + + external make : + section:('opt_group t_collection_node[@mel.as "section"]) -> + unit -> + 'opt_group t = "" + [@@mel.obj] end module ComboboxContextValue = struct type t = t_combobox_context_value - external dataset : t -> t_combobox_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_combobox_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" [@@mel.get] - external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" + [@@mel.get] + + external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" + [@@mel.get] + external is_modal : t -> bool Solidtype.Solid.accessor = "isModal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external is_input_focused : t -> bool Solidtype.Solid.accessor = "isInputFocused" [@@mel.get] - external allows_empty_collection : t -> bool Solidtype.Solid.accessor = "allowsEmptyCollection" [@@mel.get] - external should_focus_wrap : t -> bool Solidtype.Solid.accessor = "shouldFocusWrap" [@@mel.get] - external remove_on_backspace : t -> bool Solidtype.Solid.accessor = "removeOnBackspace" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external auto_focus : t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor = "autoFocus" [@@mel.get] - external active_descendant : t -> string option Solidtype.Solid.accessor = "activeDescendant" [@@mel.get] - external input_value : t -> string option Solidtype.Solid.accessor = "inputValue" [@@mel.get] - external trigger_mode : t -> [ `focus | `input | `manual ] Solidtype.Solid.accessor = "triggerMode" [@@mel.get] - external control_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "controlRef" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "contentRef" [@@mel.get] - external listbox_id : t -> string option Solidtype.Solid.accessor = "listboxId" [@@mel.get] - external trigger_aria_label : t -> string option Solidtype.Solid.accessor = "triggerAriaLabel" [@@mel.get] - external listbox_aria_label : t -> string option Solidtype.Solid.accessor = "listboxAriaLabel" [@@mel.get] - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor = "keyboardDelegate" [@@mel.get] - external reset_input_value : t -> string Js.Set.t -> unit = "resetInputValue" [@@mel.send] - external set_is_input_focused : t -> bool -> unit = "setIsInputFocused" [@@mel.send] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external is_input_focused : t -> bool Solidtype.Solid.accessor + = "isInputFocused" + [@@mel.get] + + external allows_empty_collection : t -> bool Solidtype.Solid.accessor + = "allowsEmptyCollection" + [@@mel.get] + + external should_focus_wrap : t -> bool Solidtype.Solid.accessor + = "shouldFocusWrap" + [@@mel.get] + + external remove_on_backspace : t -> bool Solidtype.Solid.accessor + = "removeOnBackspace" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external auto_focus : + t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor + = "autoFocus" + [@@mel.get] + + external active_descendant : t -> string option Solidtype.Solid.accessor + = "activeDescendant" + [@@mel.get] + + external input_value : t -> string option Solidtype.Solid.accessor + = "inputValue" + [@@mel.get] + + external trigger_mode : + t -> [ `focus | `input | `manual ] Solidtype.Solid.accessor = "triggerMode" + [@@mel.get] + + external control_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "controlRef" + [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "contentRef" + [@@mel.get] + + external listbox_id : t -> string option Solidtype.Solid.accessor + = "listboxId" + [@@mel.get] + + external trigger_aria_label : t -> string option Solidtype.Solid.accessor + = "triggerAriaLabel" + [@@mel.get] + + external listbox_aria_label : t -> string option Solidtype.Solid.accessor + = "listboxAriaLabel" + [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + + external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor + = "keyboardDelegate" + [@@mel.get] + + external reset_input_value : t -> string Js.Set.t -> unit = "resetInputValue" + [@@mel.send] + + external set_is_input_focused : t -> bool -> unit = "setIsInputFocused" + [@@mel.send] + external set_input_value : t -> string -> unit = "setInputValue" [@@mel.send] - external set_control_ref : t -> Dom.htmlElement -> unit = "setControlRef" [@@mel.send] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" [@@mel.send] - external open_ : t -> ([ `first | `last ], bool) either -> ?trigger_mode:[ `focus | `input | `manual ] -> unit -> unit = "open" [@@mel.send] + + external set_control_ref : t -> Dom.htmlElement -> unit = "setControlRef" + [@@mel.send] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" + [@@mel.send] + + external open_ : + t -> + ([ `first | `last ], bool) either -> + ?trigger_mode:[ `focus | `input | `manual ] -> + unit -> + unit = "open" + [@@mel.send] + external close : t -> unit -> unit = "close" [@@mel.send] - external toggle : t -> ([ `first | `last ], bool) either -> ?trigger_mode:[ `focus | `input | `manual ] -> unit -> unit = "toggle" [@@mel.send] - external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor = "placeholder" [@@mel.get] - external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderItem" [@@mel.send] - external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderSection" [@@mel.send] - external on_input_key_down : t -> (Dom.keyboardEvent -> unit, (Dom.htmlInputElement, Dom.keyboardEvent, Dom.keyboardEvent -> unit) t_bound_event_handler) either = "onInputKeyDown" [@@mel.get] + + external toggle : + t -> + ([ `first | `last ], bool) either -> + ?trigger_mode:[ `focus | `input | `manual ] -> + unit -> + unit = "toggle" + [@@mel.send] + + external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor + = "placeholder" + [@@mel.get] + + external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderItem" + [@@mel.send] + + external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderSection" + [@@mel.send] + + external on_input_key_down : + t -> + ( Dom.keyboardEvent -> unit, + ( Dom.htmlInputElement, + Dom.keyboardEvent, + Dom.keyboardEvent -> unit ) + t_bound_event_handler ) + either = "onInputKeyDown" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_listbox_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerListboxId" [@@mel.get] - let register_listbox_id o x0 = let r = (register_listbox_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : dataset:(t_combobox_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> is_multiple:(bool Solidtype.Solid.accessor [@mel.as "isMultiple"]) -> is_virtualized:(bool Solidtype.Solid.accessor [@mel.as "isVirtualized"]) -> is_modal:(bool Solidtype.Solid.accessor [@mel.as "isModal"]) -> prevent_scroll:(bool Solidtype.Solid.accessor [@mel.as "preventScroll"]) -> is_input_focused:(bool Solidtype.Solid.accessor [@mel.as "isInputFocused"]) -> allows_empty_collection:(bool Solidtype.Solid.accessor [@mel.as "allowsEmptyCollection"]) -> should_focus_wrap:(bool Solidtype.Solid.accessor [@mel.as "shouldFocusWrap"]) -> remove_on_backspace:(bool Solidtype.Solid.accessor [@mel.as "removeOnBackspace"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> auto_focus:(([ `first | `last ], bool) either Solidtype.Solid.accessor [@mel.as "autoFocus"]) -> active_descendant:(string option Solidtype.Solid.accessor [@mel.as "activeDescendant"]) -> input_value:(string option Solidtype.Solid.accessor [@mel.as "inputValue"]) -> trigger_mode:([ `focus | `input | `manual ] Solidtype.Solid.accessor [@mel.as "triggerMode"]) -> control_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "controlRef"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> trigger_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "triggerRef"]) -> content_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "contentRef"]) -> listbox_id:(string option Solidtype.Solid.accessor [@mel.as "listboxId"]) -> trigger_aria_label:(string option Solidtype.Solid.accessor [@mel.as "triggerAriaLabel"]) -> listbox_aria_label:(string option Solidtype.Solid.accessor [@mel.as "listboxAriaLabel"]) -> list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> keyboard_delegate:(t_keyboard_delegate Solidtype.Solid.accessor [@mel.as "keyboardDelegate"]) -> reset_input_value:((string Js.Set.t -> unit) [@mel.as "resetInputValue"]) -> set_is_input_focused:((bool -> unit) [@mel.as "setIsInputFocused"]) -> set_input_value:((string -> unit) [@mel.as "setInputValue"]) -> set_control_ref:((Dom.htmlElement -> unit) [@mel.as "setControlRef"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> set_trigger_ref:((Dom.htmlElement -> unit) [@mel.as "setTriggerRef"]) -> set_content_ref:((Dom.htmlElement -> unit) [@mel.as "setContentRef"]) -> set_listbox_ref:((Dom.htmlElement -> unit) [@mel.as "setListboxRef"]) -> open_:((([ `first | `last ], bool) either -> [ `focus | `input | `manual ] option -> unit) [@mel.as "open"]) -> close:((unit -> unit) [@mel.as "close"]) -> toggle:((([ `first | `last ], bool) either -> [ `focus | `input | `manual ] option -> unit) [@mel.as "toggle"]) -> placeholder:(Solidtype.Jsx.element Solidtype.Solid.accessor [@mel.as "placeholder"]) -> render_item:((_ t_collection_node -> Solidtype.Jsx.element) [@mel.as "renderItem"]) -> render_section:((_ t_collection_node -> Solidtype.Jsx.element) [@mel.as "renderSection"]) -> on_input_key_down:((Dom.keyboardEvent -> unit, (Dom.htmlInputElement, Dom.keyboardEvent, Dom.keyboardEvent -> unit) t_bound_event_handler) either [@mel.as "onInputKeyDown"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_listbox_id:((string -> (unit -> unit)) [@mel.as "registerListboxId"]) -> unit -> t = "" [@@mel.obj] - let make ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized ~is_modal ~prevent_scroll ~is_input_focused ~allows_empty_collection ~should_focus_wrap ~remove_on_backspace ~content_present ~auto_focus ~active_descendant ~input_value ~trigger_mode ~control_ref ~input_ref ~trigger_ref ~content_ref ~listbox_id ~trigger_aria_label ~listbox_aria_label ~list_state ~keyboard_delegate ~reset_input_value ~set_is_input_focused ~set_input_value ~set_control_ref ~set_input_ref ~set_trigger_ref ~set_content_ref ~set_listbox_ref ~open_ ~close ~toggle ~placeholder ~render_item ~render_section ~on_input_key_down ~generate_id ~register_listbox_id () = make_js ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized ~is_modal ~prevent_scroll ~is_input_focused ~allows_empty_collection ~should_focus_wrap ~remove_on_backspace ~content_present ~auto_focus ~active_descendant ~input_value ~trigger_mode ~control_ref ~input_ref ~trigger_ref ~content_ref ~listbox_id ~trigger_aria_label ~listbox_aria_label ~list_state ~keyboard_delegate ~reset_input_value ~set_is_input_focused ~set_input_value ~set_control_ref ~set_input_ref ~set_trigger_ref ~set_content_ref ~set_listbox_ref ~open_ ~close ~toggle ~placeholder ~render_item ~render_section ~on_input_key_down ~generate_id ~register_listbox_id:(fun x0 -> let r = register_listbox_id x0 in fun () -> r ()) () + + external register_listbox_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerListboxId" + [@@mel.get] + + let register_listbox_id o x0 = + let r = ((register_listbox_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + dataset:(t_combobox_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + is_multiple:(bool Solidtype.Solid.accessor[@mel.as "isMultiple"]) -> + is_virtualized:(bool Solidtype.Solid.accessor[@mel.as "isVirtualized"]) -> + is_modal:(bool Solidtype.Solid.accessor[@mel.as "isModal"]) -> + prevent_scroll:(bool Solidtype.Solid.accessor[@mel.as "preventScroll"]) -> + is_input_focused:(bool Solidtype.Solid.accessor[@mel.as "isInputFocused"]) -> + allows_empty_collection: + (bool Solidtype.Solid.accessor[@mel.as "allowsEmptyCollection"]) -> + should_focus_wrap:(bool Solidtype.Solid.accessor[@mel.as "shouldFocusWrap"]) -> + remove_on_backspace: + (bool Solidtype.Solid.accessor[@mel.as "removeOnBackspace"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + auto_focus: + (([ `first | `last ], bool) either Solidtype.Solid.accessor + [@mel.as "autoFocus"]) -> + active_descendant: + (string option Solidtype.Solid.accessor[@mel.as "activeDescendant"]) -> + input_value:(string option Solidtype.Solid.accessor[@mel.as "inputValue"]) -> + trigger_mode: + ([ `focus | `input | `manual ] Solidtype.Solid.accessor + [@mel.as "triggerMode"]) -> + control_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "controlRef"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + trigger_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "triggerRef"]) -> + content_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "contentRef"]) -> + listbox_id:(string option Solidtype.Solid.accessor[@mel.as "listboxId"]) -> + trigger_aria_label: + (string option Solidtype.Solid.accessor[@mel.as "triggerAriaLabel"]) -> + listbox_aria_label: + (string option Solidtype.Solid.accessor[@mel.as "listboxAriaLabel"]) -> + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + keyboard_delegate: + (t_keyboard_delegate Solidtype.Solid.accessor[@mel.as "keyboardDelegate"]) -> + reset_input_value:((string Js.Set.t -> unit)[@mel.as "resetInputValue"]) -> + set_is_input_focused:((bool -> unit)[@mel.as "setIsInputFocused"]) -> + set_input_value:((string -> unit)[@mel.as "setInputValue"]) -> + set_control_ref:((Dom.htmlElement -> unit)[@mel.as "setControlRef"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + set_trigger_ref:((Dom.htmlElement -> unit)[@mel.as "setTriggerRef"]) -> + set_content_ref:((Dom.htmlElement -> unit)[@mel.as "setContentRef"]) -> + set_listbox_ref:((Dom.htmlElement -> unit)[@mel.as "setListboxRef"]) -> + open_: + ((([ `first | `last ], bool) either -> + [ `focus | `input | `manual ] option -> + unit) + [@mel.as "open"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + toggle: + ((([ `first | `last ], bool) either -> + [ `focus | `input | `manual ] option -> + unit) + [@mel.as "toggle"]) -> + placeholder: + (Solidtype.Jsx.element Solidtype.Solid.accessor[@mel.as "placeholder"]) -> + render_item: + ((t_unknown t_collection_node -> Solidtype.Jsx.element) + [@mel.as "renderItem"]) -> + render_section: + ((t_unknown t_collection_node -> Solidtype.Jsx.element) + [@mel.as "renderSection"]) -> + on_input_key_down: + (( Dom.keyboardEvent -> unit, + ( Dom.htmlInputElement, + Dom.keyboardEvent, + Dom.keyboardEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onInputKeyDown"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_listbox_id:((string -> unit -> unit)[@mel.as "registerListboxId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized ~is_modal + ~prevent_scroll ~is_input_focused ~allows_empty_collection + ~should_focus_wrap ~remove_on_backspace ~content_present ~auto_focus + ~active_descendant ~input_value ~trigger_mode ~control_ref ~input_ref + ~trigger_ref ~content_ref ~listbox_id ~trigger_aria_label + ~listbox_aria_label ~list_state ~keyboard_delegate ~reset_input_value + ~set_is_input_focused ~set_input_value ~set_control_ref ~set_input_ref + ~set_trigger_ref ~set_content_ref ~set_listbox_ref ~open_ ~close ~toggle + ~placeholder ~render_item ~render_section ~on_input_key_down ~generate_id + ~register_listbox_id () = + make_js ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized + ~is_modal ~prevent_scroll ~is_input_focused ~allows_empty_collection + ~should_focus_wrap ~remove_on_backspace ~content_present ~auto_focus + ~active_descendant ~input_value ~trigger_mode ~control_ref ~input_ref + ~trigger_ref ~content_ref ~listbox_id ~trigger_aria_label + ~listbox_aria_label ~list_state ~keyboard_delegate ~reset_input_value + ~set_is_input_focused ~set_input_value ~set_control_ref ~set_input_ref + ~set_trigger_ref ~set_content_ref ~set_listbox_ref + ~open_:(fun x0 x1 -> open_ x0 x1) + ~close + ~toggle:(fun x0 x1 -> toggle x0 x1) + ~placeholder ~render_item ~render_section ~on_input_key_down ~generate_id + ~register_listbox_id:(fun x0 -> + let r = register_listbox_id x0 in + fun () -> r ()) + () end module ContextMenuContextValue = struct type t = t_context_menu_context_value - external set_anchor_rect : t -> t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter = "setAnchorRect" [@@mel.get] - external make : set_anchor_rect:(t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter [@mel.as "setAnchorRect"]) -> unit -> t = "" [@@mel.obj] + + external set_anchor_rect : + t -> t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter + = "setAnchorRect" + [@@mel.get] + + external make : + set_anchor_rect: + (t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter + [@mel.as "setAnchorRect"]) -> + unit -> + t = "" + [@@mel.obj] end module DialogContextValue = struct type t = t_dialog_context_value - external translations : t -> t_alert_dialog_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] + + external translations : + t -> t_alert_dialog_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] external modal : t -> bool Solidtype.Solid.accessor = "modal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] - external title_id : t -> string option Solidtype.Solid.accessor = "titleId" [@@mel.get] - external description_id : t -> string option Solidtype.Solid.accessor = "descriptionId" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "overlayRef" [@@mel.get] - external set_overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setOverlayRef" [@@mel.get] - external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "contentRef" [@@mel.get] - external set_content_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setContentRef" [@@mel.get] - external overlay_present : t -> bool Solidtype.Solid.accessor = "overlayPresent" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + + external title_id : t -> string option Solidtype.Solid.accessor = "titleId" + [@@mel.get] + + external description_id : t -> string option Solidtype.Solid.accessor + = "descriptionId" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "overlayRef" + [@@mel.get] + + external set_overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setOverlayRef" + [@@mel.get] + + external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "contentRef" + [@@mel.get] + + external set_content_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setContentRef" + [@@mel.get] + + external overlay_present : t -> bool Solidtype.Solid.accessor + = "overlayPresent" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + external close : t -> unit -> unit = "close" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setTriggerRef" [@@mel.get] + + external set_trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setTriggerRef" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_content_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerContentId" [@@mel.get] - let register_content_id o x0 = let r = (register_content_id_js o) x0 [@u] in fun () -> r () [@u] - external register_title_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerTitleId" [@@mel.get] - let register_title_id o x0 = let r = (register_title_id_js o) x0 [@u] in fun () -> r () [@u] - external register_description_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerDescriptionId" [@@mel.get] - let register_description_id o x0 = let r = (register_description_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : translations:(t_alert_dialog_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> modal:(bool Solidtype.Solid.accessor [@mel.as "modal"]) -> prevent_scroll:(bool Solidtype.Solid.accessor [@mel.as "preventScroll"]) -> content_id:(string option Solidtype.Solid.accessor [@mel.as "contentId"]) -> title_id:(string option Solidtype.Solid.accessor [@mel.as "titleId"]) -> description_id:(string option Solidtype.Solid.accessor [@mel.as "descriptionId"]) -> trigger_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "triggerRef"]) -> overlay_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "overlayRef"]) -> set_overlay_ref:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setOverlayRef"]) -> content_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "contentRef"]) -> set_content_ref:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setContentRef"]) -> overlay_present:(bool Solidtype.Solid.accessor [@mel.as "overlayPresent"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> close:((unit -> unit) [@mel.as "close"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> set_trigger_ref:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setTriggerRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_content_id:((string -> (unit -> unit)) [@mel.as "registerContentId"]) -> register_title_id:((string -> (unit -> unit)) [@mel.as "registerTitleId"]) -> register_description_id:((string -> (unit -> unit)) [@mel.as "registerDescriptionId"]) -> unit -> t = "" [@@mel.obj] - let make ~translations ~is_open ~modal ~prevent_scroll ~content_id ~title_id ~description_id ~trigger_ref ~overlay_ref ~set_overlay_ref ~content_ref ~set_content_ref ~overlay_present ~content_present ~close ~toggle ~set_trigger_ref ~generate_id ~register_content_id ~register_title_id ~register_description_id () = make_js ~translations ~is_open ~modal ~prevent_scroll ~content_id ~title_id ~description_id ~trigger_ref ~overlay_ref ~set_overlay_ref ~content_ref ~set_content_ref ~overlay_present ~content_present ~close ~toggle ~set_trigger_ref ~generate_id ~register_content_id:(fun x0 -> let r = register_content_id x0 in fun () -> r ()) ~register_title_id:(fun x0 -> let r = register_title_id x0 in fun () -> r ()) ~register_description_id:(fun x0 -> let r = register_description_id x0 in fun () -> r ()) () + + external register_content_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerContentId" + [@@mel.get] + + let register_content_id o x0 = + let r = ((register_content_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_title_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerTitleId" + [@@mel.get] + + let register_title_id o x0 = + let r = ((register_title_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_description_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerDescriptionId" + [@@mel.get] + + let register_description_id o x0 = + let r = ((register_description_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + translations: + (t_alert_dialog_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + modal:(bool Solidtype.Solid.accessor[@mel.as "modal"]) -> + prevent_scroll:(bool Solidtype.Solid.accessor[@mel.as "preventScroll"]) -> + content_id:(string option Solidtype.Solid.accessor[@mel.as "contentId"]) -> + title_id:(string option Solidtype.Solid.accessor[@mel.as "titleId"]) -> + description_id: + (string option Solidtype.Solid.accessor[@mel.as "descriptionId"]) -> + trigger_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "triggerRef"]) -> + overlay_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "overlayRef"]) -> + set_overlay_ref: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setOverlayRef"]) -> + content_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "contentRef"]) -> + set_content_ref: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setContentRef"]) -> + overlay_present:(bool Solidtype.Solid.accessor[@mel.as "overlayPresent"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + set_trigger_ref: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setTriggerRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_content_id:((string -> unit -> unit)[@mel.as "registerContentId"]) -> + register_title_id:((string -> unit -> unit)[@mel.as "registerTitleId"]) -> + register_description_id: + ((string -> unit -> unit)[@mel.as "registerDescriptionId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~translations ~is_open ~modal ~prevent_scroll ~content_id ~title_id + ~description_id ~trigger_ref ~overlay_ref ~set_overlay_ref ~content_ref + ~set_content_ref ~overlay_present ~content_present ~close ~toggle + ~set_trigger_ref ~generate_id ~register_content_id ~register_title_id + ~register_description_id () = + make_js ~translations ~is_open ~modal ~prevent_scroll ~content_id ~title_id + ~description_id ~trigger_ref ~overlay_ref ~set_overlay_ref ~content_ref + ~set_content_ref ~overlay_present ~content_present ~close ~toggle + ~set_trigger_ref ~generate_id + ~register_content_id:(fun x0 -> + let r = register_content_id x0 in + fun () -> r ()) + ~register_title_id:(fun x0 -> + let r = register_title_id x0 in + fun () -> r ()) + ~register_description_id:(fun x0 -> + let r = register_description_id x0 in + fun () -> r ()) + () end module FileFieldContextValue = struct type t = t_file_field_context_value - external translations : t -> t_file_field_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external input_id : t -> string Solidtype.Solid.accessor = "inputId" [@@mel.get] - external file_input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "fileInputRef" [@@mel.get] - external set_file_input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.setter = "setFileInputRef" [@@mel.get] - external dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "dropzoneRef" [@@mel.get] - external set_dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setDropzoneRef" [@@mel.get] - external disabled : t -> bool option Solidtype.Solid.accessor = "disabled" [@@mel.get] - external multiple : t -> bool option Solidtype.Solid.accessor = "multiple" [@@mel.get] - external accept : t -> string option Solidtype.Solid.accessor = "accept" [@@mel.get] - external allow_drag_and_drop : t -> bool option Solidtype.Solid.accessor = "allowDragAndDrop" [@@mel.get] - external process_files : t -> t_file array -> unit = "processFiles" [@@mel.send] + + external translations : + t -> t_file_field_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external input_id : t -> string Solidtype.Solid.accessor = "inputId" + [@@mel.get] + + external file_input_ref : + t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "fileInputRef" + [@@mel.get] + + external set_file_input_ref : + t -> Dom.htmlInputElement option Solidtype.Solid.setter = "setFileInputRef" + [@@mel.get] + + external dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "dropzoneRef" + [@@mel.get] + + external set_dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setDropzoneRef" + [@@mel.get] + + external disabled : t -> bool option Solidtype.Solid.accessor = "disabled" + [@@mel.get] + + external multiple : t -> bool option Solidtype.Solid.accessor = "multiple" + [@@mel.get] + + external accept : t -> string option Solidtype.Solid.accessor = "accept" + [@@mel.get] + + external allow_drag_and_drop : t -> bool option Solidtype.Solid.accessor + = "allowDragAndDrop" + [@@mel.get] + + external process_files : t -> t_file array -> unit = "processFiles" + [@@mel.send] + external accepted_files : t -> t_file array = "acceptedFiles" [@@mel.get] - external rejected_files : t -> t_file_rejection array = "rejectedFiles" [@@mel.get] + + external rejected_files : t -> t_file_rejection array = "rejectedFiles" + [@@mel.get] + external remove_file : t -> t_file -> unit = "removeFile" [@@mel.send] - external make : translations:(t_file_field_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> input_id:(string Solidtype.Solid.accessor [@mel.as "inputId"]) -> file_input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "fileInputRef"]) -> set_file_input_ref:(Dom.htmlInputElement option Solidtype.Solid.setter [@mel.as "setFileInputRef"]) -> dropzone_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "dropzoneRef"]) -> set_dropzone_ref:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setDropzoneRef"]) -> disabled:(bool option Solidtype.Solid.accessor [@mel.as "disabled"]) -> multiple:(bool option Solidtype.Solid.accessor [@mel.as "multiple"]) -> accept:(string option Solidtype.Solid.accessor [@mel.as "accept"]) -> allow_drag_and_drop:(bool option Solidtype.Solid.accessor [@mel.as "allowDragAndDrop"]) -> process_files:((t_file array -> unit) [@mel.as "processFiles"]) -> accepted_files:(t_file array [@mel.as "acceptedFiles"]) -> rejected_files:(t_file_rejection array [@mel.as "rejectedFiles"]) -> remove_file:((t_file -> unit) [@mel.as "removeFile"]) -> unit -> t = "" [@@mel.obj] -end -(** The **`File`** interface provides information about files and allows JavaScript in a web page to access their content. - + external make : + translations: + (t_file_field_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + input_id:(string Solidtype.Solid.accessor[@mel.as "inputId"]) -> + file_input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor + [@mel.as "fileInputRef"]) -> + set_file_input_ref: + (Dom.htmlInputElement option Solidtype.Solid.setter + [@mel.as "setFileInputRef"]) -> + dropzone_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "dropzoneRef"]) -> + set_dropzone_ref: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setDropzoneRef"]) -> + disabled:(bool option Solidtype.Solid.accessor[@mel.as "disabled"]) -> + multiple:(bool option Solidtype.Solid.accessor[@mel.as "multiple"]) -> + accept:(string option Solidtype.Solid.accessor[@mel.as "accept"]) -> + allow_drag_and_drop: + (bool option Solidtype.Solid.accessor[@mel.as "allowDragAndDrop"]) -> + process_files:((t_file array -> unit)[@mel.as "processFiles"]) -> + accepted_files:(t_file array[@mel.as "acceptedFiles"]) -> + rejected_files:(t_file_rejection array[@mel.as "rejectedFiles"]) -> + remove_file:((t_file -> unit)[@mel.as "removeFile"]) -> + unit -> + t = "" + [@@mel.obj] +end + +(** The **`File`** interface provides information about files and allows + JavaScript in a web page to access their content. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File) *) module File = struct type t = t_file - (** The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File/lastModified) *) - external last_modified : t -> float = "lastModified" [@@mel.get] - (** The **`name`** read-only property of the File interface returns the name of the file represented by a File object. - + + external last_modified : t -> float = "lastModified" + [@@mel.get] + (** The **`lastModified`** read-only property of the File interface provides + the last modified date of the file as the number of milliseconds since the + Unix epoch (January 1, 1970 at midnight). + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/File/lastModified) + *) + + external name : t -> string = "name" + [@@mel.get] + (** The **`name`** read-only property of the File interface returns the name + of the file represented by a File object. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File/name) *) - external name : t -> string = "name" [@@mel.get] - (** The **`webkitRelativePath`** read-only property of the File interface contains a string which specifies the file's path relative to the directory selected by the user in an input element with its `webkitdirectory` attribute set. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) *) - external webkit_relative_path : t -> string = "webkitRelativePath" [@@mel.get] - (** The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes. - + + external webkit_relative_path : t -> string = "webkitRelativePath" + [@@mel.get] + (** The **`webkitRelativePath`** read-only property of the File interface + contains a string which specifies the file's path relative to the + directory selected by the user in an input element with its + `webkitdirectory` attribute set. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) + *) + + external size : t -> float = "size" + [@@mel.get] + (** The **`size`** read-only property of the Blob interface returns the size + of the Blob or File in bytes. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Blob/size) *) - external size : t -> float = "size" [@@mel.get] - (** The **`type`** read-only property of the Blob interface returns the MIME type of the file. - + + external type_ : t -> string = "type" + [@@mel.get] + (** The **`type`** read-only property of the Blob interface returns the MIME + type of the file. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Blob/type) *) - external type_ : t -> string = "type" [@@mel.get] - external array_buffer : t -> unit -> t_array_buffer Js.Promise.t = "arrayBuffer" [@@mel.send] - external bytes : t -> unit -> t_uint8_array Js.Promise.t = "bytes" [@@mel.send] - external slice : t -> ?start:float -> ?end_:float -> ?content_type:string -> unit -> t_blob = "slice" [@@mel.send] + + external array_buffer : t -> unit -> t_array_buffer Js.Promise.t + = "arrayBuffer" + [@@mel.send] + + external bytes : t -> unit -> t_uint8_array Js.Promise.t = "bytes" + [@@mel.send] + + external slice : + t -> ?start:float -> ?end_:float -> ?content_type:string -> unit -> t_blob + = "slice" + [@@mel.send] + external stream : t -> unit -> t_readable_stream = "stream" [@@mel.send] external text : t -> unit -> string Js.Promise.t = "text" [@@mel.send] end module FileField_Root_Translations = struct type t = t_file_field_root_translations + external bytes : t -> string = "bytes" [@@mel.get] external kb : t -> string = "kb" [@@mel.get] external mb : t -> string = "mb" [@@mel.get] external gb : t -> string = "gb" [@@mel.get] external tb : t -> string = "tb" [@@mel.get] - external make : bytes:(string [@mel.as "bytes"]) -> kb:(string [@mel.as "kb"]) -> mb:(string [@mel.as "mb"]) -> gb:(string [@mel.as "gb"]) -> tb:(string [@mel.as "tb"]) -> unit -> t = "" [@@mel.obj] + + external make : + bytes:(string[@mel.as "bytes"]) -> + kb:(string[@mel.as "kb"]) -> + mb:(string[@mel.as "mb"]) -> + gb:(string[@mel.as "gb"]) -> + tb:(string[@mel.as "tb"]) -> + unit -> + t = "" + [@@mel.obj] end module FileRejection = struct type t = t_file_rejection + external file : t -> t_file = "file" [@@mel.get] - external errors : t -> [ `TOO_MANY_FILES | `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL ] array = "errors" [@@mel.get] - external make : file:(t_file [@mel.as "file"]) -> errors:([ `TOO_MANY_FILES | `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL ] array [@mel.as "errors"]) -> unit -> t = "" [@@mel.obj] + + external errors : + t -> + [ `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL | `TOO_MANY_FILES ] + array = "errors" + [@@mel.get] + + external make : + file:(t_file[@mel.as "file"]) -> + errors: + ([ `FILE_INVALID_TYPE + | `FILE_TOO_LARGE + | `FILE_TOO_SMALL + | `TOO_MANY_FILES ] + array + [@mel.as "errors"]) -> + unit -> + t = "" + [@@mel.obj] end module Details = struct type t = t_details + external accepted_files : t -> t_file array = "acceptedFiles" [@@mel.get] - external rejected_files : t -> t_file_rejection array = "rejectedFiles" [@@mel.get] - external make : accepted_files:(t_file array [@mel.as "acceptedFiles"]) -> rejected_files:(t_file_rejection array [@mel.as "rejectedFiles"]) -> unit -> t = "" [@@mel.obj] + + external rejected_files : t -> t_file_rejection array = "rejectedFiles" + [@@mel.get] + + external make : + accepted_files:(t_file array[@mel.as "acceptedFiles"]) -> + rejected_files:(t_file_rejection array[@mel.as "rejectedFiles"]) -> + unit -> + t = "" + [@@mel.obj] end module HoverCardContextValue = struct type t = t_hover_card_context_value - external dataset : t -> t_hover_card_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_hover_card_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + external open_with_delay : t -> unit -> unit = "openWithDelay" [@@mel.send] external close_with_delay : t -> unit -> unit = "closeWithDelay" [@@mel.send] external cancel_opening : t -> unit -> unit = "cancelOpening" [@@mel.send] external cancel_closing : t -> unit -> unit = "cancelClosing" [@@mel.send] external close : t -> unit -> unit = "close" [@@mel.send] - external is_target_on_hover_card : t -> Dom.node Js.Null.t -> bool = "isTargetOnHoverCard" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external make : dataset:(t_hover_card_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> open_with_delay:((unit -> unit) [@mel.as "openWithDelay"]) -> close_with_delay:((unit -> unit) [@mel.as "closeWithDelay"]) -> cancel_opening:((unit -> unit) [@mel.as "cancelOpening"]) -> cancel_closing:((unit -> unit) [@mel.as "cancelClosing"]) -> close:((unit -> unit) [@mel.as "close"]) -> is_target_on_hover_card:((Dom.node Js.Nullable.t -> bool) [@mel.as "isTargetOnHoverCard"]) -> set_trigger_ref:((Dom.htmlElement -> unit) [@mel.as "setTriggerRef"]) -> set_content_ref:((Dom.htmlElement -> unit) [@mel.as "setContentRef"]) -> unit -> t = "" [@@mel.obj] + + external is_target_on_hover_card : t -> Dom.node Js.Null.t -> bool + = "isTargetOnHoverCard" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external make : + dataset:(t_hover_card_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + open_with_delay:((unit -> unit)[@mel.as "openWithDelay"]) -> + close_with_delay:((unit -> unit)[@mel.as "closeWithDelay"]) -> + cancel_opening:((unit -> unit)[@mel.as "cancelOpening"]) -> + cancel_closing:((unit -> unit)[@mel.as "cancelClosing"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + is_target_on_hover_card: + ((Dom.node Js.Nullable.t -> bool)[@mel.as "isTargetOnHoverCard"]) -> + set_trigger_ref:((Dom.htmlElement -> unit)[@mel.as "setTriggerRef"]) -> + set_content_ref:((Dom.htmlElement -> unit)[@mel.as "setContentRef"]) -> + unit -> + t = "" + [@@mel.obj] end module CollatorOptions = struct type t = t_collator_options + external usage : t -> [ `search | `sort ] option = "usage" [@@mel.get] external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] external numeric : t -> bool option = "numeric" [@@mel.get] external case_first : t -> string option = "caseFirst" [@@mel.get] - external sensitivity : t -> [ `base | `accent | `case | `variant ] option = "sensitivity" [@@mel.get] - external collation : t -> [ `big5han | `compat | `dict | `direct | `ducet | `emoji | `eor | `gb2312 | `phonebk | `phonetic | `pinyin | `reformed | `searchjl | `stroke | `trad | `unihan | `zhuyin ] option = "collation" [@@mel.get] - external ignore_punctuation : t -> bool option = "ignorePunctuation" [@@mel.get] - external make : ?usage:([ `search | `sort ] [@mel.as "usage"]) -> ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?numeric:(bool [@mel.as "numeric"]) -> ?case_first:(string [@mel.as "caseFirst"]) -> ?sensitivity:([ `base | `accent | `case | `variant ] [@mel.as "sensitivity"]) -> ?collation:([ `big5han | `compat | `dict | `direct | `ducet | `emoji | `eor | `gb2312 | `phonebk | `phonetic | `pinyin | `reformed | `searchjl | `stroke | `trad | `unihan | `zhuyin ] [@mel.as "collation"]) -> ?ignore_punctuation:(bool [@mel.as "ignorePunctuation"]) -> unit -> t = "" [@@mel.obj] + + external sensitivity : t -> [ `accent | `base | `case | `variant ] option + = "sensitivity" + [@@mel.get] + + external collation : + t -> + [ `big5han + | `compat + | `dict + | `direct + | `ducet + | `emoji + | `eor + | `gb2312 + | `phonebk + | `phonetic + | `pinyin + | `reformed + | `searchjl + | `stroke + | `trad + | `unihan + | `zhuyin ] + option = "collation" + [@@mel.get] + + external ignore_punctuation : t -> bool option = "ignorePunctuation" + [@@mel.get] + + external make : + ?usage:([ `search | `sort ][@mel.as "usage"]) -> + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?numeric:(bool[@mel.as "numeric"]) -> + ?case_first:(string[@mel.as "caseFirst"]) -> + ?sensitivity:([ `accent | `base | `case | `variant ][@mel.as "sensitivity"]) -> + ?collation: + ([ `big5han + | `compat + | `dict + | `direct + | `ducet + | `emoji + | `eor + | `gb2312 + | `phonebk + | `phonetic + | `pinyin + | `reformed + | `searchjl + | `stroke + | `trad + | `unihan + | `zhuyin ] + [@mel.as "collation"]) -> + ?ignore_punctuation:(bool[@mel.as "ignorePunctuation"]) -> + unit -> + t = "" + [@@mel.obj] end module Collator = struct type t = t_collator + external compare : t -> string -> string -> float = "compare" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_collator_options = "resolvedOptions" [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_collator_options + = "resolvedOptions" + [@@mel.send] end module DateTimeFormatOptions = struct type t = t_date_time_format_options + external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] - external weekday : t -> [ `long | `short | `narrow ] option = "weekday" [@@mel.get] - external era : t -> [ `long | `short | `narrow ] option = "era" [@@mel.get] + + external weekday : t -> [ `long | `narrow | `short ] option = "weekday" + [@@mel.get] + + external era : t -> [ `long | `narrow | `short ] option = "era" [@@mel.get] external year : t -> string option = "year" [@@mel.get] external month : t -> string option = "month" [@@mel.get] external day : t -> string option = "day" [@@mel.get] external hour : t -> string option = "hour" [@@mel.get] external minute : t -> string option = "minute" [@@mel.get] external second : t -> string option = "second" [@@mel.get] - external time_zone_name : t -> [ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] option = "timeZoneName" [@@mel.get] + + external time_zone_name : + t -> + [ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + option = "timeZoneName" + [@@mel.get] + external format_matcher : t -> string option = "formatMatcher" [@@mel.get] external hour12 : t -> bool option = "hour12" [@@mel.get] external time_zone : t -> string option = "timeZone" [@@mel.get] external calendar : t -> string option = "calendar" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + external numbering_system : t -> string option = "numberingSystem" [@@mel.get] - external date_style : t -> [ `long | `short | `full | `medium ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `long | `short | `full | `medium ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external fractional_second_digits : t -> float option = "fractionalSecondDigits" [@@mel.get] - external make : ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?weekday:([ `long | `short | `narrow ] [@mel.as "weekday"]) -> ?era:([ `long | `short | `narrow ] [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:([ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?time_zone:(string [@mel.as "timeZone"]) -> ?calendar:(string [@mel.as "calendar"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?numbering_system:(string [@mel.as "numberingSystem"]) -> ?date_style:([ `long | `short | `full | `medium ] [@mel.as "dateStyle"]) -> ?time_style:([ `long | `short | `full | `medium ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?fractional_second_digits:(float [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external fractional_second_digits : t -> float option + = "fractionalSecondDigits" + [@@mel.get] + + external make : + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?weekday:([ `long | `narrow | `short ][@mel.as "weekday"]) -> + ?era:([ `long | `narrow | `short ][@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name: + ([ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + [@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?time_zone:(string[@mel.as "timeZone"]) -> + ?calendar:(string[@mel.as "calendar"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?numbering_system:(string[@mel.as "numberingSystem"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?fractional_second_digits:(float[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end module DateTimeFormat = struct type t = t_date_time_format - external format : t -> ?date:(float, Js.Date.t) either -> unit -> string = "format" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_date_time_format_options = "resolvedOptions" [@@mel.send] - external format_to_parts : t -> ?date:(float, Js.Date.t) either -> unit -> t_date_time_format_part array = "formatToParts" [@@mel.send] + + external format : t -> ?date:(float, Js.Date.t) either -> unit -> string + = "format" + [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_date_time_format_options + = "resolvedOptions" + [@@mel.send] + + external format_to_parts : + t -> + ?date:(float, Js.Date.t) either -> + unit -> + t_date_time_format_part array = "formatToParts" + [@@mel.send] end module I18n_CreateDefaultLocale = struct type t = t_i18n_create_default_locale + external locale : t -> unit -> string = "locale" [@@mel.send] - external direction : t -> unit -> [ `rtl | `ltr ] = "direction" [@@mel.send] - external make : locale:((unit -> string) [@mel.as "locale"]) -> direction:((unit -> [ `rtl | `ltr ]) [@mel.as "direction"]) -> unit -> t = "" [@@mel.obj] + external direction : t -> unit -> [ `ltr | `rtl ] = "direction" [@@mel.send] + + external make : + locale:((unit -> string)[@mel.as "locale"]) -> + direction:((unit -> [ `ltr | `rtl ])[@mel.as "direction"]) -> + unit -> + t = "" + [@@mel.obj] end module Filter = struct type t = t_filter - external starts_with : t -> string -> string -> bool = "startsWith" [@@mel.send] + + external starts_with : t -> string -> string -> bool = "startsWith" + [@@mel.send] + external ends_with : t -> string -> string -> bool = "endsWith" [@@mel.send] external contains : t -> string -> string -> bool = "contains" [@@mel.send] end module NumberFormatOptions = struct type t = t_number_format_options + + external numbering_system : t -> string option = "numberingSystem" + [@@mel.get] (** Overrides default numbering system for the current locale. *) - external numbering_system : t -> string option = "numberingSystem" [@@mel.get] + external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] - external style : t -> [ `decimal | `percent | `currency | `unit ] option = "style" [@@mel.get] + + external style : t -> [ `currency | `decimal | `percent | `unit ] option + = "style" + [@@mel.get] + external currency : t -> string option = "currency" [@@mel.get] - external currency_display : t -> [ `symbol | `code | `name | `narrowSymbol ] option = "currencyDisplay" [@@mel.get] - external use_grouping : t -> (string, bool) either option = "useGrouping" [@@mel.get] - external minimum_integer_digits : t -> float option = "minimumIntegerDigits" [@@mel.get] - external minimum_fraction_digits : t -> float option = "minimumFractionDigits" [@@mel.get] - external maximum_fraction_digits : t -> float option = "maximumFractionDigits" [@@mel.get] - external minimum_significant_digits : t -> float option = "minimumSignificantDigits" [@@mel.get] - external maximum_significant_digits : t -> float option = "maximumSignificantDigits" [@@mel.get] - external compact_display : t -> [ `long | `short ] option = "compactDisplay" [@@mel.get] - external notation : t -> [ `standard | `scientific | `engineering | `compact ] option = "notation" [@@mel.get] - external sign_display : t -> [ `auto | `always | `never | `exceptZero | `negative ] option = "signDisplay" [@@mel.get] + + external currency_display : + t -> [ `code | `name | `narrowSymbol | `symbol ] option = "currencyDisplay" + [@@mel.get] + + external use_grouping : t -> (string, bool) either option = "useGrouping" + [@@mel.get] + + external minimum_integer_digits : t -> float option = "minimumIntegerDigits" + [@@mel.get] + + external minimum_fraction_digits : t -> float option = "minimumFractionDigits" + [@@mel.get] + + external maximum_fraction_digits : t -> float option = "maximumFractionDigits" + [@@mel.get] + + external minimum_significant_digits : t -> float option + = "minimumSignificantDigits" + [@@mel.get] + + external maximum_significant_digits : t -> float option + = "maximumSignificantDigits" + [@@mel.get] + + external compact_display : t -> [ `long | `short ] option = "compactDisplay" + [@@mel.get] + + external notation : + t -> [ `compact | `engineering | `scientific | `standard ] option + = "notation" + [@@mel.get] + + external sign_display : + t -> [ `always | `auto | `exceptZero | `negative | `never ] option + = "signDisplay" + [@@mel.get] + external unit : t -> string option = "unit" [@@mel.get] - external unit_display : t -> [ `long | `short | `narrow ] option = "unitDisplay" [@@mel.get] - external currency_sign : t -> [ `standard | `accounting ] option = "currencySign" [@@mel.get] - external rounding_priority : t -> [ `auto | `morePrecision | `lessPrecision ] option = "roundingPriority" [@@mel.get] - external rounding_increment : t -> float option = "roundingIncrement" [@@mel.get] - external rounding_mode : t -> [ `ceil | `floor | `expand | `trunc | `halfCeil | `halfFloor | `halfExpand | `halfTrunc | `halfEven ] option = "roundingMode" [@@mel.get] - external trailing_zero_display : t -> [ `auto | `stripIfInteger ] option = "trailingZeroDisplay" [@@mel.get] - external make : ?numbering_system:(string [@mel.as "numberingSystem"]) -> ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?style:([ `decimal | `percent | `currency | `unit ] [@mel.as "style"]) -> ?currency:(string [@mel.as "currency"]) -> ?currency_display:([ `symbol | `code | `name | `narrowSymbol ] [@mel.as "currencyDisplay"]) -> ?use_grouping:((string, bool) either [@mel.as "useGrouping"]) -> ?minimum_integer_digits:(float [@mel.as "minimumIntegerDigits"]) -> ?minimum_fraction_digits:(float [@mel.as "minimumFractionDigits"]) -> ?maximum_fraction_digits:(float [@mel.as "maximumFractionDigits"]) -> ?minimum_significant_digits:(float [@mel.as "minimumSignificantDigits"]) -> ?maximum_significant_digits:(float [@mel.as "maximumSignificantDigits"]) -> ?compact_display:([ `long | `short ] [@mel.as "compactDisplay"]) -> ?notation:([ `standard | `scientific | `engineering | `compact ] [@mel.as "notation"]) -> ?sign_display:([ `auto | `always | `never | `exceptZero | `negative ] [@mel.as "signDisplay"]) -> ?unit:(string [@mel.as "unit"]) -> ?unit_display:([ `long | `short | `narrow ] [@mel.as "unitDisplay"]) -> ?currency_sign:([ `standard | `accounting ] [@mel.as "currencySign"]) -> ?rounding_priority:([ `auto | `morePrecision | `lessPrecision ] [@mel.as "roundingPriority"]) -> ?rounding_increment:(float [@mel.as "roundingIncrement"]) -> ?rounding_mode:([ `ceil | `floor | `expand | `trunc | `halfCeil | `halfFloor | `halfExpand | `halfTrunc | `halfEven ] [@mel.as "roundingMode"]) -> ?trailing_zero_display:([ `auto | `stripIfInteger ] [@mel.as "trailingZeroDisplay"]) -> unit -> t = "" [@@mel.obj] + + external unit_display : t -> [ `long | `narrow | `short ] option + = "unitDisplay" + [@@mel.get] + + external currency_sign : t -> [ `accounting | `standard ] option + = "currencySign" + [@@mel.get] + + external rounding_priority : + t -> [ `auto | `lessPrecision | `morePrecision ] option = "roundingPriority" + [@@mel.get] + + external rounding_increment : t -> float option = "roundingIncrement" + [@@mel.get] + + external rounding_mode : + t -> + [ `ceil + | `expand + | `floor + | `halfCeil + | `halfEven + | `halfExpand + | `halfFloor + | `halfTrunc + | `trunc ] + option = "roundingMode" + [@@mel.get] + + external trailing_zero_display : t -> [ `auto | `stripIfInteger ] option + = "trailingZeroDisplay" + [@@mel.get] + + external make : + ?numbering_system:(string[@mel.as "numberingSystem"]) -> + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?style:([ `currency | `decimal | `percent | `unit ][@mel.as "style"]) -> + ?currency:(string[@mel.as "currency"]) -> + ?currency_display: + ([ `code | `name | `narrowSymbol | `symbol ][@mel.as "currencyDisplay"]) -> + ?use_grouping:((string, bool) either[@mel.as "useGrouping"]) -> + ?minimum_integer_digits:(float[@mel.as "minimumIntegerDigits"]) -> + ?minimum_fraction_digits:(float[@mel.as "minimumFractionDigits"]) -> + ?maximum_fraction_digits:(float[@mel.as "maximumFractionDigits"]) -> + ?minimum_significant_digits:(float[@mel.as "minimumSignificantDigits"]) -> + ?maximum_significant_digits:(float[@mel.as "maximumSignificantDigits"]) -> + ?compact_display:([ `long | `short ][@mel.as "compactDisplay"]) -> + ?notation: + ([ `compact | `engineering | `scientific | `standard ] + [@mel.as "notation"]) -> + ?sign_display: + ([ `always | `auto | `exceptZero | `negative | `never ] + [@mel.as "signDisplay"]) -> + ?unit:(string[@mel.as "unit"]) -> + ?unit_display:([ `long | `narrow | `short ][@mel.as "unitDisplay"]) -> + ?currency_sign:([ `accounting | `standard ][@mel.as "currencySign"]) -> + ?rounding_priority: + ([ `auto | `lessPrecision | `morePrecision ][@mel.as "roundingPriority"]) -> + ?rounding_increment:(float[@mel.as "roundingIncrement"]) -> + ?rounding_mode: + ([ `ceil + | `expand + | `floor + | `halfCeil + | `halfEven + | `halfExpand + | `halfFloor + | `halfTrunc + | `trunc ] + [@mel.as "roundingMode"]) -> + ?trailing_zero_display: + ([ `auto | `stripIfInteger ][@mel.as "trailingZeroDisplay"]) -> + unit -> + t = "" + [@@mel.obj] end module NumberFormat = struct type t = t_number_format + external format : t -> float -> string = "format" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_number_format_options = "resolvedOptions" [@@mel.send] - external format_to_parts : t -> ?number:(float, t_date_time_format_format_range) either -> unit -> t_number_format_part array = "formatToParts" [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_number_format_options + = "resolvedOptions" + [@@mel.send] + + external format_to_parts : + t -> + ?number:(float, Js.Bigint.t) either -> + unit -> + t_number_format_part array = "formatToParts" + [@@mel.send] end module Locale = struct type t = t_locale - (** The \[BCP47\](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale. *) - external locale : t -> string = "locale" [@@mel.get] + + external locale : t -> string = "locale" + [@@mel.get] + (** The \[BCP47\](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for + the locale. *) + + external direction : t -> [ `ltr | `rtl ] = "direction" + [@@mel.get] (** The writing direction for the locale. *) - external direction : t -> [ `rtl | `ltr ] = "direction" [@@mel.get] - external make : locale:(string [@mel.as "locale"]) -> direction:([ `rtl | `ltr ] [@mel.as "direction"]) -> unit -> t = "" [@@mel.obj] + + external make : + locale:(string[@mel.as "locale"]) -> + direction:([ `ltr | `rtl ][@mel.as "direction"]) -> + unit -> + t = "" + [@@mel.obj] end module I18n_UseLocale = struct type t = t_i18n_use_locale + external locale : t -> unit -> string = "locale" [@@mel.send] - external direction : t -> unit -> [ `rtl | `ltr ] = "direction" [@@mel.send] - external make : locale:((unit -> string) [@mel.as "locale"]) -> direction:((unit -> [ `rtl | `ltr ]) [@mel.as "direction"]) -> unit -> t = "" [@@mel.obj] + external direction : t -> unit -> [ `ltr | `rtl ] = "direction" [@@mel.send] + + external make : + locale:((unit -> string)[@mel.as "locale"]) -> + direction:((unit -> [ `ltr | `rtl ])[@mel.as "direction"]) -> + unit -> + t = "" + [@@mel.obj] end module ImageContextValue = struct type t = t_image_context_value - external fallback_delay : t -> float option Solidtype.Solid.accessor = "fallbackDelay" [@@mel.get] - external image_loading_status : t -> [ `idle | `loading | `loaded | `error ] Solidtype.Solid.accessor = "imageLoadingStatus" [@@mel.get] - external on_image_loading_status_change : t -> [ `idle | `loading | `loaded | `error ] -> unit = "onImageLoadingStatusChange" [@@mel.send] - external make : fallback_delay:(float option Solidtype.Solid.accessor [@mel.as "fallbackDelay"]) -> image_loading_status:([ `idle | `loading | `loaded | `error ] Solidtype.Solid.accessor [@mel.as "imageLoadingStatus"]) -> on_image_loading_status_change:(([ `idle | `loading | `loaded | `error ] -> unit) [@mel.as "onImageLoadingStatusChange"]) -> unit -> t = "" [@@mel.obj] + + external fallback_delay : t -> float option Solidtype.Solid.accessor + = "fallbackDelay" + [@@mel.get] + + external image_loading_status : + t -> [ `error | `idle | `loaded | `loading ] Solidtype.Solid.accessor + = "imageLoadingStatus" + [@@mel.get] + + external on_image_loading_status_change : + t -> [ `error | `idle | `loaded | `loading ] -> unit + = "onImageLoadingStatusChange" + [@@mel.send] + + external make : + fallback_delay: + (float option Solidtype.Solid.accessor[@mel.as "fallbackDelay"]) -> + image_loading_status: + ([ `error | `idle | `loaded | `loading ] Solidtype.Solid.accessor + [@mel.as "imageLoadingStatus"]) -> + on_image_loading_status_change: + (([ `error | `idle | `loaded | `loading ] -> unit) + [@mel.as "onImageLoadingStatusChange"]) -> + unit -> + t = "" + [@@mel.obj] end module ListState = struct type t = t_list_state + + external collection : + t -> t_unknown t_collection_node t_collection Solidtype.Solid.accessor + = "collection" + [@@mel.get] (** A collection of items in the list. *) - external collection : t -> _ t_collection_node t_collection Solidtype.Solid.accessor = "collection" [@@mel.get] + + external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor + = "selectionManager" + [@@mel.get] (** A selection manager to read and update multiple selection state. *) - external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor = "selectionManager" [@@mel.get] - external make : collection:(_ t_collection_node t_collection Solidtype.Solid.accessor [@mel.as "collection"]) -> selection_manager:(t_selection_manager Solidtype.Solid.accessor [@mel.as "selectionManager"]) -> unit -> t = "" [@@mel.obj] + + external make : + collection: + (_ t_collection_node t_collection Solidtype.Solid.accessor + [@mel.as "collection"]) -> + selection_manager: + (t_selection_manager Solidtype.Solid.accessor[@mel.as "selectionManager"]) -> + unit -> + t = "" + [@@mel.obj] end module ListboxContextValue = struct type t = t_listbox_context_value - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external should_use_virtual_focus : t -> bool option Solidtype.Solid.accessor = "shouldUseVirtualFocus" [@@mel.get] - external should_select_on_press_up : t -> bool option Solidtype.Solid.accessor = "shouldSelectOnPressUp" [@@mel.get] - external should_focus_on_hover : t -> bool option Solidtype.Solid.accessor = "shouldFocusOnHover" [@@mel.get] - external is_virtualized : t -> bool option Solidtype.Solid.accessor = "isVirtualized" [@@mel.get] - external make : list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> should_use_virtual_focus:(bool option Solidtype.Solid.accessor [@mel.as "shouldUseVirtualFocus"]) -> should_select_on_press_up:(bool option Solidtype.Solid.accessor [@mel.as "shouldSelectOnPressUp"]) -> should_focus_on_hover:(bool option Solidtype.Solid.accessor [@mel.as "shouldFocusOnHover"]) -> is_virtualized:(bool option Solidtype.Solid.accessor [@mel.as "isVirtualized"]) -> unit -> t = "" [@@mel.obj] + + external should_use_virtual_focus : t -> bool option Solidtype.Solid.accessor + = "shouldUseVirtualFocus" + [@@mel.get] + + external should_select_on_press_up : t -> bool option Solidtype.Solid.accessor + = "shouldSelectOnPressUp" + [@@mel.get] + + external should_focus_on_hover : t -> bool option Solidtype.Solid.accessor + = "shouldFocusOnHover" + [@@mel.get] + + external is_virtualized : t -> bool option Solidtype.Solid.accessor + = "isVirtualized" + [@@mel.get] + + external make : + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + should_use_virtual_focus: + (bool option Solidtype.Solid.accessor[@mel.as "shouldUseVirtualFocus"]) -> + should_select_on_press_up: + (bool option Solidtype.Solid.accessor[@mel.as "shouldSelectOnPressUp"]) -> + should_focus_on_hover: + (bool option Solidtype.Solid.accessor[@mel.as "shouldFocusOnHover"]) -> + is_virtualized: + (bool option Solidtype.Solid.accessor[@mel.as "isVirtualized"]) -> + unit -> + t = "" + [@@mel.obj] end module MenubarContextValue = struct type t = t_menubar_context_value - external dataset : t -> t_menubar_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] - external value : t -> string Js.Nullable.t Solidtype.Solid.accessor = "value" [@@mel.get] - external set_value : t -> (string, string Js.Nullable.t -> string option) either Js.Nullable.t -> unit = "setValue" [@@mel.send] - external menus : t -> string Js.Set.t Solidtype.Solid.accessor = "menus" [@@mel.get] - external menu_refs : t -> Dom.htmlElement array Solidtype.Solid.accessor = "menuRefs" [@@mel.get] - external menu_ref_map : t -> (string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor = "menuRefMap" [@@mel.get] - external last_value : t -> string option Solidtype.Solid.accessor = "lastValue" [@@mel.get] - external set_last_value : t -> (string, string option -> string option) either option -> unit = "setLastValue" [@@mel.send] - external register_menu : t -> string -> Dom.htmlElement array -> unit = "registerMenu" [@@mel.send] + + external dataset : t -> t_menubar_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + + external value : t -> string Js.Nullable.t Solidtype.Solid.accessor = "value" + [@@mel.get] + + external set_value : + t -> + (string, string Js.Nullable.t -> string option) either Js.Nullable.t -> + unit = "setValue" + [@@mel.send] + + external menus : t -> string Js.Set.t Solidtype.Solid.accessor = "menus" + [@@mel.get] + + external menu_refs : t -> Dom.htmlElement array Solidtype.Solid.accessor + = "menuRefs" + [@@mel.get] + + external menu_ref_map : + t -> (string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor + = "menuRefMap" + [@@mel.get] + + external last_value : t -> string option Solidtype.Solid.accessor + = "lastValue" + [@@mel.get] + + external set_last_value : + t -> (string, string option -> string option) either option -> unit + = "setLastValue" + [@@mel.send] + + external register_menu : t -> string -> Dom.htmlElement array -> unit + = "registerMenu" + [@@mel.send] + external unregister_menu : t -> string -> unit = "unregisterMenu" [@@mel.send] external next_menu : t -> unit -> unit = "nextMenu" [@@mel.send] external previous_menu : t -> unit -> unit = "previousMenu" [@@mel.send] external close_menu : t -> unit -> unit = "closeMenu" [@@mel.send] - external set_auto_focus_menu : t -> bool Solidtype.Solid.setter = "setAutoFocusMenu" [@@mel.get] - external auto_focus_menu : t -> bool Solidtype.Solid.accessor = "autoFocusMenu" [@@mel.get] + + external set_auto_focus_menu : t -> bool Solidtype.Solid.setter + = "setAutoFocusMenu" + [@@mel.get] + + external auto_focus_menu : t -> bool Solidtype.Solid.accessor + = "autoFocusMenu" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external make : dataset:(t_menubar_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> value:(string Js.Nullable.t Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:(((string, string Js.Nullable.t -> string option) either Js.Nullable.t -> unit) [@mel.as "setValue"]) -> menus:(string Js.Set.t Solidtype.Solid.accessor [@mel.as "menus"]) -> menu_refs:(Dom.htmlElement array Solidtype.Solid.accessor [@mel.as "menuRefs"]) -> menu_ref_map:((string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor [@mel.as "menuRefMap"]) -> last_value:(string option Solidtype.Solid.accessor [@mel.as "lastValue"]) -> set_last_value:(((string, string option -> string option) either option -> unit) [@mel.as "setLastValue"]) -> register_menu:((string -> Dom.htmlElement array -> unit) [@mel.as "registerMenu"]) -> unregister_menu:((string -> unit) [@mel.as "unregisterMenu"]) -> next_menu:((unit -> unit) [@mel.as "nextMenu"]) -> previous_menu:((unit -> unit) [@mel.as "previousMenu"]) -> close_menu:((unit -> unit) [@mel.as "closeMenu"]) -> set_auto_focus_menu:(bool Solidtype.Solid.setter [@mel.as "setAutoFocusMenu"]) -> auto_focus_menu:(bool Solidtype.Solid.accessor [@mel.as "autoFocusMenu"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> orientation:([ `horizontal | `vertical ] Solidtype.Solid.accessor [@mel.as "orientation"]) -> unit -> t = "" [@@mel.obj] -end -module GetValueLabelParams = struct - type t = t_get_value_label_params + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external make_js : + dataset:(t_menubar_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + value:(string Js.Nullable.t Solidtype.Solid.accessor[@mel.as "value"]) -> + set_value: + (((string, string Js.Nullable.t -> string option) either Js.Nullable.t -> + unit) + [@mel.as "setValue"]) -> + menus:(string Js.Set.t Solidtype.Solid.accessor[@mel.as "menus"]) -> + menu_refs: + (Dom.htmlElement array Solidtype.Solid.accessor[@mel.as "menuRefs"]) -> + menu_ref_map: + ((string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor + [@mel.as "menuRefMap"]) -> + last_value:(string option Solidtype.Solid.accessor[@mel.as "lastValue"]) -> + set_last_value: + (((string, string option -> string option) either option -> unit) + [@mel.as "setLastValue"]) -> + register_menu: + ((string -> Dom.htmlElement array -> unit)[@mel.as "registerMenu"]) -> + unregister_menu:((string -> unit)[@mel.as "unregisterMenu"]) -> + next_menu:((unit -> unit)[@mel.as "nextMenu"]) -> + previous_menu:((unit -> unit)[@mel.as "previousMenu"]) -> + close_menu:((unit -> unit)[@mel.as "closeMenu"]) -> + set_auto_focus_menu: + (bool Solidtype.Solid.setter[@mel.as "setAutoFocusMenu"]) -> + auto_focus_menu:(bool Solidtype.Solid.accessor[@mel.as "autoFocusMenu"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + orientation: + ([ `horizontal | `vertical ] Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~value ~set_value ~menus ~menu_refs ~menu_ref_map + ~last_value ~set_last_value ~register_menu ~unregister_menu ~next_menu + ~previous_menu ~close_menu ~set_auto_focus_menu ~auto_focus_menu + ~generate_id ~orientation () = + make_js ~dataset ~value ~set_value ~menus ~menu_refs ~menu_ref_map + ~last_value ~set_last_value + ~register_menu:(fun x0 x1 -> register_menu x0 x1) + ~unregister_menu ~next_menu ~previous_menu ~close_menu + ~set_auto_focus_menu ~auto_focus_menu ~generate_id ~orientation () +end + +module Meter_GetValueLabelParams = struct + type t = t_meter_get_value_label_params + external value : t -> float = "value" [@@mel.get] external min : t -> float = "min" [@@mel.get] external max : t -> float = "max" [@@mel.get] - external make : value:(float [@mel.as "value"]) -> min:(float [@mel.as "min"]) -> max:(float [@mel.as "max"]) -> unit -> t = "" [@@mel.obj] + + external make : + value:(float[@mel.as "value"]) -> + min:(float[@mel.as "min"]) -> + max:(float[@mel.as "max"]) -> + unit -> + t = "" + [@@mel.obj] end module MeterContextValue = struct type t = t_meter_context_value - external dataset : t -> t_meter_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_meter_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external value : t -> float Solidtype.Solid.accessor = "value" [@@mel.get] - external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" [@@mel.get] - external value_label : t -> string option Solidtype.Solid.accessor = "valueLabel" [@@mel.get] - external meter_fill_width : t -> string option Solidtype.Solid.accessor = "meterFillWidth" [@@mel.get] - external label_id : t -> string option Solidtype.Solid.accessor = "labelId" [@@mel.get] + + external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" + [@@mel.get] + + external value_label : t -> string option Solidtype.Solid.accessor + = "valueLabel" + [@@mel.get] + + external meter_fill_width : t -> string option Solidtype.Solid.accessor + = "meterFillWidth" + [@@mel.get] + + external label_id : t -> string option Solidtype.Solid.accessor = "labelId" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_label_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerLabelId" [@@mel.get] - let register_label_id o x0 = let r = (register_label_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : dataset:(t_meter_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> value:(float Solidtype.Solid.accessor [@mel.as "value"]) -> value_percent:(float Solidtype.Solid.accessor [@mel.as "valuePercent"]) -> value_label:(string option Solidtype.Solid.accessor [@mel.as "valueLabel"]) -> meter_fill_width:(string option Solidtype.Solid.accessor [@mel.as "meterFillWidth"]) -> label_id:(string option Solidtype.Solid.accessor [@mel.as "labelId"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_label_id:((string -> (unit -> unit)) [@mel.as "registerLabelId"]) -> unit -> t = "" [@@mel.obj] - let make ~dataset ~value ~value_percent ~value_label ~meter_fill_width ~label_id ~generate_id ~register_label_id () = make_js ~dataset ~value ~value_percent ~value_label ~meter_fill_width ~label_id ~generate_id ~register_label_id:(fun x0 -> let r = register_label_id x0 in fun () -> r ()) () + + external register_label_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerLabelId" + [@@mel.get] + + let register_label_id o x0 = + let r = ((register_label_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + dataset:(t_meter_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + value:(float Solidtype.Solid.accessor[@mel.as "value"]) -> + value_percent:(float Solidtype.Solid.accessor[@mel.as "valuePercent"]) -> + value_label:(string option Solidtype.Solid.accessor[@mel.as "valueLabel"]) -> + meter_fill_width: + (string option Solidtype.Solid.accessor[@mel.as "meterFillWidth"]) -> + label_id:(string option Solidtype.Solid.accessor[@mel.as "labelId"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_label_id:((string -> unit -> unit)[@mel.as "registerLabelId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~value ~value_percent ~value_label ~meter_fill_width + ~label_id ~generate_id ~register_label_id () = + make_js ~dataset ~value ~value_percent ~value_label ~meter_fill_width + ~label_id ~generate_id + ~register_label_id:(fun x0 -> + let r = register_label_id x0 in + fun () -> r ()) + () end module NavigationMenuContextValue = struct type t = t_navigation_menu_context_value - external dataset : t -> t_navigation_menu_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] - external delay_duration : t -> float Solidtype.Solid.accessor = "delayDuration" [@@mel.get] - external skip_delay_duration : t -> float Solidtype.Solid.accessor = "skipDelayDuration" [@@mel.get] - external auto_focus_menu : t -> bool Solidtype.Solid.accessor = "autoFocusMenu" [@@mel.get] - external set_auto_focus_menu : t -> bool Solidtype.Solid.setter = "setAutoFocusMenu" [@@mel.get] - external start_leave_timer : t -> unit -> unit = "startLeaveTimer" [@@mel.send] - external cancel_leave_timer : t -> unit -> unit = "cancelLeaveTimer" [@@mel.send] - external root_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "rootRef" [@@mel.get] - external set_root_ref : t -> Dom.htmlElement Solidtype.Solid.setter = "setRootRef" [@@mel.get] - external viewport_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "viewportRef" [@@mel.get] - external set_viewport_ref : t -> Dom.htmlElement Solidtype.Solid.setter = "setViewportRef" [@@mel.get] - external viewport_present : t -> bool Solidtype.Solid.accessor = "viewportPresent" [@@mel.get] - external current_placement : t -> string Solidtype.Solid.accessor = "currentPlacement" [@@mel.get] - external previous_menu : t -> string option Solidtype.Solid.accessor = "previousMenu" [@@mel.get] - external set_previous_menu : t -> string option Solidtype.Solid.setter = "setPreviousMenu" [@@mel.get] - external make : dataset:(t_navigation_menu_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> delay_duration:(float Solidtype.Solid.accessor [@mel.as "delayDuration"]) -> skip_delay_duration:(float Solidtype.Solid.accessor [@mel.as "skipDelayDuration"]) -> auto_focus_menu:(bool Solidtype.Solid.accessor [@mel.as "autoFocusMenu"]) -> set_auto_focus_menu:(bool Solidtype.Solid.setter [@mel.as "setAutoFocusMenu"]) -> start_leave_timer:((unit -> unit) [@mel.as "startLeaveTimer"]) -> cancel_leave_timer:((unit -> unit) [@mel.as "cancelLeaveTimer"]) -> root_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "rootRef"]) -> set_root_ref:(Dom.htmlElement Solidtype.Solid.setter [@mel.as "setRootRef"]) -> viewport_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "viewportRef"]) -> set_viewport_ref:(Dom.htmlElement Solidtype.Solid.setter [@mel.as "setViewportRef"]) -> viewport_present:(bool Solidtype.Solid.accessor [@mel.as "viewportPresent"]) -> current_placement:(string Solidtype.Solid.accessor [@mel.as "currentPlacement"]) -> previous_menu:(string option Solidtype.Solid.accessor [@mel.as "previousMenu"]) -> set_previous_menu:(string option Solidtype.Solid.setter [@mel.as "setPreviousMenu"]) -> unit -> t = "" [@@mel.obj] + + external dataset : t -> t_navigation_menu_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + + external delay_duration : t -> float Solidtype.Solid.accessor + = "delayDuration" + [@@mel.get] + + external skip_delay_duration : t -> float Solidtype.Solid.accessor + = "skipDelayDuration" + [@@mel.get] + + external auto_focus_menu : t -> bool Solidtype.Solid.accessor + = "autoFocusMenu" + [@@mel.get] + + external set_auto_focus_menu : t -> bool Solidtype.Solid.setter + = "setAutoFocusMenu" + [@@mel.get] + + external start_leave_timer : t -> unit -> unit = "startLeaveTimer" + [@@mel.send] + + external cancel_leave_timer : t -> unit -> unit = "cancelLeaveTimer" + [@@mel.send] + + external root_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "rootRef" + [@@mel.get] + + external set_root_ref : t -> Dom.htmlElement Solidtype.Solid.setter + = "setRootRef" + [@@mel.get] + + external viewport_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "viewportRef" + [@@mel.get] + + external set_viewport_ref : t -> Dom.htmlElement Solidtype.Solid.setter + = "setViewportRef" + [@@mel.get] + + external viewport_present : t -> bool Solidtype.Solid.accessor + = "viewportPresent" + [@@mel.get] + + external current_placement : t -> string Solidtype.Solid.accessor + = "currentPlacement" + [@@mel.get] + + external previous_menu : t -> string option Solidtype.Solid.accessor + = "previousMenu" + [@@mel.get] + + external set_previous_menu : t -> string option Solidtype.Solid.setter + = "setPreviousMenu" + [@@mel.get] + + external make : + dataset: + (t_navigation_menu_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + delay_duration:(float Solidtype.Solid.accessor[@mel.as "delayDuration"]) -> + skip_delay_duration: + (float Solidtype.Solid.accessor[@mel.as "skipDelayDuration"]) -> + auto_focus_menu:(bool Solidtype.Solid.accessor[@mel.as "autoFocusMenu"]) -> + set_auto_focus_menu: + (bool Solidtype.Solid.setter[@mel.as "setAutoFocusMenu"]) -> + start_leave_timer:((unit -> unit)[@mel.as "startLeaveTimer"]) -> + cancel_leave_timer:((unit -> unit)[@mel.as "cancelLeaveTimer"]) -> + root_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "rootRef"]) -> + set_root_ref:(Dom.htmlElement Solidtype.Solid.setter[@mel.as "setRootRef"]) -> + viewport_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "viewportRef"]) -> + set_viewport_ref: + (Dom.htmlElement Solidtype.Solid.setter[@mel.as "setViewportRef"]) -> + viewport_present:(bool Solidtype.Solid.accessor[@mel.as "viewportPresent"]) -> + current_placement: + (string Solidtype.Solid.accessor[@mel.as "currentPlacement"]) -> + previous_menu: + (string option Solidtype.Solid.accessor[@mel.as "previousMenu"]) -> + set_previous_menu: + (string option Solidtype.Solid.setter[@mel.as "setPreviousMenu"]) -> + unit -> + t = "" + [@@mel.obj] end module NumberFieldContextValue = struct type t = t_number_field_context_value - external value : t -> (string, float) either option Solidtype.Solid.accessor = "value" [@@mel.get] - external set_value : t -> (string, float) either -> unit = "setValue" [@@mel.send] - external raw_value : t -> float Solidtype.Solid.accessor = "rawValue" [@@mel.get] + + external value : t -> (string, float) either option Solidtype.Solid.accessor + = "value" + [@@mel.get] + + external set_value : t -> (string, float) either -> unit = "setValue" + [@@mel.send] + + external raw_value : t -> float Solidtype.Solid.accessor = "rawValue" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] external format_number : t -> float -> string = "formatNumber" [@@mel.send] external format : t -> unit -> unit = "format" [@@mel.send] - external on_input : t -> (Dom.inputEvent -> unit, (Dom.htmlInputElement, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either = "onInput" [@@mel.get] - external text_value : t -> string option Solidtype.Solid.accessor = "textValue" [@@mel.get] - external min_value : t -> float Solidtype.Solid.accessor = "minValue" [@@mel.get] - external max_value : t -> float Solidtype.Solid.accessor = "maxValue" [@@mel.get] + + external on_input : + t -> + ( Dom.inputEvent -> unit, + ( Dom.htmlInputElement, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either = "onInput" + [@@mel.get] + + external text_value : t -> string option Solidtype.Solid.accessor + = "textValue" + [@@mel.get] + + external min_value : t -> float Solidtype.Solid.accessor = "minValue" + [@@mel.get] + + external max_value : t -> float Solidtype.Solid.accessor = "maxValue" + [@@mel.get] + external step : t -> float Solidtype.Solid.accessor = "step" [@@mel.get] - external large_step : t -> float Solidtype.Solid.accessor = "largeStep" [@@mel.get] - external change_on_wheel : t -> bool Solidtype.Solid.accessor = "changeOnWheel" [@@mel.get] - external translations : t -> t_color_channel_field_root_translations option Solidtype.Solid.accessor = "translations" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external hidden_input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "hiddenInputRef" [@@mel.get] - external set_hidden_input_ref : t -> Dom.htmlInputElement -> unit = "setHiddenInputRef" [@@mel.send] + + external large_step : t -> float Solidtype.Solid.accessor = "largeStep" + [@@mel.get] + + external change_on_wheel : t -> bool Solidtype.Solid.accessor + = "changeOnWheel" + [@@mel.get] + + external translations : + t -> t_color_channel_field_root_translations option Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external hidden_input_ref : + t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "hiddenInputRef" + [@@mel.get] + + external set_hidden_input_ref : t -> Dom.htmlInputElement -> unit + = "setHiddenInputRef" + [@@mel.send] + external vary_value : t -> float -> unit = "varyValue" [@@mel.send] - external make : value:((string, float) either option Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:(((string, float) either -> unit) [@mel.as "setValue"]) -> raw_value:(float Solidtype.Solid.accessor [@mel.as "rawValue"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> format_number:((float -> string) [@mel.as "formatNumber"]) -> format:((unit -> unit) [@mel.as "format"]) -> on_input:((Dom.inputEvent -> unit, (Dom.htmlInputElement, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either [@mel.as "onInput"]) -> text_value:(string option Solidtype.Solid.accessor [@mel.as "textValue"]) -> min_value:(float Solidtype.Solid.accessor [@mel.as "minValue"]) -> max_value:(float Solidtype.Solid.accessor [@mel.as "maxValue"]) -> step:(float Solidtype.Solid.accessor [@mel.as "step"]) -> large_step:(float Solidtype.Solid.accessor [@mel.as "largeStep"]) -> change_on_wheel:(bool Solidtype.Solid.accessor [@mel.as "changeOnWheel"]) -> translations:(t_color_channel_field_root_translations option Solidtype.Solid.accessor [@mel.as "translations"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> hidden_input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "hiddenInputRef"]) -> set_hidden_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setHiddenInputRef"]) -> vary_value:((float -> unit) [@mel.as "varyValue"]) -> unit -> t = "" [@@mel.obj] -end -module Pagination_Root_ItemComponent = struct - type t = t_pagination_root_item_component + external make : + value: + ((string, float) either option Solidtype.Solid.accessor[@mel.as "value"]) -> + set_value:(((string, float) either -> unit)[@mel.as "setValue"]) -> + raw_value:(float Solidtype.Solid.accessor[@mel.as "rawValue"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + format_number:((float -> string)[@mel.as "formatNumber"]) -> + format:((unit -> unit)[@mel.as "format"]) -> + on_input: + (( Dom.inputEvent -> unit, + ( Dom.htmlInputElement, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onInput"]) -> + text_value:(string option Solidtype.Solid.accessor[@mel.as "textValue"]) -> + min_value:(float Solidtype.Solid.accessor[@mel.as "minValue"]) -> + max_value:(float Solidtype.Solid.accessor[@mel.as "maxValue"]) -> + step:(float Solidtype.Solid.accessor[@mel.as "step"]) -> + large_step:(float Solidtype.Solid.accessor[@mel.as "largeStep"]) -> + change_on_wheel:(bool Solidtype.Solid.accessor[@mel.as "changeOnWheel"]) -> + translations: + (t_color_channel_field_root_translations option Solidtype.Solid.accessor + [@mel.as "translations"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + hidden_input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor + [@mel.as "hiddenInputRef"]) -> + set_hidden_input_ref: + ((Dom.htmlInputElement -> unit)[@mel.as "setHiddenInputRef"]) -> + vary_value:((float -> unit)[@mel.as "varyValue"]) -> + unit -> + t = "" + [@@mel.obj] +end + +module Pagination_Root_ItemComponent_Props = struct + type t = t_pagination_root_item_component_props + external page : t -> float = "page" [@@mel.get] - external make : page:(float [@mel.as "page"]) -> unit -> t = "" [@@mel.obj] + external make : page:(float[@mel.as "page"]) -> unit -> t = "" [@@mel.obj] end module PaginationContextValue = struct type t = t_pagination_context_value + external count : t -> float Solidtype.Solid.accessor = "count" [@@mel.get] - external sibling_count : t -> float Solidtype.Solid.accessor = "siblingCount" [@@mel.get] - external show_first : t -> bool Solidtype.Solid.accessor = "showFirst" [@@mel.get] - external show_last : t -> bool Solidtype.Solid.accessor = "showLast" [@@mel.get] - external fixed_items : t -> (string, bool) either Solidtype.Solid.accessor = "fixedItems" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external render_item : t -> float -> Solidtype.Jsx.element = "renderItem" [@@mel.send] - external render_ellipsis : t -> unit -> Solidtype.Jsx.element = "renderEllipsis" [@@mel.send] + + external sibling_count : t -> float Solidtype.Solid.accessor = "siblingCount" + [@@mel.get] + + external show_first : t -> bool Solidtype.Solid.accessor = "showFirst" + [@@mel.get] + + external show_last : t -> bool Solidtype.Solid.accessor = "showLast" + [@@mel.get] + + external fixed_items : t -> (string, bool) either Solidtype.Solid.accessor + = "fixedItems" + [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external render_item : t -> float -> Solidtype.Jsx.element = "renderItem" + [@@mel.send] + + external render_ellipsis : t -> unit -> Solidtype.Jsx.element + = "renderEllipsis" + [@@mel.send] + external page : t -> float Solidtype.Solid.accessor = "page" [@@mel.get] external set_page : t -> float Solidtype.Solid.setter = "setPage" [@@mel.get] - external make : count:(float Solidtype.Solid.accessor [@mel.as "count"]) -> sibling_count:(float Solidtype.Solid.accessor [@mel.as "siblingCount"]) -> show_first:(bool Solidtype.Solid.accessor [@mel.as "showFirst"]) -> show_last:(bool Solidtype.Solid.accessor [@mel.as "showLast"]) -> fixed_items:((string, bool) either Solidtype.Solid.accessor [@mel.as "fixedItems"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> render_item:((float -> Solidtype.Jsx.element) [@mel.as "renderItem"]) -> render_ellipsis:((unit -> Solidtype.Jsx.element) [@mel.as "renderEllipsis"]) -> page:(float Solidtype.Solid.accessor [@mel.as "page"]) -> set_page:(float Solidtype.Solid.setter [@mel.as "setPage"]) -> unit -> t = "" [@@mel.obj] + + external make : + count:(float Solidtype.Solid.accessor[@mel.as "count"]) -> + sibling_count:(float Solidtype.Solid.accessor[@mel.as "siblingCount"]) -> + show_first:(bool Solidtype.Solid.accessor[@mel.as "showFirst"]) -> + show_last:(bool Solidtype.Solid.accessor[@mel.as "showLast"]) -> + fixed_items: + ((string, bool) either Solidtype.Solid.accessor[@mel.as "fixedItems"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + render_item:((float -> Solidtype.Jsx.element)[@mel.as "renderItem"]) -> + render_ellipsis:((unit -> Solidtype.Jsx.element)[@mel.as "renderEllipsis"]) -> + page:(float Solidtype.Solid.accessor[@mel.as "page"]) -> + set_page:(float Solidtype.Solid.setter[@mel.as "setPage"]) -> + unit -> + t = "" + [@@mel.obj] end module Popover_Root_Translations = struct type t = t_popover_root_translations + external dismiss : t -> string = "dismiss" [@@mel.get] - external make : dismiss:(string [@mel.as "dismiss"]) -> unit -> t = "" [@@mel.obj] + + external make : dismiss:(string[@mel.as "dismiss"]) -> unit -> t = "" + [@@mel.obj] end module PopoverContextValue = struct type t = t_popover_context_value - external translations : t -> t_popover_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external dataset : t -> t_popover_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external translations : + t -> t_popover_root_translations Solidtype.Solid.accessor = "translations" + [@@mel.get] + + external dataset : t -> t_popover_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] external is_modal : t -> bool Solidtype.Solid.accessor = "isModal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] - external title_id : t -> string option Solidtype.Solid.accessor = "titleId" [@@mel.get] - external description_id : t -> string option Solidtype.Solid.accessor = "descriptionId" [@@mel.get] - external set_default_anchor_ref : t -> Dom.htmlElement -> unit = "setDefaultAnchorRef" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + + external title_id : t -> string option Solidtype.Solid.accessor = "titleId" + [@@mel.get] + + external description_id : t -> string option Solidtype.Solid.accessor + = "descriptionId" + [@@mel.get] + + external set_default_anchor_ref : t -> Dom.htmlElement -> unit + = "setDefaultAnchorRef" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + external close : t -> unit -> unit = "close" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_content_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerContentId" [@@mel.get] - let register_content_id o x0 = let r = (register_content_id_js o) x0 [@u] in fun () -> r () [@u] - external register_title_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerTitleId" [@@mel.get] - let register_title_id o x0 = let r = (register_title_id_js o) x0 [@u] in fun () -> r () [@u] - external register_description_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerDescriptionId" [@@mel.get] - let register_description_id o x0 = let r = (register_description_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : translations:(t_popover_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> dataset:(t_popover_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> is_modal:(bool Solidtype.Solid.accessor [@mel.as "isModal"]) -> prevent_scroll:(bool Solidtype.Solid.accessor [@mel.as "preventScroll"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> trigger_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "triggerRef"]) -> content_id:(string option Solidtype.Solid.accessor [@mel.as "contentId"]) -> title_id:(string option Solidtype.Solid.accessor [@mel.as "titleId"]) -> description_id:(string option Solidtype.Solid.accessor [@mel.as "descriptionId"]) -> set_default_anchor_ref:((Dom.htmlElement -> unit) [@mel.as "setDefaultAnchorRef"]) -> set_trigger_ref:((Dom.htmlElement -> unit) [@mel.as "setTriggerRef"]) -> set_content_ref:((Dom.htmlElement -> unit) [@mel.as "setContentRef"]) -> close:((unit -> unit) [@mel.as "close"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_content_id:((string -> (unit -> unit)) [@mel.as "registerContentId"]) -> register_title_id:((string -> (unit -> unit)) [@mel.as "registerTitleId"]) -> register_description_id:((string -> (unit -> unit)) [@mel.as "registerDescriptionId"]) -> unit -> t = "" [@@mel.obj] - let make ~translations ~dataset ~is_open ~is_modal ~prevent_scroll ~content_present ~trigger_ref ~content_id ~title_id ~description_id ~set_default_anchor_ref ~set_trigger_ref ~set_content_ref ~close ~toggle ~generate_id ~register_content_id ~register_title_id ~register_description_id () = make_js ~translations ~dataset ~is_open ~is_modal ~prevent_scroll ~content_present ~trigger_ref ~content_id ~title_id ~description_id ~set_default_anchor_ref ~set_trigger_ref ~set_content_ref ~close ~toggle ~generate_id ~register_content_id:(fun x0 -> let r = register_content_id x0 in fun () -> r ()) ~register_title_id:(fun x0 -> let r = register_title_id x0 in fun () -> r ()) ~register_description_id:(fun x0 -> let r = register_description_id x0 in fun () -> r ()) () + + external register_content_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerContentId" + [@@mel.get] + + let register_content_id o x0 = + let r = ((register_content_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_title_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerTitleId" + [@@mel.get] + + let register_title_id o x0 = + let r = ((register_title_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_description_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerDescriptionId" + [@@mel.get] + + let register_description_id o x0 = + let r = ((register_description_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + translations: + (t_popover_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + dataset:(t_popover_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + is_modal:(bool Solidtype.Solid.accessor[@mel.as "isModal"]) -> + prevent_scroll:(bool Solidtype.Solid.accessor[@mel.as "preventScroll"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + trigger_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "triggerRef"]) -> + content_id:(string option Solidtype.Solid.accessor[@mel.as "contentId"]) -> + title_id:(string option Solidtype.Solid.accessor[@mel.as "titleId"]) -> + description_id: + (string option Solidtype.Solid.accessor[@mel.as "descriptionId"]) -> + set_default_anchor_ref: + ((Dom.htmlElement -> unit)[@mel.as "setDefaultAnchorRef"]) -> + set_trigger_ref:((Dom.htmlElement -> unit)[@mel.as "setTriggerRef"]) -> + set_content_ref:((Dom.htmlElement -> unit)[@mel.as "setContentRef"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_content_id:((string -> unit -> unit)[@mel.as "registerContentId"]) -> + register_title_id:((string -> unit -> unit)[@mel.as "registerTitleId"]) -> + register_description_id: + ((string -> unit -> unit)[@mel.as "registerDescriptionId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~translations ~dataset ~is_open ~is_modal ~prevent_scroll + ~content_present ~trigger_ref ~content_id ~title_id ~description_id + ~set_default_anchor_ref ~set_trigger_ref ~set_content_ref ~close ~toggle + ~generate_id ~register_content_id ~register_title_id + ~register_description_id () = + make_js ~translations ~dataset ~is_open ~is_modal ~prevent_scroll + ~content_present ~trigger_ref ~content_id ~title_id ~description_id + ~set_default_anchor_ref ~set_trigger_ref ~set_content_ref ~close ~toggle + ~generate_id + ~register_content_id:(fun x0 -> + let r = register_content_id x0 in + fun () -> r ()) + ~register_title_id:(fun x0 -> + let r = register_title_id x0 in + fun () -> r ()) + ~register_description_id:(fun x0 -> + let r = register_description_id x0 in + fun () -> r ()) + () end module ProgressContextValue = struct type t = t_progress_context_value - external dataset : t -> t_progress_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] - external progress_fill_width : t -> string option Solidtype.Solid.accessor = "progressFillWidth" [@@mel.get] + + external dataset : t -> t_progress_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + + external progress_fill_width : t -> string option Solidtype.Solid.accessor + = "progressFillWidth" + [@@mel.get] + external value : t -> float Solidtype.Solid.accessor = "value" [@@mel.get] - external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" [@@mel.get] - external value_label : t -> string option Solidtype.Solid.accessor = "valueLabel" [@@mel.get] - external label_id : t -> string option Solidtype.Solid.accessor = "labelId" [@@mel.get] + + external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" + [@@mel.get] + + external value_label : t -> string option Solidtype.Solid.accessor + = "valueLabel" + [@@mel.get] + + external label_id : t -> string option Solidtype.Solid.accessor = "labelId" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_label_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerLabelId" [@@mel.get] - let register_label_id o x0 = let r = (register_label_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : dataset:(t_progress_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> progress_fill_width:(string option Solidtype.Solid.accessor [@mel.as "progressFillWidth"]) -> value:(float Solidtype.Solid.accessor [@mel.as "value"]) -> value_percent:(float Solidtype.Solid.accessor [@mel.as "valuePercent"]) -> value_label:(string option Solidtype.Solid.accessor [@mel.as "valueLabel"]) -> label_id:(string option Solidtype.Solid.accessor [@mel.as "labelId"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_label_id:((string -> (unit -> unit)) [@mel.as "registerLabelId"]) -> unit -> t = "" [@@mel.obj] - let make ~dataset ~progress_fill_width ~value ~value_percent ~value_label ~label_id ~generate_id ~register_label_id () = make_js ~dataset ~progress_fill_width ~value ~value_percent ~value_label ~label_id ~generate_id ~register_label_id:(fun x0 -> let r = register_label_id x0 in fun () -> r ()) () + + external register_label_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerLabelId" + [@@mel.get] + + let register_label_id o x0 = + let r = ((register_label_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + dataset:(t_progress_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + progress_fill_width: + (string option Solidtype.Solid.accessor[@mel.as "progressFillWidth"]) -> + value:(float Solidtype.Solid.accessor[@mel.as "value"]) -> + value_percent:(float Solidtype.Solid.accessor[@mel.as "valuePercent"]) -> + value_label:(string option Solidtype.Solid.accessor[@mel.as "valueLabel"]) -> + label_id:(string option Solidtype.Solid.accessor[@mel.as "labelId"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_label_id:((string -> unit -> unit)[@mel.as "registerLabelId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~progress_fill_width ~value ~value_percent ~value_label + ~label_id ~generate_id ~register_label_id () = + make_js ~dataset ~progress_fill_width ~value ~value_percent ~value_label + ~label_id ~generate_id + ~register_label_id:(fun x0 -> + let r = register_label_id x0 in + fun () -> r ()) + () end module RadioGroupContextValue = struct type t = t_radio_group_context_value - external aria_described_by : t -> string option Solidtype.Solid.accessor = "ariaDescribedBy" [@@mel.get] - external is_default_value : t -> string -> bool = "isDefaultValue" [@@mel.send] - external is_selected_value : t -> string -> bool = "isSelectedValue" [@@mel.send] - external set_selected_value : t -> string -> unit = "setSelectedValue" [@@mel.send] - external make : aria_described_by:(string option Solidtype.Solid.accessor [@mel.as "ariaDescribedBy"]) -> is_default_value:((string -> bool) [@mel.as "isDefaultValue"]) -> is_selected_value:((string -> bool) [@mel.as "isSelectedValue"]) -> set_selected_value:((string -> unit) [@mel.as "setSelectedValue"]) -> unit -> t = "" [@@mel.obj] + + external aria_described_by : t -> string option Solidtype.Solid.accessor + = "ariaDescribedBy" + [@@mel.get] + + external is_default_value : t -> string -> bool = "isDefaultValue" + [@@mel.send] + + external is_selected_value : t -> string -> bool = "isSelectedValue" + [@@mel.send] + + external set_selected_value : t -> string -> unit = "setSelectedValue" + [@@mel.send] + + external make : + aria_described_by: + (string option Solidtype.Solid.accessor[@mel.as "ariaDescribedBy"]) -> + is_default_value:((string -> bool)[@mel.as "isDefaultValue"]) -> + is_selected_value:((string -> bool)[@mel.as "isSelectedValue"]) -> + set_selected_value:((string -> unit)[@mel.as "setSelectedValue"]) -> + unit -> + t = "" + [@@mel.obj] end module RatingItemState = struct type t = t_rating_item_state + external half : t -> bool Solidtype.Solid.accessor = "half" [@@mel.get] - external highlighted : t -> bool Solidtype.Solid.accessor = "highlighted" [@@mel.get] - external make : half:(bool Solidtype.Solid.accessor [@mel.as "half"]) -> highlighted:(bool Solidtype.Solid.accessor [@mel.as "highlighted"]) -> unit -> t = "" [@@mel.obj] + + external highlighted : t -> bool Solidtype.Solid.accessor = "highlighted" + [@@mel.get] + + external make : + half:(bool Solidtype.Solid.accessor[@mel.as "half"]) -> + highlighted:(bool Solidtype.Solid.accessor[@mel.as "highlighted"]) -> + unit -> + t = "" + [@@mel.obj] end module SearchContextValue = struct type t = t_search_context_value + + external no_result : t -> bool Solidtype.Solid.accessor = "noResult" + [@@mel.get] (** No results found *) - external no_result : t -> bool Solidtype.Solid.accessor = "noResult" [@@mel.get] + + external is_loading_suggestions : t -> bool Solidtype.Solid.accessor + = "isLoadingSuggestions" + [@@mel.get] (** Are we currently loading suggestions? *) - external is_loading_suggestions : t -> bool Solidtype.Solid.accessor = "isLoadingSuggestions" [@@mel.get] - external make : no_result:(bool Solidtype.Solid.accessor [@mel.as "noResult"]) -> is_loading_suggestions:(bool Solidtype.Solid.accessor [@mel.as "isLoadingSuggestions"]) -> unit -> t = "" [@@mel.obj] + + external make : + no_result:(bool Solidtype.Solid.accessor[@mel.as "noResult"]) -> + is_loading_suggestions: + (bool Solidtype.Solid.accessor[@mel.as "isLoadingSuggestions"]) -> + unit -> + t = "" + [@@mel.obj] end module SegmentedControlContextValue = struct type t = t_segmented_control_context_value - external value : t -> string option Solidtype.Solid.accessor = "value" [@@mel.get] - external default_value : t -> string option Solidtype.Solid.accessor = "defaultValue" [@@mel.get] - external orientation : t -> [ `horizontal | `vertical ] option Solidtype.Solid.accessor = "orientation" [@@mel.get] - external root : t -> Dom.htmlElement option Solidtype.Solid.accessor = "root" [@@mel.get] - external selected_item : t -> Dom.htmlElement option Solidtype.Solid.accessor = "selectedItem" [@@mel.get] - external set_selected_item : t -> Dom.htmlElement option Solidtype.Solid.setter = "setSelectedItem" [@@mel.get] - external make : value:(string option Solidtype.Solid.accessor [@mel.as "value"]) -> default_value:(string option Solidtype.Solid.accessor [@mel.as "defaultValue"]) -> orientation:([ `horizontal | `vertical ] option Solidtype.Solid.accessor [@mel.as "orientation"]) -> root:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "root"]) -> selected_item:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "selectedItem"]) -> set_selected_item:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setSelectedItem"]) -> unit -> t = "" [@@mel.obj] + + external value : t -> string option Solidtype.Solid.accessor = "value" + [@@mel.get] + + external default_value : t -> string option Solidtype.Solid.accessor + = "defaultValue" + [@@mel.get] + + external orientation : + t -> [ `horizontal | `vertical ] option Solidtype.Solid.accessor + = "orientation" + [@@mel.get] + + external root : t -> Dom.htmlElement option Solidtype.Solid.accessor = "root" + [@@mel.get] + + external selected_item : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "selectedItem" + [@@mel.get] + + external set_selected_item : + t -> Dom.htmlElement option Solidtype.Solid.setter = "setSelectedItem" + [@@mel.get] + + external make : + value:(string option Solidtype.Solid.accessor[@mel.as "value"]) -> + default_value: + (string option Solidtype.Solid.accessor[@mel.as "defaultValue"]) -> + orientation: + ([ `horizontal | `vertical ] option Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + root:(Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "root"]) -> + selected_item: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "selectedItem"]) -> + set_selected_item: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setSelectedItem"]) -> + unit -> + t = "" + [@@mel.obj] end module SelectBaseItemComponentProps = struct type 't t = 't t_select_base_item_component_props + + external item : 't t -> 't t_collection_node = "item" + [@@mel.get] (** The item to render. *) - external item : 't t -> 't t_collection_node = "item" [@@mel.get] - external make : item:('t t_collection_node [@mel.as "item"]) -> unit -> 't t = "" [@@mel.obj] + + external make : item:('t t_collection_node[@mel.as "item"]) -> unit -> 't t + = "" + [@@mel.obj] end module SelectBaseSectionComponentProps = struct type 't t = 't t_select_base_section_component_props + + external section : 't t -> 't t_collection_node = "section" + [@@mel.get] (** The section to render. *) - external section : 't t -> 't t_collection_node = "section" [@@mel.get] - external make : section:('t t_collection_node [@mel.as "section"]) -> unit -> 't t = "" [@@mel.obj] + + external make : + section:('t t_collection_node[@mel.as "section"]) -> unit -> 't t = "" + [@@mel.obj] end module SelectValueState = struct type 'option t = 'option t_select_value_state + + external selected_option : 'option t -> 'option Solidtype.Solid.accessor + = "selectedOption" + [@@mel.get] (** The first (or only, in case of single select) selected option. *) - external selected_option : 'option t -> 'option Solidtype.Solid.accessor = "selectedOption" [@@mel.get] - (** An array of selected options. It will contain only one value in case of single select. *) - external selected_options : 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" [@@mel.get] + + external selected_options : + 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" + [@@mel.get] + (** An array of selected options. It will contain only one value in case of + single select. *) + + external remove : 'option t -> 'option -> unit = "remove" + [@@mel.send] (** A function to remove an option from the selection. *) - external remove : 'option t -> 'option -> unit = "remove" [@@mel.send] + + external clear : 'option t -> unit -> unit = "clear" + [@@mel.send] (** A function to clear the selection. *) - external clear : 'option t -> unit -> unit = "clear" [@@mel.send] - external make : selected_option:('option Solidtype.Solid.accessor [@mel.as "selectedOption"]) -> selected_options:('option array Solidtype.Solid.accessor [@mel.as "selectedOptions"]) -> remove:(('option -> unit) [@mel.as "remove"]) -> clear:((unit -> unit) [@mel.as "clear"]) -> unit -> 'option t = "" [@@mel.obj] + + external make : + selected_option:('option Solidtype.Solid.accessor[@mel.as "selectedOption"]) -> + selected_options: + ('option array Solidtype.Solid.accessor[@mel.as "selectedOptions"]) -> + remove:(('option -> unit)[@mel.as "remove"]) -> + clear:((unit -> unit)[@mel.as "clear"]) -> + unit -> + 'option t = "" + [@@mel.obj] end module SelectContextValue = struct type t = t_select_context_value - external dataset : t -> t_select_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_select_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" [@@mel.get] - external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" + [@@mel.get] + + external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" + [@@mel.get] + external is_modal : t -> bool Solidtype.Solid.accessor = "isModal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external disallow_type_ahead : t -> bool Solidtype.Solid.accessor = "disallowTypeAhead" [@@mel.get] - external should_focus_wrap : t -> bool Solidtype.Solid.accessor = "shouldFocusWrap" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external auto_focus : t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor = "autoFocus" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external trigger_id : t -> string option Solidtype.Solid.accessor = "triggerId" [@@mel.get] - external value_id : t -> string option Solidtype.Solid.accessor = "valueId" [@@mel.get] - external listbox_id : t -> string option Solidtype.Solid.accessor = "listboxId" [@@mel.get] - external listbox_aria_labelled_by : t -> string option Solidtype.Solid.accessor = "listboxAriaLabelledBy" [@@mel.get] - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor = "keyboardDelegate" [@@mel.get] - external set_listbox_aria_labelled_by : t -> string option Solidtype.Solid.setter = "setListboxAriaLabelledBy" [@@mel.get] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" [@@mel.send] - external open_ : t -> ([ `first | `last ], bool) either -> unit = "open" [@@mel.send] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external disallow_type_ahead : t -> bool Solidtype.Solid.accessor + = "disallowTypeAhead" + [@@mel.get] + + external should_focus_wrap : t -> bool Solidtype.Solid.accessor + = "shouldFocusWrap" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external auto_focus : + t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor + = "autoFocus" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external trigger_id : t -> string option Solidtype.Solid.accessor + = "triggerId" + [@@mel.get] + + external value_id : t -> string option Solidtype.Solid.accessor = "valueId" + [@@mel.get] + + external listbox_id : t -> string option Solidtype.Solid.accessor + = "listboxId" + [@@mel.get] + + external listbox_aria_labelled_by : + t -> string option Solidtype.Solid.accessor = "listboxAriaLabelledBy" + [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + + external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor + = "keyboardDelegate" + [@@mel.get] + + external set_listbox_aria_labelled_by : + t -> string option Solidtype.Solid.setter = "setListboxAriaLabelledBy" + [@@mel.get] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" + [@@mel.send] + + external open_ : t -> ([ `first | `last ], bool) either -> unit = "open" + [@@mel.send] + external close : t -> unit -> unit = "close" [@@mel.send] - external toggle : t -> ([ `first | `last ], bool) either -> unit = "toggle" [@@mel.send] - external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor = "placeholder" [@@mel.get] - external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderItem" [@@mel.send] - external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderSection" [@@mel.send] + + external toggle : t -> ([ `first | `last ], bool) either -> unit = "toggle" + [@@mel.send] + + external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor + = "placeholder" + [@@mel.get] + + external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderItem" + [@@mel.send] + + external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderSection" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_trigger_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerTriggerId" [@@mel.get] - let register_trigger_id o x0 = let r = (register_trigger_id_js o) x0 [@u] in fun () -> r () [@u] - external register_value_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerValueId" [@@mel.get] - let register_value_id o x0 = let r = (register_value_id_js o) x0 [@u] in fun () -> r () [@u] - external register_listbox_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerListboxId" [@@mel.get] - let register_listbox_id o x0 = let r = (register_listbox_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : dataset:(t_select_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> is_multiple:(bool Solidtype.Solid.accessor [@mel.as "isMultiple"]) -> is_virtualized:(bool Solidtype.Solid.accessor [@mel.as "isVirtualized"]) -> is_modal:(bool Solidtype.Solid.accessor [@mel.as "isModal"]) -> prevent_scroll:(bool Solidtype.Solid.accessor [@mel.as "preventScroll"]) -> disallow_type_ahead:(bool Solidtype.Solid.accessor [@mel.as "disallowTypeAhead"]) -> should_focus_wrap:(bool Solidtype.Solid.accessor [@mel.as "shouldFocusWrap"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> auto_focus:(([ `first | `last ], bool) either Solidtype.Solid.accessor [@mel.as "autoFocus"]) -> trigger_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "triggerRef"]) -> trigger_id:(string option Solidtype.Solid.accessor [@mel.as "triggerId"]) -> value_id:(string option Solidtype.Solid.accessor [@mel.as "valueId"]) -> listbox_id:(string option Solidtype.Solid.accessor [@mel.as "listboxId"]) -> listbox_aria_labelled_by:(string option Solidtype.Solid.accessor [@mel.as "listboxAriaLabelledBy"]) -> list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> keyboard_delegate:(t_keyboard_delegate Solidtype.Solid.accessor [@mel.as "keyboardDelegate"]) -> set_listbox_aria_labelled_by:(string option Solidtype.Solid.setter [@mel.as "setListboxAriaLabelledBy"]) -> set_trigger_ref:((Dom.htmlElement -> unit) [@mel.as "setTriggerRef"]) -> set_content_ref:((Dom.htmlElement -> unit) [@mel.as "setContentRef"]) -> set_listbox_ref:((Dom.htmlElement -> unit) [@mel.as "setListboxRef"]) -> open_:((([ `first | `last ], bool) either -> unit) [@mel.as "open"]) -> close:((unit -> unit) [@mel.as "close"]) -> toggle:((([ `first | `last ], bool) either -> unit) [@mel.as "toggle"]) -> placeholder:(Solidtype.Jsx.element Solidtype.Solid.accessor [@mel.as "placeholder"]) -> render_item:((_ t_collection_node -> Solidtype.Jsx.element) [@mel.as "renderItem"]) -> render_section:((_ t_collection_node -> Solidtype.Jsx.element) [@mel.as "renderSection"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_trigger_id:((string -> (unit -> unit)) [@mel.as "registerTriggerId"]) -> register_value_id:((string -> (unit -> unit)) [@mel.as "registerValueId"]) -> register_listbox_id:((string -> (unit -> unit)) [@mel.as "registerListboxId"]) -> unit -> t = "" [@@mel.obj] - let make ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized ~is_modal ~prevent_scroll ~disallow_type_ahead ~should_focus_wrap ~content_present ~auto_focus ~trigger_ref ~trigger_id ~value_id ~listbox_id ~listbox_aria_labelled_by ~list_state ~keyboard_delegate ~set_listbox_aria_labelled_by ~set_trigger_ref ~set_content_ref ~set_listbox_ref ~open_ ~close ~toggle ~placeholder ~render_item ~render_section ~generate_id ~register_trigger_id ~register_value_id ~register_listbox_id () = make_js ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized ~is_modal ~prevent_scroll ~disallow_type_ahead ~should_focus_wrap ~content_present ~auto_focus ~trigger_ref ~trigger_id ~value_id ~listbox_id ~listbox_aria_labelled_by ~list_state ~keyboard_delegate ~set_listbox_aria_labelled_by ~set_trigger_ref ~set_content_ref ~set_listbox_ref ~open_ ~close ~toggle ~placeholder ~render_item ~render_section ~generate_id ~register_trigger_id:(fun x0 -> let r = register_trigger_id x0 in fun () -> r ()) ~register_value_id:(fun x0 -> let r = register_value_id x0 in fun () -> r ()) ~register_listbox_id:(fun x0 -> let r = register_listbox_id x0 in fun () -> r ()) () -end - -module GetValueLabelParams2 = struct - type t = t_get_value_label_params2 + + external register_trigger_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerTriggerId" + [@@mel.get] + + let register_trigger_id o x0 = + let r = ((register_trigger_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_value_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerValueId" + [@@mel.get] + + let register_value_id o x0 = + let r = ((register_value_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_listbox_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerListboxId" + [@@mel.get] + + let register_listbox_id o x0 = + let r = ((register_listbox_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + dataset:(t_select_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + is_multiple:(bool Solidtype.Solid.accessor[@mel.as "isMultiple"]) -> + is_virtualized:(bool Solidtype.Solid.accessor[@mel.as "isVirtualized"]) -> + is_modal:(bool Solidtype.Solid.accessor[@mel.as "isModal"]) -> + prevent_scroll:(bool Solidtype.Solid.accessor[@mel.as "preventScroll"]) -> + disallow_type_ahead: + (bool Solidtype.Solid.accessor[@mel.as "disallowTypeAhead"]) -> + should_focus_wrap:(bool Solidtype.Solid.accessor[@mel.as "shouldFocusWrap"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + auto_focus: + (([ `first | `last ], bool) either Solidtype.Solid.accessor + [@mel.as "autoFocus"]) -> + trigger_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "triggerRef"]) -> + trigger_id:(string option Solidtype.Solid.accessor[@mel.as "triggerId"]) -> + value_id:(string option Solidtype.Solid.accessor[@mel.as "valueId"]) -> + listbox_id:(string option Solidtype.Solid.accessor[@mel.as "listboxId"]) -> + listbox_aria_labelled_by: + (string option Solidtype.Solid.accessor[@mel.as "listboxAriaLabelledBy"]) -> + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + keyboard_delegate: + (t_keyboard_delegate Solidtype.Solid.accessor[@mel.as "keyboardDelegate"]) -> + set_listbox_aria_labelled_by: + (string option Solidtype.Solid.setter[@mel.as "setListboxAriaLabelledBy"]) -> + set_trigger_ref:((Dom.htmlElement -> unit)[@mel.as "setTriggerRef"]) -> + set_content_ref:((Dom.htmlElement -> unit)[@mel.as "setContentRef"]) -> + set_listbox_ref:((Dom.htmlElement -> unit)[@mel.as "setListboxRef"]) -> + open_:((([ `first | `last ], bool) either -> unit)[@mel.as "open"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + toggle:((([ `first | `last ], bool) either -> unit)[@mel.as "toggle"]) -> + placeholder: + (Solidtype.Jsx.element Solidtype.Solid.accessor[@mel.as "placeholder"]) -> + render_item: + ((t_unknown t_collection_node -> Solidtype.Jsx.element) + [@mel.as "renderItem"]) -> + render_section: + ((t_unknown t_collection_node -> Solidtype.Jsx.element) + [@mel.as "renderSection"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_trigger_id:((string -> unit -> unit)[@mel.as "registerTriggerId"]) -> + register_value_id:((string -> unit -> unit)[@mel.as "registerValueId"]) -> + register_listbox_id:((string -> unit -> unit)[@mel.as "registerListboxId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized ~is_modal + ~prevent_scroll ~disallow_type_ahead ~should_focus_wrap ~content_present + ~auto_focus ~trigger_ref ~trigger_id ~value_id ~listbox_id + ~listbox_aria_labelled_by ~list_state ~keyboard_delegate + ~set_listbox_aria_labelled_by ~set_trigger_ref ~set_content_ref + ~set_listbox_ref ~open_ ~close ~toggle ~placeholder ~render_item + ~render_section ~generate_id ~register_trigger_id ~register_value_id + ~register_listbox_id () = + make_js ~dataset ~is_open ~is_disabled ~is_multiple ~is_virtualized + ~is_modal ~prevent_scroll ~disallow_type_ahead ~should_focus_wrap + ~content_present ~auto_focus ~trigger_ref ~trigger_id ~value_id + ~listbox_id ~listbox_aria_labelled_by ~list_state ~keyboard_delegate + ~set_listbox_aria_labelled_by ~set_trigger_ref ~set_content_ref + ~set_listbox_ref ~open_ ~close ~toggle ~placeholder ~render_item + ~render_section ~generate_id + ~register_trigger_id:(fun x0 -> + let r = register_trigger_id x0 in + fun () -> r ()) + ~register_value_id:(fun x0 -> + let r = register_value_id x0 in + fun () -> r ()) + ~register_listbox_id:(fun x0 -> + let r = register_listbox_id x0 in + fun () -> r ()) + () +end + +module Slider_GetValueLabelParams = struct + type t = t_slider_get_value_label_params + external values : t -> float array = "values" [@@mel.get] external min : t -> float = "min" [@@mel.get] external max : t -> float = "max" [@@mel.get] - external make : values:(float array [@mel.as "values"]) -> min:(float [@mel.as "min"]) -> max:(float [@mel.as "max"]) -> unit -> t = "" [@@mel.obj] + + external make : + values:(float array[@mel.as "values"]) -> + min:(float[@mel.as "min"]) -> + max:(float[@mel.as "max"]) -> + unit -> + t = "" + [@@mel.obj] end module SliderContextValue = struct type t = t_slider_context_value - external dataset : t -> t_slider_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_slider_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external state : t -> t_slider_state = "state" [@@mel.get] - external thumbs : t -> t_collection_item_with_ref array Solidtype.Solid.accessor = "thumbs" [@@mel.get] - external set_thumbs : t -> t_collection_item_with_ref array Solidtype.Solid.setter = "setThumbs" [@@mel.get] - external on_slide_start : t -> (float -> float -> unit) option = "onSlideStart" [@@mel.get] - external on_slide_move : t -> (t_slider_context_value_on_slide_move -> unit) option = "onSlideMove" [@@mel.get] + + external thumbs : + t -> t_collection_item_with_ref array Solidtype.Solid.accessor = "thumbs" + [@@mel.get] + + external set_thumbs : + t -> t_collection_item_with_ref array Solidtype.Solid.setter = "setThumbs" + [@@mel.get] + + external on_slide_start : t -> (float -> float -> unit) option + = "onSlideStart" + [@@mel.get] + + external on_slide_move : + t -> (t_slider_context_value_on_slide_move_deltas -> unit) option + = "onSlideMove" + [@@mel.get] + external on_slide_end : t -> (unit -> unit) option = "onSlideEnd" [@@mel.get] - external on_step_key_down : t -> Dom.keyboardEvent -> float -> unit = "onStepKeyDown" [@@mel.send] - external is_sliding_from_left : t -> unit -> bool = "isSlidingFromLeft" [@@mel.send] - external is_sliding_from_bottom : t -> unit -> bool = "isSlidingFromBottom" [@@mel.send] - external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "trackRef" [@@mel.get] - external start_edge : t -> [ `top | `bottom | `left | `right ] Solidtype.Solid.accessor = "startEdge" [@@mel.get] - external end_edge : t -> [ `top | `bottom | `left | `right ] Solidtype.Solid.accessor = "endEdge" [@@mel.get] - external min_value : t -> float Solidtype.Solid.accessor = "minValue" [@@mel.get] - external max_value : t -> float Solidtype.Solid.accessor = "maxValue" [@@mel.get] - external inverted : t -> bool Solidtype.Solid.accessor = "inverted" [@@mel.get] - external register_track : t -> Dom.htmlElement -> unit = "registerTrack" [@@mel.send] + + external on_step_key_down : t -> Dom.keyboardEvent -> float -> unit + = "onStepKeyDown" + [@@mel.send] + + external is_sliding_from_left : t -> unit -> bool = "isSlidingFromLeft" + [@@mel.send] + + external is_sliding_from_bottom : t -> unit -> bool = "isSlidingFromBottom" + [@@mel.send] + + external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "trackRef" + [@@mel.get] + + external start_edge : + t -> [ `bottom | `left | `right | `top ] Solidtype.Solid.accessor + = "startEdge" + [@@mel.get] + + external end_edge : + t -> [ `bottom | `left | `right | `top ] Solidtype.Solid.accessor + = "endEdge" + [@@mel.get] + + external min_value : t -> float Solidtype.Solid.accessor = "minValue" + [@@mel.get] + + external max_value : t -> float Solidtype.Solid.accessor = "maxValue" + [@@mel.get] + + external inverted : t -> bool Solidtype.Solid.accessor = "inverted" + [@@mel.get] + + external register_track : t -> Dom.htmlElement -> unit = "registerTrack" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external get_value_label : t -> (t_get_value_label_params2 -> string) option = "getValueLabel" [@@mel.get] - external make : dataset:(t_slider_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> state:(t_slider_state [@mel.as "state"]) -> thumbs:(t_collection_item_with_ref array Solidtype.Solid.accessor [@mel.as "thumbs"]) -> set_thumbs:(t_collection_item_with_ref array Solidtype.Solid.setter [@mel.as "setThumbs"]) -> on_slide_start:((float -> float -> unit) option [@mel.as "onSlideStart"]) -> on_slide_move:((t_slider_context_value_on_slide_move -> unit) option [@mel.as "onSlideMove"]) -> on_slide_end:((unit -> unit) option [@mel.as "onSlideEnd"]) -> on_step_key_down:((Dom.keyboardEvent -> float -> unit) [@mel.as "onStepKeyDown"]) -> is_sliding_from_left:((unit -> bool) [@mel.as "isSlidingFromLeft"]) -> is_sliding_from_bottom:((unit -> bool) [@mel.as "isSlidingFromBottom"]) -> track_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "trackRef"]) -> start_edge:([ `top | `bottom | `left | `right ] Solidtype.Solid.accessor [@mel.as "startEdge"]) -> end_edge:([ `top | `bottom | `left | `right ] Solidtype.Solid.accessor [@mel.as "endEdge"]) -> min_value:(float Solidtype.Solid.accessor [@mel.as "minValue"]) -> max_value:(float Solidtype.Solid.accessor [@mel.as "maxValue"]) -> inverted:(bool Solidtype.Solid.accessor [@mel.as "inverted"]) -> register_track:((Dom.htmlElement -> unit) [@mel.as "registerTrack"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> get_value_label:((t_get_value_label_params2 -> string) option [@mel.as "getValueLabel"]) -> unit -> t = "" [@@mel.obj] + + external get_value_label : + t -> (t_slider_get_value_label_params -> string) option = "getValueLabel" + [@@mel.get] + + external make_js : + dataset:(t_slider_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + state:(t_slider_state[@mel.as "state"]) -> + thumbs: + (t_collection_item_with_ref array Solidtype.Solid.accessor + [@mel.as "thumbs"]) -> + set_thumbs: + (t_collection_item_with_ref array Solidtype.Solid.setter + [@mel.as "setThumbs"]) -> + on_slide_start:((float -> float -> unit) option[@mel.as "onSlideStart"]) -> + on_slide_move: + ((t_slider_context_value_on_slide_move_deltas -> unit) option + [@mel.as "onSlideMove"]) -> + on_slide_end:((unit -> unit) option[@mel.as "onSlideEnd"]) -> + on_step_key_down: + ((Dom.keyboardEvent -> float -> unit)[@mel.as "onStepKeyDown"]) -> + is_sliding_from_left:((unit -> bool)[@mel.as "isSlidingFromLeft"]) -> + is_sliding_from_bottom:((unit -> bool)[@mel.as "isSlidingFromBottom"]) -> + track_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "trackRef"]) -> + start_edge: + ([ `bottom | `left | `right | `top ] Solidtype.Solid.accessor + [@mel.as "startEdge"]) -> + end_edge: + ([ `bottom | `left | `right | `top ] Solidtype.Solid.accessor + [@mel.as "endEdge"]) -> + min_value:(float Solidtype.Solid.accessor[@mel.as "minValue"]) -> + max_value:(float Solidtype.Solid.accessor[@mel.as "maxValue"]) -> + inverted:(bool Solidtype.Solid.accessor[@mel.as "inverted"]) -> + register_track:((Dom.htmlElement -> unit)[@mel.as "registerTrack"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + get_value_label: + ((t_slider_get_value_label_params -> string) option + [@mel.as "getValueLabel"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~state ~thumbs ~set_thumbs ~on_slide_start ~on_slide_move + ~on_slide_end ~on_step_key_down ~is_sliding_from_left + ~is_sliding_from_bottom ~track_ref ~start_edge ~end_edge ~min_value + ~max_value ~inverted ~register_track ~generate_id ~get_value_label () = + make_js ~dataset ~state ~thumbs ~set_thumbs + ~on_slide_start: + (Option.map (fun f -> fun x0 x1 -> f x0 x1) on_slide_start) + ~on_slide_move ~on_slide_end + ~on_step_key_down:(fun x0 x1 -> on_step_key_down x0 x1) + ~is_sliding_from_left ~is_sliding_from_bottom ~track_ref ~start_edge + ~end_edge ~min_value ~max_value ~inverted ~register_track ~generate_id + ~get_value_label () end module SwitchRootState = struct type t = t_switch_root_state + + external checked : t -> bool Solidtype.Solid.accessor = "checked" + [@@mel.get] (** Whether the switch is checked or not. *) - external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] - external make : checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> unit -> t = "" [@@mel.obj] + + external make : + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> unit -> t = "" + [@@mel.obj] end module SwitchContextValue = struct type t = t_switch_context_value + external value : t -> string Solidtype.Solid.accessor = "value" [@@mel.get] - external dataset : t -> t_switch_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_switch_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] external set_is_checked : t -> bool -> unit = "setIsChecked" [@@mel.send] external set_is_focused : t -> bool -> unit = "setIsFocused" [@@mel.send] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external make : value:(string Solidtype.Solid.accessor [@mel.as "value"]) -> dataset:(t_switch_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> set_is_checked:((bool -> unit) [@mel.as "setIsChecked"]) -> set_is_focused:((bool -> unit) [@mel.as "setIsFocused"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> unit -> t = "" [@@mel.obj] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external make : + value:(string Solidtype.Solid.accessor[@mel.as "value"]) -> + dataset:(t_switch_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + set_is_checked:((bool -> unit)[@mel.as "setIsChecked"]) -> + set_is_focused:((bool -> unit)[@mel.as "setIsFocused"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + unit -> + t = "" + [@@mel.obj] end module TabsContextValue = struct type t = t_tabs_context_value - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external activation_mode : t -> [ `manual | `automatic ] Solidtype.Solid.accessor = "activationMode" [@@mel.get] - external trigger_ids_map : t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "triggerIdsMap" [@@mel.get] - external content_ids_map : t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "contentIdsMap" [@@mel.get] - external list_state : t -> t_single_select_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external selected_tab : t -> Dom.htmlElement option Solidtype.Solid.accessor = "selectedTab" [@@mel.get] - external set_selected_tab : t -> Dom.htmlElement option Solidtype.Solid.setter = "setSelectedTab" [@@mel.get] - external generate_trigger_id : t -> string -> string = "generateTriggerId" [@@mel.send] - external generate_content_id : t -> string -> string = "generateContentId" [@@mel.send] - external make : is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> orientation:([ `horizontal | `vertical ] Solidtype.Solid.accessor [@mel.as "orientation"]) -> activation_mode:([ `manual | `automatic ] Solidtype.Solid.accessor [@mel.as "activationMode"]) -> trigger_ids_map:((string, string) Js.Map.t Solidtype.Solid.accessor [@mel.as "triggerIdsMap"]) -> content_ids_map:((string, string) Js.Map.t Solidtype.Solid.accessor [@mel.as "contentIdsMap"]) -> list_state:(t_single_select_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> selected_tab:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "selectedTab"]) -> set_selected_tab:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setSelectedTab"]) -> generate_trigger_id:((string -> string) [@mel.as "generateTriggerId"]) -> generate_content_id:((string -> string) [@mel.as "generateContentId"]) -> unit -> t = "" [@@mel.obj] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external activation_mode : + t -> [ `automatic | `manual ] Solidtype.Solid.accessor = "activationMode" + [@@mel.get] + + external trigger_ids_map : + t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "triggerIdsMap" + [@@mel.get] + + external content_ids_map : + t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "contentIdsMap" + [@@mel.get] + + external list_state : t -> t_single_select_list_state Solidtype.Solid.accessor + = "listState" + [@@mel.get] + + external selected_tab : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "selectedTab" + [@@mel.get] + + external set_selected_tab : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setSelectedTab" + [@@mel.get] + + external generate_trigger_id : t -> string -> string = "generateTriggerId" + [@@mel.send] + + external generate_content_id : t -> string -> string = "generateContentId" + [@@mel.send] + + external make : + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + orientation: + ([ `horizontal | `vertical ] Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + activation_mode: + ([ `automatic | `manual ] Solidtype.Solid.accessor + [@mel.as "activationMode"]) -> + trigger_ids_map: + ((string, string) Js.Map.t Solidtype.Solid.accessor + [@mel.as "triggerIdsMap"]) -> + content_ids_map: + ((string, string) Js.Map.t Solidtype.Solid.accessor + [@mel.as "contentIdsMap"]) -> + list_state: + (t_single_select_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + selected_tab: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "selectedTab"]) -> + set_selected_tab: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setSelectedTab"]) -> + generate_trigger_id:((string -> string)[@mel.as "generateTriggerId"]) -> + generate_content_id:((string -> string)[@mel.as "generateContentId"]) -> + unit -> + t = "" + [@@mel.obj] end module TextFieldContextValue = struct type t = t_text_field_context_value - external value : t -> string option Solidtype.Solid.accessor = "value" [@@mel.get] + + external value : t -> string option Solidtype.Solid.accessor = "value" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external on_input : t -> (Dom.inputEvent -> unit, ((Dom.htmlInputElement, Dom.htmlTextAreaElement) either, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either = "onInput" [@@mel.get] - external make : value:(string option Solidtype.Solid.accessor [@mel.as "value"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> on_input:((Dom.inputEvent -> unit, ((Dom.htmlInputElement, Dom.htmlTextAreaElement) either, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either [@mel.as "onInput"]) -> unit -> t = "" [@@mel.obj] + + external on_input : + t -> + ( Dom.inputEvent -> unit, + ( (Dom.htmlInputElement, Dom.htmlTextAreaElement) either, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either = "onInput" + [@@mel.get] + + external make : + value:(string option Solidtype.Solid.accessor[@mel.as "value"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + on_input: + (( Dom.inputEvent -> unit, + ( (Dom.htmlInputElement, Dom.htmlTextAreaElement) either, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onInput"]) -> + unit -> + t = "" + [@@mel.obj] end module Time = struct type t = t_time + external hour : t -> float option = "hour" [@@mel.get] external minute : t -> float option = "minute" [@@mel.get] external second : t -> float option = "second" [@@mel.get] - external make : ?hour:(float [@mel.as "hour"]) -> ?minute:(float [@mel.as "minute"]) -> ?second:(float [@mel.as "second"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hour:(float[@mel.as "hour"]) -> + ?minute:(float[@mel.as "minute"]) -> + ?second:(float[@mel.as "second"]) -> + unit -> + t = "" + [@@mel.obj] end module TimeField_Root_Granularity = struct type t = t_time_field_root_granularity + external hour : t -> bool = "hour" [@@mel.get] external minute : t -> bool = "minute" [@@mel.get] external second : t -> bool = "second" [@@mel.get] - external make : hour:(bool [@mel.as "hour"]) -> minute:(bool [@mel.as "minute"]) -> second:(bool [@mel.as "second"]) -> unit -> t = "" [@@mel.obj] + + external make : + hour:(bool[@mel.as "hour"]) -> + minute:(bool[@mel.as "minute"]) -> + second:(bool[@mel.as "second"]) -> + unit -> + t = "" + [@@mel.obj] end module TimeField_Root_Translations = struct type t = t_time_field_root_translations + external hour : t -> string = "hour" [@@mel.get] external minute : t -> string = "minute" [@@mel.get] external second : t -> string = "second" [@@mel.get] @@ -1257,76 +3779,174 @@ module TimeField_Root_Translations = struct external pm : t -> string = "pm" [@@mel.get] external day_period : t -> string = "dayPeriod" [@@mel.get] external time_zone_name : t -> string = "timeZoneName" [@@mel.get] - external selected_time_description : t -> string -> string = "selectedTimeDescription" [@@mel.send] - external make : hour:(string [@mel.as "hour"]) -> minute:(string [@mel.as "minute"]) -> second:(string [@mel.as "second"]) -> am:(string [@mel.as "am"]) -> pm:(string [@mel.as "pm"]) -> day_period:(string [@mel.as "dayPeriod"]) -> time_zone_name:(string [@mel.as "timeZoneName"]) -> selected_time_description:((string -> string) [@mel.as "selectedTimeDescription"]) -> unit -> t = "" [@@mel.obj] + + external selected_time_description : t -> string -> string + = "selectedTimeDescription" + [@@mel.send] + + external make : + hour:(string[@mel.as "hour"]) -> + minute:(string[@mel.as "minute"]) -> + second:(string[@mel.as "second"]) -> + am:(string[@mel.as "am"]) -> + pm:(string[@mel.as "pm"]) -> + day_period:(string[@mel.as "dayPeriod"]) -> + time_zone_name:(string[@mel.as "timeZoneName"]) -> + selected_time_description: + ((string -> string)[@mel.as "selectedTimeDescription"]) -> + unit -> + t = "" + [@@mel.obj] end module Toast_Region_Translations = struct type t = t_toast_region_translations + external notifications : t -> string -> string = "notifications" [@@mel.send] - external make : notifications:((string -> string) [@mel.as "notifications"]) -> unit -> t = "" [@@mel.obj] + + external make : + notifications:((string -> string)[@mel.as "notifications"]) -> unit -> t + = "" + [@@mel.obj] end module Toast_Root_Translations = struct type t = t_toast_root_translations + external close : t -> string = "close" [@@mel.get] - external make : close:(string [@mel.as "close"]) -> unit -> t = "" [@@mel.obj] + external make : close:(string[@mel.as "close"]) -> unit -> t = "" [@@mel.obj] end module SwipeEvent = struct type t = t_swipe_event + external current_target : t -> Dom.eventTarget = "currentTarget" [@@mel.get] - (** The **`type`** read-only property of the Event interface returns a string containing the event's type. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/type) *) - external type_ : t -> string = "type" [@@mel.get] - (** The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) *) - external detail : t -> t_swipe_event_detail = "detail" [@@mel.get] - external init_custom_event : t -> string -> ?bubbles:bool -> ?cancelable:bool -> ?detail:t_swipe_event_detail -> unit -> unit = "initCustomEvent" [@@mel.send] - (** The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/bubbles) *) - external bubbles : t -> bool = "bubbles" [@@mel.get] + + external type_ : t -> string = "type" + [@@mel.get] + (** The **`type`** read-only property of the Event interface returns a string + containing the event's type. + + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/type) + *) + + external detail : t -> t_swipe_event_detail = "detail" + [@@mel.get] + (** The read-only **`detail`** property of the CustomEvent interface returns + any data passed when initializing the event. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) + *) + + external init_custom_event : + t -> + string -> + ?bubbles:bool -> + ?cancelable:bool -> + ?detail:t_swipe_event_detail -> + unit -> + unit = "initCustomEvent" + [@@mel.send] + + external bubbles : t -> bool = "bubbles" + [@@mel.get] + (** The **`bubbles`** read-only property of the Event interface indicates + whether the event bubbles up through the DOM tree or not. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/bubbles) *) + + external cancel_bubble : t -> bool = "cancelBubble" + [@@mel.get] (** The **`cancelBubble`** property of the Event interface is deprecated. *) - external cancel_bubble : t -> bool = "cancelBubble" [@@mel.get] - (** The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/cancelable) *) - external cancelable : t -> bool = "cancelable" [@@mel.get] - (** The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/composed) *) - external composed : t -> bool = "composed" [@@mel.get] - (** The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) *) - external default_prevented : t -> bool = "defaultPrevented" [@@mel.get] + + external cancelable : t -> bool = "cancelable" + [@@mel.get] + (** The **`cancelable`** read-only property of the Event interface indicates + whether the event can be canceled, and therefore prevented as if the event + never happened. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/cancelable) + *) + + external composed : t -> bool = "composed" + [@@mel.get] + (** The read-only **`composed`** property of the or not the event will + propagate across the shadow DOM boundary into the standard DOM. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/composed) *) + + external default_prevented : t -> bool = "defaultPrevented" + [@@mel.get] + (** The **`defaultPrevented`** read-only property of the Event interface + returns a boolean value indicating whether or not the call to + Event.preventDefault() canceled the event. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) + *) + + external event_phase : t -> float = "eventPhase" + [@@mel.get] (** The **`eventPhase`** read-only property of the being evaluated. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) *) - external event_phase : t -> float = "eventPhase" [@@mel.get] - (** The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) *) - external is_trusted : t -> bool = "isTrusted" [@@mel.get] - (** The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not. *) - external return_value : t -> bool = "returnValue" [@@mel.get] - (** The deprecated **`Event.srcElement`** is an alias for the Event.target property. *) - external src_element : t -> Dom.eventTarget Js.Nullable.t = "srcElement" [@@mel.get] + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) + *) + + external is_trusted : t -> bool = "isTrusted" + [@@mel.get] + (** The **`isTrusted`** read-only property of the when the event was generated + by the user agent (including via user actions and programmatic methods + such as HTMLElement.focus()), and `false` when the event was dispatched + via The only exception is the `click` event, which initializes the + `isTrusted` property to `false` in user agents. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) *) + + external return_value : t -> bool = "returnValue" + [@@mel.get] + (** The Event property **`returnValue`** indicates whether the default action + for this event has been prevented or not. *) + + external src_element : t -> Dom.eventTarget Js.Nullable.t = "srcElement" + [@@mel.get] + (** The deprecated **`Event.srcElement`** is an alias for the Event.target + property. *) + + external target : t -> Dom.eventTarget Js.Nullable.t = "target" + [@@mel.get] (** The read-only **`target`** property of the dispatched. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/target) *) - external target : t -> Dom.eventTarget Js.Nullable.t = "target" [@@mel.get] - (** The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) *) - external time_stamp : t -> float = "timeStamp" [@@mel.get] - external composed_path : t -> unit -> Dom.eventTarget array = "composedPath" [@@mel.send] - external init_event : t -> string -> ?bubbles:bool -> ?cancelable:bool -> unit -> unit = "initEvent" [@@mel.send] + + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/target) + *) + + external time_stamp : t -> float = "timeStamp" + [@@mel.get] + (** The **`timeStamp`** read-only property of the Event interface returns the + time (in milliseconds) at which the event was created. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) *) + + external composed_path : t -> unit -> Dom.eventTarget array = "composedPath" + [@@mel.send] + + external init_event : + t -> string -> ?bubbles:bool -> ?cancelable:bool -> unit -> unit + = "initEvent" + [@@mel.send] + external prevent_default : t -> unit -> unit = "preventDefault" [@@mel.send] - external stop_immediate_propagation : t -> unit -> unit = "stopImmediatePropagation" [@@mel.send] + + external stop_immediate_propagation : t -> unit -> unit + = "stopImmediatePropagation" + [@@mel.send] + external stop_propagation : t -> unit -> unit = "stopPropagation" [@@mel.send] external none : t -> float = "NONE" [@@mel.get] external capturing_phase : t -> float = "CAPTURING_PHASE" [@@mel.get] @@ -1336,241 +3956,963 @@ end module Toast_Toaster = struct type t = t_toast_toaster - external show : t -> (t_toast_component_props -> Solidtype.Jsx.element) -> ?options:t_show_toast_options -> unit -> float = "show" [@@mel.send] - external update : t -> float -> (t_toast_component_props -> Solidtype.Jsx.element) -> unit = "update" [@@mel.send] - external promise : t -> ('t Js.Promise.t, unit -> 't Js.Promise.t) either -> (('t, 'u) t_toast_promise_component_props -> Solidtype.Jsx.element) -> ?options:t_show_toast_options -> unit -> float = "promise" [@@mel.send] + + external show : + t -> + (t_toast_component_props -> Solidtype.Jsx.element) -> + ?options:t_show_toast_options -> + unit -> + float = "show" + [@@mel.send] + + external update : + t -> float -> (t_toast_component_props -> Solidtype.Jsx.element) -> unit + = "update" + [@@mel.send] + + external promise : + t -> + ('t Js.Promise.t, unit -> 't Js.Promise.t) either -> + (('t, 'u) t_toast_promise_component_props -> Solidtype.Jsx.element) -> + ?options:t_show_toast_options -> + unit -> + float = "promise" + [@@mel.send] + external dismiss : t -> float -> float = "dismiss" [@@mel.send] external clear : t -> unit -> unit = "clear" [@@mel.send] - external make : show:(((t_toast_component_props -> Solidtype.Jsx.element) -> t_show_toast_options option -> float) [@mel.as "show"]) -> update:((float -> (t_toast_component_props -> Solidtype.Jsx.element) -> unit) [@mel.as "update"]) -> promise:((('t Js.Promise.t, unit -> 't Js.Promise.t) either -> (('t, 'u) t_toast_promise_component_props -> Solidtype.Jsx.element) -> t_show_toast_options option -> float) [@mel.as "promise"]) -> dismiss:((float -> float) [@mel.as "dismiss"]) -> clear:((unit -> unit) [@mel.as "clear"]) -> unit -> t = "" [@@mel.obj] end module ToastContextValue = struct type t = t_toast_context_value - external translations : t -> t_toast_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] + + external translations : + t -> t_toast_root_translations Solidtype.Solid.accessor = "translations" + [@@mel.get] + external close : t -> unit -> unit = "close" [@@mel.send] - external duration : t -> float Solidtype.Solid.accessor = "duration" [@@mel.get] - external is_persistent : t -> bool Solidtype.Solid.accessor = "isPersistent" [@@mel.get] - external close_timer_start_time : t -> float Solidtype.Solid.accessor = "closeTimerStartTime" [@@mel.get] + + external duration : t -> float Solidtype.Solid.accessor = "duration" + [@@mel.get] + + external is_persistent : t -> bool Solidtype.Solid.accessor = "isPersistent" + [@@mel.get] + + external close_timer_start_time : t -> float Solidtype.Solid.accessor + = "closeTimerStartTime" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_title_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerTitleId" [@@mel.get] - let register_title_id o x0 = let r = (register_title_id_js o) x0 [@u] in fun () -> r () [@u] - external register_description_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerDescriptionId" [@@mel.get] - let register_description_id o x0 = let r = (register_description_id_js o) x0 [@u] in fun () -> r () [@u] - external make_js : translations:(t_toast_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> close:((unit -> unit) [@mel.as "close"]) -> duration:(float Solidtype.Solid.accessor [@mel.as "duration"]) -> is_persistent:(bool Solidtype.Solid.accessor [@mel.as "isPersistent"]) -> close_timer_start_time:(float Solidtype.Solid.accessor [@mel.as "closeTimerStartTime"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_title_id:((string -> (unit -> unit)) [@mel.as "registerTitleId"]) -> register_description_id:((string -> (unit -> unit)) [@mel.as "registerDescriptionId"]) -> unit -> t = "" [@@mel.obj] - let make ~translations ~close ~duration ~is_persistent ~close_timer_start_time ~generate_id ~register_title_id ~register_description_id () = make_js ~translations ~close ~duration ~is_persistent ~close_timer_start_time ~generate_id ~register_title_id:(fun x0 -> let r = register_title_id x0 in fun () -> r ()) ~register_description_id:(fun x0 -> let r = register_description_id x0 in fun () -> r ()) () + + external register_title_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerTitleId" + [@@mel.get] + + let register_title_id o x0 = + let r = ((register_title_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external register_description_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerDescriptionId" + [@@mel.get] + + let register_description_id o x0 = + let r = ((register_description_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external make_js : + translations: + (t_toast_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + duration:(float Solidtype.Solid.accessor[@mel.as "duration"]) -> + is_persistent:(bool Solidtype.Solid.accessor[@mel.as "isPersistent"]) -> + close_timer_start_time: + (float Solidtype.Solid.accessor[@mel.as "closeTimerStartTime"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_title_id:((string -> unit -> unit)[@mel.as "registerTitleId"]) -> + register_description_id: + ((string -> unit -> unit)[@mel.as "registerDescriptionId"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~translations ~close ~duration ~is_persistent ~close_timer_start_time + ~generate_id ~register_title_id ~register_description_id () = + make_js ~translations ~close ~duration ~is_persistent + ~close_timer_start_time ~generate_id + ~register_title_id:(fun x0 -> + let r = register_title_id x0 in + fun () -> r ()) + ~register_description_id:(fun x0 -> + let r = register_description_id x0 in + fun () -> r ()) + () end module ToggleButtonRootState = struct type t = t_toggle_button_root_state + + external pressed : t -> bool Solidtype.Solid.accessor = "pressed" + [@@mel.get] (** Whether the toggle button is on (pressed) or off (not pressed). *) - external pressed : t -> bool Solidtype.Solid.accessor = "pressed" [@@mel.get] - external make : pressed:(bool Solidtype.Solid.accessor [@mel.as "pressed"]) -> unit -> t = "" [@@mel.obj] + + external make : + pressed:(bool Solidtype.Solid.accessor[@mel.as "pressed"]) -> unit -> t = "" + [@@mel.obj] end module ToggleGroupContextValue = struct type t = t_toggle_group_context_value - external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] + + external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" + [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external make : is_multiple:(bool Solidtype.Solid.accessor [@mel.as "isMultiple"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> orientation:([ `horizontal | `vertical ] Solidtype.Solid.accessor [@mel.as "orientation"]) -> unit -> t = "" [@@mel.obj] + + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external make : + is_multiple:(bool Solidtype.Solid.accessor[@mel.as "isMultiple"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + orientation: + ([ `horizontal | `vertical ] Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + unit -> + t = "" + [@@mel.obj] end module TooltipContextValue = struct type t = t_tooltip_context_value - external dataset : t -> t_tooltip_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_tooltip_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external trigger_on_focus_only : t -> bool Solidtype.Solid.accessor = "triggerOnFocusOnly" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external open_tooltip : t -> ?immediate:bool -> unit -> unit = "openTooltip" [@@mel.send] - external hide_tooltip : t -> ?immediate:bool -> unit -> unit = "hideTooltip" [@@mel.send] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external trigger_on_focus_only : t -> bool Solidtype.Solid.accessor + = "triggerOnFocusOnly" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external open_tooltip : t -> ?immediate:bool -> unit -> unit = "openTooltip" + [@@mel.send] + + external hide_tooltip : t -> ?immediate:bool -> unit -> unit = "hideTooltip" + [@@mel.send] + external cancel_opening : t -> unit -> unit = "cancelOpening" [@@mel.send] external generate_id : t -> string -> string = "generateId" [@@mel.send] - external register_content_id_js : t -> (string -> (unit -> unit [@u]) [@u]) = "registerContentId" [@@mel.get] - let register_content_id o x0 = let r = (register_content_id_js o) x0 [@u] in fun () -> r () [@u] - external is_target_on_tooltip : t -> Dom.node Js.Null.t -> bool = "isTargetOnTooltip" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external make_js : dataset:(t_tooltip_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> trigger_on_focus_only:(bool Solidtype.Solid.accessor [@mel.as "triggerOnFocusOnly"]) -> content_id:(string option Solidtype.Solid.accessor [@mel.as "contentId"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> open_tooltip:((bool option -> unit) [@mel.as "openTooltip"]) -> hide_tooltip:((bool option -> unit) [@mel.as "hideTooltip"]) -> cancel_opening:((unit -> unit) [@mel.as "cancelOpening"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> register_content_id:((string -> (unit -> unit)) [@mel.as "registerContentId"]) -> is_target_on_tooltip:((Dom.node Js.Nullable.t -> bool) [@mel.as "isTargetOnTooltip"]) -> set_trigger_ref:((Dom.htmlElement -> unit) [@mel.as "setTriggerRef"]) -> set_content_ref:((Dom.htmlElement -> unit) [@mel.as "setContentRef"]) -> unit -> t = "" [@@mel.obj] - let make ~dataset ~is_open ~is_disabled ~trigger_on_focus_only ~content_id ~content_present ~open_tooltip ~hide_tooltip ~cancel_opening ~generate_id ~register_content_id ~is_target_on_tooltip ~set_trigger_ref ~set_content_ref () = make_js ~dataset ~is_open ~is_disabled ~trigger_on_focus_only ~content_id ~content_present ~open_tooltip ~hide_tooltip ~cancel_opening ~generate_id ~register_content_id:(fun x0 -> let r = register_content_id x0 in fun () -> r ()) ~is_target_on_tooltip ~set_trigger_ref ~set_content_ref () + + external register_content_id_js : t -> (string -> (unit -> unit[@u])[@u]) + = "registerContentId" + [@@mel.get] + + let register_content_id o x0 = + let r = ((register_content_id_js o) x0 [@u]) in + fun () -> (r () [@u]) + + external is_target_on_tooltip : t -> Dom.node Js.Null.t -> bool + = "isTargetOnTooltip" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external make_js : + dataset:(t_tooltip_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + trigger_on_focus_only: + (bool Solidtype.Solid.accessor[@mel.as "triggerOnFocusOnly"]) -> + content_id:(string option Solidtype.Solid.accessor[@mel.as "contentId"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + open_tooltip:((bool option -> unit)[@mel.as "openTooltip"]) -> + hide_tooltip:((bool option -> unit)[@mel.as "hideTooltip"]) -> + cancel_opening:((unit -> unit)[@mel.as "cancelOpening"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + register_content_id:((string -> unit -> unit)[@mel.as "registerContentId"]) -> + is_target_on_tooltip: + ((Dom.node Js.Nullable.t -> bool)[@mel.as "isTargetOnTooltip"]) -> + set_trigger_ref:((Dom.htmlElement -> unit)[@mel.as "setTriggerRef"]) -> + set_content_ref:((Dom.htmlElement -> unit)[@mel.as "setContentRef"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~dataset ~is_open ~is_disabled ~trigger_on_focus_only ~content_id + ~content_present ~open_tooltip ~hide_tooltip ~cancel_opening ~generate_id + ~register_content_id ~is_target_on_tooltip ~set_trigger_ref + ~set_content_ref () = + make_js ~dataset ~is_open ~is_disabled ~trigger_on_focus_only ~content_id + ~content_present ~open_tooltip ~hide_tooltip ~cancel_opening ~generate_id + ~register_content_id:(fun x0 -> + let r = register_content_id x0 in + fun () -> r ()) + ~is_target_on_tooltip ~set_trigger_ref ~set_content_ref () end module CreateListStateProps = struct type 'data t = 'data t_create_list_state_props - (** Filter function to generate a filtered list of nodes. *) - external filter : 'data t -> ('data t_collection_node array -> 'data t_collection_node array) option = "filter" [@@mel.get] + + external filter_js : + 'data t -> + (('data t_collection_node array -> 'data t_collection_node array)[@u]) + option = "filter" + [@@mel.get] + + let filter o = + match filter_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external data_source : + 'data t -> ('data array, 'data array Solidtype.Solid.accessor) either + = "dataSource" + [@@mel.get] (** The source data to be managed by the collection. *) - external data_source : 'data t -> ('data array, 'data array Solidtype.Solid.accessor) either = "dataSource" [@@mel.get] + + external get_key : + 'data t -> + ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either + option = "getKey" + [@@mel.get] (** Property name or getter function to use as the key of an item. *) - external get_key : 'data t -> ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either option = "getKey" [@@mel.get] - (** Property name or getter function to use as the text value of an item for typeahead purpose. *) - external get_text_value : 'data t -> ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either option = "getTextValue" [@@mel.get] - (** Property name or getter function to use as the disabled flag of an item. *) - external get_disabled : 'data t -> ('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either option = "getDisabled" [@@mel.get] - (** Property name or getter function that refers to the children items of a section. *) - external get_section_children : 'data t -> ('data -> 'data array, ('data -> 'data array) option Solidtype.Solid.accessor) either option = "getSectionChildren" [@@mel.get] + + external get_text_value : + 'data t -> + ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either + option = "getTextValue" + [@@mel.get] + (** Property name or getter function to use as the text value of an item for + typeahead purpose. *) + + external get_disabled : + 'data t -> + ('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either + option = "getDisabled" + [@@mel.get] + (** Property name or getter function to use as the disabled flag of an item. + *) + + external get_section_children : + 'data t -> + ( 'data -> 'data array, + ('data -> 'data array) option Solidtype.Solid.accessor ) + either + option = "getSectionChildren" + [@@mel.get] + (** Property name or getter function that refers to the children items of a + section. *) + + external selection_behavior : + 'data t -> + ( [ `replace | `toggle ], + [ `replace | `toggle ] option Solidtype.Solid.accessor ) + either + option = "selectionBehavior" + [@@mel.get] (** How multiple selection should behave in the collection. *) - external selection_behavior : 'data t -> ([ `toggle | `replace ], [ `toggle | `replace ] option Solidtype.Solid.accessor) either option = "selectionBehavior" [@@mel.get] - (** Whether onSelectionChange should fire even if the new set of keys is the same as the last. *) - external allow_duplicate_selection_events : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowDuplicateSelectionEvents" [@@mel.get] + + external allow_duplicate_selection_events : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowDuplicateSelectionEvents" + [@@mel.get] + (** Whether onSelectionChange should fire even if the new set of keys is the + same as the last. *) + + external selection_mode : + 'data t -> + ( [ `multiple | `none | `single ], + [ `multiple | `none | `single ] option Solidtype.Solid.accessor ) + either + option = "selectionMode" + [@@mel.get] (** The type of selection that is allowed in the collection. *) - external selection_mode : 'data t -> ([ `none | `single | `multiple ], [ `none | `single | `multiple ] option Solidtype.Solid.accessor) either option = "selectionMode" [@@mel.get] + + external disallow_empty_selection : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowEmptySelection" [@@mel.get] + + external selected_keys : + 'data t -> + (string array, string array option Solidtype.Solid.accessor) either option + = "selectedKeys" + [@@mel.get] (** The currently selected keys in the collection (controlled). *) - external selected_keys : 'data t -> (string array, string array option Solidtype.Solid.accessor) either option = "selectedKeys" [@@mel.get] + + external default_selected_keys : + 'data t -> + (string array, string array option Solidtype.Solid.accessor) either option + = "defaultSelectedKeys" + [@@mel.get] (** The initial selected keys in the collection (uncontrolled). *) - external default_selected_keys : 'data t -> (string array, string array option Solidtype.Solid.accessor) either option = "defaultSelectedKeys" [@@mel.get] - (** Handler that is called when the selection changes. *) - external on_selection_change : 'data t -> (string Js.Set.t -> unit) option = "onSelectionChange" [@@mel.get] - external make : ?filter:(('data t_collection_node array -> 'data t_collection_node array) [@mel.as "filter"]) -> data_source:(('data array, 'data array Solidtype.Solid.accessor) either [@mel.as "dataSource"]) -> ?get_key:(('data -> string, ('data -> string) option Solidtype.Solid.accessor) either [@mel.as "getKey"]) -> ?get_text_value:(('data -> string, ('data -> string) option Solidtype.Solid.accessor) either [@mel.as "getTextValue"]) -> ?get_disabled:(('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either [@mel.as "getDisabled"]) -> ?get_section_children:(('data -> 'data array, ('data -> 'data array) option Solidtype.Solid.accessor) either [@mel.as "getSectionChildren"]) -> ?selection_behavior:(([ `toggle | `replace ], [ `toggle | `replace ] option Solidtype.Solid.accessor) either [@mel.as "selectionBehavior"]) -> ?allow_duplicate_selection_events:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowDuplicateSelectionEvents"]) -> ?selection_mode:(([ `none | `single | `multiple ], [ `none | `single | `multiple ] option Solidtype.Solid.accessor) either [@mel.as "selectionMode"]) -> ?disallow_empty_selection:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowEmptySelection"]) -> ?selected_keys:((string array, string array option Solidtype.Solid.accessor) either [@mel.as "selectedKeys"]) -> ?default_selected_keys:((string array, string array option Solidtype.Solid.accessor) either [@mel.as "defaultSelectedKeys"]) -> ?on_selection_change:((string Js.Set.t -> unit) [@mel.as "onSelectionChange"]) -> unit -> 'data t = "" [@@mel.obj] + + external on_selection_change_js : + 'data t -> ((string Js.Set.t -> unit)[@u]) option = "onSelectionChange" + [@@mel.get] + + let on_selection_change o = + match on_selection_change_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external make : + ?filter: + (('data t_collection_node array -> 'data t_collection_node array) + [@mel.as "filter"]) -> + data_source: + (('data array, 'data array Solidtype.Solid.accessor) either + [@mel.as "dataSource"]) -> + ?get_key: + (( 'data -> string, + ('data -> string) option Solidtype.Solid.accessor ) + either + [@mel.as "getKey"]) -> + ?get_text_value: + (( 'data -> string, + ('data -> string) option Solidtype.Solid.accessor ) + either + [@mel.as "getTextValue"]) -> + ?get_disabled: + (('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either + [@mel.as "getDisabled"]) -> + ?get_section_children: + (( 'data -> 'data array, + ('data -> 'data array) option Solidtype.Solid.accessor ) + either + [@mel.as "getSectionChildren"]) -> + ?selection_behavior: + (( [ `replace | `toggle ], + [ `replace | `toggle ] option Solidtype.Solid.accessor ) + either + [@mel.as "selectionBehavior"]) -> + ?allow_duplicate_selection_events: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowDuplicateSelectionEvents"]) -> + ?selection_mode: + (( [ `multiple | `none | `single ], + [ `multiple | `none | `single ] option Solidtype.Solid.accessor ) + either + [@mel.as "selectionMode"]) -> + ?disallow_empty_selection: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowEmptySelection"]) -> + ?selected_keys: + ((string array, string array option Solidtype.Solid.accessor) either + [@mel.as "selectedKeys"]) -> + ?default_selected_keys: + ((string array, string array option Solidtype.Solid.accessor) either + [@mel.as "defaultSelectedKeys"]) -> + ?on_selection_change: + ((string Js.Set.t -> unit)[@mel.as "onSelectionChange"]) -> + unit -> + 'data t = "" + [@@mel.obj] end module CreateSelectableCollectionProps = struct type t = t_create_selectable_collection_props + + external selection_manager : + t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] + + external keyboard_delegate : + t -> + (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either + = "keyboardDelegate" + [@@mel.get] (** A delegate object that implements behavior for keyboard focus movement. *) - external keyboard_delegate : t -> (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either = "keyboardDelegate" [@@mel.get] - (** Whether the collection or one of its items should be automatically focused upon render. *) - external auto_focus : t -> ([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either option = "autoFocus" [@@mel.get] + + external auto_focus : + t -> + ( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + option = "autoFocus" + [@@mel.get] + (** Whether the collection or one of its items should be automatically focused + upon render. *) + + external defer_auto_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "deferAutoFocus" + [@@mel.get] (** Whether the autofocus should run on next tick. *) - external defer_auto_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "deferAutoFocus" [@@mel.get] + + external should_focus_wrap : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldFocusWrap" + [@@mel.get] (** Whether focus should wrap around when the end/start is reached. *) - external should_focus_wrap : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldFocusWrap" [@@mel.get] + + external disallow_empty_selection : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowEmptySelection" [@@mel.get] - (** Whether the collection allows the user to select all items via keyboard shortcut. *) - external disallow_select_all : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowSelectAll" [@@mel.get] + + external disallow_select_all : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowSelectAll" + [@@mel.get] + (** Whether the collection allows the user to select all items via keyboard + shortcut. *) + + external select_on_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "selectOnFocus" + [@@mel.get] (** Whether selection should occur automatically on focus. *) - external select_on_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "selectOnFocus" [@@mel.get] + + external disallow_type_ahead : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowTypeAhead" + [@@mel.get] (** Whether typeahead is disabled. *) - external disallow_type_ahead : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowTypeAhead" [@@mel.get] - (** Whether the collection items should use virtual focus instead of being focused directly. *) - external should_use_virtual_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldUseVirtualFocus" [@@mel.get] + + external should_use_virtual_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldUseVirtualFocus" + [@@mel.get] + (** Whether the collection items should use virtual focus instead of being + focused directly. *) + + external allows_tab_navigation : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowsTabNavigation" + [@@mel.get] (** Whether navigation through tab key is enabled. *) - external allows_tab_navigation : t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowsTabNavigation" [@@mel.get] + + external is_virtualized : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "isVirtualized" + [@@mel.get] (** Whether the collection items are contained in a virtual scroller. *) - external is_virtualized : t -> (bool, bool option Solidtype.Solid.accessor) either option = "isVirtualized" [@@mel.get] - (** When virtualized, the Virtualizer function used to scroll to the item of the key provided. *) - external scroll_to_key : t -> (string -> unit) option = "scrollToKey" [@@mel.get] + + external scroll_to_key_js : t -> ((string -> unit)[@u]) option = "scrollToKey" + [@@mel.get] + + let scroll_to_key o = + match scroll_to_key_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external orientation : + t -> + ( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + option = "orientation" + [@@mel.get] (** The orientation of the selectable collection interactions. *) - external orientation : t -> ([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either option = "orientation" [@@mel.get] - external make : selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> keyboard_delegate:((t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either [@mel.as "keyboardDelegate"]) -> ?auto_focus:(([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either [@mel.as "autoFocus"]) -> ?defer_auto_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "deferAutoFocus"]) -> ?should_focus_wrap:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldFocusWrap"]) -> ?disallow_empty_selection:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowEmptySelection"]) -> ?disallow_select_all:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowSelectAll"]) -> ?select_on_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "selectOnFocus"]) -> ?disallow_type_ahead:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowTypeAhead"]) -> ?should_use_virtual_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldUseVirtualFocus"]) -> ?allows_tab_navigation:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowsTabNavigation"]) -> ?is_virtualized:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "isVirtualized"]) -> ?scroll_to_key:((string -> unit) [@mel.as "scrollToKey"]) -> ?orientation:(([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either [@mel.as "orientation"]) -> unit -> t = "" [@@mel.obj] + + external make : + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + keyboard_delegate: + (( t_keyboard_delegate, + t_keyboard_delegate Solidtype.Solid.accessor ) + either + [@mel.as "keyboardDelegate"]) -> + ?auto_focus: + (( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + [@mel.as "autoFocus"]) -> + ?defer_auto_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "deferAutoFocus"]) -> + ?should_focus_wrap: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldFocusWrap"]) -> + ?disallow_empty_selection: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowEmptySelection"]) -> + ?disallow_select_all: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowSelectAll"]) -> + ?select_on_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "selectOnFocus"]) -> + ?disallow_type_ahead: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowTypeAhead"]) -> + ?should_use_virtual_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldUseVirtualFocus"]) -> + ?allows_tab_navigation: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowsTabNavigation"]) -> + ?is_virtualized: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "isVirtualized"]) -> + ?scroll_to_key:((string -> unit)[@mel.as "scrollToKey"]) -> + ?orientation: + (( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + [@mel.as "orientation"]) -> + unit -> + t = "" + [@@mel.obj] end module Selection_CreateSelectableCollection = struct type t = t_selection_create_selectable_collection - external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" [@@mel.get] - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" [@@mel.send] + + external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" + [@@mel.get] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" + [@@mel.send] + external on_focus_in : t -> Dom.focusEvent -> unit = "onFocusIn" [@@mel.send] - external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" [@@mel.send] - external make : tab_index:(float option Solidtype.Solid.accessor [@mel.as "tabIndex"]) -> on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> on_mouse_down:((Dom.mouseEvent -> unit) [@mel.as "onMouseDown"]) -> on_focus_in:((Dom.focusEvent -> unit) [@mel.as "onFocusIn"]) -> on_focus_out:((Dom.focusEvent -> unit) [@mel.as "onFocusOut"]) -> unit -> t = "" [@@mel.obj] + + external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" + [@@mel.send] + + external make : + tab_index:(float option Solidtype.Solid.accessor[@mel.as "tabIndex"]) -> + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> + on_mouse_down:((Dom.mouseEvent -> unit)[@mel.as "onMouseDown"]) -> + on_focus_in:((Dom.focusEvent -> unit)[@mel.as "onFocusIn"]) -> + on_focus_out:((Dom.focusEvent -> unit)[@mel.as "onFocusOut"]) -> + unit -> + t = "" + [@@mel.obj] end module CreateSelectableItemProps = struct type t = t_create_selectable_item_props + + external selection_manager : + t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] + + external key : t -> (string, string Solidtype.Solid.accessor) either = "key" + [@@mel.get] (** A unique key for the item. *) - external key : t -> (string, string Solidtype.Solid.accessor) either = "key" [@@mel.get] - (** By default, selection occurs on pointer down. This can be strange if selecting an - item causes the UI to disappear immediately (e.g. menus). *) - external should_select_on_press_up : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldSelectOnPressUp" [@@mel.get] - (** Whether the option should use virtual focus instead of being focused directly. *) - external should_use_virtual_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldUseVirtualFocus" [@@mel.get] - (** Whether selection requires the pointer/mouse down and up events to occur on the same target or triggers selection on - the target of the pointer/mouse up event. *) - external allows_different_press_origin : t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowsDifferentPressOrigin" [@@mel.get] + + external should_select_on_press_up : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldSelectOnPressUp" + [@@mel.get] + (** By default, selection occurs on pointer down. This can be strange if + selecting an item causes the UI to disappear immediately (e.g. menus). *) + + external should_use_virtual_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldUseVirtualFocus" + [@@mel.get] + (** Whether the option should use virtual focus instead of being focused + directly. *) + + external allows_different_press_origin : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowsDifferentPressOrigin" + [@@mel.get] + (** Whether selection requires the pointer/mouse down and up events to occur + on the same target or triggers selection on the target of the + pointer/mouse up event. *) + + external virtualized : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "virtualized" + [@@mel.get] (** Whether the option is contained in a virtual scroller. *) - external virtualized : t -> (bool, bool option Solidtype.Solid.accessor) either option = "virtualized" [@@mel.get] + + external disabled : + t -> (bool, bool option Solidtype.Solid.accessor) either option = "disabled" + [@@mel.get] (** Whether the item is disabled. *) - external disabled : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disabled" [@@mel.get] - (** Function to focus the item. *) - external focus : t -> (unit -> unit) option = "focus" [@@mel.get] - external make : selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> key:((string, string Solidtype.Solid.accessor) either [@mel.as "key"]) -> ?should_select_on_press_up:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldSelectOnPressUp"]) -> ?should_use_virtual_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldUseVirtualFocus"]) -> ?allows_different_press_origin:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowsDifferentPressOrigin"]) -> ?virtualized:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "virtualized"]) -> ?disabled:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disabled"]) -> ?focus:((unit -> unit) [@mel.as "focus"]) -> unit -> t = "" [@@mel.obj] + + external focus_js : t -> ((unit -> unit)[@u]) option = "focus" [@@mel.get] + + let focus o = + match focus_js o with + | None -> None + | Some f -> Some (fun () -> (f () [@u])) + + external make : + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + key:((string, string Solidtype.Solid.accessor) either[@mel.as "key"]) -> + ?should_select_on_press_up: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldSelectOnPressUp"]) -> + ?should_use_virtual_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldUseVirtualFocus"]) -> + ?allows_different_press_origin: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowsDifferentPressOrigin"]) -> + ?virtualized: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "virtualized"]) -> + ?disabled: + ((bool, bool option Solidtype.Solid.accessor) either[@mel.as "disabled"]) -> + ?focus:((unit -> unit)[@mel.as "focus"]) -> + unit -> + t = "" + [@@mel.obj] end module Selection_CreateSelectableItem = struct type t = t_selection_create_selectable_item + external is_selected : t -> unit -> bool = "isSelected" [@@mel.send] external is_disabled : t -> unit -> bool = "isDisabled" [@@mel.send] external allows_selection : t -> unit -> bool = "allowsSelection" [@@mel.send] - external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" [@@mel.get] - external data_key : t -> string option Solidtype.Solid.accessor = "dataKey" [@@mel.get] - external on_pointer_down : t -> Dom.pointerEvent -> unit = "onPointerDown" [@@mel.send] - external on_pointer_up : t -> Dom.pointerEvent -> unit = "onPointerUp" [@@mel.send] + + external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" + [@@mel.get] + + external data_key : t -> string option Solidtype.Solid.accessor = "dataKey" + [@@mel.get] + + external on_pointer_down : t -> Dom.pointerEvent -> unit = "onPointerDown" + [@@mel.send] + + external on_pointer_up : t -> Dom.pointerEvent -> unit = "onPointerUp" + [@@mel.send] + external on_click : t -> Dom.mouseEvent -> unit = "onClick" [@@mel.send] - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" [@@mel.send] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" + [@@mel.send] + external on_focus : t -> Dom.focusEvent -> unit = "onFocus" [@@mel.send] - external make : is_selected:((unit -> bool) [@mel.as "isSelected"]) -> is_disabled:((unit -> bool) [@mel.as "isDisabled"]) -> allows_selection:((unit -> bool) [@mel.as "allowsSelection"]) -> tab_index:(float option Solidtype.Solid.accessor [@mel.as "tabIndex"]) -> data_key:(string option Solidtype.Solid.accessor [@mel.as "dataKey"]) -> on_pointer_down:((Dom.pointerEvent -> unit) [@mel.as "onPointerDown"]) -> on_pointer_up:((Dom.pointerEvent -> unit) [@mel.as "onPointerUp"]) -> on_click:((Dom.mouseEvent -> unit) [@mel.as "onClick"]) -> on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> on_mouse_down:((Dom.mouseEvent -> unit) [@mel.as "onMouseDown"]) -> on_focus:((Dom.focusEvent -> unit) [@mel.as "onFocus"]) -> unit -> t = "" [@@mel.obj] + + external make : + is_selected:((unit -> bool)[@mel.as "isSelected"]) -> + is_disabled:((unit -> bool)[@mel.as "isDisabled"]) -> + allows_selection:((unit -> bool)[@mel.as "allowsSelection"]) -> + tab_index:(float option Solidtype.Solid.accessor[@mel.as "tabIndex"]) -> + data_key:(string option Solidtype.Solid.accessor[@mel.as "dataKey"]) -> + on_pointer_down:((Dom.pointerEvent -> unit)[@mel.as "onPointerDown"]) -> + on_pointer_up:((Dom.pointerEvent -> unit)[@mel.as "onPointerUp"]) -> + on_click:((Dom.mouseEvent -> unit)[@mel.as "onClick"]) -> + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> + on_mouse_down:((Dom.mouseEvent -> unit)[@mel.as "onMouseDown"]) -> + on_focus:((Dom.focusEvent -> unit)[@mel.as "onFocus"]) -> + unit -> + t = "" + [@@mel.obj] end module CreateSelectableListProps = struct type 'data t = 'data t_create_selectable_list_props + + external collection : + 'data t -> 'data t_collection_node t_collection Solidtype.Solid.accessor + = "collection" + [@@mel.get] (** State of the collection. *) - external collection : 'data t -> 'data t_collection_node t_collection Solidtype.Solid.accessor = "collection" [@@mel.get] + + external selection_manager : + 'data t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : 'data t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] - (** A delegate that returns collection item keys with respect to visual layout. *) - external keyboard_delegate : 'data t -> (t_keyboard_delegate, t_keyboard_delegate option Solidtype.Solid.accessor) either option = "keyboardDelegate" [@@mel.get] - (** Whether the collection or one of its items should be automatically focused upon render. *) - external auto_focus : 'data t -> ([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either option = "autoFocus" [@@mel.get] + + external keyboard_delegate : + 'data t -> + ( t_keyboard_delegate, + t_keyboard_delegate option Solidtype.Solid.accessor ) + either + option = "keyboardDelegate" + [@@mel.get] + (** A delegate that returns collection item keys with respect to visual + layout. *) + + external auto_focus : + 'data t -> + ( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + option = "autoFocus" + [@@mel.get] + (** Whether the collection or one of its items should be automatically focused + upon render. *) + + external defer_auto_focus : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "deferAutoFocus" + [@@mel.get] (** Whether the autofocus should run on next tick. *) - external defer_auto_focus : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "deferAutoFocus" [@@mel.get] + + external should_focus_wrap : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldFocusWrap" + [@@mel.get] (** Whether focus should wrap around when the end/start is reached. *) - external should_focus_wrap : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldFocusWrap" [@@mel.get] + + external disallow_empty_selection : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowEmptySelection" [@@mel.get] + + external select_on_focus : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "selectOnFocus" + [@@mel.get] (** Whether selection should occur automatically on focus. *) - external select_on_focus : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "selectOnFocus" [@@mel.get] + + external disallow_type_ahead : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowTypeAhead" + [@@mel.get] (** Whether typeahead is disabled. *) - external disallow_type_ahead : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowTypeAhead" [@@mel.get] - (** Whether the collection items should use virtual focus instead of being focused directly. *) - external should_use_virtual_focus : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldUseVirtualFocus" [@@mel.get] + + external should_use_virtual_focus : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldUseVirtualFocus" + [@@mel.get] + (** Whether the collection items should use virtual focus instead of being + focused directly. *) + + external allows_tab_navigation : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowsTabNavigation" + [@@mel.get] (** Whether navigation through tab key is enabled. *) - external allows_tab_navigation : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowsTabNavigation" [@@mel.get] + + external is_virtualized : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "isVirtualized" + [@@mel.get] (** Whether the option is contained in a virtual scroller. *) - external is_virtualized : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "isVirtualized" [@@mel.get] - (** When virtualized, the Virtualizer function used to scroll to the item of the key provided. *) - external scroll_to_key : 'data t -> (string -> unit, (string -> unit) option Solidtype.Solid.accessor) either option = "scrollToKey" [@@mel.get] + + external scroll_to_key : + 'data t -> + (string -> unit, (string -> unit) option Solidtype.Solid.accessor) either + option = "scrollToKey" + [@@mel.get] + (** When virtualized, the Virtualizer function used to scroll to the item of + the key provided. *) + + external orientation : + 'data t -> + ( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + option = "orientation" + [@@mel.get] (** The orientation of the selectable list. *) - external orientation : 'data t -> ([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either option = "orientation" [@@mel.get] - external make : collection:('data t_collection_node t_collection Solidtype.Solid.accessor [@mel.as "collection"]) -> selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> ?keyboard_delegate:((t_keyboard_delegate, t_keyboard_delegate option Solidtype.Solid.accessor) either [@mel.as "keyboardDelegate"]) -> ?auto_focus:(([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either [@mel.as "autoFocus"]) -> ?defer_auto_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "deferAutoFocus"]) -> ?should_focus_wrap:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldFocusWrap"]) -> ?disallow_empty_selection:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowEmptySelection"]) -> ?select_on_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "selectOnFocus"]) -> ?disallow_type_ahead:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowTypeAhead"]) -> ?should_use_virtual_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldUseVirtualFocus"]) -> ?allows_tab_navigation:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowsTabNavigation"]) -> ?is_virtualized:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "isVirtualized"]) -> ?scroll_to_key:((string -> unit, (string -> unit) option Solidtype.Solid.accessor) either [@mel.as "scrollToKey"]) -> ?orientation:(([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either [@mel.as "orientation"]) -> unit -> 'data t = "" [@@mel.obj] + + external make : + collection: + ('data t_collection_node t_collection Solidtype.Solid.accessor + [@mel.as "collection"]) -> + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + ?keyboard_delegate: + (( t_keyboard_delegate, + t_keyboard_delegate option Solidtype.Solid.accessor ) + either + [@mel.as "keyboardDelegate"]) -> + ?auto_focus: + (( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + [@mel.as "autoFocus"]) -> + ?defer_auto_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "deferAutoFocus"]) -> + ?should_focus_wrap: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldFocusWrap"]) -> + ?disallow_empty_selection: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowEmptySelection"]) -> + ?select_on_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "selectOnFocus"]) -> + ?disallow_type_ahead: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowTypeAhead"]) -> + ?should_use_virtual_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldUseVirtualFocus"]) -> + ?allows_tab_navigation: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowsTabNavigation"]) -> + ?is_virtualized: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "isVirtualized"]) -> + ?scroll_to_key: + ((string -> unit, (string -> unit) option Solidtype.Solid.accessor) either + [@mel.as "scrollToKey"]) -> + ?orientation: + (( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + [@mel.as "orientation"]) -> + unit -> + 'data t = "" + [@@mel.obj] end module Selection_CreateSelectableList = struct type t = t_selection_create_selectable_list - external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" [@@mel.get] - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" [@@mel.send] + + external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" + [@@mel.get] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" + [@@mel.send] + external on_focus_in : t -> Dom.focusEvent -> unit = "onFocusIn" [@@mel.send] - external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" [@@mel.send] - external make : tab_index:(float option Solidtype.Solid.accessor [@mel.as "tabIndex"]) -> on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> on_mouse_down:((Dom.mouseEvent -> unit) [@mel.as "onMouseDown"]) -> on_focus_in:((Dom.focusEvent -> unit) [@mel.as "onFocusIn"]) -> on_focus_out:((Dom.focusEvent -> unit) [@mel.as "onFocusOut"]) -> unit -> t = "" [@@mel.obj] + + external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" + [@@mel.send] + + external make : + tab_index:(float option Solidtype.Solid.accessor[@mel.as "tabIndex"]) -> + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> + on_mouse_down:((Dom.mouseEvent -> unit)[@mel.as "onMouseDown"]) -> + on_focus_in:((Dom.focusEvent -> unit)[@mel.as "onFocusIn"]) -> + on_focus_out:((Dom.focusEvent -> unit)[@mel.as "onFocusOut"]) -> + unit -> + t = "" + [@@mel.obj] end module CreateTypeSelectProps = struct type t = t_create_type_select_props + + external is_disabled : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "isDisabled" + [@@mel.get] (** Whether the type to select should be disabled. *) - external is_disabled : t -> (bool, bool option Solidtype.Solid.accessor) either option = "isDisabled" [@@mel.get] - (** A delegate that returns collection item keys with respect to visual layout. *) - external keyboard_delegate : t -> (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either = "keyboardDelegate" [@@mel.get] + + external keyboard_delegate : + t -> + (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either + = "keyboardDelegate" + [@@mel.get] + (** A delegate that returns collection item keys with respect to visual + layout. *) + + external selection_manager : + t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] - (** Called when an item is focused by typing. *) - external on_type_select : t -> (string -> unit) option = "onTypeSelect" [@@mel.get] - external make : ?is_disabled:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "isDisabled"]) -> keyboard_delegate:((t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either [@mel.as "keyboardDelegate"]) -> selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> ?on_type_select:((string -> unit) [@mel.as "onTypeSelect"]) -> unit -> t = "" [@@mel.obj] + + external on_type_select_js : t -> ((string -> unit)[@u]) option + = "onTypeSelect" + [@@mel.get] + + let on_type_select o = + match on_type_select_js o with + | None -> None + | Some f -> Some (fun x0 -> (f x0 [@u])) + + external make : + ?is_disabled: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "isDisabled"]) -> + keyboard_delegate: + (( t_keyboard_delegate, + t_keyboard_delegate Solidtype.Solid.accessor ) + either + [@mel.as "keyboardDelegate"]) -> + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + ?on_type_select:((string -> unit)[@mel.as "onTypeSelect"]) -> + unit -> + t = "" + [@@mel.obj] end module Selection_CreateTypeSelect = struct type t = t_selection_create_type_select - external type_select_handlers : t -> t_selection_create_type_select_type_select_handlers = "typeSelectHandlers" [@@mel.get] - external make : type_select_handlers:(t_selection_create_type_select_type_select_handlers [@mel.as "typeSelectHandlers"]) -> unit -> t = "" [@@mel.obj] + + external type_select_handlers : + t -> t_selection_create_type_select_type_select_handlers + = "typeSelectHandlers" + [@@mel.get] + + external make : + type_select_handlers: + (t_selection_create_type_select_type_select_handlers + [@mel.as "typeSelectHandlers"]) -> + unit -> + t = "" + [@@mel.obj] end module CheckboxDataSet = struct @@ -1583,34 +4925,168 @@ end module ColorChannelRange = struct type t = t_color_channel_range + + external min_value : t -> float = "minValue" + [@@mel.get] (** The minimum value of the color channel. *) - external min_value : t -> float = "minValue" [@@mel.get] + + external max_value : t -> float = "maxValue" + [@@mel.get] (** The maximum value of the color channel. *) - external max_value : t -> float = "maxValue" [@@mel.get] - (** The step value of the color channel, used when incrementing and decrementing. *) - external step : t -> float = "step" [@@mel.get] - (** The page step value of the color channel, used when incrementing and decrementing. *) - external page_size : t -> float = "pageSize" [@@mel.get] - external make : min_value:(float [@mel.as "minValue"]) -> max_value:(float [@mel.as "maxValue"]) -> step:(float [@mel.as "step"]) -> page_size:(float [@mel.as "pageSize"]) -> unit -> t = "" [@@mel.obj] -end -module Color_GetColorSpaceAxes = struct - type t = t_color_get_color_space_axes - external x_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] option = "xChannel" [@@mel.get] - external y_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] option = "yChannel" [@@mel.get] - external make : ?x_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "xChannel"]) -> ?y_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "yChannel"]) -> unit -> t = "" [@@mel.obj] + external step : t -> float = "step" + [@@mel.get] + (** The step value of the color channel, used when incrementing and + decrementing. *) + + external page_size : t -> float = "pageSize" + [@@mel.get] + (** The page step value of the color channel, used when incrementing and + decrementing. *) + + external make : + min_value:(float[@mel.as "minValue"]) -> + max_value:(float[@mel.as "maxValue"]) -> + step:(float[@mel.as "step"]) -> + page_size:(float[@mel.as "pageSize"]) -> + unit -> + t = "" + [@@mel.obj] +end + +module Color_GetColorSpaceAxes_XyChannels = struct + type t = t_color_get_color_space_axes_xy_channels + + external x_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + option = "xChannel" + [@@mel.get] + + external y_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + option = "yChannel" + [@@mel.get] + + external make : + ?x_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "xChannel"]) -> + ?y_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "yChannel"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorAxes = struct type t = t_color_axes - external x_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "xChannel" [@@mel.get] - external y_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "yChannel" [@@mel.get] - external z_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "zChannel" [@@mel.get] - external make : x_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "xChannel"]) -> y_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "yChannel"]) -> z_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "zChannel"]) -> unit -> t = "" [@@mel.obj] + + external x_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "xChannel" + [@@mel.get] + + external y_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "yChannel" + [@@mel.get] + + external z_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "zChannel" + [@@mel.get] + + external make : + x_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "xChannel"]) -> + y_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "yChannel"]) -> + z_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "zChannel"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorAreaState = struct type t = t_color_area_state + external value : t -> t_color Solidtype.Solid.accessor = "value" [@@mel.get] external set_value : t -> t_color -> unit = "setValue" [@@mel.send] external x_value : t -> float Solidtype.Solid.accessor = "xValue" [@@mel.get] @@ -1619,33 +5095,114 @@ module ColorAreaState = struct external set_y_value : t -> float -> unit = "setYValue" [@@mel.send] external x_step : t -> float Solidtype.Solid.accessor = "xStep" [@@mel.get] external y_step : t -> float Solidtype.Solid.accessor = "yStep" [@@mel.get] - external x_page_size : t -> float Solidtype.Solid.accessor = "xPageSize" [@@mel.get] - external y_page_size : t -> float Solidtype.Solid.accessor = "yPageSize" [@@mel.get] - external x_max_value : t -> float Solidtype.Solid.accessor = "xMaxValue" [@@mel.get] - external y_max_value : t -> float Solidtype.Solid.accessor = "yMaxValue" [@@mel.get] - external x_min_value : t -> float Solidtype.Solid.accessor = "xMinValue" [@@mel.get] - external y_min_value : t -> float Solidtype.Solid.accessor = "yMinValue" [@@mel.get] + + external x_page_size : t -> float Solidtype.Solid.accessor = "xPageSize" + [@@mel.get] + + external y_page_size : t -> float Solidtype.Solid.accessor = "yPageSize" + [@@mel.get] + + external x_max_value : t -> float Solidtype.Solid.accessor = "xMaxValue" + [@@mel.get] + + external y_max_value : t -> float Solidtype.Solid.accessor = "yMaxValue" + [@@mel.get] + + external x_min_value : t -> float Solidtype.Solid.accessor = "xMinValue" + [@@mel.get] + + external y_min_value : t -> float Solidtype.Solid.accessor = "yMinValue" + [@@mel.get] + external increment_x : t -> float -> unit = "incrementX" [@@mel.send] external increment_y : t -> float -> unit = "incrementY" [@@mel.send] external decrement_x : t -> float -> unit = "decrementX" [@@mel.send] external decrement_y : t -> float -> unit = "decrementY" [@@mel.send] - external get_thumb_position : t -> unit -> t_color_area_state_get_thumb_position = "getThumbPosition" [@@mel.send] - external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" [@@mel.get] + + external get_thumb_position : + t -> unit -> t_color_area_state_get_thumb_position = "getThumbPosition" + [@@mel.send] + + external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" + [@@mel.get] + external set_is_dragging : t -> bool -> unit = "setIsDragging" [@@mel.send] - external channels : t -> t_color_area_state_channels Solidtype.Solid.accessor = "channels" [@@mel.get] + + external channels : t -> t_color_area_state_channels Solidtype.Solid.accessor + = "channels" + [@@mel.get] + external reset_value : t -> unit -> unit = "resetValue" [@@mel.send] - external get_thumb_percent : t -> unit -> t_color_area_state_get_thumb_percent = "getThumbPercent" [@@mel.send] - external set_thumb_percent : t -> t_color_area_state_set_thumb_percent -> unit = "setThumbPercent" [@@mel.send] - external set_thumb_value : t -> t_color_area_state_set_thumb_value -> unit = "setThumbValue" [@@mel.send] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external make : value:(t_color Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:((t_color -> unit) [@mel.as "setValue"]) -> x_value:(float Solidtype.Solid.accessor [@mel.as "xValue"]) -> y_value:(float Solidtype.Solid.accessor [@mel.as "yValue"]) -> set_x_value:((float -> unit) [@mel.as "setXValue"]) -> set_y_value:((float -> unit) [@mel.as "setYValue"]) -> x_step:(float Solidtype.Solid.accessor [@mel.as "xStep"]) -> y_step:(float Solidtype.Solid.accessor [@mel.as "yStep"]) -> x_page_size:(float Solidtype.Solid.accessor [@mel.as "xPageSize"]) -> y_page_size:(float Solidtype.Solid.accessor [@mel.as "yPageSize"]) -> x_max_value:(float Solidtype.Solid.accessor [@mel.as "xMaxValue"]) -> y_max_value:(float Solidtype.Solid.accessor [@mel.as "yMaxValue"]) -> x_min_value:(float Solidtype.Solid.accessor [@mel.as "xMinValue"]) -> y_min_value:(float Solidtype.Solid.accessor [@mel.as "yMinValue"]) -> increment_x:((float -> unit) [@mel.as "incrementX"]) -> increment_y:((float -> unit) [@mel.as "incrementY"]) -> decrement_x:((float -> unit) [@mel.as "decrementX"]) -> decrement_y:((float -> unit) [@mel.as "decrementY"]) -> get_thumb_position:((unit -> t_color_area_state_get_thumb_position) [@mel.as "getThumbPosition"]) -> is_dragging:(bool Solidtype.Solid.accessor [@mel.as "isDragging"]) -> set_is_dragging:((bool -> unit) [@mel.as "setIsDragging"]) -> channels:(t_color_area_state_channels Solidtype.Solid.accessor [@mel.as "channels"]) -> reset_value:((unit -> unit) [@mel.as "resetValue"]) -> get_thumb_percent:((unit -> t_color_area_state_get_thumb_percent) [@mel.as "getThumbPercent"]) -> set_thumb_percent:((t_color_area_state_set_thumb_percent -> unit) [@mel.as "setThumbPercent"]) -> set_thumb_value:((t_color_area_state_set_thumb_value -> unit) [@mel.as "setThumbValue"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> unit -> t = "" [@@mel.obj] -end -module ColorAreaContextValue_OnDrag = struct - type t = t_color_area_context_value_on_drag + external get_thumb_percent : t -> unit -> t_color_area_state_get_thumb_percent + = "getThumbPercent" + [@@mel.send] + + external set_thumb_percent : + t -> t_color_area_state_set_thumb_percent_value -> unit = "setThumbPercent" + [@@mel.send] + + external set_thumb_value : + t -> t_color_area_state_set_thumb_value_value -> unit = "setThumbValue" + [@@mel.send] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external make : + value:(t_color Solidtype.Solid.accessor[@mel.as "value"]) -> + set_value:((t_color -> unit)[@mel.as "setValue"]) -> + x_value:(float Solidtype.Solid.accessor[@mel.as "xValue"]) -> + y_value:(float Solidtype.Solid.accessor[@mel.as "yValue"]) -> + set_x_value:((float -> unit)[@mel.as "setXValue"]) -> + set_y_value:((float -> unit)[@mel.as "setYValue"]) -> + x_step:(float Solidtype.Solid.accessor[@mel.as "xStep"]) -> + y_step:(float Solidtype.Solid.accessor[@mel.as "yStep"]) -> + x_page_size:(float Solidtype.Solid.accessor[@mel.as "xPageSize"]) -> + y_page_size:(float Solidtype.Solid.accessor[@mel.as "yPageSize"]) -> + x_max_value:(float Solidtype.Solid.accessor[@mel.as "xMaxValue"]) -> + y_max_value:(float Solidtype.Solid.accessor[@mel.as "yMaxValue"]) -> + x_min_value:(float Solidtype.Solid.accessor[@mel.as "xMinValue"]) -> + y_min_value:(float Solidtype.Solid.accessor[@mel.as "yMinValue"]) -> + increment_x:((float -> unit)[@mel.as "incrementX"]) -> + increment_y:((float -> unit)[@mel.as "incrementY"]) -> + decrement_x:((float -> unit)[@mel.as "decrementX"]) -> + decrement_y:((float -> unit)[@mel.as "decrementY"]) -> + get_thumb_position: + ((unit -> t_color_area_state_get_thumb_position) + [@mel.as "getThumbPosition"]) -> + is_dragging:(bool Solidtype.Solid.accessor[@mel.as "isDragging"]) -> + set_is_dragging:((bool -> unit)[@mel.as "setIsDragging"]) -> + channels: + (t_color_area_state_channels Solidtype.Solid.accessor[@mel.as "channels"]) -> + reset_value:((unit -> unit)[@mel.as "resetValue"]) -> + get_thumb_percent: + ((unit -> t_color_area_state_get_thumb_percent) + [@mel.as "getThumbPercent"]) -> + set_thumb_percent: + ((t_color_area_state_set_thumb_percent_value -> unit) + [@mel.as "setThumbPercent"]) -> + set_thumb_value: + ((t_color_area_state_set_thumb_value_value -> unit) + [@mel.as "setThumbValue"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + unit -> + t = "" + [@@mel.obj] +end + +module ColorAreaContextValue_OnDrag_Deltas = struct + type t = t_color_area_context_value_on_drag_deltas + external delta_x : t -> float = "deltaX" [@@mel.get] external delta_y : t -> float = "deltaY" [@@mel.get] - external make : delta_x:(float [@mel.as "deltaX"]) -> delta_y:(float [@mel.as "deltaY"]) -> unit -> t = "" [@@mel.obj] + + external make : + delta_x:(float[@mel.as "deltaX"]) -> + delta_y:(float[@mel.as "deltaY"]) -> + unit -> + t = "" + [@@mel.obj] end module BoundEventHandler = struct @@ -1654,53 +5211,121 @@ end module Context_Id = struct type t = t_context_id + external to_string : t -> unit -> string = "toString" [@@mel.send] external value_of : t -> unit -> t_context_id = "valueOf" [@@mel.send] + + external description : t -> string option = "description" + [@@mel.get] (** Expose the \[\[Description\]\] internal slot of a symbol directly. *) - external description : t -> string option = "description" [@@mel.get] end -(** Extend props to require a `children` prop with the specified type. - Use this for components where you need a specific child type, - typically a function that receives specific argument types. - Note that all JSX are of the type `JSX.Element`. *) +(** Extend props to require a `children` prop with the specified type. Use this + for components where you need a specific child type, typically a function + that receives specific argument types. Note that all JSX are of + the type `JSX.Element`. *) module FlowProps = struct type ('p, 'c) t = ('p, 'c) t_flow_props - external children : ('p, 'c) t -> Solidtype.Jsx.element = "children" [@@mel.get] - external make : value:('t [@mel.as "value"]) -> children:(Solidtype.Jsx.element [@mel.as "children"]) -> unit -> ('p, 'c) t = "" [@@mel.obj] + + external children : ('p, 'c) t -> Solidtype.Jsx.element = "children" + [@@mel.get] + + external make : + value:('t[@mel.as "value"]) -> + children:(Solidtype.Jsx.element[@mel.as "children"]) -> + unit -> + ('p, 'c) t = "" + [@@mel.obj] end -module Context_Provider = struct - type t = t_context_provider - external make : value:('t [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] +module Context_Provider_Props = struct + type t = t_context_provider_props + + external make : value:('t[@mel.as "value"]) -> unit -> t = "" [@@mel.obj] end module ColorWheelState = struct type t = t_color_wheel_state + external value : t -> t_color Solidtype.Solid.accessor = "value" [@@mel.get] external set_value : t -> t_color -> unit = "setValue" [@@mel.send] external hue : t -> float Solidtype.Solid.accessor = "hue" [@@mel.get] external set_hue : t -> float -> unit = "setHue" [@@mel.send] external step : t -> float Solidtype.Solid.accessor = "step" [@@mel.get] - external page_size : t -> float Solidtype.Solid.accessor = "pageSize" [@@mel.get] - external max_value : t -> float Solidtype.Solid.accessor = "maxValue" [@@mel.get] - external min_value : t -> float Solidtype.Solid.accessor = "minValue" [@@mel.get] + + external page_size : t -> float Solidtype.Solid.accessor = "pageSize" + [@@mel.get] + + external max_value : t -> float Solidtype.Solid.accessor = "maxValue" + [@@mel.get] + + external min_value : t -> float Solidtype.Solid.accessor = "minValue" + [@@mel.get] + external increment : t -> float -> unit = "increment" [@@mel.send] external decrement : t -> float -> unit = "decrement" [@@mel.send] - external get_thumb_position : t -> unit -> t_color_wheel_state_get_thumb_position = "getThumbPosition" [@@mel.send] - external set_thumb_value : t -> float -> float -> float -> unit = "setThumbValue" [@@mel.send] - external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" [@@mel.get] + + external get_thumb_position : + t -> unit -> t_color_wheel_state_get_thumb_position = "getThumbPosition" + [@@mel.send] + + external set_thumb_value : t -> float -> float -> float -> unit + = "setThumbValue" + [@@mel.send] + + external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" + [@@mel.get] + external set_is_dragging : t -> bool -> unit = "setIsDragging" [@@mel.send] external reset_value : t -> unit -> unit = "resetValue" [@@mel.send] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external make : value:(t_color Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:((t_color -> unit) [@mel.as "setValue"]) -> hue:(float Solidtype.Solid.accessor [@mel.as "hue"]) -> set_hue:((float -> unit) [@mel.as "setHue"]) -> step:(float Solidtype.Solid.accessor [@mel.as "step"]) -> page_size:(float Solidtype.Solid.accessor [@mel.as "pageSize"]) -> max_value:(float Solidtype.Solid.accessor [@mel.as "maxValue"]) -> min_value:(float Solidtype.Solid.accessor [@mel.as "minValue"]) -> increment:((float -> unit) [@mel.as "increment"]) -> decrement:((float -> unit) [@mel.as "decrement"]) -> get_thumb_position:((unit -> t_color_wheel_state_get_thumb_position) [@mel.as "getThumbPosition"]) -> set_thumb_value:((float -> float -> float -> unit) [@mel.as "setThumbValue"]) -> is_dragging:(bool Solidtype.Solid.accessor [@mel.as "isDragging"]) -> set_is_dragging:((bool -> unit) [@mel.as "setIsDragging"]) -> reset_value:((unit -> unit) [@mel.as "resetValue"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> unit -> t = "" [@@mel.obj] -end -module ColorWheelContextValue_OnDrag = struct - type t = t_color_wheel_context_value_on_drag + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external make_js : + value:(t_color Solidtype.Solid.accessor[@mel.as "value"]) -> + set_value:((t_color -> unit)[@mel.as "setValue"]) -> + hue:(float Solidtype.Solid.accessor[@mel.as "hue"]) -> + set_hue:((float -> unit)[@mel.as "setHue"]) -> + step:(float Solidtype.Solid.accessor[@mel.as "step"]) -> + page_size:(float Solidtype.Solid.accessor[@mel.as "pageSize"]) -> + max_value:(float Solidtype.Solid.accessor[@mel.as "maxValue"]) -> + min_value:(float Solidtype.Solid.accessor[@mel.as "minValue"]) -> + increment:((float -> unit)[@mel.as "increment"]) -> + decrement:((float -> unit)[@mel.as "decrement"]) -> + get_thumb_position: + ((unit -> t_color_wheel_state_get_thumb_position) + [@mel.as "getThumbPosition"]) -> + set_thumb_value:((float -> float -> float -> unit)[@mel.as "setThumbValue"]) -> + is_dragging:(bool Solidtype.Solid.accessor[@mel.as "isDragging"]) -> + set_is_dragging:((bool -> unit)[@mel.as "setIsDragging"]) -> + reset_value:((unit -> unit)[@mel.as "resetValue"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + unit -> + t = "" + [@@mel.obj] + + let make ~value ~set_value ~hue ~set_hue ~step ~page_size ~max_value + ~min_value ~increment ~decrement ~get_thumb_position ~set_thumb_value + ~is_dragging ~set_is_dragging ~reset_value ~is_disabled () = + make_js ~value ~set_value ~hue ~set_hue ~step ~page_size ~max_value + ~min_value ~increment ~decrement ~get_thumb_position + ~set_thumb_value:(fun x0 x1 x2 -> set_thumb_value x0 x1 x2) + ~is_dragging ~set_is_dragging ~reset_value ~is_disabled () +end + +module ColorWheelContextValue_OnDrag_Deltas = struct + type t = t_color_wheel_context_value_on_drag_deltas + external delta_x : t -> float = "deltaX" [@@mel.get] external delta_y : t -> float = "deltaY" [@@mel.get] - external make : delta_x:(float [@mel.as "deltaX"]) -> delta_y:(float [@mel.as "deltaY"]) -> unit -> t = "" [@@mel.obj] + + external make : + delta_x:(float[@mel.as "deltaX"]) -> + delta_y:(float[@mel.as "deltaY"]) -> + unit -> + t = "" + [@@mel.obj] end module ComboboxDataSet = struct @@ -1709,9 +5334,13 @@ end module ContextMenuContextValue_SetAnchorRect = struct type t = t_context_menu_context_value_set_anchor_rect + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module HoverCardDataSet = struct @@ -1720,6 +5349,7 @@ end module ResolvedDateTimeFormatOptions = struct type t = t_resolved_date_time_format_options + external locale : t -> string = "locale" [@@mel.get] external calendar : t -> string = "calendar" [@@mel.get] external numbering_system : t -> string = "numberingSystem" [@@mel.get] @@ -1735,57 +5365,172 @@ module ResolvedDateTimeFormatOptions = struct external second : t -> string option = "second" [@@mel.get] external time_zone_name : t -> string option = "timeZoneName" [@@mel.get] external format_matcher : t -> string option = "formatMatcher" [@@mel.get] - external date_style : t -> [ `long | `short | `full | `medium ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `long | `short | `full | `medium ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] - external fractional_second_digits : t -> float option = "fractionalSecondDigits" [@@mel.get] - external make : locale:(string [@mel.as "locale"]) -> calendar:(string [@mel.as "calendar"]) -> numbering_system:(string [@mel.as "numberingSystem"]) -> time_zone:(string [@mel.as "timeZone"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?weekday:(string [@mel.as "weekday"]) -> ?era:(string [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:(string [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?date_style:([ `long | `short | `full | `medium ] [@mel.as "dateStyle"]) -> ?time_style:([ `long | `short | `full | `medium ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?fractional_second_digits:(float [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + + external fractional_second_digits : t -> float option + = "fractionalSecondDigits" + [@@mel.get] + + external make : + locale:(string[@mel.as "locale"]) -> + calendar:(string[@mel.as "calendar"]) -> + numbering_system:(string[@mel.as "numberingSystem"]) -> + time_zone:(string[@mel.as "timeZone"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?weekday:(string[@mel.as "weekday"]) -> + ?era:(string[@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name:(string[@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?fractional_second_digits:(float[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end module DateTimeFormatPart = struct type t = t_date_time_format_part - external type_ : t -> [ `hour | `minute | `second | `dayPeriod | `day | `era | `literal | `month | `timeZoneName | `weekday | `year | `unknown | `fractionalSecond ] = "type" [@@mel.get] + + external type_ : + t -> + [ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] = "type" + [@@mel.get] + external value : t -> string = "value" [@@mel.get] - external make : type_:([ `hour | `minute | `second | `dayPeriod | `day | `era | `literal | `month | `timeZoneName | `weekday | `year | `unknown | `fractionalSecond ] [@mel.as "type"]) -> value:(string [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] -end -module DateTimeFormat_FormatRange = struct - type t = t_date_time_format_format_range - external to_string : t -> ?radix:float -> unit -> string = "toString" [@@mel.send] - external value_of : t -> unit -> t_date_time_format_format_range = "valueOf" [@@mel.send] + external make : + type_: + ([ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] + [@mel.as "type"]) -> + value:(string[@mel.as "value"]) -> + unit -> + t = "" + [@@mel.obj] end (** An interface for reading and updating multiple selection state. *) module SelectionManager = struct type t = t_selection_manager - external selection_mode : t -> unit -> [ `none | `single | `multiple ] = "selectionMode" [@@mel.send] - external disallow_empty_selection : t -> unit -> bool = "disallowEmptySelection" [@@mel.send] - external selection_behavior : t -> unit -> [ `toggle | `replace ] = "selectionBehavior" [@@mel.send] - external set_selection_behavior : t -> [ `toggle | `replace ] -> unit = "setSelectionBehavior" [@@mel.send] + + external selection_mode : t -> unit -> [ `multiple | `none | `single ] + = "selectionMode" + [@@mel.send] + + external disallow_empty_selection : t -> unit -> bool + = "disallowEmptySelection" + [@@mel.send] + + external selection_behavior : t -> unit -> [ `replace | `toggle ] + = "selectionBehavior" + [@@mel.send] + + external set_selection_behavior : t -> [ `replace | `toggle ] -> unit + = "setSelectionBehavior" + [@@mel.send] + external is_focused : t -> unit -> bool = "isFocused" [@@mel.send] external set_focused : t -> bool -> unit = "setFocused" [@@mel.send] external focused_key : t -> unit -> string option = "focusedKey" [@@mel.send] - external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" [@@mel.send] - external selected_keys : t -> unit -> string Js.Set.t = "selectedKeys" [@@mel.send] + + external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" + [@@mel.send] + + external selected_keys : t -> unit -> string Js.Set.t = "selectedKeys" + [@@mel.send] + external is_selected : t -> string -> bool = "isSelected" [@@mel.send] external is_empty : t -> unit -> bool = "isEmpty" [@@mel.send] external is_select_all : t -> unit -> bool = "isSelectAll" [@@mel.send] - external first_selected_key : t -> unit -> string option = "firstSelectedKey" [@@mel.send] - external last_selected_key : t -> unit -> string option = "lastSelectedKey" [@@mel.send] - external extend_selection : t -> string -> unit = "extendSelection" [@@mel.send] - external toggle_selection : t -> string -> unit = "toggleSelection" [@@mel.send] - external replace_selection : t -> string -> unit = "replaceSelection" [@@mel.send] - external set_selected_keys : t -> string array -> unit = "setSelectedKeys" [@@mel.send] + + external first_selected_key : t -> unit -> string option = "firstSelectedKey" + [@@mel.send] + + external last_selected_key : t -> unit -> string option = "lastSelectedKey" + [@@mel.send] + + external extend_selection : t -> string -> unit = "extendSelection" + [@@mel.send] + + external toggle_selection : t -> string -> unit = "toggleSelection" + [@@mel.send] + + external replace_selection : t -> string -> unit = "replaceSelection" + [@@mel.send] + + external set_selected_keys : t -> string array -> unit = "setSelectedKeys" + [@@mel.send] + external select_all : t -> unit -> unit = "selectAll" [@@mel.send] external clear_selection : t -> unit -> unit = "clearSelection" [@@mel.send] - external toggle_select_all : t -> unit -> unit = "toggleSelectAll" [@@mel.send] - external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit = "select" [@@mel.send] - external is_selection_equal : t -> string Js.Set.t -> bool = "isSelectionEqual" [@@mel.send] + + external toggle_select_all : t -> unit -> unit = "toggleSelectAll" + [@@mel.send] + + external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit + = "select" + [@@mel.send] + + external is_selection_equal : t -> string Js.Set.t -> bool + = "isSelectionEqual" + [@@mel.send] + external can_select_item : t -> string -> bool = "canSelectItem" [@@mel.send] external is_disabled : t -> string -> bool = "isDisabled" [@@mel.send] - external to_multiple_selection_manager : t -> t_multiple_selection_manager = "%identity" - external make : _ t_collection_node t_collection Solidtype.Solid.accessor -> t_multiple_selection_state -> t = "SelectionManager" [@@mel.new] [@@mel.module "@kobalte/core"] + + external to_multiple_selection_manager : t -> t_multiple_selection_manager + = "%identity" + + external make : + _ t_collection_node t_collection Solidtype.Solid.accessor -> + t_multiple_selection_state -> + t = "SelectionManager" + [@@mel.new] [@@mel.module "@kobalte/core"] end module MenubarDataSet = struct @@ -1818,52 +5563,130 @@ end module SliderState = struct type t = t_slider_state - external values : t -> float array Solidtype.Solid.accessor = "values" [@@mel.get] + + external values : t -> float array Solidtype.Solid.accessor = "values" + [@@mel.get] + external get_thumb_value : t -> float -> float = "getThumbValue" [@@mel.send] - external set_thumb_value : t -> float -> float -> unit = "setThumbValue" [@@mel.send] - external get_thumb_percent : t -> float -> float = "getThumbPercent" [@@mel.send] - external set_thumb_percent : t -> float -> float -> unit = "setThumbPercent" [@@mel.send] - external is_thumb_dragging : t -> float -> bool = "isThumbDragging" [@@mel.send] - external set_thumb_dragging : t -> float -> bool -> unit = "setThumbDragging" [@@mel.send] - external focused_thumb : t -> float option Solidtype.Solid.accessor = "focusedThumb" [@@mel.get] - external set_focused_thumb : t -> float option -> unit = "setFocusedThumb" [@@mel.send] - external get_value_percent : t -> float -> float = "getValuePercent" [@@mel.send] - external get_thumb_value_label : t -> float -> string = "getThumbValueLabel" [@@mel.send] - external get_formatted_value : t -> float -> string = "getFormattedValue" [@@mel.send] - external get_thumb_min_value : t -> float -> float = "getThumbMinValue" [@@mel.send] - external get_thumb_max_value : t -> float -> float = "getThumbMaxValue" [@@mel.send] - external get_percent_value : t -> float -> float = "getPercentValue" [@@mel.send] - external is_thumb_editable : t -> float -> bool = "isThumbEditable" [@@mel.send] - external set_thumb_editable : t -> float -> bool -> unit = "setThumbEditable" [@@mel.send] - external increment_thumb : t -> float -> ?step_size:float -> unit -> unit = "incrementThumb" [@@mel.send] - external decrement_thumb : t -> float -> ?step_size:float -> unit -> unit = "decrementThumb" [@@mel.send] + + external set_thumb_value : t -> float -> float -> unit = "setThumbValue" + [@@mel.send] + + external get_thumb_percent : t -> float -> float = "getThumbPercent" + [@@mel.send] + + external set_thumb_percent : t -> float -> float -> unit = "setThumbPercent" + [@@mel.send] + + external is_thumb_dragging : t -> float -> bool = "isThumbDragging" + [@@mel.send] + + external set_thumb_dragging : t -> float -> bool -> unit = "setThumbDragging" + [@@mel.send] + + external focused_thumb : t -> float option Solidtype.Solid.accessor + = "focusedThumb" + [@@mel.get] + + external set_focused_thumb : t -> float option -> unit = "setFocusedThumb" + [@@mel.send] + + external get_value_percent : t -> float -> float = "getValuePercent" + [@@mel.send] + + external get_thumb_value_label : t -> float -> string = "getThumbValueLabel" + [@@mel.send] + + external get_formatted_value : t -> float -> string = "getFormattedValue" + [@@mel.send] + + external get_thumb_min_value : t -> float -> float = "getThumbMinValue" + [@@mel.send] + + external get_thumb_max_value : t -> float -> float = "getThumbMaxValue" + [@@mel.send] + + external get_percent_value : t -> float -> float = "getPercentValue" + [@@mel.send] + + external is_thumb_editable : t -> float -> bool = "isThumbEditable" + [@@mel.send] + + external set_thumb_editable : t -> float -> bool -> unit = "setThumbEditable" + [@@mel.send] + + external increment_thumb : t -> float -> ?step_size:float -> unit -> unit + = "incrementThumb" + [@@mel.send] + + external decrement_thumb : t -> float -> ?step_size:float -> unit -> unit + = "decrementThumb" + [@@mel.send] + external step : t -> float Solidtype.Solid.accessor = "step" [@@mel.get] - external page_size : t -> float Solidtype.Solid.accessor = "pageSize" [@@mel.get] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external set_values : t -> (float array, float array -> float array) either -> unit = "setValues" [@@mel.send] + + external page_size : t -> float Solidtype.Solid.accessor = "pageSize" + [@@mel.get] + + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external set_values : + t -> (float array, float array -> float array) either -> unit = "setValues" + [@@mel.send] + external reset_values : t -> unit -> unit = "resetValues" [@@mel.send] end module CollectionItemWithRef = struct type t = t_collection_item_with_ref + + external type_ : t -> [ `item | `section ] = "type" + [@@mel.get] (** The type of the item. *) - external type_ : t -> [ `section | `item ] = "type" [@@mel.get] + + external key : t -> string = "key" + [@@mel.get] (** A unique key for the item. *) - external key : t -> string = "key" [@@mel.get] + + external text_value : t -> string = "textValue" + [@@mel.get] (** A string value for the item, used for features like typeahead. *) - external text_value : t -> string = "textValue" [@@mel.get] + + external disabled : t -> bool = "disabled" + [@@mel.get] (** Whether the item is disabled. *) - external disabled : t -> bool = "disabled" [@@mel.get] - external ref : t -> Dom.element option Solidtype.Solid.accessor = "ref" [@@mel.get] - external make : type_:([ `section | `item ] [@mel.as "type"]) -> key:(string [@mel.as "key"]) -> text_value:(string [@mel.as "textValue"]) -> disabled:(bool [@mel.as "disabled"]) -> ref:(Dom.element option Solidtype.Solid.accessor [@mel.as "ref"]) -> unit -> t = "" [@@mel.obj] + + external ref : t -> Dom.element option Solidtype.Solid.accessor = "ref" + [@@mel.get] + + external make : + type_:([ `item | `section ][@mel.as "type"]) -> + key:(string[@mel.as "key"]) -> + text_value:(string[@mel.as "textValue"]) -> + disabled:(bool[@mel.as "disabled"]) -> + ref:(Dom.element option Solidtype.Solid.accessor[@mel.as "ref"]) -> + unit -> + t = "" + [@@mel.obj] end -module SliderContextValue_OnSlideMove = struct - type t = t_slider_context_value_on_slide_move +module SliderContextValue_OnSlideMove_Deltas = struct + type t = t_slider_context_value_on_slide_move_deltas + external delta_x : t -> float = "deltaX" [@@mel.get] external delta_y : t -> float = "deltaY" [@@mel.get] - external make : delta_x:(float [@mel.as "deltaX"]) -> delta_y:(float [@mel.as "deltaY"]) -> unit -> t = "" [@@mel.obj] + + external make : + delta_x:(float[@mel.as "deltaX"]) -> + delta_y:(float[@mel.as "deltaY"]) -> + unit -> + t = "" + [@@mel.obj] end module SwitchDataSet = struct @@ -1872,49 +5695,96 @@ end module SingleSelectListState = struct type t = t_single_select_list_state + + external selected_item : + t -> t_unknown t_collection_node option Solidtype.Solid.accessor + = "selectedItem" + [@@mel.get] (** The value of the currently selected item. *) - external selected_item : t -> _ t_collection_node option Solidtype.Solid.accessor = "selectedItem" [@@mel.get] + + external selected_key : t -> string option Solidtype.Solid.accessor + = "selectedKey" + [@@mel.get] (** The key for the currently selected item. *) - external selected_key : t -> string option Solidtype.Solid.accessor = "selectedKey" [@@mel.get] - external set_selected_key : t -> string -> unit = "setSelectedKey" [@@mel.send] + + external set_selected_key : t -> string -> unit = "setSelectedKey" + [@@mel.send] + + external collection : + t -> t_unknown t_collection_node t_collection Solidtype.Solid.accessor + = "collection" + [@@mel.get] (** A collection of items in the list. *) - external collection : t -> _ t_collection_node t_collection Solidtype.Solid.accessor = "collection" [@@mel.get] + + external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor + = "selectionManager" + [@@mel.get] (** A selection manager to read and update multiple selection state. *) - external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor = "selectionManager" [@@mel.get] end module SwipeEvent_Detail = struct type t = t_swipe_event_detail + external original_event : t -> Dom.pointerEvent = "originalEvent" [@@mel.get] external delta : t -> t_swipe_event_detail_delta = "delta" [@@mel.get] - external make : original_event:(Dom.pointerEvent [@mel.as "originalEvent"]) -> delta:(t_swipe_event_detail_delta [@mel.as "delta"]) -> unit -> t = "" [@@mel.obj] + + external make : + original_event:(Dom.pointerEvent[@mel.as "originalEvent"]) -> + delta:(t_swipe_event_detail_delta[@mel.as "delta"]) -> + unit -> + t = "" + [@@mel.obj] end module ToastComponentProps = struct type t = t_toast_component_props + + external toast_id : t -> float = "toastId" + [@@mel.get] (** A unique id for the toast. *) - external toast_id : t -> float = "toastId" [@@mel.get] - external make : toast_id:(float [@mel.as "toastId"]) -> unit -> t = "" [@@mel.obj] + + external make : toast_id:(float[@mel.as "toastId"]) -> unit -> t = "" + [@@mel.obj] end module ShowToastOptions = struct type t = t_show_toast_options + + external region : t -> string option = "region" + [@@mel.get] (** The id of the `` to display the toast in. *) - external region : t -> string option = "region" [@@mel.get] - external make : ?region:(string [@mel.as "region"]) -> unit -> t = "" [@@mel.obj] + + external make : ?region:(string[@mel.as "region"]) -> unit -> t = "" + [@@mel.obj] end module ToastPromiseComponentProps = struct type ('t, 'u) t = ('t, 'u) t_toast_promise_component_props + + external state : ('t, 'u) t -> [ `fulfilled | `pending | `rejected ] = "state" + [@@mel.get] (** The state of the promise. *) - external state : ('t, 'u) t -> [ `pending | `fulfilled | `rejected ] = "state" [@@mel.get] + + external data : ('t, 'u) t -> 't option = "data" + [@@mel.get] (** The resolved data of the promise when fulfilled. *) - external data : ('t, 'u) t -> 't option = "data" [@@mel.get] + + external error : ('t, 'u) t -> 'u option = "error" + [@@mel.get] (** The error of the promise when rejected. *) - external error : ('t, 'u) t -> 'u option = "error" [@@mel.get] + + external toast_id : ('t, 'u) t -> float = "toastId" + [@@mel.get] (** A unique id for the toast. *) - external toast_id : ('t, 'u) t -> float = "toastId" [@@mel.get] - external make : state:([ `pending | `fulfilled | `rejected ] [@mel.as "state"]) -> ?data:('t [@mel.as "data"]) -> ?error:('u [@mel.as "error"]) -> toast_id:(float [@mel.as "toastId"]) -> unit -> ('t, 'u) t = "" [@@mel.obj] + + external make : + state:([ `fulfilled | `pending | `rejected ][@mel.as "state"]) -> + ?data:('t[@mel.as "data"]) -> + ?error:('u[@mel.as "error"]) -> + toast_id:(float[@mel.as "toastId"]) -> + unit -> + ('t, 'u) t = "" + [@@mel.obj] end module TooltipDataSet = struct @@ -1923,122 +5793,302 @@ end module MultipleSelectionManager = struct type t = t_multiple_selection_manager + + external selection_mode : + t -> [ `multiple | `none | `single ] Solidtype.Solid.accessor + = "selectionMode" + [@@mel.get] (** The type of selection that is allowed in the collection. *) - external selection_mode : t -> [ `none | `single | `multiple ] Solidtype.Solid.accessor = "selectionMode" [@@mel.get] + + external selection_behavior : + t -> [ `replace | `toggle ] Solidtype.Solid.accessor = "selectionBehavior" + [@@mel.get] (** The selection behavior for the collection. *) - external selection_behavior : t -> [ `toggle | `replace ] Solidtype.Solid.accessor = "selectionBehavior" [@@mel.get] + + external disallow_empty_selection : t -> bool option Solidtype.Solid.accessor + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : t -> bool option Solidtype.Solid.accessor = "disallowEmptySelection" [@@mel.get] + + external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor + = "selectedKeys" + [@@mel.get] (** The currently selected keys in the collection. *) - external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor = "selectedKeys" [@@mel.get] + + external is_empty : t -> bool Solidtype.Solid.accessor = "isEmpty" + [@@mel.get] (** Whether the selection is empty. *) - external is_empty : t -> bool Solidtype.Solid.accessor = "isEmpty" [@@mel.get] + + external is_select_all : t -> bool Solidtype.Solid.accessor = "isSelectAll" + [@@mel.get] (** Whether all items in the collection are selected. *) - external is_select_all : t -> bool Solidtype.Solid.accessor = "isSelectAll" [@@mel.get] + + external first_selected_key : t -> string option Solidtype.Solid.accessor + = "firstSelectedKey" + [@@mel.get] (** The first selected key in the collection. *) - external first_selected_key : t -> string option Solidtype.Solid.accessor = "firstSelectedKey" [@@mel.get] + + external last_selected_key : t -> string option Solidtype.Solid.accessor + = "lastSelectedKey" + [@@mel.get] (** The last selected key in the collection. *) - external last_selected_key : t -> string option Solidtype.Solid.accessor = "lastSelectedKey" [@@mel.get] + + external is_selected : t -> string -> bool = "isSelected" + [@@mel.send] (** Returns whether a key is selected. *) - external is_selected : t -> string -> bool = "isSelected" [@@mel.send] - external is_selection_equal : t -> string Js.Set.t -> bool = "isSelectionEqual" [@@mel.send] - external extend_selection : t -> string -> unit = "extendSelection" [@@mel.send] + + external is_selection_equal : t -> string Js.Set.t -> bool + = "isSelectionEqual" + [@@mel.send] + + external extend_selection : t -> string -> unit = "extendSelection" + [@@mel.send] + + external toggle_selection : t -> string -> unit = "toggleSelection" + [@@mel.send] (** Toggles whether the given key is selected. *) - external toggle_selection : t -> string -> unit = "toggleSelection" [@@mel.send] + + external replace_selection : t -> string -> unit = "replaceSelection" + [@@mel.send] (** Replaces the selection with only the given key. *) - external replace_selection : t -> string -> unit = "replaceSelection" [@@mel.send] - external set_selected_keys : t -> string array -> unit = "setSelectedKeys" [@@mel.send] + + external set_selected_keys : t -> string array -> unit = "setSelectedKeys" + [@@mel.send] + external select_all : t -> unit -> unit = "selectAll" [@@mel.send] external clear_selection : t -> unit -> unit = "clearSelection" [@@mel.send] - external toggle_select_all : t -> unit -> unit = "toggleSelectAll" [@@mel.send] - external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit = "select" [@@mel.send] + + external toggle_select_all : t -> unit -> unit = "toggleSelectAll" + [@@mel.send] + + external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit + = "select" + [@@mel.send] + + external can_select_item : t -> string -> bool = "canSelectItem" + [@@mel.send] (** Returns whether the given key can be selected. *) - external can_select_item : t -> string -> bool = "canSelectItem" [@@mel.send] - (** Returns whether the given key is non-interactive, - i.e. both selection and actions are disabled. *) - external is_disabled : t -> string -> bool = "isDisabled" [@@mel.send] + + external is_disabled : t -> string -> bool = "isDisabled" + [@@mel.send] + (** Returns whether the given key is non-interactive, i.e. both selection and + actions are disabled. *) + + external set_selection_behavior : t -> [ `replace | `toggle ] -> unit + = "setSelectionBehavior" + [@@mel.send] (** Sets the selection behavior for the collection. *) - external set_selection_behavior : t -> [ `toggle | `replace ] -> unit = "setSelectionBehavior" [@@mel.send] + + external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" + [@@mel.get] (** Whether the collection is currently focused. *) - external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" [@@mel.get] + + external focused_key : t -> string option Solidtype.Solid.accessor + = "focusedKey" + [@@mel.get] (** The current focused key in the collection. *) - external focused_key : t -> string option Solidtype.Solid.accessor = "focusedKey" [@@mel.get] + external set_focused : t -> bool -> unit = "setFocused" [@@mel.send] - external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" [@@mel.send] + + external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" + [@@mel.send] end module Selection_CreateTypeSelect_TypeSelectHandlers = struct type t = t_selection_create_type_select_type_select_handlers - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external make : on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> unit -> t = "" [@@mel.obj] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external make : + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> unit -> t + = "" + [@@mel.obj] end module ColorAreaState_GetThumbPosition = struct type t = t_color_area_state_get_thumb_position + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module ColorAreaState_Channels = struct type t = t_color_area_state_channels - external x_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "xChannel" [@@mel.get] - external y_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "yChannel" [@@mel.get] - external z_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "zChannel" [@@mel.get] - external make : x_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "xChannel"]) -> y_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "yChannel"]) -> z_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "zChannel"]) -> unit -> t = "" [@@mel.obj] + + external x_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "xChannel" + [@@mel.get] + + external y_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "yChannel" + [@@mel.get] + + external z_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "zChannel" + [@@mel.get] + + external make : + x_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "xChannel"]) -> + y_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "yChannel"]) -> + z_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "zChannel"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorAreaState_GetThumbPercent = struct type t = t_color_area_state_get_thumb_percent + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end -module ColorAreaState_SetThumbPercent = struct - type t = t_color_area_state_set_thumb_percent +module ColorAreaState_SetThumbPercent_Value = struct + type t = t_color_area_state_set_thumb_percent_value + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end -module ColorAreaState_SetThumbValue = struct - type t = t_color_area_state_set_thumb_value +module ColorAreaState_SetThumbValue_Value = struct + type t = t_color_area_state_set_thumb_value_value + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module ColorWheelState_GetThumbPosition = struct type t = t_color_wheel_state_get_thumb_position + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module MultipleSelectionState = struct type t = t_multiple_selection_state + + external selection_mode : + t -> [ `multiple | `none | `single ] Solidtype.Solid.accessor + = "selectionMode" + [@@mel.get] (** The type of selection that is allowed in the collection. *) - external selection_mode : t -> [ `none | `single | `multiple ] Solidtype.Solid.accessor = "selectionMode" [@@mel.get] + + external selection_behavior : + t -> [ `replace | `toggle ] Solidtype.Solid.accessor = "selectionBehavior" + [@@mel.get] (** The selection behavior for the collection. *) - external selection_behavior : t -> [ `toggle | `replace ] Solidtype.Solid.accessor = "selectionBehavior" [@@mel.get] - external set_selection_behavior : t -> [ `toggle | `replace ] -> unit = "setSelectionBehavior" [@@mel.send] + + external set_selection_behavior : t -> [ `replace | `toggle ] -> unit + = "setSelectionBehavior" + [@@mel.send] + + external disallow_empty_selection : t -> bool Solidtype.Solid.accessor + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : t -> bool Solidtype.Solid.accessor = "disallowEmptySelection" [@@mel.get] + + external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor + = "selectedKeys" + [@@mel.get] (** The currently selected keys in the collection. *) - external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor = "selectedKeys" [@@mel.get] - external set_selected_keys : t -> string Js.Set.t -> unit = "setSelectedKeys" [@@mel.send] + + external set_selected_keys : t -> string Js.Set.t -> unit = "setSelectedKeys" + [@@mel.send] + + external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" + [@@mel.get] (** Whether the collection is currently focused. *) - external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" [@@mel.get] + + external focused_key : t -> string option Solidtype.Solid.accessor + = "focusedKey" + [@@mel.get] (** The current focused key in the collection. *) - external focused_key : t -> string option Solidtype.Solid.accessor = "focusedKey" [@@mel.get] + external set_focused : t -> bool -> unit = "setFocused" [@@mel.send] - external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" [@@mel.send] + + external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" + [@@mel.send] end module SwipeEvent_Detail_Delta = struct type t = t_swipe_event_detail_delta + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end diff --git a/kobalte/types.mli b/kobalte/types.mli index e6f9b610..2f5a5e4e 100644 --- a/kobalte/types.mli +++ b/kobalte/types.mli @@ -4,8 +4,8 @@ (* Members of different JavaScript kinds, each as it is. *) type ('a, 'b) either +type t_unknown type t_array_buffer -type t_big_int_to_locale_string_options type t_blob type t_number_format_part type t_readable_stream @@ -13,8 +13,6 @@ type t_resolved_collator_options type t_resolved_number_format_options type t_uint8_array type t_accordion_context_value -type t_alert_dialog_portal_ref_element_ -type t_alert_dialog_portal_ref_element_2 type t_alert_dialog_root_translations type t_breadcrumbs_root_translations type t_breadcrumbs_context_value @@ -64,11 +62,11 @@ type t_image_context_value type t_list_state type t_listbox_context_value type t_menubar_context_value -type t_get_value_label_params +type t_meter_get_value_label_params type t_meter_context_value type t_navigation_menu_context_value type t_number_field_context_value -type t_pagination_root_item_component +type t_pagination_root_item_component_props type t_pagination_context_value type t_popover_root_translations type t_popover_context_value @@ -81,7 +79,7 @@ type 't t_select_base_item_component_props type 't t_select_base_section_component_props type 'option t_select_value_state type t_select_context_value -type t_get_value_label_params2 +type t_slider_get_value_label_params type t_slider_context_value type t_switch_root_state type t_switch_context_value @@ -110,22 +108,21 @@ type t_selection_create_type_select type t_checkbox_data_set type t_collapsible_data_set type t_color_channel_range -type t_color_get_color_space_axes +type t_color_get_color_space_axes_xy_channels type t_color_axes type t_color_area_state -type t_color_area_context_value_on_drag +type t_color_area_context_value_on_drag_deltas type ('t, 'e, 'e_handler) t_bound_event_handler type t_context_id type ('p, 'c) t_flow_props -type t_context_provider +type t_context_provider_props type t_color_wheel_state -type t_color_wheel_context_value_on_drag +type t_color_wheel_context_value_on_drag_deltas type t_combobox_data_set type t_context_menu_context_value_set_anchor_rect type t_hover_card_data_set type t_resolved_date_time_format_options type t_date_time_format_part -type t_date_time_format_format_range type t_selection_manager type t_menubar_data_set type t_meter_data_set @@ -136,7 +133,7 @@ type t_select_data_set type t_slider_data_set type t_slider_state type t_collection_item_with_ref -type t_slider_context_value_on_slide_move +type t_slider_context_value_on_slide_move_deltas type t_switch_data_set type t_single_select_list_state type t_swipe_event_detail @@ -149,8 +146,8 @@ type t_selection_create_type_select_type_select_handlers type t_color_area_state_get_thumb_position type t_color_area_state_channels type t_color_area_state_get_thumb_percent -type t_color_area_state_set_thumb_percent -type t_color_area_state_set_thumb_value +type t_color_area_state_set_thumb_percent_value +type t_color_area_state_set_thumb_value_value type t_color_wheel_state_get_thumb_position type t_multiple_selection_state type t_swipe_event_detail_delta @@ -162,16 +159,16 @@ module Either : sig external right : 'b -> ('a, 'b) t = "%identity" end +(* What TypeScript types any, read from JavaScript: nothing reads it, since a type its reader chose would be an unchecked cast. *) +module Unknown : sig + type t = t_unknown +end + (* The standard library's ArrayBuffer, opaque. *) module ArrayBuffer : sig type t = t_array_buffer end -(* The standard library's BigIntToLocaleStringOptions, opaque. *) -module BigIntToLocaleStringOptions : sig - type t = t_big_int_to_locale_string_options -end - (* The standard library's Blob, opaque. *) module Blob : sig type t = t_blob @@ -204,187 +201,549 @@ end module AccordionContextValue : sig type t = t_accordion_context_value - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external generate_id : t -> string -> string = "generateId" [@@mel.send] - external make : list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> unit -> t = "" [@@mel.obj] -end -module AlertDialog_Portal_Ref_element_ : sig - type t = t_alert_dialog_portal_ref_element_ - (** The `Element.shadowRoot` read-only property represents the shadow root hosted by the element. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) *) - external shadow_root : t -> Dom.shadowRoot = "shadowRoot" [@@mel.get] - external to_element : t -> Dom.element = "%identity" -end + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + + external generate_id : t -> string -> string = "generateId" [@@mel.send] -module AlertDialog_Portal_Ref_element_2 : sig - type t = t_alert_dialog_portal_ref_element_2 - (** The `Element.shadowRoot` read-only property represents the shadow root hosted by the element. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Element/shadowRoot) *) - external shadow_root : t -> Dom.shadowRoot = "shadowRoot" [@@mel.get] - external to_html_div_element : t -> Dom.htmlDivElement = "%identity" + external make : + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + unit -> + t = "" + [@@mel.obj] end module AlertDialog_Root_Translations : sig type t = t_alert_dialog_root_translations + external dismiss : t -> string = "dismiss" [@@mel.get] - external make : dismiss:(string [@mel.as "dismiss"]) -> unit -> t = "" [@@mel.obj] + + external make : dismiss:(string[@mel.as "dismiss"]) -> unit -> t = "" + [@@mel.obj] end module Breadcrumbs_Root_Translations : sig type t = t_breadcrumbs_root_translations + external breadcrumbs : t -> string = "breadcrumbs" [@@mel.get] - external make : breadcrumbs:(string [@mel.as "breadcrumbs"]) -> unit -> t = "" [@@mel.obj] + + external make : breadcrumbs:(string[@mel.as "breadcrumbs"]) -> unit -> t = "" + [@@mel.obj] end module BreadcrumbsContextValue : sig type t = t_breadcrumbs_context_value - external separator : t -> unit -> Solidtype.Jsx.element = "separator" [@@mel.send] - external make : separator:((unit -> Solidtype.Jsx.element) [@mel.as "separator"]) -> unit -> t = "" [@@mel.obj] + + external separator : t -> unit -> Solidtype.Jsx.element = "separator" + [@@mel.send] + + external make : + separator:((unit -> Solidtype.Jsx.element)[@mel.as "separator"]) -> + unit -> + t = "" + [@@mel.obj] end module CheckboxRootState : sig type t = t_checkbox_root_state + + external checked : t -> bool Solidtype.Solid.accessor = "checked" + [@@mel.get] (** Whether the checkbox is checked or not. *) - external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] + + external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" + [@@mel.get] (** Whether the checkbox is in an indeterminate state. *) - external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" [@@mel.get] - external make : checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> indeterminate:(bool Solidtype.Solid.accessor [@mel.as "indeterminate"]) -> unit -> t = "" [@@mel.obj] + + external make : + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> + indeterminate:(bool Solidtype.Solid.accessor[@mel.as "indeterminate"]) -> + unit -> + t = "" + [@@mel.obj] end module CheckboxContextValue : sig type t = t_checkbox_context_value + external value : t -> string Solidtype.Solid.accessor = "value" [@@mel.get] - external dataset : t -> t_checkbox_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_checkbox_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] - external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] + + external indeterminate : t -> bool Solidtype.Solid.accessor = "indeterminate" + [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] external set_is_checked : t -> bool -> unit = "setIsChecked" [@@mel.send] external set_is_focused : t -> bool -> unit = "setIsFocused" [@@mel.send] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external make : value:(string Solidtype.Solid.accessor [@mel.as "value"]) -> dataset:(t_checkbox_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> indeterminate:(bool Solidtype.Solid.accessor [@mel.as "indeterminate"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> set_is_checked:((bool -> unit) [@mel.as "setIsChecked"]) -> set_is_focused:((bool -> unit) [@mel.as "setIsFocused"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> unit -> t = "" [@@mel.obj] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external make : + value:(string Solidtype.Solid.accessor[@mel.as "value"]) -> + dataset:(t_checkbox_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> + indeterminate:(bool Solidtype.Solid.accessor[@mel.as "indeterminate"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + set_is_checked:((bool -> unit)[@mel.as "setIsChecked"]) -> + set_is_focused:((bool -> unit)[@mel.as "setIsFocused"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + unit -> + t = "" + [@@mel.obj] end module CollapsibleContextValue : sig type t = t_collapsible_context_value - external dataset : t -> t_collapsible_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_collapsible_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external disabled : t -> bool Solidtype.Solid.accessor = "disabled" [@@mel.get] - external should_mount : t -> bool Solidtype.Solid.accessor = "shouldMount" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] + + external disabled : t -> bool Solidtype.Solid.accessor = "disabled" + [@@mel.get] + + external should_mount : t -> bool Solidtype.Solid.accessor = "shouldMount" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + external toggle : t -> unit -> unit = "toggle" [@@mel.send] external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_content_id : t -> string -> (unit -> unit) - val make : dataset:t_collapsible_data_set Solidtype.Solid.accessor -> is_open:bool Solidtype.Solid.accessor -> disabled:bool Solidtype.Solid.accessor -> should_mount:bool Solidtype.Solid.accessor -> content_id:string option Solidtype.Solid.accessor -> toggle:(unit -> unit) -> generate_id:(string -> string) -> register_content_id:(string -> (unit -> unit)) -> unit -> t + val register_content_id : t -> string -> unit -> unit + + val make : + dataset:t_collapsible_data_set Solidtype.Solid.accessor -> + is_open:bool Solidtype.Solid.accessor -> + disabled:bool Solidtype.Solid.accessor -> + should_mount:bool Solidtype.Solid.accessor -> + content_id:string option Solidtype.Solid.accessor -> + toggle:(unit -> unit) -> + generate_id:(string -> string) -> + register_content_id:(string -> unit -> unit) -> + unit -> + t end module ColorArea_Root_Translations : sig type t = t_color_area_root_translations + external color_picker : t -> string = "colorPicker" [@@mel.get] - external two_dimensional_slider : t -> string = "twoDimensionalSlider" [@@mel.get] - external make : color_picker:(string [@mel.as "colorPicker"]) -> two_dimensional_slider:(string [@mel.as "twoDimensionalSlider"]) -> unit -> t = "" [@@mel.obj] + + external two_dimensional_slider : t -> string = "twoDimensionalSlider" + [@@mel.get] + + external make : + color_picker:(string[@mel.as "colorPicker"]) -> + two_dimensional_slider:(string[@mel.as "twoDimensionalSlider"]) -> + unit -> + t = "" + [@@mel.obj] end (** Represents a color value. *) module Color : sig type t = t_color - (** Converts the color to the given color format, and returns a new Color object. - + + val to_format : + t -> + [ `hex | `hexa | `hsb | `hsba | `hsl | `hsla | `rgb | `rgba ] -> + t_color + (** Converts the color to the given color format, and returns a new Color + object. + Raises [Invalid_argument] with Kobalte's message, where it throws. *) - val to_format : t -> [ `rgb | `hsl | `hsb | `hex | `hexa | `rgba | `hsla | `hsba ] -> t_color - val to_format_opt : t -> [ `rgb | `hsl | `hsb | `hex | `hexa | `rgba | `hsla | `hsba ] -> t_color option - external to_string : t -> ?format:[ `rgb | `hsl | `hsb | `hex | `hexa | `rgba | `hsla | `hsba | `css ] -> unit -> string = "toString" [@@mel.send] + + val to_format_opt : + t -> + [ `hex | `hexa | `hsb | `hsba | `hsl | `hsla | `rgb | `rgba ] -> + t_color option + + external to_string : + t -> + ?format:[ `css | `hex | `hexa | `hsb | `hsba | `hsl | `hsla | `rgb | `rgba ] -> + unit -> + string = "toString" + [@@mel.send] + external clone : t -> unit -> t_color = "clone" [@@mel.send] external to_hex_int : t -> unit -> float = "toHexInt" [@@mel.send] - (** Returns the numeric value for a given channel. - Throws an error if the channel is unsupported in the current color format. - + + val get_channel_value : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + float + (** Returns the numeric value for a given channel. Throws an error if the + channel is unsupported in the current color format. + Raises [Invalid_argument] with Kobalte's message, where it throws. *) - val get_channel_value : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> float - val get_channel_value_opt : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> float option - (** Sets the numeric value for a given channel, and returns a new Color object. - Throws an error if the channel is unsupported in the current color format. - + + val get_channel_value_opt : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + float option + + val with_channel_value : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + float -> + t_color + (** Sets the numeric value for a given channel, and returns a new Color + object. Throws an error if the channel is unsupported in the current color + format. + Raises [Invalid_argument] with Kobalte's message, where it throws. *) - val with_channel_value : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> float -> t_color - val with_channel_value_opt : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> float -> t_color option - external get_channel_range : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> t_color_channel_range = "getChannelRange" [@@mel.send] - external get_channel_name : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> t_color_slider_root_translations -> string = "getChannelName" [@@mel.send] - external get_channel_format_options : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> t_number_format_options = "getChannelFormatOptions" [@@mel.send] - external format_channel_value : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] -> string = "formatChannelValue" [@@mel.send] - external get_color_space : t -> unit -> [ `rgb | `hsl | `hsb ] = "getColorSpace" [@@mel.send] - external get_color_space_axes : t -> t_color_get_color_space_axes -> t_color_axes = "getColorSpaceAxes" [@@mel.send] - external get_color_channels : t -> unit -> ([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] * [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ]) = "getColorChannels" [@@mel.send] - external get_color_name : t -> t_color_slider_root_translations -> string = "getColorName" [@@mel.send] - external get_hue_name : t -> t_color_slider_root_translations -> string = "getHueName" [@@mel.send] + + val with_channel_value_opt : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + float -> + t_color option + + external get_channel_range : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + t_color_channel_range = "getChannelRange" + [@@mel.send] + + external get_channel_name : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + t_color_slider_root_translations -> + string = "getChannelName" + [@@mel.send] + + external get_channel_format_options : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + t_number_format_options = "getChannelFormatOptions" + [@@mel.send] + + external format_channel_value : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] -> + string = "formatChannelValue" + [@@mel.send] + + external get_color_space : t -> unit -> [ `hsb | `hsl | `rgb ] + = "getColorSpace" + [@@mel.send] + + external get_color_space_axes : + t -> t_color_get_color_space_axes_xy_channels -> t_color_axes + = "getColorSpaceAxes" + [@@mel.send] + + external get_color_channels : + t -> + unit -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + * [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "getColorChannels" + [@@mel.send] + + external get_color_name : t -> t_color_slider_root_translations -> string + = "getColorName" + [@@mel.send] + + external get_hue_name : t -> t_color_slider_root_translations -> string + = "getHueName" + [@@mel.send] end module ColorAreaContextValue : sig type t = t_color_area_context_value + external state : t -> t_color_area_state = "state" [@@mel.get] - external x_name : t -> string option Solidtype.Solid.accessor = "xName" [@@mel.get] - external y_name : t -> string option Solidtype.Solid.accessor = "yName" [@@mel.get] - external on_drag_start : t -> (float array -> unit) option = "onDragStart" [@@mel.get] - external on_drag : t -> (t_color_area_context_value_on_drag -> unit) option = "onDrag" [@@mel.get] + + external x_name : t -> string option Solidtype.Solid.accessor = "xName" + [@@mel.get] + + external y_name : t -> string option Solidtype.Solid.accessor = "yName" + [@@mel.get] + + external on_drag_start : t -> (float array -> unit) option = "onDragStart" + [@@mel.get] + + external on_drag : + t -> (t_color_area_context_value_on_drag_deltas -> unit) option = "onDrag" + [@@mel.get] + external on_drag_end : t -> (unit -> unit) option = "onDragEnd" [@@mel.get] - external translations : t -> t_color_area_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external get_display_color : t -> unit -> t_color = "getDisplayColor" [@@mel.send] - external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" [@@mel.send] - external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "thumbRef" [@@mel.get] - external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" [@@mel.send] - external background_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "backgroundRef" [@@mel.get] - external set_background_ref : t -> Dom.htmlElement -> unit = "setBackgroundRef" [@@mel.send] + + external translations : + t -> t_color_area_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external get_display_color : t -> unit -> t_color = "getDisplayColor" + [@@mel.send] + + external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" + [@@mel.send] + + external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "thumbRef" + [@@mel.get] + + external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" + [@@mel.send] + + external background_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "backgroundRef" + [@@mel.get] + + external set_background_ref : t -> Dom.htmlElement -> unit + = "setBackgroundRef" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external make : state:(t_color_area_state [@mel.as "state"]) -> x_name:(string option Solidtype.Solid.accessor [@mel.as "xName"]) -> y_name:(string option Solidtype.Solid.accessor [@mel.as "yName"]) -> on_drag_start:((float array -> unit) option [@mel.as "onDragStart"]) -> on_drag:((t_color_area_context_value_on_drag -> unit) option [@mel.as "onDrag"]) -> on_drag_end:((unit -> unit) option [@mel.as "onDragEnd"]) -> translations:(t_color_area_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> get_display_color:((unit -> t_color) [@mel.as "getDisplayColor"]) -> on_step_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onStepKeyDown"]) -> thumb_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "thumbRef"]) -> set_thumb_ref:((Dom.htmlElement -> unit) [@mel.as "setThumbRef"]) -> background_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "backgroundRef"]) -> set_background_ref:((Dom.htmlElement -> unit) [@mel.as "setBackgroundRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> unit -> t = "" [@@mel.obj] + + external make : + state:(t_color_area_state[@mel.as "state"]) -> + x_name:(string option Solidtype.Solid.accessor[@mel.as "xName"]) -> + y_name:(string option Solidtype.Solid.accessor[@mel.as "yName"]) -> + on_drag_start:((float array -> unit) option[@mel.as "onDragStart"]) -> + on_drag: + ((t_color_area_context_value_on_drag_deltas -> unit) option + [@mel.as "onDrag"]) -> + on_drag_end:((unit -> unit) option[@mel.as "onDragEnd"]) -> + translations: + (t_color_area_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + get_display_color:((unit -> t_color)[@mel.as "getDisplayColor"]) -> + on_step_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onStepKeyDown"]) -> + thumb_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "thumbRef"]) -> + set_thumb_ref:((Dom.htmlElement -> unit)[@mel.as "setThumbRef"]) -> + background_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "backgroundRef"]) -> + set_background_ref:((Dom.htmlElement -> unit)[@mel.as "setBackgroundRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorChannelField_Root_Translations : sig type t = t_color_channel_field_root_translations + external empty : t -> string = "empty" [@@mel.get] - external make : empty:(string [@mel.as "empty"]) -> unit -> t = "" [@@mel.obj] + external make : empty:(string[@mel.as "empty"]) -> unit -> t = "" [@@mel.obj] end module ColorFieldContextValue : sig type t = t_color_field_context_value - external on_blur : t -> (Dom.focusEvent -> unit, (Dom.htmlInputElement, Dom.focusEvent, Dom.focusEvent -> unit) t_bound_event_handler) either = "onBlur" [@@mel.get] - external make : on_blur:((Dom.focusEvent -> unit, (Dom.htmlInputElement, Dom.focusEvent, Dom.focusEvent -> unit) t_bound_event_handler) either [@mel.as "onBlur"]) -> unit -> t = "" [@@mel.obj] + + external on_blur : + t -> + ( Dom.focusEvent -> unit, + ( Dom.htmlInputElement, + Dom.focusEvent, + Dom.focusEvent -> unit ) + t_bound_event_handler ) + either = "onBlur" + [@@mel.get] + + external make : + on_blur: + (( Dom.focusEvent -> unit, + ( Dom.htmlInputElement, + Dom.focusEvent, + Dom.focusEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onBlur"]) -> + unit -> + t = "" + [@@mel.obj] end module Context : sig type 't t = 't t_context + external id : 't t -> t_context_id = "id" [@@mel.get] - external provider : 't t -> (t_context_provider, Solidtype.Jsx.element) t_flow_props -> Solidtype.Jsx.element = "Provider" [@@mel.send] + + external provider : + 't t -> + (t_context_provider_props, Solidtype.Jsx.element) t_flow_props -> + Solidtype.Jsx.element = "Provider" + [@@mel.send] + external default_value : 't t -> 't = "defaultValue" [@@mel.get] - external make : id:(t_context_id [@mel.as "id"]) -> provider:(((t_context_provider, Solidtype.Jsx.element) t_flow_props -> Solidtype.Jsx.element) [@mel.as "Provider"]) -> default_value:('t [@mel.as "defaultValue"]) -> unit -> 't t = "" [@@mel.obj] + + external make : + id:(t_context_id[@mel.as "id"]) -> + provider: + (((t_context_provider_props, Solidtype.Jsx.element) t_flow_props -> + Solidtype.Jsx.element) + [@mel.as "Provider"]) -> + default_value:('t[@mel.as "defaultValue"]) -> + unit -> + 't t = "" + [@@mel.obj] end module ColorModeContextType : sig type t = t_color_mode_context_type - external color_mode : t -> [ `light | `dark ] Solidtype.Solid.accessor = "colorMode" [@@mel.get] - external set_color_mode : t -> [ `light | `dark | `system ] -> unit = "setColorMode" [@@mel.send] - external toggle_color_mode : t -> unit -> unit = "toggleColorMode" [@@mel.send] - external make : color_mode:([ `light | `dark ] Solidtype.Solid.accessor [@mel.as "colorMode"]) -> set_color_mode:(([ `light | `dark | `system ] -> unit) [@mel.as "setColorMode"]) -> toggle_color_mode:((unit -> unit) [@mel.as "toggleColorMode"]) -> unit -> t = "" [@@mel.obj] + + external color_mode : t -> [ `dark | `light ] Solidtype.Solid.accessor + = "colorMode" + [@@mel.get] + + external set_color_mode : t -> [ `dark | `light | `system ] -> unit + = "setColorMode" + [@@mel.send] + + external toggle_color_mode : t -> unit -> unit = "toggleColorMode" + [@@mel.send] + + external make : + color_mode: + ([ `dark | `light ] Solidtype.Solid.accessor[@mel.as "colorMode"]) -> + set_color_mode: + (([ `dark | `light | `system ] -> unit)[@mel.as "setColorMode"]) -> + toggle_color_mode:((unit -> unit)[@mel.as "toggleColorMode"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorModeStorageManager : sig type t = t_color_mode_storage_manager + + external type_ : t -> [ `cookie | `localStorage ] = "type" + [@@mel.get] (** The type of storage. *) - external type_ : t -> [ `localStorage | `cookie ] = "type" [@@mel.get] + + external ssr : t -> bool option = "ssr" + [@@mel.get] (** Whether it's an SSR environment. *) - external ssr : t -> bool option = "ssr" [@@mel.get] + + external get : + t -> + ?fallback:[ `dark | `light | `system ] -> + unit -> + [ `dark | `light | `system ] option = "get" + [@@mel.send] (** Get the color mode from the storage. *) - external get : t -> ?fallback:[ `light | `dark | `system ] -> unit -> [ `light | `dark | `system ] option = "get" [@@mel.send] + + external set : t -> [ `dark | `light | `system ] -> unit = "set" + [@@mel.send] (** Save the color mode in the storage. *) - external set : t -> [ `light | `dark | `system ] -> unit = "set" [@@mel.send] - external make : type_:([ `localStorage | `cookie ] [@mel.as "type"]) -> ?ssr:(bool [@mel.as "ssr"]) -> get:(([ `light | `dark | `system ] option -> [ `light | `dark | `system ] option) [@mel.as "get"]) -> set:(([ `light | `dark | `system ] -> unit) [@mel.as "set"]) -> unit -> t = "" [@@mel.obj] + + external make : + type_:([ `cookie | `localStorage ][@mel.as "type"]) -> + ?ssr:(bool[@mel.as "ssr"]) -> + get: + (([ `dark | `light | `system ] option -> + [ `dark | `light | `system ] option) + [@mel.as "get"]) -> + set:(([ `dark | `light | `system ] -> unit)[@mel.as "set"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorSlider_Root_Translations : sig type t = t_color_slider_root_translations + external hue : t -> string = "hue" [@@mel.get] external saturation : t -> string = "saturation" [@@mel.get] external lightness : t -> string = "lightness" [@@mel.get] @@ -393,8 +752,14 @@ module ColorSlider_Root_Translations : sig external green : t -> string = "green" [@@mel.get] external blue : t -> string = "blue" [@@mel.get] external alpha : t -> string = "alpha" [@@mel.get] - external color_name : t -> string -> string -> string -> string = "colorName" [@@mel.send] - external transparent_color_name : t -> string -> string -> string -> string -> string = "transparentColorName" [@@mel.send] + + external color_name : t -> string -> string -> string -> string = "colorName" + [@@mel.send] + + external transparent_color_name : + t -> string -> string -> string -> string -> string = "transparentColorName" + [@@mel.send] + external dark : t -> string = "dark" [@@mel.get] external light : t -> string = "light" [@@mel.get] external pale : t -> string = "pale" [@@mel.get] @@ -410,814 +775,2604 @@ module ColorSlider_Root_Translations : sig external cyan : t -> string = "cyan" [@@mel.get] external purple : t -> string = "purple" [@@mel.get] external magenta : t -> string = "magenta" [@@mel.get] - external make : hue:(string [@mel.as "hue"]) -> saturation:(string [@mel.as "saturation"]) -> lightness:(string [@mel.as "lightness"]) -> brightness:(string [@mel.as "brightness"]) -> red:(string [@mel.as "red"]) -> green:(string [@mel.as "green"]) -> blue:(string [@mel.as "blue"]) -> alpha:(string [@mel.as "alpha"]) -> color_name:((string -> string -> string -> string) [@mel.as "colorName"]) -> transparent_color_name:((string -> string -> string -> string -> string) [@mel.as "transparentColorName"]) -> dark:(string [@mel.as "dark"]) -> light:(string [@mel.as "light"]) -> pale:(string [@mel.as "pale"]) -> grayish:(string [@mel.as "grayish"]) -> vibrant:(string [@mel.as "vibrant"]) -> black:(string [@mel.as "black"]) -> white:(string [@mel.as "white"]) -> gray:(string [@mel.as "gray"]) -> pink:(string [@mel.as "pink"]) -> brown:(string [@mel.as "brown"]) -> orange:(string [@mel.as "orange"]) -> yellow:(string [@mel.as "yellow"]) -> cyan:(string [@mel.as "cyan"]) -> purple:(string [@mel.as "purple"]) -> magenta:(string [@mel.as "magenta"]) -> unit -> t = "" [@@mel.obj] + + val make : + hue:string -> + saturation:string -> + lightness:string -> + brightness:string -> + red:string -> + green:string -> + blue:string -> + alpha:string -> + color_name:(string -> string -> string -> string) -> + transparent_color_name:(string -> string -> string -> string -> string) -> + dark:string -> + light:string -> + pale:string -> + grayish:string -> + vibrant:string -> + black:string -> + white:string -> + gray:string -> + pink:string -> + brown:string -> + orange:string -> + yellow:string -> + cyan:string -> + purple:string -> + magenta:string -> + unit -> + t end module ColorSliderContextValue : sig type t = t_color_slider_context_value + external value : t -> t_color Solidtype.Solid.accessor = "value" [@@mel.get] - external channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Solid.accessor = "channel" [@@mel.get] - external get_display_color : t -> unit -> t_color = "getDisplayColor" [@@mel.send] - external translations : t -> t_color_slider_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external make : value:(t_color Solidtype.Solid.accessor [@mel.as "value"]) -> channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] Solidtype.Solid.accessor [@mel.as "channel"]) -> get_display_color:((unit -> t_color) [@mel.as "getDisplayColor"]) -> translations:(t_color_slider_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> unit -> t = "" [@@mel.obj] + + external channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Solid.accessor = "channel" + [@@mel.get] + + external get_display_color : t -> unit -> t_color = "getDisplayColor" + [@@mel.send] + + external translations : + t -> t_color_slider_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external make : + value:(t_color Solidtype.Solid.accessor[@mel.as "value"]) -> + channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + Solidtype.Solid.accessor + [@mel.as "channel"]) -> + get_display_color:((unit -> t_color)[@mel.as "getDisplayColor"]) -> + translations: + (t_color_slider_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorSwatch_Root_Translations : sig type t = t_color_swatch_root_translations + external role_description : t -> string = "roleDescription" [@@mel.get] external transparent : t -> string = "transparent" [@@mel.get] - external make : role_description:(string [@mel.as "roleDescription"]) -> transparent:(string [@mel.as "transparent"]) -> unit -> t = "" [@@mel.obj] + + external make : + role_description:(string[@mel.as "roleDescription"]) -> + transparent:(string[@mel.as "transparent"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorWheelContextValue : sig type t = t_color_wheel_context_value + external state : t -> t_color_wheel_state = "state" [@@mel.get] - external outer_radius : t -> float option Solidtype.Solid.accessor = "outerRadius" [@@mel.get] - external thickness : t -> float Solidtype.Solid.accessor = "thickness" [@@mel.get] - external on_drag_start : t -> (float array -> unit) option = "onDragStart" [@@mel.get] - external on_drag : t -> (t_color_wheel_context_value_on_drag -> unit) option = "onDrag" [@@mel.get] + + external outer_radius : t -> float option Solidtype.Solid.accessor + = "outerRadius" + [@@mel.get] + + external thickness : t -> float Solidtype.Solid.accessor = "thickness" + [@@mel.get] + + external on_drag_start : t -> (float array -> unit) option = "onDragStart" + [@@mel.get] + + external on_drag : + t -> (t_color_wheel_context_value_on_drag_deltas -> unit) option = "onDrag" + [@@mel.get] + external on_drag_end : t -> (unit -> unit) option = "onDragEnd" [@@mel.get] - external get_thumb_value_label : t -> unit -> string = "getThumbValueLabel" [@@mel.send] - external get_value_label : t -> t_color -> string = "getValueLabel" [@@mel.send] - external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" [@@mel.send] - external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "thumbRef" [@@mel.get] - external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" [@@mel.send] - external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "trackRef" [@@mel.get] - external set_track_ref : t -> Dom.htmlElement -> unit = "setTrackRef" [@@mel.send] + + external get_thumb_value_label : t -> unit -> string = "getThumbValueLabel" + [@@mel.send] + + external get_value_label : t -> t_color -> string = "getValueLabel" + [@@mel.send] + + external on_step_key_down : t -> Dom.keyboardEvent -> unit = "onStepKeyDown" + [@@mel.send] + + external thumb_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "thumbRef" + [@@mel.get] + + external set_thumb_ref : t -> Dom.htmlElement -> unit = "setThumbRef" + [@@mel.send] + + external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "trackRef" + [@@mel.get] + + external set_track_ref : t -> Dom.htmlElement -> unit = "setTrackRef" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external make : state:(t_color_wheel_state [@mel.as "state"]) -> outer_radius:(float option Solidtype.Solid.accessor [@mel.as "outerRadius"]) -> thickness:(float Solidtype.Solid.accessor [@mel.as "thickness"]) -> on_drag_start:((float array -> unit) option [@mel.as "onDragStart"]) -> on_drag:((t_color_wheel_context_value_on_drag -> unit) option [@mel.as "onDrag"]) -> on_drag_end:((unit -> unit) option [@mel.as "onDragEnd"]) -> get_thumb_value_label:((unit -> string) [@mel.as "getThumbValueLabel"]) -> get_value_label:((t_color -> string) [@mel.as "getValueLabel"]) -> on_step_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onStepKeyDown"]) -> thumb_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "thumbRef"]) -> set_thumb_ref:((Dom.htmlElement -> unit) [@mel.as "setThumbRef"]) -> track_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "trackRef"]) -> set_track_ref:((Dom.htmlElement -> unit) [@mel.as "setTrackRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> unit -> t = "" [@@mel.obj] + + external make : + state:(t_color_wheel_state[@mel.as "state"]) -> + outer_radius:(float option Solidtype.Solid.accessor[@mel.as "outerRadius"]) -> + thickness:(float Solidtype.Solid.accessor[@mel.as "thickness"]) -> + on_drag_start:((float array -> unit) option[@mel.as "onDragStart"]) -> + on_drag: + ((t_color_wheel_context_value_on_drag_deltas -> unit) option + [@mel.as "onDrag"]) -> + on_drag_end:((unit -> unit) option[@mel.as "onDragEnd"]) -> + get_thumb_value_label:((unit -> string)[@mel.as "getThumbValueLabel"]) -> + get_value_label:((t_color -> string)[@mel.as "getValueLabel"]) -> + on_step_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onStepKeyDown"]) -> + thumb_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "thumbRef"]) -> + set_thumb_ref:((Dom.htmlElement -> unit)[@mel.as "setThumbRef"]) -> + track_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "trackRef"]) -> + set_track_ref:((Dom.htmlElement -> unit)[@mel.as "setTrackRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + unit -> + t = "" + [@@mel.obj] end module ComboboxControlState : sig type 'option t = 'option t_combobox_control_state + + external selected_options : + 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" + [@@mel.get] (** The selected options. *) - external selected_options : 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" [@@mel.get] + + external remove : 'option t -> 'option -> unit = "remove" + [@@mel.send] (** A function to remove an option from the selection. *) - external remove : 'option t -> 'option -> unit = "remove" [@@mel.send] + + external clear : 'option t -> unit -> unit = "clear" + [@@mel.send] (** A function to clear the selection. *) - external clear : 'option t -> unit -> unit = "clear" [@@mel.send] - external make : selected_options:('option array Solidtype.Solid.accessor [@mel.as "selectedOptions"]) -> remove:(('option -> unit) [@mel.as "remove"]) -> clear:((unit -> unit) [@mel.as "clear"]) -> unit -> 'option t = "" [@@mel.obj] + + external make : + selected_options: + ('option array Solidtype.Solid.accessor[@mel.as "selectedOptions"]) -> + remove:(('option -> unit)[@mel.as "remove"]) -> + clear:((unit -> unit)[@mel.as "clear"]) -> + unit -> + 'option t = "" + [@@mel.obj] end module CollectionNode : sig type 't t = 't t_collection_node + + external type_ : 't t -> [ `item | `section ] = "type" + [@@mel.get] (** The type of item this node represents. *) - external type_ : 't t -> [ `section | `item ] = "type" [@@mel.get] + + external key : 't t -> string = "key" + [@@mel.get] (** A unique key for the node. *) - external key : 't t -> string = "key" [@@mel.get] + + external raw_value : 't t -> 't = "rawValue" + [@@mel.get] (** The source object this node was created from. *) - external raw_value : 't t -> 't = "rawValue" [@@mel.get] + + external text_value : 't t -> string = "textValue" + [@@mel.get] (** A string value for the node, used for features like typeahead. *) - external text_value : 't t -> string = "textValue" [@@mel.get] + + external disabled : 't t -> bool = "disabled" + [@@mel.get] (** Whether the node is disabled. *) - external disabled : 't t -> bool = "disabled" [@@mel.get] + + external level : 't t -> float = "level" + [@@mel.get] (** The level of depth this node is at in the hierarchy. *) - external level : 't t -> float = "level" [@@mel.get] + + external index : 't t -> float = "index" + [@@mel.get] (** The index of this node within its parent. *) - external index : 't t -> float = "index" [@@mel.get] + + external prev_key : 't t -> string option = "prevKey" + [@@mel.get] (** The key of the node before this node. *) - external prev_key : 't t -> string option = "prevKey" [@@mel.get] + + external next_key : 't t -> string option = "nextKey" + [@@mel.get] (** The key of the node after this node. *) - external next_key : 't t -> string option = "nextKey" [@@mel.get] - external make : type_:([ `section | `item ] [@mel.as "type"]) -> key:(string [@mel.as "key"]) -> raw_value:('t [@mel.as "rawValue"]) -> text_value:(string [@mel.as "textValue"]) -> disabled:(bool [@mel.as "disabled"]) -> level:(float [@mel.as "level"]) -> index:(float [@mel.as "index"]) -> ?prev_key:(string [@mel.as "prevKey"]) -> ?next_key:(string [@mel.as "nextKey"]) -> unit -> 't t = "" [@@mel.obj] -end -(** A generic interface to access a readonly sequential - collection of unique keyed items. *) + external make : + type_:([ `item | `section ][@mel.as "type"]) -> + key:(string[@mel.as "key"]) -> + raw_value:('t[@mel.as "rawValue"]) -> + text_value:(string[@mel.as "textValue"]) -> + disabled:(bool[@mel.as "disabled"]) -> + level:(float[@mel.as "level"]) -> + index:(float[@mel.as "index"]) -> + ?prev_key:(string[@mel.as "prevKey"]) -> + ?next_key:(string[@mel.as "nextKey"]) -> + unit -> + 't t = "" + [@@mel.obj] +end + +(** A generic interface to access a readonly sequential collection of unique + keyed items. *) module Collection : sig type 't t = 't t_collection + + external get_size : 't t -> unit -> float = "getSize" + [@@mel.send] (** The number of items in the collection. *) - external get_size : 't t -> unit -> float = "getSize" [@@mel.send] + + external get_keys : 't t -> unit -> string array = "getKeys" + [@@mel.send] (** Iterate over all keys in the collection. *) - external get_keys : 't t -> unit -> string array = "getKeys" [@@mel.send] + + external get_item : 't t -> string -> 't option = "getItem" + [@@mel.send] (** Get an item by its key. *) - external get_item : 't t -> string -> 't option = "getItem" [@@mel.send] + + external at : 't t -> float -> 't option = "at" + [@@mel.send] (** Get an item by the index of its key. *) - external at : 't t -> float -> 't option = "at" [@@mel.send] + + external get_key_before : 't t -> string -> string option = "getKeyBefore" + [@@mel.send] (** Get the key that comes before the given key in the collection. *) - external get_key_before : 't t -> string -> string option = "getKeyBefore" [@@mel.send] + + external get_key_after : 't t -> string -> string option = "getKeyAfter" + [@@mel.send] (** Get the key that comes after the given key in the collection. *) - external get_key_after : 't t -> string -> string option = "getKeyAfter" [@@mel.send] + + external get_first_key : 't t -> unit -> string option = "getFirstKey" + [@@mel.send] (** Get the first key in the collection. *) - external get_first_key : 't t -> unit -> string option = "getFirstKey" [@@mel.send] + + external get_last_key : 't t -> unit -> string option = "getLastKey" + [@@mel.send] (** Get the last key in the collection. *) - external get_last_key : 't t -> unit -> string option = "getLastKey" [@@mel.send] - external make : get_size:((unit -> float) [@mel.as "getSize"]) -> get_keys:((unit -> string array) [@mel.as "getKeys"]) -> get_item:((string -> 't option) [@mel.as "getItem"]) -> at:((float -> 't option) [@mel.as "at"]) -> get_key_before:((string -> string option) [@mel.as "getKeyBefore"]) -> get_key_after:((string -> string option) [@mel.as "getKeyAfter"]) -> get_first_key:((unit -> string option) [@mel.as "getFirstKey"]) -> get_last_key:((unit -> string option) [@mel.as "getLastKey"]) -> unit -> 't t = "" [@@mel.obj] + + external make : + get_size:((unit -> float)[@mel.as "getSize"]) -> + get_keys:((unit -> string array)[@mel.as "getKeys"]) -> + get_item:((string -> 't option)[@mel.as "getItem"]) -> + at:((float -> 't option)[@mel.as "at"]) -> + get_key_before:((string -> string option)[@mel.as "getKeyBefore"]) -> + get_key_after:((string -> string option)[@mel.as "getKeyAfter"]) -> + get_first_key:((unit -> string option)[@mel.as "getFirstKey"]) -> + get_last_key:((unit -> string option)[@mel.as "getLastKey"]) -> + unit -> + 't t = "" + [@@mel.obj] end module Combobox_Root_Translations : sig type t = t_combobox_root_translations - external focus_announcement : t -> string -> bool -> string = "focusAnnouncement" [@@mel.send] - external count_announcement : t -> float -> string option = "countAnnouncement" [@@mel.send] - external selected_announcement : t -> string -> string = "selectedAnnouncement" [@@mel.send] + + external focus_announcement : t -> string -> bool -> string + = "focusAnnouncement" + [@@mel.send] + + external count_announcement : t -> float -> string option + = "countAnnouncement" + [@@mel.send] + + external selected_announcement : t -> string -> string + = "selectedAnnouncement" + [@@mel.send] + external trigger_label : t -> string = "triggerLabel" [@@mel.get] external listbox_label : t -> string = "listboxLabel" [@@mel.get] - external make : focus_announcement:((string -> bool -> string) [@mel.as "focusAnnouncement"]) -> count_announcement:((float -> string option) [@mel.as "countAnnouncement"]) -> selected_announcement:((string -> string) [@mel.as "selectedAnnouncement"]) -> trigger_label:(string [@mel.as "triggerLabel"]) -> listbox_label:(string [@mel.as "listboxLabel"]) -> unit -> t = "" [@@mel.obj] + + val make : + focus_announcement:(string -> bool -> string) -> + count_announcement:(float -> string option) -> + selected_announcement:(string -> string) -> + trigger_label:string -> + listbox_label:string -> + unit -> + t end module AnchorRect : sig type t = t_anchor_rect + external x : t -> float option = "x" [@@mel.get] external y : t -> float option = "y" [@@mel.get] external width : t -> float option = "width" [@@mel.get] external height : t -> float option = "height" [@@mel.get] - external make : ?x:(float [@mel.as "x"]) -> ?y:(float [@mel.as "y"]) -> ?width:(float [@mel.as "width"]) -> ?height:(float [@mel.as "height"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?x:(float[@mel.as "x"]) -> + ?y:(float[@mel.as "y"]) -> + ?width:(float[@mel.as "width"]) -> + ?height:(float[@mel.as "height"]) -> + unit -> + t = "" + [@@mel.obj] end module KeyboardDelegate : sig type t = t_keyboard_delegate + + val get_key_below : t -> (string -> string option) option (** Returns the key visually below the given one, or `undefined` for none. *) - external get_key_below : t -> (string -> string option) option = "getKeyBelow" [@@mel.get] + + val get_key_above : t -> (string -> string option) option (** Returns the key visually above the given one, or `undefined` for none. *) - external get_key_above : t -> (string -> string option) option = "getKeyAbove" [@@mel.get] - (** Returns the key visually to the left of the given one, or `undefined` for none. *) - external get_key_left_of : t -> (string -> string option) option = "getKeyLeftOf" [@@mel.get] - (** Returns the key visually to the right of the given one, or `undefined` for none. *) - external get_key_right_of : t -> (string -> string option) option = "getKeyRightOf" [@@mel.get] - (** Returns the key visually one page below the given one, or `undefined` for none. *) - external get_key_page_below : t -> (string -> string option) option = "getKeyPageBelow" [@@mel.get] - (** Returns the key visually one page above the given one, or `undefined` for none. *) - external get_key_page_above : t -> (string -> string option) option = "getKeyPageAbove" [@@mel.get] + + val get_key_left_of : t -> (string -> string option) option + (** Returns the key visually to the left of the given one, or `undefined` for + none. *) + + val get_key_right_of : t -> (string -> string option) option + (** Returns the key visually to the right of the given one, or `undefined` for + none. *) + + val get_key_page_below : t -> (string -> string option) option + (** Returns the key visually one page below the given one, or `undefined` for + none. *) + + val get_key_page_above : t -> (string -> string option) option + (** Returns the key visually one page above the given one, or `undefined` for + none. *) + + val get_first_key : + t -> (string option -> bool option -> string option) option (** Returns the first key, or `undefined` for none. *) - external get_first_key : t -> (string option -> bool option -> string option) option = "getFirstKey" [@@mel.get] + + val get_last_key : t -> (string option -> bool option -> string option) option (** Returns the last key, or `undefined` for none. *) - external get_last_key : t -> (string option -> bool option -> string option) option = "getLastKey" [@@mel.get] - (** Returns the next key after `fromKey` that matches the given search string, or `undefined` for none. *) - external get_key_for_search : t -> (string -> string option -> string option) option = "getKeyForSearch" [@@mel.get] - external make : ?get_key_below:((string -> string option) [@mel.as "getKeyBelow"]) -> ?get_key_above:((string -> string option) [@mel.as "getKeyAbove"]) -> ?get_key_left_of:((string -> string option) [@mel.as "getKeyLeftOf"]) -> ?get_key_right_of:((string -> string option) [@mel.as "getKeyRightOf"]) -> ?get_key_page_below:((string -> string option) [@mel.as "getKeyPageBelow"]) -> ?get_key_page_above:((string -> string option) [@mel.as "getKeyPageAbove"]) -> ?get_first_key:((string option -> bool option -> string option) [@mel.as "getFirstKey"]) -> ?get_last_key:((string option -> bool option -> string option) [@mel.as "getLastKey"]) -> ?get_key_for_search:((string -> string option -> string option) [@mel.as "getKeyForSearch"]) -> unit -> t = "" [@@mel.obj] + + val get_key_for_search : + t -> (string -> string option -> string option) option + (** Returns the next key after `fromKey` that matches the given search string, + or `undefined` for none. *) + + val make : + ?get_key_below:(string -> string option) -> + ?get_key_above:(string -> string option) -> + ?get_key_left_of:(string -> string option) -> + ?get_key_right_of:(string -> string option) -> + ?get_key_page_below:(string -> string option) -> + ?get_key_page_above:(string -> string option) -> + ?get_first_key:(string option -> bool option -> string option) -> + ?get_last_key:(string option -> bool option -> string option) -> + ?get_key_for_search:(string -> string option -> string option) -> + unit -> + t end module ComboboxBaseItemComponentProps : sig type 'option t = 'option t_combobox_base_item_component_props + + external item : 'option t -> 'option t_collection_node = "item" + [@@mel.get] (** The item to render. *) - external item : 'option t -> 'option t_collection_node = "item" [@@mel.get] - external make : item:('option t_collection_node [@mel.as "item"]) -> unit -> 'option t = "" [@@mel.obj] + + external make : + item:('option t_collection_node[@mel.as "item"]) -> unit -> 'option t = "" + [@@mel.obj] end module ComboboxBaseSectionComponentProps : sig type 'opt_group t = 'opt_group t_combobox_base_section_component_props + + external section : 'opt_group t -> 'opt_group t_collection_node = "section" + [@@mel.get] (** The section to render. *) - external section : 'opt_group t -> 'opt_group t_collection_node = "section" [@@mel.get] - external make : section:('opt_group t_collection_node [@mel.as "section"]) -> unit -> 'opt_group t = "" [@@mel.obj] + + external make : + section:('opt_group t_collection_node[@mel.as "section"]) -> + unit -> + 'opt_group t = "" + [@@mel.obj] end module ComboboxContextValue : sig type t = t_combobox_context_value - external dataset : t -> t_combobox_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_combobox_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" [@@mel.get] - external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" + [@@mel.get] + + external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" + [@@mel.get] + external is_modal : t -> bool Solidtype.Solid.accessor = "isModal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external is_input_focused : t -> bool Solidtype.Solid.accessor = "isInputFocused" [@@mel.get] - external allows_empty_collection : t -> bool Solidtype.Solid.accessor = "allowsEmptyCollection" [@@mel.get] - external should_focus_wrap : t -> bool Solidtype.Solid.accessor = "shouldFocusWrap" [@@mel.get] - external remove_on_backspace : t -> bool Solidtype.Solid.accessor = "removeOnBackspace" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external auto_focus : t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor = "autoFocus" [@@mel.get] - external active_descendant : t -> string option Solidtype.Solid.accessor = "activeDescendant" [@@mel.get] - external input_value : t -> string option Solidtype.Solid.accessor = "inputValue" [@@mel.get] - external trigger_mode : t -> [ `focus | `input | `manual ] Solidtype.Solid.accessor = "triggerMode" [@@mel.get] - external control_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "controlRef" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "contentRef" [@@mel.get] - external listbox_id : t -> string option Solidtype.Solid.accessor = "listboxId" [@@mel.get] - external trigger_aria_label : t -> string option Solidtype.Solid.accessor = "triggerAriaLabel" [@@mel.get] - external listbox_aria_label : t -> string option Solidtype.Solid.accessor = "listboxAriaLabel" [@@mel.get] - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor = "keyboardDelegate" [@@mel.get] - external reset_input_value : t -> string Js.Set.t -> unit = "resetInputValue" [@@mel.send] - external set_is_input_focused : t -> bool -> unit = "setIsInputFocused" [@@mel.send] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external is_input_focused : t -> bool Solidtype.Solid.accessor + = "isInputFocused" + [@@mel.get] + + external allows_empty_collection : t -> bool Solidtype.Solid.accessor + = "allowsEmptyCollection" + [@@mel.get] + + external should_focus_wrap : t -> bool Solidtype.Solid.accessor + = "shouldFocusWrap" + [@@mel.get] + + external remove_on_backspace : t -> bool Solidtype.Solid.accessor + = "removeOnBackspace" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external auto_focus : + t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor + = "autoFocus" + [@@mel.get] + + external active_descendant : t -> string option Solidtype.Solid.accessor + = "activeDescendant" + [@@mel.get] + + external input_value : t -> string option Solidtype.Solid.accessor + = "inputValue" + [@@mel.get] + + external trigger_mode : + t -> [ `focus | `input | `manual ] Solidtype.Solid.accessor = "triggerMode" + [@@mel.get] + + external control_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "controlRef" + [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "contentRef" + [@@mel.get] + + external listbox_id : t -> string option Solidtype.Solid.accessor + = "listboxId" + [@@mel.get] + + external trigger_aria_label : t -> string option Solidtype.Solid.accessor + = "triggerAriaLabel" + [@@mel.get] + + external listbox_aria_label : t -> string option Solidtype.Solid.accessor + = "listboxAriaLabel" + [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + + external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor + = "keyboardDelegate" + [@@mel.get] + + external reset_input_value : t -> string Js.Set.t -> unit = "resetInputValue" + [@@mel.send] + + external set_is_input_focused : t -> bool -> unit = "setIsInputFocused" + [@@mel.send] + external set_input_value : t -> string -> unit = "setInputValue" [@@mel.send] - external set_control_ref : t -> Dom.htmlElement -> unit = "setControlRef" [@@mel.send] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" [@@mel.send] - external open_ : t -> ([ `first | `last ], bool) either -> ?trigger_mode:[ `focus | `input | `manual ] -> unit -> unit = "open" [@@mel.send] + + external set_control_ref : t -> Dom.htmlElement -> unit = "setControlRef" + [@@mel.send] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" + [@@mel.send] + + external open_ : + t -> + ([ `first | `last ], bool) either -> + ?trigger_mode:[ `focus | `input | `manual ] -> + unit -> + unit = "open" + [@@mel.send] + external close : t -> unit -> unit = "close" [@@mel.send] - external toggle : t -> ([ `first | `last ], bool) either -> ?trigger_mode:[ `focus | `input | `manual ] -> unit -> unit = "toggle" [@@mel.send] - external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor = "placeholder" [@@mel.get] - external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderItem" [@@mel.send] - external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderSection" [@@mel.send] - external on_input_key_down : t -> (Dom.keyboardEvent -> unit, (Dom.htmlInputElement, Dom.keyboardEvent, Dom.keyboardEvent -> unit) t_bound_event_handler) either = "onInputKeyDown" [@@mel.get] + + external toggle : + t -> + ([ `first | `last ], bool) either -> + ?trigger_mode:[ `focus | `input | `manual ] -> + unit -> + unit = "toggle" + [@@mel.send] + + external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor + = "placeholder" + [@@mel.get] + + external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderItem" + [@@mel.send] + + external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderSection" + [@@mel.send] + + external on_input_key_down : + t -> + ( Dom.keyboardEvent -> unit, + ( Dom.htmlInputElement, + Dom.keyboardEvent, + Dom.keyboardEvent -> unit ) + t_bound_event_handler ) + either = "onInputKeyDown" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_listbox_id : t -> string -> (unit -> unit) - val make : dataset:t_combobox_data_set Solidtype.Solid.accessor -> is_open:bool Solidtype.Solid.accessor -> is_disabled:bool Solidtype.Solid.accessor -> is_multiple:bool Solidtype.Solid.accessor -> is_virtualized:bool Solidtype.Solid.accessor -> is_modal:bool Solidtype.Solid.accessor -> prevent_scroll:bool Solidtype.Solid.accessor -> is_input_focused:bool Solidtype.Solid.accessor -> allows_empty_collection:bool Solidtype.Solid.accessor -> should_focus_wrap:bool Solidtype.Solid.accessor -> remove_on_backspace:bool Solidtype.Solid.accessor -> content_present:bool Solidtype.Solid.accessor -> auto_focus:([ `first | `last ], bool) either Solidtype.Solid.accessor -> active_descendant:string option Solidtype.Solid.accessor -> input_value:string option Solidtype.Solid.accessor -> trigger_mode:[ `focus | `input | `manual ] Solidtype.Solid.accessor -> control_ref:Dom.htmlElement option Solidtype.Solid.accessor -> input_ref:Dom.htmlInputElement option Solidtype.Solid.accessor -> trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> content_ref:Dom.htmlElement option Solidtype.Solid.accessor -> listbox_id:string option Solidtype.Solid.accessor -> trigger_aria_label:string option Solidtype.Solid.accessor -> listbox_aria_label:string option Solidtype.Solid.accessor -> list_state:t_list_state Solidtype.Solid.accessor -> keyboard_delegate:t_keyboard_delegate Solidtype.Solid.accessor -> reset_input_value:(string Js.Set.t -> unit) -> set_is_input_focused:(bool -> unit) -> set_input_value:(string -> unit) -> set_control_ref:(Dom.htmlElement -> unit) -> set_input_ref:(Dom.htmlInputElement -> unit) -> set_trigger_ref:(Dom.htmlElement -> unit) -> set_content_ref:(Dom.htmlElement -> unit) -> set_listbox_ref:(Dom.htmlElement -> unit) -> open_:(([ `first | `last ], bool) either -> [ `focus | `input | `manual ] option -> unit) -> close:(unit -> unit) -> toggle:(([ `first | `last ], bool) either -> [ `focus | `input | `manual ] option -> unit) -> placeholder:Solidtype.Jsx.element Solidtype.Solid.accessor -> render_item:(_ t_collection_node -> Solidtype.Jsx.element) -> render_section:(_ t_collection_node -> Solidtype.Jsx.element) -> on_input_key_down:(Dom.keyboardEvent -> unit, (Dom.htmlInputElement, Dom.keyboardEvent, Dom.keyboardEvent -> unit) t_bound_event_handler) either -> generate_id:(string -> string) -> register_listbox_id:(string -> (unit -> unit)) -> unit -> t + val register_listbox_id : t -> string -> unit -> unit + + val make : + dataset:t_combobox_data_set Solidtype.Solid.accessor -> + is_open:bool Solidtype.Solid.accessor -> + is_disabled:bool Solidtype.Solid.accessor -> + is_multiple:bool Solidtype.Solid.accessor -> + is_virtualized:bool Solidtype.Solid.accessor -> + is_modal:bool Solidtype.Solid.accessor -> + prevent_scroll:bool Solidtype.Solid.accessor -> + is_input_focused:bool Solidtype.Solid.accessor -> + allows_empty_collection:bool Solidtype.Solid.accessor -> + should_focus_wrap:bool Solidtype.Solid.accessor -> + remove_on_backspace:bool Solidtype.Solid.accessor -> + content_present:bool Solidtype.Solid.accessor -> + auto_focus:([ `first | `last ], bool) either Solidtype.Solid.accessor -> + active_descendant:string option Solidtype.Solid.accessor -> + input_value:string option Solidtype.Solid.accessor -> + trigger_mode:[ `focus | `input | `manual ] Solidtype.Solid.accessor -> + control_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + input_ref:Dom.htmlInputElement option Solidtype.Solid.accessor -> + trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + content_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + listbox_id:string option Solidtype.Solid.accessor -> + trigger_aria_label:string option Solidtype.Solid.accessor -> + listbox_aria_label:string option Solidtype.Solid.accessor -> + list_state:t_list_state Solidtype.Solid.accessor -> + keyboard_delegate:t_keyboard_delegate Solidtype.Solid.accessor -> + reset_input_value:(string Js.Set.t -> unit) -> + set_is_input_focused:(bool -> unit) -> + set_input_value:(string -> unit) -> + set_control_ref:(Dom.htmlElement -> unit) -> + set_input_ref:(Dom.htmlInputElement -> unit) -> + set_trigger_ref:(Dom.htmlElement -> unit) -> + set_content_ref:(Dom.htmlElement -> unit) -> + set_listbox_ref:(Dom.htmlElement -> unit) -> + open_: + (([ `first | `last ], bool) either -> + [ `focus | `input | `manual ] option -> + unit) -> + close:(unit -> unit) -> + toggle: + (([ `first | `last ], bool) either -> + [ `focus | `input | `manual ] option -> + unit) -> + placeholder:Solidtype.Jsx.element Solidtype.Solid.accessor -> + render_item:(t_unknown t_collection_node -> Solidtype.Jsx.element) -> + render_section:(t_unknown t_collection_node -> Solidtype.Jsx.element) -> + on_input_key_down: + ( Dom.keyboardEvent -> unit, + ( Dom.htmlInputElement, + Dom.keyboardEvent, + Dom.keyboardEvent -> unit ) + t_bound_event_handler ) + either -> + generate_id:(string -> string) -> + register_listbox_id:(string -> unit -> unit) -> + unit -> + t end module ContextMenuContextValue : sig type t = t_context_menu_context_value - external set_anchor_rect : t -> t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter = "setAnchorRect" [@@mel.get] - external make : set_anchor_rect:(t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter [@mel.as "setAnchorRect"]) -> unit -> t = "" [@@mel.obj] + + external set_anchor_rect : + t -> t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter + = "setAnchorRect" + [@@mel.get] + + external make : + set_anchor_rect: + (t_context_menu_context_value_set_anchor_rect Solidtype.Solid.setter + [@mel.as "setAnchorRect"]) -> + unit -> + t = "" + [@@mel.obj] end module DialogContextValue : sig type t = t_dialog_context_value - external translations : t -> t_alert_dialog_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] + + external translations : + t -> t_alert_dialog_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] external modal : t -> bool Solidtype.Solid.accessor = "modal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] - external title_id : t -> string option Solidtype.Solid.accessor = "titleId" [@@mel.get] - external description_id : t -> string option Solidtype.Solid.accessor = "descriptionId" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "overlayRef" [@@mel.get] - external set_overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setOverlayRef" [@@mel.get] - external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "contentRef" [@@mel.get] - external set_content_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setContentRef" [@@mel.get] - external overlay_present : t -> bool Solidtype.Solid.accessor = "overlayPresent" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + + external title_id : t -> string option Solidtype.Solid.accessor = "titleId" + [@@mel.get] + + external description_id : t -> string option Solidtype.Solid.accessor + = "descriptionId" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "overlayRef" + [@@mel.get] + + external set_overlay_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setOverlayRef" + [@@mel.get] + + external content_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "contentRef" + [@@mel.get] + + external set_content_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setContentRef" + [@@mel.get] + + external overlay_present : t -> bool Solidtype.Solid.accessor + = "overlayPresent" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + external close : t -> unit -> unit = "close" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setTriggerRef" [@@mel.get] + + external set_trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setTriggerRef" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_content_id : t -> string -> (unit -> unit) - val register_title_id : t -> string -> (unit -> unit) - val register_description_id : t -> string -> (unit -> unit) - val make : translations:t_alert_dialog_root_translations Solidtype.Solid.accessor -> is_open:bool Solidtype.Solid.accessor -> modal:bool Solidtype.Solid.accessor -> prevent_scroll:bool Solidtype.Solid.accessor -> content_id:string option Solidtype.Solid.accessor -> title_id:string option Solidtype.Solid.accessor -> description_id:string option Solidtype.Solid.accessor -> trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> overlay_ref:Dom.htmlElement option Solidtype.Solid.accessor -> set_overlay_ref:Dom.htmlElement option Solidtype.Solid.setter -> content_ref:Dom.htmlElement option Solidtype.Solid.accessor -> set_content_ref:Dom.htmlElement option Solidtype.Solid.setter -> overlay_present:bool Solidtype.Solid.accessor -> content_present:bool Solidtype.Solid.accessor -> close:(unit -> unit) -> toggle:(unit -> unit) -> set_trigger_ref:Dom.htmlElement option Solidtype.Solid.setter -> generate_id:(string -> string) -> register_content_id:(string -> (unit -> unit)) -> register_title_id:(string -> (unit -> unit)) -> register_description_id:(string -> (unit -> unit)) -> unit -> t + val register_content_id : t -> string -> unit -> unit + val register_title_id : t -> string -> unit -> unit + val register_description_id : t -> string -> unit -> unit + + val make : + translations:t_alert_dialog_root_translations Solidtype.Solid.accessor -> + is_open:bool Solidtype.Solid.accessor -> + modal:bool Solidtype.Solid.accessor -> + prevent_scroll:bool Solidtype.Solid.accessor -> + content_id:string option Solidtype.Solid.accessor -> + title_id:string option Solidtype.Solid.accessor -> + description_id:string option Solidtype.Solid.accessor -> + trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + overlay_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + set_overlay_ref:Dom.htmlElement option Solidtype.Solid.setter -> + content_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + set_content_ref:Dom.htmlElement option Solidtype.Solid.setter -> + overlay_present:bool Solidtype.Solid.accessor -> + content_present:bool Solidtype.Solid.accessor -> + close:(unit -> unit) -> + toggle:(unit -> unit) -> + set_trigger_ref:Dom.htmlElement option Solidtype.Solid.setter -> + generate_id:(string -> string) -> + register_content_id:(string -> unit -> unit) -> + register_title_id:(string -> unit -> unit) -> + register_description_id:(string -> unit -> unit) -> + unit -> + t end module FileFieldContextValue : sig type t = t_file_field_context_value - external translations : t -> t_file_field_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external input_id : t -> string Solidtype.Solid.accessor = "inputId" [@@mel.get] - external file_input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "fileInputRef" [@@mel.get] - external set_file_input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.setter = "setFileInputRef" [@@mel.get] - external dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "dropzoneRef" [@@mel.get] - external set_dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.setter = "setDropzoneRef" [@@mel.get] - external disabled : t -> bool option Solidtype.Solid.accessor = "disabled" [@@mel.get] - external multiple : t -> bool option Solidtype.Solid.accessor = "multiple" [@@mel.get] - external accept : t -> string option Solidtype.Solid.accessor = "accept" [@@mel.get] - external allow_drag_and_drop : t -> bool option Solidtype.Solid.accessor = "allowDragAndDrop" [@@mel.get] - external process_files : t -> t_file array -> unit = "processFiles" [@@mel.send] + + external translations : + t -> t_file_field_root_translations Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external input_id : t -> string Solidtype.Solid.accessor = "inputId" + [@@mel.get] + + external file_input_ref : + t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "fileInputRef" + [@@mel.get] + + external set_file_input_ref : + t -> Dom.htmlInputElement option Solidtype.Solid.setter = "setFileInputRef" + [@@mel.get] + + external dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "dropzoneRef" + [@@mel.get] + + external set_dropzone_ref : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setDropzoneRef" + [@@mel.get] + + external disabled : t -> bool option Solidtype.Solid.accessor = "disabled" + [@@mel.get] + + external multiple : t -> bool option Solidtype.Solid.accessor = "multiple" + [@@mel.get] + + external accept : t -> string option Solidtype.Solid.accessor = "accept" + [@@mel.get] + + external allow_drag_and_drop : t -> bool option Solidtype.Solid.accessor + = "allowDragAndDrop" + [@@mel.get] + + external process_files : t -> t_file array -> unit = "processFiles" + [@@mel.send] + external accepted_files : t -> t_file array = "acceptedFiles" [@@mel.get] - external rejected_files : t -> t_file_rejection array = "rejectedFiles" [@@mel.get] + + external rejected_files : t -> t_file_rejection array = "rejectedFiles" + [@@mel.get] + external remove_file : t -> t_file -> unit = "removeFile" [@@mel.send] - external make : translations:(t_file_field_root_translations Solidtype.Solid.accessor [@mel.as "translations"]) -> input_id:(string Solidtype.Solid.accessor [@mel.as "inputId"]) -> file_input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "fileInputRef"]) -> set_file_input_ref:(Dom.htmlInputElement option Solidtype.Solid.setter [@mel.as "setFileInputRef"]) -> dropzone_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "dropzoneRef"]) -> set_dropzone_ref:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setDropzoneRef"]) -> disabled:(bool option Solidtype.Solid.accessor [@mel.as "disabled"]) -> multiple:(bool option Solidtype.Solid.accessor [@mel.as "multiple"]) -> accept:(string option Solidtype.Solid.accessor [@mel.as "accept"]) -> allow_drag_and_drop:(bool option Solidtype.Solid.accessor [@mel.as "allowDragAndDrop"]) -> process_files:((t_file array -> unit) [@mel.as "processFiles"]) -> accepted_files:(t_file array [@mel.as "acceptedFiles"]) -> rejected_files:(t_file_rejection array [@mel.as "rejectedFiles"]) -> remove_file:((t_file -> unit) [@mel.as "removeFile"]) -> unit -> t = "" [@@mel.obj] -end -(** The **`File`** interface provides information about files and allows JavaScript in a web page to access their content. - + external make : + translations: + (t_file_field_root_translations Solidtype.Solid.accessor + [@mel.as "translations"]) -> + input_id:(string Solidtype.Solid.accessor[@mel.as "inputId"]) -> + file_input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor + [@mel.as "fileInputRef"]) -> + set_file_input_ref: + (Dom.htmlInputElement option Solidtype.Solid.setter + [@mel.as "setFileInputRef"]) -> + dropzone_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "dropzoneRef"]) -> + set_dropzone_ref: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setDropzoneRef"]) -> + disabled:(bool option Solidtype.Solid.accessor[@mel.as "disabled"]) -> + multiple:(bool option Solidtype.Solid.accessor[@mel.as "multiple"]) -> + accept:(string option Solidtype.Solid.accessor[@mel.as "accept"]) -> + allow_drag_and_drop: + (bool option Solidtype.Solid.accessor[@mel.as "allowDragAndDrop"]) -> + process_files:((t_file array -> unit)[@mel.as "processFiles"]) -> + accepted_files:(t_file array[@mel.as "acceptedFiles"]) -> + rejected_files:(t_file_rejection array[@mel.as "rejectedFiles"]) -> + remove_file:((t_file -> unit)[@mel.as "removeFile"]) -> + unit -> + t = "" + [@@mel.obj] +end + +(** The **`File`** interface provides information about files and allows + JavaScript in a web page to access their content. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File) *) module File : sig type t = t_file - (** The **`lastModified`** read-only property of the File interface provides the last modified date of the file as the number of milliseconds since the Unix epoch (January 1, 1970 at midnight). - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File/lastModified) *) - external last_modified : t -> float = "lastModified" [@@mel.get] - (** The **`name`** read-only property of the File interface returns the name of the file represented by a File object. - + + external last_modified : t -> float = "lastModified" + [@@mel.get] + (** The **`lastModified`** read-only property of the File interface provides + the last modified date of the file as the number of milliseconds since the + Unix epoch (January 1, 1970 at midnight). + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/File/lastModified) + *) + + external name : t -> string = "name" + [@@mel.get] + (** The **`name`** read-only property of the File interface returns the name + of the file represented by a File object. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File/name) *) - external name : t -> string = "name" [@@mel.get] - (** The **`webkitRelativePath`** read-only property of the File interface contains a string which specifies the file's path relative to the directory selected by the user in an input element with its `webkitdirectory` attribute set. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) *) - external webkit_relative_path : t -> string = "webkitRelativePath" [@@mel.get] - (** The **`size`** read-only property of the Blob interface returns the size of the Blob or File in bytes. - + + external webkit_relative_path : t -> string = "webkitRelativePath" + [@@mel.get] + (** The **`webkitRelativePath`** read-only property of the File interface + contains a string which specifies the file's path relative to the + directory selected by the user in an input element with its + `webkitdirectory` attribute set. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/File/webkitRelativePath) + *) + + external size : t -> float = "size" + [@@mel.get] + (** The **`size`** read-only property of the Blob interface returns the size + of the Blob or File in bytes. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Blob/size) *) - external size : t -> float = "size" [@@mel.get] - (** The **`type`** read-only property of the Blob interface returns the MIME type of the file. - + + external type_ : t -> string = "type" + [@@mel.get] + (** The **`type`** read-only property of the Blob interface returns the MIME + type of the file. + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Blob/type) *) - external type_ : t -> string = "type" [@@mel.get] - external array_buffer : t -> unit -> t_array_buffer Js.Promise.t = "arrayBuffer" [@@mel.send] - external bytes : t -> unit -> t_uint8_array Js.Promise.t = "bytes" [@@mel.send] - external slice : t -> ?start:float -> ?end_:float -> ?content_type:string -> unit -> t_blob = "slice" [@@mel.send] + + external array_buffer : t -> unit -> t_array_buffer Js.Promise.t + = "arrayBuffer" + [@@mel.send] + + external bytes : t -> unit -> t_uint8_array Js.Promise.t = "bytes" + [@@mel.send] + + external slice : + t -> ?start:float -> ?end_:float -> ?content_type:string -> unit -> t_blob + = "slice" + [@@mel.send] + external stream : t -> unit -> t_readable_stream = "stream" [@@mel.send] external text : t -> unit -> string Js.Promise.t = "text" [@@mel.send] end module FileField_Root_Translations : sig type t = t_file_field_root_translations + external bytes : t -> string = "bytes" [@@mel.get] external kb : t -> string = "kb" [@@mel.get] external mb : t -> string = "mb" [@@mel.get] external gb : t -> string = "gb" [@@mel.get] external tb : t -> string = "tb" [@@mel.get] - external make : bytes:(string [@mel.as "bytes"]) -> kb:(string [@mel.as "kb"]) -> mb:(string [@mel.as "mb"]) -> gb:(string [@mel.as "gb"]) -> tb:(string [@mel.as "tb"]) -> unit -> t = "" [@@mel.obj] + + external make : + bytes:(string[@mel.as "bytes"]) -> + kb:(string[@mel.as "kb"]) -> + mb:(string[@mel.as "mb"]) -> + gb:(string[@mel.as "gb"]) -> + tb:(string[@mel.as "tb"]) -> + unit -> + t = "" + [@@mel.obj] end module FileRejection : sig type t = t_file_rejection + external file : t -> t_file = "file" [@@mel.get] - external errors : t -> [ `TOO_MANY_FILES | `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL ] array = "errors" [@@mel.get] - external make : file:(t_file [@mel.as "file"]) -> errors:([ `TOO_MANY_FILES | `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL ] array [@mel.as "errors"]) -> unit -> t = "" [@@mel.obj] + + external errors : + t -> + [ `FILE_INVALID_TYPE | `FILE_TOO_LARGE | `FILE_TOO_SMALL | `TOO_MANY_FILES ] + array = "errors" + [@@mel.get] + + external make : + file:(t_file[@mel.as "file"]) -> + errors: + ([ `FILE_INVALID_TYPE + | `FILE_TOO_LARGE + | `FILE_TOO_SMALL + | `TOO_MANY_FILES ] + array + [@mel.as "errors"]) -> + unit -> + t = "" + [@@mel.obj] end module Details : sig type t = t_details + external accepted_files : t -> t_file array = "acceptedFiles" [@@mel.get] - external rejected_files : t -> t_file_rejection array = "rejectedFiles" [@@mel.get] - external make : accepted_files:(t_file array [@mel.as "acceptedFiles"]) -> rejected_files:(t_file_rejection array [@mel.as "rejectedFiles"]) -> unit -> t = "" [@@mel.obj] + + external rejected_files : t -> t_file_rejection array = "rejectedFiles" + [@@mel.get] + + external make : + accepted_files:(t_file array[@mel.as "acceptedFiles"]) -> + rejected_files:(t_file_rejection array[@mel.as "rejectedFiles"]) -> + unit -> + t = "" + [@@mel.obj] end module HoverCardContextValue : sig type t = t_hover_card_context_value - external dataset : t -> t_hover_card_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_hover_card_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + external open_with_delay : t -> unit -> unit = "openWithDelay" [@@mel.send] external close_with_delay : t -> unit -> unit = "closeWithDelay" [@@mel.send] external cancel_opening : t -> unit -> unit = "cancelOpening" [@@mel.send] external cancel_closing : t -> unit -> unit = "cancelClosing" [@@mel.send] external close : t -> unit -> unit = "close" [@@mel.send] - external is_target_on_hover_card : t -> Dom.node Js.Null.t -> bool = "isTargetOnHoverCard" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external make : dataset:(t_hover_card_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> is_open:(bool Solidtype.Solid.accessor [@mel.as "isOpen"]) -> content_present:(bool Solidtype.Solid.accessor [@mel.as "contentPresent"]) -> open_with_delay:((unit -> unit) [@mel.as "openWithDelay"]) -> close_with_delay:((unit -> unit) [@mel.as "closeWithDelay"]) -> cancel_opening:((unit -> unit) [@mel.as "cancelOpening"]) -> cancel_closing:((unit -> unit) [@mel.as "cancelClosing"]) -> close:((unit -> unit) [@mel.as "close"]) -> is_target_on_hover_card:((Dom.node Js.Nullable.t -> bool) [@mel.as "isTargetOnHoverCard"]) -> set_trigger_ref:((Dom.htmlElement -> unit) [@mel.as "setTriggerRef"]) -> set_content_ref:((Dom.htmlElement -> unit) [@mel.as "setContentRef"]) -> unit -> t = "" [@@mel.obj] + + external is_target_on_hover_card : t -> Dom.node Js.Null.t -> bool + = "isTargetOnHoverCard" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external make : + dataset:(t_hover_card_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + is_open:(bool Solidtype.Solid.accessor[@mel.as "isOpen"]) -> + content_present:(bool Solidtype.Solid.accessor[@mel.as "contentPresent"]) -> + open_with_delay:((unit -> unit)[@mel.as "openWithDelay"]) -> + close_with_delay:((unit -> unit)[@mel.as "closeWithDelay"]) -> + cancel_opening:((unit -> unit)[@mel.as "cancelOpening"]) -> + cancel_closing:((unit -> unit)[@mel.as "cancelClosing"]) -> + close:((unit -> unit)[@mel.as "close"]) -> + is_target_on_hover_card: + ((Dom.node Js.Nullable.t -> bool)[@mel.as "isTargetOnHoverCard"]) -> + set_trigger_ref:((Dom.htmlElement -> unit)[@mel.as "setTriggerRef"]) -> + set_content_ref:((Dom.htmlElement -> unit)[@mel.as "setContentRef"]) -> + unit -> + t = "" + [@@mel.obj] end module CollatorOptions : sig type t = t_collator_options + external usage : t -> [ `search | `sort ] option = "usage" [@@mel.get] external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] external numeric : t -> bool option = "numeric" [@@mel.get] external case_first : t -> string option = "caseFirst" [@@mel.get] - external sensitivity : t -> [ `base | `accent | `case | `variant ] option = "sensitivity" [@@mel.get] - external collation : t -> [ `big5han | `compat | `dict | `direct | `ducet | `emoji | `eor | `gb2312 | `phonebk | `phonetic | `pinyin | `reformed | `searchjl | `stroke | `trad | `unihan | `zhuyin ] option = "collation" [@@mel.get] - external ignore_punctuation : t -> bool option = "ignorePunctuation" [@@mel.get] - external make : ?usage:([ `search | `sort ] [@mel.as "usage"]) -> ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?numeric:(bool [@mel.as "numeric"]) -> ?case_first:(string [@mel.as "caseFirst"]) -> ?sensitivity:([ `base | `accent | `case | `variant ] [@mel.as "sensitivity"]) -> ?collation:([ `big5han | `compat | `dict | `direct | `ducet | `emoji | `eor | `gb2312 | `phonebk | `phonetic | `pinyin | `reformed | `searchjl | `stroke | `trad | `unihan | `zhuyin ] [@mel.as "collation"]) -> ?ignore_punctuation:(bool [@mel.as "ignorePunctuation"]) -> unit -> t = "" [@@mel.obj] + + external sensitivity : t -> [ `accent | `base | `case | `variant ] option + = "sensitivity" + [@@mel.get] + + external collation : + t -> + [ `big5han + | `compat + | `dict + | `direct + | `ducet + | `emoji + | `eor + | `gb2312 + | `phonebk + | `phonetic + | `pinyin + | `reformed + | `searchjl + | `stroke + | `trad + | `unihan + | `zhuyin ] + option = "collation" + [@@mel.get] + + external ignore_punctuation : t -> bool option = "ignorePunctuation" + [@@mel.get] + + external make : + ?usage:([ `search | `sort ][@mel.as "usage"]) -> + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?numeric:(bool[@mel.as "numeric"]) -> + ?case_first:(string[@mel.as "caseFirst"]) -> + ?sensitivity:([ `accent | `base | `case | `variant ][@mel.as "sensitivity"]) -> + ?collation: + ([ `big5han + | `compat + | `dict + | `direct + | `ducet + | `emoji + | `eor + | `gb2312 + | `phonebk + | `phonetic + | `pinyin + | `reformed + | `searchjl + | `stroke + | `trad + | `unihan + | `zhuyin ] + [@mel.as "collation"]) -> + ?ignore_punctuation:(bool[@mel.as "ignorePunctuation"]) -> + unit -> + t = "" + [@@mel.obj] end module Collator : sig type t = t_collator + external compare : t -> string -> string -> float = "compare" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_collator_options = "resolvedOptions" [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_collator_options + = "resolvedOptions" + [@@mel.send] end module DateTimeFormatOptions : sig type t = t_date_time_format_options + external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] - external weekday : t -> [ `long | `short | `narrow ] option = "weekday" [@@mel.get] - external era : t -> [ `long | `short | `narrow ] option = "era" [@@mel.get] + + external weekday : t -> [ `long | `narrow | `short ] option = "weekday" + [@@mel.get] + + external era : t -> [ `long | `narrow | `short ] option = "era" [@@mel.get] external year : t -> string option = "year" [@@mel.get] external month : t -> string option = "month" [@@mel.get] external day : t -> string option = "day" [@@mel.get] external hour : t -> string option = "hour" [@@mel.get] external minute : t -> string option = "minute" [@@mel.get] external second : t -> string option = "second" [@@mel.get] - external time_zone_name : t -> [ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] option = "timeZoneName" [@@mel.get] + + external time_zone_name : + t -> + [ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + option = "timeZoneName" + [@@mel.get] + external format_matcher : t -> string option = "formatMatcher" [@@mel.get] external hour12 : t -> bool option = "hour12" [@@mel.get] external time_zone : t -> string option = "timeZone" [@@mel.get] external calendar : t -> string option = "calendar" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + external numbering_system : t -> string option = "numberingSystem" [@@mel.get] - external date_style : t -> [ `long | `short | `full | `medium ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `long | `short | `full | `medium ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external fractional_second_digits : t -> float option = "fractionalSecondDigits" [@@mel.get] - external make : ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?weekday:([ `long | `short | `narrow ] [@mel.as "weekday"]) -> ?era:([ `long | `short | `narrow ] [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:([ `long | `short | `shortOffset | `longOffset | `shortGeneric | `longGeneric ] [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?time_zone:(string [@mel.as "timeZone"]) -> ?calendar:(string [@mel.as "calendar"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?numbering_system:(string [@mel.as "numberingSystem"]) -> ?date_style:([ `long | `short | `full | `medium ] [@mel.as "dateStyle"]) -> ?time_style:([ `long | `short | `full | `medium ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?fractional_second_digits:(float [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external fractional_second_digits : t -> float option + = "fractionalSecondDigits" + [@@mel.get] + + external make : + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?weekday:([ `long | `narrow | `short ][@mel.as "weekday"]) -> + ?era:([ `long | `narrow | `short ][@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name: + ([ `long + | `longGeneric + | `longOffset + | `short + | `shortGeneric + | `shortOffset ] + [@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?time_zone:(string[@mel.as "timeZone"]) -> + ?calendar:(string[@mel.as "calendar"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?numbering_system:(string[@mel.as "numberingSystem"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?fractional_second_digits:(float[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end module DateTimeFormat : sig type t = t_date_time_format - external format : t -> ?date:(float, Js.Date.t) either -> unit -> string = "format" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_date_time_format_options = "resolvedOptions" [@@mel.send] - external format_to_parts : t -> ?date:(float, Js.Date.t) either -> unit -> t_date_time_format_part array = "formatToParts" [@@mel.send] + + external format : t -> ?date:(float, Js.Date.t) either -> unit -> string + = "format" + [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_date_time_format_options + = "resolvedOptions" + [@@mel.send] + + external format_to_parts : + t -> + ?date:(float, Js.Date.t) either -> + unit -> + t_date_time_format_part array = "formatToParts" + [@@mel.send] end module I18n_CreateDefaultLocale : sig type t = t_i18n_create_default_locale + external locale : t -> unit -> string = "locale" [@@mel.send] - external direction : t -> unit -> [ `rtl | `ltr ] = "direction" [@@mel.send] - external make : locale:((unit -> string) [@mel.as "locale"]) -> direction:((unit -> [ `rtl | `ltr ]) [@mel.as "direction"]) -> unit -> t = "" [@@mel.obj] + external direction : t -> unit -> [ `ltr | `rtl ] = "direction" [@@mel.send] + + external make : + locale:((unit -> string)[@mel.as "locale"]) -> + direction:((unit -> [ `ltr | `rtl ])[@mel.as "direction"]) -> + unit -> + t = "" + [@@mel.obj] end module Filter : sig type t = t_filter - external starts_with : t -> string -> string -> bool = "startsWith" [@@mel.send] + + external starts_with : t -> string -> string -> bool = "startsWith" + [@@mel.send] + external ends_with : t -> string -> string -> bool = "endsWith" [@@mel.send] external contains : t -> string -> string -> bool = "contains" [@@mel.send] end module NumberFormatOptions : sig type t = t_number_format_options + + external numbering_system : t -> string option = "numberingSystem" + [@@mel.get] (** Overrides default numbering system for the current locale. *) - external numbering_system : t -> string option = "numberingSystem" [@@mel.get] + external locale_matcher : t -> string option = "localeMatcher" [@@mel.get] - external style : t -> [ `decimal | `percent | `currency | `unit ] option = "style" [@@mel.get] + + external style : t -> [ `currency | `decimal | `percent | `unit ] option + = "style" + [@@mel.get] + external currency : t -> string option = "currency" [@@mel.get] - external currency_display : t -> [ `symbol | `code | `name | `narrowSymbol ] option = "currencyDisplay" [@@mel.get] - external use_grouping : t -> (string, bool) either option = "useGrouping" [@@mel.get] - external minimum_integer_digits : t -> float option = "minimumIntegerDigits" [@@mel.get] - external minimum_fraction_digits : t -> float option = "minimumFractionDigits" [@@mel.get] - external maximum_fraction_digits : t -> float option = "maximumFractionDigits" [@@mel.get] - external minimum_significant_digits : t -> float option = "minimumSignificantDigits" [@@mel.get] - external maximum_significant_digits : t -> float option = "maximumSignificantDigits" [@@mel.get] - external compact_display : t -> [ `long | `short ] option = "compactDisplay" [@@mel.get] - external notation : t -> [ `standard | `scientific | `engineering | `compact ] option = "notation" [@@mel.get] - external sign_display : t -> [ `auto | `always | `never | `exceptZero | `negative ] option = "signDisplay" [@@mel.get] + + external currency_display : + t -> [ `code | `name | `narrowSymbol | `symbol ] option = "currencyDisplay" + [@@mel.get] + + external use_grouping : t -> (string, bool) either option = "useGrouping" + [@@mel.get] + + external minimum_integer_digits : t -> float option = "minimumIntegerDigits" + [@@mel.get] + + external minimum_fraction_digits : t -> float option = "minimumFractionDigits" + [@@mel.get] + + external maximum_fraction_digits : t -> float option = "maximumFractionDigits" + [@@mel.get] + + external minimum_significant_digits : t -> float option + = "minimumSignificantDigits" + [@@mel.get] + + external maximum_significant_digits : t -> float option + = "maximumSignificantDigits" + [@@mel.get] + + external compact_display : t -> [ `long | `short ] option = "compactDisplay" + [@@mel.get] + + external notation : + t -> [ `compact | `engineering | `scientific | `standard ] option + = "notation" + [@@mel.get] + + external sign_display : + t -> [ `always | `auto | `exceptZero | `negative | `never ] option + = "signDisplay" + [@@mel.get] + external unit : t -> string option = "unit" [@@mel.get] - external unit_display : t -> [ `long | `short | `narrow ] option = "unitDisplay" [@@mel.get] - external currency_sign : t -> [ `standard | `accounting ] option = "currencySign" [@@mel.get] - external rounding_priority : t -> [ `auto | `morePrecision | `lessPrecision ] option = "roundingPriority" [@@mel.get] - external rounding_increment : t -> float option = "roundingIncrement" [@@mel.get] - external rounding_mode : t -> [ `ceil | `floor | `expand | `trunc | `halfCeil | `halfFloor | `halfExpand | `halfTrunc | `halfEven ] option = "roundingMode" [@@mel.get] - external trailing_zero_display : t -> [ `auto | `stripIfInteger ] option = "trailingZeroDisplay" [@@mel.get] - external make : ?numbering_system:(string [@mel.as "numberingSystem"]) -> ?locale_matcher:(string [@mel.as "localeMatcher"]) -> ?style:([ `decimal | `percent | `currency | `unit ] [@mel.as "style"]) -> ?currency:(string [@mel.as "currency"]) -> ?currency_display:([ `symbol | `code | `name | `narrowSymbol ] [@mel.as "currencyDisplay"]) -> ?use_grouping:((string, bool) either [@mel.as "useGrouping"]) -> ?minimum_integer_digits:(float [@mel.as "minimumIntegerDigits"]) -> ?minimum_fraction_digits:(float [@mel.as "minimumFractionDigits"]) -> ?maximum_fraction_digits:(float [@mel.as "maximumFractionDigits"]) -> ?minimum_significant_digits:(float [@mel.as "minimumSignificantDigits"]) -> ?maximum_significant_digits:(float [@mel.as "maximumSignificantDigits"]) -> ?compact_display:([ `long | `short ] [@mel.as "compactDisplay"]) -> ?notation:([ `standard | `scientific | `engineering | `compact ] [@mel.as "notation"]) -> ?sign_display:([ `auto | `always | `never | `exceptZero | `negative ] [@mel.as "signDisplay"]) -> ?unit:(string [@mel.as "unit"]) -> ?unit_display:([ `long | `short | `narrow ] [@mel.as "unitDisplay"]) -> ?currency_sign:([ `standard | `accounting ] [@mel.as "currencySign"]) -> ?rounding_priority:([ `auto | `morePrecision | `lessPrecision ] [@mel.as "roundingPriority"]) -> ?rounding_increment:(float [@mel.as "roundingIncrement"]) -> ?rounding_mode:([ `ceil | `floor | `expand | `trunc | `halfCeil | `halfFloor | `halfExpand | `halfTrunc | `halfEven ] [@mel.as "roundingMode"]) -> ?trailing_zero_display:([ `auto | `stripIfInteger ] [@mel.as "trailingZeroDisplay"]) -> unit -> t = "" [@@mel.obj] + + external unit_display : t -> [ `long | `narrow | `short ] option + = "unitDisplay" + [@@mel.get] + + external currency_sign : t -> [ `accounting | `standard ] option + = "currencySign" + [@@mel.get] + + external rounding_priority : + t -> [ `auto | `lessPrecision | `morePrecision ] option = "roundingPriority" + [@@mel.get] + + external rounding_increment : t -> float option = "roundingIncrement" + [@@mel.get] + + external rounding_mode : + t -> + [ `ceil + | `expand + | `floor + | `halfCeil + | `halfEven + | `halfExpand + | `halfFloor + | `halfTrunc + | `trunc ] + option = "roundingMode" + [@@mel.get] + + external trailing_zero_display : t -> [ `auto | `stripIfInteger ] option + = "trailingZeroDisplay" + [@@mel.get] + + external make : + ?numbering_system:(string[@mel.as "numberingSystem"]) -> + ?locale_matcher:(string[@mel.as "localeMatcher"]) -> + ?style:([ `currency | `decimal | `percent | `unit ][@mel.as "style"]) -> + ?currency:(string[@mel.as "currency"]) -> + ?currency_display: + ([ `code | `name | `narrowSymbol | `symbol ][@mel.as "currencyDisplay"]) -> + ?use_grouping:((string, bool) either[@mel.as "useGrouping"]) -> + ?minimum_integer_digits:(float[@mel.as "minimumIntegerDigits"]) -> + ?minimum_fraction_digits:(float[@mel.as "minimumFractionDigits"]) -> + ?maximum_fraction_digits:(float[@mel.as "maximumFractionDigits"]) -> + ?minimum_significant_digits:(float[@mel.as "minimumSignificantDigits"]) -> + ?maximum_significant_digits:(float[@mel.as "maximumSignificantDigits"]) -> + ?compact_display:([ `long | `short ][@mel.as "compactDisplay"]) -> + ?notation: + ([ `compact | `engineering | `scientific | `standard ] + [@mel.as "notation"]) -> + ?sign_display: + ([ `always | `auto | `exceptZero | `negative | `never ] + [@mel.as "signDisplay"]) -> + ?unit:(string[@mel.as "unit"]) -> + ?unit_display:([ `long | `narrow | `short ][@mel.as "unitDisplay"]) -> + ?currency_sign:([ `accounting | `standard ][@mel.as "currencySign"]) -> + ?rounding_priority: + ([ `auto | `lessPrecision | `morePrecision ][@mel.as "roundingPriority"]) -> + ?rounding_increment:(float[@mel.as "roundingIncrement"]) -> + ?rounding_mode: + ([ `ceil + | `expand + | `floor + | `halfCeil + | `halfEven + | `halfExpand + | `halfFloor + | `halfTrunc + | `trunc ] + [@mel.as "roundingMode"]) -> + ?trailing_zero_display: + ([ `auto | `stripIfInteger ][@mel.as "trailingZeroDisplay"]) -> + unit -> + t = "" + [@@mel.obj] end module NumberFormat : sig type t = t_number_format + external format : t -> float -> string = "format" [@@mel.send] - external resolved_options : t -> unit -> t_resolved_number_format_options = "resolvedOptions" [@@mel.send] - external format_to_parts : t -> ?number:(float, t_date_time_format_format_range) either -> unit -> t_number_format_part array = "formatToParts" [@@mel.send] + + external resolved_options : t -> unit -> t_resolved_number_format_options + = "resolvedOptions" + [@@mel.send] + + external format_to_parts : + t -> + ?number:(float, Js.Bigint.t) either -> + unit -> + t_number_format_part array = "formatToParts" + [@@mel.send] end module Locale : sig type t = t_locale - (** The \[BCP47\](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale. *) - external locale : t -> string = "locale" [@@mel.get] + + external locale : t -> string = "locale" + [@@mel.get] + (** The \[BCP47\](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for + the locale. *) + + external direction : t -> [ `ltr | `rtl ] = "direction" + [@@mel.get] (** The writing direction for the locale. *) - external direction : t -> [ `rtl | `ltr ] = "direction" [@@mel.get] - external make : locale:(string [@mel.as "locale"]) -> direction:([ `rtl | `ltr ] [@mel.as "direction"]) -> unit -> t = "" [@@mel.obj] + + external make : + locale:(string[@mel.as "locale"]) -> + direction:([ `ltr | `rtl ][@mel.as "direction"]) -> + unit -> + t = "" + [@@mel.obj] end module I18n_UseLocale : sig type t = t_i18n_use_locale + external locale : t -> unit -> string = "locale" [@@mel.send] - external direction : t -> unit -> [ `rtl | `ltr ] = "direction" [@@mel.send] - external make : locale:((unit -> string) [@mel.as "locale"]) -> direction:((unit -> [ `rtl | `ltr ]) [@mel.as "direction"]) -> unit -> t = "" [@@mel.obj] + external direction : t -> unit -> [ `ltr | `rtl ] = "direction" [@@mel.send] + + external make : + locale:((unit -> string)[@mel.as "locale"]) -> + direction:((unit -> [ `ltr | `rtl ])[@mel.as "direction"]) -> + unit -> + t = "" + [@@mel.obj] end module ImageContextValue : sig type t = t_image_context_value - external fallback_delay : t -> float option Solidtype.Solid.accessor = "fallbackDelay" [@@mel.get] - external image_loading_status : t -> [ `idle | `loading | `loaded | `error ] Solidtype.Solid.accessor = "imageLoadingStatus" [@@mel.get] - external on_image_loading_status_change : t -> [ `idle | `loading | `loaded | `error ] -> unit = "onImageLoadingStatusChange" [@@mel.send] - external make : fallback_delay:(float option Solidtype.Solid.accessor [@mel.as "fallbackDelay"]) -> image_loading_status:([ `idle | `loading | `loaded | `error ] Solidtype.Solid.accessor [@mel.as "imageLoadingStatus"]) -> on_image_loading_status_change:(([ `idle | `loading | `loaded | `error ] -> unit) [@mel.as "onImageLoadingStatusChange"]) -> unit -> t = "" [@@mel.obj] + + external fallback_delay : t -> float option Solidtype.Solid.accessor + = "fallbackDelay" + [@@mel.get] + + external image_loading_status : + t -> [ `error | `idle | `loaded | `loading ] Solidtype.Solid.accessor + = "imageLoadingStatus" + [@@mel.get] + + external on_image_loading_status_change : + t -> [ `error | `idle | `loaded | `loading ] -> unit + = "onImageLoadingStatusChange" + [@@mel.send] + + external make : + fallback_delay: + (float option Solidtype.Solid.accessor[@mel.as "fallbackDelay"]) -> + image_loading_status: + ([ `error | `idle | `loaded | `loading ] Solidtype.Solid.accessor + [@mel.as "imageLoadingStatus"]) -> + on_image_loading_status_change: + (([ `error | `idle | `loaded | `loading ] -> unit) + [@mel.as "onImageLoadingStatusChange"]) -> + unit -> + t = "" + [@@mel.obj] end module ListState : sig type t = t_list_state + + external collection : + t -> t_unknown t_collection_node t_collection Solidtype.Solid.accessor + = "collection" + [@@mel.get] (** A collection of items in the list. *) - external collection : t -> _ t_collection_node t_collection Solidtype.Solid.accessor = "collection" [@@mel.get] + + external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor + = "selectionManager" + [@@mel.get] (** A selection manager to read and update multiple selection state. *) - external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor = "selectionManager" [@@mel.get] - external make : collection:(_ t_collection_node t_collection Solidtype.Solid.accessor [@mel.as "collection"]) -> selection_manager:(t_selection_manager Solidtype.Solid.accessor [@mel.as "selectionManager"]) -> unit -> t = "" [@@mel.obj] + + external make : + collection: + (_ t_collection_node t_collection Solidtype.Solid.accessor + [@mel.as "collection"]) -> + selection_manager: + (t_selection_manager Solidtype.Solid.accessor[@mel.as "selectionManager"]) -> + unit -> + t = "" + [@@mel.obj] end module ListboxContextValue : sig type t = t_listbox_context_value - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external should_use_virtual_focus : t -> bool option Solidtype.Solid.accessor = "shouldUseVirtualFocus" [@@mel.get] - external should_select_on_press_up : t -> bool option Solidtype.Solid.accessor = "shouldSelectOnPressUp" [@@mel.get] - external should_focus_on_hover : t -> bool option Solidtype.Solid.accessor = "shouldFocusOnHover" [@@mel.get] - external is_virtualized : t -> bool option Solidtype.Solid.accessor = "isVirtualized" [@@mel.get] - external make : list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> should_use_virtual_focus:(bool option Solidtype.Solid.accessor [@mel.as "shouldUseVirtualFocus"]) -> should_select_on_press_up:(bool option Solidtype.Solid.accessor [@mel.as "shouldSelectOnPressUp"]) -> should_focus_on_hover:(bool option Solidtype.Solid.accessor [@mel.as "shouldFocusOnHover"]) -> is_virtualized:(bool option Solidtype.Solid.accessor [@mel.as "isVirtualized"]) -> unit -> t = "" [@@mel.obj] + + external should_use_virtual_focus : t -> bool option Solidtype.Solid.accessor + = "shouldUseVirtualFocus" + [@@mel.get] + + external should_select_on_press_up : t -> bool option Solidtype.Solid.accessor + = "shouldSelectOnPressUp" + [@@mel.get] + + external should_focus_on_hover : t -> bool option Solidtype.Solid.accessor + = "shouldFocusOnHover" + [@@mel.get] + + external is_virtualized : t -> bool option Solidtype.Solid.accessor + = "isVirtualized" + [@@mel.get] + + external make : + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + should_use_virtual_focus: + (bool option Solidtype.Solid.accessor[@mel.as "shouldUseVirtualFocus"]) -> + should_select_on_press_up: + (bool option Solidtype.Solid.accessor[@mel.as "shouldSelectOnPressUp"]) -> + should_focus_on_hover: + (bool option Solidtype.Solid.accessor[@mel.as "shouldFocusOnHover"]) -> + is_virtualized: + (bool option Solidtype.Solid.accessor[@mel.as "isVirtualized"]) -> + unit -> + t = "" + [@@mel.obj] end module MenubarContextValue : sig type t = t_menubar_context_value - external dataset : t -> t_menubar_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] - external value : t -> string Js.Nullable.t Solidtype.Solid.accessor = "value" [@@mel.get] - external set_value : t -> (string, string Js.Nullable.t -> string option) either Js.Nullable.t -> unit = "setValue" [@@mel.send] - external menus : t -> string Js.Set.t Solidtype.Solid.accessor = "menus" [@@mel.get] - external menu_refs : t -> Dom.htmlElement array Solidtype.Solid.accessor = "menuRefs" [@@mel.get] - external menu_ref_map : t -> (string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor = "menuRefMap" [@@mel.get] - external last_value : t -> string option Solidtype.Solid.accessor = "lastValue" [@@mel.get] - external set_last_value : t -> (string, string option -> string option) either option -> unit = "setLastValue" [@@mel.send] - external register_menu : t -> string -> Dom.htmlElement array -> unit = "registerMenu" [@@mel.send] + + external dataset : t -> t_menubar_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + + external value : t -> string Js.Nullable.t Solidtype.Solid.accessor = "value" + [@@mel.get] + + external set_value : + t -> + (string, string Js.Nullable.t -> string option) either Js.Nullable.t -> + unit = "setValue" + [@@mel.send] + + external menus : t -> string Js.Set.t Solidtype.Solid.accessor = "menus" + [@@mel.get] + + external menu_refs : t -> Dom.htmlElement array Solidtype.Solid.accessor + = "menuRefs" + [@@mel.get] + + external menu_ref_map : + t -> (string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor + = "menuRefMap" + [@@mel.get] + + external last_value : t -> string option Solidtype.Solid.accessor + = "lastValue" + [@@mel.get] + + external set_last_value : + t -> (string, string option -> string option) either option -> unit + = "setLastValue" + [@@mel.send] + + external register_menu : t -> string -> Dom.htmlElement array -> unit + = "registerMenu" + [@@mel.send] + external unregister_menu : t -> string -> unit = "unregisterMenu" [@@mel.send] external next_menu : t -> unit -> unit = "nextMenu" [@@mel.send] external previous_menu : t -> unit -> unit = "previousMenu" [@@mel.send] external close_menu : t -> unit -> unit = "closeMenu" [@@mel.send] - external set_auto_focus_menu : t -> bool Solidtype.Solid.setter = "setAutoFocusMenu" [@@mel.get] - external auto_focus_menu : t -> bool Solidtype.Solid.accessor = "autoFocusMenu" [@@mel.get] + + external set_auto_focus_menu : t -> bool Solidtype.Solid.setter + = "setAutoFocusMenu" + [@@mel.get] + + external auto_focus_menu : t -> bool Solidtype.Solid.accessor + = "autoFocusMenu" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external make : dataset:(t_menubar_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> value:(string Js.Nullable.t Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:(((string, string Js.Nullable.t -> string option) either Js.Nullable.t -> unit) [@mel.as "setValue"]) -> menus:(string Js.Set.t Solidtype.Solid.accessor [@mel.as "menus"]) -> menu_refs:(Dom.htmlElement array Solidtype.Solid.accessor [@mel.as "menuRefs"]) -> menu_ref_map:((string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor [@mel.as "menuRefMap"]) -> last_value:(string option Solidtype.Solid.accessor [@mel.as "lastValue"]) -> set_last_value:(((string, string option -> string option) either option -> unit) [@mel.as "setLastValue"]) -> register_menu:((string -> Dom.htmlElement array -> unit) [@mel.as "registerMenu"]) -> unregister_menu:((string -> unit) [@mel.as "unregisterMenu"]) -> next_menu:((unit -> unit) [@mel.as "nextMenu"]) -> previous_menu:((unit -> unit) [@mel.as "previousMenu"]) -> close_menu:((unit -> unit) [@mel.as "closeMenu"]) -> set_auto_focus_menu:(bool Solidtype.Solid.setter [@mel.as "setAutoFocusMenu"]) -> auto_focus_menu:(bool Solidtype.Solid.accessor [@mel.as "autoFocusMenu"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> orientation:([ `horizontal | `vertical ] Solidtype.Solid.accessor [@mel.as "orientation"]) -> unit -> t = "" [@@mel.obj] -end -module GetValueLabelParams : sig - type t = t_get_value_label_params + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + val make : + dataset:t_menubar_data_set Solidtype.Solid.accessor -> + value:string Js.Nullable.t Solidtype.Solid.accessor -> + set_value: + ((string, string Js.Nullable.t -> string option) either Js.Nullable.t -> + unit) -> + menus:string Js.Set.t Solidtype.Solid.accessor -> + menu_refs:Dom.htmlElement array Solidtype.Solid.accessor -> + menu_ref_map: + (string, Dom.htmlElement array) Js.Map.t Solidtype.Solid.accessor -> + last_value:string option Solidtype.Solid.accessor -> + set_last_value: + ((string, string option -> string option) either option -> unit) -> + register_menu:(string -> Dom.htmlElement array -> unit) -> + unregister_menu:(string -> unit) -> + next_menu:(unit -> unit) -> + previous_menu:(unit -> unit) -> + close_menu:(unit -> unit) -> + set_auto_focus_menu:bool Solidtype.Solid.setter -> + auto_focus_menu:bool Solidtype.Solid.accessor -> + generate_id:(string -> string) -> + orientation:[ `horizontal | `vertical ] Solidtype.Solid.accessor -> + unit -> + t +end + +module Meter_GetValueLabelParams : sig + type t = t_meter_get_value_label_params + external value : t -> float = "value" [@@mel.get] external min : t -> float = "min" [@@mel.get] external max : t -> float = "max" [@@mel.get] - external make : value:(float [@mel.as "value"]) -> min:(float [@mel.as "min"]) -> max:(float [@mel.as "max"]) -> unit -> t = "" [@@mel.obj] + + external make : + value:(float[@mel.as "value"]) -> + min:(float[@mel.as "min"]) -> + max:(float[@mel.as "max"]) -> + unit -> + t = "" + [@@mel.obj] end module MeterContextValue : sig type t = t_meter_context_value - external dataset : t -> t_meter_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_meter_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external value : t -> float Solidtype.Solid.accessor = "value" [@@mel.get] - external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" [@@mel.get] - external value_label : t -> string option Solidtype.Solid.accessor = "valueLabel" [@@mel.get] - external meter_fill_width : t -> string option Solidtype.Solid.accessor = "meterFillWidth" [@@mel.get] - external label_id : t -> string option Solidtype.Solid.accessor = "labelId" [@@mel.get] + + external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" + [@@mel.get] + + external value_label : t -> string option Solidtype.Solid.accessor + = "valueLabel" + [@@mel.get] + + external meter_fill_width : t -> string option Solidtype.Solid.accessor + = "meterFillWidth" + [@@mel.get] + + external label_id : t -> string option Solidtype.Solid.accessor = "labelId" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_label_id : t -> string -> (unit -> unit) - val make : dataset:t_meter_data_set Solidtype.Solid.accessor -> value:float Solidtype.Solid.accessor -> value_percent:float Solidtype.Solid.accessor -> value_label:string option Solidtype.Solid.accessor -> meter_fill_width:string option Solidtype.Solid.accessor -> label_id:string option Solidtype.Solid.accessor -> generate_id:(string -> string) -> register_label_id:(string -> (unit -> unit)) -> unit -> t + val register_label_id : t -> string -> unit -> unit + + val make : + dataset:t_meter_data_set Solidtype.Solid.accessor -> + value:float Solidtype.Solid.accessor -> + value_percent:float Solidtype.Solid.accessor -> + value_label:string option Solidtype.Solid.accessor -> + meter_fill_width:string option Solidtype.Solid.accessor -> + label_id:string option Solidtype.Solid.accessor -> + generate_id:(string -> string) -> + register_label_id:(string -> unit -> unit) -> + unit -> + t end module NavigationMenuContextValue : sig type t = t_navigation_menu_context_value - external dataset : t -> t_navigation_menu_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] - external delay_duration : t -> float Solidtype.Solid.accessor = "delayDuration" [@@mel.get] - external skip_delay_duration : t -> float Solidtype.Solid.accessor = "skipDelayDuration" [@@mel.get] - external auto_focus_menu : t -> bool Solidtype.Solid.accessor = "autoFocusMenu" [@@mel.get] - external set_auto_focus_menu : t -> bool Solidtype.Solid.setter = "setAutoFocusMenu" [@@mel.get] - external start_leave_timer : t -> unit -> unit = "startLeaveTimer" [@@mel.send] - external cancel_leave_timer : t -> unit -> unit = "cancelLeaveTimer" [@@mel.send] - external root_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "rootRef" [@@mel.get] - external set_root_ref : t -> Dom.htmlElement Solidtype.Solid.setter = "setRootRef" [@@mel.get] - external viewport_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "viewportRef" [@@mel.get] - external set_viewport_ref : t -> Dom.htmlElement Solidtype.Solid.setter = "setViewportRef" [@@mel.get] - external viewport_present : t -> bool Solidtype.Solid.accessor = "viewportPresent" [@@mel.get] - external current_placement : t -> string Solidtype.Solid.accessor = "currentPlacement" [@@mel.get] - external previous_menu : t -> string option Solidtype.Solid.accessor = "previousMenu" [@@mel.get] - external set_previous_menu : t -> string option Solidtype.Solid.setter = "setPreviousMenu" [@@mel.get] - external make : dataset:(t_navigation_menu_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> delay_duration:(float Solidtype.Solid.accessor [@mel.as "delayDuration"]) -> skip_delay_duration:(float Solidtype.Solid.accessor [@mel.as "skipDelayDuration"]) -> auto_focus_menu:(bool Solidtype.Solid.accessor [@mel.as "autoFocusMenu"]) -> set_auto_focus_menu:(bool Solidtype.Solid.setter [@mel.as "setAutoFocusMenu"]) -> start_leave_timer:((unit -> unit) [@mel.as "startLeaveTimer"]) -> cancel_leave_timer:((unit -> unit) [@mel.as "cancelLeaveTimer"]) -> root_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "rootRef"]) -> set_root_ref:(Dom.htmlElement Solidtype.Solid.setter [@mel.as "setRootRef"]) -> viewport_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "viewportRef"]) -> set_viewport_ref:(Dom.htmlElement Solidtype.Solid.setter [@mel.as "setViewportRef"]) -> viewport_present:(bool Solidtype.Solid.accessor [@mel.as "viewportPresent"]) -> current_placement:(string Solidtype.Solid.accessor [@mel.as "currentPlacement"]) -> previous_menu:(string option Solidtype.Solid.accessor [@mel.as "previousMenu"]) -> set_previous_menu:(string option Solidtype.Solid.setter [@mel.as "setPreviousMenu"]) -> unit -> t = "" [@@mel.obj] + + external dataset : t -> t_navigation_menu_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + + external delay_duration : t -> float Solidtype.Solid.accessor + = "delayDuration" + [@@mel.get] + + external skip_delay_duration : t -> float Solidtype.Solid.accessor + = "skipDelayDuration" + [@@mel.get] + + external auto_focus_menu : t -> bool Solidtype.Solid.accessor + = "autoFocusMenu" + [@@mel.get] + + external set_auto_focus_menu : t -> bool Solidtype.Solid.setter + = "setAutoFocusMenu" + [@@mel.get] + + external start_leave_timer : t -> unit -> unit = "startLeaveTimer" + [@@mel.send] + + external cancel_leave_timer : t -> unit -> unit = "cancelLeaveTimer" + [@@mel.send] + + external root_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "rootRef" + [@@mel.get] + + external set_root_ref : t -> Dom.htmlElement Solidtype.Solid.setter + = "setRootRef" + [@@mel.get] + + external viewport_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "viewportRef" + [@@mel.get] + + external set_viewport_ref : t -> Dom.htmlElement Solidtype.Solid.setter + = "setViewportRef" + [@@mel.get] + + external viewport_present : t -> bool Solidtype.Solid.accessor + = "viewportPresent" + [@@mel.get] + + external current_placement : t -> string Solidtype.Solid.accessor + = "currentPlacement" + [@@mel.get] + + external previous_menu : t -> string option Solidtype.Solid.accessor + = "previousMenu" + [@@mel.get] + + external set_previous_menu : t -> string option Solidtype.Solid.setter + = "setPreviousMenu" + [@@mel.get] + + external make : + dataset: + (t_navigation_menu_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + delay_duration:(float Solidtype.Solid.accessor[@mel.as "delayDuration"]) -> + skip_delay_duration: + (float Solidtype.Solid.accessor[@mel.as "skipDelayDuration"]) -> + auto_focus_menu:(bool Solidtype.Solid.accessor[@mel.as "autoFocusMenu"]) -> + set_auto_focus_menu: + (bool Solidtype.Solid.setter[@mel.as "setAutoFocusMenu"]) -> + start_leave_timer:((unit -> unit)[@mel.as "startLeaveTimer"]) -> + cancel_leave_timer:((unit -> unit)[@mel.as "cancelLeaveTimer"]) -> + root_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "rootRef"]) -> + set_root_ref:(Dom.htmlElement Solidtype.Solid.setter[@mel.as "setRootRef"]) -> + viewport_ref: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "viewportRef"]) -> + set_viewport_ref: + (Dom.htmlElement Solidtype.Solid.setter[@mel.as "setViewportRef"]) -> + viewport_present:(bool Solidtype.Solid.accessor[@mel.as "viewportPresent"]) -> + current_placement: + (string Solidtype.Solid.accessor[@mel.as "currentPlacement"]) -> + previous_menu: + (string option Solidtype.Solid.accessor[@mel.as "previousMenu"]) -> + set_previous_menu: + (string option Solidtype.Solid.setter[@mel.as "setPreviousMenu"]) -> + unit -> + t = "" + [@@mel.obj] end module NumberFieldContextValue : sig type t = t_number_field_context_value - external value : t -> (string, float) either option Solidtype.Solid.accessor = "value" [@@mel.get] - external set_value : t -> (string, float) either -> unit = "setValue" [@@mel.send] - external raw_value : t -> float Solidtype.Solid.accessor = "rawValue" [@@mel.get] + + external value : t -> (string, float) either option Solidtype.Solid.accessor + = "value" + [@@mel.get] + + external set_value : t -> (string, float) either -> unit = "setValue" + [@@mel.send] + + external raw_value : t -> float Solidtype.Solid.accessor = "rawValue" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] external format_number : t -> float -> string = "formatNumber" [@@mel.send] external format : t -> unit -> unit = "format" [@@mel.send] - external on_input : t -> (Dom.inputEvent -> unit, (Dom.htmlInputElement, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either = "onInput" [@@mel.get] - external text_value : t -> string option Solidtype.Solid.accessor = "textValue" [@@mel.get] - external min_value : t -> float Solidtype.Solid.accessor = "minValue" [@@mel.get] - external max_value : t -> float Solidtype.Solid.accessor = "maxValue" [@@mel.get] + + external on_input : + t -> + ( Dom.inputEvent -> unit, + ( Dom.htmlInputElement, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either = "onInput" + [@@mel.get] + + external text_value : t -> string option Solidtype.Solid.accessor + = "textValue" + [@@mel.get] + + external min_value : t -> float Solidtype.Solid.accessor = "minValue" + [@@mel.get] + + external max_value : t -> float Solidtype.Solid.accessor = "maxValue" + [@@mel.get] + external step : t -> float Solidtype.Solid.accessor = "step" [@@mel.get] - external large_step : t -> float Solidtype.Solid.accessor = "largeStep" [@@mel.get] - external change_on_wheel : t -> bool Solidtype.Solid.accessor = "changeOnWheel" [@@mel.get] - external translations : t -> t_color_channel_field_root_translations option Solidtype.Solid.accessor = "translations" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external hidden_input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "hiddenInputRef" [@@mel.get] - external set_hidden_input_ref : t -> Dom.htmlInputElement -> unit = "setHiddenInputRef" [@@mel.send] + + external large_step : t -> float Solidtype.Solid.accessor = "largeStep" + [@@mel.get] + + external change_on_wheel : t -> bool Solidtype.Solid.accessor + = "changeOnWheel" + [@@mel.get] + + external translations : + t -> t_color_channel_field_root_translations option Solidtype.Solid.accessor + = "translations" + [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external hidden_input_ref : + t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "hiddenInputRef" + [@@mel.get] + + external set_hidden_input_ref : t -> Dom.htmlInputElement -> unit + = "setHiddenInputRef" + [@@mel.send] + external vary_value : t -> float -> unit = "varyValue" [@@mel.send] - external make : value:((string, float) either option Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:(((string, float) either -> unit) [@mel.as "setValue"]) -> raw_value:(float Solidtype.Solid.accessor [@mel.as "rawValue"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> format_number:((float -> string) [@mel.as "formatNumber"]) -> format:((unit -> unit) [@mel.as "format"]) -> on_input:((Dom.inputEvent -> unit, (Dom.htmlInputElement, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either [@mel.as "onInput"]) -> text_value:(string option Solidtype.Solid.accessor [@mel.as "textValue"]) -> min_value:(float Solidtype.Solid.accessor [@mel.as "minValue"]) -> max_value:(float Solidtype.Solid.accessor [@mel.as "maxValue"]) -> step:(float Solidtype.Solid.accessor [@mel.as "step"]) -> large_step:(float Solidtype.Solid.accessor [@mel.as "largeStep"]) -> change_on_wheel:(bool Solidtype.Solid.accessor [@mel.as "changeOnWheel"]) -> translations:(t_color_channel_field_root_translations option Solidtype.Solid.accessor [@mel.as "translations"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> hidden_input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "hiddenInputRef"]) -> set_hidden_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setHiddenInputRef"]) -> vary_value:((float -> unit) [@mel.as "varyValue"]) -> unit -> t = "" [@@mel.obj] -end -module Pagination_Root_ItemComponent : sig - type t = t_pagination_root_item_component + external make : + value: + ((string, float) either option Solidtype.Solid.accessor[@mel.as "value"]) -> + set_value:(((string, float) either -> unit)[@mel.as "setValue"]) -> + raw_value:(float Solidtype.Solid.accessor[@mel.as "rawValue"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + format_number:((float -> string)[@mel.as "formatNumber"]) -> + format:((unit -> unit)[@mel.as "format"]) -> + on_input: + (( Dom.inputEvent -> unit, + ( Dom.htmlInputElement, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onInput"]) -> + text_value:(string option Solidtype.Solid.accessor[@mel.as "textValue"]) -> + min_value:(float Solidtype.Solid.accessor[@mel.as "minValue"]) -> + max_value:(float Solidtype.Solid.accessor[@mel.as "maxValue"]) -> + step:(float Solidtype.Solid.accessor[@mel.as "step"]) -> + large_step:(float Solidtype.Solid.accessor[@mel.as "largeStep"]) -> + change_on_wheel:(bool Solidtype.Solid.accessor[@mel.as "changeOnWheel"]) -> + translations: + (t_color_channel_field_root_translations option Solidtype.Solid.accessor + [@mel.as "translations"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + hidden_input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor + [@mel.as "hiddenInputRef"]) -> + set_hidden_input_ref: + ((Dom.htmlInputElement -> unit)[@mel.as "setHiddenInputRef"]) -> + vary_value:((float -> unit)[@mel.as "varyValue"]) -> + unit -> + t = "" + [@@mel.obj] +end + +module Pagination_Root_ItemComponent_Props : sig + type t = t_pagination_root_item_component_props + external page : t -> float = "page" [@@mel.get] - external make : page:(float [@mel.as "page"]) -> unit -> t = "" [@@mel.obj] + external make : page:(float[@mel.as "page"]) -> unit -> t = "" [@@mel.obj] end module PaginationContextValue : sig type t = t_pagination_context_value + external count : t -> float Solidtype.Solid.accessor = "count" [@@mel.get] - external sibling_count : t -> float Solidtype.Solid.accessor = "siblingCount" [@@mel.get] - external show_first : t -> bool Solidtype.Solid.accessor = "showFirst" [@@mel.get] - external show_last : t -> bool Solidtype.Solid.accessor = "showLast" [@@mel.get] - external fixed_items : t -> (string, bool) either Solidtype.Solid.accessor = "fixedItems" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external render_item : t -> float -> Solidtype.Jsx.element = "renderItem" [@@mel.send] - external render_ellipsis : t -> unit -> Solidtype.Jsx.element = "renderEllipsis" [@@mel.send] + + external sibling_count : t -> float Solidtype.Solid.accessor = "siblingCount" + [@@mel.get] + + external show_first : t -> bool Solidtype.Solid.accessor = "showFirst" + [@@mel.get] + + external show_last : t -> bool Solidtype.Solid.accessor = "showLast" + [@@mel.get] + + external fixed_items : t -> (string, bool) either Solidtype.Solid.accessor + = "fixedItems" + [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external render_item : t -> float -> Solidtype.Jsx.element = "renderItem" + [@@mel.send] + + external render_ellipsis : t -> unit -> Solidtype.Jsx.element + = "renderEllipsis" + [@@mel.send] + external page : t -> float Solidtype.Solid.accessor = "page" [@@mel.get] external set_page : t -> float Solidtype.Solid.setter = "setPage" [@@mel.get] - external make : count:(float Solidtype.Solid.accessor [@mel.as "count"]) -> sibling_count:(float Solidtype.Solid.accessor [@mel.as "siblingCount"]) -> show_first:(bool Solidtype.Solid.accessor [@mel.as "showFirst"]) -> show_last:(bool Solidtype.Solid.accessor [@mel.as "showLast"]) -> fixed_items:((string, bool) either Solidtype.Solid.accessor [@mel.as "fixedItems"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> render_item:((float -> Solidtype.Jsx.element) [@mel.as "renderItem"]) -> render_ellipsis:((unit -> Solidtype.Jsx.element) [@mel.as "renderEllipsis"]) -> page:(float Solidtype.Solid.accessor [@mel.as "page"]) -> set_page:(float Solidtype.Solid.setter [@mel.as "setPage"]) -> unit -> t = "" [@@mel.obj] + + external make : + count:(float Solidtype.Solid.accessor[@mel.as "count"]) -> + sibling_count:(float Solidtype.Solid.accessor[@mel.as "siblingCount"]) -> + show_first:(bool Solidtype.Solid.accessor[@mel.as "showFirst"]) -> + show_last:(bool Solidtype.Solid.accessor[@mel.as "showLast"]) -> + fixed_items: + ((string, bool) either Solidtype.Solid.accessor[@mel.as "fixedItems"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + render_item:((float -> Solidtype.Jsx.element)[@mel.as "renderItem"]) -> + render_ellipsis:((unit -> Solidtype.Jsx.element)[@mel.as "renderEllipsis"]) -> + page:(float Solidtype.Solid.accessor[@mel.as "page"]) -> + set_page:(float Solidtype.Solid.setter[@mel.as "setPage"]) -> + unit -> + t = "" + [@@mel.obj] end module Popover_Root_Translations : sig type t = t_popover_root_translations + external dismiss : t -> string = "dismiss" [@@mel.get] - external make : dismiss:(string [@mel.as "dismiss"]) -> unit -> t = "" [@@mel.obj] + + external make : dismiss:(string[@mel.as "dismiss"]) -> unit -> t = "" + [@@mel.obj] end module PopoverContextValue : sig type t = t_popover_context_value - external translations : t -> t_popover_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] - external dataset : t -> t_popover_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external translations : + t -> t_popover_root_translations Solidtype.Solid.accessor = "translations" + [@@mel.get] + + external dataset : t -> t_popover_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] external is_modal : t -> bool Solidtype.Solid.accessor = "isModal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] - external title_id : t -> string option Solidtype.Solid.accessor = "titleId" [@@mel.get] - external description_id : t -> string option Solidtype.Solid.accessor = "descriptionId" [@@mel.get] - external set_default_anchor_ref : t -> Dom.htmlElement -> unit = "setDefaultAnchorRef" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + + external title_id : t -> string option Solidtype.Solid.accessor = "titleId" + [@@mel.get] + + external description_id : t -> string option Solidtype.Solid.accessor + = "descriptionId" + [@@mel.get] + + external set_default_anchor_ref : t -> Dom.htmlElement -> unit + = "setDefaultAnchorRef" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + external close : t -> unit -> unit = "close" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_content_id : t -> string -> (unit -> unit) - val register_title_id : t -> string -> (unit -> unit) - val register_description_id : t -> string -> (unit -> unit) - val make : translations:t_popover_root_translations Solidtype.Solid.accessor -> dataset:t_popover_data_set Solidtype.Solid.accessor -> is_open:bool Solidtype.Solid.accessor -> is_modal:bool Solidtype.Solid.accessor -> prevent_scroll:bool Solidtype.Solid.accessor -> content_present:bool Solidtype.Solid.accessor -> trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> content_id:string option Solidtype.Solid.accessor -> title_id:string option Solidtype.Solid.accessor -> description_id:string option Solidtype.Solid.accessor -> set_default_anchor_ref:(Dom.htmlElement -> unit) -> set_trigger_ref:(Dom.htmlElement -> unit) -> set_content_ref:(Dom.htmlElement -> unit) -> close:(unit -> unit) -> toggle:(unit -> unit) -> generate_id:(string -> string) -> register_content_id:(string -> (unit -> unit)) -> register_title_id:(string -> (unit -> unit)) -> register_description_id:(string -> (unit -> unit)) -> unit -> t + val register_content_id : t -> string -> unit -> unit + val register_title_id : t -> string -> unit -> unit + val register_description_id : t -> string -> unit -> unit + + val make : + translations:t_popover_root_translations Solidtype.Solid.accessor -> + dataset:t_popover_data_set Solidtype.Solid.accessor -> + is_open:bool Solidtype.Solid.accessor -> + is_modal:bool Solidtype.Solid.accessor -> + prevent_scroll:bool Solidtype.Solid.accessor -> + content_present:bool Solidtype.Solid.accessor -> + trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + content_id:string option Solidtype.Solid.accessor -> + title_id:string option Solidtype.Solid.accessor -> + description_id:string option Solidtype.Solid.accessor -> + set_default_anchor_ref:(Dom.htmlElement -> unit) -> + set_trigger_ref:(Dom.htmlElement -> unit) -> + set_content_ref:(Dom.htmlElement -> unit) -> + close:(unit -> unit) -> + toggle:(unit -> unit) -> + generate_id:(string -> string) -> + register_content_id:(string -> unit -> unit) -> + register_title_id:(string -> unit -> unit) -> + register_description_id:(string -> unit -> unit) -> + unit -> + t end module ProgressContextValue : sig type t = t_progress_context_value - external dataset : t -> t_progress_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] - external progress_fill_width : t -> string option Solidtype.Solid.accessor = "progressFillWidth" [@@mel.get] + + external dataset : t -> t_progress_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + + external progress_fill_width : t -> string option Solidtype.Solid.accessor + = "progressFillWidth" + [@@mel.get] + external value : t -> float Solidtype.Solid.accessor = "value" [@@mel.get] - external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" [@@mel.get] - external value_label : t -> string option Solidtype.Solid.accessor = "valueLabel" [@@mel.get] - external label_id : t -> string option Solidtype.Solid.accessor = "labelId" [@@mel.get] + + external value_percent : t -> float Solidtype.Solid.accessor = "valuePercent" + [@@mel.get] + + external value_label : t -> string option Solidtype.Solid.accessor + = "valueLabel" + [@@mel.get] + + external label_id : t -> string option Solidtype.Solid.accessor = "labelId" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_label_id : t -> string -> (unit -> unit) - val make : dataset:t_progress_data_set Solidtype.Solid.accessor -> progress_fill_width:string option Solidtype.Solid.accessor -> value:float Solidtype.Solid.accessor -> value_percent:float Solidtype.Solid.accessor -> value_label:string option Solidtype.Solid.accessor -> label_id:string option Solidtype.Solid.accessor -> generate_id:(string -> string) -> register_label_id:(string -> (unit -> unit)) -> unit -> t + val register_label_id : t -> string -> unit -> unit + + val make : + dataset:t_progress_data_set Solidtype.Solid.accessor -> + progress_fill_width:string option Solidtype.Solid.accessor -> + value:float Solidtype.Solid.accessor -> + value_percent:float Solidtype.Solid.accessor -> + value_label:string option Solidtype.Solid.accessor -> + label_id:string option Solidtype.Solid.accessor -> + generate_id:(string -> string) -> + register_label_id:(string -> unit -> unit) -> + unit -> + t end module RadioGroupContextValue : sig type t = t_radio_group_context_value - external aria_described_by : t -> string option Solidtype.Solid.accessor = "ariaDescribedBy" [@@mel.get] - external is_default_value : t -> string -> bool = "isDefaultValue" [@@mel.send] - external is_selected_value : t -> string -> bool = "isSelectedValue" [@@mel.send] - external set_selected_value : t -> string -> unit = "setSelectedValue" [@@mel.send] - external make : aria_described_by:(string option Solidtype.Solid.accessor [@mel.as "ariaDescribedBy"]) -> is_default_value:((string -> bool) [@mel.as "isDefaultValue"]) -> is_selected_value:((string -> bool) [@mel.as "isSelectedValue"]) -> set_selected_value:((string -> unit) [@mel.as "setSelectedValue"]) -> unit -> t = "" [@@mel.obj] + + external aria_described_by : t -> string option Solidtype.Solid.accessor + = "ariaDescribedBy" + [@@mel.get] + + external is_default_value : t -> string -> bool = "isDefaultValue" + [@@mel.send] + + external is_selected_value : t -> string -> bool = "isSelectedValue" + [@@mel.send] + + external set_selected_value : t -> string -> unit = "setSelectedValue" + [@@mel.send] + + external make : + aria_described_by: + (string option Solidtype.Solid.accessor[@mel.as "ariaDescribedBy"]) -> + is_default_value:((string -> bool)[@mel.as "isDefaultValue"]) -> + is_selected_value:((string -> bool)[@mel.as "isSelectedValue"]) -> + set_selected_value:((string -> unit)[@mel.as "setSelectedValue"]) -> + unit -> + t = "" + [@@mel.obj] end module RatingItemState : sig type t = t_rating_item_state + external half : t -> bool Solidtype.Solid.accessor = "half" [@@mel.get] - external highlighted : t -> bool Solidtype.Solid.accessor = "highlighted" [@@mel.get] - external make : half:(bool Solidtype.Solid.accessor [@mel.as "half"]) -> highlighted:(bool Solidtype.Solid.accessor [@mel.as "highlighted"]) -> unit -> t = "" [@@mel.obj] + + external highlighted : t -> bool Solidtype.Solid.accessor = "highlighted" + [@@mel.get] + + external make : + half:(bool Solidtype.Solid.accessor[@mel.as "half"]) -> + highlighted:(bool Solidtype.Solid.accessor[@mel.as "highlighted"]) -> + unit -> + t = "" + [@@mel.obj] end module SearchContextValue : sig type t = t_search_context_value + + external no_result : t -> bool Solidtype.Solid.accessor = "noResult" + [@@mel.get] (** No results found *) - external no_result : t -> bool Solidtype.Solid.accessor = "noResult" [@@mel.get] + + external is_loading_suggestions : t -> bool Solidtype.Solid.accessor + = "isLoadingSuggestions" + [@@mel.get] (** Are we currently loading suggestions? *) - external is_loading_suggestions : t -> bool Solidtype.Solid.accessor = "isLoadingSuggestions" [@@mel.get] - external make : no_result:(bool Solidtype.Solid.accessor [@mel.as "noResult"]) -> is_loading_suggestions:(bool Solidtype.Solid.accessor [@mel.as "isLoadingSuggestions"]) -> unit -> t = "" [@@mel.obj] + + external make : + no_result:(bool Solidtype.Solid.accessor[@mel.as "noResult"]) -> + is_loading_suggestions: + (bool Solidtype.Solid.accessor[@mel.as "isLoadingSuggestions"]) -> + unit -> + t = "" + [@@mel.obj] end module SegmentedControlContextValue : sig type t = t_segmented_control_context_value - external value : t -> string option Solidtype.Solid.accessor = "value" [@@mel.get] - external default_value : t -> string option Solidtype.Solid.accessor = "defaultValue" [@@mel.get] - external orientation : t -> [ `horizontal | `vertical ] option Solidtype.Solid.accessor = "orientation" [@@mel.get] - external root : t -> Dom.htmlElement option Solidtype.Solid.accessor = "root" [@@mel.get] - external selected_item : t -> Dom.htmlElement option Solidtype.Solid.accessor = "selectedItem" [@@mel.get] - external set_selected_item : t -> Dom.htmlElement option Solidtype.Solid.setter = "setSelectedItem" [@@mel.get] - external make : value:(string option Solidtype.Solid.accessor [@mel.as "value"]) -> default_value:(string option Solidtype.Solid.accessor [@mel.as "defaultValue"]) -> orientation:([ `horizontal | `vertical ] option Solidtype.Solid.accessor [@mel.as "orientation"]) -> root:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "root"]) -> selected_item:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "selectedItem"]) -> set_selected_item:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setSelectedItem"]) -> unit -> t = "" [@@mel.obj] + + external value : t -> string option Solidtype.Solid.accessor = "value" + [@@mel.get] + + external default_value : t -> string option Solidtype.Solid.accessor + = "defaultValue" + [@@mel.get] + + external orientation : + t -> [ `horizontal | `vertical ] option Solidtype.Solid.accessor + = "orientation" + [@@mel.get] + + external root : t -> Dom.htmlElement option Solidtype.Solid.accessor = "root" + [@@mel.get] + + external selected_item : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "selectedItem" + [@@mel.get] + + external set_selected_item : + t -> Dom.htmlElement option Solidtype.Solid.setter = "setSelectedItem" + [@@mel.get] + + external make : + value:(string option Solidtype.Solid.accessor[@mel.as "value"]) -> + default_value: + (string option Solidtype.Solid.accessor[@mel.as "defaultValue"]) -> + orientation: + ([ `horizontal | `vertical ] option Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + root:(Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "root"]) -> + selected_item: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "selectedItem"]) -> + set_selected_item: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setSelectedItem"]) -> + unit -> + t = "" + [@@mel.obj] end module SelectBaseItemComponentProps : sig type 't t = 't t_select_base_item_component_props + + external item : 't t -> 't t_collection_node = "item" + [@@mel.get] (** The item to render. *) - external item : 't t -> 't t_collection_node = "item" [@@mel.get] - external make : item:('t t_collection_node [@mel.as "item"]) -> unit -> 't t = "" [@@mel.obj] + + external make : item:('t t_collection_node[@mel.as "item"]) -> unit -> 't t + = "" + [@@mel.obj] end module SelectBaseSectionComponentProps : sig type 't t = 't t_select_base_section_component_props + + external section : 't t -> 't t_collection_node = "section" + [@@mel.get] (** The section to render. *) - external section : 't t -> 't t_collection_node = "section" [@@mel.get] - external make : section:('t t_collection_node [@mel.as "section"]) -> unit -> 't t = "" [@@mel.obj] + + external make : + section:('t t_collection_node[@mel.as "section"]) -> unit -> 't t = "" + [@@mel.obj] end module SelectValueState : sig type 'option t = 'option t_select_value_state + + external selected_option : 'option t -> 'option Solidtype.Solid.accessor + = "selectedOption" + [@@mel.get] (** The first (or only, in case of single select) selected option. *) - external selected_option : 'option t -> 'option Solidtype.Solid.accessor = "selectedOption" [@@mel.get] - (** An array of selected options. It will contain only one value in case of single select. *) - external selected_options : 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" [@@mel.get] + + external selected_options : + 'option t -> 'option array Solidtype.Solid.accessor = "selectedOptions" + [@@mel.get] + (** An array of selected options. It will contain only one value in case of + single select. *) + + external remove : 'option t -> 'option -> unit = "remove" + [@@mel.send] (** A function to remove an option from the selection. *) - external remove : 'option t -> 'option -> unit = "remove" [@@mel.send] + + external clear : 'option t -> unit -> unit = "clear" + [@@mel.send] (** A function to clear the selection. *) - external clear : 'option t -> unit -> unit = "clear" [@@mel.send] - external make : selected_option:('option Solidtype.Solid.accessor [@mel.as "selectedOption"]) -> selected_options:('option array Solidtype.Solid.accessor [@mel.as "selectedOptions"]) -> remove:(('option -> unit) [@mel.as "remove"]) -> clear:((unit -> unit) [@mel.as "clear"]) -> unit -> 'option t = "" [@@mel.obj] + + external make : + selected_option:('option Solidtype.Solid.accessor[@mel.as "selectedOption"]) -> + selected_options: + ('option array Solidtype.Solid.accessor[@mel.as "selectedOptions"]) -> + remove:(('option -> unit)[@mel.as "remove"]) -> + clear:((unit -> unit)[@mel.as "clear"]) -> + unit -> + 'option t = "" + [@@mel.obj] end module SelectContextValue : sig type t = t_select_context_value - external dataset : t -> t_select_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_select_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" [@@mel.get] - external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" + [@@mel.get] + + external is_virtualized : t -> bool Solidtype.Solid.accessor = "isVirtualized" + [@@mel.get] + external is_modal : t -> bool Solidtype.Solid.accessor = "isModal" [@@mel.get] - external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" [@@mel.get] - external disallow_type_ahead : t -> bool Solidtype.Solid.accessor = "disallowTypeAhead" [@@mel.get] - external should_focus_wrap : t -> bool Solidtype.Solid.accessor = "shouldFocusWrap" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external auto_focus : t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor = "autoFocus" [@@mel.get] - external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "triggerRef" [@@mel.get] - external trigger_id : t -> string option Solidtype.Solid.accessor = "triggerId" [@@mel.get] - external value_id : t -> string option Solidtype.Solid.accessor = "valueId" [@@mel.get] - external listbox_id : t -> string option Solidtype.Solid.accessor = "listboxId" [@@mel.get] - external listbox_aria_labelled_by : t -> string option Solidtype.Solid.accessor = "listboxAriaLabelledBy" [@@mel.get] - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor = "keyboardDelegate" [@@mel.get] - external set_listbox_aria_labelled_by : t -> string option Solidtype.Solid.setter = "setListboxAriaLabelledBy" [@@mel.get] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" [@@mel.send] - external open_ : t -> ([ `first | `last ], bool) either -> unit = "open" [@@mel.send] + + external prevent_scroll : t -> bool Solidtype.Solid.accessor = "preventScroll" + [@@mel.get] + + external disallow_type_ahead : t -> bool Solidtype.Solid.accessor + = "disallowTypeAhead" + [@@mel.get] + + external should_focus_wrap : t -> bool Solidtype.Solid.accessor + = "shouldFocusWrap" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external auto_focus : + t -> ([ `first | `last ], bool) either Solidtype.Solid.accessor + = "autoFocus" + [@@mel.get] + + external trigger_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "triggerRef" + [@@mel.get] + + external trigger_id : t -> string option Solidtype.Solid.accessor + = "triggerId" + [@@mel.get] + + external value_id : t -> string option Solidtype.Solid.accessor = "valueId" + [@@mel.get] + + external listbox_id : t -> string option Solidtype.Solid.accessor + = "listboxId" + [@@mel.get] + + external listbox_aria_labelled_by : + t -> string option Solidtype.Solid.accessor = "listboxAriaLabelledBy" + [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + + external keyboard_delegate : t -> t_keyboard_delegate Solidtype.Solid.accessor + = "keyboardDelegate" + [@@mel.get] + + external set_listbox_aria_labelled_by : + t -> string option Solidtype.Solid.setter = "setListboxAriaLabelledBy" + [@@mel.get] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + external set_listbox_ref : t -> Dom.htmlElement -> unit = "setListboxRef" + [@@mel.send] + + external open_ : t -> ([ `first | `last ], bool) either -> unit = "open" + [@@mel.send] + external close : t -> unit -> unit = "close" [@@mel.send] - external toggle : t -> ([ `first | `last ], bool) either -> unit = "toggle" [@@mel.send] - external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor = "placeholder" [@@mel.get] - external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderItem" [@@mel.send] - external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element = "renderSection" [@@mel.send] + + external toggle : t -> ([ `first | `last ], bool) either -> unit = "toggle" + [@@mel.send] + + external placeholder : t -> Solidtype.Jsx.element Solidtype.Solid.accessor + = "placeholder" + [@@mel.get] + + external render_item : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderItem" + [@@mel.send] + + external render_section : t -> _ t_collection_node -> Solidtype.Jsx.element + = "renderSection" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_trigger_id : t -> string -> (unit -> unit) - val register_value_id : t -> string -> (unit -> unit) - val register_listbox_id : t -> string -> (unit -> unit) - val make : dataset:t_select_data_set Solidtype.Solid.accessor -> is_open:bool Solidtype.Solid.accessor -> is_disabled:bool Solidtype.Solid.accessor -> is_multiple:bool Solidtype.Solid.accessor -> is_virtualized:bool Solidtype.Solid.accessor -> is_modal:bool Solidtype.Solid.accessor -> prevent_scroll:bool Solidtype.Solid.accessor -> disallow_type_ahead:bool Solidtype.Solid.accessor -> should_focus_wrap:bool Solidtype.Solid.accessor -> content_present:bool Solidtype.Solid.accessor -> auto_focus:([ `first | `last ], bool) either Solidtype.Solid.accessor -> trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> trigger_id:string option Solidtype.Solid.accessor -> value_id:string option Solidtype.Solid.accessor -> listbox_id:string option Solidtype.Solid.accessor -> listbox_aria_labelled_by:string option Solidtype.Solid.accessor -> list_state:t_list_state Solidtype.Solid.accessor -> keyboard_delegate:t_keyboard_delegate Solidtype.Solid.accessor -> set_listbox_aria_labelled_by:string option Solidtype.Solid.setter -> set_trigger_ref:(Dom.htmlElement -> unit) -> set_content_ref:(Dom.htmlElement -> unit) -> set_listbox_ref:(Dom.htmlElement -> unit) -> open_:(([ `first | `last ], bool) either -> unit) -> close:(unit -> unit) -> toggle:(([ `first | `last ], bool) either -> unit) -> placeholder:Solidtype.Jsx.element Solidtype.Solid.accessor -> render_item:(_ t_collection_node -> Solidtype.Jsx.element) -> render_section:(_ t_collection_node -> Solidtype.Jsx.element) -> generate_id:(string -> string) -> register_trigger_id:(string -> (unit -> unit)) -> register_value_id:(string -> (unit -> unit)) -> register_listbox_id:(string -> (unit -> unit)) -> unit -> t -end + val register_trigger_id : t -> string -> unit -> unit + val register_value_id : t -> string -> unit -> unit + val register_listbox_id : t -> string -> unit -> unit + + val make : + dataset:t_select_data_set Solidtype.Solid.accessor -> + is_open:bool Solidtype.Solid.accessor -> + is_disabled:bool Solidtype.Solid.accessor -> + is_multiple:bool Solidtype.Solid.accessor -> + is_virtualized:bool Solidtype.Solid.accessor -> + is_modal:bool Solidtype.Solid.accessor -> + prevent_scroll:bool Solidtype.Solid.accessor -> + disallow_type_ahead:bool Solidtype.Solid.accessor -> + should_focus_wrap:bool Solidtype.Solid.accessor -> + content_present:bool Solidtype.Solid.accessor -> + auto_focus:([ `first | `last ], bool) either Solidtype.Solid.accessor -> + trigger_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + trigger_id:string option Solidtype.Solid.accessor -> + value_id:string option Solidtype.Solid.accessor -> + listbox_id:string option Solidtype.Solid.accessor -> + listbox_aria_labelled_by:string option Solidtype.Solid.accessor -> + list_state:t_list_state Solidtype.Solid.accessor -> + keyboard_delegate:t_keyboard_delegate Solidtype.Solid.accessor -> + set_listbox_aria_labelled_by:string option Solidtype.Solid.setter -> + set_trigger_ref:(Dom.htmlElement -> unit) -> + set_content_ref:(Dom.htmlElement -> unit) -> + set_listbox_ref:(Dom.htmlElement -> unit) -> + open_:(([ `first | `last ], bool) either -> unit) -> + close:(unit -> unit) -> + toggle:(([ `first | `last ], bool) either -> unit) -> + placeholder:Solidtype.Jsx.element Solidtype.Solid.accessor -> + render_item:(t_unknown t_collection_node -> Solidtype.Jsx.element) -> + render_section:(t_unknown t_collection_node -> Solidtype.Jsx.element) -> + generate_id:(string -> string) -> + register_trigger_id:(string -> unit -> unit) -> + register_value_id:(string -> unit -> unit) -> + register_listbox_id:(string -> unit -> unit) -> + unit -> + t +end + +module Slider_GetValueLabelParams : sig + type t = t_slider_get_value_label_params -module GetValueLabelParams2 : sig - type t = t_get_value_label_params2 external values : t -> float array = "values" [@@mel.get] external min : t -> float = "min" [@@mel.get] external max : t -> float = "max" [@@mel.get] - external make : values:(float array [@mel.as "values"]) -> min:(float [@mel.as "min"]) -> max:(float [@mel.as "max"]) -> unit -> t = "" [@@mel.obj] + + external make : + values:(float array[@mel.as "values"]) -> + min:(float[@mel.as "min"]) -> + max:(float[@mel.as "max"]) -> + unit -> + t = "" + [@@mel.obj] end module SliderContextValue : sig type t = t_slider_context_value - external dataset : t -> t_slider_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_slider_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external state : t -> t_slider_state = "state" [@@mel.get] - external thumbs : t -> t_collection_item_with_ref array Solidtype.Solid.accessor = "thumbs" [@@mel.get] - external set_thumbs : t -> t_collection_item_with_ref array Solidtype.Solid.setter = "setThumbs" [@@mel.get] - external on_slide_start : t -> (float -> float -> unit) option = "onSlideStart" [@@mel.get] - external on_slide_move : t -> (t_slider_context_value_on_slide_move -> unit) option = "onSlideMove" [@@mel.get] + + external thumbs : + t -> t_collection_item_with_ref array Solidtype.Solid.accessor = "thumbs" + [@@mel.get] + + external set_thumbs : + t -> t_collection_item_with_ref array Solidtype.Solid.setter = "setThumbs" + [@@mel.get] + + external on_slide_start : t -> (float -> float -> unit) option + = "onSlideStart" + [@@mel.get] + + external on_slide_move : + t -> (t_slider_context_value_on_slide_move_deltas -> unit) option + = "onSlideMove" + [@@mel.get] + external on_slide_end : t -> (unit -> unit) option = "onSlideEnd" [@@mel.get] - external on_step_key_down : t -> Dom.keyboardEvent -> float -> unit = "onStepKeyDown" [@@mel.send] - external is_sliding_from_left : t -> unit -> bool = "isSlidingFromLeft" [@@mel.send] - external is_sliding_from_bottom : t -> unit -> bool = "isSlidingFromBottom" [@@mel.send] - external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor = "trackRef" [@@mel.get] - external start_edge : t -> [ `top | `bottom | `left | `right ] Solidtype.Solid.accessor = "startEdge" [@@mel.get] - external end_edge : t -> [ `top | `bottom | `left | `right ] Solidtype.Solid.accessor = "endEdge" [@@mel.get] - external min_value : t -> float Solidtype.Solid.accessor = "minValue" [@@mel.get] - external max_value : t -> float Solidtype.Solid.accessor = "maxValue" [@@mel.get] - external inverted : t -> bool Solidtype.Solid.accessor = "inverted" [@@mel.get] - external register_track : t -> Dom.htmlElement -> unit = "registerTrack" [@@mel.send] + + external on_step_key_down : t -> Dom.keyboardEvent -> float -> unit + = "onStepKeyDown" + [@@mel.send] + + external is_sliding_from_left : t -> unit -> bool = "isSlidingFromLeft" + [@@mel.send] + + external is_sliding_from_bottom : t -> unit -> bool = "isSlidingFromBottom" + [@@mel.send] + + external track_ref : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "trackRef" + [@@mel.get] + + external start_edge : + t -> [ `bottom | `left | `right | `top ] Solidtype.Solid.accessor + = "startEdge" + [@@mel.get] + + external end_edge : + t -> [ `bottom | `left | `right | `top ] Solidtype.Solid.accessor + = "endEdge" + [@@mel.get] + + external min_value : t -> float Solidtype.Solid.accessor = "minValue" + [@@mel.get] + + external max_value : t -> float Solidtype.Solid.accessor = "maxValue" + [@@mel.get] + + external inverted : t -> bool Solidtype.Solid.accessor = "inverted" + [@@mel.get] + + external register_track : t -> Dom.htmlElement -> unit = "registerTrack" + [@@mel.send] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external get_value_label : t -> (t_get_value_label_params2 -> string) option = "getValueLabel" [@@mel.get] - external make : dataset:(t_slider_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> state:(t_slider_state [@mel.as "state"]) -> thumbs:(t_collection_item_with_ref array Solidtype.Solid.accessor [@mel.as "thumbs"]) -> set_thumbs:(t_collection_item_with_ref array Solidtype.Solid.setter [@mel.as "setThumbs"]) -> on_slide_start:((float -> float -> unit) option [@mel.as "onSlideStart"]) -> on_slide_move:((t_slider_context_value_on_slide_move -> unit) option [@mel.as "onSlideMove"]) -> on_slide_end:((unit -> unit) option [@mel.as "onSlideEnd"]) -> on_step_key_down:((Dom.keyboardEvent -> float -> unit) [@mel.as "onStepKeyDown"]) -> is_sliding_from_left:((unit -> bool) [@mel.as "isSlidingFromLeft"]) -> is_sliding_from_bottom:((unit -> bool) [@mel.as "isSlidingFromBottom"]) -> track_ref:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "trackRef"]) -> start_edge:([ `top | `bottom | `left | `right ] Solidtype.Solid.accessor [@mel.as "startEdge"]) -> end_edge:([ `top | `bottom | `left | `right ] Solidtype.Solid.accessor [@mel.as "endEdge"]) -> min_value:(float Solidtype.Solid.accessor [@mel.as "minValue"]) -> max_value:(float Solidtype.Solid.accessor [@mel.as "maxValue"]) -> inverted:(bool Solidtype.Solid.accessor [@mel.as "inverted"]) -> register_track:((Dom.htmlElement -> unit) [@mel.as "registerTrack"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> get_value_label:((t_get_value_label_params2 -> string) option [@mel.as "getValueLabel"]) -> unit -> t = "" [@@mel.obj] + + external get_value_label : + t -> (t_slider_get_value_label_params -> string) option = "getValueLabel" + [@@mel.get] + + val make : + dataset:t_slider_data_set Solidtype.Solid.accessor -> + state:t_slider_state -> + thumbs:t_collection_item_with_ref array Solidtype.Solid.accessor -> + set_thumbs:t_collection_item_with_ref array Solidtype.Solid.setter -> + on_slide_start:(float -> float -> unit) option -> + on_slide_move:(t_slider_context_value_on_slide_move_deltas -> unit) option -> + on_slide_end:(unit -> unit) option -> + on_step_key_down:(Dom.keyboardEvent -> float -> unit) -> + is_sliding_from_left:(unit -> bool) -> + is_sliding_from_bottom:(unit -> bool) -> + track_ref:Dom.htmlElement option Solidtype.Solid.accessor -> + start_edge:[ `bottom | `left | `right | `top ] Solidtype.Solid.accessor -> + end_edge:[ `bottom | `left | `right | `top ] Solidtype.Solid.accessor -> + min_value:float Solidtype.Solid.accessor -> + max_value:float Solidtype.Solid.accessor -> + inverted:bool Solidtype.Solid.accessor -> + register_track:(Dom.htmlElement -> unit) -> + generate_id:(string -> string) -> + get_value_label:(t_slider_get_value_label_params -> string) option -> + unit -> + t end module SwitchRootState : sig type t = t_switch_root_state + + external checked : t -> bool Solidtype.Solid.accessor = "checked" + [@@mel.get] (** Whether the switch is checked or not. *) - external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] - external make : checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> unit -> t = "" [@@mel.obj] + + external make : + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> unit -> t = "" + [@@mel.obj] end module SwitchContextValue : sig type t = t_switch_context_value + external value : t -> string Solidtype.Solid.accessor = "value" [@@mel.get] - external dataset : t -> t_switch_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_switch_data_set Solidtype.Solid.accessor = "dataset" + [@@mel.get] + external checked : t -> bool Solidtype.Solid.accessor = "checked" [@@mel.get] - external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor = "inputRef" [@@mel.get] + + external input_ref : t -> Dom.htmlInputElement option Solidtype.Solid.accessor + = "inputRef" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] external toggle : t -> unit -> unit = "toggle" [@@mel.send] external set_is_checked : t -> bool -> unit = "setIsChecked" [@@mel.send] external set_is_focused : t -> bool -> unit = "setIsFocused" [@@mel.send] - external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" [@@mel.send] - external make : value:(string Solidtype.Solid.accessor [@mel.as "value"]) -> dataset:(t_switch_data_set Solidtype.Solid.accessor [@mel.as "dataset"]) -> checked:(bool Solidtype.Solid.accessor [@mel.as "checked"]) -> input_ref:(Dom.htmlInputElement option Solidtype.Solid.accessor [@mel.as "inputRef"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> toggle:((unit -> unit) [@mel.as "toggle"]) -> set_is_checked:((bool -> unit) [@mel.as "setIsChecked"]) -> set_is_focused:((bool -> unit) [@mel.as "setIsFocused"]) -> set_input_ref:((Dom.htmlInputElement -> unit) [@mel.as "setInputRef"]) -> unit -> t = "" [@@mel.obj] + + external set_input_ref : t -> Dom.htmlInputElement -> unit = "setInputRef" + [@@mel.send] + + external make : + value:(string Solidtype.Solid.accessor[@mel.as "value"]) -> + dataset:(t_switch_data_set Solidtype.Solid.accessor[@mel.as "dataset"]) -> + checked:(bool Solidtype.Solid.accessor[@mel.as "checked"]) -> + input_ref: + (Dom.htmlInputElement option Solidtype.Solid.accessor[@mel.as "inputRef"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + toggle:((unit -> unit)[@mel.as "toggle"]) -> + set_is_checked:((bool -> unit)[@mel.as "setIsChecked"]) -> + set_is_focused:((bool -> unit)[@mel.as "setIsFocused"]) -> + set_input_ref:((Dom.htmlInputElement -> unit)[@mel.as "setInputRef"]) -> + unit -> + t = "" + [@@mel.obj] end module TabsContextValue : sig type t = t_tabs_context_value - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external activation_mode : t -> [ `manual | `automatic ] Solidtype.Solid.accessor = "activationMode" [@@mel.get] - external trigger_ids_map : t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "triggerIdsMap" [@@mel.get] - external content_ids_map : t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "contentIdsMap" [@@mel.get] - external list_state : t -> t_single_select_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] - external selected_tab : t -> Dom.htmlElement option Solidtype.Solid.accessor = "selectedTab" [@@mel.get] - external set_selected_tab : t -> Dom.htmlElement option Solidtype.Solid.setter = "setSelectedTab" [@@mel.get] - external generate_trigger_id : t -> string -> string = "generateTriggerId" [@@mel.send] - external generate_content_id : t -> string -> string = "generateContentId" [@@mel.send] - external make : is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> orientation:([ `horizontal | `vertical ] Solidtype.Solid.accessor [@mel.as "orientation"]) -> activation_mode:([ `manual | `automatic ] Solidtype.Solid.accessor [@mel.as "activationMode"]) -> trigger_ids_map:((string, string) Js.Map.t Solidtype.Solid.accessor [@mel.as "triggerIdsMap"]) -> content_ids_map:((string, string) Js.Map.t Solidtype.Solid.accessor [@mel.as "contentIdsMap"]) -> list_state:(t_single_select_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> selected_tab:(Dom.htmlElement option Solidtype.Solid.accessor [@mel.as "selectedTab"]) -> set_selected_tab:(Dom.htmlElement option Solidtype.Solid.setter [@mel.as "setSelectedTab"]) -> generate_trigger_id:((string -> string) [@mel.as "generateTriggerId"]) -> generate_content_id:((string -> string) [@mel.as "generateContentId"]) -> unit -> t = "" [@@mel.obj] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external activation_mode : + t -> [ `automatic | `manual ] Solidtype.Solid.accessor = "activationMode" + [@@mel.get] + + external trigger_ids_map : + t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "triggerIdsMap" + [@@mel.get] + + external content_ids_map : + t -> (string, string) Js.Map.t Solidtype.Solid.accessor = "contentIdsMap" + [@@mel.get] + + external list_state : t -> t_single_select_list_state Solidtype.Solid.accessor + = "listState" + [@@mel.get] + + external selected_tab : t -> Dom.htmlElement option Solidtype.Solid.accessor + = "selectedTab" + [@@mel.get] + + external set_selected_tab : t -> Dom.htmlElement option Solidtype.Solid.setter + = "setSelectedTab" + [@@mel.get] + + external generate_trigger_id : t -> string -> string = "generateTriggerId" + [@@mel.send] + + external generate_content_id : t -> string -> string = "generateContentId" + [@@mel.send] + + external make : + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + orientation: + ([ `horizontal | `vertical ] Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + activation_mode: + ([ `automatic | `manual ] Solidtype.Solid.accessor + [@mel.as "activationMode"]) -> + trigger_ids_map: + ((string, string) Js.Map.t Solidtype.Solid.accessor + [@mel.as "triggerIdsMap"]) -> + content_ids_map: + ((string, string) Js.Map.t Solidtype.Solid.accessor + [@mel.as "contentIdsMap"]) -> + list_state: + (t_single_select_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + selected_tab: + (Dom.htmlElement option Solidtype.Solid.accessor[@mel.as "selectedTab"]) -> + set_selected_tab: + (Dom.htmlElement option Solidtype.Solid.setter[@mel.as "setSelectedTab"]) -> + generate_trigger_id:((string -> string)[@mel.as "generateTriggerId"]) -> + generate_content_id:((string -> string)[@mel.as "generateContentId"]) -> + unit -> + t = "" + [@@mel.obj] end module TextFieldContextValue : sig type t = t_text_field_context_value - external value : t -> string option Solidtype.Solid.accessor = "value" [@@mel.get] + + external value : t -> string option Solidtype.Solid.accessor = "value" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external on_input : t -> (Dom.inputEvent -> unit, ((Dom.htmlInputElement, Dom.htmlTextAreaElement) either, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either = "onInput" [@@mel.get] - external make : value:(string option Solidtype.Solid.accessor [@mel.as "value"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> on_input:((Dom.inputEvent -> unit, ((Dom.htmlInputElement, Dom.htmlTextAreaElement) either, Dom.inputEvent, Dom.inputEvent -> unit) t_bound_event_handler) either [@mel.as "onInput"]) -> unit -> t = "" [@@mel.obj] + + external on_input : + t -> + ( Dom.inputEvent -> unit, + ( (Dom.htmlInputElement, Dom.htmlTextAreaElement) either, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either = "onInput" + [@@mel.get] + + external make : + value:(string option Solidtype.Solid.accessor[@mel.as "value"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + on_input: + (( Dom.inputEvent -> unit, + ( (Dom.htmlInputElement, Dom.htmlTextAreaElement) either, + Dom.inputEvent, + Dom.inputEvent -> unit ) + t_bound_event_handler ) + either + [@mel.as "onInput"]) -> + unit -> + t = "" + [@@mel.obj] end module Time : sig type t = t_time + external hour : t -> float option = "hour" [@@mel.get] external minute : t -> float option = "minute" [@@mel.get] external second : t -> float option = "second" [@@mel.get] - external make : ?hour:(float [@mel.as "hour"]) -> ?minute:(float [@mel.as "minute"]) -> ?second:(float [@mel.as "second"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?hour:(float[@mel.as "hour"]) -> + ?minute:(float[@mel.as "minute"]) -> + ?second:(float[@mel.as "second"]) -> + unit -> + t = "" + [@@mel.obj] end module TimeField_Root_Granularity : sig type t = t_time_field_root_granularity + external hour : t -> bool = "hour" [@@mel.get] external minute : t -> bool = "minute" [@@mel.get] external second : t -> bool = "second" [@@mel.get] - external make : hour:(bool [@mel.as "hour"]) -> minute:(bool [@mel.as "minute"]) -> second:(bool [@mel.as "second"]) -> unit -> t = "" [@@mel.obj] + + external make : + hour:(bool[@mel.as "hour"]) -> + minute:(bool[@mel.as "minute"]) -> + second:(bool[@mel.as "second"]) -> + unit -> + t = "" + [@@mel.obj] end module TimeField_Root_Translations : sig type t = t_time_field_root_translations + external hour : t -> string = "hour" [@@mel.get] external minute : t -> string = "minute" [@@mel.get] external second : t -> string = "second" [@@mel.get] @@ -1225,76 +3380,174 @@ module TimeField_Root_Translations : sig external pm : t -> string = "pm" [@@mel.get] external day_period : t -> string = "dayPeriod" [@@mel.get] external time_zone_name : t -> string = "timeZoneName" [@@mel.get] - external selected_time_description : t -> string -> string = "selectedTimeDescription" [@@mel.send] - external make : hour:(string [@mel.as "hour"]) -> minute:(string [@mel.as "minute"]) -> second:(string [@mel.as "second"]) -> am:(string [@mel.as "am"]) -> pm:(string [@mel.as "pm"]) -> day_period:(string [@mel.as "dayPeriod"]) -> time_zone_name:(string [@mel.as "timeZoneName"]) -> selected_time_description:((string -> string) [@mel.as "selectedTimeDescription"]) -> unit -> t = "" [@@mel.obj] + + external selected_time_description : t -> string -> string + = "selectedTimeDescription" + [@@mel.send] + + external make : + hour:(string[@mel.as "hour"]) -> + minute:(string[@mel.as "minute"]) -> + second:(string[@mel.as "second"]) -> + am:(string[@mel.as "am"]) -> + pm:(string[@mel.as "pm"]) -> + day_period:(string[@mel.as "dayPeriod"]) -> + time_zone_name:(string[@mel.as "timeZoneName"]) -> + selected_time_description: + ((string -> string)[@mel.as "selectedTimeDescription"]) -> + unit -> + t = "" + [@@mel.obj] end module Toast_Region_Translations : sig type t = t_toast_region_translations + external notifications : t -> string -> string = "notifications" [@@mel.send] - external make : notifications:((string -> string) [@mel.as "notifications"]) -> unit -> t = "" [@@mel.obj] + + external make : + notifications:((string -> string)[@mel.as "notifications"]) -> unit -> t + = "" + [@@mel.obj] end module Toast_Root_Translations : sig type t = t_toast_root_translations + external close : t -> string = "close" [@@mel.get] - external make : close:(string [@mel.as "close"]) -> unit -> t = "" [@@mel.obj] + external make : close:(string[@mel.as "close"]) -> unit -> t = "" [@@mel.obj] end module SwipeEvent : sig type t = t_swipe_event + external current_target : t -> Dom.eventTarget = "currentTarget" [@@mel.get] - (** The **`type`** read-only property of the Event interface returns a string containing the event's type. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/type) *) - external type_ : t -> string = "type" [@@mel.get] - (** The read-only **`detail`** property of the CustomEvent interface returns any data passed when initializing the event. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) *) - external detail : t -> t_swipe_event_detail = "detail" [@@mel.get] - external init_custom_event : t -> string -> ?bubbles:bool -> ?cancelable:bool -> ?detail:t_swipe_event_detail -> unit -> unit = "initCustomEvent" [@@mel.send] - (** The **`bubbles`** read-only property of the Event interface indicates whether the event bubbles up through the DOM tree or not. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/bubbles) *) - external bubbles : t -> bool = "bubbles" [@@mel.get] + + external type_ : t -> string = "type" + [@@mel.get] + (** The **`type`** read-only property of the Event interface returns a string + containing the event's type. + + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/type) + *) + + external detail : t -> t_swipe_event_detail = "detail" + [@@mel.get] + (** The read-only **`detail`** property of the CustomEvent interface returns + any data passed when initializing the event. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/CustomEvent/detail) + *) + + external init_custom_event : + t -> + string -> + ?bubbles:bool -> + ?cancelable:bool -> + ?detail:t_swipe_event_detail -> + unit -> + unit = "initCustomEvent" + [@@mel.send] + + external bubbles : t -> bool = "bubbles" + [@@mel.get] + (** The **`bubbles`** read-only property of the Event interface indicates + whether the event bubbles up through the DOM tree or not. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/bubbles) *) + + external cancel_bubble : t -> bool = "cancelBubble" + [@@mel.get] (** The **`cancelBubble`** property of the Event interface is deprecated. *) - external cancel_bubble : t -> bool = "cancelBubble" [@@mel.get] - (** The **`cancelable`** read-only property of the Event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/cancelable) *) - external cancelable : t -> bool = "cancelable" [@@mel.get] - (** The read-only **`composed`** property of the or not the event will propagate across the shadow DOM boundary into the standard DOM. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/composed) *) - external composed : t -> bool = "composed" [@@mel.get] - (** The **`defaultPrevented`** read-only property of the Event interface returns a boolean value indicating whether or not the call to Event.preventDefault() canceled the event. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) *) - external default_prevented : t -> bool = "defaultPrevented" [@@mel.get] + + external cancelable : t -> bool = "cancelable" + [@@mel.get] + (** The **`cancelable`** read-only property of the Event interface indicates + whether the event can be canceled, and therefore prevented as if the event + never happened. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/cancelable) + *) + + external composed : t -> bool = "composed" + [@@mel.get] + (** The read-only **`composed`** property of the or not the event will + propagate across the shadow DOM boundary into the standard DOM. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/composed) *) + + external default_prevented : t -> bool = "defaultPrevented" + [@@mel.get] + (** The **`defaultPrevented`** read-only property of the Event interface + returns a boolean value indicating whether or not the call to + Event.preventDefault() canceled the event. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/defaultPrevented) + *) + + external event_phase : t -> float = "eventPhase" + [@@mel.get] (** The **`eventPhase`** read-only property of the being evaluated. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) *) - external event_phase : t -> float = "eventPhase" [@@mel.get] - (** The **`isTrusted`** read-only property of the when the event was generated by the user agent (including via user actions and programmatic methods such as HTMLElement.focus()), and `false` when the event was dispatched via The only exception is the `click` event, which initializes the `isTrusted` property to `false` in user agents. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) *) - external is_trusted : t -> bool = "isTrusted" [@@mel.get] - (** The Event property **`returnValue`** indicates whether the default action for this event has been prevented or not. *) - external return_value : t -> bool = "returnValue" [@@mel.get] - (** The deprecated **`Event.srcElement`** is an alias for the Event.target property. *) - external src_element : t -> Dom.eventTarget Js.Nullable.t = "srcElement" [@@mel.get] + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/eventPhase) + *) + + external is_trusted : t -> bool = "isTrusted" + [@@mel.get] + (** The **`isTrusted`** read-only property of the when the event was generated + by the user agent (including via user actions and programmatic methods + such as HTMLElement.focus()), and `false` when the event was dispatched + via The only exception is the `click` event, which initializes the + `isTrusted` property to `false` in user agents. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/isTrusted) *) + + external return_value : t -> bool = "returnValue" + [@@mel.get] + (** The Event property **`returnValue`** indicates whether the default action + for this event has been prevented or not. *) + + external src_element : t -> Dom.eventTarget Js.Nullable.t = "srcElement" + [@@mel.get] + (** The deprecated **`Event.srcElement`** is an alias for the Event.target + property. *) + + external target : t -> Dom.eventTarget Js.Nullable.t = "target" + [@@mel.get] (** The read-only **`target`** property of the dispatched. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/target) *) - external target : t -> Dom.eventTarget Js.Nullable.t = "target" [@@mel.get] - (** The **`timeStamp`** read-only property of the Event interface returns the time (in milliseconds) at which the event was created. - - \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) *) - external time_stamp : t -> float = "timeStamp" [@@mel.get] - external composed_path : t -> unit -> Dom.eventTarget array = "composedPath" [@@mel.send] - external init_event : t -> string -> ?bubbles:bool -> ?cancelable:bool -> unit -> unit = "initEvent" [@@mel.send] + + \[MDN Reference\](https://developer.mozilla.org/docs/Web/API/Event/target) + *) + + external time_stamp : t -> float = "timeStamp" + [@@mel.get] + (** The **`timeStamp`** read-only property of the Event interface returns the + time (in milliseconds) at which the event was created. + + \[MDN + Reference\](https://developer.mozilla.org/docs/Web/API/Event/timeStamp) *) + + external composed_path : t -> unit -> Dom.eventTarget array = "composedPath" + [@@mel.send] + + external init_event : + t -> string -> ?bubbles:bool -> ?cancelable:bool -> unit -> unit + = "initEvent" + [@@mel.send] + external prevent_default : t -> unit -> unit = "preventDefault" [@@mel.send] - external stop_immediate_propagation : t -> unit -> unit = "stopImmediatePropagation" [@@mel.send] + + external stop_immediate_propagation : t -> unit -> unit + = "stopImmediatePropagation" + [@@mel.send] + external stop_propagation : t -> unit -> unit = "stopPropagation" [@@mel.send] external none : t -> float = "NONE" [@@mel.get] external capturing_phase : t -> float = "CAPTURING_PHASE" [@@mel.get] @@ -1304,236 +3557,885 @@ end module Toast_Toaster : sig type t = t_toast_toaster - external show : t -> (t_toast_component_props -> Solidtype.Jsx.element) -> ?options:t_show_toast_options -> unit -> float = "show" [@@mel.send] - external update : t -> float -> (t_toast_component_props -> Solidtype.Jsx.element) -> unit = "update" [@@mel.send] - external promise : t -> ('t Js.Promise.t, unit -> 't Js.Promise.t) either -> (('t, 'u) t_toast_promise_component_props -> Solidtype.Jsx.element) -> ?options:t_show_toast_options -> unit -> float = "promise" [@@mel.send] + + external show : + t -> + (t_toast_component_props -> Solidtype.Jsx.element) -> + ?options:t_show_toast_options -> + unit -> + float = "show" + [@@mel.send] + + external update : + t -> float -> (t_toast_component_props -> Solidtype.Jsx.element) -> unit + = "update" + [@@mel.send] + + external promise : + t -> + ('t Js.Promise.t, unit -> 't Js.Promise.t) either -> + (('t, 'u) t_toast_promise_component_props -> Solidtype.Jsx.element) -> + ?options:t_show_toast_options -> + unit -> + float = "promise" + [@@mel.send] + external dismiss : t -> float -> float = "dismiss" [@@mel.send] external clear : t -> unit -> unit = "clear" [@@mel.send] - external make : show:(((t_toast_component_props -> Solidtype.Jsx.element) -> t_show_toast_options option -> float) [@mel.as "show"]) -> update:((float -> (t_toast_component_props -> Solidtype.Jsx.element) -> unit) [@mel.as "update"]) -> promise:((('t Js.Promise.t, unit -> 't Js.Promise.t) either -> (('t, 'u) t_toast_promise_component_props -> Solidtype.Jsx.element) -> t_show_toast_options option -> float) [@mel.as "promise"]) -> dismiss:((float -> float) [@mel.as "dismiss"]) -> clear:((unit -> unit) [@mel.as "clear"]) -> unit -> t = "" [@@mel.obj] end module ToastContextValue : sig type t = t_toast_context_value - external translations : t -> t_toast_root_translations Solidtype.Solid.accessor = "translations" [@@mel.get] + + external translations : + t -> t_toast_root_translations Solidtype.Solid.accessor = "translations" + [@@mel.get] + external close : t -> unit -> unit = "close" [@@mel.send] - external duration : t -> float Solidtype.Solid.accessor = "duration" [@@mel.get] - external is_persistent : t -> bool Solidtype.Solid.accessor = "isPersistent" [@@mel.get] - external close_timer_start_time : t -> float Solidtype.Solid.accessor = "closeTimerStartTime" [@@mel.get] + + external duration : t -> float Solidtype.Solid.accessor = "duration" + [@@mel.get] + + external is_persistent : t -> bool Solidtype.Solid.accessor = "isPersistent" + [@@mel.get] + + external close_timer_start_time : t -> float Solidtype.Solid.accessor + = "closeTimerStartTime" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_title_id : t -> string -> (unit -> unit) - val register_description_id : t -> string -> (unit -> unit) - val make : translations:t_toast_root_translations Solidtype.Solid.accessor -> close:(unit -> unit) -> duration:float Solidtype.Solid.accessor -> is_persistent:bool Solidtype.Solid.accessor -> close_timer_start_time:float Solidtype.Solid.accessor -> generate_id:(string -> string) -> register_title_id:(string -> (unit -> unit)) -> register_description_id:(string -> (unit -> unit)) -> unit -> t + val register_title_id : t -> string -> unit -> unit + val register_description_id : t -> string -> unit -> unit + + val make : + translations:t_toast_root_translations Solidtype.Solid.accessor -> + close:(unit -> unit) -> + duration:float Solidtype.Solid.accessor -> + is_persistent:bool Solidtype.Solid.accessor -> + close_timer_start_time:float Solidtype.Solid.accessor -> + generate_id:(string -> string) -> + register_title_id:(string -> unit -> unit) -> + register_description_id:(string -> unit -> unit) -> + unit -> + t end module ToggleButtonRootState : sig type t = t_toggle_button_root_state + + external pressed : t -> bool Solidtype.Solid.accessor = "pressed" + [@@mel.get] (** Whether the toggle button is on (pressed) or off (not pressed). *) - external pressed : t -> bool Solidtype.Solid.accessor = "pressed" [@@mel.get] - external make : pressed:(bool Solidtype.Solid.accessor [@mel.as "pressed"]) -> unit -> t = "" [@@mel.obj] + + external make : + pressed:(bool Solidtype.Solid.accessor[@mel.as "pressed"]) -> unit -> t = "" + [@@mel.obj] end module ToggleGroupContextValue : sig type t = t_toggle_group_context_value - external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" [@@mel.get] + + external is_multiple : t -> bool Solidtype.Solid.accessor = "isMultiple" + [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external list_state : t -> t_list_state Solidtype.Solid.accessor = "listState" + [@@mel.get] + external generate_id : t -> string -> string = "generateId" [@@mel.send] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external make : is_multiple:(bool Solidtype.Solid.accessor [@mel.as "isMultiple"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> list_state:(t_list_state Solidtype.Solid.accessor [@mel.as "listState"]) -> generate_id:((string -> string) [@mel.as "generateId"]) -> orientation:([ `horizontal | `vertical ] Solidtype.Solid.accessor [@mel.as "orientation"]) -> unit -> t = "" [@@mel.obj] + + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external make : + is_multiple:(bool Solidtype.Solid.accessor[@mel.as "isMultiple"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + list_state:(t_list_state Solidtype.Solid.accessor[@mel.as "listState"]) -> + generate_id:((string -> string)[@mel.as "generateId"]) -> + orientation: + ([ `horizontal | `vertical ] Solidtype.Solid.accessor + [@mel.as "orientation"]) -> + unit -> + t = "" + [@@mel.obj] end module TooltipContextValue : sig type t = t_tooltip_context_value - external dataset : t -> t_tooltip_data_set Solidtype.Solid.accessor = "dataset" [@@mel.get] + + external dataset : t -> t_tooltip_data_set Solidtype.Solid.accessor + = "dataset" + [@@mel.get] + external is_open : t -> bool Solidtype.Solid.accessor = "isOpen" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external trigger_on_focus_only : t -> bool Solidtype.Solid.accessor = "triggerOnFocusOnly" [@@mel.get] - external content_id : t -> string option Solidtype.Solid.accessor = "contentId" [@@mel.get] - external content_present : t -> bool Solidtype.Solid.accessor = "contentPresent" [@@mel.get] - external open_tooltip : t -> ?immediate:bool -> unit -> unit = "openTooltip" [@@mel.send] - external hide_tooltip : t -> ?immediate:bool -> unit -> unit = "hideTooltip" [@@mel.send] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external trigger_on_focus_only : t -> bool Solidtype.Solid.accessor + = "triggerOnFocusOnly" + [@@mel.get] + + external content_id : t -> string option Solidtype.Solid.accessor + = "contentId" + [@@mel.get] + + external content_present : t -> bool Solidtype.Solid.accessor + = "contentPresent" + [@@mel.get] + + external open_tooltip : t -> ?immediate:bool -> unit -> unit = "openTooltip" + [@@mel.send] + + external hide_tooltip : t -> ?immediate:bool -> unit -> unit = "hideTooltip" + [@@mel.send] + external cancel_opening : t -> unit -> unit = "cancelOpening" [@@mel.send] external generate_id : t -> string -> string = "generateId" [@@mel.send] - val register_content_id : t -> string -> (unit -> unit) - external is_target_on_tooltip : t -> Dom.node Js.Null.t -> bool = "isTargetOnTooltip" [@@mel.send] - external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" [@@mel.send] - external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" [@@mel.send] - val make : dataset:t_tooltip_data_set Solidtype.Solid.accessor -> is_open:bool Solidtype.Solid.accessor -> is_disabled:bool Solidtype.Solid.accessor -> trigger_on_focus_only:bool Solidtype.Solid.accessor -> content_id:string option Solidtype.Solid.accessor -> content_present:bool Solidtype.Solid.accessor -> open_tooltip:(bool option -> unit) -> hide_tooltip:(bool option -> unit) -> cancel_opening:(unit -> unit) -> generate_id:(string -> string) -> register_content_id:(string -> (unit -> unit)) -> is_target_on_tooltip:(Dom.node Js.Nullable.t -> bool) -> set_trigger_ref:(Dom.htmlElement -> unit) -> set_content_ref:(Dom.htmlElement -> unit) -> unit -> t + val register_content_id : t -> string -> unit -> unit + + external is_target_on_tooltip : t -> Dom.node Js.Null.t -> bool + = "isTargetOnTooltip" + [@@mel.send] + + external set_trigger_ref : t -> Dom.htmlElement -> unit = "setTriggerRef" + [@@mel.send] + + external set_content_ref : t -> Dom.htmlElement -> unit = "setContentRef" + [@@mel.send] + + val make : + dataset:t_tooltip_data_set Solidtype.Solid.accessor -> + is_open:bool Solidtype.Solid.accessor -> + is_disabled:bool Solidtype.Solid.accessor -> + trigger_on_focus_only:bool Solidtype.Solid.accessor -> + content_id:string option Solidtype.Solid.accessor -> + content_present:bool Solidtype.Solid.accessor -> + open_tooltip:(bool option -> unit) -> + hide_tooltip:(bool option -> unit) -> + cancel_opening:(unit -> unit) -> + generate_id:(string -> string) -> + register_content_id:(string -> unit -> unit) -> + is_target_on_tooltip:(Dom.node Js.Nullable.t -> bool) -> + set_trigger_ref:(Dom.htmlElement -> unit) -> + set_content_ref:(Dom.htmlElement -> unit) -> + unit -> + t end module CreateListStateProps : sig type 'data t = 'data t_create_list_state_props + + val filter : + 'data t -> + ('data t_collection_node array -> 'data t_collection_node array) option (** Filter function to generate a filtered list of nodes. *) - external filter : 'data t -> ('data t_collection_node array -> 'data t_collection_node array) option = "filter" [@@mel.get] + + external data_source : + 'data t -> ('data array, 'data array Solidtype.Solid.accessor) either + = "dataSource" + [@@mel.get] (** The source data to be managed by the collection. *) - external data_source : 'data t -> ('data array, 'data array Solidtype.Solid.accessor) either = "dataSource" [@@mel.get] + + external get_key : + 'data t -> + ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either + option = "getKey" + [@@mel.get] (** Property name or getter function to use as the key of an item. *) - external get_key : 'data t -> ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either option = "getKey" [@@mel.get] - (** Property name or getter function to use as the text value of an item for typeahead purpose. *) - external get_text_value : 'data t -> ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either option = "getTextValue" [@@mel.get] - (** Property name or getter function to use as the disabled flag of an item. *) - external get_disabled : 'data t -> ('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either option = "getDisabled" [@@mel.get] - (** Property name or getter function that refers to the children items of a section. *) - external get_section_children : 'data t -> ('data -> 'data array, ('data -> 'data array) option Solidtype.Solid.accessor) either option = "getSectionChildren" [@@mel.get] + + external get_text_value : + 'data t -> + ('data -> string, ('data -> string) option Solidtype.Solid.accessor) either + option = "getTextValue" + [@@mel.get] + (** Property name or getter function to use as the text value of an item for + typeahead purpose. *) + + external get_disabled : + 'data t -> + ('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either + option = "getDisabled" + [@@mel.get] + (** Property name or getter function to use as the disabled flag of an item. + *) + + external get_section_children : + 'data t -> + ( 'data -> 'data array, + ('data -> 'data array) option Solidtype.Solid.accessor ) + either + option = "getSectionChildren" + [@@mel.get] + (** Property name or getter function that refers to the children items of a + section. *) + + external selection_behavior : + 'data t -> + ( [ `replace | `toggle ], + [ `replace | `toggle ] option Solidtype.Solid.accessor ) + either + option = "selectionBehavior" + [@@mel.get] (** How multiple selection should behave in the collection. *) - external selection_behavior : 'data t -> ([ `toggle | `replace ], [ `toggle | `replace ] option Solidtype.Solid.accessor) either option = "selectionBehavior" [@@mel.get] - (** Whether onSelectionChange should fire even if the new set of keys is the same as the last. *) - external allow_duplicate_selection_events : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowDuplicateSelectionEvents" [@@mel.get] + + external allow_duplicate_selection_events : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowDuplicateSelectionEvents" + [@@mel.get] + (** Whether onSelectionChange should fire even if the new set of keys is the + same as the last. *) + + external selection_mode : + 'data t -> + ( [ `multiple | `none | `single ], + [ `multiple | `none | `single ] option Solidtype.Solid.accessor ) + either + option = "selectionMode" + [@@mel.get] (** The type of selection that is allowed in the collection. *) - external selection_mode : 'data t -> ([ `none | `single | `multiple ], [ `none | `single | `multiple ] option Solidtype.Solid.accessor) either option = "selectionMode" [@@mel.get] + + external disallow_empty_selection : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowEmptySelection" [@@mel.get] + + external selected_keys : + 'data t -> + (string array, string array option Solidtype.Solid.accessor) either option + = "selectedKeys" + [@@mel.get] (** The currently selected keys in the collection (controlled). *) - external selected_keys : 'data t -> (string array, string array option Solidtype.Solid.accessor) either option = "selectedKeys" [@@mel.get] + + external default_selected_keys : + 'data t -> + (string array, string array option Solidtype.Solid.accessor) either option + = "defaultSelectedKeys" + [@@mel.get] (** The initial selected keys in the collection (uncontrolled). *) - external default_selected_keys : 'data t -> (string array, string array option Solidtype.Solid.accessor) either option = "defaultSelectedKeys" [@@mel.get] + + val on_selection_change : 'data t -> (string Js.Set.t -> unit) option (** Handler that is called when the selection changes. *) - external on_selection_change : 'data t -> (string Js.Set.t -> unit) option = "onSelectionChange" [@@mel.get] - external make : ?filter:(('data t_collection_node array -> 'data t_collection_node array) [@mel.as "filter"]) -> data_source:(('data array, 'data array Solidtype.Solid.accessor) either [@mel.as "dataSource"]) -> ?get_key:(('data -> string, ('data -> string) option Solidtype.Solid.accessor) either [@mel.as "getKey"]) -> ?get_text_value:(('data -> string, ('data -> string) option Solidtype.Solid.accessor) either [@mel.as "getTextValue"]) -> ?get_disabled:(('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either [@mel.as "getDisabled"]) -> ?get_section_children:(('data -> 'data array, ('data -> 'data array) option Solidtype.Solid.accessor) either [@mel.as "getSectionChildren"]) -> ?selection_behavior:(([ `toggle | `replace ], [ `toggle | `replace ] option Solidtype.Solid.accessor) either [@mel.as "selectionBehavior"]) -> ?allow_duplicate_selection_events:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowDuplicateSelectionEvents"]) -> ?selection_mode:(([ `none | `single | `multiple ], [ `none | `single | `multiple ] option Solidtype.Solid.accessor) either [@mel.as "selectionMode"]) -> ?disallow_empty_selection:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowEmptySelection"]) -> ?selected_keys:((string array, string array option Solidtype.Solid.accessor) either [@mel.as "selectedKeys"]) -> ?default_selected_keys:((string array, string array option Solidtype.Solid.accessor) either [@mel.as "defaultSelectedKeys"]) -> ?on_selection_change:((string Js.Set.t -> unit) [@mel.as "onSelectionChange"]) -> unit -> 'data t = "" [@@mel.obj] + + external make : + ?filter: + (('data t_collection_node array -> 'data t_collection_node array) + [@mel.as "filter"]) -> + data_source: + (('data array, 'data array Solidtype.Solid.accessor) either + [@mel.as "dataSource"]) -> + ?get_key: + (( 'data -> string, + ('data -> string) option Solidtype.Solid.accessor ) + either + [@mel.as "getKey"]) -> + ?get_text_value: + (( 'data -> string, + ('data -> string) option Solidtype.Solid.accessor ) + either + [@mel.as "getTextValue"]) -> + ?get_disabled: + (('data -> bool, ('data -> bool) option Solidtype.Solid.accessor) either + [@mel.as "getDisabled"]) -> + ?get_section_children: + (( 'data -> 'data array, + ('data -> 'data array) option Solidtype.Solid.accessor ) + either + [@mel.as "getSectionChildren"]) -> + ?selection_behavior: + (( [ `replace | `toggle ], + [ `replace | `toggle ] option Solidtype.Solid.accessor ) + either + [@mel.as "selectionBehavior"]) -> + ?allow_duplicate_selection_events: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowDuplicateSelectionEvents"]) -> + ?selection_mode: + (( [ `multiple | `none | `single ], + [ `multiple | `none | `single ] option Solidtype.Solid.accessor ) + either + [@mel.as "selectionMode"]) -> + ?disallow_empty_selection: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowEmptySelection"]) -> + ?selected_keys: + ((string array, string array option Solidtype.Solid.accessor) either + [@mel.as "selectedKeys"]) -> + ?default_selected_keys: + ((string array, string array option Solidtype.Solid.accessor) either + [@mel.as "defaultSelectedKeys"]) -> + ?on_selection_change: + ((string Js.Set.t -> unit)[@mel.as "onSelectionChange"]) -> + unit -> + 'data t = "" + [@@mel.obj] end module CreateSelectableCollectionProps : sig type t = t_create_selectable_collection_props + + external selection_manager : + t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] + + external keyboard_delegate : + t -> + (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either + = "keyboardDelegate" + [@@mel.get] (** A delegate object that implements behavior for keyboard focus movement. *) - external keyboard_delegate : t -> (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either = "keyboardDelegate" [@@mel.get] - (** Whether the collection or one of its items should be automatically focused upon render. *) - external auto_focus : t -> ([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either option = "autoFocus" [@@mel.get] + + external auto_focus : + t -> + ( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + option = "autoFocus" + [@@mel.get] + (** Whether the collection or one of its items should be automatically focused + upon render. *) + + external defer_auto_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "deferAutoFocus" + [@@mel.get] (** Whether the autofocus should run on next tick. *) - external defer_auto_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "deferAutoFocus" [@@mel.get] + + external should_focus_wrap : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldFocusWrap" + [@@mel.get] (** Whether focus should wrap around when the end/start is reached. *) - external should_focus_wrap : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldFocusWrap" [@@mel.get] + + external disallow_empty_selection : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowEmptySelection" [@@mel.get] - (** Whether the collection allows the user to select all items via keyboard shortcut. *) - external disallow_select_all : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowSelectAll" [@@mel.get] + + external disallow_select_all : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowSelectAll" + [@@mel.get] + (** Whether the collection allows the user to select all items via keyboard + shortcut. *) + + external select_on_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "selectOnFocus" + [@@mel.get] (** Whether selection should occur automatically on focus. *) - external select_on_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "selectOnFocus" [@@mel.get] + + external disallow_type_ahead : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowTypeAhead" + [@@mel.get] (** Whether typeahead is disabled. *) - external disallow_type_ahead : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowTypeAhead" [@@mel.get] - (** Whether the collection items should use virtual focus instead of being focused directly. *) - external should_use_virtual_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldUseVirtualFocus" [@@mel.get] + + external should_use_virtual_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldUseVirtualFocus" + [@@mel.get] + (** Whether the collection items should use virtual focus instead of being + focused directly. *) + + external allows_tab_navigation : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowsTabNavigation" + [@@mel.get] (** Whether navigation through tab key is enabled. *) - external allows_tab_navigation : t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowsTabNavigation" [@@mel.get] + + external is_virtualized : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "isVirtualized" + [@@mel.get] (** Whether the collection items are contained in a virtual scroller. *) - external is_virtualized : t -> (bool, bool option Solidtype.Solid.accessor) either option = "isVirtualized" [@@mel.get] - (** When virtualized, the Virtualizer function used to scroll to the item of the key provided. *) - external scroll_to_key : t -> (string -> unit) option = "scrollToKey" [@@mel.get] + + val scroll_to_key : t -> (string -> unit) option + (** When virtualized, the Virtualizer function used to scroll to the item of + the key provided. *) + + external orientation : + t -> + ( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + option = "orientation" + [@@mel.get] (** The orientation of the selectable collection interactions. *) - external orientation : t -> ([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either option = "orientation" [@@mel.get] - external make : selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> keyboard_delegate:((t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either [@mel.as "keyboardDelegate"]) -> ?auto_focus:(([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either [@mel.as "autoFocus"]) -> ?defer_auto_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "deferAutoFocus"]) -> ?should_focus_wrap:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldFocusWrap"]) -> ?disallow_empty_selection:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowEmptySelection"]) -> ?disallow_select_all:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowSelectAll"]) -> ?select_on_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "selectOnFocus"]) -> ?disallow_type_ahead:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowTypeAhead"]) -> ?should_use_virtual_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldUseVirtualFocus"]) -> ?allows_tab_navigation:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowsTabNavigation"]) -> ?is_virtualized:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "isVirtualized"]) -> ?scroll_to_key:((string -> unit) [@mel.as "scrollToKey"]) -> ?orientation:(([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either [@mel.as "orientation"]) -> unit -> t = "" [@@mel.obj] + + external make : + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + keyboard_delegate: + (( t_keyboard_delegate, + t_keyboard_delegate Solidtype.Solid.accessor ) + either + [@mel.as "keyboardDelegate"]) -> + ?auto_focus: + (( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + [@mel.as "autoFocus"]) -> + ?defer_auto_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "deferAutoFocus"]) -> + ?should_focus_wrap: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldFocusWrap"]) -> + ?disallow_empty_selection: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowEmptySelection"]) -> + ?disallow_select_all: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowSelectAll"]) -> + ?select_on_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "selectOnFocus"]) -> + ?disallow_type_ahead: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowTypeAhead"]) -> + ?should_use_virtual_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldUseVirtualFocus"]) -> + ?allows_tab_navigation: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowsTabNavigation"]) -> + ?is_virtualized: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "isVirtualized"]) -> + ?scroll_to_key:((string -> unit)[@mel.as "scrollToKey"]) -> + ?orientation: + (( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + [@mel.as "orientation"]) -> + unit -> + t = "" + [@@mel.obj] end module Selection_CreateSelectableCollection : sig type t = t_selection_create_selectable_collection - external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" [@@mel.get] - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" [@@mel.send] + + external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" + [@@mel.get] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" + [@@mel.send] + external on_focus_in : t -> Dom.focusEvent -> unit = "onFocusIn" [@@mel.send] - external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" [@@mel.send] - external make : tab_index:(float option Solidtype.Solid.accessor [@mel.as "tabIndex"]) -> on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> on_mouse_down:((Dom.mouseEvent -> unit) [@mel.as "onMouseDown"]) -> on_focus_in:((Dom.focusEvent -> unit) [@mel.as "onFocusIn"]) -> on_focus_out:((Dom.focusEvent -> unit) [@mel.as "onFocusOut"]) -> unit -> t = "" [@@mel.obj] + + external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" + [@@mel.send] + + external make : + tab_index:(float option Solidtype.Solid.accessor[@mel.as "tabIndex"]) -> + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> + on_mouse_down:((Dom.mouseEvent -> unit)[@mel.as "onMouseDown"]) -> + on_focus_in:((Dom.focusEvent -> unit)[@mel.as "onFocusIn"]) -> + on_focus_out:((Dom.focusEvent -> unit)[@mel.as "onFocusOut"]) -> + unit -> + t = "" + [@@mel.obj] end module CreateSelectableItemProps : sig type t = t_create_selectable_item_props + + external selection_manager : + t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] + + external key : t -> (string, string Solidtype.Solid.accessor) either = "key" + [@@mel.get] (** A unique key for the item. *) - external key : t -> (string, string Solidtype.Solid.accessor) either = "key" [@@mel.get] - (** By default, selection occurs on pointer down. This can be strange if selecting an - item causes the UI to disappear immediately (e.g. menus). *) - external should_select_on_press_up : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldSelectOnPressUp" [@@mel.get] - (** Whether the option should use virtual focus instead of being focused directly. *) - external should_use_virtual_focus : t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldUseVirtualFocus" [@@mel.get] - (** Whether selection requires the pointer/mouse down and up events to occur on the same target or triggers selection on - the target of the pointer/mouse up event. *) - external allows_different_press_origin : t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowsDifferentPressOrigin" [@@mel.get] + + external should_select_on_press_up : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldSelectOnPressUp" + [@@mel.get] + (** By default, selection occurs on pointer down. This can be strange if + selecting an item causes the UI to disappear immediately (e.g. menus). *) + + external should_use_virtual_focus : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldUseVirtualFocus" + [@@mel.get] + (** Whether the option should use virtual focus instead of being focused + directly. *) + + external allows_different_press_origin : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowsDifferentPressOrigin" + [@@mel.get] + (** Whether selection requires the pointer/mouse down and up events to occur + on the same target or triggers selection on the target of the + pointer/mouse up event. *) + + external virtualized : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "virtualized" + [@@mel.get] (** Whether the option is contained in a virtual scroller. *) - external virtualized : t -> (bool, bool option Solidtype.Solid.accessor) either option = "virtualized" [@@mel.get] + + external disabled : + t -> (bool, bool option Solidtype.Solid.accessor) either option = "disabled" + [@@mel.get] (** Whether the item is disabled. *) - external disabled : t -> (bool, bool option Solidtype.Solid.accessor) either option = "disabled" [@@mel.get] + + val focus : t -> (unit -> unit) option (** Function to focus the item. *) - external focus : t -> (unit -> unit) option = "focus" [@@mel.get] - external make : selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> key:((string, string Solidtype.Solid.accessor) either [@mel.as "key"]) -> ?should_select_on_press_up:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldSelectOnPressUp"]) -> ?should_use_virtual_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldUseVirtualFocus"]) -> ?allows_different_press_origin:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowsDifferentPressOrigin"]) -> ?virtualized:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "virtualized"]) -> ?disabled:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disabled"]) -> ?focus:((unit -> unit) [@mel.as "focus"]) -> unit -> t = "" [@@mel.obj] + + external make : + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + key:((string, string Solidtype.Solid.accessor) either[@mel.as "key"]) -> + ?should_select_on_press_up: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldSelectOnPressUp"]) -> + ?should_use_virtual_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldUseVirtualFocus"]) -> + ?allows_different_press_origin: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowsDifferentPressOrigin"]) -> + ?virtualized: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "virtualized"]) -> + ?disabled: + ((bool, bool option Solidtype.Solid.accessor) either[@mel.as "disabled"]) -> + ?focus:((unit -> unit)[@mel.as "focus"]) -> + unit -> + t = "" + [@@mel.obj] end module Selection_CreateSelectableItem : sig type t = t_selection_create_selectable_item + external is_selected : t -> unit -> bool = "isSelected" [@@mel.send] external is_disabled : t -> unit -> bool = "isDisabled" [@@mel.send] external allows_selection : t -> unit -> bool = "allowsSelection" [@@mel.send] - external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" [@@mel.get] - external data_key : t -> string option Solidtype.Solid.accessor = "dataKey" [@@mel.get] - external on_pointer_down : t -> Dom.pointerEvent -> unit = "onPointerDown" [@@mel.send] - external on_pointer_up : t -> Dom.pointerEvent -> unit = "onPointerUp" [@@mel.send] + + external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" + [@@mel.get] + + external data_key : t -> string option Solidtype.Solid.accessor = "dataKey" + [@@mel.get] + + external on_pointer_down : t -> Dom.pointerEvent -> unit = "onPointerDown" + [@@mel.send] + + external on_pointer_up : t -> Dom.pointerEvent -> unit = "onPointerUp" + [@@mel.send] + external on_click : t -> Dom.mouseEvent -> unit = "onClick" [@@mel.send] - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" [@@mel.send] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" + [@@mel.send] + external on_focus : t -> Dom.focusEvent -> unit = "onFocus" [@@mel.send] - external make : is_selected:((unit -> bool) [@mel.as "isSelected"]) -> is_disabled:((unit -> bool) [@mel.as "isDisabled"]) -> allows_selection:((unit -> bool) [@mel.as "allowsSelection"]) -> tab_index:(float option Solidtype.Solid.accessor [@mel.as "tabIndex"]) -> data_key:(string option Solidtype.Solid.accessor [@mel.as "dataKey"]) -> on_pointer_down:((Dom.pointerEvent -> unit) [@mel.as "onPointerDown"]) -> on_pointer_up:((Dom.pointerEvent -> unit) [@mel.as "onPointerUp"]) -> on_click:((Dom.mouseEvent -> unit) [@mel.as "onClick"]) -> on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> on_mouse_down:((Dom.mouseEvent -> unit) [@mel.as "onMouseDown"]) -> on_focus:((Dom.focusEvent -> unit) [@mel.as "onFocus"]) -> unit -> t = "" [@@mel.obj] + + external make : + is_selected:((unit -> bool)[@mel.as "isSelected"]) -> + is_disabled:((unit -> bool)[@mel.as "isDisabled"]) -> + allows_selection:((unit -> bool)[@mel.as "allowsSelection"]) -> + tab_index:(float option Solidtype.Solid.accessor[@mel.as "tabIndex"]) -> + data_key:(string option Solidtype.Solid.accessor[@mel.as "dataKey"]) -> + on_pointer_down:((Dom.pointerEvent -> unit)[@mel.as "onPointerDown"]) -> + on_pointer_up:((Dom.pointerEvent -> unit)[@mel.as "onPointerUp"]) -> + on_click:((Dom.mouseEvent -> unit)[@mel.as "onClick"]) -> + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> + on_mouse_down:((Dom.mouseEvent -> unit)[@mel.as "onMouseDown"]) -> + on_focus:((Dom.focusEvent -> unit)[@mel.as "onFocus"]) -> + unit -> + t = "" + [@@mel.obj] end module CreateSelectableListProps : sig type 'data t = 'data t_create_selectable_list_props + + external collection : + 'data t -> 'data t_collection_node t_collection Solidtype.Solid.accessor + = "collection" + [@@mel.get] (** State of the collection. *) - external collection : 'data t -> 'data t_collection_node t_collection Solidtype.Solid.accessor = "collection" [@@mel.get] + + external selection_manager : + 'data t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : 'data t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] - (** A delegate that returns collection item keys with respect to visual layout. *) - external keyboard_delegate : 'data t -> (t_keyboard_delegate, t_keyboard_delegate option Solidtype.Solid.accessor) either option = "keyboardDelegate" [@@mel.get] - (** Whether the collection or one of its items should be automatically focused upon render. *) - external auto_focus : 'data t -> ([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either option = "autoFocus" [@@mel.get] + + external keyboard_delegate : + 'data t -> + ( t_keyboard_delegate, + t_keyboard_delegate option Solidtype.Solid.accessor ) + either + option = "keyboardDelegate" + [@@mel.get] + (** A delegate that returns collection item keys with respect to visual + layout. *) + + external auto_focus : + 'data t -> + ( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + option = "autoFocus" + [@@mel.get] + (** Whether the collection or one of its items should be automatically focused + upon render. *) + + external defer_auto_focus : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "deferAutoFocus" + [@@mel.get] (** Whether the autofocus should run on next tick. *) - external defer_auto_focus : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "deferAutoFocus" [@@mel.get] + + external should_focus_wrap : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldFocusWrap" + [@@mel.get] (** Whether focus should wrap around when the end/start is reached. *) - external should_focus_wrap : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldFocusWrap" [@@mel.get] + + external disallow_empty_selection : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowEmptySelection" [@@mel.get] + + external select_on_focus : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "selectOnFocus" + [@@mel.get] (** Whether selection should occur automatically on focus. *) - external select_on_focus : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "selectOnFocus" [@@mel.get] + + external disallow_type_ahead : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "disallowTypeAhead" + [@@mel.get] (** Whether typeahead is disabled. *) - external disallow_type_ahead : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "disallowTypeAhead" [@@mel.get] - (** Whether the collection items should use virtual focus instead of being focused directly. *) - external should_use_virtual_focus : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "shouldUseVirtualFocus" [@@mel.get] + + external should_use_virtual_focus : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "shouldUseVirtualFocus" + [@@mel.get] + (** Whether the collection items should use virtual focus instead of being + focused directly. *) + + external allows_tab_navigation : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "allowsTabNavigation" + [@@mel.get] (** Whether navigation through tab key is enabled. *) - external allows_tab_navigation : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "allowsTabNavigation" [@@mel.get] + + external is_virtualized : + 'data t -> (bool, bool option Solidtype.Solid.accessor) either option + = "isVirtualized" + [@@mel.get] (** Whether the option is contained in a virtual scroller. *) - external is_virtualized : 'data t -> (bool, bool option Solidtype.Solid.accessor) either option = "isVirtualized" [@@mel.get] - (** When virtualized, the Virtualizer function used to scroll to the item of the key provided. *) - external scroll_to_key : 'data t -> (string -> unit, (string -> unit) option Solidtype.Solid.accessor) either option = "scrollToKey" [@@mel.get] + + external scroll_to_key : + 'data t -> + (string -> unit, (string -> unit) option Solidtype.Solid.accessor) either + option = "scrollToKey" + [@@mel.get] + (** When virtualized, the Virtualizer function used to scroll to the item of + the key provided. *) + + external orientation : + 'data t -> + ( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + option = "orientation" + [@@mel.get] (** The orientation of the selectable list. *) - external orientation : 'data t -> ([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either option = "orientation" [@@mel.get] - external make : collection:('data t_collection_node t_collection Solidtype.Solid.accessor [@mel.as "collection"]) -> selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> ?keyboard_delegate:((t_keyboard_delegate, t_keyboard_delegate option Solidtype.Solid.accessor) either [@mel.as "keyboardDelegate"]) -> ?auto_focus:(([ `first | `last ], (bool, ([ `first | `last ], bool) either option Solidtype.Solid.accessor) either) either [@mel.as "autoFocus"]) -> ?defer_auto_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "deferAutoFocus"]) -> ?should_focus_wrap:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldFocusWrap"]) -> ?disallow_empty_selection:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowEmptySelection"]) -> ?select_on_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "selectOnFocus"]) -> ?disallow_type_ahead:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "disallowTypeAhead"]) -> ?should_use_virtual_focus:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "shouldUseVirtualFocus"]) -> ?allows_tab_navigation:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "allowsTabNavigation"]) -> ?is_virtualized:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "isVirtualized"]) -> ?scroll_to_key:((string -> unit, (string -> unit) option Solidtype.Solid.accessor) either [@mel.as "scrollToKey"]) -> ?orientation:(([ `horizontal | `vertical ], [ `horizontal | `vertical ] option Solidtype.Solid.accessor) either [@mel.as "orientation"]) -> unit -> 'data t = "" [@@mel.obj] + + external make : + collection: + ('data t_collection_node t_collection Solidtype.Solid.accessor + [@mel.as "collection"]) -> + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + ?keyboard_delegate: + (( t_keyboard_delegate, + t_keyboard_delegate option Solidtype.Solid.accessor ) + either + [@mel.as "keyboardDelegate"]) -> + ?auto_focus: + (( [ `first | `last ], + ( bool, + ([ `first | `last ], bool) either option Solidtype.Solid.accessor ) + either ) + either + [@mel.as "autoFocus"]) -> + ?defer_auto_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "deferAutoFocus"]) -> + ?should_focus_wrap: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldFocusWrap"]) -> + ?disallow_empty_selection: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowEmptySelection"]) -> + ?select_on_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "selectOnFocus"]) -> + ?disallow_type_ahead: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "disallowTypeAhead"]) -> + ?should_use_virtual_focus: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "shouldUseVirtualFocus"]) -> + ?allows_tab_navigation: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "allowsTabNavigation"]) -> + ?is_virtualized: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "isVirtualized"]) -> + ?scroll_to_key: + ((string -> unit, (string -> unit) option Solidtype.Solid.accessor) either + [@mel.as "scrollToKey"]) -> + ?orientation: + (( [ `horizontal | `vertical ], + [ `horizontal | `vertical ] option Solidtype.Solid.accessor ) + either + [@mel.as "orientation"]) -> + unit -> + 'data t = "" + [@@mel.obj] end module Selection_CreateSelectableList : sig type t = t_selection_create_selectable_list - external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" [@@mel.get] - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" [@@mel.send] + + external tab_index : t -> float option Solidtype.Solid.accessor = "tabIndex" + [@@mel.get] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external on_mouse_down : t -> Dom.mouseEvent -> unit = "onMouseDown" + [@@mel.send] + external on_focus_in : t -> Dom.focusEvent -> unit = "onFocusIn" [@@mel.send] - external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" [@@mel.send] - external make : tab_index:(float option Solidtype.Solid.accessor [@mel.as "tabIndex"]) -> on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> on_mouse_down:((Dom.mouseEvent -> unit) [@mel.as "onMouseDown"]) -> on_focus_in:((Dom.focusEvent -> unit) [@mel.as "onFocusIn"]) -> on_focus_out:((Dom.focusEvent -> unit) [@mel.as "onFocusOut"]) -> unit -> t = "" [@@mel.obj] + + external on_focus_out : t -> Dom.focusEvent -> unit = "onFocusOut" + [@@mel.send] + + external make : + tab_index:(float option Solidtype.Solid.accessor[@mel.as "tabIndex"]) -> + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> + on_mouse_down:((Dom.mouseEvent -> unit)[@mel.as "onMouseDown"]) -> + on_focus_in:((Dom.focusEvent -> unit)[@mel.as "onFocusIn"]) -> + on_focus_out:((Dom.focusEvent -> unit)[@mel.as "onFocusOut"]) -> + unit -> + t = "" + [@@mel.obj] end module CreateTypeSelectProps : sig type t = t_create_type_select_props + + external is_disabled : + t -> (bool, bool option Solidtype.Solid.accessor) either option + = "isDisabled" + [@@mel.get] (** Whether the type to select should be disabled. *) - external is_disabled : t -> (bool, bool option Solidtype.Solid.accessor) either option = "isDisabled" [@@mel.get] - (** A delegate that returns collection item keys with respect to visual layout. *) - external keyboard_delegate : t -> (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either = "keyboardDelegate" [@@mel.get] + + external keyboard_delegate : + t -> + (t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either + = "keyboardDelegate" + [@@mel.get] + (** A delegate that returns collection item keys with respect to visual + layout. *) + + external selection_manager : + t -> + ( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either = "selectionManager" + [@@mel.get] (** An interface for reading and updating multiple selection state. *) - external selection_manager : t -> (t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either = "selectionManager" [@@mel.get] + + val on_type_select : t -> (string -> unit) option (** Called when an item is focused by typing. *) - external on_type_select : t -> (string -> unit) option = "onTypeSelect" [@@mel.get] - external make : ?is_disabled:((bool, bool option Solidtype.Solid.accessor) either [@mel.as "isDisabled"]) -> keyboard_delegate:((t_keyboard_delegate, t_keyboard_delegate Solidtype.Solid.accessor) either [@mel.as "keyboardDelegate"]) -> selection_manager:((t_multiple_selection_manager, t_multiple_selection_manager Solidtype.Solid.accessor) either [@mel.as "selectionManager"]) -> ?on_type_select:((string -> unit) [@mel.as "onTypeSelect"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?is_disabled: + ((bool, bool option Solidtype.Solid.accessor) either + [@mel.as "isDisabled"]) -> + keyboard_delegate: + (( t_keyboard_delegate, + t_keyboard_delegate Solidtype.Solid.accessor ) + either + [@mel.as "keyboardDelegate"]) -> + selection_manager: + (( t_multiple_selection_manager, + t_multiple_selection_manager Solidtype.Solid.accessor ) + either + [@mel.as "selectionManager"]) -> + ?on_type_select:((string -> unit)[@mel.as "onTypeSelect"]) -> + unit -> + t = "" + [@@mel.obj] end module Selection_CreateTypeSelect : sig type t = t_selection_create_type_select - external type_select_handlers : t -> t_selection_create_type_select_type_select_handlers = "typeSelectHandlers" [@@mel.get] - external make : type_select_handlers:(t_selection_create_type_select_type_select_handlers [@mel.as "typeSelectHandlers"]) -> unit -> t = "" [@@mel.obj] + + external type_select_handlers : + t -> t_selection_create_type_select_type_select_handlers + = "typeSelectHandlers" + [@@mel.get] + + external make : + type_select_handlers: + (t_selection_create_type_select_type_select_handlers + [@mel.as "typeSelectHandlers"]) -> + unit -> + t = "" + [@@mel.obj] end module CheckboxDataSet : sig @@ -1546,34 +4448,168 @@ end module ColorChannelRange : sig type t = t_color_channel_range + + external min_value : t -> float = "minValue" + [@@mel.get] (** The minimum value of the color channel. *) - external min_value : t -> float = "minValue" [@@mel.get] + + external max_value : t -> float = "maxValue" + [@@mel.get] (** The maximum value of the color channel. *) - external max_value : t -> float = "maxValue" [@@mel.get] - (** The step value of the color channel, used when incrementing and decrementing. *) - external step : t -> float = "step" [@@mel.get] - (** The page step value of the color channel, used when incrementing and decrementing. *) - external page_size : t -> float = "pageSize" [@@mel.get] - external make : min_value:(float [@mel.as "minValue"]) -> max_value:(float [@mel.as "maxValue"]) -> step:(float [@mel.as "step"]) -> page_size:(float [@mel.as "pageSize"]) -> unit -> t = "" [@@mel.obj] -end -module Color_GetColorSpaceAxes : sig - type t = t_color_get_color_space_axes - external x_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] option = "xChannel" [@@mel.get] - external y_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] option = "yChannel" [@@mel.get] - external make : ?x_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "xChannel"]) -> ?y_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "yChannel"]) -> unit -> t = "" [@@mel.obj] + external step : t -> float = "step" + [@@mel.get] + (** The step value of the color channel, used when incrementing and + decrementing. *) + + external page_size : t -> float = "pageSize" + [@@mel.get] + (** The page step value of the color channel, used when incrementing and + decrementing. *) + + external make : + min_value:(float[@mel.as "minValue"]) -> + max_value:(float[@mel.as "maxValue"]) -> + step:(float[@mel.as "step"]) -> + page_size:(float[@mel.as "pageSize"]) -> + unit -> + t = "" + [@@mel.obj] +end + +module Color_GetColorSpaceAxes_XyChannels : sig + type t = t_color_get_color_space_axes_xy_channels + + external x_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + option = "xChannel" + [@@mel.get] + + external y_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + option = "yChannel" + [@@mel.get] + + external make : + ?x_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "xChannel"]) -> + ?y_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "yChannel"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorAxes : sig type t = t_color_axes - external x_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "xChannel" [@@mel.get] - external y_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "yChannel" [@@mel.get] - external z_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "zChannel" [@@mel.get] - external make : x_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "xChannel"]) -> y_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "yChannel"]) -> z_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "zChannel"]) -> unit -> t = "" [@@mel.obj] + + external x_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "xChannel" + [@@mel.get] + + external y_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "yChannel" + [@@mel.get] + + external z_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "zChannel" + [@@mel.get] + + external make : + x_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "xChannel"]) -> + y_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "yChannel"]) -> + z_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "zChannel"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorAreaState : sig type t = t_color_area_state + external value : t -> t_color Solidtype.Solid.accessor = "value" [@@mel.get] external set_value : t -> t_color -> unit = "setValue" [@@mel.send] external x_value : t -> float Solidtype.Solid.accessor = "xValue" [@@mel.get] @@ -1582,33 +4618,114 @@ module ColorAreaState : sig external set_y_value : t -> float -> unit = "setYValue" [@@mel.send] external x_step : t -> float Solidtype.Solid.accessor = "xStep" [@@mel.get] external y_step : t -> float Solidtype.Solid.accessor = "yStep" [@@mel.get] - external x_page_size : t -> float Solidtype.Solid.accessor = "xPageSize" [@@mel.get] - external y_page_size : t -> float Solidtype.Solid.accessor = "yPageSize" [@@mel.get] - external x_max_value : t -> float Solidtype.Solid.accessor = "xMaxValue" [@@mel.get] - external y_max_value : t -> float Solidtype.Solid.accessor = "yMaxValue" [@@mel.get] - external x_min_value : t -> float Solidtype.Solid.accessor = "xMinValue" [@@mel.get] - external y_min_value : t -> float Solidtype.Solid.accessor = "yMinValue" [@@mel.get] + + external x_page_size : t -> float Solidtype.Solid.accessor = "xPageSize" + [@@mel.get] + + external y_page_size : t -> float Solidtype.Solid.accessor = "yPageSize" + [@@mel.get] + + external x_max_value : t -> float Solidtype.Solid.accessor = "xMaxValue" + [@@mel.get] + + external y_max_value : t -> float Solidtype.Solid.accessor = "yMaxValue" + [@@mel.get] + + external x_min_value : t -> float Solidtype.Solid.accessor = "xMinValue" + [@@mel.get] + + external y_min_value : t -> float Solidtype.Solid.accessor = "yMinValue" + [@@mel.get] + external increment_x : t -> float -> unit = "incrementX" [@@mel.send] external increment_y : t -> float -> unit = "incrementY" [@@mel.send] external decrement_x : t -> float -> unit = "decrementX" [@@mel.send] external decrement_y : t -> float -> unit = "decrementY" [@@mel.send] - external get_thumb_position : t -> unit -> t_color_area_state_get_thumb_position = "getThumbPosition" [@@mel.send] - external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" [@@mel.get] + + external get_thumb_position : + t -> unit -> t_color_area_state_get_thumb_position = "getThumbPosition" + [@@mel.send] + + external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" + [@@mel.get] + external set_is_dragging : t -> bool -> unit = "setIsDragging" [@@mel.send] - external channels : t -> t_color_area_state_channels Solidtype.Solid.accessor = "channels" [@@mel.get] + + external channels : t -> t_color_area_state_channels Solidtype.Solid.accessor + = "channels" + [@@mel.get] + external reset_value : t -> unit -> unit = "resetValue" [@@mel.send] - external get_thumb_percent : t -> unit -> t_color_area_state_get_thumb_percent = "getThumbPercent" [@@mel.send] - external set_thumb_percent : t -> t_color_area_state_set_thumb_percent -> unit = "setThumbPercent" [@@mel.send] - external set_thumb_value : t -> t_color_area_state_set_thumb_value -> unit = "setThumbValue" [@@mel.send] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external make : value:(t_color Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:((t_color -> unit) [@mel.as "setValue"]) -> x_value:(float Solidtype.Solid.accessor [@mel.as "xValue"]) -> y_value:(float Solidtype.Solid.accessor [@mel.as "yValue"]) -> set_x_value:((float -> unit) [@mel.as "setXValue"]) -> set_y_value:((float -> unit) [@mel.as "setYValue"]) -> x_step:(float Solidtype.Solid.accessor [@mel.as "xStep"]) -> y_step:(float Solidtype.Solid.accessor [@mel.as "yStep"]) -> x_page_size:(float Solidtype.Solid.accessor [@mel.as "xPageSize"]) -> y_page_size:(float Solidtype.Solid.accessor [@mel.as "yPageSize"]) -> x_max_value:(float Solidtype.Solid.accessor [@mel.as "xMaxValue"]) -> y_max_value:(float Solidtype.Solid.accessor [@mel.as "yMaxValue"]) -> x_min_value:(float Solidtype.Solid.accessor [@mel.as "xMinValue"]) -> y_min_value:(float Solidtype.Solid.accessor [@mel.as "yMinValue"]) -> increment_x:((float -> unit) [@mel.as "incrementX"]) -> increment_y:((float -> unit) [@mel.as "incrementY"]) -> decrement_x:((float -> unit) [@mel.as "decrementX"]) -> decrement_y:((float -> unit) [@mel.as "decrementY"]) -> get_thumb_position:((unit -> t_color_area_state_get_thumb_position) [@mel.as "getThumbPosition"]) -> is_dragging:(bool Solidtype.Solid.accessor [@mel.as "isDragging"]) -> set_is_dragging:((bool -> unit) [@mel.as "setIsDragging"]) -> channels:(t_color_area_state_channels Solidtype.Solid.accessor [@mel.as "channels"]) -> reset_value:((unit -> unit) [@mel.as "resetValue"]) -> get_thumb_percent:((unit -> t_color_area_state_get_thumb_percent) [@mel.as "getThumbPercent"]) -> set_thumb_percent:((t_color_area_state_set_thumb_percent -> unit) [@mel.as "setThumbPercent"]) -> set_thumb_value:((t_color_area_state_set_thumb_value -> unit) [@mel.as "setThumbValue"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> unit -> t = "" [@@mel.obj] -end -module ColorAreaContextValue_OnDrag : sig - type t = t_color_area_context_value_on_drag + external get_thumb_percent : t -> unit -> t_color_area_state_get_thumb_percent + = "getThumbPercent" + [@@mel.send] + + external set_thumb_percent : + t -> t_color_area_state_set_thumb_percent_value -> unit = "setThumbPercent" + [@@mel.send] + + external set_thumb_value : + t -> t_color_area_state_set_thumb_value_value -> unit = "setThumbValue" + [@@mel.send] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external make : + value:(t_color Solidtype.Solid.accessor[@mel.as "value"]) -> + set_value:((t_color -> unit)[@mel.as "setValue"]) -> + x_value:(float Solidtype.Solid.accessor[@mel.as "xValue"]) -> + y_value:(float Solidtype.Solid.accessor[@mel.as "yValue"]) -> + set_x_value:((float -> unit)[@mel.as "setXValue"]) -> + set_y_value:((float -> unit)[@mel.as "setYValue"]) -> + x_step:(float Solidtype.Solid.accessor[@mel.as "xStep"]) -> + y_step:(float Solidtype.Solid.accessor[@mel.as "yStep"]) -> + x_page_size:(float Solidtype.Solid.accessor[@mel.as "xPageSize"]) -> + y_page_size:(float Solidtype.Solid.accessor[@mel.as "yPageSize"]) -> + x_max_value:(float Solidtype.Solid.accessor[@mel.as "xMaxValue"]) -> + y_max_value:(float Solidtype.Solid.accessor[@mel.as "yMaxValue"]) -> + x_min_value:(float Solidtype.Solid.accessor[@mel.as "xMinValue"]) -> + y_min_value:(float Solidtype.Solid.accessor[@mel.as "yMinValue"]) -> + increment_x:((float -> unit)[@mel.as "incrementX"]) -> + increment_y:((float -> unit)[@mel.as "incrementY"]) -> + decrement_x:((float -> unit)[@mel.as "decrementX"]) -> + decrement_y:((float -> unit)[@mel.as "decrementY"]) -> + get_thumb_position: + ((unit -> t_color_area_state_get_thumb_position) + [@mel.as "getThumbPosition"]) -> + is_dragging:(bool Solidtype.Solid.accessor[@mel.as "isDragging"]) -> + set_is_dragging:((bool -> unit)[@mel.as "setIsDragging"]) -> + channels: + (t_color_area_state_channels Solidtype.Solid.accessor[@mel.as "channels"]) -> + reset_value:((unit -> unit)[@mel.as "resetValue"]) -> + get_thumb_percent: + ((unit -> t_color_area_state_get_thumb_percent) + [@mel.as "getThumbPercent"]) -> + set_thumb_percent: + ((t_color_area_state_set_thumb_percent_value -> unit) + [@mel.as "setThumbPercent"]) -> + set_thumb_value: + ((t_color_area_state_set_thumb_value_value -> unit) + [@mel.as "setThumbValue"]) -> + is_disabled:(bool Solidtype.Solid.accessor[@mel.as "isDisabled"]) -> + unit -> + t = "" + [@@mel.obj] +end + +module ColorAreaContextValue_OnDrag_Deltas : sig + type t = t_color_area_context_value_on_drag_deltas + external delta_x : t -> float = "deltaX" [@@mel.get] external delta_y : t -> float = "deltaY" [@@mel.get] - external make : delta_x:(float [@mel.as "deltaX"]) -> delta_y:(float [@mel.as "deltaY"]) -> unit -> t = "" [@@mel.obj] + + external make : + delta_x:(float[@mel.as "deltaX"]) -> + delta_y:(float[@mel.as "deltaY"]) -> + unit -> + t = "" + [@@mel.obj] end module BoundEventHandler : sig @@ -1617,53 +4734,110 @@ end module Context_Id : sig type t = t_context_id + external to_string : t -> unit -> string = "toString" [@@mel.send] external value_of : t -> unit -> t_context_id = "valueOf" [@@mel.send] + + external description : t -> string option = "description" + [@@mel.get] (** Expose the \[\[Description\]\] internal slot of a symbol directly. *) - external description : t -> string option = "description" [@@mel.get] end -(** Extend props to require a `children` prop with the specified type. - Use this for components where you need a specific child type, - typically a function that receives specific argument types. - Note that all JSX are of the type `JSX.Element`. *) +(** Extend props to require a `children` prop with the specified type. Use this + for components where you need a specific child type, typically a function + that receives specific argument types. Note that all JSX are of + the type `JSX.Element`. *) module FlowProps : sig type ('p, 'c) t = ('p, 'c) t_flow_props - external children : ('p, 'c) t -> Solidtype.Jsx.element = "children" [@@mel.get] - external make : value:('t [@mel.as "value"]) -> children:(Solidtype.Jsx.element [@mel.as "children"]) -> unit -> ('p, 'c) t = "" [@@mel.obj] + + external children : ('p, 'c) t -> Solidtype.Jsx.element = "children" + [@@mel.get] + + external make : + value:('t[@mel.as "value"]) -> + children:(Solidtype.Jsx.element[@mel.as "children"]) -> + unit -> + ('p, 'c) t = "" + [@@mel.obj] end -module Context_Provider : sig - type t = t_context_provider - external make : value:('t [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] +module Context_Provider_Props : sig + type t = t_context_provider_props + + external make : value:('t[@mel.as "value"]) -> unit -> t = "" [@@mel.obj] end module ColorWheelState : sig type t = t_color_wheel_state + external value : t -> t_color Solidtype.Solid.accessor = "value" [@@mel.get] external set_value : t -> t_color -> unit = "setValue" [@@mel.send] external hue : t -> float Solidtype.Solid.accessor = "hue" [@@mel.get] external set_hue : t -> float -> unit = "setHue" [@@mel.send] external step : t -> float Solidtype.Solid.accessor = "step" [@@mel.get] - external page_size : t -> float Solidtype.Solid.accessor = "pageSize" [@@mel.get] - external max_value : t -> float Solidtype.Solid.accessor = "maxValue" [@@mel.get] - external min_value : t -> float Solidtype.Solid.accessor = "minValue" [@@mel.get] + + external page_size : t -> float Solidtype.Solid.accessor = "pageSize" + [@@mel.get] + + external max_value : t -> float Solidtype.Solid.accessor = "maxValue" + [@@mel.get] + + external min_value : t -> float Solidtype.Solid.accessor = "minValue" + [@@mel.get] + external increment : t -> float -> unit = "increment" [@@mel.send] external decrement : t -> float -> unit = "decrement" [@@mel.send] - external get_thumb_position : t -> unit -> t_color_wheel_state_get_thumb_position = "getThumbPosition" [@@mel.send] - external set_thumb_value : t -> float -> float -> float -> unit = "setThumbValue" [@@mel.send] - external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" [@@mel.get] + + external get_thumb_position : + t -> unit -> t_color_wheel_state_get_thumb_position = "getThumbPosition" + [@@mel.send] + + external set_thumb_value : t -> float -> float -> float -> unit + = "setThumbValue" + [@@mel.send] + + external is_dragging : t -> bool Solidtype.Solid.accessor = "isDragging" + [@@mel.get] + external set_is_dragging : t -> bool -> unit = "setIsDragging" [@@mel.send] external reset_value : t -> unit -> unit = "resetValue" [@@mel.send] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external make : value:(t_color Solidtype.Solid.accessor [@mel.as "value"]) -> set_value:((t_color -> unit) [@mel.as "setValue"]) -> hue:(float Solidtype.Solid.accessor [@mel.as "hue"]) -> set_hue:((float -> unit) [@mel.as "setHue"]) -> step:(float Solidtype.Solid.accessor [@mel.as "step"]) -> page_size:(float Solidtype.Solid.accessor [@mel.as "pageSize"]) -> max_value:(float Solidtype.Solid.accessor [@mel.as "maxValue"]) -> min_value:(float Solidtype.Solid.accessor [@mel.as "minValue"]) -> increment:((float -> unit) [@mel.as "increment"]) -> decrement:((float -> unit) [@mel.as "decrement"]) -> get_thumb_position:((unit -> t_color_wheel_state_get_thumb_position) [@mel.as "getThumbPosition"]) -> set_thumb_value:((float -> float -> float -> unit) [@mel.as "setThumbValue"]) -> is_dragging:(bool Solidtype.Solid.accessor [@mel.as "isDragging"]) -> set_is_dragging:((bool -> unit) [@mel.as "setIsDragging"]) -> reset_value:((unit -> unit) [@mel.as "resetValue"]) -> is_disabled:(bool Solidtype.Solid.accessor [@mel.as "isDisabled"]) -> unit -> t = "" [@@mel.obj] -end -module ColorWheelContextValue_OnDrag : sig - type t = t_color_wheel_context_value_on_drag + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + val make : + value:t_color Solidtype.Solid.accessor -> + set_value:(t_color -> unit) -> + hue:float Solidtype.Solid.accessor -> + set_hue:(float -> unit) -> + step:float Solidtype.Solid.accessor -> + page_size:float Solidtype.Solid.accessor -> + max_value:float Solidtype.Solid.accessor -> + min_value:float Solidtype.Solid.accessor -> + increment:(float -> unit) -> + decrement:(float -> unit) -> + get_thumb_position:(unit -> t_color_wheel_state_get_thumb_position) -> + set_thumb_value:(float -> float -> float -> unit) -> + is_dragging:bool Solidtype.Solid.accessor -> + set_is_dragging:(bool -> unit) -> + reset_value:(unit -> unit) -> + is_disabled:bool Solidtype.Solid.accessor -> + unit -> + t +end + +module ColorWheelContextValue_OnDrag_Deltas : sig + type t = t_color_wheel_context_value_on_drag_deltas + external delta_x : t -> float = "deltaX" [@@mel.get] external delta_y : t -> float = "deltaY" [@@mel.get] - external make : delta_x:(float [@mel.as "deltaX"]) -> delta_y:(float [@mel.as "deltaY"]) -> unit -> t = "" [@@mel.obj] + + external make : + delta_x:(float[@mel.as "deltaX"]) -> + delta_y:(float[@mel.as "deltaY"]) -> + unit -> + t = "" + [@@mel.obj] end module ComboboxDataSet : sig @@ -1672,9 +4846,13 @@ end module ContextMenuContextValue_SetAnchorRect : sig type t = t_context_menu_context_value_set_anchor_rect + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module HoverCardDataSet : sig @@ -1683,6 +4861,7 @@ end module ResolvedDateTimeFormatOptions : sig type t = t_resolved_date_time_format_options + external locale : t -> string = "locale" [@@mel.get] external calendar : t -> string = "calendar" [@@mel.get] external numbering_system : t -> string = "numberingSystem" [@@mel.get] @@ -1698,57 +4877,172 @@ module ResolvedDateTimeFormatOptions : sig external second : t -> string option = "second" [@@mel.get] external time_zone_name : t -> string option = "timeZoneName" [@@mel.get] external format_matcher : t -> string option = "formatMatcher" [@@mel.get] - external date_style : t -> [ `long | `short | `full | `medium ] option = "dateStyle" [@@mel.get] - external time_style : t -> [ `long | `short | `full | `medium ] option = "timeStyle" [@@mel.get] - external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" [@@mel.get] - external day_period : t -> [ `long | `short | `narrow ] option = "dayPeriod" [@@mel.get] - external fractional_second_digits : t -> float option = "fractionalSecondDigits" [@@mel.get] - external make : locale:(string [@mel.as "locale"]) -> calendar:(string [@mel.as "calendar"]) -> numbering_system:(string [@mel.as "numberingSystem"]) -> time_zone:(string [@mel.as "timeZone"]) -> ?hour12:(bool [@mel.as "hour12"]) -> ?weekday:(string [@mel.as "weekday"]) -> ?era:(string [@mel.as "era"]) -> ?year:(string [@mel.as "year"]) -> ?month:(string [@mel.as "month"]) -> ?day:(string [@mel.as "day"]) -> ?hour:(string [@mel.as "hour"]) -> ?minute:(string [@mel.as "minute"]) -> ?second:(string [@mel.as "second"]) -> ?time_zone_name:(string [@mel.as "timeZoneName"]) -> ?format_matcher:(string [@mel.as "formatMatcher"]) -> ?date_style:([ `long | `short | `full | `medium ] [@mel.as "dateStyle"]) -> ?time_style:([ `long | `short | `full | `medium ] [@mel.as "timeStyle"]) -> ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ] [@mel.as "hourCycle"]) -> ?day_period:([ `long | `short | `narrow ] [@mel.as "dayPeriod"]) -> ?fractional_second_digits:(float [@mel.as "fractionalSecondDigits"]) -> unit -> t = "" [@@mel.obj] + + external date_style : t -> [ `full | `long | `medium | `short ] option + = "dateStyle" + [@@mel.get] + + external time_style : t -> [ `full | `long | `medium | `short ] option + = "timeStyle" + [@@mel.get] + + external hour_cycle : t -> [ `h11 | `h12 | `h23 | `h24 ] option = "hourCycle" + [@@mel.get] + + external day_period : t -> [ `long | `narrow | `short ] option = "dayPeriod" + [@@mel.get] + + external fractional_second_digits : t -> float option + = "fractionalSecondDigits" + [@@mel.get] + + external make : + locale:(string[@mel.as "locale"]) -> + calendar:(string[@mel.as "calendar"]) -> + numbering_system:(string[@mel.as "numberingSystem"]) -> + time_zone:(string[@mel.as "timeZone"]) -> + ?hour12:(bool[@mel.as "hour12"]) -> + ?weekday:(string[@mel.as "weekday"]) -> + ?era:(string[@mel.as "era"]) -> + ?year:(string[@mel.as "year"]) -> + ?month:(string[@mel.as "month"]) -> + ?day:(string[@mel.as "day"]) -> + ?hour:(string[@mel.as "hour"]) -> + ?minute:(string[@mel.as "minute"]) -> + ?second:(string[@mel.as "second"]) -> + ?time_zone_name:(string[@mel.as "timeZoneName"]) -> + ?format_matcher:(string[@mel.as "formatMatcher"]) -> + ?date_style:([ `full | `long | `medium | `short ][@mel.as "dateStyle"]) -> + ?time_style:([ `full | `long | `medium | `short ][@mel.as "timeStyle"]) -> + ?hour_cycle:([ `h11 | `h12 | `h23 | `h24 ][@mel.as "hourCycle"]) -> + ?day_period:([ `long | `narrow | `short ][@mel.as "dayPeriod"]) -> + ?fractional_second_digits:(float[@mel.as "fractionalSecondDigits"]) -> + unit -> + t = "" + [@@mel.obj] end module DateTimeFormatPart : sig type t = t_date_time_format_part - external type_ : t -> [ `hour | `minute | `second | `dayPeriod | `day | `era | `literal | `month | `timeZoneName | `weekday | `year | `unknown | `fractionalSecond ] = "type" [@@mel.get] + + external type_ : + t -> + [ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] = "type" + [@@mel.get] + external value : t -> string = "value" [@@mel.get] - external make : type_:([ `hour | `minute | `second | `dayPeriod | `day | `era | `literal | `month | `timeZoneName | `weekday | `year | `unknown | `fractionalSecond ] [@mel.as "type"]) -> value:(string [@mel.as "value"]) -> unit -> t = "" [@@mel.obj] -end -module DateTimeFormat_FormatRange : sig - type t = t_date_time_format_format_range - external to_string : t -> ?radix:float -> unit -> string = "toString" [@@mel.send] - external value_of : t -> unit -> t_date_time_format_format_range = "valueOf" [@@mel.send] + external make : + type_: + ([ `day + | `dayPeriod + | `era + | `fractionalSecond + | `hour + | `literal + | `minute + | `month + | `second + | `timeZoneName + | `unknown + | `weekday + | `year ] + [@mel.as "type"]) -> + value:(string[@mel.as "value"]) -> + unit -> + t = "" + [@@mel.obj] end (** An interface for reading and updating multiple selection state. *) module SelectionManager : sig type t = t_selection_manager - external selection_mode : t -> unit -> [ `none | `single | `multiple ] = "selectionMode" [@@mel.send] - external disallow_empty_selection : t -> unit -> bool = "disallowEmptySelection" [@@mel.send] - external selection_behavior : t -> unit -> [ `toggle | `replace ] = "selectionBehavior" [@@mel.send] - external set_selection_behavior : t -> [ `toggle | `replace ] -> unit = "setSelectionBehavior" [@@mel.send] + + external selection_mode : t -> unit -> [ `multiple | `none | `single ] + = "selectionMode" + [@@mel.send] + + external disallow_empty_selection : t -> unit -> bool + = "disallowEmptySelection" + [@@mel.send] + + external selection_behavior : t -> unit -> [ `replace | `toggle ] + = "selectionBehavior" + [@@mel.send] + + external set_selection_behavior : t -> [ `replace | `toggle ] -> unit + = "setSelectionBehavior" + [@@mel.send] + external is_focused : t -> unit -> bool = "isFocused" [@@mel.send] external set_focused : t -> bool -> unit = "setFocused" [@@mel.send] external focused_key : t -> unit -> string option = "focusedKey" [@@mel.send] - external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" [@@mel.send] - external selected_keys : t -> unit -> string Js.Set.t = "selectedKeys" [@@mel.send] + + external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" + [@@mel.send] + + external selected_keys : t -> unit -> string Js.Set.t = "selectedKeys" + [@@mel.send] + external is_selected : t -> string -> bool = "isSelected" [@@mel.send] external is_empty : t -> unit -> bool = "isEmpty" [@@mel.send] external is_select_all : t -> unit -> bool = "isSelectAll" [@@mel.send] - external first_selected_key : t -> unit -> string option = "firstSelectedKey" [@@mel.send] - external last_selected_key : t -> unit -> string option = "lastSelectedKey" [@@mel.send] - external extend_selection : t -> string -> unit = "extendSelection" [@@mel.send] - external toggle_selection : t -> string -> unit = "toggleSelection" [@@mel.send] - external replace_selection : t -> string -> unit = "replaceSelection" [@@mel.send] - external set_selected_keys : t -> string array -> unit = "setSelectedKeys" [@@mel.send] + + external first_selected_key : t -> unit -> string option = "firstSelectedKey" + [@@mel.send] + + external last_selected_key : t -> unit -> string option = "lastSelectedKey" + [@@mel.send] + + external extend_selection : t -> string -> unit = "extendSelection" + [@@mel.send] + + external toggle_selection : t -> string -> unit = "toggleSelection" + [@@mel.send] + + external replace_selection : t -> string -> unit = "replaceSelection" + [@@mel.send] + + external set_selected_keys : t -> string array -> unit = "setSelectedKeys" + [@@mel.send] + external select_all : t -> unit -> unit = "selectAll" [@@mel.send] external clear_selection : t -> unit -> unit = "clearSelection" [@@mel.send] - external toggle_select_all : t -> unit -> unit = "toggleSelectAll" [@@mel.send] - external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit = "select" [@@mel.send] - external is_selection_equal : t -> string Js.Set.t -> bool = "isSelectionEqual" [@@mel.send] + + external toggle_select_all : t -> unit -> unit = "toggleSelectAll" + [@@mel.send] + + external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit + = "select" + [@@mel.send] + + external is_selection_equal : t -> string Js.Set.t -> bool + = "isSelectionEqual" + [@@mel.send] + external can_select_item : t -> string -> bool = "canSelectItem" [@@mel.send] external is_disabled : t -> string -> bool = "isDisabled" [@@mel.send] - external to_multiple_selection_manager : t -> t_multiple_selection_manager = "%identity" - external make : _ t_collection_node t_collection Solidtype.Solid.accessor -> t_multiple_selection_state -> t = "SelectionManager" [@@mel.new] [@@mel.module "@kobalte/core"] + + external to_multiple_selection_manager : t -> t_multiple_selection_manager + = "%identity" + + external make : + _ t_collection_node t_collection Solidtype.Solid.accessor -> + t_multiple_selection_state -> + t = "SelectionManager" + [@@mel.new] [@@mel.module "@kobalte/core"] end module MenubarDataSet : sig @@ -1781,52 +5075,130 @@ end module SliderState : sig type t = t_slider_state - external values : t -> float array Solidtype.Solid.accessor = "values" [@@mel.get] + + external values : t -> float array Solidtype.Solid.accessor = "values" + [@@mel.get] + external get_thumb_value : t -> float -> float = "getThumbValue" [@@mel.send] - external set_thumb_value : t -> float -> float -> unit = "setThumbValue" [@@mel.send] - external get_thumb_percent : t -> float -> float = "getThumbPercent" [@@mel.send] - external set_thumb_percent : t -> float -> float -> unit = "setThumbPercent" [@@mel.send] - external is_thumb_dragging : t -> float -> bool = "isThumbDragging" [@@mel.send] - external set_thumb_dragging : t -> float -> bool -> unit = "setThumbDragging" [@@mel.send] - external focused_thumb : t -> float option Solidtype.Solid.accessor = "focusedThumb" [@@mel.get] - external set_focused_thumb : t -> float option -> unit = "setFocusedThumb" [@@mel.send] - external get_value_percent : t -> float -> float = "getValuePercent" [@@mel.send] - external get_thumb_value_label : t -> float -> string = "getThumbValueLabel" [@@mel.send] - external get_formatted_value : t -> float -> string = "getFormattedValue" [@@mel.send] - external get_thumb_min_value : t -> float -> float = "getThumbMinValue" [@@mel.send] - external get_thumb_max_value : t -> float -> float = "getThumbMaxValue" [@@mel.send] - external get_percent_value : t -> float -> float = "getPercentValue" [@@mel.send] - external is_thumb_editable : t -> float -> bool = "isThumbEditable" [@@mel.send] - external set_thumb_editable : t -> float -> bool -> unit = "setThumbEditable" [@@mel.send] - external increment_thumb : t -> float -> ?step_size:float -> unit -> unit = "incrementThumb" [@@mel.send] - external decrement_thumb : t -> float -> ?step_size:float -> unit -> unit = "decrementThumb" [@@mel.send] + + external set_thumb_value : t -> float -> float -> unit = "setThumbValue" + [@@mel.send] + + external get_thumb_percent : t -> float -> float = "getThumbPercent" + [@@mel.send] + + external set_thumb_percent : t -> float -> float -> unit = "setThumbPercent" + [@@mel.send] + + external is_thumb_dragging : t -> float -> bool = "isThumbDragging" + [@@mel.send] + + external set_thumb_dragging : t -> float -> bool -> unit = "setThumbDragging" + [@@mel.send] + + external focused_thumb : t -> float option Solidtype.Solid.accessor + = "focusedThumb" + [@@mel.get] + + external set_focused_thumb : t -> float option -> unit = "setFocusedThumb" + [@@mel.send] + + external get_value_percent : t -> float -> float = "getValuePercent" + [@@mel.send] + + external get_thumb_value_label : t -> float -> string = "getThumbValueLabel" + [@@mel.send] + + external get_formatted_value : t -> float -> string = "getFormattedValue" + [@@mel.send] + + external get_thumb_min_value : t -> float -> float = "getThumbMinValue" + [@@mel.send] + + external get_thumb_max_value : t -> float -> float = "getThumbMaxValue" + [@@mel.send] + + external get_percent_value : t -> float -> float = "getPercentValue" + [@@mel.send] + + external is_thumb_editable : t -> float -> bool = "isThumbEditable" + [@@mel.send] + + external set_thumb_editable : t -> float -> bool -> unit = "setThumbEditable" + [@@mel.send] + + external increment_thumb : t -> float -> ?step_size:float -> unit -> unit + = "incrementThumb" + [@@mel.send] + + external decrement_thumb : t -> float -> ?step_size:float -> unit -> unit + = "decrementThumb" + [@@mel.send] + external step : t -> float Solidtype.Solid.accessor = "step" [@@mel.get] - external page_size : t -> float Solidtype.Solid.accessor = "pageSize" [@@mel.get] - external orientation : t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" [@@mel.get] - external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" [@@mel.get] - external set_values : t -> (float array, float array -> float array) either -> unit = "setValues" [@@mel.send] + + external page_size : t -> float Solidtype.Solid.accessor = "pageSize" + [@@mel.get] + + external orientation : + t -> [ `horizontal | `vertical ] Solidtype.Solid.accessor = "orientation" + [@@mel.get] + + external is_disabled : t -> bool Solidtype.Solid.accessor = "isDisabled" + [@@mel.get] + + external set_values : + t -> (float array, float array -> float array) either -> unit = "setValues" + [@@mel.send] + external reset_values : t -> unit -> unit = "resetValues" [@@mel.send] end module CollectionItemWithRef : sig type t = t_collection_item_with_ref + + external type_ : t -> [ `item | `section ] = "type" + [@@mel.get] (** The type of the item. *) - external type_ : t -> [ `section | `item ] = "type" [@@mel.get] + + external key : t -> string = "key" + [@@mel.get] (** A unique key for the item. *) - external key : t -> string = "key" [@@mel.get] + + external text_value : t -> string = "textValue" + [@@mel.get] (** A string value for the item, used for features like typeahead. *) - external text_value : t -> string = "textValue" [@@mel.get] + + external disabled : t -> bool = "disabled" + [@@mel.get] (** Whether the item is disabled. *) - external disabled : t -> bool = "disabled" [@@mel.get] - external ref : t -> Dom.element option Solidtype.Solid.accessor = "ref" [@@mel.get] - external make : type_:([ `section | `item ] [@mel.as "type"]) -> key:(string [@mel.as "key"]) -> text_value:(string [@mel.as "textValue"]) -> disabled:(bool [@mel.as "disabled"]) -> ref:(Dom.element option Solidtype.Solid.accessor [@mel.as "ref"]) -> unit -> t = "" [@@mel.obj] + + external ref : t -> Dom.element option Solidtype.Solid.accessor = "ref" + [@@mel.get] + + external make : + type_:([ `item | `section ][@mel.as "type"]) -> + key:(string[@mel.as "key"]) -> + text_value:(string[@mel.as "textValue"]) -> + disabled:(bool[@mel.as "disabled"]) -> + ref:(Dom.element option Solidtype.Solid.accessor[@mel.as "ref"]) -> + unit -> + t = "" + [@@mel.obj] end -module SliderContextValue_OnSlideMove : sig - type t = t_slider_context_value_on_slide_move +module SliderContextValue_OnSlideMove_Deltas : sig + type t = t_slider_context_value_on_slide_move_deltas + external delta_x : t -> float = "deltaX" [@@mel.get] external delta_y : t -> float = "deltaY" [@@mel.get] - external make : delta_x:(float [@mel.as "deltaX"]) -> delta_y:(float [@mel.as "deltaY"]) -> unit -> t = "" [@@mel.obj] + + external make : + delta_x:(float[@mel.as "deltaX"]) -> + delta_y:(float[@mel.as "deltaY"]) -> + unit -> + t = "" + [@@mel.obj] end module SwitchDataSet : sig @@ -1835,49 +5207,96 @@ end module SingleSelectListState : sig type t = t_single_select_list_state + + external selected_item : + t -> t_unknown t_collection_node option Solidtype.Solid.accessor + = "selectedItem" + [@@mel.get] (** The value of the currently selected item. *) - external selected_item : t -> _ t_collection_node option Solidtype.Solid.accessor = "selectedItem" [@@mel.get] + + external selected_key : t -> string option Solidtype.Solid.accessor + = "selectedKey" + [@@mel.get] (** The key for the currently selected item. *) - external selected_key : t -> string option Solidtype.Solid.accessor = "selectedKey" [@@mel.get] - external set_selected_key : t -> string -> unit = "setSelectedKey" [@@mel.send] + + external set_selected_key : t -> string -> unit = "setSelectedKey" + [@@mel.send] + + external collection : + t -> t_unknown t_collection_node t_collection Solidtype.Solid.accessor + = "collection" + [@@mel.get] (** A collection of items in the list. *) - external collection : t -> _ t_collection_node t_collection Solidtype.Solid.accessor = "collection" [@@mel.get] + + external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor + = "selectionManager" + [@@mel.get] (** A selection manager to read and update multiple selection state. *) - external selection_manager : t -> t_selection_manager Solidtype.Solid.accessor = "selectionManager" [@@mel.get] end module SwipeEvent_Detail : sig type t = t_swipe_event_detail + external original_event : t -> Dom.pointerEvent = "originalEvent" [@@mel.get] external delta : t -> t_swipe_event_detail_delta = "delta" [@@mel.get] - external make : original_event:(Dom.pointerEvent [@mel.as "originalEvent"]) -> delta:(t_swipe_event_detail_delta [@mel.as "delta"]) -> unit -> t = "" [@@mel.obj] + + external make : + original_event:(Dom.pointerEvent[@mel.as "originalEvent"]) -> + delta:(t_swipe_event_detail_delta[@mel.as "delta"]) -> + unit -> + t = "" + [@@mel.obj] end module ToastComponentProps : sig type t = t_toast_component_props + + external toast_id : t -> float = "toastId" + [@@mel.get] (** A unique id for the toast. *) - external toast_id : t -> float = "toastId" [@@mel.get] - external make : toast_id:(float [@mel.as "toastId"]) -> unit -> t = "" [@@mel.obj] + + external make : toast_id:(float[@mel.as "toastId"]) -> unit -> t = "" + [@@mel.obj] end module ShowToastOptions : sig type t = t_show_toast_options + + external region : t -> string option = "region" + [@@mel.get] (** The id of the `` to display the toast in. *) - external region : t -> string option = "region" [@@mel.get] - external make : ?region:(string [@mel.as "region"]) -> unit -> t = "" [@@mel.obj] + + external make : ?region:(string[@mel.as "region"]) -> unit -> t = "" + [@@mel.obj] end module ToastPromiseComponentProps : sig type ('t, 'u) t = ('t, 'u) t_toast_promise_component_props + + external state : ('t, 'u) t -> [ `fulfilled | `pending | `rejected ] = "state" + [@@mel.get] (** The state of the promise. *) - external state : ('t, 'u) t -> [ `pending | `fulfilled | `rejected ] = "state" [@@mel.get] + + external data : ('t, 'u) t -> 't option = "data" + [@@mel.get] (** The resolved data of the promise when fulfilled. *) - external data : ('t, 'u) t -> 't option = "data" [@@mel.get] + + external error : ('t, 'u) t -> 'u option = "error" + [@@mel.get] (** The error of the promise when rejected. *) - external error : ('t, 'u) t -> 'u option = "error" [@@mel.get] + + external toast_id : ('t, 'u) t -> float = "toastId" + [@@mel.get] (** A unique id for the toast. *) - external toast_id : ('t, 'u) t -> float = "toastId" [@@mel.get] - external make : state:([ `pending | `fulfilled | `rejected ] [@mel.as "state"]) -> ?data:('t [@mel.as "data"]) -> ?error:('u [@mel.as "error"]) -> toast_id:(float [@mel.as "toastId"]) -> unit -> ('t, 'u) t = "" [@@mel.obj] + + external make : + state:([ `fulfilled | `pending | `rejected ][@mel.as "state"]) -> + ?data:('t[@mel.as "data"]) -> + ?error:('u[@mel.as "error"]) -> + toast_id:(float[@mel.as "toastId"]) -> + unit -> + ('t, 'u) t = "" + [@@mel.obj] end module TooltipDataSet : sig @@ -1886,122 +5305,302 @@ end module MultipleSelectionManager : sig type t = t_multiple_selection_manager + + external selection_mode : + t -> [ `multiple | `none | `single ] Solidtype.Solid.accessor + = "selectionMode" + [@@mel.get] (** The type of selection that is allowed in the collection. *) - external selection_mode : t -> [ `none | `single | `multiple ] Solidtype.Solid.accessor = "selectionMode" [@@mel.get] + + external selection_behavior : + t -> [ `replace | `toggle ] Solidtype.Solid.accessor = "selectionBehavior" + [@@mel.get] (** The selection behavior for the collection. *) - external selection_behavior : t -> [ `toggle | `replace ] Solidtype.Solid.accessor = "selectionBehavior" [@@mel.get] + + external disallow_empty_selection : t -> bool option Solidtype.Solid.accessor + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : t -> bool option Solidtype.Solid.accessor = "disallowEmptySelection" [@@mel.get] + + external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor + = "selectedKeys" + [@@mel.get] (** The currently selected keys in the collection. *) - external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor = "selectedKeys" [@@mel.get] + + external is_empty : t -> bool Solidtype.Solid.accessor = "isEmpty" + [@@mel.get] (** Whether the selection is empty. *) - external is_empty : t -> bool Solidtype.Solid.accessor = "isEmpty" [@@mel.get] + + external is_select_all : t -> bool Solidtype.Solid.accessor = "isSelectAll" + [@@mel.get] (** Whether all items in the collection are selected. *) - external is_select_all : t -> bool Solidtype.Solid.accessor = "isSelectAll" [@@mel.get] + + external first_selected_key : t -> string option Solidtype.Solid.accessor + = "firstSelectedKey" + [@@mel.get] (** The first selected key in the collection. *) - external first_selected_key : t -> string option Solidtype.Solid.accessor = "firstSelectedKey" [@@mel.get] + + external last_selected_key : t -> string option Solidtype.Solid.accessor + = "lastSelectedKey" + [@@mel.get] (** The last selected key in the collection. *) - external last_selected_key : t -> string option Solidtype.Solid.accessor = "lastSelectedKey" [@@mel.get] + + external is_selected : t -> string -> bool = "isSelected" + [@@mel.send] (** Returns whether a key is selected. *) - external is_selected : t -> string -> bool = "isSelected" [@@mel.send] - external is_selection_equal : t -> string Js.Set.t -> bool = "isSelectionEqual" [@@mel.send] - external extend_selection : t -> string -> unit = "extendSelection" [@@mel.send] + + external is_selection_equal : t -> string Js.Set.t -> bool + = "isSelectionEqual" + [@@mel.send] + + external extend_selection : t -> string -> unit = "extendSelection" + [@@mel.send] + + external toggle_selection : t -> string -> unit = "toggleSelection" + [@@mel.send] (** Toggles whether the given key is selected. *) - external toggle_selection : t -> string -> unit = "toggleSelection" [@@mel.send] + + external replace_selection : t -> string -> unit = "replaceSelection" + [@@mel.send] (** Replaces the selection with only the given key. *) - external replace_selection : t -> string -> unit = "replaceSelection" [@@mel.send] - external set_selected_keys : t -> string array -> unit = "setSelectedKeys" [@@mel.send] + + external set_selected_keys : t -> string array -> unit = "setSelectedKeys" + [@@mel.send] + external select_all : t -> unit -> unit = "selectAll" [@@mel.send] external clear_selection : t -> unit -> unit = "clearSelection" [@@mel.send] - external toggle_select_all : t -> unit -> unit = "toggleSelectAll" [@@mel.send] - external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit = "select" [@@mel.send] + + external toggle_select_all : t -> unit -> unit = "toggleSelectAll" + [@@mel.send] + + external select : t -> string -> ?e:Dom.pointerEvent -> unit -> unit + = "select" + [@@mel.send] + + external can_select_item : t -> string -> bool = "canSelectItem" + [@@mel.send] (** Returns whether the given key can be selected. *) - external can_select_item : t -> string -> bool = "canSelectItem" [@@mel.send] - (** Returns whether the given key is non-interactive, - i.e. both selection and actions are disabled. *) - external is_disabled : t -> string -> bool = "isDisabled" [@@mel.send] + + external is_disabled : t -> string -> bool = "isDisabled" + [@@mel.send] + (** Returns whether the given key is non-interactive, i.e. both selection and + actions are disabled. *) + + external set_selection_behavior : t -> [ `replace | `toggle ] -> unit + = "setSelectionBehavior" + [@@mel.send] (** Sets the selection behavior for the collection. *) - external set_selection_behavior : t -> [ `toggle | `replace ] -> unit = "setSelectionBehavior" [@@mel.send] + + external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" + [@@mel.get] (** Whether the collection is currently focused. *) - external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" [@@mel.get] + + external focused_key : t -> string option Solidtype.Solid.accessor + = "focusedKey" + [@@mel.get] (** The current focused key in the collection. *) - external focused_key : t -> string option Solidtype.Solid.accessor = "focusedKey" [@@mel.get] + external set_focused : t -> bool -> unit = "setFocused" [@@mel.send] - external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" [@@mel.send] + + external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" + [@@mel.send] end module Selection_CreateTypeSelect_TypeSelectHandlers : sig type t = t_selection_create_type_select_type_select_handlers - external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" [@@mel.send] - external make : on_key_down:((Dom.keyboardEvent -> unit) [@mel.as "onKeyDown"]) -> unit -> t = "" [@@mel.obj] + + external on_key_down : t -> Dom.keyboardEvent -> unit = "onKeyDown" + [@@mel.send] + + external make : + on_key_down:((Dom.keyboardEvent -> unit)[@mel.as "onKeyDown"]) -> unit -> t + = "" + [@@mel.obj] end module ColorAreaState_GetThumbPosition : sig type t = t_color_area_state_get_thumb_position + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module ColorAreaState_Channels : sig type t = t_color_area_state_channels - external x_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "xChannel" [@@mel.get] - external y_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "yChannel" [@@mel.get] - external z_channel : t -> [ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] = "zChannel" [@@mel.get] - external make : x_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "xChannel"]) -> y_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "yChannel"]) -> z_channel:([ `hue | `saturation | `brightness | `lightness | `red | `green | `blue | `alpha ] [@mel.as "zChannel"]) -> unit -> t = "" [@@mel.obj] + + external x_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "xChannel" + [@@mel.get] + + external y_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "yChannel" + [@@mel.get] + + external z_channel : + t -> + [ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] = "zChannel" + [@@mel.get] + + external make : + x_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "xChannel"]) -> + y_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "yChannel"]) -> + z_channel: + ([ `alpha + | `blue + | `brightness + | `green + | `hue + | `lightness + | `red + | `saturation ] + [@mel.as "zChannel"]) -> + unit -> + t = "" + [@@mel.obj] end module ColorAreaState_GetThumbPercent : sig type t = t_color_area_state_get_thumb_percent + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end -module ColorAreaState_SetThumbPercent : sig - type t = t_color_area_state_set_thumb_percent +module ColorAreaState_SetThumbPercent_Value : sig + type t = t_color_area_state_set_thumb_percent_value + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end -module ColorAreaState_SetThumbValue : sig - type t = t_color_area_state_set_thumb_value +module ColorAreaState_SetThumbValue_Value : sig + type t = t_color_area_state_set_thumb_value_value + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module ColorWheelState_GetThumbPosition : sig type t = t_color_wheel_state_get_thumb_position + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end module MultipleSelectionState : sig type t = t_multiple_selection_state + + external selection_mode : + t -> [ `multiple | `none | `single ] Solidtype.Solid.accessor + = "selectionMode" + [@@mel.get] (** The type of selection that is allowed in the collection. *) - external selection_mode : t -> [ `none | `single | `multiple ] Solidtype.Solid.accessor = "selectionMode" [@@mel.get] + + external selection_behavior : + t -> [ `replace | `toggle ] Solidtype.Solid.accessor = "selectionBehavior" + [@@mel.get] (** The selection behavior for the collection. *) - external selection_behavior : t -> [ `toggle | `replace ] Solidtype.Solid.accessor = "selectionBehavior" [@@mel.get] - external set_selection_behavior : t -> [ `toggle | `replace ] -> unit = "setSelectionBehavior" [@@mel.send] + + external set_selection_behavior : t -> [ `replace | `toggle ] -> unit + = "setSelectionBehavior" + [@@mel.send] + + external disallow_empty_selection : t -> bool Solidtype.Solid.accessor + = "disallowEmptySelection" + [@@mel.get] (** Whether the collection allows empty selection. *) - external disallow_empty_selection : t -> bool Solidtype.Solid.accessor = "disallowEmptySelection" [@@mel.get] + + external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor + = "selectedKeys" + [@@mel.get] (** The currently selected keys in the collection. *) - external selected_keys : t -> string Js.Set.t Solidtype.Solid.accessor = "selectedKeys" [@@mel.get] - external set_selected_keys : t -> string Js.Set.t -> unit = "setSelectedKeys" [@@mel.send] + + external set_selected_keys : t -> string Js.Set.t -> unit = "setSelectedKeys" + [@@mel.send] + + external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" + [@@mel.get] (** Whether the collection is currently focused. *) - external is_focused : t -> bool Solidtype.Solid.accessor = "isFocused" [@@mel.get] + + external focused_key : t -> string option Solidtype.Solid.accessor + = "focusedKey" + [@@mel.get] (** The current focused key in the collection. *) - external focused_key : t -> string option Solidtype.Solid.accessor = "focusedKey" [@@mel.get] + external set_focused : t -> bool -> unit = "setFocused" [@@mel.send] - external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" [@@mel.send] + + external set_focused_key : t -> ?key:string -> unit -> unit = "setFocusedKey" + [@@mel.send] end module SwipeEvent_Detail_Delta : sig type t = t_swipe_event_detail_delta + external x : t -> float = "x" [@@mel.get] external y : t -> float = "y" [@@mel.get] - external make : x:(float [@mel.as "x"]) -> y:(float [@mel.as "y"]) -> unit -> t = "" [@@mel.obj] + + external make : x:(float[@mel.as "x"]) -> y:(float[@mel.as "y"]) -> unit -> t + = "" + [@@mel.obj] end diff --git a/ppx/kobalte_names.ml b/ppx/kobalte_names.ml index 85884903..6c414c25 100644 --- a/ppx/kobalte_names.ml +++ b/ppx/kobalte_names.ml @@ -2,7 +2,4 @@ give back, with its JavaScript name. Generated by generate/kobalte.ts; never edited by hand. *) -let names = - [ - ("is_svg", "isSVG"); - ] +let names = [ ("is_svg", "isSVG") ] diff --git a/ppx/ppx_solidtype.ml b/ppx/ppx_solidtype.ml index 4234b71a..5dc5efdb 100644 --- a/ppx/ppx_solidtype.ml +++ b/ppx/ppx_solidtype.ml @@ -1041,7 +1041,10 @@ let is_nodes p = (* The props module: an abstract type, one getter per prop -- a live read of Solid's props object, so Solid tracks it -- and the check. A function prop - is read uncurried, the call Solid's JSX makes. *) + of one argument is read uncurried, the call Solid's JSX makes; one of more + is read as OCaml gave it, since its type does not say whether it takes + them at once or one at a time, and is applied as OCaml applies a function + it did not make. *) let props_module ~loc ~element ~drawn props = let vars = List.fold_left @@ -1065,9 +1068,13 @@ let props_module ~loc ~element ~drawn props = ] in let getter p = + (* Under [Check.value], which is the value itself, a function of several + arguments is one type to Melange, which else counts its arrows as the + getter's own. *) let field = - if p.arity > 0 then + if p.arity = 1 then { p.typ with ptyp_attributes = [ attribute ~loc "u" ] } + else if p.arity > 1 then [%type: [%t p.typ] Solidtype.Check.value] else p.typ in let field = @@ -1418,7 +1425,7 @@ let reader ~loc p = let call f = { (B.pexp_apply ~loc f (List.map (fun x -> (P.Nolabel, arg x)) xs)) with - pexp_attributes = [ attribute ~loc "u" ]; + pexp_attributes = (if p.arity = 1 then [ attribute ~loc "u" ] else []); } in let body = diff --git a/ppx/rhp_names.ml b/ppx/rhp_names.ml index c6d8f518..b107f30b 100644 --- a/ppx/rhp_names.ml +++ b/ppx/rhp_names.ml @@ -2,7 +2,4 @@ give back, with its JavaScript name. Generated by generate/rhp.ts; never edited by hand. *) -let names = - [ - - ] +let names = [] diff --git a/rhp/solidtype_rhp.ml b/rhp/solidtype_rhp.ml index 2a2553ce..60fe3d5c 100644 --- a/rhp/solidtype_rhp.ml +++ b/rhp/solidtype_rhp.ml @@ -21,8 +21,8 @@ module Slat = Slat module Ticks = Ticks include Helpers -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/area.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/area.md]. +*) module Area = struct module Props = struct external check : @@ -33,7 +33,8 @@ module Area = struct ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Svg.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Svg.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -49,7 +50,9 @@ module Axis = struct ?grid:bool Solidtype.Check.value -> ?cross:bool Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -57,8 +60,8 @@ module Axis = struct [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/bar.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/bar.md]. +*) module Bar = struct module Props = struct external check : @@ -69,7 +72,8 @@ module Bar = struct ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -77,8 +81,8 @@ module Bar = struct [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/cell.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/cell.md]. +*) module Cell = struct module Props = struct external check : @@ -87,7 +91,8 @@ module Cell = struct ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -95,8 +100,8 @@ module Cell = struct [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/chart.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/chart.md]. +*) module Chart = struct module Props = struct external check : @@ -122,7 +127,9 @@ module Chart = struct ?style:string Js.Dict.t Solidtype.Check.value -> ?ref:(Dom.htmlDivElement -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -130,8 +137,8 @@ module Chart = struct [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/dot.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/dot.md]. +*) module Dot = struct module Props = struct external check : @@ -143,7 +150,8 @@ module Dot = struct ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -151,8 +159,8 @@ module Dot = struct [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/label.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/label.md]. +*) module Label = struct module Props = struct external check : @@ -163,7 +171,8 @@ module Label = struct ?cross:float Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -171,10 +180,11 @@ module Label = struct [@@mel.module "@bezda/rhp"] end -(** A line through points: a sparkline in a slat, or on a Chart's cross scale a line chart. +(** A line through points: a sparkline in a slat, or on a Chart's cross scale a + line chart. - Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/line.md]. *) + Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/line.md]. +*) module Line = struct module Props = struct external check : @@ -186,7 +196,8 @@ module Line = struct ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Svg.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Svg.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -194,10 +205,11 @@ module Line = struct [@@mel.module "@bezda/rhp"] end -(** A place on the chart and nothing else: no size and nothing drawn, so whatever you put inside it sits at its value. +(** A place on the chart and nothing else: no size and nothing drawn, so + whatever you put inside it sits at its value. - Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/place.md]. *) + Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/place.md]. +*) module Place = struct module Props = struct external check : @@ -206,7 +218,8 @@ module Place = struct ?cross:float Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -214,8 +227,9 @@ module Place = struct [@@mel.module "@bezda/rhp"] end -(** A magazine-style panel around a chart: kicker, headline, dek, the chart, a note. Markup only; its look is the page's - CSS, and \@bezda/rhp/posters.css has the gallery's looks to start from. +(** A magazine-style panel around a chart: kicker, headline, dek, the chart, a + note. Markup only; its look is the page's CSS, and \@bezda/rhp/posters.css + has the gallery's looks to start from. Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/poster.md]. *) @@ -228,7 +242,8 @@ module Poster = struct ?dek:Solidtype.Jsx.element Solidtype.Check.value -> ?note:Solidtype.Jsx.element Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Figure.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Figure.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -239,14 +254,16 @@ end external theme : Types.RequiredThemeValues.t = "THEME" [@@mel.module "@bezda/rhp"] -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/theme.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/theme.md]. +*) module Theme = struct module Props = struct external check : value:Types.ThemeValues.t Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -254,8 +271,8 @@ module Theme = struct [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/tick.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/tick.md]. +*) module Tick = struct module Props = struct external check : @@ -265,7 +282,8 @@ module Tick = struct ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -273,73 +291,106 @@ module Tick = struct [@@mel.module "@bezda/rhp"] end -external animated_js : (unit -> 't) -> ?settings:(unit -> Types.Animated.t) -> unit -> (float option -> 't [@u]) = "animated" +external animated_js : + (unit -> 't) -> + ?settings:(unit -> Types.Animated_Settings.t) -> + unit -> + (float option -> 't[@u]) = "animated" [@@mel.module "@bezda/rhp"] -(** A value that moves to each new value over time: the reader gives the value to draw now, or ms ahead. *) -let animated x0 ?settings () = let r = animated_js x0 ?settings () in fun y0 -> (r y0 [@u]) -(** Item i of a data group (a list wraps around; one value is every row's). *) +let animated x0 ?settings () = + let r = animated_js x0 ?settings () in + fun y0 -> (r y0 [@u]) + external at : ('t, 't array) Types.Either.t -> float -> 't option = "at" [@@mel.module "@bezda/rhp"] +(** Item i of a data group (a list wraps around; one value is every row's). *) -(** Histogram bins: bin k covers x0\[k\]..x1\[k\] and holds tally\[k\] samples. Samples all alike get a scale one wide around - them, and no samples a scale from 0 to 1. *) -external bins : float option array -> ?options:Types.Bins.t -> unit -> Types.Bins2.t = "bins" +external bins : + float option array -> ?options:Types.Bins_Options.t -> unit -> Types.Bins.t + = "bins" [@@mel.module "@bezda/rhp"] +(** Histogram bins: bin k covers x0\[k\]..x1\[k\] and holds tally\[k\] samples. + Samples all alike get a scale one wide around them, and no samples a scale + from 0 to 1. *) -external curve_js : ?ease:Ease.t -> unit -> (float -> float [@u]) = "curve" +external curve_js : ?ease:Ease.t -> unit -> (float -> float[@u]) = "curve" [@@mel.module "@bezda/rhp"] -(** A timing curve as a function of 0..1. *) -let curve ?ease () = let r = curve_js ?ease () in fun y0 -> (r y0 [@u]) -(** A Gaussian kernel density estimate: points pairs of \[x, density\] (for Area). *) -external density : float option array -> ?options:Types.Density.t -> unit -> (float * float) array = "density" +let curve ?ease () = + let r = curve_js ?ease () in + fun y0 -> (r y0 [@u]) + +external density : + float option array -> + ?options:Types.Density_Options.t -> + unit -> + (float * float) array = "density" [@@mel.module "@bezda/rhp"] +(** A Gaussian kernel density estimate: points pairs of \[x, density\] (for + Area). *) -(** Runs f with rhp's style writes going to the page at once instead of in the next frame: for an app that changes - chart data inside its own requestAnimationFrame callback, so the change shows in that frame. *) external drawing : (unit -> 't) -> 't = "drawing" [@@mel.module "@bezda/rhp"] - -external every_js : float -> ?options:Types.Every.t -> unit -> ((float * float) -> float array [@u]) = "every" +(** Runs f with rhp's style writes going to the page at once instead of in the + next frame: for an app that changes chart data inside its own + requestAnimationFrame callback, so the change shows in that frame. *) + +external every_js : + float -> + ?options:Types.Every_Options.t -> + unit -> + (float * float -> float array[@u]) = "every" [@@mel.module "@bezda/rhp"] -(** Ticks at every multiple of step in the scale; with ends, its min and max too. A step that is not above 0 throws. - - Raises [Invalid_argument] with rhp's message, where it throws. *) + let every x0 ?options () = match every_js x0 ?options () with | r -> fun y0 -> (r y0 [@u]) - | exception Js.Exn.Error e -> invalid_arg ("every: " ^ Option.value (Js.Exn.message e) ~default:"") -let every_opt x0 ?options () = match every_js x0 ?options () with r -> Some (fun y0 -> (r y0 [@u])) | exception Js.Exn.Error _ -> None + | exception Js.Exn.Error e -> + invalid_arg ("every: " ^ Option.value (Js.Exn.message e) ~default:"") + +let every_opt x0 ?options () = + match every_js x0 ?options () with + | r -> Some (fun y0 -> (r y0 [@u])) + | exception Js.Exn.Error _ -> None -(** \[smallest, largest\], leaving out missing values (\[Infinity, -Infinity\] when there are none, which nice() makes 0 to 1). *) -external extent : float option array -> (float * float) = "extent" +external extent : float option array -> float * float = "extent" [@@mel.module "@bezda/rhp"] +(** \[smallest, largest\], leaving out missing values (\[Infinity, -Infinity\] + when there are none, which nice() makes 0 to 1). *) -(** Call where the app starts, before the first chart: --rhp-position is passed down from each slat root again, so - anything inside a slat can read it, as in rhp 2.0. Charts take longer to draw (no style is shared between rows). *) external inherit_position : unit -> unit = "inheritPosition" [@@mel.module "@bezda/rhp"] +(** Call where the app starts, before the first chart: --rhp-position is passed + down from each slat root again, so anything inside a slat can read it, as in + rhp 2.0. Charts take longer to draw (no style is shared between rows). *) -(** Call where the app starts, on the server and in the browser, when the page links \@bezda/rhp/rhp.css itself. *) external linked_css : unit -> unit = "linkedCss" [@@mel.module "@bezda/rhp"] +(** Call where the app starts, on the server and in the browser, when the page + links \@bezda/rhp/rhp.css itself. *) -(** A round scale covering lo..hi with about count ticks. *) external nice : float -> float -> ?count:float -> unit -> Types.Nice.t = "nice" [@@mel.module "@bezda/rhp"] +(** A round scale covering lo..hi with about count ticks. *) -(** Call where the app starts, before the first chart, on the server and in the browser: no chart on the page gets the - guard (the CSS that keeps a page's own rules from reaching a chart). Charts draw faster, and the page's CSS must leave - their elements alone. A page that links rhp's stylesheet itself links \@bezda/rhp/rhp-no-css-guard.css instead. *) external no_css_guard : unit -> unit = "noCssGuard" [@@mel.module "@bezda/rhp"] +(** Call where the app starts, before the first chart, on the server and in the + browser: no chart on the page gets the guard (the CSS that keeps a page's + own rules from reaching a chart). Charts draw faster, and the page's CSS + must leave their elements alone. A page that links rhp's stylesheet itself + links \@bezda/rhp/rhp-no-css-guard.css instead. *) -(** Box and whisker numbers, leaving out missing samples; low and high are the whisker ends (1.5 x IQR). *) external summary : float option array -> Types.Summary.t = "summary" [@@mel.module "@bezda/rhp"] +(** Box and whisker numbers, leaving out missing samples; low and high are the + whisker ends (1.5 x IQR). *) -external use_orientation_js : unit -> (unit -> [ `horizontal | `vertical ] [@u]) = "useOrientation" +external use_orientation_js : unit -> (unit -> [ `horizontal | `vertical ][@u]) + = "useOrientation" [@@mel.module "@bezda/rhp"] -(** The orientation of the Plot around, as a signal. *) -let use_orientation () = let r = use_orientation_js () in fun () -> (r () [@u]) + +let use_orientation () = + let r = use_orientation_js () in + fun () -> (r () [@u]) diff --git a/rhp/solidtype_rhp.mli b/rhp/solidtype_rhp.mli index 0f71075d..8f7ebe45 100644 --- a/rhp/solidtype_rhp.mli +++ b/rhp/solidtype_rhp.mli @@ -19,10 +19,13 @@ module Scale = Scale module Shape = Shape module Slat = Slat module Ticks = Ticks -include module type of struct include Helpers end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/area.md]. *) +include module type of struct + include Helpers +end + +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/area.md]. +*) module Area : sig module Props : sig external check : @@ -33,7 +36,8 @@ module Area : sig ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Svg.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Svg.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -49,7 +53,9 @@ module Axis : sig ?grid:bool Solidtype.Check.value -> ?cross:bool Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -57,8 +63,8 @@ module Axis : sig [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/bar.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/bar.md]. +*) module Bar : sig module Props : sig external check : @@ -69,7 +75,8 @@ module Bar : sig ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -77,8 +84,8 @@ module Bar : sig [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/cell.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/cell.md]. +*) module Cell : sig module Props : sig external check : @@ -87,7 +94,8 @@ module Cell : sig ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -95,8 +103,8 @@ module Cell : sig [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/chart.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/chart.md]. +*) module Chart : sig module Props : sig external check : @@ -122,7 +130,9 @@ module Chart : sig ?style:string Js.Dict.t Solidtype.Check.value -> ?ref:(Dom.htmlDivElement -> unit) -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -130,8 +140,8 @@ module Chart : sig [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/dot.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/dot.md]. +*) module Dot : sig module Props : sig external check : @@ -143,7 +153,8 @@ module Dot : sig ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -151,8 +162,8 @@ module Dot : sig [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/label.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/label.md]. +*) module Label : sig module Props : sig external check : @@ -163,7 +174,8 @@ module Label : sig ?cross:float Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -171,10 +183,11 @@ module Label : sig [@@mel.module "@bezda/rhp"] end -(** A line through points: a sparkline in a slat, or on a Chart's cross scale a line chart. +(** A line through points: a sparkline in a slat, or on a Chart's cross scale a + line chart. - Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/line.md]. *) + Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/line.md]. +*) module Line : sig module Props : sig external check : @@ -186,7 +199,8 @@ module Line : sig ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Svg.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Svg.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -194,10 +208,11 @@ module Line : sig [@@mel.module "@bezda/rhp"] end -(** A place on the chart and nothing else: no size and nothing drawn, so whatever you put inside it sits at its value. +(** A place on the chart and nothing else: no size and nothing drawn, so + whatever you put inside it sits at its value. - Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/place.md]. *) + Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/place.md]. +*) module Place : sig module Props : sig external check : @@ -206,7 +221,8 @@ module Place : sig ?cross:float Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -214,8 +230,9 @@ module Place : sig [@@mel.module "@bezda/rhp"] end -(** A magazine-style panel around a chart: kicker, headline, dek, the chart, a note. Markup only; its look is the page's - CSS, and \@bezda/rhp/posters.css has the gallery's looks to start from. +(** A magazine-style panel around a chart: kicker, headline, dek, the chart, a + note. Markup only; its look is the page's CSS, and \@bezda/rhp/posters.css + has the gallery's looks to start from. Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/poster.md]. *) @@ -228,7 +245,8 @@ module Poster : sig ?dek:Solidtype.Jsx.element Solidtype.Check.value -> ?note:Solidtype.Jsx.element Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Figure.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Figure.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -239,14 +257,16 @@ end external theme : Types.RequiredThemeValues.t = "THEME" [@@mel.module "@bezda/rhp"] -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/theme.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/theme.md]. +*) module Theme : sig module Props : sig external check : value:Types.ThemeValues.t Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - ?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit = "check" + ?children:('f, [ `elements ]) Solidtype.Check.children -> + unit -> + unit = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -254,8 +274,8 @@ module Theme : sig [@@mel.module "@bezda/rhp"] end -(** Its page, with its examples: - [$(opam var solidtype:doc)/pages/rhp/tick.md]. *) +(** Its page, with its examples: [$(opam var solidtype:doc)/pages/rhp/tick.md]. +*) module Tick : sig module Props : sig external check : @@ -265,7 +285,8 @@ module Tick : sig ?color:Color.t Solidtype.Check.value -> ?style:string Solidtype.Check.value -> ?props:'spread Solidtype.Solid.rest -> - (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) Solidtype.Html.Div.check = "check" + (?children:('f, [ `elements ]) Solidtype.Check.children -> unit -> unit) + Solidtype.Html.Div.check = "check" [@@mel.module "vite-plugin-solidtype/markers"] end @@ -273,62 +294,94 @@ module Tick : sig [@@mel.module "@bezda/rhp"] end -(** A value that moves to each new value over time: the reader gives the value to draw now, or ms ahead. *) -val animated : (unit -> 't) -> ?settings:(unit -> Types.Animated.t) -> unit -> (float option -> 't) +val animated : + (unit -> 't) -> + ?settings:(unit -> Types.Animated_Settings.t) -> + unit -> + float option -> + 't +(** A value that moves to each new value over time: the reader gives the value + to draw now, or ms ahead. *) -(** Item i of a data group (a list wraps around; one value is every row's). *) external at : ('t, 't array) Types.Either.t -> float -> 't option = "at" [@@mel.module "@bezda/rhp"] +(** Item i of a data group (a list wraps around; one value is every row's). *) -(** Histogram bins: bin k covers x0\[k\]..x1\[k\] and holds tally\[k\] samples. Samples all alike get a scale one wide around - them, and no samples a scale from 0 to 1. *) -external bins : float option array -> ?options:Types.Bins.t -> unit -> Types.Bins2.t = "bins" +external bins : + float option array -> ?options:Types.Bins_Options.t -> unit -> Types.Bins.t + = "bins" [@@mel.module "@bezda/rhp"] +(** Histogram bins: bin k covers x0\[k\]..x1\[k\] and holds tally\[k\] samples. + Samples all alike get a scale one wide around them, and no samples a scale + from 0 to 1. *) +val curve : ?ease:Ease.t -> unit -> float -> float (** A timing curve as a function of 0..1. *) -val curve : ?ease:Ease.t -> unit -> (float -> float) -(** A Gaussian kernel density estimate: points pairs of \[x, density\] (for Area). *) -external density : float option array -> ?options:Types.Density.t -> unit -> (float * float) array = "density" +external density : + float option array -> + ?options:Types.Density_Options.t -> + unit -> + (float * float) array = "density" [@@mel.module "@bezda/rhp"] +(** A Gaussian kernel density estimate: points pairs of \[x, density\] (for + Area). *) -(** Runs f with rhp's style writes going to the page at once instead of in the next frame: for an app that changes - chart data inside its own requestAnimationFrame callback, so the change shows in that frame. *) external drawing : (unit -> 't) -> 't = "drawing" [@@mel.module "@bezda/rhp"] +(** Runs f with rhp's style writes going to the page at once instead of in the + next frame: for an app that changes chart data inside its own + requestAnimationFrame callback, so the change shows in that frame. *) + +val every : + float -> + ?options:Types.Every_Options.t -> + unit -> + float * float -> + float array +(** Ticks at every multiple of step in the scale; with ends, its min and max + too. A step that is not above 0 throws. -(** Ticks at every multiple of step in the scale; with ends, its min and max too. A step that is not above 0 throws. - Raises [Invalid_argument] with rhp's message, where it throws. *) -val every : float -> ?options:Types.Every.t -> unit -> ((float * float) -> float array) -val every_opt : float -> ?options:Types.Every.t -> unit -> ((float * float) -> float array) option -(** \[smallest, largest\], leaving out missing values (\[Infinity, -Infinity\] when there are none, which nice() makes 0 to 1). *) -external extent : float option array -> (float * float) = "extent" +val every_opt : + float -> + ?options:Types.Every_Options.t -> + unit -> + (float * float -> float array) option + +external extent : float option array -> float * float = "extent" [@@mel.module "@bezda/rhp"] +(** \[smallest, largest\], leaving out missing values (\[Infinity, -Infinity\] + when there are none, which nice() makes 0 to 1). *) -(** Call where the app starts, before the first chart: --rhp-position is passed down from each slat root again, so - anything inside a slat can read it, as in rhp 2.0. Charts take longer to draw (no style is shared between rows). *) external inherit_position : unit -> unit = "inheritPosition" [@@mel.module "@bezda/rhp"] +(** Call where the app starts, before the first chart: --rhp-position is passed + down from each slat root again, so anything inside a slat can read it, as in + rhp 2.0. Charts take longer to draw (no style is shared between rows). *) -(** Call where the app starts, on the server and in the browser, when the page links \@bezda/rhp/rhp.css itself. *) external linked_css : unit -> unit = "linkedCss" [@@mel.module "@bezda/rhp"] +(** Call where the app starts, on the server and in the browser, when the page + links \@bezda/rhp/rhp.css itself. *) -(** A round scale covering lo..hi with about count ticks. *) external nice : float -> float -> ?count:float -> unit -> Types.Nice.t = "nice" [@@mel.module "@bezda/rhp"] +(** A round scale covering lo..hi with about count ticks. *) -(** Call where the app starts, before the first chart, on the server and in the browser: no chart on the page gets the - guard (the CSS that keeps a page's own rules from reaching a chart). Charts draw faster, and the page's CSS must leave - their elements alone. A page that links rhp's stylesheet itself links \@bezda/rhp/rhp-no-css-guard.css instead. *) external no_css_guard : unit -> unit = "noCssGuard" [@@mel.module "@bezda/rhp"] +(** Call where the app starts, before the first chart, on the server and in the + browser: no chart on the page gets the guard (the CSS that keeps a page's + own rules from reaching a chart). Charts draw faster, and the page's CSS + must leave their elements alone. A page that links rhp's stylesheet itself + links \@bezda/rhp/rhp-no-css-guard.css instead. *) -(** Box and whisker numbers, leaving out missing samples; low and high are the whisker ends (1.5 x IQR). *) external summary : float option array -> Types.Summary.t = "summary" [@@mel.module "@bezda/rhp"] +(** Box and whisker numbers, leaving out missing samples; low and high are the + whisker ends (1.5 x IQR). *) +val use_orientation : unit -> unit -> [ `horizontal | `vertical ] (** The orientation of the Plot around, as a signal. *) -val use_orientation : unit -> (unit -> [ `horizontal | `vertical ]) diff --git a/rhp/types.ml b/rhp/types.ml index 496740c7..4b5db842 100644 --- a/rhp/types.ml +++ b/rhp/types.ml @@ -4,15 +4,14 @@ (* Members of different JavaScript kinds, each as it is. *) type ('a, 'b) either - type t_timing type t_theme_values type t_required_theme_values -type t_animated +type t_animated_settings +type t_bins_options type t_bins -type t_bins2 -type t_density -type t_every +type t_density_options +type t_every_options type t_nice type t_summary @@ -25,17 +24,31 @@ end module Timing = struct type t = t_timing + + external duration : t -> float option = "duration" + [@@mel.get] (** ms a value takes to move (150 by default). *) - external duration : t -> float option = "duration" [@@mel.get] + external ease : t -> Ease.t option = "ease" [@@mel.get] - (** ms a slat takes to slide to a new place (175 in the JS version by default). *) - external slide : t -> float option = "slide" [@@mel.get] - external make : ?duration:(float [@mel.as "duration"]) -> ?ease:(Ease.t [@mel.as "ease"]) -> ?slide:(float [@mel.as "slide"]) -> unit -> t = "" [@@mel.obj] + + external slide : t -> float option = "slide" + [@@mel.get] + (** ms a slat takes to slide to a new place (175 in the JS version by + default). *) + + external make : + ?duration:(float[@mel.as "duration"]) -> + ?ease:(Ease.t[@mel.as "ease"]) -> + ?slide:(float[@mel.as "slide"]) -> + unit -> + t = "" + [@@mel.obj] end (** The colors and font a chart draws with. *) module ThemeValues = struct type t = t_theme_values + external series : t -> string array option = "series" [@@mel.get] external positive : t -> string option = "positive" [@@mel.get] external negative : t -> string option = "negative" [@@mel.get] @@ -46,11 +59,26 @@ module ThemeValues = struct external low : t -> string option = "low" [@@mel.get] external high : t -> string option = "high" [@@mel.get] external font : t -> string option = "font" [@@mel.get] - external make : ?series:(string array [@mel.as "series"]) -> ?positive:(string [@mel.as "positive"]) -> ?negative:(string [@mel.as "negative"]) -> ?ink:(string [@mel.as "ink"]) -> ?muted:(string [@mel.as "muted"]) -> ?grid:(string [@mel.as "grid"]) -> ?surface:(string [@mel.as "surface"]) -> ?low:(string [@mel.as "low"]) -> ?high:(string [@mel.as "high"]) -> ?font:(string [@mel.as "font"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?series:(string array[@mel.as "series"]) -> + ?positive:(string[@mel.as "positive"]) -> + ?negative:(string[@mel.as "negative"]) -> + ?ink:(string[@mel.as "ink"]) -> + ?muted:(string[@mel.as "muted"]) -> + ?grid:(string[@mel.as "grid"]) -> + ?surface:(string[@mel.as "surface"]) -> + ?low:(string[@mel.as "low"]) -> + ?high:(string[@mel.as "high"]) -> + ?font:(string[@mel.as "font"]) -> + unit -> + t = "" + [@@mel.obj] end module RequiredThemeValues = struct type t = t_required_theme_values + external series : t -> string array = "series" [@@mel.get] external positive : t -> string = "positive" [@@mel.get] external negative : t -> string = "negative" [@@mel.get] @@ -61,56 +89,111 @@ module RequiredThemeValues = struct external low : t -> string = "low" [@@mel.get] external high : t -> string = "high" [@@mel.get] external font : t -> string = "font" [@@mel.get] - external make : series:(string array [@mel.as "series"]) -> positive:(string [@mel.as "positive"]) -> negative:(string [@mel.as "negative"]) -> ink:(string [@mel.as "ink"]) -> muted:(string [@mel.as "muted"]) -> grid:(string [@mel.as "grid"]) -> surface:(string [@mel.as "surface"]) -> low:(string [@mel.as "low"]) -> high:(string [@mel.as "high"]) -> font:(string [@mel.as "font"]) -> unit -> t = "" [@@mel.obj] + + external make : + series:(string array[@mel.as "series"]) -> + positive:(string[@mel.as "positive"]) -> + negative:(string[@mel.as "negative"]) -> + ink:(string[@mel.as "ink"]) -> + muted:(string[@mel.as "muted"]) -> + grid:(string[@mel.as "grid"]) -> + surface:(string[@mel.as "surface"]) -> + low:(string[@mel.as "low"]) -> + high:(string[@mel.as "high"]) -> + font:(string[@mel.as "font"]) -> + unit -> + t = "" + [@@mel.obj] end -module Animated = struct - type t = t_animated +module Animated_Settings = struct + type t = t_animated_settings + external duration : t -> float option = "duration" [@@mel.get] external ease : t -> Ease.t option = "ease" [@@mel.get] - external make : ?duration:(float [@mel.as "duration"]) -> ?ease:(Ease.t [@mel.as "ease"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?duration:(float[@mel.as "duration"]) -> + ?ease:(Ease.t[@mel.as "ease"]) -> + unit -> + t = "" + [@@mel.obj] end -module Bins = struct - type t = t_bins +module Bins_Options = struct + type t = t_bins_options + external domain : t -> (float * float) option = "domain" [@@mel.get] external count : t -> float option = "count" [@@mel.get] - external make : ?domain:((float * float) [@mel.as "domain"]) -> ?count:(float [@mel.as "count"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?domain:(float * float[@mel.as "domain"]) -> + ?count:(float[@mel.as "count"]) -> + unit -> + t = "" + [@@mel.obj] end -module Bins2 = struct - type t = t_bins2 +module Bins = struct + type t = t_bins + external x0 : t -> float array = "x0" [@@mel.get] external x1 : t -> float array = "x1" [@@mel.get] external tally : t -> float array = "tally" [@@mel.get] - external make : x0:(float array [@mel.as "x0"]) -> x1:(float array [@mel.as "x1"]) -> tally:(float array [@mel.as "tally"]) -> unit -> t = "" [@@mel.obj] + + external make : + x0:(float array[@mel.as "x0"]) -> + x1:(float array[@mel.as "x1"]) -> + tally:(float array[@mel.as "tally"]) -> + unit -> + t = "" + [@@mel.obj] end -module Density = struct - type t = t_density +module Density_Options = struct + type t = t_density_options + external domain : t -> (float * float) option = "domain" [@@mel.get] external points : t -> float option = "points" [@@mel.get] external bandwidth : t -> float option = "bandwidth" [@@mel.get] - external make : ?domain:((float * float) [@mel.as "domain"]) -> ?points:(float [@mel.as "points"]) -> ?bandwidth:(float [@mel.as "bandwidth"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?domain:(float * float[@mel.as "domain"]) -> + ?points:(float[@mel.as "points"]) -> + ?bandwidth:(float[@mel.as "bandwidth"]) -> + unit -> + t = "" + [@@mel.obj] end -module Every = struct - type t = t_every +module Every_Options = struct + type t = t_every_options + external ends : t -> bool option = "ends" [@@mel.get] - external make : ?ends:(bool [@mel.as "ends"]) -> unit -> t = "" [@@mel.obj] + external make : ?ends:(bool[@mel.as "ends"]) -> unit -> t = "" [@@mel.obj] end module Nice = struct type t = t_nice + external min : t -> float = "min" [@@mel.get] external max : t -> float = "max" [@@mel.get] external step : t -> float = "step" [@@mel.get] external ticks : t -> float array = "ticks" [@@mel.get] - external make : min:(float [@mel.as "min"]) -> max:(float [@mel.as "max"]) -> step:(float [@mel.as "step"]) -> ticks:(float array [@mel.as "ticks"]) -> unit -> t = "" [@@mel.obj] + + external make : + min:(float[@mel.as "min"]) -> + max:(float[@mel.as "max"]) -> + step:(float[@mel.as "step"]) -> + ticks:(float array[@mel.as "ticks"]) -> + unit -> + t = "" + [@@mel.obj] end module Summary = struct type t = t_summary + external min : t -> float = "min" [@@mel.get] external q1 : t -> float = "q1" [@@mel.get] external median : t -> float = "median" [@@mel.get] @@ -120,5 +203,18 @@ module Summary = struct external high : t -> float = "high" [@@mel.get] external mean : t -> float = "mean" [@@mel.get] external outliers : t -> float array = "outliers" [@@mel.get] - external make : min:(float [@mel.as "min"]) -> q1:(float [@mel.as "q1"]) -> median:(float [@mel.as "median"]) -> q3:(float [@mel.as "q3"]) -> max:(float [@mel.as "max"]) -> low:(float [@mel.as "low"]) -> high:(float [@mel.as "high"]) -> mean:(float [@mel.as "mean"]) -> outliers:(float array [@mel.as "outliers"]) -> unit -> t = "" [@@mel.obj] + + external make : + min:(float[@mel.as "min"]) -> + q1:(float[@mel.as "q1"]) -> + median:(float[@mel.as "median"]) -> + q3:(float[@mel.as "q3"]) -> + max:(float[@mel.as "max"]) -> + low:(float[@mel.as "low"]) -> + high:(float[@mel.as "high"]) -> + mean:(float[@mel.as "mean"]) -> + outliers:(float array[@mel.as "outliers"]) -> + unit -> + t = "" + [@@mel.obj] end diff --git a/rhp/types.mli b/rhp/types.mli index f4746a02..0a596037 100644 --- a/rhp/types.mli +++ b/rhp/types.mli @@ -4,15 +4,14 @@ (* Members of different JavaScript kinds, each as it is. *) type ('a, 'b) either - type t_timing type t_theme_values type t_required_theme_values -type t_animated +type t_animated_settings +type t_bins_options type t_bins -type t_bins2 -type t_density -type t_every +type t_density_options +type t_every_options type t_nice type t_summary @@ -25,17 +24,31 @@ end module Timing : sig type t = t_timing + + external duration : t -> float option = "duration" + [@@mel.get] (** ms a value takes to move (150 by default). *) - external duration : t -> float option = "duration" [@@mel.get] + external ease : t -> Ease.t option = "ease" [@@mel.get] - (** ms a slat takes to slide to a new place (175 in the JS version by default). *) - external slide : t -> float option = "slide" [@@mel.get] - external make : ?duration:(float [@mel.as "duration"]) -> ?ease:(Ease.t [@mel.as "ease"]) -> ?slide:(float [@mel.as "slide"]) -> unit -> t = "" [@@mel.obj] + + external slide : t -> float option = "slide" + [@@mel.get] + (** ms a slat takes to slide to a new place (175 in the JS version by + default). *) + + external make : + ?duration:(float[@mel.as "duration"]) -> + ?ease:(Ease.t[@mel.as "ease"]) -> + ?slide:(float[@mel.as "slide"]) -> + unit -> + t = "" + [@@mel.obj] end (** The colors and font a chart draws with. *) module ThemeValues : sig type t = t_theme_values + external series : t -> string array option = "series" [@@mel.get] external positive : t -> string option = "positive" [@@mel.get] external negative : t -> string option = "negative" [@@mel.get] @@ -46,11 +59,26 @@ module ThemeValues : sig external low : t -> string option = "low" [@@mel.get] external high : t -> string option = "high" [@@mel.get] external font : t -> string option = "font" [@@mel.get] - external make : ?series:(string array [@mel.as "series"]) -> ?positive:(string [@mel.as "positive"]) -> ?negative:(string [@mel.as "negative"]) -> ?ink:(string [@mel.as "ink"]) -> ?muted:(string [@mel.as "muted"]) -> ?grid:(string [@mel.as "grid"]) -> ?surface:(string [@mel.as "surface"]) -> ?low:(string [@mel.as "low"]) -> ?high:(string [@mel.as "high"]) -> ?font:(string [@mel.as "font"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?series:(string array[@mel.as "series"]) -> + ?positive:(string[@mel.as "positive"]) -> + ?negative:(string[@mel.as "negative"]) -> + ?ink:(string[@mel.as "ink"]) -> + ?muted:(string[@mel.as "muted"]) -> + ?grid:(string[@mel.as "grid"]) -> + ?surface:(string[@mel.as "surface"]) -> + ?low:(string[@mel.as "low"]) -> + ?high:(string[@mel.as "high"]) -> + ?font:(string[@mel.as "font"]) -> + unit -> + t = "" + [@@mel.obj] end module RequiredThemeValues : sig type t = t_required_theme_values + external series : t -> string array = "series" [@@mel.get] external positive : t -> string = "positive" [@@mel.get] external negative : t -> string = "negative" [@@mel.get] @@ -61,56 +89,111 @@ module RequiredThemeValues : sig external low : t -> string = "low" [@@mel.get] external high : t -> string = "high" [@@mel.get] external font : t -> string = "font" [@@mel.get] - external make : series:(string array [@mel.as "series"]) -> positive:(string [@mel.as "positive"]) -> negative:(string [@mel.as "negative"]) -> ink:(string [@mel.as "ink"]) -> muted:(string [@mel.as "muted"]) -> grid:(string [@mel.as "grid"]) -> surface:(string [@mel.as "surface"]) -> low:(string [@mel.as "low"]) -> high:(string [@mel.as "high"]) -> font:(string [@mel.as "font"]) -> unit -> t = "" [@@mel.obj] + + external make : + series:(string array[@mel.as "series"]) -> + positive:(string[@mel.as "positive"]) -> + negative:(string[@mel.as "negative"]) -> + ink:(string[@mel.as "ink"]) -> + muted:(string[@mel.as "muted"]) -> + grid:(string[@mel.as "grid"]) -> + surface:(string[@mel.as "surface"]) -> + low:(string[@mel.as "low"]) -> + high:(string[@mel.as "high"]) -> + font:(string[@mel.as "font"]) -> + unit -> + t = "" + [@@mel.obj] end -module Animated : sig - type t = t_animated +module Animated_Settings : sig + type t = t_animated_settings + external duration : t -> float option = "duration" [@@mel.get] external ease : t -> Ease.t option = "ease" [@@mel.get] - external make : ?duration:(float [@mel.as "duration"]) -> ?ease:(Ease.t [@mel.as "ease"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?duration:(float[@mel.as "duration"]) -> + ?ease:(Ease.t[@mel.as "ease"]) -> + unit -> + t = "" + [@@mel.obj] end -module Bins : sig - type t = t_bins +module Bins_Options : sig + type t = t_bins_options + external domain : t -> (float * float) option = "domain" [@@mel.get] external count : t -> float option = "count" [@@mel.get] - external make : ?domain:((float * float) [@mel.as "domain"]) -> ?count:(float [@mel.as "count"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?domain:(float * float[@mel.as "domain"]) -> + ?count:(float[@mel.as "count"]) -> + unit -> + t = "" + [@@mel.obj] end -module Bins2 : sig - type t = t_bins2 +module Bins : sig + type t = t_bins + external x0 : t -> float array = "x0" [@@mel.get] external x1 : t -> float array = "x1" [@@mel.get] external tally : t -> float array = "tally" [@@mel.get] - external make : x0:(float array [@mel.as "x0"]) -> x1:(float array [@mel.as "x1"]) -> tally:(float array [@mel.as "tally"]) -> unit -> t = "" [@@mel.obj] + + external make : + x0:(float array[@mel.as "x0"]) -> + x1:(float array[@mel.as "x1"]) -> + tally:(float array[@mel.as "tally"]) -> + unit -> + t = "" + [@@mel.obj] end -module Density : sig - type t = t_density +module Density_Options : sig + type t = t_density_options + external domain : t -> (float * float) option = "domain" [@@mel.get] external points : t -> float option = "points" [@@mel.get] external bandwidth : t -> float option = "bandwidth" [@@mel.get] - external make : ?domain:((float * float) [@mel.as "domain"]) -> ?points:(float [@mel.as "points"]) -> ?bandwidth:(float [@mel.as "bandwidth"]) -> unit -> t = "" [@@mel.obj] + + external make : + ?domain:(float * float[@mel.as "domain"]) -> + ?points:(float[@mel.as "points"]) -> + ?bandwidth:(float[@mel.as "bandwidth"]) -> + unit -> + t = "" + [@@mel.obj] end -module Every : sig - type t = t_every +module Every_Options : sig + type t = t_every_options + external ends : t -> bool option = "ends" [@@mel.get] - external make : ?ends:(bool [@mel.as "ends"]) -> unit -> t = "" [@@mel.obj] + external make : ?ends:(bool[@mel.as "ends"]) -> unit -> t = "" [@@mel.obj] end module Nice : sig type t = t_nice + external min : t -> float = "min" [@@mel.get] external max : t -> float = "max" [@@mel.get] external step : t -> float = "step" [@@mel.get] external ticks : t -> float array = "ticks" [@@mel.get] - external make : min:(float [@mel.as "min"]) -> max:(float [@mel.as "max"]) -> step:(float [@mel.as "step"]) -> ticks:(float array [@mel.as "ticks"]) -> unit -> t = "" [@@mel.obj] + + external make : + min:(float[@mel.as "min"]) -> + max:(float[@mel.as "max"]) -> + step:(float[@mel.as "step"]) -> + ticks:(float array[@mel.as "ticks"]) -> + unit -> + t = "" + [@@mel.obj] end module Summary : sig type t = t_summary + external min : t -> float = "min" [@@mel.get] external q1 : t -> float = "q1" [@@mel.get] external median : t -> float = "median" [@@mel.get] @@ -120,5 +203,18 @@ module Summary : sig external high : t -> float = "high" [@@mel.get] external mean : t -> float = "mean" [@@mel.get] external outliers : t -> float array = "outliers" [@@mel.get] - external make : min:(float [@mel.as "min"]) -> q1:(float [@mel.as "q1"]) -> median:(float [@mel.as "median"]) -> q3:(float [@mel.as "q3"]) -> max:(float [@mel.as "max"]) -> low:(float [@mel.as "low"]) -> high:(float [@mel.as "high"]) -> mean:(float [@mel.as "mean"]) -> outliers:(float array [@mel.as "outliers"]) -> unit -> t = "" [@@mel.obj] + + external make : + min:(float[@mel.as "min"]) -> + q1:(float[@mel.as "q1"]) -> + median:(float[@mel.as "median"]) -> + q3:(float[@mel.as "q3"]) -> + max:(float[@mel.as "max"]) -> + low:(float[@mel.as "low"]) -> + high:(float[@mel.as "high"]) -> + mean:(float[@mel.as "mean"]) -> + outliers:(float array[@mel.as "outliers"]) -> + unit -> + t = "" + [@@mel.obj] end diff --git a/src/arity.ml b/src/arity.ml new file mode 100644 index 00000000..14c56522 --- /dev/null +++ b/src/arity.ml @@ -0,0 +1,38 @@ +type descriptor + +external descriptor : + get:((unit -> 'f option)[@u]) -> + enumerable:bool -> + configurable:bool -> + descriptor = "" +[@@mel.obj] + +external define : 'props -> string -> descriptor -> unit = "defineProperty" +[@@mel.scope "Object"] + +external no_props : unit -> 'props = "" [@@mel.obj] + +(* The prop as its caller gave it. Its type is the one the component's check + held it to, which only the binding that adapts it knows, and names. *) +external given : 'props -> string -> 'f option = "" [@@mel.get_index] + +external create : 'props Jsx.component -> 'props -> Jsx.element + = "createComponent" +[@@mel.module "solid-js"] + +let adapted name at_arity component = + Jsx.component (fun props -> + let over = no_props () in + define over name + (descriptor + ~get:(fun[@u] () -> Option.map at_arity (given props name)) + ~enumerable:true ~configurable:true); + create component (Solid.merge_props [| props; over |])) + +let of2 name component = + adapted name (fun (f : 'a -> 'b -> 'c) -> fun[@u] a b -> f a b) component + +let of3 name component = + adapted name + (fun (f : 'a -> 'b -> 'c -> 'd) -> fun[@u] a b c -> f a b c) + component diff --git a/src/arity.mli b/src/arity.mli new file mode 100644 index 00000000..9e91ffd8 --- /dev/null +++ b/src/arity.mli @@ -0,0 +1,27 @@ +(** A JavaScript component's props that are functions of several arguments, + called as OCaml calls a function. + + JavaScript calls such a prop with every argument at once, and an OCaml + function's type does not say whether it takes them so: [fun a b -> ...] and + [fun a -> ...; fun b -> ...] are one type, and Melange writes the second as + a function of one argument. A binding whose component takes such a prop + gives it through {!adapted}, so whatever function a caller gives is called + with the arguments JavaScript passes. A caller writes nothing: a generated + binding's parts are made with it. *) + +val adapted : + string -> ('given -> 'called) -> 'props Jsx.component -> 'props Jsx.component +(** [adapted name at_arity component] is [component], its prop [name] given as + [at_arity] makes it of what the caller gave: a function JavaScript calls + with every argument at once, of the caller's, which it applies as OCaml + does, [fun f -> fun [@u] a b -> f a b]. [name] is the prop's JavaScript + name, and ['given] the type the component's check holds the prop to, which + only the binding that writes this knows. A prop left out stays left out, and + is read as the component reads it, so Solid tracks it there. *) + +val of2 : string -> 'props Jsx.component -> 'props Jsx.component +(** [of2 name component] is {!adapted} for a function of two arguments, for a + binding written by hand, which writes no [[@u]] of its own. *) + +val of3 : string -> 'props Jsx.component -> 'props Jsx.component +(** As {!of2}, of three. *) diff --git a/src/for.ml b/src/for.ml deleted file mode 100644 index 65cedb87..00000000 --- a/src/for.ml +++ /dev/null @@ -1,11 +0,0 @@ -module Props = struct - let check ~each:(_ : 'a array Check.value) - ?fallback:(_ : Jsx.element Check.value option) - ~children: - (_ : - ('a -> int Solid.accessor -> Jsx.element, [ `render ]) Check.children) - () = - () -end - -external component : unit Jsx.component = "For" [@@mel.module "solid-js"] diff --git a/src/for.mli b/src/for.mli index 4829b376..ac0d32fc 100644 --- a/src/for.mli +++ b/src/for.mli @@ -3,13 +3,17 @@ [(fun item _ -> ...)]. *) module Props : sig + type 'a t + val check : each:'a array Check.value -> ?fallback:Jsx.element Check.value -> children: ('a -> int Solid.accessor -> Jsx.element, [ `render ]) Check.children -> + ?props:'a t Solid.rest -> unit -> unit end -val component : unit Jsx.component +val make : 'a Props.t -> Jsx.element +val component : 'a Props.t Jsx.component diff --git a/src/for.mlx b/src/for.mlx new file mode 100644 index 00000000..be3fda40 --- /dev/null +++ b/src/for.mlx @@ -0,0 +1,23 @@ +module Raw = struct + module Props = struct + let check ~each:(_ : 'a array Check.value) + ?fallback:(_ : Jsx.element Check.value option) + ~children: + (_ : + ( 'a -> int Solid.accessor -> Jsx.element, + [ `render ] ) + Check.children) () = + () + end + + external component : unit Jsx.component = "For" [@@mel.module "solid-js"] +end + +(* Solid calls the function with an item and its index at once, and its type + does not say whether it takes them so: it is called here, as OCaml calls a + function it did not make. *) +let%component make ~(each : 'a array) ?(fallback : Jsx.element option) + ~(children : 'a -> int Solid.accessor -> Jsx.element) () = + + (fun item index -> children item index) + diff --git a/src/html.mli b/src/html.mli index b8a7b33b..d15512ed 100644 --- a/src/html.mli +++ b/src/html.mli @@ -1,18 +1,17 @@ -(** Each element's attributes, as their types: [Html.Div.class_] is - [string]. Generated from the JSX types of solid-js 1.9.17 by - [generate/html.ts]; never edited by hand. +(** Each element's attributes, as their types: [Html.Div.class_] is [string]. + Generated from the JSX types of solid-js 1.9.17 by [generate/html.ts]; never + edited by hand. - An attribute is named as Solid's JSX names it, by one rule: a capital is - an underscore and the lower case, [read_only], a hyphen an underscore, - [aria_label], and an OCaml keyword takes a trailing underscore, - [class_]. *) + An attribute is named as Solid's JSX names it, by one rule: a capital is an + underscore and the lower case, [read_only], a hyphen an underscore, + [aria_label], and an OCaml keyword takes a trailing underscore, [class_]. *) module type Dom_attributes = sig type element type props = element Solid.rest type aria_activedescendant = string type aria_atomic = bool - type aria_autocomplete = [ `none | `inline | `list | `both ] + type aria_autocomplete = [ `both | `inline | `list | `none ] type aria_braillelabel = string type aria_brailleroledescription = string type aria_busy = bool @@ -27,7 +26,7 @@ module type Dom_attributes = sig type aria_description = string type aria_details = string type aria_disabled = bool - type aria_dropeffect = [ `none | `copy | `execute | `link | `move | `popup ] + type aria_dropeffect = [ `copy | `execute | `link | `move | `none | `popup ] type aria_errormessage = string type aria_expanded = bool type aria_flowto = string @@ -39,7 +38,7 @@ module type Dom_attributes = sig type aria_label = string type aria_labelledby = string type aria_level = string - type aria_live = [ `off | `assertive | `polite ] + type aria_live = [ `assertive | `off | `polite ] type aria_modal = bool type aria_multiline = bool type aria_multiselectable = bool @@ -58,7 +57,7 @@ module type Dom_attributes = sig type aria_rowspan = string type aria_selected = bool type aria_setsize = string - type aria_sort = [ `none | `ascending | `descending | `other ] + type aria_sort = [ `ascending | `descending | `none | `other ] type aria_valuemax = string type aria_valuemin = string type aria_valuenow = string @@ -183,12 +182,85 @@ module type Dom_attributes = sig type on_waiting = Dom.event -> unit type on_wheel = Dom.wheelEvent -> unit type ref = element -> unit - type role = [ `none | `list | `link | `menu | `listbox | `tree | `grid | `dialog | `alert | `alertdialog | `application | `article | `banner | `button | `cell | `checkbox | `columnheader | `combobox | `complementary | `contentinfo | `definition | `directory | `document | `feed | `figure | `form | `gridcell | `group | `heading | `img | `listitem | `log | `main | `marquee | `math | `menubar | `menuitem | `menuitemcheckbox | `menuitemradio | `meter | `navigation | `note | `option | `presentation | `progressbar | `radio | `radiogroup | `region | `row | `rowgroup | `rowheader | `scrollbar | `search | `searchbox | `separator | `slider | `spinbutton | `status | `switch | `tab | `table | `tablist | `tabpanel | `term | `textbox | `timer | `toolbar | `tooltip | `treegrid | `treeitem ] + + type role = + [ `alert + | `alertdialog + | `application + | `article + | `banner + | `button + | `cell + | `checkbox + | `columnheader + | `combobox + | `complementary + | `contentinfo + | `definition + | `dialog + | `directory + | `document + | `feed + | `figure + | `form + | `grid + | `gridcell + | `group + | `heading + | `img + | `link + | `list + | `listbox + | `listitem + | `log + | `main + | `marquee + | `math + | `menu + | `menubar + | `menuitem + | `menuitemcheckbox + | `menuitemradio + | `meter + | `navigation + | `none + | `note + | `option + | `presentation + | `progressbar + | `radio + | `radiogroup + | `region + | `row + | `rowgroup + | `rowheader + | `scrollbar + | `search + | `searchbox + | `separator + | `slider + | `spinbutton + | `status + | `switch + | `tab + | `table + | `tablist + | `tabpanel + | `term + | `textbox + | `timer + | `toolbar + | `tooltip + | `tree + | `treegrid + | `treeitem ] + type slot = string type style = string type tab_index = string type tabindex = string type text_content = string + type 'r dom_check = ?aria_activedescendant:aria_activedescendant Check.value -> ?aria_atomic:aria_atomic Check.value -> @@ -274,7 +346,8 @@ module type Dom_attributes = sig ?on_composition_end:on_composition_end -> ?on_composition_start:on_composition_start -> ?on_composition_update:on_composition_update -> - ?on_content_visibility_auto_state_change:on_content_visibility_auto_state_change -> + ?on_content_visibility_auto_state_change: + on_content_visibility_auto_state_change -> ?on_context_lost:on_context_lost -> ?on_context_menu:on_context_menu -> ?on_context_restored:on_context_restored -> @@ -374,12 +447,18 @@ end module type AnchorHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string type attributionsrc = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type charset = string type content_editable = string @@ -388,7 +467,7 @@ module type AnchorHTMLAttributes = sig type contextmenu = string type coords = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type download = string type draggable = bool type enterkeyhint = string @@ -399,8 +478,13 @@ module type AnchorHTMLAttributes = sig type hreflang = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -424,14 +508,15 @@ module type AnchorHTMLAttributes = sig type rel = string type resource = string type rev = string - type shape = [ `rect | `circle | `poly | `default ] + type shape = [ `circle | `default | `poly | `rect ] type spellcheck = bool type target = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -496,8 +581,9 @@ end module type AnimateMotionSVGAttributes = sig include Dom_attributes + type accumulate = [ `none | `sum ] - type additive = [ `sum | `replace ] + type additive = [ `replace | `sum ] type attribute_name = string type begin_ = string type by = string @@ -522,12 +608,13 @@ module type AnimateMotionSVGAttributes = sig type repeat_dur = string type required_extensions = string type required_features = string - type restart = [ `always | `whenNotActive | `never ] + type restart = [ `always | `never | `whenNotActive ] type rotate = string type system_language = string type to_ = string type values = string type xmlns = string + type 'r check = ?accumulate:accumulate Check.value -> ?additive:additive Check.value -> @@ -566,10 +653,11 @@ end module type AnimateSVGAttributes = sig include Dom_attributes + type accumulate = [ `none | `sum ] - type additive = [ `sum | `replace ] + type additive = [ `replace | `sum ] type attribute_name = string - type attribute_type = [ `auto | `CSS | `XML ] + type attribute_type = [ `CSS | `XML | `auto ] type begin_ = string type by = string type calc_mode = [ `discrete | `linear | `paced | `spline ] @@ -592,11 +680,12 @@ module type AnimateSVGAttributes = sig type repeat_dur = string type required_extensions = string type required_features = string - type restart = [ `always | `whenNotActive | `never ] + type restart = [ `always | `never | `whenNotActive ] type system_language = string type to_ = string type values = string type xmlns = string + type 'r check = ?accumulate:accumulate Check.value -> ?additive:additive Check.value -> @@ -634,10 +723,11 @@ end module type AnimateTransformSVGAttributes = sig include Dom_attributes + type accumulate = [ `none | `sum ] - type additive = [ `sum | `replace ] + type additive = [ `replace | `sum ] type attribute_name = string - type attribute_type = [ `auto | `CSS | `XML ] + type attribute_type = [ `CSS | `XML | `auto ] type begin_ = string type by = string type calc_mode = [ `discrete | `linear | `paced | `spline ] @@ -658,12 +748,13 @@ module type AnimateTransformSVGAttributes = sig type repeat_dur = string type required_extensions = string type required_features = string - type restart = [ `always | `whenNotActive | `never ] + type restart = [ `always | `never | `whenNotActive ] type system_language = string type to_ = string - type type_ = [ `translate | `scale | `rotate | `skewX | `skewY ] + type type_ = [ `rotate | `scale | `skewX | `skewY | `translate ] type values = string type xmlns = string + type 'r check = ?accumulate:accumulate Check.value -> ?additive:additive Check.value -> @@ -700,13 +791,19 @@ end module type AreaHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string type alt = string type attributionsrc = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string @@ -714,7 +811,7 @@ module type AreaHTMLAttributes = sig type contextmenu = string type coords = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type download = string type draggable = bool type enterkeyhint = string @@ -724,8 +821,13 @@ module type AreaHTMLAttributes = sig type href = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -748,13 +850,14 @@ module type AreaHTMLAttributes = sig type referrerpolicy = string type rel = string type resource = string - type shape = [ `rect | `circle | `poly | `default ] + type shape = [ `circle | `default | `poly | `rect ] type spellcheck = bool type target = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -816,11 +919,17 @@ end module type AudioHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type autoplay = bool type content_editable = string @@ -832,7 +941,7 @@ module type AudioHTMLAttributes = sig type cross_origin = string type crossorigin = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disableremoteplayback = bool type draggable = bool type enterkeyhint = string @@ -841,8 +950,13 @@ module type AudioHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -870,9 +984,10 @@ module type AudioHTMLAttributes = sig type spellcheck = bool type src = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -936,18 +1051,24 @@ end module type BaseHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -956,8 +1077,13 @@ module type BaseHTMLAttributes = sig type href = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -978,9 +1104,10 @@ module type BaseHTMLAttributes = sig type spellcheck = bool type target = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1032,11 +1159,17 @@ end module type BdoHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string @@ -1051,8 +1184,13 @@ module type BdoHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1072,9 +1210,10 @@ module type BdoHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1124,11 +1263,17 @@ end module type BlockquoteHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type cite = string type content_editable = string @@ -1136,7 +1281,7 @@ module type BlockquoteHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -1144,8 +1289,13 @@ module type BlockquoteHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1165,9 +1315,10 @@ module type BlockquoteHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1218,18 +1369,24 @@ end module type BodyHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -1237,8 +1394,13 @@ module type BodyHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1278,9 +1440,10 @@ module type BodyHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1350,11 +1513,17 @@ end module type ButtonHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type command = string type commandfor = string @@ -1363,7 +1532,7 @@ module type ButtonHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -1372,19 +1541,24 @@ module type ButtonHTMLAttributes = sig type form = string type form_action = string type form_enctype = string - type form_method = [ `dialog | `post | `get ] + type form_method = [ `dialog | `get | `post ] type form_no_validate = bool type form_target = string type formaction = string type formenctype = string - type formmethod = [ `dialog | `post | `get ] + type formmethod = [ `dialog | `get | `post ] type formnovalidate = bool type formtarget = string type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1409,11 +1583,12 @@ module type ButtonHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] - type type_ = [ `menu | `button | `submit | `reset ] + type translate = [ `no | `yes ] + type type_ = [ `button | `menu | `reset | `submit ] type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1484,18 +1659,24 @@ end module type CanvasHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -1504,8 +1685,13 @@ module type CanvasHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1526,10 +1712,11 @@ module type CanvasHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1582,19 +1769,25 @@ end module type CaptionHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type align = [ `left | `center | `right ] - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + type align = [ `center | `left | `right ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -1602,8 +1795,13 @@ module type CaptionHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1623,9 +1821,10 @@ module type CaptionHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1676,6 +1875,7 @@ end module type CircleSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -1710,6 +1910,7 @@ module type CircleSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -1750,8 +1951,9 @@ end module type ClipPathSVGAttributes = sig include Dom_attributes + type clip_path = string - type clip_path_units = [ `userSpaceOnUse | `objectBoundingBox ] + type clip_path_units = [ `objectBoundingBox | `userSpaceOnUse ] type external_resources_required = bool type lang = string type required_extensions = string @@ -1759,6 +1961,7 @@ module type ClipPathSVGAttributes = sig type system_language = string type transform = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_path_units:clip_path_units Check.value -> @@ -1774,12 +1977,18 @@ end module type ColHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type align = [ `left | `center | `right | `justify | `char ] - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + type align = [ `center | `char | `justify | `left | `right ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type bgcolor = string type char = string @@ -1789,7 +1998,7 @@ module type ColHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -1797,8 +2006,13 @@ module type ColHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1819,11 +2033,12 @@ module type ColHTMLAttributes = sig type span = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string - type valign = [ `baseline | `middle | `bottom | `top ] + type valign = [ `baseline | `bottom | `middle | `top ] type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1880,12 +2095,18 @@ end module type ColgroupHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type align = [ `left | `center | `right | `justify | `char ] - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + type align = [ `center | `char | `justify | `left | `right ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type bgcolor = string type char = string @@ -1895,7 +2116,7 @@ module type ColgroupHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -1903,8 +2124,13 @@ module type ColgroupHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -1925,11 +2151,12 @@ module type ColgroupHTMLAttributes = sig type span = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string - type valign = [ `baseline | `middle | `bottom | `top ] + type valign = [ `baseline | `bottom | `middle | `top ] type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -1986,18 +2213,24 @@ end module type DataHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -2005,8 +2238,13 @@ module type DataHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -2026,10 +2264,11 @@ module type DataHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -2080,6 +2319,7 @@ end module type DefsSVGAttributes = sig include Dom_attributes + type clip_path = string type color = string type color_interpolation = string @@ -2109,6 +2349,7 @@ module type DefsSVGAttributes = sig type system_language = string type transform = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?color:color Check.value -> @@ -2144,28 +2385,34 @@ end module type DescSVGAttributes = sig include Dom_attributes + type lang = string type xmlns = string + type 'r check = - ?lang:lang Check.value -> - ?xmlns:xmlns Check.value -> - 'r dom_check + ?lang:lang Check.value -> ?xmlns:xmlns Check.value -> 'r dom_check end module type DetailsHtmlAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -2173,8 +2420,13 @@ module type DetailsHtmlAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -2196,9 +2448,10 @@ module type DetailsHtmlAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -2250,19 +2503,25 @@ end module type DialogHtmlAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] - type closedby = [ `none | `any | `closerequest ] + type closedby = [ `any | `closerequest | `none ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -2270,8 +2529,13 @@ module type DialogHtmlAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -2292,9 +2556,10 @@ module type DialogHtmlAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -2346,6 +2611,7 @@ end module type EllipseSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -2382,6 +2648,7 @@ module type EllipseSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -2424,19 +2691,25 @@ end module type EmbedHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type align = [ `left | `center | `right | `justify ] - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + type align = [ `center | `justify | `left | `right ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -2445,8 +2718,13 @@ module type EmbedHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -2468,11 +2746,12 @@ module type EmbedHTMLAttributes = sig type spellcheck = bool type src = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -2528,17 +2807,19 @@ end module type FeBlendSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in2 = string type in_ = string type lang = string - type mode = [ `normal | `multiply | `screen | `darken | `lighten ] + type mode = [ `darken | `lighten | `multiply | `normal | `screen ] type result = string type width = string type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2556,17 +2837,19 @@ end module type FeColorMatrixSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in_ = string type lang = string type result = string - type type_ = [ `matrix | `saturate | `hueRotate | `luminanceToAlpha ] + type type_ = [ `hueRotate | `luminanceToAlpha | `matrix | `saturate ] type values = string type width = string type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2584,6 +2867,7 @@ end module type FeComponentTransferSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in_ = string @@ -2593,6 +2877,7 @@ module type FeComponentTransferSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2608,6 +2893,7 @@ end module type FeCompositeSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in2 = string @@ -2623,6 +2909,7 @@ module type FeCompositeSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2644,10 +2931,11 @@ end module type FeConvolveMatrixSVGAttributes = sig include Dom_attributes + type bias = string type color_interpolation_filters = string type divisor = string - type edge_mode = [ `none | `duplicate | `wrap ] + type edge_mode = [ `duplicate | `none | `wrap ] type height = string type in_ = string type kernel_matrix = string @@ -2662,6 +2950,7 @@ module type FeConvolveMatrixSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?bias:bias Check.value -> ?color_interpolation_filters:color_interpolation_filters Check.value -> @@ -2686,6 +2975,7 @@ end module type FeDiffuseLightingSVGAttributes = sig include Dom_attributes + type color = string type color_interpolation_filters = string type diffuse_constant = string @@ -2700,6 +2990,7 @@ module type FeDiffuseLightingSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color:color Check.value -> ?color_interpolation_filters:color_interpolation_filters Check.value -> @@ -2720,6 +3011,7 @@ end module type FeDisplacementMapSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in2 = string @@ -2729,10 +3021,11 @@ module type FeDisplacementMapSVGAttributes = sig type scale = string type width = string type x = string - type x_channel_selector = [ `R | `G | `B | `A ] + type x_channel_selector = [ `A | `B | `G | `R ] type xmlns = string type y = string - type y_channel_selector = [ `R | `G | `B | `A ] + type y_channel_selector = [ `A | `B | `G | `R ] + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2752,10 +3045,12 @@ end module type FeDistantLightSVGAttributes = sig include Dom_attributes + type azimuth = string type elevation = string type lang = string type xmlns = string + type 'r check = ?azimuth:azimuth Check.value -> ?elevation:elevation Check.value -> @@ -2766,6 +3061,7 @@ end module type FeDropShadowSVGAttributes = sig include Dom_attributes + type color = string type color_interpolation_filters = string type dx = string @@ -2780,6 +3076,7 @@ module type FeDropShadowSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color:color Check.value -> ?color_interpolation_filters:color_interpolation_filters Check.value -> @@ -2800,6 +3097,7 @@ end module type FeFloodSVGAttributes = sig include Dom_attributes + type color = string type color_interpolation_filters = string type flood_color = string @@ -2811,6 +3109,7 @@ module type FeFloodSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color:color Check.value -> ?color_interpolation_filters:color_interpolation_filters Check.value -> @@ -2828,6 +3127,7 @@ end module type FeFuncSVGAttributes = sig include Dom_attributes + type amplitude = string type exponent = string type intercept = string @@ -2835,8 +3135,9 @@ module type FeFuncSVGAttributes = sig type offset = string type slope = string type table_values = string - type type_ = [ `table | `discrete | `linear | `identity | `gamma ] + type type_ = [ `discrete | `gamma | `identity | `linear | `table ] type xmlns = string + type 'r check = ?amplitude:amplitude Check.value -> ?exponent:exponent Check.value -> @@ -2852,6 +3153,7 @@ end module type FeGaussianBlurSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in_ = string @@ -2862,6 +3164,7 @@ module type FeGaussianBlurSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2878,6 +3181,7 @@ end module type FeImageSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type external_resources_required = bool type height = string @@ -2889,6 +3193,7 @@ module type FeImageSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?external_resources_required:external_resources_required Check.value -> @@ -2906,9 +3211,11 @@ end module type FeMergeNodeSVGAttributes = sig include Dom_attributes + type in_ = string type lang = string type xmlns = string + type 'r check = ?in_:in_ Check.value -> ?lang:lang Check.value -> @@ -2918,6 +3225,7 @@ end module type FeMergeSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type lang = string @@ -2926,6 +3234,7 @@ module type FeMergeSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2940,17 +3249,19 @@ end module type FeMorphologySVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in_ = string type lang = string - type operator = [ `erode | `dilate ] + type operator = [ `dilate | `erode ] type radius = string type result = string type width = string type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -2968,6 +3279,7 @@ end module type FeOffsetSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type dx = string type dy = string @@ -2979,6 +3291,7 @@ module type FeOffsetSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?dx:dx Check.value -> @@ -2996,11 +3309,13 @@ end module type FePointLightSVGAttributes = sig include Dom_attributes + type lang = string type x = string type xmlns = string type y = string type z = string + type 'r check = ?lang:lang Check.value -> ?x:x Check.value -> @@ -3012,6 +3327,7 @@ end module type FeSpecularLightingSVGAttributes = sig include Dom_attributes + type color = string type color_interpolation_filters = string type height = string @@ -3027,6 +3343,7 @@ module type FeSpecularLightingSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color:color Check.value -> ?color_interpolation_filters:color_interpolation_filters Check.value -> @@ -3048,6 +3365,7 @@ end module type FeSpotLightSVGAttributes = sig include Dom_attributes + type lang = string type limiting_cone_angle = string type points_at_x = string @@ -3058,6 +3376,7 @@ module type FeSpotLightSVGAttributes = sig type xmlns = string type y = string type z = string + type 'r check = ?lang:lang Check.value -> ?limiting_cone_angle:limiting_cone_angle Check.value -> @@ -3074,6 +3393,7 @@ end module type FeTileSVGAttributes = sig include Dom_attributes + type color_interpolation_filters = string type height = string type in_ = string @@ -3083,6 +3403,7 @@ module type FeTileSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?color_interpolation_filters:color_interpolation_filters Check.value -> ?height:height Check.value -> @@ -3098,6 +3419,7 @@ end module type FeTurbulanceSVGAttributes = sig include Dom_attributes + type base_frequency = string type color_interpolation_filters = string type height = string @@ -3105,12 +3427,13 @@ module type FeTurbulanceSVGAttributes = sig type num_octaves = string type result = string type seed = string - type stitch_tiles = [ `stitch | `noStitch ] + type stitch_tiles = [ `noStitch | `stitch ] type type_ = [ `fractalNoise | `turbulence ] type width = string type x = string type xmlns = string type y = string + type 'r check = ?base_frequency:base_frequency Check.value -> ?color_interpolation_filters:color_interpolation_filters Check.value -> @@ -3130,18 +3453,24 @@ end module type FieldsetHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -3151,8 +3480,13 @@ module type FieldsetHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -3173,9 +3507,10 @@ module type FieldsetHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -3228,16 +3563,18 @@ end module type FilterSVGAttributes = sig include Dom_attributes + type external_resources_required = bool type filter_res = string - type filter_units = [ `userSpaceOnUse | `objectBoundingBox ] + type filter_units = [ `objectBoundingBox | `userSpaceOnUse ] type height = string type lang = string - type primitive_units = [ `userSpaceOnUse | `objectBoundingBox ] + type primitive_units = [ `objectBoundingBox | `userSpaceOnUse ] type width = string type x = string type xmlns = string type y = string + type 'r check = ?external_resources_required:external_resources_required Check.value -> ?filter_res:filter_res Check.value -> @@ -3254,6 +3591,7 @@ end module type ForeignObjectSVGAttributes = sig include Dom_attributes + type clip = string type display = string type external_resources_required = bool @@ -3270,6 +3608,7 @@ module type ForeignObjectSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip:clip Check.value -> ?display:display Check.value -> @@ -3292,14 +3631,20 @@ end module type FormHTMLAttributes = sig include Dom_attributes + type about = string type accept = string type accept_charset = string type access_key = string type accesskey = string type action = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocomplete = [ `off | `on ] type autocorrect = [ `off | `on ] type content_editable = string @@ -3307,7 +3652,7 @@ module type FormHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type encoding = string type enctype = string @@ -3317,8 +3662,13 @@ module type FormHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -3331,7 +3681,7 @@ module type FormHTMLAttributes = sig type itemscope = bool type itemtype = string type lang = string - type method_ = [ `dialog | `post | `get ] + type method_ = [ `dialog | `get | `post ] type name = string type no_validate = bool type novalidate = bool @@ -3344,9 +3694,10 @@ module type FormHTMLAttributes = sig type spellcheck = bool type target = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?accept:accept Check.value -> @@ -3408,6 +3759,7 @@ end module type GSVGAttributes = sig include Dom_attributes + type clip_path = string type color = string type color_interpolation = string @@ -3439,6 +3791,7 @@ module type GSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?color:color Check.value -> @@ -3476,18 +3829,24 @@ end module type HTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -3495,8 +3854,13 @@ module type HTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -3516,9 +3880,10 @@ module type HTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -3568,18 +3933,24 @@ end module type HTMLSlotElementAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -3587,8 +3958,13 @@ module type HTMLSlotElementAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -3609,9 +3985,10 @@ module type HTMLSlotElementAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -3662,6 +4039,7 @@ end module type IframeHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string @@ -3671,8 +4049,13 @@ module type IframeHTMLAttributes = sig type allowfullscreen = bool type allowpaymentrequest = bool type allowtransparency = bool - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type browsingtopics = bool type content_editable = string @@ -3682,7 +4065,7 @@ module type IframeHTMLAttributes = sig type credentialless = bool type csp = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -3692,8 +4075,13 @@ module type IframeHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -3720,17 +4108,18 @@ module type IframeHTMLAttributes = sig type referrerpolicy = string type resource = string type sandbox = string - type scrolling = [ `auto | `yes | `no ] + type scrolling = [ `auto | `no | `yes ] type seamless = bool type sharedstoragewritable = bool type spellcheck = bool type src = string type srcdoc = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -3806,6 +4195,7 @@ end module type ImageSVGAttributes = sig include Dom_attributes + type clip = string type clip_path = string type clip_rule = string @@ -3834,6 +4224,7 @@ module type ImageSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip:clip Check.value -> ?clip_path:clip_path Check.value -> @@ -3868,14 +4259,20 @@ end module type ImgHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type align = [ `middle | `left | `right | `bottom | `top ] + type align = [ `bottom | `left | `middle | `right | `top ] type alt = string type attributionsrc = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type border = string type content_editable = string @@ -3885,8 +4282,8 @@ module type ImgHTMLAttributes = sig type cross_origin = string type crossorigin = string type datatype = string - type decoding = [ `auto | `sync | `async ] - type dir = [ `ltr | `rtl | `auto ] + type decoding = [ `async | `auto | `sync ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -3897,8 +4294,13 @@ module type ImgHTMLAttributes = sig type hspace = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type intrinsicsize = string type is = string type is_map = bool @@ -3932,13 +4334,14 @@ module type ImgHTMLAttributes = sig type src_set = string type srcset = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type use_map = string type usemap = string type vocab = string type vspace = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -4016,6 +4419,7 @@ end module type InputHTMLAttributes = sig include Dom_attributes + type about = string type accept = string type access_key = string @@ -4023,11 +4427,16 @@ module type InputHTMLAttributes = sig type align = string type alpha = bool type alt = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocomplete = string type autocorrect = [ `off | `on ] - type capture = [ `user | `environment ] + type capture = [ `environment | `user ] type checked = bool type colorspace = string type content_editable = string @@ -4035,7 +4444,7 @@ module type InputHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type dirname = string type disabled = bool type draggable = bool @@ -4045,12 +4454,12 @@ module type InputHTMLAttributes = sig type form = string type form_action = string type form_enctype = string - type form_method = [ `dialog | `post | `get ] + type form_method = [ `dialog | `get | `post ] type form_no_validate = bool type form_target = string type formaction = string type formenctype = string - type formmethod = [ `dialog | `post | `get ] + type formmethod = [ `dialog | `get | `post ] type formnovalidate = bool type formtarget = string type height = string @@ -4058,10 +4467,15 @@ module type InputHTMLAttributes = sig type incremental = bool type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type is = string - type item_id = string + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type is = string + type item_id = string type item_prop = string type item_ref = string type item_scope = bool @@ -4099,13 +4513,14 @@ module type InputHTMLAttributes = sig type src = string type step = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type usemap = string type value = string type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?accept:accept Check.value -> @@ -4202,11 +4617,17 @@ end module type KeygenHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type challenge = string type content_editable = string @@ -4214,7 +4635,7 @@ module type KeygenHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -4224,8 +4645,13 @@ module type KeygenHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -4248,9 +4674,10 @@ module type KeygenHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -4306,18 +4733,24 @@ end module type LabelHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -4326,8 +4759,13 @@ module type LabelHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -4347,9 +4785,10 @@ module type LabelHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -4400,18 +4839,24 @@ end module type LiHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -4419,8 +4864,13 @@ module type LiHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -4440,11 +4890,12 @@ module type LiHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -4496,6 +4947,7 @@ end module type LineSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -4535,6 +4987,7 @@ module type LineSVGAttributes = sig type xmlns = string type y1 = string type y2 = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -4580,9 +5033,10 @@ end module type LinearGradientSVGAttributes = sig include Dom_attributes + type external_resources_required = bool type gradient_transform = string - type gradient_units = [ `userSpaceOnUse | `objectBoundingBox ] + type gradient_units = [ `objectBoundingBox | `userSpaceOnUse ] type href = string type lang = string type spread_method = [ `pad | `reflect | `repeat ] @@ -4591,6 +5045,7 @@ module type LinearGradientSVGAttributes = sig type xmlns = string type y1 = string type y2 = string + type 'r check = ?external_resources_required:external_resources_required Check.value -> ?gradient_transform:gradient_transform Check.value -> @@ -4608,12 +5063,18 @@ end module type LinkHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string type as_ = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type blocking = [ `render ] type charset = string @@ -4625,7 +5086,7 @@ module type LinkHTMLAttributes = sig type cross_origin = string type crossorigin = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -4639,8 +5100,13 @@ module type LinkHTMLAttributes = sig type imagesrcset = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type integrity = string type is = string type item_id = string @@ -4668,10 +5134,11 @@ module type LinkHTMLAttributes = sig type spellcheck = bool type target = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -4742,28 +5209,34 @@ end module type MPathSVGAttributes = sig include Dom_attributes + type lang = string type xmlns = string + type 'r check = - ?lang:lang Check.value -> - ?xmlns:xmlns Check.value -> - 'r dom_check + ?lang:lang Check.value -> ?xmlns:xmlns Check.value -> 'r dom_check end module type MapHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -4771,8 +5244,13 @@ module type MapHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -4793,9 +5271,10 @@ module type MapHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -4846,6 +5325,7 @@ end module type MarkerSVGAttributes = sig include Dom_attributes + type clip = string type clip_path = string type color = string @@ -4860,7 +5340,7 @@ module type MarkerSVGAttributes = sig type filter = string type lang = string type marker_height = string - type marker_units = [ `userSpaceOnUse | `strokeWidth ] + type marker_units = [ `strokeWidth | `userSpaceOnUse ] type marker_width = string type mask = string type opacity = string @@ -4881,6 +5361,7 @@ module type MarkerSVGAttributes = sig type stroke_width = string type view_box = string type xmlns = string + type 'r check = ?clip:clip Check.value -> ?clip_path:clip_path Check.value -> @@ -4922,6 +5403,7 @@ end module type MaskSVGAttributes = sig include Dom_attributes + type clip_path = string type color = string type color_interpolation = string @@ -4935,8 +5417,8 @@ module type MaskSVGAttributes = sig type height = string type lang = string type mask = string - type mask_content_units = [ `userSpaceOnUse | `objectBoundingBox ] - type mask_units = [ `userSpaceOnUse | `objectBoundingBox ] + type mask_content_units = [ `objectBoundingBox | `userSpaceOnUse ] + type mask_units = [ `objectBoundingBox | `userSpaceOnUse ] type path_length = string type required_extensions = string type required_features = string @@ -4954,6 +5436,7 @@ module type MaskSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip_path:clip_path Check.value -> ?color:color Check.value -> @@ -4992,11 +5475,17 @@ end module type MenuHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type compact = bool type content_editable = string @@ -5004,7 +5493,7 @@ module type MenuHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5012,8 +5501,13 @@ module type MenuHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5034,10 +5528,11 @@ module type MenuHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] - type type_ = [ `toolbar | `context ] + type translate = [ `no | `yes ] + type type_ = [ `context | `toolbar ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5090,11 +5585,17 @@ end module type MetaHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type charset = string type content = string @@ -5103,7 +5604,7 @@ module type MetaHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5112,8 +5613,13 @@ module type MetaHTMLAttributes = sig type http_equiv = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5136,9 +5642,10 @@ module type MetaHTMLAttributes = sig type scheme = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5194,28 +5701,34 @@ end module type MetadataSVGAttributes = sig include Dom_attributes + type lang = string type xmlns = string + type 'r check = - ?lang:lang Check.value -> - ?xmlns:xmlns Check.value -> - 'r dom_check + ?lang:lang Check.value -> ?xmlns:xmlns Check.value -> 'r dom_check end module type MeterHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5225,8 +5738,13 @@ module type MeterHTMLAttributes = sig type high = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5250,10 +5768,11 @@ module type MeterHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5310,11 +5829,17 @@ end module type ModHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type cite = string type content_editable = string @@ -5324,7 +5849,7 @@ module type ModHTMLAttributes = sig type datatype = string type date_time = string type datetime = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5332,8 +5857,13 @@ module type ModHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5353,9 +5883,10 @@ module type ModHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5408,13 +5939,19 @@ end module type ObjectHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string type align = string type archive = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type border = string type classid = string @@ -5428,7 +5965,7 @@ module type ObjectHTMLAttributes = sig type data = string type datatype = string type declare = bool - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5439,8 +5976,13 @@ module type ObjectHTMLAttributes = sig type hspace = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5462,7 +6004,7 @@ module type ObjectHTMLAttributes = sig type spellcheck = bool type standby = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typemustmatch = bool type typeof = string @@ -5471,6 +6013,7 @@ module type ObjectHTMLAttributes = sig type vocab = string type vspace = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5540,11 +6083,17 @@ end module type OlHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type compact = bool type content_editable = string @@ -5552,7 +6101,7 @@ module type OlHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5560,8 +6109,13 @@ module type OlHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5583,10 +6137,11 @@ module type OlHTMLAttributes = sig type spellcheck = bool type start = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5640,18 +6195,24 @@ end module type OptgroupHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -5660,8 +6221,13 @@ module type OptgroupHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5682,9 +6248,10 @@ module type OptgroupHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5736,18 +6303,24 @@ end module type OptionHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -5756,8 +6329,13 @@ module type OptionHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5779,10 +6357,11 @@ module type OptionHTMLAttributes = sig type selected = bool type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5836,18 +6415,24 @@ end module type OutputHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5857,8 +6442,13 @@ module type OutputHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5879,9 +6469,10 @@ module type OutputHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -5934,18 +6525,24 @@ end module type ParamHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -5953,8 +6550,13 @@ module type ParamHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -5975,12 +6577,13 @@ module type ParamHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type value = string type valuetype = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -6034,6 +6637,7 @@ end module type PathSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -6070,6 +6674,7 @@ module type PathSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -6112,6 +6717,7 @@ end module type PatternSVGAttributes = sig include Dom_attributes + type clip = string type clip_path = string type color = string @@ -6131,9 +6737,9 @@ module type PatternSVGAttributes = sig type opacity = string type overflow = string type path_length = string - type pattern_content_units = [ `userSpaceOnUse | `objectBoundingBox ] + type pattern_content_units = [ `objectBoundingBox | `userSpaceOnUse ] type pattern_transform = string - type pattern_units = [ `userSpaceOnUse | `objectBoundingBox ] + type pattern_units = [ `objectBoundingBox | `userSpaceOnUse ] type preserve_aspect_ratio = string type required_extensions = string type required_features = string @@ -6152,6 +6758,7 @@ module type PatternSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip:clip Check.value -> ?clip_path:clip_path Check.value -> @@ -6198,6 +6805,7 @@ end module type PolygonSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -6234,6 +6842,7 @@ module type PolygonSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -6276,6 +6885,7 @@ end module type PolylineSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -6312,6 +6922,7 @@ module type PolylineSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -6354,18 +6965,24 @@ end module type ProgressHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -6373,8 +6990,13 @@ module type ProgressHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -6395,10 +7017,11 @@ module type ProgressHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -6450,11 +7073,17 @@ end module type QuoteHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type cite = string type content_editable = string @@ -6462,7 +7091,7 @@ module type QuoteHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -6470,8 +7099,13 @@ module type QuoteHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -6491,9 +7125,10 @@ module type QuoteHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -6544,18 +7179,20 @@ end module type RadialGradientSVGAttributes = sig include Dom_attributes + type cx = string type cy = string type external_resources_required = bool type fx = string type fy = string type gradient_transform = string - type gradient_units = [ `userSpaceOnUse | `objectBoundingBox ] + type gradient_units = [ `objectBoundingBox | `userSpaceOnUse ] type href = string type lang = string type r = string type spread_method = [ `pad | `reflect | `repeat ] type xmlns = string + type 'r check = ?cx:cx Check.value -> ?cy:cy Check.value -> @@ -6574,6 +7211,7 @@ end module type RectSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -6612,6 +7250,7 @@ module type RectSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -6656,13 +7295,19 @@ end module type ScriptHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string type async = bool type attributionsrc = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type blocking = [ `render ] type charset = string @@ -6674,7 +7319,7 @@ module type ScriptHTMLAttributes = sig type crossorigin = string type datatype = string type defer = bool - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type event = string @@ -6684,8 +7329,13 @@ module type ScriptHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type integrity = string type is = string type item_id = string @@ -6712,10 +7362,11 @@ module type ScriptHTMLAttributes = sig type spellcheck = bool type src = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -6782,11 +7433,17 @@ end module type SelectHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocomplete = string type autocorrect = [ `off | `on ] type content_editable = string @@ -6794,7 +7451,7 @@ module type SelectHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disabled = bool type draggable = bool type enterkeyhint = string @@ -6804,8 +7461,13 @@ module type SelectHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -6829,10 +7491,11 @@ module type SelectHTMLAttributes = sig type size = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type value = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -6890,6 +7553,7 @@ end module type SetSVGAttributes = sig include Dom_attributes + type begin_ = string type dur = string type end_ = string @@ -6905,9 +7569,10 @@ module type SetSVGAttributes = sig type repeat_dur = string type required_extensions = string type required_features = string - type restart = [ `always | `whenNotActive | `never ] + type restart = [ `always | `never | `whenNotActive ] type system_language = string type xmlns = string + type 'r check = ?begin_:begin_ Check.value -> ?dur:dur Check.value -> @@ -6932,18 +7597,24 @@ end module type SourceHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -6952,8 +7623,13 @@ module type SourceHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -6977,11 +7653,12 @@ module type SourceHTMLAttributes = sig type src = string type srcset = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -7038,12 +7715,14 @@ end module type StopSVGAttributes = sig include Dom_attributes + type color = string type lang = string type offset = string type stop_color = string type stop_opacity = string type xmlns = string + type 'r check = ?color:color Check.value -> ?lang:lang Check.value -> @@ -7056,11 +7735,17 @@ end module type StyleHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type blocking = [ `render ] type content_editable = string @@ -7068,7 +7753,7 @@ module type StyleHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -7076,8 +7761,13 @@ module type StyleHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -7099,10 +7789,11 @@ module type StyleHTMLAttributes = sig type scoped = bool type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type type_ = string type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -7156,6 +7847,7 @@ end module type SvgSVGAttributes = sig include Dom_attributes + type alignment_baseline = string type base_profile = string type baseline_shift = string @@ -7253,6 +7945,7 @@ module type SvgSVGAttributes = sig type xmlns = string type y = string type zoom_and_pan = [ `disable | `magnify ] + type 'r check = ?alignment_baseline:alignment_baseline Check.value -> ?base_profile:base_profile Check.value -> @@ -7356,6 +8049,7 @@ end module type SwitchSVGAttributes = sig include Dom_attributes + type clip_path = string type color = string type color_interpolation = string @@ -7387,6 +8081,7 @@ module type SwitchSVGAttributes = sig type transform = string type visibility = string type xmlns = string + type 'r check = ?clip_path:clip_path Check.value -> ?color:color Check.value -> @@ -7424,6 +8119,7 @@ end module type SymbolSVGAttributes = sig include Dom_attributes + type clip = string type clip_path = string type color = string @@ -7459,6 +8155,7 @@ module type SymbolSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip:clip Check.value -> ?clip_path:clip_path Check.value -> @@ -7500,6 +8197,7 @@ end module type TSpanSVGAttributes = sig include Dom_attributes + type alignment_baseline = string type baseline_shift = string type color = string @@ -7546,6 +8244,7 @@ module type TSpanSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?alignment_baseline:alignment_baseline Check.value -> ?baseline_shift:baseline_shift Check.value -> @@ -7598,13 +8297,19 @@ end module type TdHTMLAttributes = sig include Dom_attributes + type abbr = string type about = string type access_key = string type accesskey = string - type align = [ `left | `center | `right | `justify | `char ] - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + type align = [ `center | `char | `justify | `left | `right ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type axis = string type bgcolor = string @@ -7617,7 +8322,7 @@ module type TdHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -7627,8 +8332,13 @@ module type TdHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -7649,14 +8359,15 @@ module type TdHTMLAttributes = sig type resource = string type row_span = string type rowspan = string - type scope = [ `row | `rowgroup | `col | `colgroup ] + type scope = [ `col | `colgroup | `row | `rowgroup ] type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string - type valign = [ `baseline | `middle | `bottom | `top ] + type valign = [ `baseline | `bottom | `middle | `top ] type vocab = string type width = string + type 'r check = ?abbr:abbr Check.value -> ?about:about Check.value -> @@ -7722,18 +8433,24 @@ end module type TemplateHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -7741,8 +8458,13 @@ module type TemplateHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -7767,9 +8489,10 @@ module type TemplateHTMLAttributes = sig type shadowrootserializable = bool type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -7824,6 +8547,7 @@ end module type TextPathSVGAttributes = sig include Dom_attributes + type alignment_baseline = string type baseline_shift = string type color = string @@ -7867,6 +8591,7 @@ module type TextPathSVGAttributes = sig type visibility = string type word_spacing = string type xmlns = string + type 'r check = ?alignment_baseline:alignment_baseline Check.value -> ?baseline_shift:baseline_shift Check.value -> @@ -7916,6 +8641,7 @@ end module type TextSVGAttributes = sig include Dom_attributes + type clip_path = string type clip_rule = string type color = string @@ -7972,6 +8698,7 @@ module type TextSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?clip_path:clip_path Check.value -> ?clip_rule:clip_rule Check.value -> @@ -8034,11 +8761,17 @@ end module type TextareaHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocomplete = string type autocorrect = [ `off | `on ] type cols = string @@ -8047,7 +8780,7 @@ module type TextareaHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type dirname = string type disabled = bool type draggable = bool @@ -8058,8 +8791,13 @@ module type TextareaHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -8089,11 +8827,12 @@ module type TextareaHTMLAttributes = sig type rows = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type value = string type vocab = string - type wrap = [ `off | `hard | `soft ] + type wrap = [ `hard | `off | `soft ] + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -8160,13 +8899,19 @@ end module type ThHTMLAttributes = sig include Dom_attributes + type abbr = string type about = string type access_key = string type accesskey = string - type align = [ `left | `center | `right | `justify | `char ] - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + type align = [ `center | `char | `justify | `left | `right ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type axis = string type bgcolor = string @@ -8179,7 +8924,7 @@ module type ThHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -8189,8 +8934,13 @@ module type ThHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -8211,14 +8961,15 @@ module type ThHTMLAttributes = sig type resource = string type row_span = string type rowspan = string - type scope = [ `row | `rowgroup | `col | `colgroup ] + type scope = [ `col | `colgroup | `row | `rowgroup ] type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string - type valign = [ `baseline | `middle | `bottom | `top ] + type valign = [ `baseline | `bottom | `middle | `top ] type vocab = string type width = string + type 'r check = ?abbr:abbr Check.value -> ?about:about Check.value -> @@ -8284,11 +9035,17 @@ end module type TimeHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string @@ -8297,7 +9054,7 @@ module type TimeHTMLAttributes = sig type datatype = string type date_time = string type datetime = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -8305,8 +9062,13 @@ module type TimeHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -8326,9 +9088,10 @@ module type TimeHTMLAttributes = sig type resource = string type spellcheck = bool type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -8380,11 +9143,17 @@ end module type TrackHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type content_editable = string type contenteditable = string @@ -8392,7 +9161,7 @@ module type TrackHTMLAttributes = sig type contextmenu = string type datatype = string type default = bool - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type draggable = bool type enterkeyhint = string type export_parts = string @@ -8400,8 +9169,13 @@ module type TrackHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -8427,9 +9201,10 @@ module type TrackHTMLAttributes = sig type src = string type srclang = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -8486,6 +9261,7 @@ end module type UseSVGAttributes = sig include Dom_attributes + type alignment_baseline = string type baseline_shift = string type clip = string @@ -8558,6 +9334,7 @@ module type UseSVGAttributes = sig type x = string type xmlns = string type y = string + type 'r check = ?alignment_baseline:alignment_baseline Check.value -> ?baseline_shift:baseline_shift Check.value -> @@ -8636,11 +9413,17 @@ end module type VideoHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type autoplay = bool type content_editable = string @@ -8652,7 +9435,7 @@ module type VideoHTMLAttributes = sig type cross_origin = string type crossorigin = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disablepictureinpicture = bool type disableremoteplayback = bool type draggable = bool @@ -8663,8 +9446,13 @@ module type VideoHTMLAttributes = sig type hidden = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -8696,10 +9484,11 @@ module type VideoHTMLAttributes = sig type spellcheck = bool type src = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type vocab = string type width = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -8770,6 +9559,7 @@ end module type ViewSVGAttributes = sig include Dom_attributes + type external_resources_required = bool type lang = string type preserve_aspect_ratio = string @@ -8777,6 +9567,7 @@ module type ViewSVGAttributes = sig type view_target = string type xmlns = string type zoom_and_pan = [ `disable | `magnify ] + type 'r check = ?external_resources_required:external_resources_required Check.value -> ?lang:lang Check.value -> @@ -8790,13 +9581,19 @@ end module type WebViewHTMLAttributes = sig include Dom_attributes + type about = string type access_key = string type accesskey = string type allowfullscreen = bool type allowpopups = bool - type auto_capitalize = [ `none | `off | `on | `sentences | `words | `characters ] - type autocapitalize = [ `none | `off | `on | `sentences | `words | `characters ] + + type auto_capitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + + type autocapitalize = + [ `characters | `none | `off | `on | `sentences | `words ] + type autocorrect = [ `off | `on ] type autosize = bool type blinkfeatures = string @@ -8805,7 +9602,7 @@ module type WebViewHTMLAttributes = sig type context_menu = string type contextmenu = string type datatype = string - type dir = [ `ltr | `rtl | `auto ] + type dir = [ `auto | `ltr | `rtl ] type disableblinkfeatures = string type disableguestresize = bool type disablewebsecurity = bool @@ -8819,8 +9616,13 @@ module type WebViewHTMLAttributes = sig type httpreferrer = string type inert = bool type inner_text = string - type input_mode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] - type inputmode = [ `none | `text | `search | `decimal | `email | `numeric | `tel | `url ] + + type input_mode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + + type inputmode = + [ `decimal | `email | `none | `numeric | `search | `tel | `text | `url ] + type is = string type item_id = string type item_prop = string @@ -8846,11 +9648,12 @@ module type WebViewHTMLAttributes = sig type spellcheck = bool type src = string type title = string - type translate = [ `yes | `no ] + type translate = [ `no | `yes ] type typeof = string type useragent = string type vocab = string type webpreferences = string + type 'r check = ?about:about Check.value -> ?access_key:access_key Check.value -> @@ -8917,357 +9720,237 @@ module type WebViewHTMLAttributes = sig end module A : AnchorHTMLAttributes with type element = Dom.htmlAnchorElement - module Abbr : HTMLAttributes with type element = Dom.htmlElement - module Address : HTMLAttributes with type element = Dom.htmlElement - module Area : AreaHTMLAttributes with type element = Dom.htmlAreaElement - module Article : HTMLAttributes with type element = Dom.htmlElement - module Aside : HTMLAttributes with type element = Dom.htmlElement - module Audio : AudioHTMLAttributes with type element = Dom.htmlAudioElement - module B : HTMLAttributes with type element = Dom.htmlElement - module Base : BaseHTMLAttributes with type element = Dom.htmlBaseElement - module Bdi : HTMLAttributes with type element = Dom.htmlElement - module Bdo : BdoHTMLAttributes with type element = Dom.htmlElement -module Blockquote : BlockquoteHTMLAttributes with type element = Dom.htmlQuoteElement +module Blockquote : + BlockquoteHTMLAttributes with type element = Dom.htmlQuoteElement module Body : BodyHTMLAttributes with type element = Dom.htmlBodyElement - module Br : HTMLAttributes with type element = Dom.element - module Button : ButtonHTMLAttributes with type element = Dom.htmlButtonElement - module Canvas : CanvasHTMLAttributes with type element = Dom.htmlCanvasElement -module Caption : CaptionHTMLAttributes with type element = Dom.htmlTableCaptionElement +module Caption : + CaptionHTMLAttributes with type element = Dom.htmlTableCaptionElement module Cite : HTMLAttributes with type element = Dom.htmlElement - module Code : HTMLAttributes with type element = Dom.htmlElement - module Col : ColHTMLAttributes with type element = Dom.htmlTableColElement -module Colgroup : ColgroupHTMLAttributes with type element = Dom.htmlTableColElement +module Colgroup : + ColgroupHTMLAttributes with type element = Dom.htmlTableColElement module Data : DataHTMLAttributes with type element = Dom.htmlDataElement - module Datalist : HTMLAttributes with type element = Dom.htmlDataListElement - module Dd : HTMLAttributes with type element = Dom.htmlElement - module Del : ModHTMLAttributes with type element = Dom.htmlModElement - module Details : DetailsHtmlAttributes with type element = Dom.element - module Dfn : HTMLAttributes with type element = Dom.htmlElement - module Dialog : DialogHtmlAttributes with type element = Dom.htmlDialogElement - module Div : HTMLAttributes with type element = Dom.htmlDivElement - module Dl : HTMLAttributes with type element = Dom.element - module Dt : HTMLAttributes with type element = Dom.htmlElement - module Em : HTMLAttributes with type element = Dom.htmlElement - module Embed : EmbedHTMLAttributes with type element = Dom.htmlEmbedElement -module Fieldset : FieldsetHTMLAttributes with type element = Dom.htmlFieldSetElement +module Fieldset : + FieldsetHTMLAttributes with type element = Dom.htmlFieldSetElement module Figcaption : HTMLAttributes with type element = Dom.htmlElement - module Figure : HTMLAttributes with type element = Dom.htmlElement - module Footer : HTMLAttributes with type element = Dom.htmlElement - module Form : FormHTMLAttributes with type element = Dom.htmlFormElement - module H1 : HTMLAttributes with type element = Dom.htmlHeadingElement - module H2 : HTMLAttributes with type element = Dom.htmlHeadingElement - module H3 : HTMLAttributes with type element = Dom.htmlHeadingElement - module H4 : HTMLAttributes with type element = Dom.htmlHeadingElement - module H5 : HTMLAttributes with type element = Dom.htmlHeadingElement - module H6 : HTMLAttributes with type element = Dom.htmlHeadingElement - module Head : HTMLAttributes with type element = Dom.htmlHeadElement - module Header : HTMLAttributes with type element = Dom.htmlElement - module Hgroup : HTMLAttributes with type element = Dom.htmlElement - module Hr : HTMLAttributes with type element = Dom.element - module Html : HTMLAttributes with type element = Dom.htmlHtmlElement - module I : HTMLAttributes with type element = Dom.htmlElement - module Iframe : IframeHTMLAttributes with type element = Dom.element - module Img : ImgHTMLAttributes with type element = Dom.htmlImageElement - module Input : InputHTMLAttributes with type element = Dom.htmlInputElement - module Ins : ModHTMLAttributes with type element = Dom.htmlModElement - module Kbd : HTMLAttributes with type element = Dom.htmlElement - module Label : LabelHTMLAttributes with type element = Dom.htmlLabelElement - module Legend : HTMLAttributes with type element = Dom.htmlLegendElement - module Li : LiHTMLAttributes with type element = Dom.element - module Link : LinkHTMLAttributes with type element = Dom.htmlLinkElement - module Main : HTMLAttributes with type element = Dom.htmlElement - module Map : MapHTMLAttributes with type element = Dom.htmlMapElement - module Mark : HTMLAttributes with type element = Dom.htmlElement - module Menu : MenuHTMLAttributes with type element = Dom.htmlMenuElement - module Meta : MetaHTMLAttributes with type element = Dom.htmlMetaElement - module Meter : MeterHTMLAttributes with type element = Dom.htmlMeterElement - module Nav : HTMLAttributes with type element = Dom.htmlElement - module Noscript : HTMLAttributes with type element = Dom.htmlElement - module Object : ObjectHTMLAttributes with type element = Dom.htmlObjectElement - module Ol : OlHTMLAttributes with type element = Dom.htmlOListElement -module Optgroup : OptgroupHTMLAttributes with type element = Dom.htmlOptGroupElement +module Optgroup : + OptgroupHTMLAttributes with type element = Dom.htmlOptGroupElement module Option : OptionHTMLAttributes with type element = Dom.htmlOptionElement - module Output : OutputHTMLAttributes with type element = Dom.htmlOutputElement - module P : HTMLAttributes with type element = Dom.htmlParagraphElement - module Picture : HTMLAttributes with type element = Dom.element - module Pre : HTMLAttributes with type element = Dom.htmlPreElement -module Progress : ProgressHTMLAttributes with type element = Dom.htmlProgressElement +module Progress : + ProgressHTMLAttributes with type element = Dom.htmlProgressElement module Q : QuoteHTMLAttributes with type element = Dom.htmlQuoteElement - module Rp : HTMLAttributes with type element = Dom.htmlElement - module Rt : HTMLAttributes with type element = Dom.htmlElement - module Ruby : HTMLAttributes with type element = Dom.htmlElement - module S : HTMLAttributes with type element = Dom.htmlElement - module Samp : HTMLAttributes with type element = Dom.htmlElement - module Script : ScriptHTMLAttributes with type element = Dom.htmlScriptElement - module Search : HTMLAttributes with type element = Dom.htmlElement - module Section : HTMLAttributes with type element = Dom.htmlElement - module Select : SelectHTMLAttributes with type element = Dom.htmlSelectElement - module Slot : HTMLSlotElementAttributes with type element = Dom.htmlSlotElement - module Small : HTMLAttributes with type element = Dom.htmlElement - module Source : SourceHTMLAttributes with type element = Dom.htmlSourceElement - module Span : HTMLAttributes with type element = Dom.htmlSpanElement - module Strong : HTMLAttributes with type element = Dom.htmlElement - module Style : StyleHTMLAttributes with type element = Dom.htmlStyleElement - module Sub : HTMLAttributes with type element = Dom.htmlElement - module Summary : HTMLAttributes with type element = Dom.htmlElement - module Sup : HTMLAttributes with type element = Dom.htmlElement - module Table : HTMLAttributes with type element = Dom.htmlTableElement - module Tbody : HTMLAttributes with type element = Dom.htmlTableSectionElement - module Td : TdHTMLAttributes with type element = Dom.htmlTableCellElement - module Template : TemplateHTMLAttributes with type element = Dom.element -module Textarea : TextareaHTMLAttributes with type element = Dom.htmlTextAreaElement +module Textarea : + TextareaHTMLAttributes with type element = Dom.htmlTextAreaElement module Tfoot : HTMLAttributes with type element = Dom.htmlTableSectionElement - module Th : ThHTMLAttributes with type element = Dom.htmlTableCellElement - module Thead : HTMLAttributes with type element = Dom.htmlTableSectionElement - module Time : TimeHTMLAttributes with type element = Dom.htmlTimeElement - module Title : HTMLAttributes with type element = Dom.htmlTitleElement - module Tr : HTMLAttributes with type element = Dom.htmlTableRowElement - module Track : TrackHTMLAttributes with type element = Dom.htmlTrackElement - module U : HTMLAttributes with type element = Dom.htmlElement - module Ul : HTMLAttributes with type element = Dom.element - module Var : HTMLAttributes with type element = Dom.htmlElement - module Video : VideoHTMLAttributes with type element = Dom.htmlVideoElement - module Wbr : HTMLAttributes with type element = Dom.htmlElement - module Webview : WebViewHTMLAttributes with type element = Dom.htmlElement - module Big : HTMLAttributes with type element = Dom.htmlElement - module Keygen : KeygenHTMLAttributes with type element = Dom.htmlUnknownElement - module Menuitem : HTMLAttributes with type element = Dom.htmlUnknownElement - module Param : ParamHTMLAttributes with type element = Dom.htmlParamElement - module Animate : AnimateSVGAttributes with type element = Dom.element -module AnimateMotion : AnimateMotionSVGAttributes with type element = Dom.element +module AnimateMotion : + AnimateMotionSVGAttributes with type element = Dom.element -module AnimateTransform : AnimateTransformSVGAttributes with type element = Dom.element +module AnimateTransform : + AnimateTransformSVGAttributes with type element = Dom.element module Circle : CircleSVGAttributes with type element = Dom.element - module ClipPath : ClipPathSVGAttributes with type element = Dom.element - module Defs : DefsSVGAttributes with type element = Dom.element - module Desc : DescSVGAttributes with type element = Dom.element - module Ellipse : EllipseSVGAttributes with type element = Dom.element - module FeBlend : FeBlendSVGAttributes with type element = Dom.element -module FeColorMatrix : FeColorMatrixSVGAttributes with type element = Dom.element +module FeColorMatrix : + FeColorMatrixSVGAttributes with type element = Dom.element -module FeComponentTransfer : FeComponentTransferSVGAttributes with type element = Dom.element +module FeComponentTransfer : + FeComponentTransferSVGAttributes with type element = Dom.element module FeComposite : FeCompositeSVGAttributes with type element = Dom.element -module FeConvolveMatrix : FeConvolveMatrixSVGAttributes with type element = Dom.element +module FeConvolveMatrix : + FeConvolveMatrixSVGAttributes with type element = Dom.element -module FeDiffuseLighting : FeDiffuseLightingSVGAttributes with type element = Dom.element +module FeDiffuseLighting : + FeDiffuseLightingSVGAttributes with type element = Dom.element -module FeDisplacementMap : FeDisplacementMapSVGAttributes with type element = Dom.element +module FeDisplacementMap : + FeDisplacementMapSVGAttributes with type element = Dom.element -module FeDistantLight : FeDistantLightSVGAttributes with type element = Dom.element +module FeDistantLight : + FeDistantLightSVGAttributes with type element = Dom.element module FeDropShadow : FeDropShadowSVGAttributes with type element = Dom.element - module FeFlood : FeFloodSVGAttributes with type element = Dom.element - module FeFuncA : FeFuncSVGAttributes with type element = Dom.element - module FeFuncB : FeFuncSVGAttributes with type element = Dom.element - module FeFuncG : FeFuncSVGAttributes with type element = Dom.element - module FeFuncR : FeFuncSVGAttributes with type element = Dom.element -module FeGaussianBlur : FeGaussianBlurSVGAttributes with type element = Dom.element +module FeGaussianBlur : + FeGaussianBlurSVGAttributes with type element = Dom.element module FeImage : FeImageSVGAttributes with type element = Dom.element - module FeMerge : FeMergeSVGAttributes with type element = Dom.element - module FeMergeNode : FeMergeNodeSVGAttributes with type element = Dom.element - module FeMorphology : FeMorphologySVGAttributes with type element = Dom.element - module FeOffset : FeOffsetSVGAttributes with type element = Dom.element - module FePointLight : FePointLightSVGAttributes with type element = Dom.element -module FeSpecularLighting : FeSpecularLightingSVGAttributes with type element = Dom.element +module FeSpecularLighting : + FeSpecularLightingSVGAttributes with type element = Dom.element module FeSpotLight : FeSpotLightSVGAttributes with type element = Dom.element - module FeTile : FeTileSVGAttributes with type element = Dom.element - module FeTurbulence : FeTurbulanceSVGAttributes with type element = Dom.element - module Filter : FilterSVGAttributes with type element = Dom.element -module ForeignObject : ForeignObjectSVGAttributes with type element = Dom.element +module ForeignObject : + ForeignObjectSVGAttributes with type element = Dom.element module G : GSVGAttributes with type element = Dom.element - module Image : ImageSVGAttributes with type element = Dom.element - module Line : LineSVGAttributes with type element = Dom.element -module LinearGradient : LinearGradientSVGAttributes with type element = Dom.element +module LinearGradient : + LinearGradientSVGAttributes with type element = Dom.element module Marker : MarkerSVGAttributes with type element = Dom.element - module Mask : MaskSVGAttributes with type element = Dom.element - module Metadata : MetadataSVGAttributes with type element = Dom.element - module Mpath : MPathSVGAttributes with type element = Dom.element - module Path : PathSVGAttributes with type element = Dom.element - module Pattern : PatternSVGAttributes with type element = Dom.element - module Polygon : PolygonSVGAttributes with type element = Dom.element - module Polyline : PolylineSVGAttributes with type element = Dom.element -module RadialGradient : RadialGradientSVGAttributes with type element = Dom.element +module RadialGradient : + RadialGradientSVGAttributes with type element = Dom.element module Rect : RectSVGAttributes with type element = Dom.element - module Set : SetSVGAttributes with type element = Dom.element - module Stop : StopSVGAttributes with type element = Dom.element - module Svg : SvgSVGAttributes with type element = Dom.element - module Switch : SwitchSVGAttributes with type element = Dom.element - module Symbol : SymbolSVGAttributes with type element = Dom.element - module Text : TextSVGAttributes with type element = Dom.element - module TextPath : TextPathSVGAttributes with type element = Dom.element - module Tspan : TSpanSVGAttributes with type element = Dom.element - module Use : UseSVGAttributes with type element = Dom.element - module View : ViewSVGAttributes with type element = Dom.element -(** An element whose tag is known only as the page runs: the attributes - every HTML element takes. *) module Element : HTMLAttributes with type element = Dom.htmlElement +(** An element whose tag is known only as the page runs: the attributes every + HTML element takes. *) diff --git a/src/index.ml b/src/index.ml deleted file mode 100644 index 095b4f4c..00000000 --- a/src/index.ml +++ /dev/null @@ -1,11 +0,0 @@ -module Props = struct - let check ~each:(_ : 'a array Check.value) - ?fallback:(_ : Jsx.element Check.value option) - ~children: - (_ : - ('a Solid.accessor -> int -> Jsx.element, [ `render ]) Check.children) - () = - () -end - -external component : unit Jsx.component = "Index" [@@mel.module "solid-js"] diff --git a/src/index.mli b/src/index.mli index cdfd80a2..8fdd4d5b 100644 --- a/src/index.mli +++ b/src/index.mli @@ -2,13 +2,17 @@ [(fun item i -> ...)]. *) module Props : sig + type 'a t + val check : each:'a array Check.value -> ?fallback:Jsx.element Check.value -> children: ('a Solid.accessor -> int -> Jsx.element, [ `render ]) Check.children -> + ?props:'a t Solid.rest -> unit -> unit end -val component : unit Jsx.component +val make : 'a Props.t -> Jsx.element +val component : 'a Props.t Jsx.component diff --git a/src/index.mlx b/src/index.mlx new file mode 100644 index 00000000..148184b9 --- /dev/null +++ b/src/index.mlx @@ -0,0 +1,23 @@ +module Raw = struct + module Props = struct + let check ~each:(_ : 'a array Check.value) + ?fallback:(_ : Jsx.element Check.value option) + ~children: + (_ : + ( 'a Solid.accessor -> int -> Jsx.element, + [ `render ] ) + Check.children) () = + () + end + + external component : unit Jsx.component = "Index" [@@mel.module "solid-js"] +end + +(* Solid calls the function with an item and its index at once, and its type + does not say whether it takes them so: it is called here, as OCaml calls a + function it did not make. *) +let%component make ~(each : 'a array) ?(fallback : Jsx.element option) + ~(children : 'a Solid.accessor -> int -> Jsx.element) () = + + (fun item index -> children item index) + diff --git a/test/browser/flow_test.mlx b/test/browser/flow_test.mlx index f7ff50d9..b21e1206 100644 --- a/test/browser/flow_test.mlx +++ b/test/browser/flow_test.mlx @@ -53,6 +53,26 @@ module Shows_user = struct

      (Jsx.string (Option.value user ~default:"nobody"))

      end +(* Functions of two arguments that take the first, work, and give a function + of the second: OCaml types them as it types [fun a b -> ...], and Melange + writes them as a function of one argument. *) +let staged_row item = + let shouted = String.uppercase_ascii item in + fun i ->
    • (Jsx.string (shouted ^ string_of_int (S.get i)))
    • + +let staged_cell item = + let doubled = S.accessor (fun () -> 2 * S.get item) in + fun (i : int) ->
    • (Jsx.int (S.get doubled + i))
    • + +let staged_join a = + let dashed = a ^ "-" in + fun b -> dashed ^ b + +module Joins = struct + let%component make ~(join : string -> string -> string) () = +

      (Jsx.string (join "a" "b"))

      +end + module Greeting = struct let%component make ~(name : string) ?(greeting : string = "Hello") () =

      (Jsx.string (S.get greeting ^ ", " ^ S.get name))

      @@ -99,6 +119,21 @@ let () = E.(expect (T.page ()) |> toBe "34"))); Jest.describe "conditions" (fun () -> Jest.afterEach T.cleanup; + Jest.test "For calls a function that takes its arguments one at a time" + (fun () -> + T.render (fun () -> +
      ); + E.(expect (T.page ()) |> toBe "A0B1")); + Jest.test "Index calls a function that takes its arguments one at a time" + (fun () -> + T.render (fun () -> +
      ); + E.(expect (T.page ()) |> toBe "25")); + Jest.test + "a component calls a function prop that takes its arguments one at a \ + time" (fun () -> + T.render (fun () -> ); + E.(expect (T.page ()) |> toBe "a-b")); Jest.test "Show shows its children while its condition holds" (fun () -> let on, set_on = S.create_signal false in T.render (fun () -> diff --git a/test/does_not_compile.t b/test/does_not_compile.t index 1c005931..c684d0d0 100644 --- a/test/does_not_compile.t +++ b/test/does_not_compile.t @@ -500,14 +500,14 @@ A value taken for one JavaScript threw, which only a handler is given. A Kobalte value read as whatever type its caller names. $ cat > case.mlx <<'EOF' - > let n (p : Solidtype_kobalte.Types.Context_Provider.t) : int = - > Solidtype_kobalte.Types.Context_Provider.value p + > let n (p : Solidtype_kobalte.Types.Context_Provider_Props.t) : int = + > Solidtype_kobalte.Types.Context_Provider_Props.value p > EOF $ build - File "case.mlx", line 2, characters 2-48: - 2 | Solidtype_kobalte.Types.Context_Provider.value p - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - Error: Unbound value Solidtype_kobalte.Types.Context_Provider.value + File "case.mlx", line 2, characters 2-54: + 2 | Solidtype_kobalte.Types.Context_Provider_Props.value p + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + Error: Unbound value Solidtype_kobalte.Types.Context_Provider_Props.value [1] A raw external under a Kobalte wrapper, which skips what the wrapper adds. diff --git a/test/hydration/hydrate_test.mlx b/test/hydration/hydrate_test.mlx index 69844e7b..2a38e704 100644 --- a/test/hydration/hydrate_test.mlx +++ b/test/hydration/hydrate_test.mlx @@ -43,20 +43,33 @@ let run_script tagged = let () = Jest.describe "hydrate" (fun () -> Jest.test - "keeps the server's nodes, a function child's too, and makes its \ - handlers live" (fun () -> + "keeps the server's nodes, a function child's, a list's and an adapted \ + component's too, and makes its handlers live" (fun () -> run_script (inject "script"); set_inner_html body ("
      " ^ inject "html" ^ "
      "); let button = query "button" in let drawn_node = query "b" in + let item_node = query "li" in + let joined_node = query "i" in let unmount = Web.hydrate Island.make (query "#root") in let buttons = length (query_all "button") in let kept = query "button" == button in let drawn_kept = query "b" == drawn_node in let drawn = text (query "b") in + let listed_kept = query "li" == item_node in + let joined_kept = query "i" == joined_node in + let listed = text (query "ul") ^ text (query "i") in click button; let handled = !Island.clicks in unmount (); E.( - expect (buttons, kept, handled, drawn_kept, drawn) - |> toEqual (1, true, 1, true, "drawn")))) + expect + ( buttons, + kept, + handled, + drawn_kept, + drawn, + listed_kept, + joined_kept, + listed ) + |> toEqual (1, true, 1, true, "drawn", true, true, "xyab")))) diff --git a/test/hydration/island.mlx b/test/hydration/island.mlx index 08dac143..77b6c7f7 100644 --- a/test/hydration/island.mlx +++ b/test/hydration/island.mlx @@ -15,6 +15,22 @@ module Tag = struct (Jsx.draw (S.get children) { label }) end +(* A component given a function of two arguments, and the same under + [Arity], as a binding makes a JavaScript component that takes one. *) +module Joined = struct + let%component make ~(join : string -> string -> string) () = + (Jsx.string (join "a" "b")) +end + +module Adapted = struct + module Props = Joined.Props + + let component = + Solidtype.Arity.adapted "join" + (fun (f : string -> string -> string) -> fun[@u] a b -> f a b) + Joined.component +end + let make () = let count, set_count = S.create_signal 0 in
      @@ -27,4 +43,10 @@ let make () =

      (Jsx.int (S.get count))

      (fun s -> (Jsx.string (S.get s.label))) +
        + + (fun item _ ->
      • (Jsx.string item)
      • ) +
        +
      + a ^ b) />
      diff --git a/test/kobalte/combobox_test.mlx b/test/kobalte/combobox_test.mlx index c3efd906..abc71543 100644 --- a/test/kobalte/combobox_test.mlx +++ b/test/kobalte/combobox_test.mlx @@ -6,8 +6,9 @@ module Node = K.Types.CollectionNode module Item_props = K.Types.ComboboxBaseItemComponentProps module Jsx = Solidtype.Jsx -let island () = +let island ?on_open_change () = "Pick a fruit") @@ -50,7 +51,10 @@ let active input = | Some option -> H.text option) let () = - H.alike "Combobox" ~island ~twin (fun user -> + H.alike "Combobox" + ~island:(fun () -> island ()) + ~twin + (fun user -> let input = H.by_role_named "combobox" (H.query ~name:"Fruit" ()) in H.expect_equal ~what:"the input, closed" "false" (expanded input); H.expect_equal ~what:"the input's completion" "list" @@ -102,3 +106,29 @@ let () = H.eventually (fun () -> H.expect_equal ~what:"the input, an option clicked" "false" (expanded input))) + +(* A handler of two arguments that takes the first, works, and gives a + function of the second: OCaml types it as it types [fun a b -> ...], and + Kobalte calls it with both at once. *) +let heard = ref "" + +let staged_opened is_open = + let said = if is_open then "open" else "closed" in + fun (_ : [ `focus | `input | `manual ] option) -> heard := said + +let () = + Jest.describe "Combobox's handler of two arguments" (fun () -> + Jest.afterEachPromise H.released; + Jest.afterEach H.cleanup; + Jest.testPromise "is called, though it takes them one at a time" + (fun () -> + H.render (fun () -> island ~on_open_change:staged_opened ()); + let user = H.setup () in + let input = H.by_role_named "combobox" (H.query ~name:"Fruit" ()) in + let* () = H.click user input in + let* () = H.keyboard user "b" in + let* () = + H.eventually (fun () -> + H.expect_equal ~what:"what the handler heard" "open" !heard) + in + Js.Promise.resolve Jest.Expect.(expect !heard |> toBe "open"))) diff --git a/test/kobalte/meter_test.mlx b/test/kobalte/meter_test.mlx index 8357c4aa..b6b70c4c 100644 --- a/test/kobalte/meter_test.mlx +++ b/test/kobalte/meter_test.mlx @@ -1,7 +1,7 @@ module H = Harness module K = Solidtype_kobalte module Meter = K.Meter -module Params = K.Types.GetValueLabelParams +module Params = K.Types.Meter_GetValueLabelParams let island () = ]: the ppx diff --git a/test/ppx/forms.mlx b/test/ppx/forms.mlx index 1c1ae8f8..0ab83b4c 100644 --- a/test/ppx/forms.mlx +++ b/test/ppx/forms.mlx @@ -153,3 +153,12 @@ end let drawn_as =