@sanity/cli 3.88.4-media-library.21 → 3.90.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/lib/_chunks-cjs/cli.js +4 -17
- package/lib/_chunks-cjs/cli.js.map +1 -1
- package/package.json +8 -8
- package/src/actions/init-project/createStudioConfig.ts +0 -13
- package/src/actions/init-project/templates/appQuickstart.ts +2 -2
- package/src/actions/init-project/templates/appSanityUi.ts +2 -2
- package/templates/app-quickstart/src/ExampleComponent.css +6 -0
- package/templates/app-sanity-ui/src/App.tsx +5 -7
- package/templates/app-sanity-ui/src/SanityUI.tsx +23 -0
- package/bin/xdg-open +0 -1066
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sanity/cli",
|
3
|
-
"version": "3.
|
3
|
+
"version": "3.90.0",
|
4
4
|
"description": "Sanity CLI tool for managing Sanity installations, managing plugins, schemas and datasets",
|
5
5
|
"keywords": [
|
6
6
|
"sanity",
|
@@ -58,12 +58,12 @@
|
|
58
58
|
},
|
59
59
|
"dependencies": {
|
60
60
|
"@babel/traverse": "^7.23.5",
|
61
|
-
"@sanity/client": "^7.
|
62
|
-
"@sanity/codegen": "3.
|
61
|
+
"@sanity/client": "^7.3.0",
|
62
|
+
"@sanity/codegen": "3.90.0",
|
63
63
|
"@sanity/runtime-cli": "^7.3.2",
|
64
64
|
"@sanity/telemetry": "^0.8.0",
|
65
65
|
"@sanity/template-validator": "^2.4.3",
|
66
|
-
"@sanity/util": "3.
|
66
|
+
"@sanity/util": "3.90.0",
|
67
67
|
"chalk": "^4.1.2",
|
68
68
|
"debug": "^4.3.4",
|
69
69
|
"decompress": "^4.2.0",
|
@@ -77,13 +77,13 @@
|
|
77
77
|
"validate-npm-package-name": "^3.0.0"
|
78
78
|
},
|
79
79
|
"devDependencies": {
|
80
|
-
"@repo/package.config": "3.
|
81
|
-
"@repo/test-config": "3.
|
80
|
+
"@repo/package.config": "3.90.0",
|
81
|
+
"@repo/test-config": "3.90.0",
|
82
82
|
"@rexxars/gitconfiglocal": "^3.0.1",
|
83
83
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
84
84
|
"@sanity/eslint-config-studio": "^4.0.0",
|
85
85
|
"@sanity/generate-help-url": "^3.0.0",
|
86
|
-
"@sanity/types": "3.
|
86
|
+
"@sanity/types": "3.90.0",
|
87
87
|
"@types/babel__traverse": "^7.20.5",
|
88
88
|
"@types/configstore": "^5.0.1",
|
89
89
|
"@types/cpx": "^1.5.2",
|
@@ -135,5 +135,5 @@
|
|
135
135
|
"engines": {
|
136
136
|
"node": ">=18"
|
137
137
|
},
|
138
|
-
"gitHead": "
|
138
|
+
"gitHead": "413ed0f70a6d2076ad9976d6cd17ede4c28d2aeb"
|
139
139
|
}
|
@@ -18,19 +18,6 @@ export default defineConfig({
|
|
18
18
|
schema: {
|
19
19
|
types: schemaTypes,
|
20
20
|
},
|
21
|
-
|
22
|
-
mediaLibrary: {
|
23
|
-
enabled: true
|
24
|
-
},
|
25
|
-
|
26
|
-
form: {
|
27
|
-
image: {
|
28
|
-
assetSources: (sources) => sources.filter((source) => source.name !== 'sanity-default')
|
29
|
-
},
|
30
|
-
file: {
|
31
|
-
assetSources: (sources) => sources.filter((source) => source.name !== 'sanity-default')
|
32
|
-
}
|
33
|
-
},
|
34
21
|
})
|
35
22
|
`
|
36
23
|
|
@@ -2,8 +2,8 @@ import {type ProjectTemplate} from '../initProject'
|
|
2
2
|
|
3
3
|
const appSanityUiTemplate: ProjectTemplate = {
|
4
4
|
dependencies: {
|
5
|
-
'@sanity/sdk': '^
|
6
|
-
'@sanity/sdk-react': '^
|
5
|
+
'@sanity/sdk': '^2',
|
6
|
+
'@sanity/sdk-react': '^2',
|
7
7
|
'@sanity/ui': '^2',
|
8
8
|
'react': '^19',
|
9
9
|
'react-dom': '^19',
|
@@ -1,10 +1,8 @@
|
|
1
1
|
import {type SanityConfig} from '@sanity/sdk'
|
2
2
|
import {SanityApp} from '@sanity/sdk-react'
|
3
|
-
import {Flex, Spinner
|
4
|
-
import {buildTheme} from '@sanity/ui/theme'
|
3
|
+
import {Flex, Spinner} from '@sanity/ui'
|
5
4
|
import {ExampleComponent} from './ExampleComponent'
|
6
|
-
|
7
|
-
const theme = buildTheme()
|
5
|
+
import {SanityUI} from './SanityUI'
|
8
6
|
|
9
7
|
function App() {
|
10
8
|
// apps can access many different projects or other sources of data
|
@@ -17,19 +15,19 @@ function App() {
|
|
17
15
|
|
18
16
|
function Loading() {
|
19
17
|
return (
|
20
|
-
<Flex justify=
|
18
|
+
<Flex justify="center" align="center" width="100vw" height="fill">
|
21
19
|
<Spinner />
|
22
20
|
</Flex>
|
23
21
|
)
|
24
22
|
}
|
25
23
|
|
26
24
|
return (
|
27
|
-
<
|
25
|
+
<SanityUI>
|
28
26
|
<SanityApp config={sanityConfigs} fallback={<Loading />}>
|
29
27
|
{/* add your own components here! */}
|
30
28
|
<ExampleComponent />
|
31
29
|
</SanityApp>
|
32
|
-
</
|
30
|
+
</SanityUI>
|
33
31
|
);
|
34
32
|
}
|
35
33
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import {ThemeProvider, ToastProvider} from '@sanity/ui'
|
2
|
+
import {buildTheme} from '@sanity/ui/theme'
|
3
|
+
import {createGlobalStyle} from 'styled-components'
|
4
|
+
|
5
|
+
const theme = buildTheme()
|
6
|
+
|
7
|
+
const GlobalStyle = createGlobalStyle`
|
8
|
+
html, body {
|
9
|
+
margin: 0;
|
10
|
+
padding: 0;
|
11
|
+
}
|
12
|
+
`
|
13
|
+
|
14
|
+
export function SanityUI({children}: {children: React.ReactNode}) {
|
15
|
+
return (
|
16
|
+
<>
|
17
|
+
<GlobalStyle />
|
18
|
+
<ThemeProvider theme={theme}>
|
19
|
+
<ToastProvider>{children}</ToastProvider>
|
20
|
+
</ThemeProvider>
|
21
|
+
</>
|
22
|
+
)
|
23
|
+
}
|