@hybridly/core 0.7.7 → 0.7.9

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.cjs CHANGED
@@ -289,11 +289,11 @@ async function registerEventListeners() {
289
289
  updateHistoryState: false
290
290
  });
291
291
  });
292
- window?.addEventListener("scroll", (event) => utils.debounce(() => {
292
+ window?.addEventListener("scroll", (event) => utils.debounce(100, () => {
293
293
  if (event?.target?.hasAttribute?.(SCROLL_REGION_ATTRIBUTE)) {
294
294
  saveScrollPositions();
295
295
  }
296
- }, 100), true);
296
+ }), true);
297
297
  }
298
298
  function isBackForwardNavigation() {
299
299
  if (!window.history.state) {
package/dist/index.d.cts CHANGED
@@ -5,8 +5,8 @@ type MaybePromise<T> = T | Promise<T>;
5
5
 
6
6
  interface RequestHooks {
7
7
  /**
8
- * Called before a navigation request is going to happen.
9
- */
8
+ * Called before a navigation request is going to happen.
9
+ */
10
10
  before: (options: HybridRequestOptions, context: InternalRouterContext) => MaybePromise<any | boolean>;
11
11
  /**
12
12
  * Called before the request of a navigation is going to happen.
@@ -51,8 +51,18 @@ interface RequestHooks {
51
51
  }
52
52
  interface Hooks extends RequestHooks {
53
53
  /**
54
- * Called when Hybridly's context is initialized.
55
- */
54
+ /////////////////////// * Called when Hybridly's context is initialized.
55
+ ///////////////////////
56
+ ///////////////////////
57
+ ///////////////////////
58
+ ///////////////////////
59
+ ///////////////////////
60
+ ///////////////////////
61
+ ///////////////////////
62
+ ///////////////////////
63
+ ///////////////////////
64
+ ///////////////////////
65
+ */
56
66
  initialized: (context: InternalRouterContext) => MaybePromise<any>;
57
67
  /**
58
68
  * Called after Hybridly's initial load.
@@ -176,7 +186,7 @@ interface NavigationOptions {
176
186
  transformUrl?: UrlTransformable;
177
187
  /**
178
188
  * Defines whether the history state should be updated.
179
- * @internal This is an advanced property meant to be used internally.
189
+ * @internal
180
190
  */
181
191
  updateHistoryState?: boolean;
182
192
  }
@@ -218,7 +228,7 @@ interface HybridRequestOptions extends Omit<NavigationOptions, 'payload'> {
218
228
  useFormData?: boolean;
219
229
  /**
220
230
  * If `false`, disable automatic form spoofing.
221
- * @see https://laravel.com/docs/9.x/routing#form-method-spoofing
231
+ * @see https://laravel.com/docs/master/routing#form-method-spoofing
222
232
  */
223
233
  spoof?: boolean;
224
234
  /**
package/dist/index.d.mts CHANGED
@@ -5,8 +5,8 @@ type MaybePromise<T> = T | Promise<T>;
5
5
 
6
6
  interface RequestHooks {
7
7
  /**
8
- * Called before a navigation request is going to happen.
9
- */
8
+ * Called before a navigation request is going to happen.
9
+ */
10
10
  before: (options: HybridRequestOptions, context: InternalRouterContext) => MaybePromise<any | boolean>;
11
11
  /**
12
12
  * Called before the request of a navigation is going to happen.
@@ -51,8 +51,18 @@ interface RequestHooks {
51
51
  }
52
52
  interface Hooks extends RequestHooks {
53
53
  /**
54
- * Called when Hybridly's context is initialized.
55
- */
54
+ /////////////////////// * Called when Hybridly's context is initialized.
55
+ ///////////////////////
56
+ ///////////////////////
57
+ ///////////////////////
58
+ ///////////////////////
59
+ ///////////////////////
60
+ ///////////////////////
61
+ ///////////////////////
62
+ ///////////////////////
63
+ ///////////////////////
64
+ ///////////////////////
65
+ */
56
66
  initialized: (context: InternalRouterContext) => MaybePromise<any>;
57
67
  /**
58
68
  * Called after Hybridly's initial load.
@@ -176,7 +186,7 @@ interface NavigationOptions {
176
186
  transformUrl?: UrlTransformable;
177
187
  /**
178
188
  * Defines whether the history state should be updated.
179
- * @internal This is an advanced property meant to be used internally.
189
+ * @internal
180
190
  */
181
191
  updateHistoryState?: boolean;
182
192
  }
@@ -218,7 +228,7 @@ interface HybridRequestOptions extends Omit<NavigationOptions, 'payload'> {
218
228
  useFormData?: boolean;
219
229
  /**
220
230
  * If `false`, disable automatic form spoofing.
221
- * @see https://laravel.com/docs/9.x/routing#form-method-spoofing
231
+ * @see https://laravel.com/docs/master/routing#form-method-spoofing
222
232
  */
223
233
  spoof?: boolean;
224
234
  /**
package/dist/index.d.ts CHANGED
@@ -5,8 +5,8 @@ type MaybePromise<T> = T | Promise<T>;
5
5
 
6
6
  interface RequestHooks {
7
7
  /**
8
- * Called before a navigation request is going to happen.
9
- */
8
+ * Called before a navigation request is going to happen.
9
+ */
10
10
  before: (options: HybridRequestOptions, context: InternalRouterContext) => MaybePromise<any | boolean>;
11
11
  /**
12
12
  * Called before the request of a navigation is going to happen.
@@ -51,8 +51,18 @@ interface RequestHooks {
51
51
  }
52
52
  interface Hooks extends RequestHooks {
53
53
  /**
54
- * Called when Hybridly's context is initialized.
55
- */
54
+ /////////////////////// * Called when Hybridly's context is initialized.
55
+ ///////////////////////
56
+ ///////////////////////
57
+ ///////////////////////
58
+ ///////////////////////
59
+ ///////////////////////
60
+ ///////////////////////
61
+ ///////////////////////
62
+ ///////////////////////
63
+ ///////////////////////
64
+ ///////////////////////
65
+ */
56
66
  initialized: (context: InternalRouterContext) => MaybePromise<any>;
57
67
  /**
58
68
  * Called after Hybridly's initial load.
@@ -176,7 +186,7 @@ interface NavigationOptions {
176
186
  transformUrl?: UrlTransformable;
177
187
  /**
178
188
  * Defines whether the history state should be updated.
179
- * @internal This is an advanced property meant to be used internally.
189
+ * @internal
180
190
  */
181
191
  updateHistoryState?: boolean;
182
192
  }
@@ -218,7 +228,7 @@ interface HybridRequestOptions extends Omit<NavigationOptions, 'payload'> {
218
228
  useFormData?: boolean;
219
229
  /**
220
230
  * If `false`, disable automatic form spoofing.
221
- * @see https://laravel.com/docs/9.x/routing#form-method-spoofing
231
+ * @see https://laravel.com/docs/master/routing#form-method-spoofing
222
232
  */
223
233
  spoof?: boolean;
224
234
  /**
package/dist/index.mjs CHANGED
@@ -282,11 +282,11 @@ async function registerEventListeners() {
282
282
  updateHistoryState: false
283
283
  });
284
284
  });
285
- window?.addEventListener("scroll", (event) => debounce(() => {
285
+ window?.addEventListener("scroll", (event) => debounce(100, () => {
286
286
  if (event?.target?.hasAttribute?.(SCROLL_REGION_ATTRIBUTE)) {
287
287
  saveScrollPositions();
288
288
  }
289
- }, 100), true);
289
+ }), true);
290
290
  }
291
291
  function isBackForwardNavigation() {
292
292
  if (!window.history.state) {
package/package.json CHANGED
@@ -1,49 +1,49 @@
1
1
  {
2
2
  "name": "@hybridly/core",
3
- "version": "0.7.7",
3
+ "type": "module",
4
+ "version": "0.7.9",
4
5
  "description": "Core functionality of Hybridly",
5
- "keywords": [
6
- "hybridly",
7
- "inertiajs"
8
- ],
6
+ "author": "Enzo Innocenzi <enzo@innocenzi.dev>",
9
7
  "license": "MIT",
8
+ "funding": "https://github.com/sponsors/innocenzi",
9
+ "homepage": "https://github.com/hybridly/hybridly#readme",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/hybridly/hybridly.git"
13
13
  },
14
- "funding": "https://github.com/sponsors/innocenzi",
15
- "author": "Enzo Innocenzi <enzo@innocenzi.dev>",
16
- "type": "module",
17
- "homepage": "https://github.com/hybridly/hybridly#readme",
18
14
  "bugs": {
19
15
  "url": "https://github.com/hybridly/hybridly/issues"
20
16
  },
17
+ "keywords": [
18
+ "hybridly",
19
+ "inertiajs"
20
+ ],
21
21
  "publishConfig": {
22
22
  "provenance": true,
23
23
  "access": "public"
24
24
  },
25
25
  "sideEffects": false,
26
- "files": [
27
- "dist",
28
- "*.d.ts"
29
- ],
30
26
  "exports": {
31
27
  ".": {
32
- "require": "./dist/index.cjs",
28
+ "types": "./dist/index.d.ts",
33
29
  "import": "./dist/index.mjs",
34
- "types": "./dist/index.d.ts"
30
+ "require": "./dist/index.cjs"
35
31
  }
36
32
  },
37
33
  "main": "dist/index.cjs",
38
34
  "module": "dist/index.mjs",
39
35
  "types": "dist/index.d.ts",
36
+ "files": [
37
+ "*.d.ts",
38
+ "dist"
39
+ ],
40
40
  "peerDependencies": {
41
- "axios": "^1.6.7"
41
+ "axios": "^1.7.2"
42
42
  },
43
43
  "dependencies": {
44
44
  "qs": "^6.12.1",
45
45
  "superjson": "^2.2.1",
46
- "@hybridly/utils": "0.7.7"
46
+ "@hybridly/utils": "0.7.9"
47
47
  },
48
48
  "devDependencies": {
49
49
  "defu": "^6.1.4"