Skip to content

Commit 1d01b94

Browse files
committed
prep v2.0.5
1 parent c091b95 commit 1d01b94

55 files changed

Lines changed: 9690 additions & 5240 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/htmx.amd.js

Lines changed: 481 additions & 434 deletions
Large diffs are not rendered by default.

dist/htmx.cjs.js

Lines changed: 481 additions & 434 deletions
Large diffs are not rendered by default.

dist/htmx.esm.d.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ export type SwapOptions = {
88
contextElement?: Element;
99
afterSwapCallback?: swapCallback;
1010
afterSettleCallback?: swapCallback;
11+
beforeSwapCallback?: swapCallback;
12+
title?: string;
13+
historyRequest?: boolean;
1114
};
1215
export type swapCallback = () => any;
1316
export type HtmxSwapStyle = "innerHTML" | "outerHTML" | "beforebegin" | "afterbegin" | "beforeend" | "afterend" | "delete" | "none" | string;
@@ -18,7 +21,7 @@ export type HtmxSwapSpecification = {
1821
transition?: boolean;
1922
ignoreTitle?: boolean;
2023
head?: string;
21-
scroll?: "top" | "bottom";
24+
scroll?: "top" | "bottom" | number;
2225
scrollTarget?: string;
2326
show?: string;
2427
showTarget?: string;
@@ -72,6 +75,7 @@ export type HtmxRequestConfig = {
7275
*/
7376
unfilteredParameters: any;
7477
headers: HtmxHeaderSpecification;
78+
elt: Element;
7579
target: Element;
7680
verb: HttpVerb;
7781
errors: HtmxElementValidationError[];
@@ -135,7 +139,7 @@ export type HtmxSettleInfo = {
135139
};
136140
export type HtmxExtension = {
137141
init: (api: any) => void;
138-
onEvent: (name: string, event: Event | CustomEvent) => boolean;
142+
onEvent: (name: string, event: CustomEvent) => boolean;
139143
transformResponse: (text: string, xhr: XMLHttpRequest, elt: Element) => string;
140144
isInlineSwap: (swapStyle: HtmxSwapStyle) => boolean;
141145
handleSwap: (swapStyle: HtmxSwapStyle, target: Node, fragment: Node, settleInfo: HtmxSettleInfo) => boolean | Node[];
@@ -199,8 +203,10 @@ declare namespace htmx {
199203
let disableInheritance: boolean;
200204
let responseHandling: HtmxResponseHandlingConfig[];
201205
let allowNestedOobSwaps: boolean;
206+
let historyRestoreAsHxRequest: boolean;
202207
}
203208
let parseInterval: (str: string) => number | undefined;
209+
let location: Location;
204210
let _: (str: string) => any;
205211
let version: string;
206212
}

0 commit comments

Comments
 (0)