@sveltejs/kit 2.12.0 → 2.12.1

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": "@sveltejs/kit",
3
- "version": "2.12.0",
3
+ "version": "2.12.1",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -59,19 +59,39 @@ export const page = {
59
59
  };
60
60
 
61
61
  /**
62
- * An object with a reactive `current` property.
63
- * When navigation starts, `current` is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.
64
- * When navigation finishes, `current` reverts to `null`.
65
- *
66
- * On the server, this value can only be read during rendering. In the browser, it can be read at any time.
67
- * @type {{ get current(): import('@sveltejs/kit').Navigation | null; }}
62
+ * An object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.
63
+ * Values are `null` when no navigation is occurring, or during server rendering.
64
+ * @type {import('@sveltejs/kit').Navigation | { from: null, to: null, type: null, willUnload: null, delta: null, complete: null }}
68
65
  */
66
+ // @ts-expect-error
69
67
  export const navigating = {
70
- get current() {
71
- return _navigating.current;
68
+ get from() {
69
+ return _navigating.current ? _navigating.current.from : null;
70
+ },
71
+ get to() {
72
+ return _navigating.current ? _navigating.current.to : null;
73
+ },
74
+ get type() {
75
+ return _navigating.current ? _navigating.current.type : null;
76
+ },
77
+ get willUnload() {
78
+ return _navigating.current ? _navigating.current.willUnload : null;
79
+ },
80
+ get delta() {
81
+ return _navigating.current ? _navigating.current.delta : null;
82
+ },
83
+ get complete() {
84
+ return _navigating.current ? _navigating.current.complete : null;
72
85
  }
73
86
  };
74
87
 
88
+ Object.defineProperty(navigating, 'current', {
89
+ get() {
90
+ // between 2.12.0 and 2.12.1 `navigating.current` existed
91
+ throw new Error('Replace navigating.current.<prop> with navigating.<prop>');
92
+ }
93
+ });
94
+
75
95
  /**
76
96
  * A reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of polling.
77
97
  * @type {{ get current(): boolean; check(): Promise<boolean>; }}
@@ -45,9 +45,12 @@ export const page = {
45
45
  };
46
46
 
47
47
  export const navigating = {
48
- get current() {
49
- return (__SVELTEKIT_DEV__ ? context_dev('navigating.current') : context()).navigating;
50
- }
48
+ from: null,
49
+ to: null,
50
+ type: null,
51
+ willUnload: null,
52
+ delta: null,
53
+ complete: null
51
54
  };
52
55
 
53
56
  export const updated = {
package/src/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  // generated during release, do not modify
2
2
 
3
3
  /** @type {string} */
4
- export const VERSION = '2.12.0';
4
+ export const VERSION = '2.12.1';
package/types/index.d.ts CHANGED
@@ -2293,14 +2293,16 @@ declare module '$app/state' {
2293
2293
  * */
2294
2294
  export const page: import("@sveltejs/kit").Page;
2295
2295
  /**
2296
- * An object with a reactive `current` property.
2297
- * When navigation starts, `current` is a `Navigation` object with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.
2298
- * When navigation finishes, `current` reverts to `null`.
2299
- *
2300
- * On the server, this value can only be read during rendering. In the browser, it can be read at any time.
2296
+ * An object representing an in-progress navigation, with `from`, `to`, `type` and (if `type === 'popstate'`) `delta` properties.
2297
+ * Values are `null` when no navigation is occurring, or during server rendering.
2301
2298
  * */
2302
- export const navigating: {
2303
- get current(): import("@sveltejs/kit").Navigation | null;
2299
+ export const navigating: import("@sveltejs/kit").Navigation | {
2300
+ from: null;
2301
+ to: null;
2302
+ type: null;
2303
+ willUnload: null;
2304
+ delta: null;
2305
+ complete: null;
2304
2306
  };
2305
2307
  /**
2306
2308
  * A reactive value that's initially `false`. If [`version.pollInterval`](https://svelte.dev/docs/kit/configuration#version) is a non-zero value, SvelteKit will poll for new versions of the app and update `current` to `true` when it detects one. `updated.check()` will force an immediate check, regardless of pol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