@sveltejs/kit 2.23.0 → 2.24.0

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.23.0",
3
+ "version": "2.24.0",
4
4
  "description": "SvelteKit is the fastest way to build Svelte apps",
5
5
  "keywords": [
6
6
  "framework",
@@ -36,25 +36,25 @@ export function write_root(manifest_data, output) {
36
36
  isSvelte5Plus()
37
37
  ? dedent`{@const Pyramid_${l} = constructors[${l}]}
38
38
  <!-- svelte-ignore binding_property_non_reactive -->
39
- <Pyramid_${l} bind:this={components[${l}]} data={data_${l}} {form}>
39
+ <Pyramid_${l} bind:this={components[${l}]} data={data_${l}} {form} params={page.params}>
40
40
  ${pyramid}
41
41
  </Pyramid_${l}>`
42
- : dedent`<svelte:component this={constructors[${l}]} bind:this={components[${l}]} data={data_${l}}>
42
+ : dedent`<svelte:component this={constructors[${l}]} bind:this={components[${l}]} data={data_${l}} params={page.params}>
43
43
  ${pyramid}
44
44
  </svelte:component>`
45
45
  }
46
-
46
+
47
47
  {:else}
48
48
  ${
49
49
  isSvelte5Plus()
50
50
  ? dedent`
51
51
  {@const Pyramid_${l} = constructors[${l}]}
52
52
  <!-- svelte-ignore binding_property_non_reactive -->
53
- <Pyramid_${l} bind:this={components[${l}]} data={data_${l}} {form} />
53
+ <Pyramid_${l} bind:this={components[${l}]} data={data_${l}} {form} params={page.params} />
54
54
  `
55
- : dedent`<svelte:component this={constructors[${l}]} bind:this={components[${l}]} data={data_${l}} {form} />`
55
+ : dedent`<svelte:component this={constructors[${l}]} bind:this={components[${l}]} data={data_${l}} {form} params={page.params} />`
56
56
  }
57
-
57
+
58
58
  {/if}
59
59
  `;
60
60
  }
@@ -272,9 +272,11 @@ function update_types(config, routes, route, to_delete = new Set()) {
272
272
  }
273
273
 
274
274
  if (route.leaf.server) {
275
- exports.push('export type PageProps = { data: PageData; form: ActionData }');
275
+ exports.push(
276
+ 'export type PageProps = { params: RouteParams; data: PageData; form: ActionData }'
277
+ );
276
278
  } else {
277
- exports.push('export type PageProps = { data: PageData }');
279
+ exports.push('export type PageProps = { params: RouteParams; data: PageData }');
278
280
  }
279
281
  }
280
282
 
@@ -341,7 +343,7 @@ function update_types(config, routes, route, to_delete = new Set()) {
341
343
  if (proxies.universal?.modified) to_delete.delete(proxies.universal.file_name);
342
344
 
343
345
  exports.push(
344
- 'export type LayoutProps = { data: LayoutData; children: import("svelte").Snippet }'
346
+ 'export type LayoutProps = { params: LayoutParams; data: LayoutData; children: import("svelte").Snippet }'
345
347
  );
346
348
  }
347
349
 
@@ -3,6 +3,7 @@
3
3
  * @param {string} key
4
4
  * @param {(value: string) => any} parse
5
5
  */
6
+ /*@__NO_SIDE_EFFECTS__*/
6
7
  export function get(key, parse = JSON.parse) {
7
8
  try {
8
9
  return parse(sessionStorage[key]);
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.23.0';
4
+ export const VERSION = '2.24.0';