@inertiajs/core 2.2.15 → 2.2.17

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.15",
3
+ "version": "2.2.17",
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.12.2",
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.11",
59
- "esbuild-node-externals": "^1.18.0",
58
+ "esbuild": "^0.25.12",
59
+ "esbuild-node-externals": "^1.19.1",
60
60
  "typescript": "^5.9.3"
61
61
  },
62
62
  "scripts": {
@@ -1,2 +1,3 @@
1
1
  export declare const getScrollableParent: (element: HTMLElement | null) => HTMLElement | null;
2
- export declare const getElementsInViewportFromCollection: (referenceElement: HTMLElement, elements: HTMLElement[]) => HTMLElement[];
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
@@ -1,2 +1,3 @@
1
1
  import { FormDataConvertible, RequestPayload } from './types';
2
+ export declare const isFile: (value: unknown) => boolean;
2
3
  export declare function hasFiles(data: RequestPayload | FormDataConvertible): boolean;
@@ -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: 'indices' | 'brackets';
144
+ queryStringArrayFormat: QueryStringArrayFormatOption;
144
145
  async: boolean;
145
146
  showProgress: boolean;
146
147
  prefetch: boolean;
@@ -345,6 +346,7 @@ export type PrefetchOptions = {
345
346
  export type InertiaAppConfig = {
346
347
  form: {
347
348
  recentlySuccessfulDuration: number;
349
+ forceIndicesArrayFormatInFormData: boolean;
348
350
  };
349
351
  future: {
350
352
  preserveEqualProps: 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?: 'indices' | 'brackets'): [string, MergeDataIntoQueryStringDataReturnType<T>];
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;