@sveltejs/kit 1.0.5 → 1.0.6

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": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/sveltejs/kit",
@@ -286,7 +286,7 @@ export function create_client({ target, base }) {
286
286
  );
287
287
  return false;
288
288
  }
289
- } else if (navigation_result.props?.page?.status >= 400) {
289
+ } else if (/** @type {number} */ (navigation_result.props?.page?.status) >= 400) {
290
290
  const updated = await stores.updated.check();
291
291
  if (updated) {
292
292
  await native_navigation(url);
@@ -369,7 +369,7 @@ export function create_client({ target, base }) {
369
369
  const style = document.querySelector('style[data-sveltekit]');
370
370
  if (style) style.remove();
371
371
 
372
- page = result.props.page;
372
+ page = /** @type {import('types').Page} */ (result.props.page);
373
373
 
374
374
  root = new Root({
375
375
  target,
@@ -435,6 +435,7 @@ export function create_client({ target, base }) {
435
435
  route
436
436
  },
437
437
  props: {
438
+ // @ts-ignore Somehow it's getting SvelteComponent and SvelteComponentDev mixed up
438
439
  components: filtered.map((branch_node) => branch_node.node.component)
439
440
  }
440
441
  };
@@ -473,7 +474,9 @@ export function create_client({ target, base }) {
473
474
  result.props.page = {
474
475
  error,
475
476
  params,
476
- route,
477
+ route: {
478
+ id: route?.id ?? null
479
+ },
477
480
  status,
478
481
  url: new URL(url),
479
482
  form: form ?? null,
@@ -8,7 +8,8 @@ import {
8
8
  preloadCode,
9
9
  preloadData
10
10
  } from '$app/navigation';
11
- import { CSRPageNode, CSRPageNodeLoader, CSRRoute, TrailingSlash, Uses } from 'types';
11
+ import { SvelteComponent } from 'svelte';
12
+ import { CSRPageNode, CSRPageNodeLoader, CSRRoute, Page, TrailingSlash, Uses } from 'types';
12
13
 
13
14
  export interface Client {
14
15
  // public API, exposed via $app/navigation
@@ -58,7 +59,12 @@ export type NavigationRedirect = {
58
59
  export type NavigationFinished = {
59
60
  type: 'loaded';
60
61
  state: NavigationState;
61
- props: Record<string, any>;
62
+ props: {
63
+ components: Array<typeof SvelteComponent>;
64
+ page?: Page;
65
+ form?: Record<string, any> | null;
66
+ [key: `data_${number}`]: Record<string, any>;
67
+ };
62
68
  };
63
69
 
64
70
  export type BranchNode = {