@prismicio/svelte 2.2.3-pr.64.93e3b65 → 2.2.3-pr.64.d803be5
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/dist/index.d.ts +1 -5
- package/dist/kit/PrismicPreview.svelte +1 -5
- package/dist/kit/redirectToPreviewURL.d.ts +3 -3
- package/dist/kit/redirectToPreviewURL.js +1 -1
- package/package.json +2 -2
- package/src/index.ts +1 -8
- package/src/kit/PrismicPreview.svelte +1 -5
- package/src/kit/redirectToPreviewURL.ts +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { RichTextComponents } from "./types";
|
|
2
1
|
export { default as PrismicEmbed } from "./PrismicEmbed.svelte";
|
|
3
2
|
export { default as PrismicImage } from "./PrismicImage.svelte";
|
|
4
3
|
export { default as PrismicLink } from "./PrismicLink.svelte";
|
|
@@ -7,7 +6,4 @@ export { default as PrismicTable } from "./PrismicTable.svelte";
|
|
|
7
6
|
export { default as PrismicText } from "./PrismicText.svelte";
|
|
8
7
|
export { default as SliceZone } from "./SliceZone/SliceZone.svelte";
|
|
9
8
|
export { default as SliceSimulator } from "./SliceSimulator.svelte";
|
|
10
|
-
|
|
11
|
-
export type SvelteRichTextSerializer = RichTextComponents;
|
|
12
|
-
export type { RichTextComponents };
|
|
13
|
-
export type { RichTextComponentProps, SliceComponentProps } from "./types";
|
|
9
|
+
export type { RichTextComponentProps, RichTextComponents, SliceComponentProps } from "./types";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { beforeNavigate, goto, refreshAll } from "$app/navigation"
|
|
3
3
|
import { getToolbarSrc } from "@prismicio/client"
|
|
4
|
-
import { VERSION } from "@sveltejs/kit"
|
|
5
4
|
import { onMount } from "svelte"
|
|
6
5
|
|
|
7
6
|
type Props = {
|
|
@@ -56,10 +55,7 @@
|
|
|
56
55
|
),
|
|
57
56
|
window.location.origin,
|
|
58
57
|
),
|
|
59
|
-
|
|
60
|
-
(VERSION.startsWith("2.")
|
|
61
|
-
? { invalidateAll: true, noScroll: true }
|
|
62
|
-
: { refreshAll: true, reset: false }) as Parameters<typeof goto>[1],
|
|
58
|
+
{ refreshAll: true, reset: false },
|
|
63
59
|
)
|
|
64
60
|
},
|
|
65
61
|
{ signal: controller.signal },
|
|
@@ -6,13 +6,13 @@ export type RedirectToPreviewURLConfig = {
|
|
|
6
6
|
/**
|
|
7
7
|
* The `request` object from a `+server` file.
|
|
8
8
|
*
|
|
9
|
-
* @see SvelteKit `+server` docs: \<https://
|
|
9
|
+
* @see SvelteKit `+server` docs: \<https://svelte.dev/docs/kit/routing#server\>
|
|
10
10
|
*/
|
|
11
11
|
request: Request;
|
|
12
12
|
/**
|
|
13
13
|
* The `cookies` object from a `+server` file.
|
|
14
14
|
*
|
|
15
|
-
* @see SvelteKit `+server` docs: \<https://
|
|
15
|
+
* @see SvelteKit `+server` docs: \<https://svelte.dev/docs/kit/routing#server\>
|
|
16
16
|
*/
|
|
17
17
|
cookies: Cookies;
|
|
18
18
|
/** The default redirect URL if a URL cannot be determined for the previewed document. */
|
|
@@ -27,7 +27,7 @@ export type RedirectToPreviewURLConfig = {
|
|
|
27
27
|
* Return the created `Response` in your `+server` file.
|
|
28
28
|
*
|
|
29
29
|
* @example
|
|
30
|
-
*
|
|
30
|
+
* ;```typescript
|
|
31
31
|
* import { createClient } from "$lib/prismicio.js"
|
|
32
32
|
* import { redirectToPreviewURL } from "@prismicio/svelte/kit"
|
|
33
33
|
*
|
|
@@ -6,7 +6,7 @@ import * as prismic from "@prismicio/client";
|
|
|
6
6
|
* Return the created `Response` in your `+server` file.
|
|
7
7
|
*
|
|
8
8
|
* @example
|
|
9
|
-
*
|
|
9
|
+
* ;```typescript
|
|
10
10
|
* import { createClient } from "$lib/prismicio.js"
|
|
11
11
|
* import { redirectToPreviewURL } from "@prismicio/svelte/kit"
|
|
12
12
|
*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prismicio/svelte",
|
|
3
|
-
"version": "2.2.3-pr.64.
|
|
3
|
+
"version": "2.2.3-pr.64.d803be5",
|
|
4
4
|
"description": "Svelte components to present Prismic content.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"prismic",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
},
|
|
82
82
|
"peerDependencies": {
|
|
83
83
|
"@prismicio/client": ">=7",
|
|
84
|
-
"@sveltejs/kit": "^
|
|
84
|
+
"@sveltejs/kit": "^3.0.0",
|
|
85
85
|
"svelte": "^5.16.0"
|
|
86
86
|
},
|
|
87
87
|
"peerDependenciesMeta": {
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import type { RichTextComponents } from "./types"
|
|
2
|
-
|
|
3
1
|
export { default as PrismicEmbed } from "./PrismicEmbed.svelte"
|
|
4
2
|
export { default as PrismicImage } from "./PrismicImage.svelte"
|
|
5
3
|
export { default as PrismicLink } from "./PrismicLink.svelte"
|
|
@@ -9,9 +7,4 @@ export { default as PrismicText } from "./PrismicText.svelte"
|
|
|
9
7
|
export { default as SliceZone } from "./SliceZone/SliceZone.svelte"
|
|
10
8
|
export { default as SliceSimulator } from "./SliceSimulator.svelte"
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
// TODO: Remove in v3.
|
|
14
|
-
export type SvelteRichTextSerializer = RichTextComponents
|
|
15
|
-
export type { RichTextComponents }
|
|
16
|
-
|
|
17
|
-
export type { RichTextComponentProps, SliceComponentProps } from "./types"
|
|
10
|
+
export type { RichTextComponentProps, RichTextComponents, SliceComponentProps } from "./types"
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { beforeNavigate, goto, refreshAll } from "$app/navigation"
|
|
3
3
|
import { getToolbarSrc } from "@prismicio/client"
|
|
4
|
-
import { VERSION } from "@sveltejs/kit"
|
|
5
4
|
import { onMount } from "svelte"
|
|
6
5
|
|
|
7
6
|
type Props = {
|
|
@@ -56,10 +55,7 @@
|
|
|
56
55
|
),
|
|
57
56
|
window.location.origin,
|
|
58
57
|
),
|
|
59
|
-
|
|
60
|
-
(VERSION.startsWith("2.")
|
|
61
|
-
? { invalidateAll: true, noScroll: true }
|
|
62
|
-
: { refreshAll: true, reset: false }) as Parameters<typeof goto>[1],
|
|
58
|
+
{ refreshAll: true, reset: false },
|
|
63
59
|
)
|
|
64
60
|
},
|
|
65
61
|
{ signal: controller.signal },
|
|
@@ -11,14 +11,14 @@ export type RedirectToPreviewURLConfig = {
|
|
|
11
11
|
/**
|
|
12
12
|
* The `request` object from a `+server` file.
|
|
13
13
|
*
|
|
14
|
-
* @see SvelteKit `+server` docs: \<https://
|
|
14
|
+
* @see SvelteKit `+server` docs: \<https://svelte.dev/docs/kit/routing#server\>
|
|
15
15
|
*/
|
|
16
16
|
request: Request
|
|
17
17
|
|
|
18
18
|
/**
|
|
19
19
|
* The `cookies` object from a `+server` file.
|
|
20
20
|
*
|
|
21
|
-
* @see SvelteKit `+server` docs: \<https://
|
|
21
|
+
* @see SvelteKit `+server` docs: \<https://svelte.dev/docs/kit/routing#server\>
|
|
22
22
|
*/
|
|
23
23
|
cookies: Cookies
|
|
24
24
|
|
|
@@ -36,7 +36,7 @@ export type RedirectToPreviewURLConfig = {
|
|
|
36
36
|
* Return the created `Response` in your `+server` file.
|
|
37
37
|
*
|
|
38
38
|
* @example
|
|
39
|
-
*
|
|
39
|
+
* ;```typescript
|
|
40
40
|
* import { createClient } from "$lib/prismicio.js"
|
|
41
41
|
* import { redirectToPreviewURL } from "@prismicio/svelte/kit"
|
|
42
42
|
*
|