htmx.org 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/ext/response-targets.js +1 -1
- package/dist/htmx.amd.js +485 -436
- package/dist/htmx.cjs.js +485 -436
- package/dist/htmx.esm.d.ts +8 -2
- package/dist/htmx.esm.js +485 -436
- package/dist/htmx.js +485 -436
- package/dist/htmx.min.js +1 -1
- package/dist/htmx.min.js.gz +0 -0
- package/editors/jetbrains/htmx.web-types.json +398 -85
- package/package.json +32 -15
package/dist/htmx.esm.d.ts
CHANGED
|
@@ -8,6 +8,9 @@ export type SwapOptions = {
|
|
|
8
8
|
contextElement?: Element;
|
|
9
9
|
afterSwapCallback?: swapCallback;
|
|
10
10
|
afterSettleCallback?: swapCallback;
|
|
11
|
+
beforeSwapCallback?: swapCallback;
|
|
12
|
+
title?: string;
|
|
13
|
+
historyRequest?: boolean;
|
|
11
14
|
};
|
|
12
15
|
export type swapCallback = () => any;
|
|
13
16
|
export type HtmxSwapStyle = "innerHTML" | "outerHTML" | "beforebegin" | "afterbegin" | "beforeend" | "afterend" | "delete" | "none" | string;
|
|
@@ -18,7 +21,7 @@ export type HtmxSwapSpecification = {
|
|
|
18
21
|
transition?: boolean;
|
|
19
22
|
ignoreTitle?: boolean;
|
|
20
23
|
head?: string;
|
|
21
|
-
scroll?: "top" | "bottom";
|
|
24
|
+
scroll?: "top" | "bottom" | number;
|
|
22
25
|
scrollTarget?: string;
|
|
23
26
|
show?: string;
|
|
24
27
|
showTarget?: string;
|
|
@@ -72,6 +75,7 @@ export type HtmxRequestConfig = {
|
|
|
72
75
|
*/
|
|
73
76
|
unfilteredParameters: any;
|
|
74
77
|
headers: HtmxHeaderSpecification;
|
|
78
|
+
elt: Element;
|
|
75
79
|
target: Element;
|
|
76
80
|
verb: HttpVerb;
|
|
77
81
|
errors: HtmxElementValidationError[];
|
|
@@ -135,7 +139,7 @@ export type HtmxSettleInfo = {
|
|
|
135
139
|
};
|
|
136
140
|
export type HtmxExtension = {
|
|
137
141
|
init: (api: any) => void;
|
|
138
|
-
onEvent: (name: string, event:
|
|
142
|
+
onEvent: (name: string, event: CustomEvent) => boolean;
|
|
139
143
|
transformResponse: (text: string, xhr: XMLHttpRequest, elt: Element) => string;
|
|
140
144
|
isInlineSwap: (swapStyle: HtmxSwapStyle) => boolean;
|
|
141
145
|
handleSwap: (swapStyle: HtmxSwapStyle, target: Node, fragment: Node, settleInfo: HtmxSettleInfo) => boolean | Node[];
|
|
@@ -199,8 +203,10 @@ declare namespace htmx {
|
|
|
199
203
|
let disableInheritance: boolean;
|
|
200
204
|
let responseHandling: HtmxResponseHandlingConfig[];
|
|
201
205
|
let allowNestedOobSwaps: boolean;
|
|
206
|
+
let historyRestoreAsHxRequest: boolean;
|
|
202
207
|
}
|
|
203
208
|
let parseInterval: (str: string) => number | undefined;
|
|
209
|
+
let location: Location;
|
|
204
210
|
let _: (str: string) => any;
|
|
205
211
|
let version: string;
|
|
206
212
|
}
|