@sveltejs/kit 3.0.0-next.17 → 3.0.0-next.19

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.
Files changed (84) hide show
  1. package/package.json +12 -5
  2. package/src/cli.js +1 -1
  3. package/src/constants.js +3 -0
  4. package/src/core/config/index.js +1 -1
  5. package/src/core/env.js +1 -1
  6. package/src/core/postbuild/analyse.js +1 -1
  7. package/src/core/postbuild/prerender.js +1 -1
  8. package/src/core/sync/create_manifest_data/index.js +9 -0
  9. package/src/core/sync/sync.js +22 -9
  10. package/src/core/sync/ts.js +1 -1
  11. package/src/core/sync/write_app_types.js +1 -1
  12. package/src/core/sync/write_client_manifest.js +1 -1
  13. package/src/core/sync/write_server.js +1 -3
  14. package/src/core/sync/write_tsconfig/index.js +1 -1
  15. package/src/core/sync/write_types/index.js +6 -3
  16. package/src/exports/index.js +9 -9
  17. package/src/exports/internal/server/event.js +1 -1
  18. package/src/exports/internal/server/telemetry.js +1 -1
  19. package/src/exports/internal/shared.js +9 -0
  20. package/src/exports/{params.js → params/index.js} +6 -4
  21. package/src/exports/params/public.d.ts +63 -0
  22. package/src/exports/public.d.ts +93 -453
  23. package/src/exports/vite/build/build_server.js +2 -2
  24. package/src/exports/vite/dev/index.js +2 -3
  25. package/src/exports/vite/index.js +17 -5
  26. package/src/pathname.js +55 -0
  27. package/src/runtime/app/{forms.js → forms/index.js} +9 -8
  28. package/src/runtime/app/forms/public.d.ts +2 -0
  29. package/src/runtime/app/forms/types.d.ts +56 -0
  30. package/src/runtime/app/{navigation.js → navigation/index.js} +2 -2
  31. package/src/runtime/app/navigation/public.d.ts +237 -0
  32. package/src/runtime/app/paths/client.js +14 -8
  33. package/src/runtime/app/paths/index.js +1 -1
  34. package/src/runtime/app/paths/internal/client.js +4 -0
  35. package/src/runtime/app/paths/internal/server.js +4 -0
  36. package/src/runtime/app/paths/internal.d.ts +3 -0
  37. package/src/runtime/app/paths/public.d.ts +1 -1
  38. package/src/runtime/app/paths/server.js +6 -4
  39. package/src/runtime/app/server/index.js +1 -1
  40. package/src/runtime/app/server/remote/form.js +3 -4
  41. package/src/runtime/app/server/remote/prerender.js +3 -3
  42. package/src/runtime/app/server/remote/shared.js +3 -10
  43. package/src/runtime/app/state/index.js +4 -2
  44. package/src/runtime/app/state/public.d.ts +72 -0
  45. package/src/runtime/app/stores.js +2 -2
  46. package/src/runtime/client/client.js +65 -54
  47. package/src/runtime/client/entry.js +2 -2
  48. package/src/runtime/client/remote-functions/command.svelte.js +36 -34
  49. package/src/runtime/client/remote-functions/form.svelte.js +76 -78
  50. package/src/runtime/client/remote-functions/prerender.svelte.js +3 -3
  51. package/src/runtime/client/remote-functions/query/index.js +1 -1
  52. package/src/runtime/client/remote-functions/query/instance.svelte.js +4 -3
  53. package/src/runtime/client/remote-functions/query-batch.svelte.js +3 -3
  54. package/src/runtime/client/remote-functions/query-live/instance.svelte.js +5 -5
  55. package/src/runtime/client/remote-functions/query-live/iterator.js +5 -7
  56. package/src/runtime/client/remote-functions/shared.svelte.js +9 -14
  57. package/src/runtime/client/state.svelte.js +5 -3
  58. package/src/runtime/client/types.d.ts +2 -1
  59. package/src/runtime/pathname.js +6 -61
  60. package/src/runtime/props.svelte.js +1 -1
  61. package/src/runtime/server/constants.js +0 -3
  62. package/src/runtime/server/csrf.js +1 -1
  63. package/src/runtime/server/errors.js +53 -28
  64. package/src/runtime/server/fetch.js +1 -1
  65. package/src/runtime/server/index.js +9 -14
  66. package/src/runtime/server/page/actions.js +2 -1
  67. package/src/runtime/server/page/index.js +7 -3
  68. package/src/runtime/server/page/load_data.js +1 -1
  69. package/src/runtime/server/page/render.js +17 -11
  70. package/src/runtime/server/page/server_routing.js +3 -2
  71. package/src/runtime/server/remote-functions.js +3 -2
  72. package/src/runtime/server/respond.js +4 -8
  73. package/src/runtime/server/state.js +3 -6
  74. package/src/types/ambient.d.ts +1 -1
  75. package/src/types/internal.d.ts +8 -10
  76. package/src/types/private.d.ts +12 -3
  77. package/src/utils/error.js +30 -14
  78. package/src/utils/page_nodes.js +3 -2
  79. package/src/utils/params.js +3 -2
  80. package/src/utils/routing.js +5 -4
  81. package/src/version.js +1 -1
  82. package/types/index.d.ts +1005 -935
  83. package/types/index.d.ts.map +43 -31
  84. /package/src/{runtime/telemetry/noop.js → telemetry.js} +0 -0
@@ -1,3 +1,4 @@
1
+ /** @import { ParamMatcher, ParamValue } from '@sveltejs/kit/params' */
1
2
  import { BROWSER } from 'esm-env';
2
3
  import { escape_for_regexp } from './regex.js';
3
4
 
@@ -146,7 +147,7 @@ export function get_route_segments(route) {
146
147
  }
147
148
 
148
149
  /**
149
- * @param {import('@sveltejs/kit').ParamMatcher} matcher
150
+ * @param {ParamMatcher} matcher
150
151
  * @param {string} value
151
152
  * @returns {{ success: true, value: any } | { success: false }}
152
153
  */
@@ -178,7 +179,7 @@ function run_matcher(matcher, value) {
178
179
  /**
179
180
  * @param {RegExpMatchArray} match
180
181
  * @param {import('types').RouteParam[]} params
181
- * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
182
+ * @param {Record<string, ParamMatcher>} matchers
182
183
  */
183
184
  export function exec(match, params, matchers) {
184
185
  /** @type {Record<string, any>} */
@@ -298,7 +299,7 @@ export const segment_pattern = new RegExp(
298
299
  * ); // `/blog/hello-world/something/else`
299
300
  * ```
300
301
  * @param {string} id
301
- * @param {Record<string, import('@sveltejs/kit').ParamValue | undefined>} params
302
+ * @param {Record<string, ParamValue | undefined>} params
302
303
  * @returns {string}
303
304
  */
304
305
  export function resolve_route(id, params) {
@@ -360,7 +361,7 @@ export function has_server_load(node) {
360
361
  * @template {{pattern: RegExp, params: import('types').RouteParam[]}} Route
361
362
  * @param {string} path - The decoded pathname to match
362
363
  * @param {Route[]} routes
363
- * @param {Record<string, import('@sveltejs/kit').ParamMatcher>} matchers
364
+ * @param {Record<string, ParamMatcher>} matchers
364
365
  * @returns {{ route: Route, params: Record<string, any> } | null}
365
366
  */
366
367
  export function find_route(path, routes, matchers) {
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 = '3.0.0-next.17';
4
+ export const VERSION = '3.0.0-next.19';