@inertiajs/core 3.0.0-beta.3 → 3.0.0-beta.4

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 CHANGED
@@ -1,8 +1,9 @@
1
1
  // src/router.ts
2
- import { cloneDeep as cloneDeep4, get as get7, isEqual as isEqual3, set as set5 } from "lodash-es";
2
+ import { cloneDeep as cloneDeep4, isEqual as isEqual3 } from "es-toolkit";
3
+ import { get as get7, set as set5 } from "es-toolkit/compat";
3
4
 
4
5
  // src/config.ts
5
- import { get, has, set } from "lodash-es";
6
+ import { get, has, set } from "es-toolkit/compat";
6
7
  var Config = class {
7
8
  constructor(defaults) {
8
9
  this.config = {};
@@ -43,7 +44,7 @@ var config = new Config({
43
44
  });
44
45
 
45
46
  // src/eventHandler.ts
46
- import { get as get4 } from "lodash-es";
47
+ import { get as get4 } from "es-toolkit/compat";
47
48
 
48
49
  // src/debounce.ts
49
50
  function debounce(fn, delay) {
@@ -99,10 +100,13 @@ var fireFlashEvent = (flash) => {
99
100
  };
100
101
 
101
102
  // src/history.ts
102
- import { cloneDeep as cloneDeep3, isEqual } from "lodash-es";
103
+ import { cloneDeep as cloneDeep3, isEqual } from "es-toolkit";
103
104
 
104
105
  // src/sessionStorage.ts
105
106
  var SessionStorage = class {
107
+ static {
108
+ this.locationVisitKey = "inertiaLocationVisit";
109
+ }
106
110
  static set(key, value) {
107
111
  if (typeof window !== "undefined") {
108
112
  window.sessionStorage.setItem(key, JSON.stringify(value));
@@ -146,7 +150,6 @@ var SessionStorage = class {
146
150
  }
147
151
  }
148
152
  };
149
- SessionStorage.locationVisitKey = "inertiaLocationVisit";
150
153
 
151
154
  // src/encryption.ts
152
155
  var encryptHistory = async (data) => {
@@ -271,10 +274,12 @@ var getKeyFromSessionStorage = async () => {
271
274
  };
272
275
 
273
276
  // src/page.ts
274
- import { cloneDeep as cloneDeep2, get as get3, set as set3 } from "lodash-es";
277
+ import { cloneDeep as cloneDeep2 } from "es-toolkit";
278
+ import { get as get3, set as set3 } from "es-toolkit/compat";
275
279
 
276
280
  // src/prefetched.ts
277
- import { cloneDeep, get as get2 } from "lodash-es";
281
+ import { cloneDeep } from "es-toolkit";
282
+ import { get as get2 } from "es-toolkit/compat";
278
283
 
279
284
  // src/objectUtils.ts
280
285
  var objectsAreEqual = (obj1, obj2, excludeKeys) => {
@@ -1045,7 +1050,7 @@ var CurrentPage = class {
1045
1050
  if (componentId !== this.componentId) {
1046
1051
  return;
1047
1052
  }
1048
- page2.rememberedState ?? (page2.rememberedState = {});
1053
+ page2.rememberedState ??= {};
1049
1054
  const isServer3 = typeof window === "undefined";
1050
1055
  const location = !isServer3 ? window.location : new URL(page2.url);
1051
1056
  const scrollRegions = !isServer3 && preserveScroll ? Scroll.getScrollRegions() : [];
@@ -1249,9 +1254,9 @@ var Queue = class {
1249
1254
  return this.process();
1250
1255
  }
1251
1256
  process() {
1252
- this.processingPromise ?? (this.processingPromise = this.processNext().finally(() => {
1257
+ this.processingPromise ??= this.processNext().finally(() => {
1253
1258
  this.processingPromise = null;
1254
- }));
1259
+ });
1255
1260
  return this.processingPromise;
1256
1261
  }
1257
1262
  processNext() {
@@ -1761,7 +1766,7 @@ var Polls = class {
1761
1766
  var polls = new Polls();
1762
1767
 
1763
1768
  // src/request.ts
1764
- import { get as get6 } from "lodash-es";
1769
+ import { get as get6 } from "es-toolkit/compat";
1765
1770
 
1766
1771
  // src/http.ts
1767
1772
  import { client as precognitionClient } from "laravel-precognition";
@@ -2151,7 +2156,8 @@ var RequestParams = class _RequestParams {
2151
2156
  };
2152
2157
 
2153
2158
  // src/response.ts
2154
- import { get as get5, isEqual as isEqual2, set as set4 } from "lodash-es";
2159
+ import { isEqual as isEqual2 } from "es-toolkit";
2160
+ import { get as get5, set as set4 } from "es-toolkit/compat";
2155
2161
 
2156
2162
  // src/dialog.ts
2157
2163
  var dialog_default = {
@@ -3508,7 +3514,7 @@ function axiosAdapter(instance) {
3508
3514
  }
3509
3515
 
3510
3516
  // src/formObject.ts
3511
- import { get as get8, set as set6 } from "lodash-es";
3517
+ import { get as get8, set as set6 } from "es-toolkit/compat";
3512
3518
  function undotKey(key) {
3513
3519
  if (!key.includes(".")) {
3514
3520
  return key;
@@ -4214,7 +4220,7 @@ function useInfiniteScroll(options) {
4214
4220
  }
4215
4221
 
4216
4222
  // src/layout.ts
4217
- import { isEqual as isEqual4 } from "lodash-es";
4223
+ import { isEqual as isEqual4 } from "es-toolkit";
4218
4224
  function createLayoutPropsStore() {
4219
4225
  let shared = {};
4220
4226
  let named = {};
@@ -4267,18 +4273,6 @@ function createLayoutPropsStore() {
4267
4273
  get: () => snapshot
4268
4274
  };
4269
4275
  }
4270
- function mergeLayoutProps(defaults, staticProps, dynamicProps) {
4271
- const result = { ...defaults };
4272
- for (const key of Object.keys(defaults)) {
4273
- if (key in staticProps && staticProps[key] !== void 0) {
4274
- result[key] = staticProps[key];
4275
- }
4276
- if (key in dynamicProps && dynamicProps[key] !== void 0) {
4277
- result[key] = dynamicProps[key];
4278
- }
4279
- }
4280
- return result;
4281
- }
4282
4276
  function isPlainObject(value) {
4283
4277
  return typeof value === "object" && value !== null && !Array.isArray(value);
4284
4278
  }
@@ -4909,7 +4903,6 @@ export {
4909
4903
  isSameUrlWithoutQueryOrHash,
4910
4904
  isUrlMethodPair,
4911
4905
  mergeDataIntoQueryString,
4912
- mergeLayoutProps,
4913
4906
  normalizeLayouts,
4914
4907
  objectToFormData,
4915
4908
  progress,