package virtual_dom
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=812711b4d5ce634a413580cd7096482de8d71abec9ae37bb01f7c0dcec2968ec
doc/CHANGES.html
Release v0.17.0
css_gen
- Generalize
css_global_valuesto be polymorphic with a new variant for CSS variables. - Add
equalandsexp_grammarderivations to various types includingcss_global_values,Color.RGBA.t,Color.HSLA, andColor.t. - Introduce
LCHAmodule with acreatefunction for LCH color representation. - Add
LCHAtype toColor.tvariant. - Update
Color.tvariant to supportcss_global_valueswith typet. - Modify
Lengthtype to include a parameterizedcss_global_valuestype. - Add
equalderivation to thettype in bothCss_genmodule andStable.V1module.
- Generalize
vdom_input_widgets
Updates to
Checklistmodule:- Renamed
extra_attrstoextra_container_attrsin bothChecklist.of_valuesandChecklist.of_enumfunctions - Added
extra_checkbox_attrsparameter to bothChecklist.of_valuesandChecklist.of_enumfunctions for customization based on checkbox state
- Renamed
Updates to
Entrymodule:- Added an optional
keyparameter to theEntryfunction - Introduced
allow_updates_when_focusedparameter with optionsAlwaysorNeverto control updates when focused
- Added an optional
Updates to
Radio_buttonsmodule:- Renamed
extra_attrstoextra_container_attrsin bothRadio_buttons.of_valuesandRadio_buttons.of_values_horizontalfunctions - Added
extra_button_attrsparameter to bothRadio_buttons.of_valuesandRadio_buttons.of_values_horizontalfunctions for customization based on button checked state
- Renamed
Vdom.Global_listeners.beforeunloadfunction now supports a new effect optionCustom_best_effortThis option may or may not execute to completion upon tab close in ChromeVdom.Node
Add new variant and functions:
Node.ttype now includes aFragmentvariant to support lists of nodes.Node.fragmentfunction added to create a node from a list of nodes.
Extend
Nodemodule with new node creator functions:Node.bNode.dialogNode.smallNode.kbdNode.form
Release v0.16.0
The most significant change in this release is that most functions that create Vdom.Node.t have changed from taking a single attribute via a ?attr argument to now take a list of attributes via the ?attrs argument. This change was made to reduce the boilerplate at each callsite of invoking Vdom.Attr.many to add more than one attribute.
A straightforward way to upgrade code to the new interface, without changing behavior, is to rename ~attr to ~attrs and wrap the argument into a singlton list. Additionally, in the case where the argument was an immediate invocation of Vdom.Attr.many, you can just remove that call and pass the list directly.
We've applied this interface change to the main virtual_dom library, as well as vdom_layout. However, we took a different approach with vdom_input_widgets, since functions in that module already take a list of attributes, but they do not merge the attributes in those lists. We've added a ?merge_behavior argument to those functions. To completely preserve behavior, you should pass Legacy_dont_merge; otherwise, the default Merge behavior will attempt to concatenate any styles or lists of classes in the attributes.
More minor changes include:
css_genchanges:- Added
text_alignandcontent_alignmenttypes. - Added
line_height,row_gap, andcolumn_gapfunctions. flex_containernow accepts`Defaultfor the?wrapand?directionarguments. It also now accepts some new arguments:?align_content,?row_gap, and?column_gap.
- Added
- Added new
html5_historylibrary, which provides a layer on top of the browser's history API. - Added
Vdom_keyboard.Keyboard_event_handler.get_action. vdom_input_widgetschanges:- The
Dropdownmodule now accepts?extra_option_attrsand?placeholderarguments. - The
on_toggleargument toCheckbox.simpleis now a plain effect instead of a function, since the function was expected to be pure anyway. - Renamed
Radio_buttons.Stylemodule toSelectable_style. - The
Checklistmodule now accepts an argumentSelectable_style.targument. - Added
Entry.password.
- The
virtual_domchanges:- Added more attributes creation functions to the
Attrmodule. - Added more event listener functions to the
Attr.Global_listenersmodule. - Added
Node.Widget.to_vdom_for_testing. - Added
Lazyconstructor toNode.t. - Added more node-creation functions to the
Nodemodule. - Added
Node.lazy_, a function that allows for writing code to compute virtual-dom nodes that only runs if necessary. Node.inputno longer accepts a list of child nodes. Users must either stop passing the list, or switch to using the behavior-preservingNode.input_deprecatedfunction.
- Added more attributes creation functions to the
- Added
Virtual_dom_svg.Attr.stroke_dashoffset.