bonsai
-
bonsai
-
-
bonsai.bench
-
bonsai.example_chat_open_source_native
-
bonsai.example_chat_open_source_native_common
-
-
bonsai.extra
-
-
bonsai.focus_ring
-
bonsai.protocol
-
bonsai.tailwind_colors
-
bonsai.test
-
bonsai.test.dot
-
bonsai.web_test
-
bonsai.web_ui_common_components
-
bonsai.web_ui_drag_and_drop
-
bonsai.web_ui_element_size_hooks
-
bonsai.web_ui_file
-
bonsai.web_ui_file_from_web_file
-
bonsai.web_ui_form
-
-
bonsai.web_ui_freeform_multiselect
-
bonsai.web_ui_multi_select
-
-
bonsai.web_ui_query_box
-
bonsai.web_ui_reorderable_list
-
bonsai.web_ui_typeahead
Library
Module
Module type
Parameter
Class
Class type
val apply_action :
( 'model, 'action, _ ) t ->
( 'model, 'action ) Bonsai__Apply_action.t
Applies the provided action to the model in force at the time that the snapshot was created.
The application of the action is allowed to engage in side-effecting computations, including calling the schedule_event
function to request that further actions be enqueued to be applied to the model.
The result of a component is the primary value computed by the component in question. At the top level of a UI, this is generally a representation of the view, but it's often useful to compute other kinds of results in inner components.
val lifecycle :
( _, _, _ ) t ->
( Bonsai__Path.Map.Key.t,
Bonsai__Lifecycle.t,
Bonsai__Path.Map.Key.comparator_witness )
Core.Map_intf.Map.t
Ui_incr.t
option
The lifecycle component of a snapshot contains an optional map of all the activation, deactivation, and after_display callbacks.
val lifecycle_or_empty :
( _, _, _ ) t ->
( Bonsai__Path.Map.Key.t,
Bonsai__Lifecycle.t,
Bonsai__Path.Map.Key.comparator_witness )
Core.Map_intf.Map.t
Ui_incr.t
val create :
apply_action:( 'model, 'action ) Bonsai__Apply_action.t ->
lifecycle:
( Bonsai__Path.Map.Key.t,
Bonsai__Lifecycle.t,
Bonsai__Path.Map.Key.comparator_witness )
Core.Map_intf.Map.t
Ui_incr.t
option ->
result:'result Ui_incr.t ->
( 'model, 'action, 'result ) t
Creates a new snapshot. Note that the apply_action
provided here should apply the action in question to the model in force at the time create
is called.
val attribute_positions :
Core.Source_code_position.t option ->
( _, _, _ ) t ->
unit