This alias should express the main concept of a Hook: The encapsulated effect; that is applying some function with a payload P onto a receiver C (often some Tag). Optionally you can pass in an also-expression that is called on the Result R.
An Exporter is a simple container for capturing some return value. Its main purpose is to reduce boilerplate code if the value to be returned is created within some nested structure and would therefor need some preliminary defined var outside the structure and some explicit return of the value afterwards.
This class implements the concept of some data holder, that can be configured after construction by some client code. A property is usually used within some kind of component, which needs to hold some specific data portion in order to work, but to delegate the setup of the data to the client code.
This hook abstraction simplifies a Tag creating Hook by offering static invoke methods, which already deal with constructing the value field, so that an abstract renderTag method is called. This covers the typical use case where a client only wants to configure exactly one value (flow or static) and the hook should use this to render some artifact.
This specialized payload alias should express the common needed parameters when the Effect render some Tag, so it uses a Triple to group a String for the classes, a String for the Tag's id and the unspecific payload P itself.
Always use this special payload type, if the Hook creates some Tag!
This hook method applies a Hook's encapsulated behaviour to the calling context with a specific payload TagPayload, which is tailored to Tag creation, as it offers parameters for the id and a styling parameter classes on top to the generic payload P.
Sets focus on the Tag it is called on. Continues to try setting the focus until it was successful or the maximum number of retries is reached. Use this function for example to set the focus on an element that just becomes visible.
This function enables a so called focus-trap. This enforces the specific behaviour within the receiver Tag, that switching the focus is only possible on elements that are inside the receiver. No other focusable elements outside the enclosing container will get the focus.
This variant of trapFocusInMountpoint allows to reactively trap a focus based on a conditional Flow of Boolean. This should be applied in all situations, where the DOM subtree of the trap is not inside a mount-point, but only activated or disabled by some Flow.