-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Use htmx with various haskell libraries -- -- Please see the README on GitHub at -- https://github.com/JonathanLorimer/htmx#readme @package htmx @version 0.0.0.1 -- | This module defines an attribute that allows you to include additional -- values in a request -- https://github.com/bigskysoftware/htmx-extensions/blob/main/src/include-vals/README.md module Htmx.Lucid.Extension.IncludeVals -- | -- https://github.com/bigskysoftware/htmx-extensions/blob/main/src/include-vals/README.md -- The value of this attribute is one or more name/value pairs, which -- will be evaluated as the fields in a javascript object literal. i.e. -- "included:true, computed: computeValue()" includeVals_ :: Text -> Attribute -- | This module defines a typeclass that doesn't have the historical -- baggage or connotations of other text serialization typeclasses (like -- Show or Display). The semantics of this class are supposed to -- be HTMX specific, i.e. serializing attribute values module Htmx.Render -- | A typeclass for rendering domain types into attribute values class Render a render :: Render a => a -> Text -- | This module defines a sum type that represents the "included" HTMX -- extensions https://htmx.org/extensions/#included module Htmx.Extension -- | https://htmx.org/extensions/ -- -- htmx includes a set of extensions out of the box that address common -- developer needs. These extensions are tested against htmx in each -- distribution. -- -- You can find the source for the bundled extensions at -- https://unpkg.com/ browsehtmx.org@1.9.12distext. -- You will need to include the javascript file for the extension and -- then install it using the hx-ext attributes. See the individual -- extension documentation for more details. data HtmxExtension -- | https://htmx.org/extensions/ajax-header/ includes the -- commonly-used X-Requested-With header that identifies ajax requests in -- many backend frameworks AjaxHeader :: HtmxExtension -- | https://htmx.org/extensions/alpine-morph/ an extension for -- using the Alpine.js morph plugin as the swapping mechanism in htmx. AlpineMorph :: HtmxExtension -- | https://htmx.org/extensions/class-tools/ an extension for -- manipulating timed addition and removal of classes on HTML elements ClassTools :: HtmxExtension -- | https://htmx.org/extensions/client-side-templates/ support for -- client side template processing of JSON/XML responses ClientSideTemplates :: HtmxExtension -- | https://htmx.org/extensions/debug/ an extension for debugging -- of a particular element using htmx Debug :: HtmxExtension -- | https://htmx.org/extensions/event-header/ includes a JSON -- serialized version of the triggering event, if any EventHeader :: HtmxExtension -- | https://htmx.org/extensions/head-support/ support for merging -- the head tag from responses into the existing documents head HeadSupport :: HtmxExtension -- | https://htmx.org/extensions/include-vals/ allows you to include -- additional values in a request IncludeVals :: HtmxExtension -- | https://htmx.org/extensions/json-enc/ use JSON encoding in the -- body of requests, rather than the default x-www-form-urlencoded JsonEnc :: HtmxExtension -- | https://htmx.org/extensions/idiomorph/ an extension for using -- the idiomorph morphing algorithm as a swapping mechanism Idiomorph :: HtmxExtension -- | https://htmx.org/extensions/loding-states/ allows you to -- disable inputs, add and remove CSS classes to any element while a -- request is in-flight. LoadingStates :: HtmxExtension -- | https://htmx.org/extensions/method-override/ use the -- X-HTTP-Method-Override header for non-GET and POST requests MethodOverride :: HtmxExtension -- | https://htmx.org/extensions/morphdom-swap/ an extension for -- using the morphdom library as the swapping mechanism in htmx. MorphdomSwap :: HtmxExtension -- | https://htmx.org/extensions/multi-swap/ allows to swap multiple -- elements with different swap methods MultiSwap :: HtmxExtension -- | https://htmx.org/extensions/path-deps/ an extension for -- expressing path-based dependencies similar to intercoolerjs PathDeps :: HtmxExtension -- | https://htmx.org/extensions/preload/ preloads selected href and -- hx-get targets based on rules you control. Preload :: HtmxExtension -- | https://htmx.org/extensions/remove-me/ allows you to remove an -- element after a given amount of time RemoveMe :: HtmxExtension -- | https://htmx.org/extensions/response-targets/ allows to specify -- different target elements to be swapped when different HTTP response -- codes are received ResponseTargets :: HtmxExtension -- | https://htmx.org/extensions/restored/ allows you to trigger -- events when the back button has been pressed Restored :: HtmxExtension -- | https://htmx.org/extensions/server-sent-events/ uni-directional -- server push messaging via EventSource ServerSentEvents :: HtmxExtension -- | https://htmx.org/extensions/web-sockets/ bi-directional -- connection to WebSocket servers WebSockets :: HtmxExtension -- | https://htmx.org/extensions/path-params/ allows to use -- parameters for path variables instead of sending them in query or body PathParams :: HtmxExtension instance GHC.Show.Show Htmx.Extension.HtmxExtension instance GHC.Classes.Ord Htmx.Extension.HtmxExtension instance GHC.Classes.Eq Htmx.Extension.HtmxExtension instance Htmx.Render.Render Htmx.Extension.HtmxExtension -- | This module defines utilities for installing HTMX and HTMX extensions -- via the head tag in your html document -- https://htmx.org/docs/#installing module Htmx.Lucid.Head -- | Place in your head_ tag to use htmx attributes in your lucid -- template useHtmx :: Monad m => HtmlT m () -- | Choose the version of htmx to use using a 3-tuple representing -- semantic versioning useHtmxVersion :: Monad m => (Natural, Natural, Natural) -> HtmlT m () -- | Place in your template after useHtmx, but before where the -- extension is used via hxExt_ NOTE: This uses -- recommendedVersion as the version section of the URL useHtmxExtension :: Monad m => HtmxExtension -> HtmlT m () -- | Same as useHtmxExt but lets you choose the version url useHtmxExtensionV :: Monad m => (Natural, Natural, Natural) -> HtmxExtension -> HtmlT m () -- | A typesafe version of useHtmxExtension based on the "included" -- extensions that the htmx codebase is tested against NOTE: This uses -- recommendedVersion as the version section of the URL useHtmxExtensions :: Monad m => [HtmxExtension] -> HtmlT m () -- | Same as useHtmxExts but with a versioned url useHtmxExtensionsV :: Monad m => (Natural, Natural, Natural) -> [HtmxExtension] -> HtmlT m () -- | This is the recommended version of htmx for using this library -- (lucid-htmx). It is the version of the documentation that the -- implementation is based off of. recommendedVersion :: (Natural, Natural, Natural) htmxSrc :: Text htmxSrcWithSemVer :: (Natural, Natural, Natural) -> Text htmxExtSrc :: (Natural, Natural, Natural) -> Text -> Text -- | This module defines additional attributes that can be used to get -- additional behaviour -- https://htmx.org/reference/#attributes-additional module Htmx.Lucid.Extra -- | https://htmx.org/attributes/hx-boost/ add progressive -- enhancement for links and forms hxBoost_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-confirm/ shows a confirm() -- dialog before issuing a request hxConfirm_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-delete/ issues a DELETE to the -- specified URL hxDelete_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-disable/ disables htmx -- processing for the given node and any children nodes hxDisable_ :: Attribute -- | https://htmx.org/attributes/hx-disabled-elt/ adds the disabled -- attribute to the specified elements while a request is in flight hxDisabledElt_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-disinherit/ control and disable -- automatic attribute inheritance for child nodes hxDisinherit_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-encoding/ changes the request -- encoding type hxEncoding_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-ext/ extensions to use for this -- element hxExt_ :: Text -> Attribute -- | A typesafe version of hxExt_ that works with the "included" -- extensions that the htmx codebase is tested against hxExtension_ :: HtmxExtension -> Attribute -- | Include multiple extensions in one declaration hxExtensions_ :: [HtmxExtension] -> Attribute -- | https://htmx.org/attributes/hx-headers/ adds to the headers -- that will be submitted with the request hxHeaders_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-history/ prevent sensitive data -- being saved to the history cache hxHistory_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-history-elt/ the element to -- snapshot and restore during history navigation hxHistoryElt_ :: Attribute -- | https://htmx.org/attributes/hx-include/ include additional data -- in requests hxInclude_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-indicator/ the element to put -- the htmx-request class on during the request hxIndicator_ :: Text -> Attribute data ParamsFilter -- | Include all parameters (default) All :: ParamsFilter -- | Include no parameters None :: ParamsFilter -- | Include all except the list of parameter names Exclude :: [Text] -> ParamsFilter -- | Include all the list of parameter names Include :: [Text] -> ParamsFilter -- | https://htmx.org/attributes/hx-params/ filters the parameters -- that will be submitted with a request hxParams_ :: ParamsFilter -> Attribute -- | https://htmx.org/attributes/hx-patch/ issues a PATCH to the -- specified URL hxPatch_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-preserve/ specifies elements to -- keep unchanged between requests hxPreserve_ :: Attribute -- | https://htmx.org/attributes/hx-prompt/ shows a prompt() before -- submitting a request hxPrompt_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-put/ issues a PUT to the -- specified URL hxPut_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-replace-url/ replace the URL in -- the browser location bar hxReplaceUrl_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-request/ configures various -- aspects of the request hxRequest_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-sse/ has been moved to an -- extension. Documentation for older versions -- | Deprecated: Don't use hx-sse directly, please use the server sent -- events extension instead -- https://htmx.org/extensions/server-sent-events/ hxSse_ :: Text -> Attribute data SyncStrategy -- | drop (ignore) this request if an existing request is in flight (the -- default) SyncDrop :: SyncStrategy -- | drop (ignore) this request if an existing request is in flight, and, -- if that is not the case, abort this request if another request occurs -- while it is still in flight SyncAbort :: SyncStrategy -- | abort the current request, if any, and replace it with this request SyncReplace :: SyncStrategy -- | queue the first request to show up while a request is in flight SyncQueueFirst :: SyncStrategy -- | queue the last request to show up while a request is in flight SyncQueueLast :: SyncStrategy -- | queue all requests that show up while a request is in flight SyncQueueAll :: SyncStrategy -- | https://htmx.org/attributes/hx-sync/ control how requests made -- by different elements are synchronized hxSync_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-sync/ the same as hxSync_ -- but accepts a strongly typed htmx SyncStrategy hxSyncStrategy_ :: Text -> SyncStrategy -> Attribute -- | https://htmx.org/attributes/hx-validate/ force elements to -- validate themselves before a request hxValidate_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-vars/ adds values dynamically to -- the parameters to submit with the request (deprecated, please use -- hx-vals) hxVars_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-ws/ has been moved to an -- extension. Documentation for older versions -- | Deprecated: Don't use hx-ws directly, please use the web sockets -- extension instead -- https://htmx.org/extensions/server-sent-events/https://htmx.org/extensions/web-sockets/ hxWs_ :: Text -> Attribute -- | This module defines a type that represents events that originate from -- the HTMX library itself https://htmx.org/reference/#events module Htmx.Event -- | https://htmx.org/reference/#events A sum type that represents -- possible events originating from the HTMX javascript library data HtmxEvent -- | send this event to an element to abort a request Abort :: HtmxEvent -- | triggered after an AJAX request has completed processing a successful -- response AfterOnLoad :: HtmxEvent -- | triggered after htmx has initialized a node AfterProcessNode :: HtmxEvent -- | triggered after an AJAX request has completed AfterRequest :: HtmxEvent -- | triggered after the DOM has settled AfterSettle :: HtmxEvent -- | triggered after new content has been swapped in AfterSwap :: HtmxEvent -- | triggered before htmx disables an element or removes it from the DOM BeforeCleanupElement :: HtmxEvent -- | triggered before any response processing occurs BeforeOnLoad :: HtmxEvent -- | triggered before htmx initializes a node BeforeProcessNode :: HtmxEvent -- | triggered before an AJAX request is made BeforeRequest :: HtmxEvent -- | triggered before a swap is done, allows you to configure the swap BeforeSwap :: HtmxEvent -- | triggered just before an ajax request is sent BeforeSend :: HtmxEvent -- | triggered before the request, allows you to customize parameters, -- headers ConfigRequest :: HtmxEvent -- | triggered after a trigger occurs on an element, allows you to cancel -- (or delay) issuing the AJAX request Confirm :: HtmxEvent -- | triggered on an error during cache writing HistoryCacheError :: HtmxEvent -- | triggered on a cache miss in the history subsystem HistoryCacheMiss :: HtmxEvent -- | triggered on a unsuccessful remote retrieval HistoryCacheMissError :: HtmxEvent -- | triggered on a successful remote retrieval HistoryCacheMissLoad :: HtmxEvent -- | triggered when htmx handles a history restoration action HistoryRestore :: HtmxEvent -- | triggered before content is saved to the history cache BeforeHistorySave :: HtmxEvent -- | triggered when new content is added to the DOM Load :: HtmxEvent -- | triggered when an element refers to a SSE event in its trigger, but no -- parent SSE source has been defined NoSSESourceError :: HtmxEvent -- | triggered when an exception occurs during the onLoad handling in htmx OnLoadError :: HtmxEvent -- | triggered after an out of band element as been swapped in OobAfterSwap :: HtmxEvent -- | triggered before an out of band element swap is done, allows you to -- configure the swap OobBeforeSwap :: HtmxEvent -- | triggered when an out of band element does not have a matching ID in -- the current DOM OobErrorNoTarget :: HtmxEvent -- | triggered after a prompt is shown Prompt :: HtmxEvent -- | triggered after an url is pushed into history PushedIntoHistory :: HtmxEvent -- | triggered when an HTTP response error (non-200 or 300 response code) -- occurs ResponseError :: HtmxEvent -- | triggered when a network error prevents an HTTP request from happening SendError :: HtmxEvent -- | triggered when an error occurs with a SSE source SseError :: HtmxEvent -- | triggered when a SSE source is opened SseOpen :: HtmxEvent -- | triggered when an error occurs during the swap phase SwapError :: HtmxEvent -- | triggered when an invalid target is specified TargetError :: HtmxEvent -- | triggered when a request timeout occurs Timeout :: HtmxEvent -- | triggered before an element is validated ValidationValidate :: HtmxEvent -- | triggered when an element fails validation ValidationFailed :: HtmxEvent -- | triggered when a request is halted due to validation errors ValidationHalted :: HtmxEvent -- | triggered when an ajax request aborts XhrAbort :: HtmxEvent -- | triggered when an ajax request ends XhrLoadend :: HtmxEvent -- | triggered when an ajax request starts XhrLoadstart :: HtmxEvent -- | triggered periodically during an ajax request that supports progress -- events XhrProgress :: HtmxEvent instance Htmx.Render.Render Htmx.Event.HtmxEvent -- | https://htmx.org/reference/#request_headers module Htmx.Servant.RequestHeaders -- | indicates that the request is via an element using hx-boost type HXBoosted = Header "HX-Boosted" Bool -- | the current URL of the browser type HXCurrentURL = Header "HX-Current-URL" Text -- | “true” if the request is for history restoration after a miss in the -- local history cache type HXHistoryRestoreRequest = Header "HX-History-Restore-Request" Bool -- | the user response to an hx-prompt type HXPrompt a = Header "HX-Prompt" a -- | always “true” type HXRequest = Header "HX-Prompt" Bool -- | the id of the target element if it exists type HXTarget = Header "HX-Target" Text -- | the name of the triggered element if it exists type HXTriggerName = Header "HX-Trigger-Name" Text -- | the id of the triggered element if it exists type HXTrigger = Header "HX-Trigger" Text -- | Provides a type and utilities for the "swap style" for hx-swap -- https://htmx.org/attributes/hx-swap/ module Htmx.Swap -- | https://htmx.org/attributes/hx-swap/ The different styles that -- can be used for swapping in content. Usually defaults to -- InnerHTML data Swap -- | Replace the inner html of the target element InnerHTML :: Swap -- | Replace the entire target element with the response OuterHTML :: Swap -- | Replace the text content of the target element, without parsing the -- response as HTML TextContent :: Swap -- | Insert the response before the target element BeforeBegin :: Swap -- | Insert the response before the first child of the target element AfterBegin :: Swap -- | Insert the response after the last child of the target element BeforeEnd :: Swap -- | Insert the response after the target element AfterEnd :: Swap -- | Deletes the target element regardless of the response Delete :: Swap -- | Does not append content from response (out of band items will still be -- processed). None :: Swap instance Htmx.Render.Render Htmx.Swap.Swap instance Web.Internal.HttpApiData.ToHttpApiData Htmx.Swap.Swap instance Web.Internal.HttpApiData.FromHttpApiData Htmx.Swap.Swap -- | https://htmx.org/reference/#response_headers module Htmx.Servant.ResponseHeaders -- | allows you to do a client-side redirect that does not do a full page -- reload type HXLocation = Header "HX-Location" Text -- | pushes a new url into the history stack type HXPushURL = Header "HX-Push-Url" Text -- | can be used to do a client-side redirect to a new location type HXRedirect = Header "HX-Redirect" Text -- | if set to “true” the client-side will do a full refresh of the page type HXRefresh = Header "HX-Refresh" Bool -- | replaces the current URL in the location bar type HXReplaceUrl = Header "HX-Replace-Url" Bool -- | replaces the current URL in the location bar type HXReswap = Header "HX-Reswap" Swap -- | a CSS selector that updates the target of the content update to a -- different element on the page type HXRetarget = Header "HX-Retarget" Text -- | a CSS selector that allows you to choose which part of the response is -- used to be swapped in. Overrides an existing hx-select on the -- triggering element type HXReselect = Header "HX-Reselect" Text -- | allows you to trigger client-side events type HXTrigger = Header "HX-Trigger" Text -- | allows you to trigger client-side events after the settle step type HXTriggerAfterSettle = Header "HX-Trigger-After-Settle" Text -- | allows you to trigger client-side events after the swap stepallows you -- to trigger client-side events after the settle step type HXTriggerAfterSwap = Header "HX-Trigger-After-Swap" Text -- | This module defines the "core" 11 HTMX attributes -- https://htmx.org/reference/#attributes module Htmx.Lucid.Core -- | https://htmx.org/attributes/hx-get/ issues a GET to the -- specified URL hxGet_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-get/ issues a POST to the -- specified URL hxPost_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-push-url/ push a URL into the -- browser location bar to create history hxPushUrl_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-select/ select content to swap -- in from a response hxSelect_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-select-oob/ select content to -- swap in from a response, somewhere other than the target (out of band) hxSelectOob_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-swap/ controls how content will -- swap in (outerHTML, beforeend, afterend, …) hxSwap_ :: Text -> Attribute -- | Like hxSwap but takes a strongly typed swap style. This -- doesn't allow modifiers to be applied. hxSwapS_ :: Swap -> Attribute -- | https://htmx.org/attributes/hx-swap-oob/ mark element to swap -- in from a response (out of band) hxSwapOob_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-target/ specifies the target -- element to be swapped hxTarget_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-trigger/ specifies the event -- that triggers the request hxTrigger_ :: Text -> Attribute -- | https://htmx.org/attributes/hx-vals/ add values to submit with -- the request (JSON format) hxVals_ :: Text -> Attribute data OnEvent DomOnEvent :: Text -> OnEvent HtmxOnEvent :: HtmxEvent -> OnEvent -- | https://htmx.org/attributes/hx-on/ handle events with inline -- scripts on elements hxOn_ :: OnEvent -> Text -> Attribute -- | This module exports Lucid combinators that leverage the Servant -- Link type to guarantee that they are live URLs, therefore -- making the requests "safe". module Htmx.Lucid.Servant hxDeleteSafe_ :: Link -> Attribute hxGetSafe_ :: Link -> Attribute hxPatchSafe_ :: Link -> Attribute hxPostSafe_ :: Link -> Attribute hxPushUrlSafe_ :: Either Bool Link -> Attribute hxPutSafe_ :: Link -> Attribute