sanity-plugin-visual-editor 1.0.0 → 1.1.0
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/LICENSE +1 -1
- package/README.md +137 -16
- package/TESTING.md +133 -0
- package/dist/PreviewBar-D_rw0bhP.js +3503 -0
- package/dist/PreviewBar-D_rw0bhP.js.map +1 -0
- package/dist/bar.d.ts +22 -0
- package/dist/bar.js +67 -0
- package/dist/bar.js.map +1 -0
- package/dist/cloudflare.d.ts +76 -0
- package/dist/cloudflare.js +1071 -0
- package/dist/cloudflare.js.map +1 -0
- package/dist/data-D0qotTtt.d.ts +177 -0
- package/dist/host-DreYJEmR.js +615 -0
- package/dist/host-DreYJEmR.js.map +1 -0
- package/dist/host.d.ts +160 -0
- package/dist/host.js +3 -0
- package/dist/index-4Zm_NjhC.d.ts +221 -0
- package/dist/index.d.ts +18 -18
- package/dist/index.js +7 -8
- package/dist/link-search-JtZkxz4k.js +14 -0
- package/dist/link-search-JtZkxz4k.js.map +1 -0
- package/dist/link-session-Dr4YkKFy.js +52 -0
- package/dist/link-session-Dr4YkKFy.js.map +1 -0
- package/dist/next-client.d.ts +15 -0
- package/dist/next-client.js +78 -0
- package/dist/next-client.js.map +1 -0
- package/dist/next.d.ts +38 -0
- package/dist/next.js +117 -0
- package/dist/next.js.map +1 -0
- package/dist/node-labels-CDiW5rMq.js +122 -0
- package/dist/node-labels-CDiW5rMq.js.map +1 -0
- package/dist/page-documents-BFFcH8lD.d.ts +54 -0
- package/dist/page-documents-mGfw_flR.js +67 -0
- package/dist/page-documents-mGfw_flR.js.map +1 -0
- package/dist/perspective-BmS9TVtr.js +106 -0
- package/dist/perspective-BmS9TVtr.js.map +1 -0
- package/dist/preview-links-BZDZyIey.js +119 -0
- package/dist/preview-links-BZDZyIey.js.map +1 -0
- package/dist/preview-links-DM6BCiLV.d.ts +87 -0
- package/dist/protocol-BNO38gYy.js +280 -0
- package/dist/protocol-BNO38gYy.js.map +1 -0
- package/dist/protocol-BnRCy2wJ.d.ts +386 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +495 -0
- package/dist/server.js.map +1 -0
- package/dist/shell-DZotxRXX.d.ts +37 -0
- package/dist/studio.d.ts +93 -0
- package/dist/studio.js +1263 -0
- package/dist/studio.js.map +1 -0
- package/dist/sveltekit.d.ts +281 -0
- package/dist/sveltekit.js +395 -0
- package/dist/sveltekit.js.map +1 -0
- package/package.json +120 -39
- package/dist/index.d.mts +0 -21
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -8
- package/dist/index.mjs.map +0 -1
- package/sanity.json +0 -8
- package/src/index.ts +0 -27
- package/v2-incompatible.js +0 -11
package/package.json
CHANGED
|
@@ -1,72 +1,153 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sanity-plugin-visual-editor",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "",
|
|
3
|
+
"version": "1.1.0",
|
|
4
|
+
"description": "Visual Editor, preview bar, click-to-edit overlays, and Cloudflare realtime live edits for Sanity + SvelteKit and Next.js.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sanity",
|
|
7
|
-
"
|
|
7
|
+
"preview",
|
|
8
|
+
"presentation",
|
|
9
|
+
"visual-editing",
|
|
10
|
+
"content-releases",
|
|
11
|
+
"sveltekit",
|
|
12
|
+
"nextjs"
|
|
8
13
|
],
|
|
14
|
+
"homepage": "https://github.com/dennisregalado/sanity-plugin-visual-editor#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/dennisregalado/sanity-plugin-visual-editor/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/dennisregalado/sanity-plugin-visual-editor.git"
|
|
21
|
+
},
|
|
9
22
|
"license": "MIT",
|
|
10
23
|
"author": "Dennis Regalado <dennis@baggy.studio>",
|
|
11
24
|
"sideEffects": false,
|
|
12
|
-
"type": "
|
|
25
|
+
"type": "module",
|
|
13
26
|
"exports": {
|
|
14
27
|
".": {
|
|
15
|
-
"source": "./src/index.ts",
|
|
16
|
-
"import": "./dist/index.mjs",
|
|
28
|
+
"source": "./src/core/index.ts",
|
|
17
29
|
"default": "./dist/index.js"
|
|
18
30
|
},
|
|
31
|
+
"./bar": {
|
|
32
|
+
"source": "./src/bar/index.ts",
|
|
33
|
+
"default": "./dist/bar.js"
|
|
34
|
+
},
|
|
35
|
+
"./host": {
|
|
36
|
+
"source": "./src/host/index.ts",
|
|
37
|
+
"default": "./dist/host.js"
|
|
38
|
+
},
|
|
39
|
+
"./server": {
|
|
40
|
+
"source": "./src/server/index.ts",
|
|
41
|
+
"default": "./dist/server.js"
|
|
42
|
+
},
|
|
43
|
+
"./sveltekit": {
|
|
44
|
+
"source": "./src/sveltekit/index.ts",
|
|
45
|
+
"default": "./dist/sveltekit.js"
|
|
46
|
+
},
|
|
47
|
+
"./next": {
|
|
48
|
+
"source": "./src/next/index.ts",
|
|
49
|
+
"default": "./dist/next.js"
|
|
50
|
+
},
|
|
51
|
+
"./next/client": {
|
|
52
|
+
"source": "./src/next/client.tsx",
|
|
53
|
+
"default": "./dist/next-client.js"
|
|
54
|
+
},
|
|
55
|
+
"./studio": {
|
|
56
|
+
"source": "./src/studio/index.ts",
|
|
57
|
+
"default": "./dist/studio.js"
|
|
58
|
+
},
|
|
59
|
+
"./cloudflare": {
|
|
60
|
+
"source": "./src/cloudflare/index.ts",
|
|
61
|
+
"default": "./dist/cloudflare.js"
|
|
62
|
+
},
|
|
19
63
|
"./package.json": "./package.json"
|
|
20
64
|
},
|
|
21
|
-
"main": "./dist/index.js",
|
|
22
65
|
"types": "./dist/index.d.ts",
|
|
66
|
+
"browserslist": "extends @sanity/browserslist-config",
|
|
23
67
|
"files": [
|
|
24
68
|
"dist",
|
|
25
|
-
"
|
|
26
|
-
"src",
|
|
27
|
-
"v2-incompatible.js"
|
|
69
|
+
"TESTING.md"
|
|
28
70
|
],
|
|
29
71
|
"scripts": {
|
|
30
|
-
"build": "
|
|
72
|
+
"build": "pkg-utils build --strict --check --clean",
|
|
73
|
+
"example": "vite examples/click-to-edit",
|
|
31
74
|
"format": "prettier --write --cache --ignore-unknown .",
|
|
32
|
-
"
|
|
33
|
-
"
|
|
34
|
-
"
|
|
75
|
+
"lint": "prettier --check . && tsc --noEmit",
|
|
76
|
+
"prepublishOnly": "npm run build && npm test",
|
|
77
|
+
"test": "vitest run",
|
|
35
78
|
"watch": "pkg-utils watch --strict"
|
|
36
79
|
},
|
|
37
80
|
"dependencies": {
|
|
38
|
-
"@sanity/
|
|
81
|
+
"@sanity/icons": "^5.3.0",
|
|
82
|
+
"@sanity/logos": "^2.2.6",
|
|
83
|
+
"@sanity/preview-url-secret": "^4.1.5",
|
|
84
|
+
"@sanity/ui": "^4.4.12",
|
|
85
|
+
"motion": "^14.14.0",
|
|
86
|
+
"qrcode.react": "^4.2.0"
|
|
39
87
|
},
|
|
40
88
|
"devDependencies": {
|
|
41
|
-
"@sanity/
|
|
42
|
-
"@sanity/
|
|
43
|
-
"@
|
|
44
|
-
"@
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
47
|
-
"
|
|
48
|
-
"
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"sanity": "^4.10.2",
|
|
57
|
-
"styled-components": "^6.1.19",
|
|
58
|
-
"typescript": "^5.9.3"
|
|
89
|
+
"@sanity/client": "^8.15.1",
|
|
90
|
+
"@sanity/pkg-utils": "^13.0.18",
|
|
91
|
+
"@sveltejs/kit": "^3.2.0",
|
|
92
|
+
"@types/react": "^19.3.0",
|
|
93
|
+
"@types/react-dom": "^19.3.0",
|
|
94
|
+
"history": "^5.3.0",
|
|
95
|
+
"next": "^16.4.6",
|
|
96
|
+
"prettier": "^3.10.0",
|
|
97
|
+
"prettier-plugin-packagejson": "^3.0.2",
|
|
98
|
+
"react": "^19.3.1",
|
|
99
|
+
"react-dom": "^19.3.1",
|
|
100
|
+
"sanity": "^6.23.0",
|
|
101
|
+
"styled-components": "^6.6.0",
|
|
102
|
+
"typescript": "~6.0.3",
|
|
103
|
+
"vitest": "^5.1.0"
|
|
59
104
|
},
|
|
60
105
|
"peerDependencies": {
|
|
61
|
-
"
|
|
62
|
-
"
|
|
106
|
+
"@portabletext/editor": "^5 || ^6 || ^7 || ^8",
|
|
107
|
+
"@sveltejs/kit": "^2 || ^3",
|
|
108
|
+
"groq-js": "^2",
|
|
109
|
+
"history": "^5",
|
|
110
|
+
"next": "^15 || ^16",
|
|
111
|
+
"react": "^18 || ^19",
|
|
112
|
+
"react-dom": "^18 || ^19",
|
|
113
|
+
"sanity": "^6",
|
|
114
|
+
"styled-components": "^6.1"
|
|
115
|
+
},
|
|
116
|
+
"peerDependenciesMeta": {
|
|
117
|
+
"@portabletext/editor": {
|
|
118
|
+
"optional": true
|
|
119
|
+
},
|
|
120
|
+
"@sveltejs/kit": {
|
|
121
|
+
"optional": true
|
|
122
|
+
},
|
|
123
|
+
"groq-js": {
|
|
124
|
+
"optional": true
|
|
125
|
+
},
|
|
126
|
+
"next": {
|
|
127
|
+
"optional": true
|
|
128
|
+
},
|
|
129
|
+
"sanity": {
|
|
130
|
+
"optional": true
|
|
131
|
+
},
|
|
132
|
+
"history": {
|
|
133
|
+
"optional": true
|
|
134
|
+
}
|
|
63
135
|
},
|
|
64
136
|
"engines": {
|
|
65
|
-
"node": ">=
|
|
137
|
+
"node": ">=20.19 <22 || >=22.12"
|
|
66
138
|
},
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
139
|
+
"publishConfig": {
|
|
140
|
+
"exports": {
|
|
141
|
+
".": "./dist/index.js",
|
|
142
|
+
"./bar": "./dist/bar.js",
|
|
143
|
+
"./host": "./dist/host.js",
|
|
144
|
+
"./server": "./dist/server.js",
|
|
145
|
+
"./sveltekit": "./dist/sveltekit.js",
|
|
146
|
+
"./next": "./dist/next.js",
|
|
147
|
+
"./next/client": "./dist/next-client.js",
|
|
148
|
+
"./studio": "./dist/studio.js",
|
|
149
|
+
"./cloudflare": "./dist/cloudflare.js",
|
|
150
|
+
"./package.json": "./package.json"
|
|
70
151
|
}
|
|
71
152
|
}
|
|
72
153
|
}
|
package/dist/index.d.mts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {Plugin as Plugin_2} from 'sanity'
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Usage in `sanity.config.ts` (or .js)
|
|
5
|
-
*
|
|
6
|
-
* ```ts
|
|
7
|
-
* import {defineConfig} from 'sanity'
|
|
8
|
-
* import {myPlugin} from 'sanity-plugin-visual-editor'
|
|
9
|
-
*
|
|
10
|
-
* export default defineConfig({
|
|
11
|
-
* // ...
|
|
12
|
-
* plugins: [myPlugin()],
|
|
13
|
-
* })
|
|
14
|
-
* ```
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
|
-
export declare const myPlugin: Plugin_2<void | MyPluginConfig>
|
|
18
|
-
|
|
19
|
-
declare interface MyPluginConfig {}
|
|
20
|
-
|
|
21
|
-
export {}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import {definePlugin} from 'sanity'\n\ninterface MyPluginConfig {\n /* nothing here yet */\n}\n\n/**\n * Usage in `sanity.config.ts` (or .js)\n *\n * ```ts\n * import {defineConfig} from 'sanity'\n * import {myPlugin} from 'sanity-plugin-visual-editor'\n *\n * export default defineConfig({\n * // ...\n * plugins: [myPlugin()],\n * })\n * ```\n * @public\n */\nexport const myPlugin = definePlugin<MyPluginConfig | void>((config = {}) => {\n // eslint-disable-next-line no-console\n console.log('hello from sanity-plugin-visual-editor')\n return {\n name: 'sanity-plugin-visual-editor',\n }\n})\n"],"names":["definePlugin"],"mappings":";;;AAoBO,MAAM,WAAWA,OAAAA,aAAoC,CAAC,SAAS,CAAA,OAEpE,QAAQ,IAAI,wCAAwC,GAC7C;AAAA,EACL,MAAM;AACR,EACD;;"}
|
package/dist/index.mjs
DELETED
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import {definePlugin} from 'sanity'\n\ninterface MyPluginConfig {\n /* nothing here yet */\n}\n\n/**\n * Usage in `sanity.config.ts` (or .js)\n *\n * ```ts\n * import {defineConfig} from 'sanity'\n * import {myPlugin} from 'sanity-plugin-visual-editor'\n *\n * export default defineConfig({\n * // ...\n * plugins: [myPlugin()],\n * })\n * ```\n * @public\n */\nexport const myPlugin = definePlugin<MyPluginConfig | void>((config = {}) => {\n // eslint-disable-next-line no-console\n console.log('hello from sanity-plugin-visual-editor')\n return {\n name: 'sanity-plugin-visual-editor',\n }\n})\n"],"names":[],"mappings":";AAoBO,MAAM,WAAW,aAAoC,CAAC,SAAS,CAAA,OAEpE,QAAQ,IAAI,wCAAwC,GAC7C;AAAA,EACL,MAAM;AACR,EACD;"}
|
package/sanity.json
DELETED
package/src/index.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {definePlugin} from 'sanity'
|
|
2
|
-
|
|
3
|
-
interface MyPluginConfig {
|
|
4
|
-
/* nothing here yet */
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Usage in `sanity.config.ts` (or .js)
|
|
9
|
-
*
|
|
10
|
-
* ```ts
|
|
11
|
-
* import {defineConfig} from 'sanity'
|
|
12
|
-
* import {myPlugin} from 'sanity-plugin-visual-editor'
|
|
13
|
-
*
|
|
14
|
-
* export default defineConfig({
|
|
15
|
-
* // ...
|
|
16
|
-
* plugins: [myPlugin()],
|
|
17
|
-
* })
|
|
18
|
-
* ```
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export const myPlugin = definePlugin<MyPluginConfig | void>((config = {}) => {
|
|
22
|
-
// eslint-disable-next-line no-console
|
|
23
|
-
console.log('hello from sanity-plugin-visual-editor')
|
|
24
|
-
return {
|
|
25
|
-
name: 'sanity-plugin-visual-editor',
|
|
26
|
-
}
|
|
27
|
-
})
|
package/v2-incompatible.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const {showIncompatiblePluginDialog} = require('@sanity/incompatible-plugin')
|
|
2
|
-
const {name, version, sanityExchangeUrl} = require('./package.json')
|
|
3
|
-
|
|
4
|
-
export default showIncompatiblePluginDialog({
|
|
5
|
-
name: name,
|
|
6
|
-
versions: {
|
|
7
|
-
v3: version,
|
|
8
|
-
v2: undefined,
|
|
9
|
-
},
|
|
10
|
-
sanityExchangeUrl,
|
|
11
|
-
})
|