inertiax-core 11.0.18 → 11.0.21
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/dist/index.js +42 -75
- package/dist/index.js.map +2 -2
- package/package.json +1 -1
- package/types/history.d.ts +6 -10
- package/types/scroll.d.ts +2 -2
package/package.json
CHANGED
package/types/history.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Page, ScrollRegion } from './types';
|
|
2
2
|
type FrameHistoryState = {
|
|
3
3
|
page: Page | ArrayBuffer;
|
|
4
|
-
scrollRegions?: ScrollRegion[];
|
|
5
|
-
documentScrollPosition?: ScrollRegion;
|
|
6
4
|
};
|
|
7
5
|
type InertiaHistoryState = {
|
|
8
6
|
frames: Record<string, FrameHistoryState>;
|
|
7
|
+
scrollRegions?: ScrollRegion[];
|
|
8
|
+
documentScrollPosition?: ScrollRegion;
|
|
9
9
|
};
|
|
10
10
|
declare class History {
|
|
11
11
|
rememberedState: "rememberedState";
|
|
@@ -27,10 +27,10 @@ declare class History {
|
|
|
27
27
|
processQueue(): Promise<void>;
|
|
28
28
|
decrypt(page?: Page | ArrayBuffer | null, frameId?: string): Promise<Page>;
|
|
29
29
|
protected decryptPageData(pageData: ArrayBuffer | Page | null): Promise<Page | null>;
|
|
30
|
-
saveScrollPositions(scrollRegions: ScrollRegion[]
|
|
31
|
-
saveDocumentScrollPosition(scrollRegion: ScrollRegion
|
|
32
|
-
getScrollRegions(
|
|
33
|
-
getDocumentScrollPosition(
|
|
30
|
+
saveScrollPositions(scrollRegions: ScrollRegion[]): void;
|
|
31
|
+
saveDocumentScrollPosition(scrollRegion: ScrollRegion): void;
|
|
32
|
+
getScrollRegions(): ScrollRegion[];
|
|
33
|
+
getDocumentScrollPosition(): ScrollRegion;
|
|
34
34
|
replaceState(page: Page, cb?: (() => void) | null, frameId?: string, browserUrl?: string): void;
|
|
35
35
|
protected isHistoryThrottleError(error: unknown): error is Error & {
|
|
36
36
|
name: 'SecurityError';
|
|
@@ -41,13 +41,9 @@ declare class History {
|
|
|
41
41
|
protected withThrottleProtection<T = void>(cb: () => T): Promise<T | undefined>;
|
|
42
42
|
protected doReplaceState(data: {
|
|
43
43
|
page: Page | ArrayBuffer;
|
|
44
|
-
scrollRegions?: ScrollRegion[];
|
|
45
|
-
documentScrollPosition?: ScrollRegion;
|
|
46
44
|
}, url?: string, frameId?: string): Promise<void>;
|
|
47
45
|
protected doPushState(data: {
|
|
48
46
|
page: Page | ArrayBuffer;
|
|
49
|
-
scrollRegions?: ScrollRegion[];
|
|
50
|
-
documentScrollPosition?: ScrollRegion;
|
|
51
47
|
}, url: string, frameId?: string): Promise<void>;
|
|
52
48
|
getState<T>(key: keyof Page, defaultValue?: T, frameId?: string): any;
|
|
53
49
|
deleteState(key: keyof Page, frameId?: string): void;
|
package/types/scroll.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ScrollRegion } from './types';
|
|
2
2
|
export declare class Scroll {
|
|
3
|
-
static save(
|
|
3
|
+
static save(): void;
|
|
4
4
|
static getScrollRegions(): ScrollRegion[];
|
|
5
5
|
protected static regions(): NodeListOf<Element>;
|
|
6
6
|
/**
|
|
@@ -15,5 +15,5 @@ export declare class Scroll {
|
|
|
15
15
|
static restoreScrollRegions(scrollRegions: ScrollRegion[]): void;
|
|
16
16
|
static restoreDocument(frameId?: string): void;
|
|
17
17
|
static onScroll(event: Event): void;
|
|
18
|
-
static onWindowScroll(
|
|
18
|
+
static onWindowScroll(): void;
|
|
19
19
|
}
|