@inertiajs/core 2.2.6 → 2.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inertiajs/core",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "license": "MIT",
5
5
  "description": "A framework for creating server-driven single page apps.",
6
6
  "contributors": [
@@ -21,12 +21,12 @@ declare class History {
21
21
  page: Page | ArrayBuffer;
22
22
  scrollRegions?: ScrollRegion[];
23
23
  documentScrollPosition?: ScrollRegion;
24
- }, url?: string): void;
24
+ }, url?: string): Promise<void>;
25
25
  protected doPushState(data: {
26
26
  page: Page | ArrayBuffer;
27
27
  scrollRegions?: ScrollRegion[];
28
28
  documentScrollPosition?: ScrollRegion;
29
- }, url: string): void;
29
+ }, url: string): Promise<void>;
30
30
  getState<T>(key: keyof Page, defaultValue?: T): any;
31
31
  deleteState(key: keyof Page): void;
32
32
  clearInitialState(key: keyof Page): void;
package/types/index.d.ts CHANGED
@@ -8,6 +8,6 @@ export { shouldIntercept, shouldNavigate } from './navigationEvents';
8
8
  export { hide as hideProgress, progress, reveal as revealProgress, default as setupProgress } from './progress';
9
9
  export { resetFormFields } from './resetFormFields';
10
10
  export * from './types';
11
- export { hrefToUrl, isUrlMethodPair, mergeDataIntoQueryString, urlWithoutHash } from './url';
11
+ export { hrefToUrl, isUrlMethodPair, mergeDataIntoQueryString, urlHasProtocol, urlToString, urlWithoutHash, } from './url';
12
12
  export { type Router };
13
13
  export declare const router: Router;
package/types/scroll.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare class Scroll {
4
4
  protected static regions(): NodeListOf<Element>;
5
5
  static reset(): void;
6
6
  static restore(scrollRegions: ScrollRegion[]): void;
7
+ static restoreScrollRegions(scrollRegions: ScrollRegion[]): void;
7
8
  static restoreDocument(): void;
8
9
  static onScroll(event: Event): void;
9
10
  static onWindowScroll(): void;
package/types/url.d.ts CHANGED
@@ -7,4 +7,6 @@ export declare function urlWithoutHash(url: URL | Location): URL;
7
7
  export declare const setHashIfSameUrl: (originUrl: URL | Location, destinationUrl: URL | Location) => void;
8
8
  export declare const isSameUrlWithoutHash: (url1: URL | Location, url2: URL | Location) => boolean;
9
9
  export declare function isUrlMethodPair(href: unknown): href is UrlMethodPair;
10
+ export declare function urlHasProtocol(url: string): boolean;
11
+ export declare function urlToString(url: URL | string, absolute: boolean): string;
10
12
  export {};