next-sanity 10.1.4 → 11.0.1
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/README.md +3 -2
- package/dist/hooks.js +0 -1
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +0 -35
- package/dist/index.js +0 -13
- package/dist/index.js.map +1 -1
- package/package.json +6 -7
- package/src/index.ts +0 -2
- package/dist/_chunks-es/deprecated-live.js +0 -11
- package/dist/_chunks-es/deprecated-live.js.map +0 -1
- package/dist/index.edge-light.d.ts +0 -91
- package/dist/index.edge-light.js +0 -23
- package/dist/index.edge-light.js.map +0 -1
- package/src/deprecated-live.ts +0 -32
- package/src/deprecated-visual-editing.tsx +0 -19
- package/src/index.edge-light.ts +0 -18
package/README.md
CHANGED
|
@@ -1153,8 +1153,9 @@ function StudioPage() {
|
|
|
1153
1153
|
## Migration guides
|
|
1154
1154
|
|
|
1155
1155
|
> [!IMPORTANT]
|
|
1156
|
-
> You're looking at the README for
|
|
1156
|
+
> You're looking at the README for v11, the README for [v10 is available here](https://github.com/sanity-io/next-sanity/tree/v10?tab=readme-ov-file#next-sanity) as well as an [migration guide][migrate-v10-to-v11].
|
|
1157
1157
|
|
|
1158
|
+
- [From `v10` to `v11`][migrate-v10-to-v11]
|
|
1158
1159
|
- [From `v9` to `v10`][migrate-v9-to-v10]
|
|
1159
1160
|
- [From `v8` to `v9`][migrate-v8-to-v9]
|
|
1160
1161
|
- [From `v7` to `v8`][migrate-v7-to-v8]
|
|
@@ -1184,6 +1185,7 @@ MIT-licensed. See [LICENSE][LICENSE].
|
|
|
1184
1185
|
[migrate-v7-to-v8]: https://github.com/sanity-io/next-sanity/blob/main/packages/next-sanity/MIGRATE-v7-to-v8.md
|
|
1185
1186
|
[migrate-v8-to-v9]: https://github.com/sanity-io/next-sanity/blob/main/packages/next-sanity/MIGRATE-v8-to-v9.md
|
|
1186
1187
|
[migrate-v9-to-v10]: https://github.com/sanity-io/next-sanity/blob/main/packages/next-sanity/MIGRATE-v9-to-v10.md
|
|
1188
|
+
[migrate-v10-to-v11]: https://github.com/sanity-io/next-sanity/blob/main/packages/next-sanity/MIGRATE-v10-to-v11.md
|
|
1187
1189
|
[next-cache]: https://nextjs.org/docs/app/building-your-application/caching
|
|
1188
1190
|
[next-docs]: https://nextjs.org/docs
|
|
1189
1191
|
[next-revalidate-docs]: https://nextjs.org/docs/app/api-reference/functions/fetch#optionsnextrevalidate
|
|
@@ -1207,4 +1209,3 @@ MIT-licensed. See [LICENSE][LICENSE].
|
|
|
1207
1209
|
[sanity-next-clean-starter]: https://www.sanity.io/templates/nextjs-sanity-clean
|
|
1208
1210
|
[sanity-next-featured-starter]: https://www.sanity.io/templates/personal-website-with-built-in-content-editing
|
|
1209
1211
|
[live-content-api]: https://www.sanity.io/docs/live-content-api?utm_source=github&utm_medium=readme&utm_campaign=next-sanity
|
|
1210
|
-
|
package/dist/hooks.js
CHANGED
package/dist/hooks.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,21 +1,12 @@
|
|
|
1
|
-
import {CorsOriginError} from '@sanity/next-loader'
|
|
2
1
|
import {createClient} from '@sanity/client'
|
|
3
2
|
import {CreateDataAttribute} from '@sanity/visual-editing/create-data-attribute'
|
|
4
3
|
import {createDataAttribute} from '@sanity/visual-editing/create-data-attribute'
|
|
5
4
|
import {CreateDataAttributeProps} from '@sanity/visual-editing/create-data-attribute'
|
|
6
|
-
import {DefinedSanityFetchType} from '@sanity/next-loader'
|
|
7
|
-
import {DefinedSanityLiveProps} from '@sanity/next-loader'
|
|
8
|
-
import {DefinedSanityLiveStreamType} from '@sanity/next-loader'
|
|
9
5
|
import {defineQuery} from 'groq'
|
|
10
|
-
import {DefineSanityLiveOptions} from '@sanity/next-loader'
|
|
11
6
|
import {default as groq} from 'groq'
|
|
12
|
-
import {isCorsOriginError} from '@sanity/next-loader'
|
|
13
7
|
import {stegaClean} from '@sanity/client/stega'
|
|
14
8
|
import {unstable__adapter} from '@sanity/client'
|
|
15
9
|
import {unstable__environment} from '@sanity/client'
|
|
16
|
-
import {VisualEditingProps} from 'next-sanity/visual-editing/client-component'
|
|
17
|
-
|
|
18
|
-
export {CorsOriginError}
|
|
19
10
|
|
|
20
11
|
export {createClient}
|
|
21
12
|
|
|
@@ -25,42 +16,16 @@ export {createDataAttribute}
|
|
|
25
16
|
|
|
26
17
|
export {CreateDataAttributeProps}
|
|
27
18
|
|
|
28
|
-
export {DefinedSanityFetchType}
|
|
29
|
-
|
|
30
|
-
export {DefinedSanityLiveProps}
|
|
31
|
-
|
|
32
|
-
export {DefinedSanityLiveStreamType}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated import `defineLive` from `next-sanity/live` instead
|
|
36
|
-
*/
|
|
37
|
-
export declare function defineLive(options: DefineSanityLiveOptions): {
|
|
38
|
-
sanityFetch: DefinedSanityFetchType
|
|
39
|
-
SanityLive: React.ComponentType<DefinedSanityLiveProps>
|
|
40
|
-
SanityLiveStream: DefinedSanityLiveStreamType
|
|
41
|
-
}
|
|
42
|
-
|
|
43
19
|
export {defineQuery}
|
|
44
20
|
|
|
45
|
-
export {DefineSanityLiveOptions}
|
|
46
|
-
|
|
47
21
|
export {groq}
|
|
48
22
|
|
|
49
|
-
export {isCorsOriginError}
|
|
50
|
-
|
|
51
23
|
export {stegaClean}
|
|
52
24
|
|
|
53
25
|
export {unstable__adapter}
|
|
54
26
|
|
|
55
27
|
export {unstable__environment}
|
|
56
28
|
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated import `VisualEditing` from `next-sanity/visual-editing` instead
|
|
59
|
-
*/
|
|
60
|
-
export declare function VisualEditing(props: VisualEditingProps): React.ReactNode
|
|
61
|
-
|
|
62
|
-
export {VisualEditingProps}
|
|
63
|
-
|
|
64
29
|
export * from '@portabletext/react'
|
|
65
30
|
export * from '@sanity/client'
|
|
66
31
|
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,13 @@
|
|
|
1
1
|
import { createClient, unstable__adapter, unstable__environment } from "@sanity/client";
|
|
2
2
|
import { stegaClean } from "@sanity/client/stega";
|
|
3
3
|
import { createDataAttribute } from "@sanity/visual-editing/create-data-attribute";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
import { VisualEditing as VisualEditing$1 } from "./visual-editing.js";
|
|
6
|
-
import { defineLive } from "./_chunks-es/deprecated-live.js";
|
|
7
4
|
export * from "@portabletext/react";
|
|
8
5
|
import { defineQuery, default as default2 } from "groq";
|
|
9
|
-
import { isCorsOriginError } from "@sanity/next-loader";
|
|
10
|
-
let warned = !1;
|
|
11
|
-
function VisualEditing(props) {
|
|
12
|
-
return warned || (console.warn(
|
|
13
|
-
`Importing VisualEditing from the root import is deprecated and will be removed in next-sanity v11. Please change "import {VisualEditing} from 'next-sanity'" to "import {VisualEditing} from 'next-sanity/visual-editing'"`
|
|
14
|
-
), warned = !0), /* @__PURE__ */ jsx(VisualEditing$1, { ...props });
|
|
15
|
-
}
|
|
16
6
|
export {
|
|
17
|
-
VisualEditing,
|
|
18
7
|
createClient,
|
|
19
8
|
createDataAttribute,
|
|
20
|
-
defineLive,
|
|
21
9
|
defineQuery,
|
|
22
10
|
default2 as groq,
|
|
23
|
-
isCorsOriginError,
|
|
24
11
|
stegaClean,
|
|
25
12
|
unstable__adapter,
|
|
26
13
|
unstable__environment
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-sanity",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "11.0.1",
|
|
4
4
|
"description": "Sanity.io toolkit for Next.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
29
29
|
"source": "./src/index.ts",
|
|
30
|
-
"edge-light": "./dist/index.edge-light.js",
|
|
31
30
|
"default": "./dist/index.js"
|
|
32
31
|
},
|
|
33
32
|
"./draft-mode": {
|
|
@@ -119,13 +118,13 @@
|
|
|
119
118
|
"@sanity/next-loader": "^2.1.2",
|
|
120
119
|
"@sanity/preview-url-secret": "^2.1.15",
|
|
121
120
|
"@sanity/visual-editing": "^3.0.5",
|
|
122
|
-
"groq": "^4.
|
|
121
|
+
"groq": "^4.8.1",
|
|
123
122
|
"history": "^5.3.0"
|
|
124
123
|
},
|
|
125
124
|
"devDependencies": {
|
|
126
125
|
"@sanity/browserslist-config": "^1.0.5",
|
|
127
|
-
"@sanity/pkg-utils": "^8.1.
|
|
128
|
-
"@sanity/types": "^4.
|
|
126
|
+
"@sanity/pkg-utils": "^8.1.8",
|
|
127
|
+
"@sanity/types": "^4.8.1",
|
|
129
128
|
"@sanity/webhook": "4.0.4",
|
|
130
129
|
"@types/react": "^19.1.8",
|
|
131
130
|
"@types/react-dom": "^19.1.6",
|
|
@@ -143,11 +142,11 @@
|
|
|
143
142
|
"next": "^15.1",
|
|
144
143
|
"react": "^18.3 || ^19",
|
|
145
144
|
"react-dom": "^18.3 || ^19",
|
|
146
|
-
"sanity": "^4.
|
|
145
|
+
"sanity": "^4.8.1",
|
|
147
146
|
"styled-components": "^6.1"
|
|
148
147
|
},
|
|
149
148
|
"engines": {
|
|
150
|
-
"node": ">=20.19"
|
|
149
|
+
"node": ">=20.19 <22 || >=22.12"
|
|
151
150
|
},
|
|
152
151
|
"scripts": {
|
|
153
152
|
"build": "pkg build --strict --clean --check",
|
package/src/index.ts
CHANGED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { defineLive as defineLive$1 } from "@sanity/next-loader";
|
|
2
|
-
let warned = !1;
|
|
3
|
-
function defineLive(options) {
|
|
4
|
-
return warned || (console.warn(
|
|
5
|
-
`Importing defineLive from the root import is deprecated and will be removed in next-sanity v11. Please change "import {defineLive} from 'next-sanity'" to "import {definveLive} from 'next-sanity/live'"`
|
|
6
|
-
), warned = !0), defineLive$1(options);
|
|
7
|
-
}
|
|
8
|
-
export {
|
|
9
|
-
defineLive
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=deprecated-live.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deprecated-live.js","sources":["../../src/deprecated-live.ts"],"sourcesContent":["import {\n type CorsOriginError,\n type DefineSanityLiveOptions,\n type DefinedSanityFetchType,\n type DefinedSanityLiveProps,\n type DefinedSanityLiveStreamType,\n isCorsOriginError,\n defineLive as defineLiveImplementation,\n} from '@sanity/next-loader'\n\nexport {\n type CorsOriginError,\n DefineSanityLiveOptions,\n DefinedSanityFetchType,\n DefinedSanityLiveProps,\n DefinedSanityLiveStreamType,\n isCorsOriginError,\n}\n\nlet warned = false\n/**\n * @deprecated import `defineLive` from `next-sanity/live` instead\n */\nexport function defineLive(options: DefineSanityLiveOptions) {\n if (!warned) {\n console.warn(\n `Importing defineLive from the root import is deprecated and will be removed in next-sanity v11. Please change \"import {defineLive} from 'next-sanity'\" to \"import {definveLive} from 'next-sanity/live'\"`,\n )\n warned = true\n }\n return defineLiveImplementation(options)\n}\n"],"names":["defineLiveImplementation"],"mappings":";AAmBA,IAAI,SAAS;AAIN,SAAS,WAAW,SAAkC;AAC3D,SAAK,WACH,QAAQ;AAAA,IACN;AAAA,EAAA,GAEF,SAAS,KAEJA,aAAyB,OAAO;AACzC;"}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
import {CorsOriginError} from '@sanity/next-loader'
|
|
2
|
-
import {createClient} from '@sanity/client'
|
|
3
|
-
import {CreateDataAttribute} from '@sanity/visual-editing/create-data-attribute'
|
|
4
|
-
import {createDataAttribute} from '@sanity/visual-editing/create-data-attribute'
|
|
5
|
-
import {CreateDataAttributeProps} from '@sanity/visual-editing/create-data-attribute'
|
|
6
|
-
import {DefinedSanityFetchType} from '@sanity/next-loader'
|
|
7
|
-
import {DefinedSanityLiveProps} from '@sanity/next-loader'
|
|
8
|
-
import {DefinedSanityLiveStreamType} from '@sanity/next-loader'
|
|
9
|
-
import {defineQuery} from 'groq'
|
|
10
|
-
import {DefineSanityLiveOptions} from '@sanity/next-loader'
|
|
11
|
-
import {default as groq} from 'groq'
|
|
12
|
-
import {isCorsOriginError} from '@sanity/next-loader'
|
|
13
|
-
import {stegaClean} from '@sanity/client/stega'
|
|
14
|
-
import {unstable__adapter} from '@sanity/client'
|
|
15
|
-
import {unstable__environment} from '@sanity/client'
|
|
16
|
-
import {VisualEditingOptions} from '@sanity/visual-editing/react'
|
|
17
|
-
|
|
18
|
-
export {CorsOriginError}
|
|
19
|
-
|
|
20
|
-
export {createClient}
|
|
21
|
-
|
|
22
|
-
export {CreateDataAttribute}
|
|
23
|
-
|
|
24
|
-
export {createDataAttribute}
|
|
25
|
-
|
|
26
|
-
export {CreateDataAttributeProps}
|
|
27
|
-
|
|
28
|
-
export {DefinedSanityFetchType}
|
|
29
|
-
|
|
30
|
-
export {DefinedSanityLiveProps}
|
|
31
|
-
|
|
32
|
-
export {DefinedSanityLiveStreamType}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated import `defineLive` from `next-sanity/live` instead
|
|
36
|
-
*/
|
|
37
|
-
export declare function defineLive(options: DefineSanityLiveOptions): {
|
|
38
|
-
sanityFetch: DefinedSanityFetchType
|
|
39
|
-
SanityLive: React.ComponentType<DefinedSanityLiveProps>
|
|
40
|
-
SanityLiveStream: DefinedSanityLiveStreamType
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export {defineQuery}
|
|
44
|
-
|
|
45
|
-
export {DefineSanityLiveOptions}
|
|
46
|
-
|
|
47
|
-
export {groq}
|
|
48
|
-
|
|
49
|
-
export {isCorsOriginError}
|
|
50
|
-
|
|
51
|
-
export {stegaClean}
|
|
52
|
-
|
|
53
|
-
export {unstable__adapter}
|
|
54
|
-
|
|
55
|
-
export {unstable__environment}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* @deprecated import `VisualEditing` from `next-sanity/visual-editing` instead
|
|
59
|
-
*/
|
|
60
|
-
export declare function VisualEditing(_props: VisualEditingProps): React.ReactNode
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* @public
|
|
64
|
-
*/
|
|
65
|
-
export declare interface VisualEditingProps extends Omit<VisualEditingOptions, 'history'> {
|
|
66
|
-
/**
|
|
67
|
-
* @deprecated The histoy adapter is already implemented
|
|
68
|
-
*/
|
|
69
|
-
history?: never
|
|
70
|
-
/**
|
|
71
|
-
* If next.config.ts is configured with a basePath we try to configure it automatically,
|
|
72
|
-
* you can disable this by setting basePath to ''.
|
|
73
|
-
* @example basePath="/my-custom-base-path"
|
|
74
|
-
* @alpha experimental and may change without notice
|
|
75
|
-
* @defaultValue process.env.__NEXT_ROUTER_BASEPATH || ''
|
|
76
|
-
*/
|
|
77
|
-
basePath?: string
|
|
78
|
-
/**
|
|
79
|
-
* If next.config.ts is configured with a `trailingSlash` we try to detect it automatically,
|
|
80
|
-
* it can be controlled manually by passing a boolean.
|
|
81
|
-
* @example trailingSlash={true}
|
|
82
|
-
* @alpha experimental and may change without notice
|
|
83
|
-
* @defaultValue Boolean(process.env.__NEXT_TRAILING_SLASH)
|
|
84
|
-
*/
|
|
85
|
-
trailingSlash?: boolean
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export * from '@portabletext/react'
|
|
89
|
-
export * from '@sanity/client'
|
|
90
|
-
|
|
91
|
-
export {}
|
package/dist/index.edge-light.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createClient, unstable__adapter, unstable__environment } from "@sanity/client";
|
|
2
|
-
import { stegaClean } from "@sanity/client/stega";
|
|
3
|
-
import { createDataAttribute } from "@sanity/visual-editing/create-data-attribute";
|
|
4
|
-
import { defineLive } from "./_chunks-es/deprecated-live.js";
|
|
5
|
-
export * from "@portabletext/react";
|
|
6
|
-
import { defineQuery, default as default2 } from "groq";
|
|
7
|
-
import { isCorsOriginError } from "@sanity/next-loader";
|
|
8
|
-
function VisualEditing(_props) {
|
|
9
|
-
throw new TypeError("VisualEditing is not supported on the edge runtime");
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
VisualEditing,
|
|
13
|
-
createClient,
|
|
14
|
-
createDataAttribute,
|
|
15
|
-
defineLive,
|
|
16
|
-
defineQuery,
|
|
17
|
-
default2 as groq,
|
|
18
|
-
isCorsOriginError,
|
|
19
|
-
stegaClean,
|
|
20
|
-
unstable__adapter,
|
|
21
|
-
unstable__environment
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=index.edge-light.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.edge-light.js","sources":["../src/index.edge-light.ts"],"sourcesContent":["/**\n * Some of the exports on index.ts causes errors on the edge runtime, so we omit them here.\n */\n\nexport * from './client'\nexport * from './create-data-attribute'\nexport * from './deprecated-live'\nexport * from '@portabletext/react'\nexport {defineQuery, default as groq} from 'groq'\nimport type {VisualEditingProps} from './visual-editing/VisualEditing'\nexport type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'\n\n/**\n * @deprecated import `VisualEditing` from `next-sanity/visual-editing` instead\n */\nexport function VisualEditing(_props: VisualEditingProps): React.ReactNode {\n throw new TypeError('VisualEditing is not supported on the edge runtime')\n}\n"],"names":[],"mappings":";;;;;;;AAeO,SAAS,cAAc,QAA6C;AACzE,QAAM,IAAI,UAAU,oDAAoD;AAC1E;"}
|
package/src/deprecated-live.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type CorsOriginError,
|
|
3
|
-
type DefineSanityLiveOptions,
|
|
4
|
-
type DefinedSanityFetchType,
|
|
5
|
-
type DefinedSanityLiveProps,
|
|
6
|
-
type DefinedSanityLiveStreamType,
|
|
7
|
-
isCorsOriginError,
|
|
8
|
-
defineLive as defineLiveImplementation,
|
|
9
|
-
} from '@sanity/next-loader'
|
|
10
|
-
|
|
11
|
-
export {
|
|
12
|
-
type CorsOriginError,
|
|
13
|
-
DefineSanityLiveOptions,
|
|
14
|
-
DefinedSanityFetchType,
|
|
15
|
-
DefinedSanityLiveProps,
|
|
16
|
-
DefinedSanityLiveStreamType,
|
|
17
|
-
isCorsOriginError,
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
let warned = false
|
|
21
|
-
/**
|
|
22
|
-
* @deprecated import `defineLive` from `next-sanity/live` instead
|
|
23
|
-
*/
|
|
24
|
-
export function defineLive(options: DefineSanityLiveOptions) {
|
|
25
|
-
if (!warned) {
|
|
26
|
-
console.warn(
|
|
27
|
-
`Importing defineLive from the root import is deprecated and will be removed in next-sanity v11. Please change "import {defineLive} from 'next-sanity'" to "import {definveLive} from 'next-sanity/live'"`,
|
|
28
|
-
)
|
|
29
|
-
warned = true
|
|
30
|
-
}
|
|
31
|
-
return defineLiveImplementation(options)
|
|
32
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type VisualEditingProps,
|
|
3
|
-
VisualEditing as VisualEditingComponent,
|
|
4
|
-
} from './visual-editing/VisualEditing'
|
|
5
|
-
export type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'
|
|
6
|
-
|
|
7
|
-
let warned = false
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated import `VisualEditing` from `next-sanity/visual-editing` instead
|
|
10
|
-
*/
|
|
11
|
-
export function VisualEditing(props: VisualEditingProps): React.ReactNode {
|
|
12
|
-
if (!warned) {
|
|
13
|
-
console.warn(
|
|
14
|
-
`Importing VisualEditing from the root import is deprecated and will be removed in next-sanity v11. Please change "import {VisualEditing} from 'next-sanity'" to "import {VisualEditing} from 'next-sanity/visual-editing'"`,
|
|
15
|
-
)
|
|
16
|
-
warned = true
|
|
17
|
-
}
|
|
18
|
-
return <VisualEditingComponent {...props} />
|
|
19
|
-
}
|
package/src/index.edge-light.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Some of the exports on index.ts causes errors on the edge runtime, so we omit them here.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
export * from './client'
|
|
6
|
-
export * from './create-data-attribute'
|
|
7
|
-
export * from './deprecated-live'
|
|
8
|
-
export * from '@portabletext/react'
|
|
9
|
-
export {defineQuery, default as groq} from 'groq'
|
|
10
|
-
import type {VisualEditingProps} from './visual-editing/VisualEditing'
|
|
11
|
-
export type {VisualEditingProps} from 'next-sanity/visual-editing/client-component'
|
|
12
|
-
|
|
13
|
-
/**
|
|
14
|
-
* @deprecated import `VisualEditing` from `next-sanity/visual-editing` instead
|
|
15
|
-
*/
|
|
16
|
-
export function VisualEditing(_props: VisualEditingProps): React.ReactNode {
|
|
17
|
-
throw new TypeError('VisualEditing is not supported on the edge runtime')
|
|
18
|
-
}
|