Skip to content

Commit ea93fea

Browse files
committed
Merge branch 'next' into corel
* next: (25 commits) fix(deps): update dependency @sanity/ui to ^2.8.16 (#7723) fix(deps): update dependency @sanity/ui to ^2.8.16 (#7722) chore(lockfile): update dependency @sanity/asset-utils to v2.0.7 (#7721) fix(deps): update dependency @sanity/ui to ^2.8.15 (#7717) fix(deps): update dependency @sanity/ui to ^2.8.15 (#7718) fix(deps): Update babel monorepo (#7719) chore(deps): update typescript-tooling (#7681) chore(deps): bump react-compiler linter (#7715) fix(deps): Update dev-non-major (#7708) fix(deps): update dependency react-rx to ^4.1.0 (#7714) fix(deps): update dependency @portabletext/editor to ^1.2.0 (#7709) chore(deps): update dependency lerna to ^8.1.9 (#7711) fix(deps): update dependency @sanity/ui to ^2.8.14 (#7713) chore: telemetry definition files are owned by @data-eng (#7703) fix(deps): update dependency react-rx to ^4.0.1 (#7712) fix(deps): Update dev-non-major (#7693) chore(deps): update dependency @vitejs/plugin-react to ^4.3.3 (#7688) fix(deps): update dependency @sanity/ui to ^2.8.13 (#7694) fix(deps): update dependency @portabletext/editor to ^1.1.11 (#7667) feat(cli): prepare nextjs starter template for live mode (#7633) ...
2 parents aef9dcc + 3048630 commit ea93fea

File tree

22 files changed

+1772
-1554
lines changed

22 files changed

+1772
-1554
lines changed

.github/CODEOWNERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ packages/sanity/src/structure/panes/documentList/sheetList @sanity-io/studio-ex
4848
/packages/@sanity/cli/templates/shopify* @thebiggianthead
4949

5050
# Telemetry definitions
51-
*.telemetry.ts @sanity-io/growth
51+
*.telemetry.ts @sanity-io/data-eng
5252

5353
# -- Plugins --
5454

dev/design-studio/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
},
3333
"dependencies": {
3434
"@sanity/icons": "^3.4.0",
35-
"@sanity/ui": "^2.8.10",
35+
"@sanity/ui": "^2.8.16",
3636
"react": "^18.3.1",
3737
"react-dom": "^18.3.1",
3838
"sanity": "workspace:*",

dev/embedded-studio/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"preview": "vite preview"
99
},
1010
"dependencies": {
11-
"@sanity/ui": "^2.8.10",
11+
"@sanity/ui": "^2.8.16",
1212
"react": "^18.3.1",
1313
"react-dom": "^18.3.1",
1414
"sanity": "workspace:*",

dev/studio-e2e-testing/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"dependencies": {
1818
"@sanity/google-maps-input": "^4.0.0",
1919
"@sanity/icons": "^3.4.0",
20-
"@sanity/ui": "^2.8.10",
21-
"@sanity/vision": "3.62.2",
20+
"@sanity/ui": "^2.8.16",
21+
"@sanity/vision": "3.62.3",
2222
"react": "^18.3.1",
2323
"react-dom": "^18.3.1",
2424
"sanity": "workspace:*",

dev/test-next-studio/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"dependencies": {
1414
"@sanity/vision": "workspace:*",
1515
"babel-plugin-react-compiler": "0.0.0-experimental-de2cfda-20240912",
16-
"next": "15.0.1",
16+
"next": "15.0.2",
1717
"react": "19.0.0-rc-a7d1240c-20240731",
1818
"react-dom": "19.0.0-rc-a7d1240c-20240731",
1919
"react-is": "19.0.0-rc-a7d1240c-20240731",

dev/test-studio/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"workshop:dev": "node -r esbuild-register scripts/workshop/dev.ts"
1717
},
1818
"dependencies": {
19-
"@portabletext/editor": "^1.1.7",
19+
"@portabletext/editor": "^1.2.0",
2020
"@portabletext/react": "^3.0.0",
2121
"@sanity/assist": "^3.0.2",
22-
"@sanity/block-tools": "3.62.2",
22+
"@sanity/block-tools": "3.62.3",
2323
"@sanity/client": "^6.22.2",
2424
"@sanity/color": "^3.0.0",
2525
"@sanity/google-maps-input": "^4.0.0",
@@ -34,9 +34,9 @@
3434
"@sanity/migrate": "workspace:*",
3535
"@sanity/preview-url-secret": "^2.0.1-release.0",
3636
"@sanity/react-loader": "^1.10.15-release.0",
37-
"@sanity/tsdoc": "1.0.113",
37+
"@sanity/tsdoc": "1.0.122",
3838
"@sanity/types": "workspace:*",
39-
"@sanity/ui": "^2.8.10",
39+
"@sanity/ui": "^2.8.16",
4040
"@sanity/ui-workshop": "^1.0.0",
4141
"@sanity/util": "workspace:*",
4242
"@sanity/uuid": "^3.0.1",

examples/ecommerce-studio/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
},
3131
"dependencies": {
3232
"@sanity/cli": "3.62.2",
33-
"@sanity/ui": "^2.8.10",
33+
"@sanity/ui": "^2.8.16",
3434
"react": "^18.3.1",
3535
"react-barcode": "^1.4.1",
3636
"react-dom": "^18.3.1",

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"check:deps": "pnpm --recursive --parallel exec depcheck",
1818
"check:format": "prettier . --check",
1919
"check:lint": "turbo run lint --continue -- --quiet",
20-
"check:react-compiler": "eslint --no-inline-config --no-eslintrc --ext .cjs,.mjs,.js,.jsx,.ts,.tsx --parser @typescript-eslint/parser --plugin react-compiler --rule 'react-compiler/react-compiler: [warn]' --ignore-path .eslintignore.react-compiler --max-warnings 7 .",
20+
"check:react-compiler": "eslint --no-inline-config --no-eslintrc --ext .cjs,.mjs,.js,.jsx,.ts,.tsx --parser @typescript-eslint/parser --plugin react-compiler --rule 'react-compiler/react-compiler: [warn]' --ignore-path .eslintignore.react-compiler --max-warnings 80 .",
2121
"check:test": "run-s test -- --silent",
2222
"check:types": "tsc && turbo run check:types --filter='./packages/*' --filter='./packages/@sanity/*'",
2323
"chore:format:fix": "prettier --cache --write .",
@@ -111,10 +111,10 @@
111111
"@sanity/eslint-config-i18n": "1.0.0",
112112
"@sanity/eslint-config-studio": "^4.0.0",
113113
"@sanity/mutate": "^0.10.1",
114-
"@sanity/pkg-utils": "6.11.4",
114+
"@sanity/pkg-utils": "6.11.8",
115115
"@sanity/prettier-config": "^1.0.2",
116116
"@sanity/test": "0.0.1-alpha.1",
117-
"@sanity/tsdoc": "1.0.113",
117+
"@sanity/tsdoc": "1.0.122",
118118
"@sanity/ui": "2.10.0-corel.0",
119119
"@sanity/uuid": "^3.0.2",
120120
"@types/glob": "^7.2.0",
@@ -125,7 +125,7 @@
125125
"@types/yargs": "^17.0.7",
126126
"@typescript-eslint/eslint-plugin": "^7.18.0",
127127
"@typescript-eslint/parser": "^7.18.0",
128-
"@vitejs/plugin-react": "^4.3.1",
128+
"@vitejs/plugin-react": "^4.3.3",
129129
"cac": "^6.7.12",
130130
"chalk": "^4.1.2",
131131
"depcheck": "^1.4.7",
@@ -142,7 +142,7 @@
142142
"eslint-plugin-import": "^2.30.0",
143143
"eslint-plugin-prettier": "^5.2.1",
144144
"eslint-plugin-react": "^7.36.1",
145-
"eslint-plugin-react-compiler": "0.0.0-experimental-9ed098e-20240725",
145+
"eslint-plugin-react-compiler": "beta",
146146
"eslint-plugin-react-hooks": "^4.6.2",
147147
"eslint-plugin-simple-import-sort": "^12.1.1",
148148
"eslint-plugin-tsdoc": "^0.3.0",
@@ -154,7 +154,7 @@
154154
"husky": "^9.0.11",
155155
"jest": "^29.7.0",
156156
"js-yaml": "^4.1.0",
157-
"lerna": "^8.1.8",
157+
"lerna": "^8.1.9",
158158
"lint-staged": "^12.1.2",
159159
"lodash": "^4.17.21",
160160
"minimist": "^1.2.5",

packages/@repo/test-config/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99
"./vitest": "./vitest/index.mjs"
1010
},
1111
"devDependencies": {
12-
"@babel/preset-env": "^7.24.7",
13-
"@babel/preset-react": "^7.24.7",
14-
"@babel/preset-typescript": "^7.24.7",
12+
"@babel/preset-env": "^7.26.0",
13+
"@babel/preset-react": "^7.25.9",
14+
"@babel/preset-typescript": "^7.26.0",
1515
"@jest/globals": "^29.7.0",
1616
"@repo/dev-aliases": "workspace:*",
1717
"babel-plugin-transform-vite-meta-hot": "^1.0.0",

packages/@sanity/cli/src/actions/init-project/templates/nextjs/index.ts

+16
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,21 @@ export const client = createClient({
165165
})
166166
`
167167

168+
const live = `// Querying with "sanityFetch" will keep content automatically updated
169+
// Before using it, import and render "<SanityLive />" in your layout, see
170+
// https://github.com/sanity-io/next-sanity#live-content-api for more information.
171+
import { defineLive } from "next-sanity";
172+
import { client } from './client'
173+
174+
export const { sanityFetch, SanityLive } = defineLive({
175+
client: client.withConfig({
176+
// Live content is currently only available on the experimental API
177+
// https://www.sanity.io/docs/api-versioning
178+
apiVersion: 'vX'
179+
})
180+
});
181+
`
182+
168183
const imageTS = `import createImageUrlBuilder from '@sanity/image-url'
169184
import { SanityImageSource } from "@sanity/image-url/lib/types/types";
170185
@@ -201,6 +216,7 @@ export const sanityFolder = (
201216
'env.': useTypeScript ? envTS : envJS,
202217
'lib': {
203218
'client.': client,
219+
'live.': live,
204220
'image.': useTypeScript ? imageTS : imageJS,
205221
},
206222
}

packages/@sanity/types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@repo/package.config": "workspace:*",
5757
"@repo/test-config": "workspace:*",
5858
"@sanity/insert-menu": "1.0.10",
59-
"@vitejs/plugin-react": "^4.3.1",
59+
"@vitejs/plugin-react": "^4.3.3",
6060
"react": "^18.3.1",
6161
"rimraf": "^3.0.2",
6262
"vitest": "^2.1.1"

packages/@sanity/vision/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
"@rexxars/react-split-pane": "^0.1.93",
6464
"@sanity/color": "^3.0.0",
6565
"@sanity/icons": "^3.4.0",
66-
"@sanity/ui": "^2.8.10",
66+
"@sanity/ui": "^2.8.16",
6767
"@uiw/react-codemirror": "^4.11.4",
6868
"is-hotkey-esm": "^1.0.0",
6969
"json-2-csv": "^5.5.1",

packages/sanity/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@
153153
"@dnd-kit/sortable": "^7.0.1",
154154
"@dnd-kit/utilities": "^3.2.0",
155155
"@juggle/resize-observer": "^3.3.1",
156-
"@portabletext/editor": "^1.1.5",
156+
"@portabletext/editor": "^1.2.0",
157157
"@portabletext/react": "^3.0.0",
158158
"@rexxars/react-json-inspector": "^8.0.1",
159159
"@sanity/asset-utils": "^2.0.6",
@@ -177,7 +177,7 @@
177177
"@sanity/schema": "3.62.2",
178178
"@sanity/telemetry": "^0.7.7",
179179
"@sanity/types": "3.62.2",
180-
"@sanity/ui": "^2.8.10",
180+
"@sanity/ui": "^2.8.16",
181181
"@sanity/util": "3.62.2",
182182
"@sanity/uuid": "^3.0.1",
183183
"@sentry/react": "^8.7.0",
@@ -244,7 +244,7 @@
244244
"react-i18next": "14.0.2",
245245
"react-is": "^18.2.0",
246246
"react-refractor": "^2.1.6",
247-
"react-rx": "^4.0.0",
247+
"react-rx": "^4.1.0",
248248
"read-pkg-up": "^7.0.1",
249249
"refractor": "^3.6.0",
250250
"resolve-from": "^5.0.0",
@@ -276,8 +276,8 @@
276276
"@repo/test-config": "workspace:*",
277277
"@sanity/codegen": "3.62.2",
278278
"@sanity/generate-help-url": "^3.0.0",
279-
"@sanity/pkg-utils": "6.11.4",
280-
"@sanity/tsdoc": "1.0.113",
279+
"@sanity/pkg-utils": "6.11.8",
280+
"@sanity/tsdoc": "1.0.122",
281281
"@sanity/ui-workshop": "^1.2.11",
282282
"@sentry/types": "^8.12.0",
283283
"@testing-library/jest-dom": "^6.4.8",
@@ -300,7 +300,7 @@
300300
"@types/rimraf": "^3.0.2",
301301
"@types/semver": "^6.2.3",
302302
"@types/tar-fs": "^2.0.1",
303-
"@vitejs/plugin-react": "^4.3.1",
303+
"@vitejs/plugin-react": "^4.3.3",
304304
"@vvo/tzdb": "6.137.0",
305305
"blob-polyfill": "^9.0.20240710",
306306
"date-fns-tz": "2.0.1",

packages/sanity/src/core/scheduledPublishing/tool/Tool.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export default function Tool() {
132132
</Box>
133133
)}
134134

135-
<Box flex={1}>
135+
<Box flex={1} overflow="auto">
136136
{isInitialLoading ? (
137137
<Box padding={4}>
138138
<Text muted>Loading...</Text>

packages/sanity/src/core/scheduledPublishing/tool/schedules/VirtualList.tsx

+1-13
Original file line numberDiff line numberDiff line change
@@ -36,19 +36,7 @@ const VirtualList = () => {
3636
}, [scheduleState, sortBy, containerRef])
3737

3838
return (
39-
<Box
40-
paddingBottom={6}
41-
paddingTop={1}
42-
paddingX={4}
43-
ref={containerRef}
44-
style={{
45-
position: 'relative',
46-
overflowX: 'hidden',
47-
overflowY: 'auto',
48-
height: '100%',
49-
boxSizing: 'border-box',
50-
}}
51-
>
39+
<Box paddingBottom={6} paddingTop={1} paddingX={4} ref={containerRef} overflow="hidden">
5240
<Box
5341
style={{
5442
height: `${totalSize}px`,

packages/sanity/src/core/store/_legacy/grants/__tests__/templatePermissions.test.ts

+16-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/* eslint-disable camelcase */
22
import {type SanityClient} from '@sanity/client'
3-
import {type InitialValueResolverContext} from '@sanity/types'
3+
import {type InitialValueResolverContext, type Schema} from '@sanity/types'
44
import {firstValueFrom} from 'rxjs'
55
import {describe, expect, it} from 'vitest'
66

@@ -51,6 +51,14 @@ describe('getTemplatePermissions', () => {
5151
userId: null,
5252
})
5353

54+
const context: InitialValueResolverContext = {
55+
projectId: 'test-project',
56+
dataset: 'test-dataset',
57+
schema: schema as Schema,
58+
currentUser: null,
59+
getClient: () => client as unknown as SanityClient,
60+
}
61+
5462
const permissions = firstValueFrom(
5563
getTemplatePermissions({
5664
grantsStore,
@@ -62,15 +70,17 @@ describe('getTemplatePermissions', () => {
6270
templateId: 'author-developer-locked',
6371
type: 'initialValueTemplateItem',
6472
schemaType: 'author',
73+
parameters: {},
6574
},
6675
{
6776
id: 'author-developer-unlocked',
6877
templateId: 'author-developer-unlocked',
6978
type: 'initialValueTemplateItem',
7079
schemaType: 'author',
80+
parameters: {},
7181
},
7282
],
73-
context: {} as InitialValueResolverContext,
83+
context,
7484
}),
7585
)
7686

@@ -79,6 +89,7 @@ describe('getTemplatePermissions', () => {
7989
description: undefined,
8090
granted: false,
8191
icon: undefined,
92+
i18n: undefined,
8293
schemaType: 'author',
8394
id: 'author-developer-locked',
8495
reason: 'No matching grants found',
@@ -93,11 +104,13 @@ describe('getTemplatePermissions', () => {
93104
templateId: 'author-developer-locked',
94105
title: 'Developer',
95106
type: 'initialValueTemplateItem',
107+
parameters: {},
96108
},
97109
{
98110
description: undefined,
99111
granted: true,
100112
icon: undefined,
113+
i18n: undefined,
101114
schemaType: 'author',
102115
id: 'author-developer-unlocked',
103116
reason: 'Matching grant',
@@ -112,6 +125,7 @@ describe('getTemplatePermissions', () => {
112125
templateId: 'author-developer-unlocked',
113126
title: 'Developer',
114127
type: 'initialValueTemplateItem',
128+
parameters: {},
115129
},
116130
])
117131
})

0 commit comments

Comments
 (0)