@uniformdev/canvas-sveltekit 20.48.1-alpha.28 → 20.48.1-alpha.33.sha-eb3f272086

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.
@@ -1,4 +1,5 @@
1
- import type { Handle, RequestEvent } from '@sveltejs/kit';
1
+ import type { RequestEvent } from '@sveltejs/kit';
2
+ import type { Handle } from '@sveltejs/kit/hooks';
2
3
  import type { UniformPreviewData } from '../models.js';
3
4
  /**
4
5
  * Options for creating the Uniform handle hook.
@@ -1,4 +1,4 @@
1
- import { error, json } from '@sveltejs/kit';
1
+ import { error } from '@sveltejs/kit';
2
2
  /**
3
3
  * Creates a SvelteKit request handler for on-demand ISR revalidation.
4
4
  *
@@ -41,7 +41,7 @@ export function createRevalidateHandler(options) {
41
41
  // Note: On Vercel, actual ISR revalidation happens automatically
42
42
  // This endpoint is primarily for logging/tracking purposes
43
43
  // or for custom cache invalidation logic
44
- return json({
44
+ return Response.json({
45
45
  revalidated: true,
46
46
  paths,
47
47
  timestamp: Date.now(),
@@ -1,4 +1,4 @@
1
- import { error, json } from '@sveltejs/kit';
1
+ import { error } from '@sveltejs/kit';
2
2
  import { generateHash } from '@uniformdev/canvas';
3
3
  /**
4
4
  * Creates a SvelteKit POST request handler for preview mode.
@@ -39,6 +39,6 @@ export function createPreviewHandlerPost(options) {
39
39
  error(401, 'Not authorized');
40
40
  }
41
41
  await enhance?.(composition, { event });
42
- return json({ composition });
42
+ return Response.json({ composition });
43
43
  };
44
44
  }
@@ -11,7 +11,10 @@ export function createUniformLoad(options) {
11
11
  }
12
12
  const absoluteUrl = `${event.url.protocol}//${event.url.host}${requestUrl}`;
13
13
  const destination = getTargetVariableExpandedUrl(absoluteUrl, matched.redirect);
14
- redirect(matched.redirect.targetStatusCode, destination);
14
+ // Redirect targets can leave the site. Kit 3 rejects those unless external is set.
15
+ redirect(matched.redirect.targetStatusCode, destination, {
16
+ external: true,
17
+ });
15
18
  };
16
19
  const defaultHandleNotFound = () => {
17
20
  error(404, 'Not Found');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas-sveltekit",
3
- "version": "20.48.1-alpha.28+77388717bf",
3
+ "version": "20.48.1-alpha.33.sha-eb3f272086",
4
4
  "description": "SvelteKit SDK for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "scripts": {
@@ -38,9 +38,9 @@
38
38
  }
39
39
  },
40
40
  "peerDependencies": {
41
- "@sveltejs/kit": "^2.0.0",
41
+ "@sveltejs/kit": "^3.0.0",
42
42
  "@uniformdev/context-edge": ">=20.0.0",
43
- "svelte": "^5.0.0"
43
+ "svelte": "^5.57.1"
44
44
  },
45
45
  "peerDependenciesMeta": {
46
46
  "@uniformdev/context-edge": {
@@ -48,27 +48,27 @@
48
48
  }
49
49
  },
50
50
  "dependencies": {
51
- "@uniformdev/canvas": "20.48.1-alpha.28+77388717bf",
52
- "@uniformdev/canvas-svelte": "20.48.1-alpha.28+77388717bf",
53
- "@uniformdev/context": "20.48.1-alpha.28+77388717bf",
54
- "@uniformdev/project-map": "20.48.1-alpha.28+77388717bf",
55
- "@uniformdev/redirect": "20.48.1-alpha.28+77388717bf",
56
- "@uniformdev/richtext": "20.48.1-alpha.28+77388717bf",
51
+ "@uniformdev/canvas": "20.48.1-alpha.33.sha-eb3f272086",
52
+ "@uniformdev/canvas-svelte": "20.48.1-alpha.33.sha-eb3f272086",
53
+ "@uniformdev/context": "20.48.1-alpha.33.sha-eb3f272086",
54
+ "@uniformdev/project-map": "20.48.1-alpha.33.sha-eb3f272086",
55
+ "@uniformdev/redirect": "20.48.1-alpha.33.sha-eb3f272086",
56
+ "@uniformdev/richtext": "20.48.1-alpha.33.sha-eb3f272086",
57
57
  "colorette": "2.0.20",
58
58
  "uuid": "^13.0.0"
59
59
  },
60
60
  "devDependencies": {
61
- "@sveltejs/adapter-auto": "^7.0.0",
62
- "@sveltejs/adapter-vercel": "^5.7.2",
63
- "@sveltejs/kit": "^2.49.1",
64
- "@sveltejs/package": "^2.5.7",
65
- "@sveltejs/vite-plugin-svelte": "^6.2.1",
66
- "@uniformdev/context-edge": "20.48.1-alpha.28+77388717bf",
61
+ "@sveltejs/adapter-auto": "^8.0.0",
62
+ "@sveltejs/adapter-vercel": "^7.0.1",
63
+ "@sveltejs/kit": "^3.1.0",
64
+ "@sveltejs/package": "^3.0.1",
65
+ "@sveltejs/vite-plugin-svelte": "^7.3.1",
66
+ "@uniformdev/context-edge": "20.48.1-alpha.33.sha-eb3f272086",
67
67
  "publint": "^0.3.15",
68
- "svelte": "^5.45.6",
69
- "svelte-check": "^4.3.4",
70
- "typescript": "^5.9.3",
71
- "vite": "^7.2.6"
68
+ "svelte": "^5.57.3",
69
+ "svelte-check": "^4.7.7",
70
+ "typescript": "6.0.3",
71
+ "vite": "^8.3.5"
72
72
  },
73
73
  "keywords": [
74
74
  "svelte",
@@ -79,5 +79,5 @@
79
79
  "publishConfig": {
80
80
  "access": "public"
81
81
  },
82
- "gitHead": "77388717bfa6e82a2443accdfc896c8e137b2185"
82
+ "gitHead": "eb3f2720868747479af048c5aa8fb28df7b01936"
83
83
  }