@inertiajs/core 2.2.15 → 2.2.16
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.esm.js +85 -27
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +85 -27
- package/dist/index.js.map +3 -3
- package/package.json +4 -4
- package/types/domUtils.d.ts +2 -1
- package/types/files.d.ts +1 -0
- package/types/formData.d.ts +2 -2
- package/types/types.d.ts +2 -1
- package/types/url.d.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inertiajs/core",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.16",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "A framework for creating server-driven single page apps.",
|
|
6
6
|
"contributors": [
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@types/lodash-es": "^4.17.12",
|
|
48
|
-
"axios": "^1.
|
|
48
|
+
"axios": "^1.13.2",
|
|
49
49
|
"lodash-es": "^4.17.21",
|
|
50
50
|
"qs": "^6.14.0"
|
|
51
51
|
},
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"@types/nprogress": "^0.2.3",
|
|
56
56
|
"@types/qs": "^6.14.0",
|
|
57
57
|
"es-check": "^9.4.4",
|
|
58
|
-
"esbuild": "^0.25.
|
|
59
|
-
"esbuild-node-externals": "^1.
|
|
58
|
+
"esbuild": "^0.25.12",
|
|
59
|
+
"esbuild-node-externals": "^1.19.1",
|
|
60
60
|
"typescript": "^5.9.3"
|
|
61
61
|
},
|
|
62
62
|
"scripts": {
|
package/types/domUtils.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
export declare const getScrollableParent: (element: HTMLElement | null) => HTMLElement | null;
|
|
2
|
-
export declare const getElementsInViewportFromCollection: (
|
|
2
|
+
export declare const getElementsInViewportFromCollection: (elements: HTMLElement[], referenceElement?: HTMLElement) => HTMLElement[];
|
|
3
|
+
export declare const requestAnimationFrame: (cb: () => void, times?: number) => void;
|
package/types/files.d.ts
CHANGED
package/types/formData.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { FormDataConvertible } from './types';
|
|
1
|
+
import type { FormDataConvertible, QueryStringArrayFormatOption } from './types';
|
|
2
2
|
export declare const isFormData: (value: any) => value is FormData;
|
|
3
|
-
export declare function objectToFormData(source: Record<string, FormDataConvertible>, form?: FormData, parentKey?: string | null): FormData;
|
|
3
|
+
export declare function objectToFormData(source: Record<string, FormDataConvertible>, form?: FormData, parentKey?: string | null, queryStringArrayFormat?: QueryStringArrayFormatOption): FormData;
|
package/types/types.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export type PageHandler<ComponentType = Component> = ({ component, page, preserv
|
|
|
121
121
|
preserveState: boolean;
|
|
122
122
|
}) => Promise<unknown>;
|
|
123
123
|
export type PreserveStateOption = boolean | 'errors' | ((page: Page) => boolean);
|
|
124
|
+
export type QueryStringArrayFormatOption = 'indices' | 'brackets';
|
|
124
125
|
export type Progress = AxiosProgressEvent;
|
|
125
126
|
export type LocationVisit = {
|
|
126
127
|
preserveScroll: boolean;
|
|
@@ -140,7 +141,7 @@ export type Visit<T extends RequestPayload = RequestPayload> = {
|
|
|
140
141
|
headers: Record<string, string>;
|
|
141
142
|
errorBag: string | null;
|
|
142
143
|
forceFormData: boolean;
|
|
143
|
-
queryStringArrayFormat:
|
|
144
|
+
queryStringArrayFormat: QueryStringArrayFormatOption;
|
|
144
145
|
async: boolean;
|
|
145
146
|
showProgress: boolean;
|
|
146
147
|
prefetch: boolean;
|
package/types/url.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { FormDataConvertible, Method, RequestPayload, UrlMethodPair, VisitOptions } from './types';
|
|
1
|
+
import type { FormDataConvertible, Method, QueryStringArrayFormatOption, RequestPayload, UrlMethodPair, VisitOptions } from './types';
|
|
2
2
|
export declare function hrefToUrl(href: string | URL): URL;
|
|
3
3
|
export declare const transformUrlAndData: (href: string | URL, data: RequestPayload, method: Method, forceFormData: VisitOptions["forceFormData"], queryStringArrayFormat: VisitOptions["queryStringArrayFormat"]) => [URL, RequestPayload];
|
|
4
4
|
type MergeDataIntoQueryStringDataReturnType<T extends RequestPayload> = T extends Record<string, FormDataConvertible> ? Record<string, FormDataConvertible> : RequestPayload;
|
|
5
|
-
export declare function mergeDataIntoQueryString<T extends RequestPayload>(method: Method, href: URL | string, data: T, qsArrayFormat?:
|
|
5
|
+
export declare function mergeDataIntoQueryString<T extends RequestPayload>(method: Method, href: URL | string, data: T, qsArrayFormat?: QueryStringArrayFormatOption): [string, MergeDataIntoQueryStringDataReturnType<T>];
|
|
6
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;
|