diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
index 37ccbbae9..bb50d6b67 100644
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -91,6 +91,6 @@ jobs:
done_state_id: "5a35b7bf-6d37-4cc2-854a-2f18d160e2e5"
- name: Trigger CircleCI Pipeline
- uses: CircleCI-Public/trigger-circleci-pipeline-action@v1.0.5
+ uses: CircleCI-Public/trigger-circleci-pipeline-action@ef1944e67053c1923ad772d2377575f2fd962169 # v1.0.5
env:
CCI_TOKEN: ${{ secrets.CCI_TOKEN }}
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index b703a3629..4a339b853 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -74,4 +74,4 @@ jobs:
pnpm vitest run --merge-reports --coverage
- name: Report coverage
- uses: davelosert/vitest-coverage-report-action@7bf7d3c1b17a0e27c7e0d14190fb39168584bed2 # v2
+ uses: davelosert/vitest-coverage-report-action@8ab049ff5a2c6e78f78af446329379b318544a1a # v2
diff --git a/.github/workflows/validate-pr-title.yml b/.github/workflows/validate-pr-title.yml
index 2c4b2c853..43e86771b 100644
--- a/.github/workflows/validate-pr-title.yml
+++ b/.github/workflows/validate-pr-title.yml
@@ -16,6 +16,6 @@ jobs:
name: Validate PR title
runs-on: ubuntu-latest
steps:
- - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5
+ - uses: amannn/action-semantic-pull-request@e32d7e603df1aa1ba07e981f2a23455dee596825 # v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index 985e8ad0b..28270c704 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,4 +1,4 @@
{
- "packages/core": "2.2.0",
- "packages/react": "2.2.0"
+ "packages/core": "2.3.1",
+ "packages/react": "2.3.1"
}
diff --git a/apps/intent-disambiguation-app/package.json b/apps/intent-disambiguation-app/package.json
index e533a5917..8e2fb182a 100644
--- a/apps/intent-disambiguation-app/package.json
+++ b/apps/intent-disambiguation-app/package.json
@@ -18,6 +18,7 @@
"prettier": "@sanity/prettier-config",
"dependencies": {
"@sanity/sdk-react": "workspace:*",
+ "@sanity/ui": "^3.1.11",
"react": "^19",
"react-dom": "^19",
"react-router": "^7.5.2",
diff --git a/apps/intent-disambiguation-app/src/App.tsx b/apps/intent-disambiguation-app/src/App.tsx
index e652ab56c..c5edb28d4 100644
--- a/apps/intent-disambiguation-app/src/App.tsx
+++ b/apps/intent-disambiguation-app/src/App.tsx
@@ -2,12 +2,16 @@ import './App.css'
import {type SanityConfig} from '@sanity/sdk'
import {SanityApp} from '@sanity/sdk-react'
+import {ThemeProvider} from '@sanity/ui'
+import {buildTheme} from '@sanity/ui/theme'
import React from 'react'
import {BrowserRouter} from 'react-router'
import {IntentDisambiguation} from './components/IntentDisambiguation'
import {LoadingFallback} from './components/LoadingFallback'
+const theme = buildTheme()
+
function AppWithRouter(): React.JSX.Element {
const sanityConfigs: SanityConfig[] = [
{
@@ -18,10 +22,11 @@ function AppWithRouter(): React.JSX.Element {
},
},
]
-
return (
}>
-
+
+
+
)
}
diff --git a/apps/intent-disambiguation-app/src/components/IntentDisambiguation.tsx b/apps/intent-disambiguation-app/src/components/IntentDisambiguation.tsx
index bac74e73b..72fd25baa 100644
--- a/apps/intent-disambiguation-app/src/components/IntentDisambiguation.tsx
+++ b/apps/intent-disambiguation-app/src/components/IntentDisambiguation.tsx
@@ -1,42 +1,168 @@
-import {useSendIntent} from '@sanity/sdk-react'
+import {canvasSource, type DocumentHandleWithSource, useDispatchIntent} from '@sanity/sdk-react'
+import {Button, Card, Container, Flex, Heading, Stack, Text} from '@sanity/ui'
import React, {Suspense} from 'react'
-function SendIntentButton(): React.JSX.Element {
- const {sendIntent} = useSendIntent({
- documentHandle: {
- documentId: 'maintenance-schedule-123',
- documentType: 'maintenanceSchedule',
- projectId: '9wmez61s',
- dataset: 'production',
- },
+function SendIntentButton({
+ action,
+ intentId,
+ documentHandle,
+ parameters,
+ cta,
+}: {
+ action?: 'edit'
+ intentId?: string
+ documentHandle: DocumentHandleWithSource
+ parameters?: Record
+ cta: string
+}): React.JSX.Element {
+ const {dispatchIntent} = useDispatchIntent({
+ ...(action && {action}),
+ ...(intentId && {intentId}),
+ ...(parameters && {parameters}),
+ documentHandle,
})
- const handleMaintenanceScheduleClick = () => {
- console.log('Sending maintenanceSchedule intent - this should trigger disambiguation')
- sendIntent()
+ const handleClick = () => {
+ console.log(`Sending ${action || intentId} intent`)
+ dispatchIntent()
}
return (
-
- Send Maintenance Schedule Intent
-
+
)
}
export function IntentDisambiguation(): React.JSX.Element {
return (
-
-
-
Intent Disambiguation App
-
- This app sends a maintenanceSchedule intent. Since both the property-detail-app and
- property-overview-app can handle this intent, the Dashboard should do something to let you
- choose which app should handle it.
-
-
Loading intent sender... }>
-
-
-
-
+
+
+ Intents Demos App
+
+
+ This app provides sample intents triggers that allow for easier navigation between the
+ property-detail-app, property-overview-app, or studio. These can be set up to either
+ navigate directly by intent name or display a picker for disambiguation.
+
+
+
+
+
+
+ Open all intents that can handle editing for the “HVAC Service - 123 Oak
+ Street” maintenance schedule.
+
+
+ }>
+
+
+
+
+
+
+
+
+ Navigate directly to the “Plumbing Check - 456 Pine Avenue” maintenance
+ schedule in the property-overview-app.
+
+
+ }>
+
+
+
+
+
+
+
+
+ Open all intents that can handle editing for the “123 Oak Street”
+ property.
+
+
+ }>
+
+
+
+
+
+
+
+
+ Navigate directly to the “Check oven temperature accuracy” maintenance
+ task in the studio.
+
+
+ }>
+
+
+
+
+
+
+
+
+ Navigate directly to “Welcome to Sanity Canvas” in Canvas.
+
+
+ }>
+
+
+
+
+
+
+
)
}
diff --git a/apps/kitchensink-react/src/AppRoutes.tsx b/apps/kitchensink-react/src/AppRoutes.tsx
index 2c98a823a..3075b0e07 100644
--- a/apps/kitchensink-react/src/AppRoutes.tsx
+++ b/apps/kitchensink-react/src/AppRoutes.tsx
@@ -1,3 +1,4 @@
+import {ResourceProvider} from '@sanity/sdk-react'
import {type JSX} from 'react'
import {Route, Routes} from 'react-router'
@@ -14,9 +15,12 @@ import {SearchRoute} from './DocumentCollection/SearchRoute'
import {PresenceRoute} from './Presence/PresenceRoute'
import {ProjectAuthHome} from './ProjectAuthentication/ProjectAuthHome'
import {ProtectedRoute} from './ProtectedRoute'
+import {AgentActionsRoute} from './routes/AgentActionsRoute'
import {DashboardContextRoute} from './routes/DashboardContextRoute'
import {DashboardWorkspacesRoute} from './routes/DashboardWorkspacesRoute'
import ExperimentalResourceClientRoute from './routes/ExperimentalResourceClientRoute'
+import {IntentsRoute} from './routes/IntentsRoute'
+import {MediaLibraryRoute} from './routes/MediaLibraryRoute'
import {PerspectivesRoute} from './routes/PerspectivesRoute'
import {ProjectsRoute} from './routes/ProjectsRoute'
import {ReleasesRoute} from './routes/releases/ReleasesRoute'
@@ -72,6 +76,14 @@ const documentCollectionRoutes = [
path: 'presence',
element: ,
},
+ {
+ path: 'media-library',
+ element: ,
+ },
+ {
+ path: 'intents',
+ element: ,
+ },
]
const dashboardInteractionRoutes = [
@@ -121,6 +133,14 @@ export function AppRoutes(): JSX.Element {
{documentCollectionRoutes.map((route) => (
))}
+
+
+
+ }
+ />
} />
} />
} />
diff --git a/apps/kitchensink-react/src/routes/AgentActionsRoute.tsx b/apps/kitchensink-react/src/routes/AgentActionsRoute.tsx
new file mode 100644
index 000000000..495d8b10e
--- /dev/null
+++ b/apps/kitchensink-react/src/routes/AgentActionsRoute.tsx
@@ -0,0 +1,136 @@
+import {
+ type AgentGenerateOptions,
+ type AgentPromptOptions,
+ useAgentGenerate,
+ useAgentPrompt,
+} from '@sanity/sdk-react'
+import {Box, Button, Card, Code, Label, Stack, Text} from '@sanity/ui'
+import {type JSX, useMemo, useState} from 'react'
+
+import {PageLayout} from '../components/PageLayout'
+
+export function AgentActionsRoute(): JSX.Element {
+ const generate = useAgentGenerate()
+ const prompt = useAgentPrompt()
+ const [text, setText] = useState('Write a short poem about typescript and cats')
+ const [promptResult, setPromptResult] = useState('')
+ const [generateResult, setGenerateResult] = useState('')
+ const [isLoadingPrompt, setIsLoadingPrompt] = useState(false)
+ const [isLoadingGenerate, setIsLoadingGenerate] = useState(false)
+ const generateOptions = useMemo(() => {
+ return {
+ // Use the schema collection id (workspace name), not the type name
+ schemaId: '_.schemas.default',
+ targetDocument: {
+ operation: 'create',
+ _id: crypto.randomUUID(),
+ _type: 'movie',
+ },
+ instruction:
+ 'Generate a title and overview for a movie about $topic based on a famous movie. Try to not pick the same movie as someone else would pick.',
+ instructionParams: {topic: 'Sanity SDK'},
+ target: {include: ['title', 'overview']},
+ noWrite: true,
+ }
+ }, [])
+
+ const promptOptions = useMemo(
+ () => ({instruction: text, format: 'string'}),
+ [text],
+ )
+
+ return (
+
+
+
+
+ Prompt
+
+ Sends an instruction to the LLM and returns plain text (or JSON if requested). Does
+ not reference a schema or write any data.
+
+
+
+
+
+
+ Generaten a Sanity document (no write)
+
+ Generates title and overview for a movie; does not persist changes.
+
+
+ Schema‑aware content generation targeting the current project/dataset. Use schemaId of
+ your document type (e.g. "movie") and target to specify fields. Set noWrite
+ to preview without saving.
+
+
+ {
+ setIsLoadingGenerate(true)
+ const sub = generate(generateOptions).subscribe({
+ next: (value) => {
+ setGenerateResult(JSON.stringify(value, null, 2))
+ setIsLoadingGenerate(false)
+ sub.unsubscribe()
+ },
+ error: (err) => {
+ // eslint-disable-next-line no-console
+ console.error(err)
+ setIsLoadingGenerate(false)
+ },
+ })
+ }}
+ />
+
+ {generateResult && (
+
+
+ {generateResult}
+
+
+ )}
+
+
+
+
+ )
+}
diff --git a/apps/kitchensink-react/src/routes/IntentsRoute.tsx b/apps/kitchensink-react/src/routes/IntentsRoute.tsx
new file mode 100644
index 000000000..8e5ee0117
--- /dev/null
+++ b/apps/kitchensink-react/src/routes/IntentsRoute.tsx
@@ -0,0 +1,142 @@
+import {mediaLibrarySource, SanityDocument, useDispatchIntent, useQuery} from '@sanity/sdk-react'
+import {Button, Card, Spinner, Text} from '@sanity/ui'
+import {type JSX, Suspense} from 'react'
+
+// Hardcoded for demo - should be inferred from org later on
+const MEDIA_LIBRARY_ID = 'mlPGY7BEqt52'
+const MEDIA = mediaLibrarySource(MEDIA_LIBRARY_ID)
+const PROJECT_ID = 'ppsg7ml5'
+const DATASET = 'test'
+
+function DatasetDocumentIntent({document}: {document: SanityDocument}): JSX.Element {
+ const {dispatchIntent} = useDispatchIntent({
+ action: 'edit',
+ documentHandle: {
+ documentId: document._id,
+ documentType: document._type,
+ projectId: PROJECT_ID,
+ dataset: DATASET,
+ },
+ })
+
+ return (
+ dispatchIntent()}
+ />
+ )
+}
+
+function MediaLibraryAssetIntent({asset}: {asset: {_id: string; _type: string}}): JSX.Element {
+ const {dispatchIntent} = useDispatchIntent({
+ action: 'edit',
+ documentHandle: {
+ documentId: asset._id,
+ documentType: asset._type,
+ source: MEDIA,
+ },
+ })
+
+ return (
+ dispatchIntent()}
+ />
+ )
+}
+
+function IntentsContent(): JSX.Element {
+ // Fetch first document from project/dataset
+ const {data: firstDocument, isPending: isDocumentPending} = useQuery({
+ query: '*[_type == "book"][0]',
+ projectId: PROJECT_ID,
+ dataset: DATASET,
+ })
+
+ // Fetch first asset from media library
+ const {data: firstAsset, isPending: isAssetPending} = useQuery({
+ query: '*[_type == "sanity.asset"][0]',
+ source: MEDIA,
+ })
+
+ const isLoading = isDocumentPending || isAssetPending
+
+ return (
+
+
+ Intent Dispatch Demo
+
+
+
+ This route demonstrates dispatching intents for documents from both a traditional dataset
+ and a media library source.
+
+
+ {isLoading && (
+
+
+
+ Loading documents...
+
+
+ )}
+
+
+
+ Dataset Document Intent
+
+
+ Project: {PROJECT_ID} | Dataset: {DATASET}
+
+
+
+ Document ID: {firstDocument?._id}
+
+
+ Document Type: {firstDocument?._type}
+
+
+
+
+
+
+
+ Media Library Asset Intent
+
+
+ Media Library ID: {MEDIA_LIBRARY_ID}
+
+
+
+ Asset ID: {firstAsset?._id}
+
+
+ Asset Type: {firstAsset?._type}
+
+
+
+
+
+ )
+}
+
+export function IntentsRoute(): JSX.Element {
+ return (
+
+
+
+
+ Loading...
+
+
+
+ }
+ >
+
+
+ )
+}
diff --git a/apps/kitchensink-react/src/routes/MediaLibraryRoute.tsx b/apps/kitchensink-react/src/routes/MediaLibraryRoute.tsx
new file mode 100644
index 000000000..74a18c670
--- /dev/null
+++ b/apps/kitchensink-react/src/routes/MediaLibraryRoute.tsx
@@ -0,0 +1,76 @@
+import {mediaLibrarySource, useQuery} from '@sanity/sdk-react'
+import {Card, Spinner, Text} from '@sanity/ui'
+import {type JSX, useState} from 'react'
+
+// for now, hardcoded. should be inferred from org later on
+const MEDIA = mediaLibrarySource('mlPGY7BEqt52')
+
+export function MediaLibraryRoute(): JSX.Element {
+ const [query] = useState('*[_type == "sanity.asset"][0...10] | order(_id desc)')
+ const [isLoading] = useState(false)
+
+ const {data, isPending} = useQuery({
+ query,
+ source: MEDIA,
+ })
+
+ return (
+
+
+ Media Library Query Demo
+
+
+
+ This route demonstrates querying against a Sanity media library. The MediaLibraryProvider is
+ automatically created by SanityApp when a media library config is present. The query runs
+ against: https://api.sanity.io/v2025-03-24/media-libraries/mlPGY7BEqt52/query
+
+
+
+
+
+ Current query:
+
+
+ {query}
+
+
+
+
+
+
+
+ Query Results:
+
+ {(isPending || isLoading) && }
+
+
+
+ {JSON.stringify(data, null, 2)}
+
+
+
+ )
+}
diff --git a/apps/property-detail-app/src/components/CompleteAllTasks.tsx b/apps/property-detail-app/src/components/CompleteAllTasks.tsx
index c6008cef6..140e9047a 100644
--- a/apps/property-detail-app/src/components/CompleteAllTasks.tsx
+++ b/apps/property-detail-app/src/components/CompleteAllTasks.tsx
@@ -11,7 +11,14 @@ export function CompleteAllTasks({payload}: {payload: IntentHandlerPayload}): Re
React.useEffect(() => {
async function completeAllTasks() {
try {
- const property = await client.getDocument(payload.documentHandle.documentId)
+ let property
+
+ if (payload.documentHandle.documentType === 'maintenanceSchedule') {
+ const maintenanceSchedule = await client.getDocument(payload.documentHandle.documentId)
+ property = await client.getDocument(maintenanceSchedule?.['property']._ref)
+ } else if (payload.documentHandle.documentType === 'property') {
+ property = await client.getDocument(payload.documentHandle.documentId)
+ }
if (!property?.['maintenanceSchedules'] || property['maintenanceSchedules'].length === 0) {
throw new Error('No maintenance schedules found for this property')
@@ -59,7 +66,7 @@ export function CompleteAllTasks({payload}: {payload: IntentHandlerPayload}): Re
}
completeAllTasks()
- }, [client, payload.documentHandle.documentId])
+ }, [client, payload.documentHandle])
if (status === 'loading') {
return (
diff --git a/apps/property-detail-app/src/components/ScheduleStateDropdown.tsx b/apps/property-detail-app/src/components/ScheduleStateDropdown.tsx
index afd69e1b5..197067552 100644
--- a/apps/property-detail-app/src/components/ScheduleStateDropdown.tsx
+++ b/apps/property-detail-app/src/components/ScheduleStateDropdown.tsx
@@ -1,4 +1,4 @@
-import {useSendIntent} from '@sanity/sdk-react'
+import {useDispatchIntent} from '@sanity/sdk-react'
import React, {useState} from 'react'
interface ScheduleStateDropdownProps {
@@ -19,15 +19,15 @@ export function ScheduleStateDropdown({
}: ScheduleStateDropdownProps): React.ReactNode {
const [selectedState, setSelectedState] = useState(currentState)
- const {sendIntent} = useSendIntent({
- intentName: 'editScheduleState',
+ const {dispatchIntent} = useDispatchIntent({
+ intentId: 'editScheduleState',
documentHandle: {
documentId: scheduleId,
documentType: 'maintenanceSchedule',
projectId: '9wmez61s',
dataset: 'production',
},
- params: {
+ parameters: {
state: selectedState,
},
})
@@ -39,7 +39,7 @@ export function ScheduleStateDropdown({
const handleSubmit = (e: React.MouseEvent) => {
e.preventDefault()
e.stopPropagation()
- sendIntent()
+ dispatchIntent()
}
const selectedStateLabel =
diff --git a/apps/property-overview-app/src/App.tsx b/apps/property-overview-app/src/App.tsx
index bfa5b9546..9af382e88 100644
--- a/apps/property-overview-app/src/App.tsx
+++ b/apps/property-overview-app/src/App.tsx
@@ -1,30 +1,34 @@
import './App.css'
-import {createClient} from '@sanity/client'
+// import {createClient} from '@sanity/client'
import {type SanityConfig} from '@sanity/sdk'
import {IntentHandlerPayload, IntentHandlers, SanityApp} from '@sanity/sdk-react'
-import React from 'react'
+import React, {useState} from 'react'
import {BrowserRouter} from 'react-router'
import OverviewMap from './OverviewMap'
function AppWithRouter(): React.JSX.Element {
+ const [defaultScheduleId, setDefaultScheduleId] = useState()
+
const intentHandlers: IntentHandlers = {
editScheduleState: {
type: 'async',
handler: async (payload: IntentHandlerPayload) => {
- const client = createClient({
- projectId: '9wmez61s',
- dataset: 'production',
- apiVersion: '2025-08-01',
- withCredentials: true,
- useCdn: false,
- apiHost: 'https://api.sanity.work',
- })
- await client
- .patch(payload.documentHandle.documentId)
- .set({status: payload.params?.['state']})
- .commit()
+ setDefaultScheduleId(payload.documentHandle.documentId)
+
+ // const client = createClient({
+ // projectId: '9wmez61s',
+ // dataset: 'production',
+ // apiVersion: '2025-08-01',
+ // withCredentials: true,
+ // useCdn: false,
+ // apiHost: 'https://api.sanity.work',
+ // })
+ // await client
+ // .patch(payload.documentHandle.documentId)
+ // .set({status: payload.params?.['state']})
+ // .commit()
},
},
}
@@ -42,7 +46,7 @@ function AppWithRouter(): React.JSX.Element {
return (
Loading...
}>
-
+
)
diff --git a/apps/property-overview-app/src/OverviewMap.tsx b/apps/property-overview-app/src/OverviewMap.tsx
index 03c624a19..ebe17ac08 100644
--- a/apps/property-overview-app/src/OverviewMap.tsx
+++ b/apps/property-overview-app/src/OverviewMap.tsx
@@ -1,12 +1,12 @@
-import './app.css'
+import './App.css'
import {
type DocumentHandle,
+ useDispatchIntent,
useDocumentProjection,
useDocuments,
- useSendIntent,
} from '@sanity/sdk-react'
-import {Suspense, useMemo, useState} from 'react'
+import {Suspense, useEffect, useMemo, useState} from 'react'
interface Property {
_id: string
@@ -34,16 +34,17 @@ interface Property {
interface PropertyCardProps {
doc: DocumentHandle<'property'>
+ selectedScheduleId?: string
}
-function PropertyCard({doc}: PropertyCardProps) {
- const {sendIntent: checkMaintenance} = useSendIntent({
+function PropertyCard({doc, selectedScheduleId}: PropertyCardProps) {
+ const {dispatchIntent: checkMaintenance} = useDispatchIntent({
documentHandle: doc,
- intentName: 'maintenanceList',
+ intentId: 'maintenanceList',
})
- const {sendIntent: completeAllTasks} = useSendIntent({
+ const {dispatchIntent: completeAllTasks} = useDispatchIntent({
documentHandle: doc,
- intentName: 'completeAllTasks',
+ intentId: 'completeAllTasks',
})
const {data: property} = useDocumentProjection<{
@@ -122,13 +123,20 @@ function PropertyCard({doc}: PropertyCardProps) {
const handleCheckMaintenance = (e: React.MouseEvent) => {
e.preventDefault()
e.stopPropagation()
- checkMaintenance()
+ checkMaintenance.onClick()
}
const handleCompleteAllTasks = (e: React.MouseEvent) => {
e.preventDefault()
e.stopPropagation()
- completeAllTasks()
+ completeAllTasks.onClick()
+ }
+
+ if (
+ selectedScheduleId &&
+ !property.maintenanceSchedules.map((schedule) => schedule._id).includes(selectedScheduleId)
+ ) {
+ return null
}
return (
@@ -222,8 +230,13 @@ function PropertyCard({doc}: PropertyCardProps) {
)
}
-export default function PropertyManagementApp(): React.JSX.Element {
+export default function PropertyManagementApp({
+ defaultScheduleId,
+}: {
+ defaultScheduleId?: string
+}): React.JSX.Element {
const [selectedProperty, setSelectedProperty] = useState(null)
+ const [selectedScheduleId, setSelectedScheduleId] = useState()
const {data: propertyHandles, isPending} = useDocuments({
documentType: 'property',
@@ -251,6 +264,12 @@ export default function PropertyManagementApp(): React.JSX.Element {
}
}
+ useEffect(() => {
+ if (defaultScheduleId) {
+ setSelectedScheduleId(defaultScheduleId)
+ }
+ }, [defaultScheduleId])
+
if (isPending) {
return (
@@ -292,10 +311,31 @@ export default function PropertyManagementApp(): React.JSX.Element {
{/* Property List */}
Properties
+
+ {selectedScheduleId && (
+ setSelectedScheduleId(undefined)}
+ style={{
+ backgroundColor: '#333',
+ color: 'white',
+ border: 'none',
+ padding: '8px 16px',
+ borderRadius: '4px',
+ cursor: 'pointer',
+ fontSize: '14px',
+ fontWeight: '500',
+ marginBottom: '24px',
+ }}
+ >
+ Show All
+
+ )}
+
{filteredProperties.map((propertyHandle) => (
Loading property...
}>
-
+
))}
diff --git a/apps/property-studio/sanity.cli.ts b/apps/property-studio/sanity.cli.ts
index 6c61334ef..ce0fabfe4 100644
--- a/apps/property-studio/sanity.cli.ts
+++ b/apps/property-studio/sanity.cli.ts
@@ -9,5 +9,5 @@ export default defineCliConfig({
* Enable auto-updates for studios.
* Learn more at https://www.sanity.io/docs/cli#auto-updates
*/
- autoUpdates: true,
+ autoUpdates: false,
})
diff --git a/package.json b/package.json
index 242fd8495..966e198a8 100644
--- a/package.json
+++ b/package.json
@@ -72,7 +72,7 @@
"turbo": "^2.5.2",
"typedoc": "^0.28.3",
"typescript": "^5.8.3",
- "vite": "^6.3.4",
+ "vite": "^6.3.6",
"vitest": "^3.1.2",
"zx": "^8.5.3"
},
diff --git a/packages/@repo/e2e/package.json b/packages/@repo/e2e/package.json
index 2b2f7c399..eb1e718ef 100644
--- a/packages/@repo/e2e/package.json
+++ b/packages/@repo/e2e/package.json
@@ -34,7 +34,7 @@
"prepare": "pnpm build"
},
"dependencies": {
- "@sanity/client": "^7.10.0",
+ "@sanity/client": "^7.12.0",
"@sanity/uuid": "^3.0.0",
"dotenv": "^16.5.0",
"lodash-es": "^4.17.21",
diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md
index d4384b436..7339a0828 100644
--- a/packages/core/CHANGELOG.md
+++ b/packages/core/CHANGELOG.md
@@ -1,630 +1,585 @@
# Changelog
-## [2.2.0](https://github.com/sanity-io/sdk/compare/sdk-v2.1.2...sdk-v2.2.0) (2025-09-03)
+## [2.3.1](https://github.com/sanity-io/sdk/compare/sdk-v2.3.0...sdk-v2.3.1) (2025-10-17)
+
+### Bug Fixes
+
+- auth race condition when using the SDK in the Studio structure ([#646](https://github.com/sanity-io/sdk/issues/646)) ([a5d0875](https://github.com/sanity-io/sdk/commit/a5d08752cf24661afdedb8470a3cae11a2e11945))
+## [2.3.0](https://github.com/sanity-io/sdk/compare/sdk-v2.2.0...sdk-v2.3.0) (2025-10-15)
### Features
-* **projects:** add organizationId and includeMembers parameters to useProjects hook ([#607](https://github.com/sanity-io/sdk/issues/607)) ([df4f69c](https://github.com/sanity-io/sdk/commit/df4f69cc62d59cf159d4ab8811f994ba84e712d7))
+- present a link to add CORS Manage setting when a CORS error occurs ([#625](https://github.com/sanity-io/sdk/issues/625)) ([7610ec2](https://github.com/sanity-io/sdk/commit/7610ec255c87dc95f27653c8064f63f0b7100f4b))
+- upgrade groq-js with support for synchronous evaluation ([#637](https://github.com/sanity-io/sdk/issues/637)) ([60996a7](https://github.com/sanity-io/sdk/commit/60996a7c61695ced7c0d37f3c3ee6eff5d772f63))
+
+### Bug Fixes
+
+- **auth:** do not clear the entire hash during login, only a token value ([#648](https://github.com/sanity-io/sdk/issues/648)) ([5267e18](https://github.com/sanity-io/sdk/commit/5267e1895a5cfcf7e359e328bf23f53c7f5d4d87))
+- **core:** change ValidProjection to string type ([#627](https://github.com/sanity-io/sdk/issues/627)) ([2079b36](https://github.com/sanity-io/sdk/commit/2079b36572be0ac15a77a02369048cb077520b45))
+- **deps:** update dependency @sanity/client to ^7.12.0 ([#649](https://github.com/sanity-io/sdk/issues/649)) ([eec856f](https://github.com/sanity-io/sdk/commit/eec856f84c1621785e4f5244c29714a7e05298c3))
+- styling for error messaging ([#647](https://github.com/sanity-io/sdk/issues/647)) ([3bf96f2](https://github.com/sanity-io/sdk/commit/3bf96f23c9dbb580707c3071ec5045f9d20c66b4))
+## [2.2.0](https://github.com/sanity-io/sdk/compare/sdk-v2.1.2...sdk-v2.2.0) (2025-09-03)
+
+### Features
+
+- **projects:** add organizationId and includeMembers parameters to useProjects hook ([#607](https://github.com/sanity-io/sdk/issues/607)) ([df4f69c](https://github.com/sanity-io/sdk/commit/df4f69cc62d59cf159d4ab8811f994ba84e712d7))
### Bug Fixes
-* **core:** add perspective to cache key to avoid collisions ([#609](https://github.com/sanity-io/sdk/issues/609)) ([c68f9b7](https://github.com/sanity-io/sdk/commit/c68f9b79f2b8f2fc4f8ab93385b5bf709b8fd254))
-* **deps:** update dependency @sanity/client to v7.10.0 ([#605](https://github.com/sanity-io/sdk/issues/605)) ([6ef5b6c](https://github.com/sanity-io/sdk/commit/6ef5b6c711d48f8a922c132e2d77442acebb61d7))
+- **core:** add perspective to cache key to avoid collisions ([#609](https://github.com/sanity-io/sdk/issues/609)) ([c68f9b7](https://github.com/sanity-io/sdk/commit/c68f9b79f2b8f2fc4f8ab93385b5bf709b8fd254))
+- **deps:** update dependency @sanity/client to v7.10.0 ([#605](https://github.com/sanity-io/sdk/issues/605)) ([6ef5b6c](https://github.com/sanity-io/sdk/commit/6ef5b6c711d48f8a922c132e2d77442acebb61d7))
## [2.1.2](https://github.com/sanity-io/sdk/compare/sdk-v2.1.1...sdk-v2.1.2) (2025-08-05)
-
### Bug Fixes
-* fixes request tags ([#593](https://github.com/sanity-io/sdk/issues/593)) ([5fbd500](https://github.com/sanity-io/sdk/commit/5fbd50043976aaea047ddac262a297e93d3b9c56))
+- fixes request tags ([#593](https://github.com/sanity-io/sdk/issues/593)) ([5fbd500](https://github.com/sanity-io/sdk/commit/5fbd50043976aaea047ddac262a297e93d3b9c56))
## [2.1.1](https://github.com/sanity-io/sdk/compare/sdk-v2.1.0...sdk-v2.1.1) (2025-07-24)
-
### Features
-* add bifur dependency and presence events ([#577](https://github.com/sanity-io/sdk/issues/577)) ([2bd70c1](https://github.com/sanity-io/sdk/commit/2bd70c1e70fb25b3d5665729c0d3e20b04fbaea8))
-* **auth:** check for stamped token expiration after browser idle ([#575](https://github.com/sanity-io/sdk/issues/575)) ([ba4cc58](https://github.com/sanity-io/sdk/commit/ba4cc58bf81a0cb81e34a0b4c6e30561e7199aae))
-* **core:** add defineIntent ([#585](https://github.com/sanity-io/sdk/issues/585)) ([214e0fd](https://github.com/sanity-io/sdk/commit/214e0fdbe1e9fe88f33888d48857f9c1f6918caa))
-* **core:** allow a userId option for the user store ([#580](https://github.com/sanity-io/sdk/issues/580)) ([210d48e](https://github.com/sanity-io/sdk/commit/210d48eca72c846b47923e551295f3a18d1174fd))
-* **presence:** add user presence events ([#583](https://github.com/sanity-io/sdk/issues/583)) ([9ed405c](https://github.com/sanity-io/sdk/commit/9ed405c8d2d551d53d4e72b79b159d9496407fc3))
-
+- add bifur dependency and presence events ([#577](https://github.com/sanity-io/sdk/issues/577)) ([2bd70c1](https://github.com/sanity-io/sdk/commit/2bd70c1e70fb25b3d5665729c0d3e20b04fbaea8))
+- **auth:** check for stamped token expiration after browser idle ([#575](https://github.com/sanity-io/sdk/issues/575)) ([ba4cc58](https://github.com/sanity-io/sdk/commit/ba4cc58bf81a0cb81e34a0b4c6e30561e7199aae))
+- **core:** add defineIntent ([#585](https://github.com/sanity-io/sdk/issues/585)) ([214e0fd](https://github.com/sanity-io/sdk/commit/214e0fdbe1e9fe88f33888d48857f9c1f6918caa))
+- **core:** allow a userId option for the user store ([#580](https://github.com/sanity-io/sdk/issues/580)) ([210d48e](https://github.com/sanity-io/sdk/commit/210d48eca72c846b47923e551295f3a18d1174fd))
+- **presence:** add user presence events ([#583](https://github.com/sanity-io/sdk/issues/583)) ([9ed405c](https://github.com/sanity-io/sdk/commit/9ed405c8d2d551d53d4e72b79b159d9496407fc3))
### Bug Fixes
-* use `rolldown` to generate dts ([#582](https://github.com/sanity-io/sdk/issues/582)) ([be0211b](https://github.com/sanity-io/sdk/commit/be0211b52a66d6479693c44c6763b3f8cae7d0ab))
+- use `rolldown` to generate dts ([#582](https://github.com/sanity-io/sdk/issues/582)) ([be0211b](https://github.com/sanity-io/sdk/commit/be0211b52a66d6479693c44c6763b3f8cae7d0ab))
## [2.1.0](https://github.com/sanity-io/sdk/compare/sdk-v2.0.2...sdk-v2.1.0) (2025-06-30)
-
### Features
-* **core:** full JSONMatch support w/ path helpers ([#573](https://github.com/sanity-io/sdk/issues/573)) ([5d5f569](https://github.com/sanity-io/sdk/commit/5d5f56987e96fcc9b06d7ee779bb6d0db68ec449))
-
+- **core:** full JSONMatch support w/ path helpers ([#573](https://github.com/sanity-io/sdk/issues/573)) ([5d5f569](https://github.com/sanity-io/sdk/commit/5d5f56987e96fcc9b06d7ee779bb6d0db68ec449))
### Miscellaneous
-* release 2.1.0 ([bbc53ee](https://github.com/sanity-io/sdk/commit/bbc53ee9bf9707d82a89657f35a2114a3245cadf))
+- release 2.1.0 ([bbc53ee](https://github.com/sanity-io/sdk/commit/bbc53ee9bf9707d82a89657f35a2114a3245cadf))
## [2.0.2](https://github.com/sanity-io/sdk/compare/sdk-v2.0.1...sdk-v2.0.2) (2025-06-27)
-
### Miscellaneous
-* **sdk:** Synchronize sdk versions
+- **sdk:** Synchronize sdk versions
## [2.0.1](https://github.com/sanity-io/sdk/compare/sdk-v2.0.0...sdk-v2.0.1) (2025-06-20)
-
### Features
-* add new token fetching via comlink ([#475](https://github.com/sanity-io/sdk/issues/475)) ([f646d53](https://github.com/sanity-io/sdk/commit/f646d5309deabec57ebb9bc561ed1849987db5b7))
-
+- add new token fetching via comlink ([#475](https://github.com/sanity-io/sdk/issues/475)) ([f646d53](https://github.com/sanity-io/sdk/commit/f646d5309deabec57ebb9bc561ed1849987db5b7))
### Bug Fixes
-* **core:** consider negative indexes for inserts ([#555](https://github.com/sanity-io/sdk/issues/555)) ([7a0e07a](https://github.com/sanity-io/sdk/commit/7a0e07a922b2303ffc2476d9a6712a32ded14abd))
-* **core:** correct element removal order in `unset`s ([#556](https://github.com/sanity-io/sdk/issues/556)) ([7978b17](https://github.com/sanity-io/sdk/commit/7978b1709ca36334b73cb71eb898649424ebcfbf))
-* **core:** correct keyed segment path representation and insert operation behavior ([#552](https://github.com/sanity-io/sdk/issues/552)) ([d8a7968](https://github.com/sanity-io/sdk/commit/d8a7968eb8544aea5280e87c524614213c406af4))
-* **core:** prevent race condition in document store ([#551](https://github.com/sanity-io/sdk/issues/551)) ([d88dc29](https://github.com/sanity-io/sdk/commit/d88dc29b30562b791e3288d4d2a373919b7f6134))
-
+- **core:** consider negative indexes for inserts ([#555](https://github.com/sanity-io/sdk/issues/555)) ([7a0e07a](https://github.com/sanity-io/sdk/commit/7a0e07a922b2303ffc2476d9a6712a32ded14abd))
+- **core:** correct element removal order in `unset`s ([#556](https://github.com/sanity-io/sdk/issues/556)) ([7978b17](https://github.com/sanity-io/sdk/commit/7978b1709ca36334b73cb71eb898649424ebcfbf))
+- **core:** correct keyed segment path representation and insert operation behavior ([#552](https://github.com/sanity-io/sdk/issues/552)) ([d8a7968](https://github.com/sanity-io/sdk/commit/d8a7968eb8544aea5280e87c524614213c406af4))
+- **core:** prevent race condition in document store ([#551](https://github.com/sanity-io/sdk/issues/551)) ([d88dc29](https://github.com/sanity-io/sdk/commit/d88dc29b30562b791e3288d4d2a373919b7f6134))
### Documentation
-* update readme logos ([#549](https://github.com/sanity-io/sdk/issues/549)) ([857f8ee](https://github.com/sanity-io/sdk/commit/857f8eec2811f411e7ff21668ef12853730c4368))
+- update readme logos ([#549](https://github.com/sanity-io/sdk/issues/549)) ([857f8ee](https://github.com/sanity-io/sdk/commit/857f8eec2811f411e7ff21668ef12853730c4368))
## [2.0.0](https://github.com/sanity-io/sdk/compare/sdk-v1.0.0...sdk-v2.0.0) (2025-05-23)
-
### ⚠ BREAKING CHANGES
-* change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527))
+- change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527))
### Bug Fixes
-* change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527)) ([79f6df6](https://github.com/sanity-io/sdk/commit/79f6df6fcf5479bb144447c246e093551ed8c865))
-* **core:** align release order with studio release order ([#534](https://github.com/sanity-io/sdk/issues/534)) ([afd4b2c](https://github.com/sanity-io/sdk/commit/afd4b2cd9242763403d30796afd8ad73a45dd075))
-* **deps:** update dependency @sanity/client to ^7.2.1 ([#526](https://github.com/sanity-io/sdk/issues/526)) ([34b4f26](https://github.com/sanity-io/sdk/commit/34b4f260c1d639414908dd2f1dd8f375e7d1b73e))
-* **deps:** update dependency @sanity/comlink to ^3.0.3 ([#525](https://github.com/sanity-io/sdk/issues/525)) ([e0599ea](https://github.com/sanity-io/sdk/commit/e0599ea7965555b16a4ae4e9b45a91a91ae94b13))
-* **deps:** update dependency @sanity/comlink to ^3.0.4 ([#542](https://github.com/sanity-io/sdk/issues/542)) ([7365c97](https://github.com/sanity-io/sdk/commit/7365c97f2100367cbdc9eaa7adebdeee9f596733))
-
+- change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527)) ([79f6df6](https://github.com/sanity-io/sdk/commit/79f6df6fcf5479bb144447c246e093551ed8c865))
+- **core:** align release order with studio release order ([#534](https://github.com/sanity-io/sdk/issues/534)) ([afd4b2c](https://github.com/sanity-io/sdk/commit/afd4b2cd9242763403d30796afd8ad73a45dd075))
+- **deps:** update dependency @sanity/client to ^7.2.1 ([#526](https://github.com/sanity-io/sdk/issues/526)) ([34b4f26](https://github.com/sanity-io/sdk/commit/34b4f260c1d639414908dd2f1dd8f375e7d1b73e))
+- **deps:** update dependency @sanity/comlink to ^3.0.3 ([#525](https://github.com/sanity-io/sdk/issues/525)) ([e0599ea](https://github.com/sanity-io/sdk/commit/e0599ea7965555b16a4ae4e9b45a91a91ae94b13))
+- **deps:** update dependency @sanity/comlink to ^3.0.4 ([#542](https://github.com/sanity-io/sdk/issues/542)) ([7365c97](https://github.com/sanity-io/sdk/commit/7365c97f2100367cbdc9eaa7adebdeee9f596733))
### Miscellaneous
-* release 2.0.0 ([#544](https://github.com/sanity-io/sdk/issues/544)) ([048cb50](https://github.com/sanity-io/sdk/commit/048cb503ea2e7852c984c376e48ff74d2a7023be))
+- release 2.0.0 ([#544](https://github.com/sanity-io/sdk/issues/544)) ([048cb50](https://github.com/sanity-io/sdk/commit/048cb503ea2e7852c984c376e48ff74d2a7023be))
## [1.0.0](https://github.com/sanity-io/sdk/compare/sdk-v1.0.0...sdk-v1.0.0) (2025-05-07)
-
### Miscellaneous
-* release 1.0.0 ([#517](https://github.com/sanity-io/sdk/issues/517)) ([52c00a1](https://github.com/sanity-io/sdk/commit/52c00a1eb99a6a34681bba363207ebcf4a9b5371))
+- release 1.0.0 ([#517](https://github.com/sanity-io/sdk/issues/517)) ([52c00a1](https://github.com/sanity-io/sdk/commit/52c00a1eb99a6a34681bba363207ebcf4a9b5371))
## [0.0.3](https://github.com/sanity-io/sdk/compare/sdk-v0.0.2...sdk-v0.0.3) (2025-05-07)
-
### ⚠ BREAKING CHANGES
-* bump versions ([#516](https://github.com/sanity-io/sdk/issues/516))
+- bump versions ([#516](https://github.com/sanity-io/sdk/issues/516))
### Bug Fixes
-* bump versions ([#516](https://github.com/sanity-io/sdk/issues/516)) ([3601ade](https://github.com/sanity-io/sdk/commit/3601adeebe986af4102f639500a754d585694d9e))
-* **core:** use raw perspective for functions that coalesce drafts and published ([#503](https://github.com/sanity-io/sdk/issues/503)) ([0bf6c57](https://github.com/sanity-io/sdk/commit/0bf6c577183fd0796fa9c00347af258cbb9b607c))
-
+- bump versions ([#516](https://github.com/sanity-io/sdk/issues/516)) ([3601ade](https://github.com/sanity-io/sdk/commit/3601adeebe986af4102f639500a754d585694d9e))
+- **core:** use raw perspective for functions that coalesce drafts and published ([#503](https://github.com/sanity-io/sdk/issues/503)) ([0bf6c57](https://github.com/sanity-io/sdk/commit/0bf6c577183fd0796fa9c00347af258cbb9b607c))
### Documentation
-* update package readmes ([#513](https://github.com/sanity-io/sdk/issues/513)) ([aa79bc7](https://github.com/sanity-io/sdk/commit/aa79bc74e904cfcac119be415d871fc71fe17277))
+- update package readmes ([#513](https://github.com/sanity-io/sdk/issues/513)) ([aa79bc7](https://github.com/sanity-io/sdk/commit/aa79bc74e904cfcac119be415d871fc71fe17277))
## [0.0.2](https://github.com/sanity-io/sdk/compare/sdk-v0.0.1...sdk-v0.0.2) (2025-05-06)
-
### ⚠ BREAKING CHANGES
-* make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504))
+- make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504))
### Features
-* make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504)) ([d49bf0e](https://github.com/sanity-io/sdk/commit/d49bf0e4be9268d68dbec186ed3ba6afc075bedb))
-
+- make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504)) ([d49bf0e](https://github.com/sanity-io/sdk/commit/d49bf0e4be9268d68dbec186ed3ba6afc075bedb))
### Bug Fixes
-* **core:** bump default api versions ([#507](https://github.com/sanity-io/sdk/issues/507)) ([dc4f6f6](https://github.com/sanity-io/sdk/commit/dc4f6f67a1c86e0a30cb69ebc23c11ca06ff4ac2))
-* **deps:** update dependency zustand to ^5.0.4 ([#500](https://github.com/sanity-io/sdk/issues/500)) ([0847430](https://github.com/sanity-io/sdk/commit/0847430c57d170ccbecd853f0e9621ccc74664d7))
+- **core:** bump default api versions ([#507](https://github.com/sanity-io/sdk/issues/507)) ([dc4f6f6](https://github.com/sanity-io/sdk/commit/dc4f6f67a1c86e0a30cb69ebc23c11ca06ff4ac2))
+- **deps:** update dependency zustand to ^5.0.4 ([#500](https://github.com/sanity-io/sdk/issues/500)) ([0847430](https://github.com/sanity-io/sdk/commit/0847430c57d170ccbecd853f0e9621ccc74664d7))
## [0.0.1](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0...sdk-v0.0.1) (2025-05-02)
-
### Bug Fixes
-* **docs:** remove custom docs entrypoint names ([#498](https://github.com/sanity-io/sdk/issues/498)) ([4499e85](https://github.com/sanity-io/sdk/commit/4499e85a3a30a5086bceb164c19cb18c71376471))
+- **docs:** remove custom docs entrypoint names ([#498](https://github.com/sanity-io/sdk/issues/498)) ([4499e85](https://github.com/sanity-io/sdk/commit/4499e85a3a30a5086bceb164c19cb18c71376471))
## 0.0.0 (2025-05-02)
-
### Features
-* allow ~experimental_resource client option ([08b4582](https://github.com/sanity-io/sdk/commit/08b4582840ddbd39e1343b07704dfb758a4e988d))
-
+- allow ~experimental_resource client option ([08b4582](https://github.com/sanity-io/sdk/commit/08b4582840ddbd39e1343b07704dfb758a4e988d))
### Bug Fixes
-* **deps:** update dependency @sanity/message-protocol to ^0.12.0 ([#484](https://github.com/sanity-io/sdk/issues/484)) ([f3beb42](https://github.com/sanity-io/sdk/commit/f3beb42ddad7ad9bf7826783602d57be006c15ee))
-
+- **deps:** update dependency @sanity/message-protocol to ^0.12.0 ([#484](https://github.com/sanity-io/sdk/issues/484)) ([f3beb42](https://github.com/sanity-io/sdk/commit/f3beb42ddad7ad9bf7826783602d57be006c15ee))
### Miscellaneous
-* release 0.0.0 ([08c9acc](https://github.com/sanity-io/sdk/commit/08c9acc0a34954cd611a53753fac2b788b61da9b))
+- release 0.0.0 ([08c9acc](https://github.com/sanity-io/sdk/commit/08c9acc0a34954cd611a53753fac2b788b61da9b))
## [0.0.0-alpha.31](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.30...sdk-v0.0.0-alpha.31) (2025-05-01)
-
### Bug Fixes
-* **deps:** update dependency @sanity/comlink to ^3.0.2 ([#482](https://github.com/sanity-io/sdk/issues/482)) ([f9b3eca](https://github.com/sanity-io/sdk/commit/f9b3eca4a0a21a456ebda46b42b836efd9f7718f))
+- **deps:** update dependency @sanity/comlink to ^3.0.2 ([#482](https://github.com/sanity-io/sdk/issues/482)) ([f9b3eca](https://github.com/sanity-io/sdk/commit/f9b3eca4a0a21a456ebda46b42b836efd9f7718f))
## [0.0.0-alpha.30](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.29...sdk-v0.0.0-alpha.30) (2025-05-01)
-
### ⚠ BREAKING CHANGES
-* fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437))
+- fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437))
### Features
-* add releases store ([#420](https://github.com/sanity-io/sdk/issues/420)) ([b5a376c](https://github.com/sanity-io/sdk/commit/b5a376c86e700031fe1700fb55b7f0d1236aaea3))
-* **auth:** add studio mode ([#429](https://github.com/sanity-io/sdk/issues/429)) ([cef0f72](https://github.com/sanity-io/sdk/commit/cef0f7229d519709b4f069b982110c32a4d23217))
-* fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437)) ([1a8ecb8](https://github.com/sanity-io/sdk/commit/1a8ecb89217b05c6ed90699c7ee162592cedb896))
-* integrate typegen ([#452](https://github.com/sanity-io/sdk/issues/452)) ([8416864](https://github.com/sanity-io/sdk/commit/8416864533f0f14851e8e71c15be4a1596711b52))
-* verify projects match current org for dashboard apps ([#464](https://github.com/sanity-io/sdk/issues/464)) ([52c8c76](https://github.com/sanity-io/sdk/commit/52c8c7668f09b119d6ca618381e1a44d134612a3))
-
+- add releases store ([#420](https://github.com/sanity-io/sdk/issues/420)) ([b5a376c](https://github.com/sanity-io/sdk/commit/b5a376c86e700031fe1700fb55b7f0d1236aaea3))
+- **auth:** add studio mode ([#429](https://github.com/sanity-io/sdk/issues/429)) ([cef0f72](https://github.com/sanity-io/sdk/commit/cef0f7229d519709b4f069b982110c32a4d23217))
+- fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437)) ([1a8ecb8](https://github.com/sanity-io/sdk/commit/1a8ecb89217b05c6ed90699c7ee162592cedb896))
+- integrate typegen ([#452](https://github.com/sanity-io/sdk/issues/452)) ([8416864](https://github.com/sanity-io/sdk/commit/8416864533f0f14851e8e71c15be4a1596711b52))
+- verify projects match current org for dashboard apps ([#464](https://github.com/sanity-io/sdk/issues/464)) ([52c8c76](https://github.com/sanity-io/sdk/commit/52c8c7668f09b119d6ca618381e1a44d134612a3))
### Bug Fixes
-* **deps:** update dependency @sanity/client to ^6.29.1 ([#466](https://github.com/sanity-io/sdk/issues/466)) ([f25ba2b](https://github.com/sanity-io/sdk/commit/f25ba2b2aa32e3c010a6adf5658367c6fa3e149e))
-* **deps:** update dependency @sanity/client to v7 ([#478](https://github.com/sanity-io/sdk/issues/478)) ([e5ed504](https://github.com/sanity-io/sdk/commit/e5ed5047c84c3864cdbebd2c158184d57dfdaff9))
-
+- **deps:** update dependency @sanity/client to ^6.29.1 ([#466](https://github.com/sanity-io/sdk/issues/466)) ([f25ba2b](https://github.com/sanity-io/sdk/commit/f25ba2b2aa32e3c010a6adf5658367c6fa3e149e))
+- **deps:** update dependency @sanity/client to v7 ([#478](https://github.com/sanity-io/sdk/issues/478)) ([e5ed504](https://github.com/sanity-io/sdk/commit/e5ed5047c84c3864cdbebd2c158184d57dfdaff9))
### Documentation
-* cleanup for Apr 30 ([#479](https://github.com/sanity-io/sdk/issues/479)) ([8793c1e](https://github.com/sanity-io/sdk/commit/8793c1e0d93bc9184d9a65f6e11d35dc148e4ac5))
-* update readmes ([#474](https://github.com/sanity-io/sdk/issues/474)) ([042a853](https://github.com/sanity-io/sdk/commit/042a85316c8179b8a135abbae4d66a4e467f5ee0))
+- cleanup for Apr 30 ([#479](https://github.com/sanity-io/sdk/issues/479)) ([8793c1e](https://github.com/sanity-io/sdk/commit/8793c1e0d93bc9184d9a65f6e11d35dc148e4ac5))
+- update readmes ([#474](https://github.com/sanity-io/sdk/issues/474)) ([042a853](https://github.com/sanity-io/sdk/commit/042a85316c8179b8a135abbae4d66a4e467f5ee0))
## [0.0.0-alpha.29](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.28...sdk-v0.0.0-alpha.29) (2025-04-23)
-
### Features
-* **auth:** check for a token being passed into the url hash from the dashboard ([#451](https://github.com/sanity-io/sdk/issues/451)) ([59893e2](https://github.com/sanity-io/sdk/commit/59893e2216acdf01f5187617cd42b2bc3760a068))
-
+- **auth:** check for a token being passed into the url hash from the dashboard ([#451](https://github.com/sanity-io/sdk/issues/451)) ([59893e2](https://github.com/sanity-io/sdk/commit/59893e2216acdf01f5187617cd42b2bc3760a068))
### Bug Fixes
-* **build:** fixes build to not include node libraries ([#456](https://github.com/sanity-io/sdk/issues/456)) ([11a8d8a](https://github.com/sanity-io/sdk/commit/11a8d8a6c35dcfd0eeba3f5ca926b5e263aa56e8))
+- **build:** fixes build to not include node libraries ([#456](https://github.com/sanity-io/sdk/issues/456)) ([11a8d8a](https://github.com/sanity-io/sdk/commit/11a8d8a6c35dcfd0eeba3f5ca926b5e263aa56e8))
## [0.0.0-alpha.28](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.27...sdk-v0.0.0-alpha.28) (2025-04-22)
-
### Bug Fixes
-* **core:** refactor calculatePermissions to fix initialization error ([#443](https://github.com/sanity-io/sdk/issues/443)) ([e59d6e5](https://github.com/sanity-io/sdk/commit/e59d6e54b1da22194446ffffc747ddbf0711f134))
+- **core:** refactor calculatePermissions to fix initialization error ([#443](https://github.com/sanity-io/sdk/issues/443)) ([e59d6e5](https://github.com/sanity-io/sdk/commit/e59d6e54b1da22194446ffffc747ddbf0711f134))
## [0.0.0-alpha.27](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.26...sdk-v0.0.0-alpha.27) (2025-04-22)
-
### Miscellaneous
-* **sdk:** Synchronize sdk versions
+- **sdk:** Synchronize sdk versions
## [0.0.0-alpha.26](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.25...sdk-v0.0.0-alpha.26) (2025-04-21)
-
### Features
-* **auth:** don't store tokens in localstorage if running in dashboard ([#409](https://github.com/sanity-io/sdk/issues/409)) ([637f17c](https://github.com/sanity-io/sdk/commit/637f17cc3d38037a0fbc3020173ef619c24acbc1))
-
+- **auth:** don't store tokens in localstorage if running in dashboard ([#409](https://github.com/sanity-io/sdk/issues/409)) ([637f17c](https://github.com/sanity-io/sdk/commit/637f17cc3d38037a0fbc3020173ef619c24acbc1))
### Bug Fixes
-* **auth:** ensure initial url does not contain an sid and improve error handling ([#418](https://github.com/sanity-io/sdk/issues/418)) ([4d76bfc](https://github.com/sanity-io/sdk/commit/4d76bfc52542896128efd7cbd6d5342f1c275cd5))
-* **authentication:** use web lock to ensure only one token refresh process runs over multiple tabs ([#398](https://github.com/sanity-io/sdk/issues/398)) ([64aa9fa](https://github.com/sanity-io/sdk/commit/64aa9fa0ecd4efeda8dd6ff7277a272d7e0945a8))
-* **auth:** fix bug with incorrect refreshing with newly acquired tokens ([#422](https://github.com/sanity-io/sdk/issues/422)) ([1218361](https://github.com/sanity-io/sdk/commit/121836143486c7c40d770ed5748d9c09b4911e9f))
-* **core:** allow multiple projections per doc ([#403](https://github.com/sanity-io/sdk/issues/403)) ([d30c5ae](https://github.com/sanity-io/sdk/commit/d30c5ae58de5710cd6ed6bbcaa83fb02c29b7e6c))
-* **deps:** update dependency @sanity/client to ^6.29.0 ([#435](https://github.com/sanity-io/sdk/issues/435)) ([c6c7b35](https://github.com/sanity-io/sdk/commit/c6c7b35f0e71c5e40747866704b7b16ebf10e4fb))
-* **deps:** update dependency @sanity/types to ^3.83.0 ([#412](https://github.com/sanity-io/sdk/issues/412)) ([b40b289](https://github.com/sanity-io/sdk/commit/b40b289ea67026e7f0a0b7a2f95486e7a27a71c1))
-* **deps:** update dependency rxjs to ^7.8.2 ([#427](https://github.com/sanity-io/sdk/issues/427)) ([cbbf964](https://github.com/sanity-io/sdk/commit/cbbf9645eb2b4d43746d6283e237fbdfd5068080))
-
+- **auth:** ensure initial url does not contain an sid and improve error handling ([#418](https://github.com/sanity-io/sdk/issues/418)) ([4d76bfc](https://github.com/sanity-io/sdk/commit/4d76bfc52542896128efd7cbd6d5342f1c275cd5))
+- **authentication:** use web lock to ensure only one token refresh process runs over multiple tabs ([#398](https://github.com/sanity-io/sdk/issues/398)) ([64aa9fa](https://github.com/sanity-io/sdk/commit/64aa9fa0ecd4efeda8dd6ff7277a272d7e0945a8))
+- **auth:** fix bug with incorrect refreshing with newly acquired tokens ([#422](https://github.com/sanity-io/sdk/issues/422)) ([1218361](https://github.com/sanity-io/sdk/commit/121836143486c7c40d770ed5748d9c09b4911e9f))
+- **core:** allow multiple projections per doc ([#403](https://github.com/sanity-io/sdk/issues/403)) ([d30c5ae](https://github.com/sanity-io/sdk/commit/d30c5ae58de5710cd6ed6bbcaa83fb02c29b7e6c))
+- **deps:** update dependency @sanity/client to ^6.29.0 ([#435](https://github.com/sanity-io/sdk/issues/435)) ([c6c7b35](https://github.com/sanity-io/sdk/commit/c6c7b35f0e71c5e40747866704b7b16ebf10e4fb))
+- **deps:** update dependency @sanity/types to ^3.83.0 ([#412](https://github.com/sanity-io/sdk/issues/412)) ([b40b289](https://github.com/sanity-io/sdk/commit/b40b289ea67026e7f0a0b7a2f95486e7a27a71c1))
+- **deps:** update dependency rxjs to ^7.8.2 ([#427](https://github.com/sanity-io/sdk/issues/427)) ([cbbf964](https://github.com/sanity-io/sdk/commit/cbbf9645eb2b4d43746d6283e237fbdfd5068080))
### Documentation
-* fix duplication/entrypoints; add SDK Core note ([#430](https://github.com/sanity-io/sdk/issues/430)) ([f1046fa](https://github.com/sanity-io/sdk/commit/f1046faec1c70d3690ddc9b4d4f92d7c433178a2))
+- fix duplication/entrypoints; add SDK Core note ([#430](https://github.com/sanity-io/sdk/issues/430)) ([f1046fa](https://github.com/sanity-io/sdk/commit/f1046faec1c70d3690ddc9b4d4f92d7c433178a2))
## [0.0.0-alpha.25](https://github.com/sanity-io/sdk/compare/v0.0.0-alpha.24...v0.0.0-alpha.25) (2025-04-09)
-
### Features
-* **core, react:** introduce createGroqSearchFilter utility for search ([#407](https://github.com/sanity-io/sdk/issues/407)) ([77766bb](https://github.com/sanity-io/sdk/commit/77766bbf3fdc7efef4cd8a24f0ca206bef3179ec))
-
+- **core, react:** introduce createGroqSearchFilter utility for search ([#407](https://github.com/sanity-io/sdk/issues/407)) ([77766bb](https://github.com/sanity-io/sdk/commit/77766bbf3fdc7efef4cd8a24f0ca206bef3179ec))
### Bug Fixes
-* **deps:** update dependency zustand to ^5.0.3 ([#404](https://github.com/sanity-io/sdk/issues/404)) ([a1ff448](https://github.com/sanity-io/sdk/commit/a1ff448d4fd5370d9d868e5da19348247fc30ddc))
+- **deps:** update dependency zustand to ^5.0.3 ([#404](https://github.com/sanity-io/sdk/issues/404)) ([a1ff448](https://github.com/sanity-io/sdk/commit/a1ff448d4fd5370d9d868e5da19348247fc30ddc))
## [0.0.0-alpha.24](https://github.com/sanity-io/sdk/compare/v0.0.0-alpha.23...v0.0.0-alpha.24) (2025-04-09)
-
### ⚠ BREAKING CHANGES
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
-* replace `sanityConfigs` prop with `config` prop in `
` and `
`
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
-* rename `_type` to `documentType` in DocumentHandle interface and related usages
-* rename `_id` to `documentId` in DocumentHandle interface and related usages
-* update document hooks and actions to expect `DocumentHandle` props
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
-* remove `
`, introduce `
` for configuration
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
-* remove `schema` from sanity config
-* remove schema state and schema manager
-* remove `useDocuments` and `useSearch` hooks
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
-* renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187))
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
+- replace `sanityConfigs` prop with `config` prop in `
` and `
`
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
+- rename `_type` to `documentType` in DocumentHandle interface and related usages
+- rename `_id` to `documentId` in DocumentHandle interface and related usages
+- update document hooks and actions to expect `DocumentHandle` props
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
+- remove `
`, introduce `
` for configuration
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
+- remove `schema` from sanity config
+- remove schema state and schema manager
+- remove `useDocuments` and `useSearch` hooks
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
+- renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187))
### Features
-* `createStore` prototype ([#46](https://github.com/sanity-io/sdk/issues/46)) ([d3d69f8](https://github.com/sanity-io/sdk/commit/d3d69f8164ed406c77a3586a8a29987fd5aa1b2e))
-* `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
-* add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
-* add authorization ([#52](https://github.com/sanity-io/sdk/issues/52)) ([59501f1](https://github.com/sanity-io/sdk/commit/59501f1525e271e8d724c4eb69a27f01726bb64e))
-* add document list store ([#58](https://github.com/sanity-io/sdk/issues/58)) ([b66ea04](https://github.com/sanity-io/sdk/commit/b66ea04a386207704512a4b5cd1c5e77e0a48eb6))
-* add hooks for AuthStore ([#91](https://github.com/sanity-io/sdk/issues/91)) ([4367719](https://github.com/sanity-io/sdk/commit/43677193fccc08fcf7074f906edf2acdfc440e1c))
-* add preview store ([#62](https://github.com/sanity-io/sdk/issues/62)) ([c343f1e](https://github.com/sanity-io/sdk/commit/c343f1e15f30afd66dbd4c0309b9152600ceb1be))
-* add React and Vitest ([#3](https://github.com/sanity-io/sdk/issues/3)) ([e55dc32](https://github.com/sanity-io/sdk/commit/e55dc32f080ffaa7470bdcb2ed97f992cfcbe584))
-* add session hooks and store ([#59](https://github.com/sanity-io/sdk/issues/59)) ([65ac911](https://github.com/sanity-io/sdk/commit/65ac9111d79211aee621f7bfed47bb5cfcf565e1))
-* add storybook and dev affordances ([#6](https://github.com/sanity-io/sdk/issues/6)) ([15b45e8](https://github.com/sanity-io/sdk/commit/15b45e8d7821ec7abc1852998143e19553c06f1e))
-* add turborepo ([#2](https://github.com/sanity-io/sdk/issues/2)) ([19c53e1](https://github.com/sanity-io/sdk/commit/19c53e1408edacbda4105c75c6fa5c4fe0a6b744))
-* add TypeDoc ([#43](https://github.com/sanity-io/sdk/issues/43)) ([2274873](https://github.com/sanity-io/sdk/commit/227487372c1d04799f7c2ed06839dae06113887c))
-* add useClient hook ([#96](https://github.com/sanity-io/sdk/issues/96)) ([c50883b](https://github.com/sanity-io/sdk/commit/c50883bbf3eed32977a1033615582690234154fc))
-* add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
-* add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
-* add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
-* add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
-* **auth:** fetch current user when token is present ([#92](https://github.com/sanity-io/sdk/issues/92)) ([f38008c](https://github.com/sanity-io/sdk/commit/f38008c71d55bb3b54bbf5318045a52a918084c2))
-* **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
-* AuthStore ([#79](https://github.com/sanity-io/sdk/issues/79)) ([f52e68e](https://github.com/sanity-io/sdk/commit/f52e68e43d5552b061415aba6c2758bcd6243c7c))
-* **client:** add a global api client ([#209](https://github.com/sanity-io/sdk/issues/209)) ([5898b1d](https://github.com/sanity-io/sdk/commit/5898b1d82fc07d12f736d1361e48287e41ae0608))
-* **core:** add comlink controller and channel store ([#141](https://github.com/sanity-io/sdk/issues/141)) ([cf1e5d5](https://github.com/sanity-io/sdk/commit/cf1e5d5a8cbcb27beacba2362b462176071200e4))
-* **core:** add comlink node store ([#156](https://github.com/sanity-io/sdk/issues/156)) ([a080357](https://github.com/sanity-io/sdk/commit/a0803574dacbe86455fc60b1b9f3775ea33e7a89))
-* **core:** add README and npm keywords ([#115](https://github.com/sanity-io/sdk/issues/115)) ([8a3c492](https://github.com/sanity-io/sdk/commit/8a3c4928647f6e8c4a8fe3f43da9cb8e904af522))
-* **core:** create client store ([#38](https://github.com/sanity-io/sdk/issues/38)) ([8545333](https://github.com/sanity-io/sdk/commit/8545333c02c5691674e90be19951458ab3abbd6a))
-* **core:** update client store to subscribe to changes in auth ([#85](https://github.com/sanity-io/sdk/issues/85)) ([a42d58d](https://github.com/sanity-io/sdk/commit/a42d58d3227e7d884a5449192f176e66bf404144))
-* **core:** use separate client for auth and refresh client store with token ([#64](https://github.com/sanity-io/sdk/issues/64)) ([9d18fbf](https://github.com/sanity-io/sdk/commit/9d18fbfd2fc2708e0f9505617343720c5d7fafb0))
-* create sanity instance and store map ([#40](https://github.com/sanity-io/sdk/issues/40)) ([a7bf3e1](https://github.com/sanity-io/sdk/commit/a7bf3e12ea0f36ee63e42b4ba9088a9413b0742b))
-* **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
-* document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
-* document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
-* export the SanityDocument type ([#221](https://github.com/sanity-io/sdk/issues/221)) ([dc6dbc8](https://github.com/sanity-io/sdk/commit/dc6dbc85fe6d80c6e3b08de76e666da340aa62f6))
-* introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* **kitchen-sink:** add routing to kitchen-sink ([#99](https://github.com/sanity-io/sdk/issues/99)) ([50483ea](https://github.com/sanity-io/sdk/commit/50483ea66073bfccdc28e51f7606673eb213bebe))
-* make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
-* **react:** add AuthBoundary ([#102](https://github.com/sanity-io/sdk/issues/102)) ([bd657a0](https://github.com/sanity-io/sdk/commit/bd657a058c4ae0989018503fe2fafa319fcdbc7d))
-* **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
-* **react:** add useDocuments hook ([#98](https://github.com/sanity-io/sdk/issues/98)) ([d0f0c1a](https://github.com/sanity-io/sdk/commit/d0f0c1ad753b56b7e7cc6ff0830682d4fc6be0d1))
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
-* refactor to internal auth store ([#95](https://github.com/sanity-io/sdk/issues/95)) ([5807a2b](https://github.com/sanity-io/sdk/commit/5807a2b0b823f9187c25ab82233ad6d30df664f1))
-* remove `
`, introduce `
` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
-* remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace `sanityConfigs` prop with `config` prop in `
` and `
` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace jsdoc with tsdoc ([#75](https://github.com/sanity-io/sdk/issues/75)) ([7074a38](https://github.com/sanity-io/sdk/commit/7074a383b58de66fe2a9badc7122d0345e354b2a))
-* resolve preview projections ([#130](https://github.com/sanity-io/sdk/issues/130)) ([d30997e](https://github.com/sanity-io/sdk/commit/d30997e4a3d40c0edd1b3f31f48934bf846ab56a))
-* store Dashboard context ([#307](https://github.com/sanity-io/sdk/issues/307)) ([a6c454e](https://github.com/sanity-io/sdk/commit/a6c454e33acea6d33d004751615b226bd60c49b3))
-* update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
-* use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-
-
-### Bug Fixes
-
-* add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
-* add lint to turbo.json and run prettier ([909f0d3](https://github.com/sanity-io/sdk/commit/909f0d34339c9c8ff8c013dfa13e5d607a2012fc))
-* all client requests are properly tagged ([#274](https://github.com/sanity-io/sdk/issues/274)) ([6df8938](https://github.com/sanity-io/sdk/commit/6df893891e7b12eff122de5147ab03b65b51bcbe))
-* **auth:** ensure that authStore is a true shared resource store ([#371](https://github.com/sanity-io/sdk/issues/371)) ([1709d95](https://github.com/sanity-io/sdk/commit/1709d95dd62082b5e46ae909e2531448ff979074))
-* **auth:** only attempt to refresh stamped tokens ([#304](https://github.com/sanity-io/sdk/issues/304)) ([b08a319](https://github.com/sanity-io/sdk/commit/b08a3194a061031400e2ded654269adf71130ea5))
-* **build:** fixes build warning ([#252](https://github.com/sanity-io/sdk/issues/252)) ([bed82f8](https://github.com/sanity-io/sdk/commit/bed82f8d87521dd0cc9d827af5a7f908749ad711))
-* **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
-* **core:** add correct perspective to useProjection ([#295](https://github.com/sanity-io/sdk/issues/295)) ([8792e00](https://github.com/sanity-io/sdk/commit/8792e00db7f5f5926e5c311e5cf0bf74bc78f041))
-* **core:** add raw perspective to client ([#237](https://github.com/sanity-io/sdk/issues/237)) ([202c4ba](https://github.com/sanity-io/sdk/commit/202c4ba7bb9fdbc7f635ac8691ba840717cafc69))
-* **core:** determine env for version ([#293](https://github.com/sanity-io/sdk/issues/293)) ([643eac4](https://github.com/sanity-io/sdk/commit/643eac4c69c117c7b08866afb1f92b32010c9a83))
-* **core:** emit current token state on subscribe ([#139](https://github.com/sanity-io/sdk/issues/139)) ([7ec0d98](https://github.com/sanity-io/sdk/commit/7ec0d984f2c7f2da519206165cb7a2c1e2213c79))
-* **core:** fixes apiVersion in usersStore ([#262](https://github.com/sanity-io/sdk/issues/262)) ([248eb19](https://github.com/sanity-io/sdk/commit/248eb192dc331ce64c05721172f2855a44dad0ca))
-* **core:** use drafts instead of previewDrafts ([#279](https://github.com/sanity-io/sdk/issues/279)) ([45305ad](https://github.com/sanity-io/sdk/commit/45305ad0ecc72d60ca1ccba15703bb8a0a6a53f5))
-* correct auth state subscription ([#101](https://github.com/sanity-io/sdk/issues/101)) ([9ba03d0](https://github.com/sanity-io/sdk/commit/9ba03d03f00df6d6aac29036cdca6a880fb3c52d))
-* **deps:** update dependency @sanity/client to ^6.28.3 ([#287](https://github.com/sanity-io/sdk/issues/287)) ([fc5c5a1](https://github.com/sanity-io/sdk/commit/fc5c5a1fd54bca5b7b7138e4cab49113449eebe2))
-* **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
-* **deps:** update dependency @sanity/mutate to ^0.12.4 ([#395](https://github.com/sanity-io/sdk/issues/395)) ([6cbb54a](https://github.com/sanity-io/sdk/commit/6cbb54a343b81fb0da0bd4852b1bdf36ae29de42))
-* **deps:** Update eslint-tooling ([#69](https://github.com/sanity-io/sdk/issues/69)) ([d9d8e09](https://github.com/sanity-io/sdk/commit/d9d8e099e4711bb6ae90e926ce804715f56ef5d3))
-* **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
-* **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
-* **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
-* environment variable access for Remix ([#168](https://github.com/sanity-io/sdk/issues/168)) ([4ad3587](https://github.com/sanity-io/sdk/commit/4ad3587fd0ea262b09c3add20c2ba2bd8d5d15c2))
-* fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
-* initialize client with configured apiHost ([#186](https://github.com/sanity-io/sdk/issues/186)) ([13c72cb](https://github.com/sanity-io/sdk/commit/13c72cbb0dc9aa2fe1b4c0384f1cf28eb7f40d2e))
-* make apiVersion required in getClient ([#230](https://github.com/sanity-io/sdk/issues/230)) ([91458d3](https://github.com/sanity-io/sdk/commit/91458d35251be6cf02592f0d4391f58838921ff8))
-* mark packages as private for now ([#11](https://github.com/sanity-io/sdk/issues/11)) ([a103825](https://github.com/sanity-io/sdk/commit/a1038257192e2c493132b96233d461bdd9a31744))
-* package access and version ([#89](https://github.com/sanity-io/sdk/issues/89)) ([c4eb26d](https://github.com/sanity-io/sdk/commit/c4eb26dac12ec56c5a569c8edc895ffcd46a63a7))
-* trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
-* update typedoc to use package mode ([#117](https://github.com/sanity-io/sdk/issues/117)) ([7f4e0e1](https://github.com/sanity-io/sdk/commit/7f4e0e1f08610fb3861e5dc8eb67fb1556b4d965))
+- `createStore` prototype ([#46](https://github.com/sanity-io/sdk/issues/46)) ([d3d69f8](https://github.com/sanity-io/sdk/commit/d3d69f8164ed406c77a3586a8a29987fd5aa1b2e))
+- `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
+- add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
+- add authorization ([#52](https://github.com/sanity-io/sdk/issues/52)) ([59501f1](https://github.com/sanity-io/sdk/commit/59501f1525e271e8d724c4eb69a27f01726bb64e))
+- add document list store ([#58](https://github.com/sanity-io/sdk/issues/58)) ([b66ea04](https://github.com/sanity-io/sdk/commit/b66ea04a386207704512a4b5cd1c5e77e0a48eb6))
+- add hooks for AuthStore ([#91](https://github.com/sanity-io/sdk/issues/91)) ([4367719](https://github.com/sanity-io/sdk/commit/43677193fccc08fcf7074f906edf2acdfc440e1c))
+- add preview store ([#62](https://github.com/sanity-io/sdk/issues/62)) ([c343f1e](https://github.com/sanity-io/sdk/commit/c343f1e15f30afd66dbd4c0309b9152600ceb1be))
+- add React and Vitest ([#3](https://github.com/sanity-io/sdk/issues/3)) ([e55dc32](https://github.com/sanity-io/sdk/commit/e55dc32f080ffaa7470bdcb2ed97f992cfcbe584))
+- add session hooks and store ([#59](https://github.com/sanity-io/sdk/issues/59)) ([65ac911](https://github.com/sanity-io/sdk/commit/65ac9111d79211aee621f7bfed47bb5cfcf565e1))
+- add storybook and dev affordances ([#6](https://github.com/sanity-io/sdk/issues/6)) ([15b45e8](https://github.com/sanity-io/sdk/commit/15b45e8d7821ec7abc1852998143e19553c06f1e))
+- add turborepo ([#2](https://github.com/sanity-io/sdk/issues/2)) ([19c53e1](https://github.com/sanity-io/sdk/commit/19c53e1408edacbda4105c75c6fa5c4fe0a6b744))
+- add TypeDoc ([#43](https://github.com/sanity-io/sdk/issues/43)) ([2274873](https://github.com/sanity-io/sdk/commit/227487372c1d04799f7c2ed06839dae06113887c))
+- add useClient hook ([#96](https://github.com/sanity-io/sdk/issues/96)) ([c50883b](https://github.com/sanity-io/sdk/commit/c50883bbf3eed32977a1033615582690234154fc))
+- add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
+- add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
+- add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
+- add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
+- **auth:** fetch current user when token is present ([#92](https://github.com/sanity-io/sdk/issues/92)) ([f38008c](https://github.com/sanity-io/sdk/commit/f38008c71d55bb3b54bbf5318045a52a918084c2))
+- **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
+- AuthStore ([#79](https://github.com/sanity-io/sdk/issues/79)) ([f52e68e](https://github.com/sanity-io/sdk/commit/f52e68e43d5552b061415aba6c2758bcd6243c7c))
+- **client:** add a global api client ([#209](https://github.com/sanity-io/sdk/issues/209)) ([5898b1d](https://github.com/sanity-io/sdk/commit/5898b1d82fc07d12f736d1361e48287e41ae0608))
+- **core:** add comlink controller and channel store ([#141](https://github.com/sanity-io/sdk/issues/141)) ([cf1e5d5](https://github.com/sanity-io/sdk/commit/cf1e5d5a8cbcb27beacba2362b462176071200e4))
+- **core:** add comlink node store ([#156](https://github.com/sanity-io/sdk/issues/156)) ([a080357](https://github.com/sanity-io/sdk/commit/a0803574dacbe86455fc60b1b9f3775ea33e7a89))
+- **core:** add README and npm keywords ([#115](https://github.com/sanity-io/sdk/issues/115)) ([8a3c492](https://github.com/sanity-io/sdk/commit/8a3c4928647f6e8c4a8fe3f43da9cb8e904af522))
+- **core:** create client store ([#38](https://github.com/sanity-io/sdk/issues/38)) ([8545333](https://github.com/sanity-io/sdk/commit/8545333c02c5691674e90be19951458ab3abbd6a))
+- **core:** update client store to subscribe to changes in auth ([#85](https://github.com/sanity-io/sdk/issues/85)) ([a42d58d](https://github.com/sanity-io/sdk/commit/a42d58d3227e7d884a5449192f176e66bf404144))
+- **core:** use separate client for auth and refresh client store with token ([#64](https://github.com/sanity-io/sdk/issues/64)) ([9d18fbf](https://github.com/sanity-io/sdk/commit/9d18fbfd2fc2708e0f9505617343720c5d7fafb0))
+- create sanity instance and store map ([#40](https://github.com/sanity-io/sdk/issues/40)) ([a7bf3e1](https://github.com/sanity-io/sdk/commit/a7bf3e12ea0f36ee63e42b4ba9088a9413b0742b))
+- **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
+- document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
+- document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
+- export the SanityDocument type ([#221](https://github.com/sanity-io/sdk/issues/221)) ([dc6dbc8](https://github.com/sanity-io/sdk/commit/dc6dbc85fe6d80c6e3b08de76e666da340aa62f6))
+- introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- **kitchen-sink:** add routing to kitchen-sink ([#99](https://github.com/sanity-io/sdk/issues/99)) ([50483ea](https://github.com/sanity-io/sdk/commit/50483ea66073bfccdc28e51f7606673eb213bebe))
+- make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
+- **react:** add AuthBoundary ([#102](https://github.com/sanity-io/sdk/issues/102)) ([bd657a0](https://github.com/sanity-io/sdk/commit/bd657a058c4ae0989018503fe2fafa319fcdbc7d))
+- **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
+- **react:** add useDocuments hook ([#98](https://github.com/sanity-io/sdk/issues/98)) ([d0f0c1a](https://github.com/sanity-io/sdk/commit/d0f0c1ad753b56b7e7cc6ff0830682d4fc6be0d1))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
+- refactor to internal auth store ([#95](https://github.com/sanity-io/sdk/issues/95)) ([5807a2b](https://github.com/sanity-io/sdk/commit/5807a2b0b823f9187c25ab82233ad6d30df664f1))
+- remove `
`, introduce `
` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
+- remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace `sanityConfigs` prop with `config` prop in `
` and `
` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace jsdoc with tsdoc ([#75](https://github.com/sanity-io/sdk/issues/75)) ([7074a38](https://github.com/sanity-io/sdk/commit/7074a383b58de66fe2a9badc7122d0345e354b2a))
+- resolve preview projections ([#130](https://github.com/sanity-io/sdk/issues/130)) ([d30997e](https://github.com/sanity-io/sdk/commit/d30997e4a3d40c0edd1b3f31f48934bf846ab56a))
+- store Dashboard context ([#307](https://github.com/sanity-io/sdk/issues/307)) ([a6c454e](https://github.com/sanity-io/sdk/commit/a6c454e33acea6d33d004751615b226bd60c49b3))
+- update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
+- use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+### Bug Fixes
-### Miscellaneous Chores
+- add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
+- add lint to turbo.json and run prettier ([909f0d3](https://github.com/sanity-io/sdk/commit/909f0d34339c9c8ff8c013dfa13e5d607a2012fc))
+- all client requests are properly tagged ([#274](https://github.com/sanity-io/sdk/issues/274)) ([6df8938](https://github.com/sanity-io/sdk/commit/6df893891e7b12eff122de5147ab03b65b51bcbe))
+- **auth:** ensure that authStore is a true shared resource store ([#371](https://github.com/sanity-io/sdk/issues/371)) ([1709d95](https://github.com/sanity-io/sdk/commit/1709d95dd62082b5e46ae909e2531448ff979074))
+- **auth:** only attempt to refresh stamped tokens ([#304](https://github.com/sanity-io/sdk/issues/304)) ([b08a319](https://github.com/sanity-io/sdk/commit/b08a3194a061031400e2ded654269adf71130ea5))
+- **build:** fixes build warning ([#252](https://github.com/sanity-io/sdk/issues/252)) ([bed82f8](https://github.com/sanity-io/sdk/commit/bed82f8d87521dd0cc9d827af5a7f908749ad711))
+- **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
+- **core:** add correct perspective to useProjection ([#295](https://github.com/sanity-io/sdk/issues/295)) ([8792e00](https://github.com/sanity-io/sdk/commit/8792e00db7f5f5926e5c311e5cf0bf74bc78f041))
+- **core:** add raw perspective to client ([#237](https://github.com/sanity-io/sdk/issues/237)) ([202c4ba](https://github.com/sanity-io/sdk/commit/202c4ba7bb9fdbc7f635ac8691ba840717cafc69))
+- **core:** determine env for version ([#293](https://github.com/sanity-io/sdk/issues/293)) ([643eac4](https://github.com/sanity-io/sdk/commit/643eac4c69c117c7b08866afb1f92b32010c9a83))
+- **core:** emit current token state on subscribe ([#139](https://github.com/sanity-io/sdk/issues/139)) ([7ec0d98](https://github.com/sanity-io/sdk/commit/7ec0d984f2c7f2da519206165cb7a2c1e2213c79))
+- **core:** fixes apiVersion in usersStore ([#262](https://github.com/sanity-io/sdk/issues/262)) ([248eb19](https://github.com/sanity-io/sdk/commit/248eb192dc331ce64c05721172f2855a44dad0ca))
+- **core:** use drafts instead of previewDrafts ([#279](https://github.com/sanity-io/sdk/issues/279)) ([45305ad](https://github.com/sanity-io/sdk/commit/45305ad0ecc72d60ca1ccba15703bb8a0a6a53f5))
+- correct auth state subscription ([#101](https://github.com/sanity-io/sdk/issues/101)) ([9ba03d0](https://github.com/sanity-io/sdk/commit/9ba03d03f00df6d6aac29036cdca6a880fb3c52d))
+- **deps:** update dependency @sanity/client to ^6.28.3 ([#287](https://github.com/sanity-io/sdk/issues/287)) ([fc5c5a1](https://github.com/sanity-io/sdk/commit/fc5c5a1fd54bca5b7b7138e4cab49113449eebe2))
+- **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
+- **deps:** update dependency @sanity/mutate to ^0.12.4 ([#395](https://github.com/sanity-io/sdk/issues/395)) ([6cbb54a](https://github.com/sanity-io/sdk/commit/6cbb54a343b81fb0da0bd4852b1bdf36ae29de42))
+- **deps:** Update eslint-tooling ([#69](https://github.com/sanity-io/sdk/issues/69)) ([d9d8e09](https://github.com/sanity-io/sdk/commit/d9d8e099e4711bb6ae90e926ce804715f56ef5d3))
+- **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
+- **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
+- **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
+- environment variable access for Remix ([#168](https://github.com/sanity-io/sdk/issues/168)) ([4ad3587](https://github.com/sanity-io/sdk/commit/4ad3587fd0ea262b09c3add20c2ba2bd8d5d15c2))
+- fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
+- initialize client with configured apiHost ([#186](https://github.com/sanity-io/sdk/issues/186)) ([13c72cb](https://github.com/sanity-io/sdk/commit/13c72cbb0dc9aa2fe1b4c0384f1cf28eb7f40d2e))
+- make apiVersion required in getClient ([#230](https://github.com/sanity-io/sdk/issues/230)) ([91458d3](https://github.com/sanity-io/sdk/commit/91458d35251be6cf02592f0d4391f58838921ff8))
+- mark packages as private for now ([#11](https://github.com/sanity-io/sdk/issues/11)) ([a103825](https://github.com/sanity-io/sdk/commit/a1038257192e2c493132b96233d461bdd9a31744))
+- package access and version ([#89](https://github.com/sanity-io/sdk/issues/89)) ([c4eb26d](https://github.com/sanity-io/sdk/commit/c4eb26dac12ec56c5a569c8edc895ffcd46a63a7))
+- trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
+- update typedoc to use package mode ([#117](https://github.com/sanity-io/sdk/issues/117)) ([7f4e0e1](https://github.com/sanity-io/sdk/commit/7f4e0e1f08610fb3861e5dc8eb67fb1556b4d965))
-* renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187)) ([3220d57](https://github.com/sanity-io/sdk/commit/3220d5729c8012ffc47bfa2d75bfca1f2642df76))
+### Miscellaneous Chores
+- renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187)) ([3220d57](https://github.com/sanity-io/sdk/commit/3220d5729c8012ffc47bfa2d75bfca1f2642df76))
### Code Refactoring
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
## [0.0.0-alpha.23](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.22...sdk-v0.0.0-alpha.23) (2025-04-03)
-
### ⚠ BREAKING CHANGES
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
-* replace `sanityConfigs` prop with `config` prop in `
` and `
`
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
-* rename `_type` to `documentType` in DocumentHandle interface and related usages
-* rename `_id` to `documentId` in DocumentHandle interface and related usages
-* update document hooks and actions to expect `DocumentHandle` props
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
-* remove `
`, introduce `
` for configuration
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
+- replace `sanityConfigs` prop with `config` prop in `
` and `
`
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
+- rename `_type` to `documentType` in DocumentHandle interface and related usages
+- rename `_id` to `documentId` in DocumentHandle interface and related usages
+- update document hooks and actions to expect `DocumentHandle` props
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
+- remove `
`, introduce `
` for configuration
### Features
-* introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* remove `
`, introduce `
` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace `sanityConfigs` prop with `config` prop in `
` and `
` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
-
+- introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- remove `
`, introduce `
` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace `sanityConfigs` prop with `config` prop in `
` and `
` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
### Bug Fixes
-* **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
+- **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
## [0.0.0-alpha.22](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.21...sdk-v0.0.0-alpha.22) (2025-03-28)
-
### Bug Fixes
-* **auth:** ensure that authStore is a true shared resource store ([#371](https://github.com/sanity-io/sdk/issues/371)) ([1709d95](https://github.com/sanity-io/sdk/commit/1709d95dd62082b5e46ae909e2531448ff979074))
+- **auth:** ensure that authStore is a true shared resource store ([#371](https://github.com/sanity-io/sdk/issues/371)) ([1709d95](https://github.com/sanity-io/sdk/commit/1709d95dd62082b5e46ae909e2531448ff979074))
## [0.0.0-alpha.21](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.20...sdk-v0.0.0-alpha.21) (2025-03-27)
-
### Bug Fixes
-* **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
+- **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
## [0.0.0-alpha.20](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.19...sdk-v0.0.0-alpha.20) (2025-03-25)
-
### ⚠ BREAKING CHANGES
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
### Features
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
-
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
### Bug Fixes
-* fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
-
+- fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
### Code Refactoring
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
## [0.0.0-alpha.19](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.18...sdk-v0.0.0-alpha.19) (2025-03-21)
-
### ⚠ BREAKING CHANGES
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
### Features
-* add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
-* make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
+- add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
+- make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
## [0.0.0-alpha.18](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.17...sdk-v0.0.0-alpha.18) (2025-03-14)
-
### ⚠ BREAKING CHANGES
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
### Features
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
## [0.0.0-alpha.17](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.16...sdk-v0.0.0-alpha.17) (2025-03-14)
-
### ⚠ BREAKING CHANGES
-* remove `schema` from sanity config
-* remove schema state and schema manager
+- remove `schema` from sanity config
+- remove schema state and schema manager
### Features
-* remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* store Dashboard context ([#307](https://github.com/sanity-io/sdk/issues/307)) ([a6c454e](https://github.com/sanity-io/sdk/commit/a6c454e33acea6d33d004751615b226bd60c49b3))
-* use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- store Dashboard context ([#307](https://github.com/sanity-io/sdk/issues/307)) ([a6c454e](https://github.com/sanity-io/sdk/commit/a6c454e33acea6d33d004751615b226bd60c49b3))
+- use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
## [0.0.0-alpha.16](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.15...sdk-v0.0.0-alpha.16) (2025-03-12)
-
### Features
-* **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
-
+- **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
### Bug Fixes
-* all client requests are properly tagged ([#274](https://github.com/sanity-io/sdk/issues/274)) ([6df8938](https://github.com/sanity-io/sdk/commit/6df893891e7b12eff122de5147ab03b65b51bcbe))
-* **auth:** only attempt to refresh stamped tokens ([#304](https://github.com/sanity-io/sdk/issues/304)) ([b08a319](https://github.com/sanity-io/sdk/commit/b08a3194a061031400e2ded654269adf71130ea5))
+- all client requests are properly tagged ([#274](https://github.com/sanity-io/sdk/issues/274)) ([6df8938](https://github.com/sanity-io/sdk/commit/6df893891e7b12eff122de5147ab03b65b51bcbe))
+- **auth:** only attempt to refresh stamped tokens ([#304](https://github.com/sanity-io/sdk/issues/304)) ([b08a319](https://github.com/sanity-io/sdk/commit/b08a3194a061031400e2ded654269adf71130ea5))
## [0.0.0-alpha.15](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.14...sdk-v0.0.0-alpha.15) (2025-03-10)
-
### ⚠ BREAKING CHANGES
-* remove `useDocuments` and `useSearch` hooks
+- remove `useDocuments` and `useSearch` hooks
### Features
-* add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
-* add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
-* **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
-* remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
-
+- add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
+- add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
+- **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
+- remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
### Bug Fixes
-* **core:** add correct perspective to useProjection ([#295](https://github.com/sanity-io/sdk/issues/295)) ([8792e00](https://github.com/sanity-io/sdk/commit/8792e00db7f5f5926e5c311e5cf0bf74bc78f041))
-* **core:** determine env for version ([#293](https://github.com/sanity-io/sdk/issues/293)) ([643eac4](https://github.com/sanity-io/sdk/commit/643eac4c69c117c7b08866afb1f92b32010c9a83))
-* **deps:** update dependency @sanity/client to ^6.28.3 ([#287](https://github.com/sanity-io/sdk/issues/287)) ([fc5c5a1](https://github.com/sanity-io/sdk/commit/fc5c5a1fd54bca5b7b7138e4cab49113449eebe2))
-* **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
-* **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
+- **core:** add correct perspective to useProjection ([#295](https://github.com/sanity-io/sdk/issues/295)) ([8792e00](https://github.com/sanity-io/sdk/commit/8792e00db7f5f5926e5c311e5cf0bf74bc78f041))
+- **core:** determine env for version ([#293](https://github.com/sanity-io/sdk/issues/293)) ([643eac4](https://github.com/sanity-io/sdk/commit/643eac4c69c117c7b08866afb1f92b32010c9a83))
+- **deps:** update dependency @sanity/client to ^6.28.3 ([#287](https://github.com/sanity-io/sdk/issues/287)) ([fc5c5a1](https://github.com/sanity-io/sdk/commit/fc5c5a1fd54bca5b7b7138e4cab49113449eebe2))
+- **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
+- **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
## [0.0.0-alpha.14](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.13...sdk-v0.0.0-alpha.14) (2025-03-07)
-
### ⚠ BREAKING CHANGES
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
### Features
-* add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
-
+- add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
### Bug Fixes
-* **core:** use drafts instead of previewDrafts ([#279](https://github.com/sanity-io/sdk/issues/279)) ([45305ad](https://github.com/sanity-io/sdk/commit/45305ad0ecc72d60ca1ccba15703bb8a0a6a53f5))
+- **core:** use drafts instead of previewDrafts ([#279](https://github.com/sanity-io/sdk/issues/279)) ([45305ad](https://github.com/sanity-io/sdk/commit/45305ad0ecc72d60ca1ccba15703bb8a0a6a53f5))
## [0.0.0-alpha.13](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.12...sdk-v0.0.0-alpha.13) (2025-03-05)
-
### Features
-* `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
-
+- `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
### Bug Fixes
-* add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
-* **build:** fixes build warning ([#252](https://github.com/sanity-io/sdk/issues/252)) ([bed82f8](https://github.com/sanity-io/sdk/commit/bed82f8d87521dd0cc9d827af5a7f908749ad711))
-* **core:** fixes apiVersion in usersStore ([#262](https://github.com/sanity-io/sdk/issues/262)) ([248eb19](https://github.com/sanity-io/sdk/commit/248eb192dc331ce64c05721172f2855a44dad0ca))
+- add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
+- **build:** fixes build warning ([#252](https://github.com/sanity-io/sdk/issues/252)) ([bed82f8](https://github.com/sanity-io/sdk/commit/bed82f8d87521dd0cc9d827af5a7f908749ad711))
+- **core:** fixes apiVersion in usersStore ([#262](https://github.com/sanity-io/sdk/issues/262)) ([248eb19](https://github.com/sanity-io/sdk/commit/248eb192dc331ce64c05721172f2855a44dad0ca))
## [0.0.0-alpha.12](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.11...sdk-v0.0.0-alpha.12) (2025-02-28)
-
### Features
-* add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
+- add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
## [0.0.0-alpha.11](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.10...sdk-v0.0.0-alpha.11) (2025-02-28)
-
### Features
-* **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
-* document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
-
+- **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
+- document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
### Bug Fixes
-* **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
-* **core:** add raw perspective to client ([#237](https://github.com/sanity-io/sdk/issues/237)) ([202c4ba](https://github.com/sanity-io/sdk/commit/202c4ba7bb9fdbc7f635ac8691ba840717cafc69))
-* make apiVersion required in getClient ([#230](https://github.com/sanity-io/sdk/issues/230)) ([91458d3](https://github.com/sanity-io/sdk/commit/91458d35251be6cf02592f0d4391f58838921ff8))
+- **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
+- **core:** add raw perspective to client ([#237](https://github.com/sanity-io/sdk/issues/237)) ([202c4ba](https://github.com/sanity-io/sdk/commit/202c4ba7bb9fdbc7f635ac8691ba840717cafc69))
+- make apiVersion required in getClient ([#230](https://github.com/sanity-io/sdk/issues/230)) ([91458d3](https://github.com/sanity-io/sdk/commit/91458d35251be6cf02592f0d4391f58838921ff8))
## [0.0.0-alpha.10](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.9...sdk-v0.0.0-alpha.10) (2025-02-13)
-
### Features
-* export the SanityDocument type ([#221](https://github.com/sanity-io/sdk/issues/221)) ([dc6dbc8](https://github.com/sanity-io/sdk/commit/dc6dbc85fe6d80c6e3b08de76e666da340aa62f6))
+- export the SanityDocument type ([#221](https://github.com/sanity-io/sdk/issues/221)) ([dc6dbc8](https://github.com/sanity-io/sdk/commit/dc6dbc85fe6d80c6e3b08de76e666da340aa62f6))
## [0.0.0-alpha.9](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.8...sdk-v0.0.0-alpha.9) (2025-02-11)
-
### Features
-* document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
+- document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
## [0.0.0-alpha.8](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.7...sdk-v0.0.0-alpha.8) (2025-02-06)
-
### Features
-* **client:** add a global api client ([#209](https://github.com/sanity-io/sdk/issues/209)) ([5898b1d](https://github.com/sanity-io/sdk/commit/5898b1d82fc07d12f736d1361e48287e41ae0608))
+- **client:** add a global api client ([#209](https://github.com/sanity-io/sdk/issues/209)) ([5898b1d](https://github.com/sanity-io/sdk/commit/5898b1d82fc07d12f736d1361e48287e41ae0608))
## [0.0.0-alpha.7](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.6...sdk-v0.0.0-alpha.7) (2025-02-05)
-
### Bug Fixes
-* trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
+- trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
## [0.0.0-alpha.6](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.5...sdk-v0.0.0-alpha.6) (2025-01-30)
-
### ⚠ BREAKING CHANGES
-* renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187))
+- renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187))
### Miscellaneous Chores
-* renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187)) ([3220d57](https://github.com/sanity-io/sdk/commit/3220d5729c8012ffc47bfa2d75bfca1f2642df76))
+- renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187)) ([3220d57](https://github.com/sanity-io/sdk/commit/3220d5729c8012ffc47bfa2d75bfca1f2642df76))
## [0.0.0-alpha.5](https://github.com/sanity-io/sdk/compare/sdk-v0.0.0-alpha.4...sdk-v0.0.0-alpha.5) (2025-01-28)
diff --git a/packages/core/package.json b/packages/core/package.json
index 1cbb68d88..fc9533faf 100644
--- a/packages/core/package.json
+++ b/packages/core/package.json
@@ -1,6 +1,6 @@
{
"name": "@sanity/sdk",
- "version": "2.2.0",
+ "version": "2.3.1",
"private": false,
"description": "Sanity SDK",
"keywords": [
@@ -57,7 +57,7 @@
"prettier": "@sanity/prettier-config",
"dependencies": {
"@sanity/bifur-client": "^0.4.1",
- "@sanity/client": "^7.10.0",
+ "@sanity/client": "^7.12.0",
"@sanity/comlink": "^3.0.4",
"@sanity/diff-match-patch": "^3.2.0",
"@sanity/diff-patch": "^6.0.0",
diff --git a/packages/core/src/_exports/index.ts b/packages/core/src/_exports/index.ts
index 758df273e..5daaf91a8 100644
--- a/packages/core/src/_exports/index.ts
+++ b/packages/core/src/_exports/index.ts
@@ -5,6 +5,25 @@ import {type SanityProject as _SanityProject} from '@sanity/client'
*/
export type SanityProject = _SanityProject
+export type {
+ AgentGenerateOptions,
+ AgentGenerateResult,
+ AgentPatchOptions,
+ AgentPatchResult,
+ AgentPromptOptions,
+ AgentPromptResult,
+ AgentTransformOptions,
+ AgentTransformResult,
+ AgentTranslateOptions,
+ AgentTranslateResult,
+} from '../agent/agentActions'
+export {
+ agentGenerate,
+ agentPatch,
+ agentPrompt,
+ agentTransform,
+ agentTranslate,
+} from '../agent/agentActions'
export {AuthStateType} from '../auth/authStateType'
export {
type AuthState,
@@ -24,6 +43,13 @@ export {
export {observeOrganizationVerificationState} from '../auth/getOrganizationVerificationState'
export {handleAuthCallback} from '../auth/handleAuthCallback'
export {logout} from '../auth/logout'
+export {
+ type ApiErrorBody,
+ getClientErrorApiBody,
+ getClientErrorApiDescription,
+ getClientErrorApiType,
+ isProjectUserNotFoundClientError,
+} from '../auth/utils'
export type {ClientStoreState as ClientState} from '../client/clientStore'
export {type ClientOptions, getClient, getClientState} from '../client/clientStore'
export {
@@ -50,9 +76,13 @@ export {
createProjectHandle,
} from '../config/handles'
export {
+ canvasSource,
type DatasetHandle,
+ datasetSource,
type DocumentHandle,
+ type DocumentSource,
type DocumentTypeHandle,
+ mediaLibrarySource,
type PerspectiveHandle,
type ProjectHandle,
type ReleasePerspective,
@@ -123,8 +153,6 @@ export {resolveProjection} from '../projection/resolveProjection'
export {type ProjectionValuePending, type ValidProjection} from '../projection/types'
export {getProjectsState, resolveProjects} from '../projects/projects'
export {
- clearQueryError,
- getQueryErrorState,
getQueryKey,
getQueryState,
parseQueryKey,
diff --git a/packages/core/src/agent/agentActions.test.ts b/packages/core/src/agent/agentActions.test.ts
new file mode 100644
index 000000000..e5108bb97
--- /dev/null
+++ b/packages/core/src/agent/agentActions.test.ts
@@ -0,0 +1,81 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+import {firstValueFrom, of} from 'rxjs'
+import {beforeEach, describe, expect, it, vi} from 'vitest'
+
+import {
+ agentGenerate,
+ agentPatch,
+ agentPrompt,
+ agentTransform,
+ agentTranslate,
+} from './agentActions'
+
+let mockClient: any
+
+vi.mock('../client/clientStore', () => {
+ return {
+ getClientState: () => ({observable: of(mockClient)}),
+ }
+})
+
+describe('agent actions', () => {
+ beforeEach(() => {
+ mockClient = {
+ observable: {
+ agent: {
+ action: {
+ generate: vi.fn(),
+ transform: vi.fn(),
+ translate: vi.fn(),
+ },
+ },
+ },
+ agent: {
+ action: {
+ prompt: vi.fn(),
+ patch: vi.fn(),
+ },
+ },
+ }
+ })
+
+ it('agentGenerate returns observable from client', async () => {
+ mockClient.observable.agent.action.generate.mockReturnValue(of('gen'))
+ const instance = {config: {projectId: 'p', dataset: 'd'}} as any
+ const value = await firstValueFrom(agentGenerate(instance, {foo: 'bar'} as any))
+ expect(value).toBe('gen')
+ expect(mockClient.observable.agent.action.generate).toHaveBeenCalledWith({foo: 'bar'})
+ })
+
+ it('agentTransform returns observable from client', async () => {
+ mockClient.observable.agent.action.transform.mockReturnValue(of('xform'))
+ const instance = {config: {projectId: 'p', dataset: 'd'}} as any
+ const value = await firstValueFrom(agentTransform(instance, {a: 1} as any))
+ expect(value).toBe('xform')
+ expect(mockClient.observable.agent.action.transform).toHaveBeenCalledWith({a: 1})
+ })
+
+ it('agentTranslate returns observable from client', async () => {
+ mockClient.observable.agent.action.translate.mockReturnValue(of('xlate'))
+ const instance = {config: {projectId: 'p', dataset: 'd'}} as any
+ const value = await firstValueFrom(agentTranslate(instance, {b: 2} as any))
+ expect(value).toBe('xlate')
+ expect(mockClient.observable.agent.action.translate).toHaveBeenCalledWith({b: 2})
+ })
+
+ it('agentPrompt wraps promise into observable', async () => {
+ mockClient.agent.action.prompt.mockResolvedValue('prompted')
+ const instance = {config: {projectId: 'p', dataset: 'd'}} as any
+ const value = await firstValueFrom(agentPrompt(instance, {p: true} as any))
+ expect(value).toBe('prompted')
+ expect(mockClient.agent.action.prompt).toHaveBeenCalledWith({p: true})
+ })
+
+ it('agentPatch wraps promise into observable', async () => {
+ mockClient.agent.action.patch.mockResolvedValue('patched')
+ const instance = {config: {projectId: 'p', dataset: 'd'}} as any
+ const value = await firstValueFrom(agentPatch(instance, {q: false} as any))
+ expect(value).toBe('patched')
+ expect(mockClient.agent.action.patch).toHaveBeenCalledWith({q: false})
+ })
+})
diff --git a/packages/core/src/agent/agentActions.ts b/packages/core/src/agent/agentActions.ts
new file mode 100644
index 000000000..893f27aaf
--- /dev/null
+++ b/packages/core/src/agent/agentActions.ts
@@ -0,0 +1,139 @@
+import {type SanityClient} from '@sanity/client'
+import {from, Observable, switchMap} from 'rxjs'
+
+import {getClientState} from '../client/clientStore'
+import {type SanityInstance} from '../store/createSanityInstance'
+
+const API_VERSION = 'vX'
+
+/** @alpha */
+export type AgentGenerateOptions = Parameters<
+ SanityClient['observable']['agent']['action']['generate']
+>[0]
+
+/** @alpha */
+export type AgentTransformOptions = Parameters<
+ SanityClient['observable']['agent']['action']['transform']
+>[0]
+
+/** @alpha */
+export type AgentTranslateOptions = Parameters<
+ SanityClient['observable']['agent']['action']['translate']
+>[0]
+
+/** @alpha */
+export type AgentPromptOptions = Parameters
[0]
+
+/** @alpha */
+export type AgentPatchOptions = Parameters[0]
+
+/** @alpha */
+export type AgentGenerateResult = Awaited<
+ ReturnType
+>
+
+/** @alpha */
+export type AgentTransformResult = Awaited<
+ ReturnType
+>
+
+/** @alpha */
+export type AgentTranslateResult = Awaited<
+ ReturnType
+>
+
+/** @alpha */
+export type AgentPromptResult = Awaited>
+
+/** @alpha */
+export type AgentPatchResult = Awaited>
+
+/**
+ * Generates a new document using the agent.
+ * @param instance - The Sanity instance.
+ * @param options - The options for the agent generate action. See the [Agent Actions API](https://www.sanity.io/docs/agent-actions/introduction) for more details.
+ * @returns An Observable emitting the result of the agent generate action.
+ * @alpha
+ */
+export function agentGenerate(
+ instance: SanityInstance,
+ options: AgentGenerateOptions,
+): AgentGenerateResult {
+ return getClientState(instance, {
+ apiVersion: API_VERSION,
+ projectId: instance.config.projectId,
+ dataset: instance.config.dataset,
+ }).observable.pipe(switchMap((client) => client.observable.agent.action.generate(options)))
+}
+
+/**
+ * Transforms a document using the agent.
+ * @param instance - The Sanity instance.
+ * @param options - The options for the agent transform action. See the [Agent Actions API](https://www.sanity.io/docs/agent-actions/introduction) for more details.
+ * @returns An Observable emitting the result of the agent transform action.
+ * @alpha
+ */
+export function agentTransform(
+ instance: SanityInstance,
+ options: AgentTransformOptions,
+): AgentTransformResult {
+ return getClientState(instance, {
+ apiVersion: API_VERSION,
+ projectId: instance.config.projectId,
+ dataset: instance.config.dataset,
+ }).observable.pipe(switchMap((client) => client.observable.agent.action.transform(options)))
+}
+
+/**
+ * Translates a document using the agent.
+ * @param instance - The Sanity instance.
+ * @param options - The options for the agent translate action. See the [Agent Actions API](https://www.sanity.io/docs/agent-actions/introduction) for more details.
+ * @returns An Observable emitting the result of the agent translate action.
+ * @alpha
+ */
+export function agentTranslate(
+ instance: SanityInstance,
+ options: AgentTranslateOptions,
+): AgentTranslateResult {
+ return getClientState(instance, {
+ apiVersion: API_VERSION,
+ projectId: instance.config.projectId,
+ dataset: instance.config.dataset,
+ }).observable.pipe(switchMap((client) => client.observable.agent.action.translate(options)))
+}
+
+/**
+ * Prompts the agent using the same instruction template format as the other actions, but returns text or json instead of acting on a document.
+ * @param instance - The Sanity instance.
+ * @param options - The options for the agent prompt action. See the [Agent Actions API](https://www.sanity.io/docs/agent-actions/introduction) for more details.
+ * @returns An Observable emitting the result of the agent prompt action.
+ * @alpha
+ */
+export function agentPrompt(
+ instance: SanityInstance,
+ options: AgentPromptOptions,
+): Observable {
+ return getClientState(instance, {
+ apiVersion: API_VERSION,
+ projectId: instance.config.projectId,
+ dataset: instance.config.dataset,
+ }).observable.pipe(switchMap((client) => from(client.agent.action.prompt(options))))
+}
+
+/**
+ * Patches a document using the agent.
+ * @param instance - The Sanity instance.
+ * @param options - The options for the agent patch action. See the [Agent Actions API](https://www.sanity.io/docs/agent-actions/introduction) for more details.
+ * @returns An Observable emitting the result of the agent patch action.
+ * @alpha
+ */
+export function agentPatch(
+ instance: SanityInstance,
+ options: AgentPatchOptions,
+): Observable {
+ return getClientState(instance, {
+ apiVersion: API_VERSION,
+ projectId: instance.config.projectId,
+ dataset: instance.config.dataset,
+ }).observable.pipe(switchMap((client) => from(client.agent.action.patch(options))))
+}
diff --git a/packages/core/src/auth/authStore.test.ts b/packages/core/src/auth/authStore.test.ts
index 65b3be83d..d0afcbbcf 100644
--- a/packages/core/src/auth/authStore.test.ts
+++ b/packages/core/src/auth/authStore.test.ts
@@ -237,6 +237,7 @@ describe('authStore', () => {
it('sets to logged in using studio token when studio mode is enabled and token exists', () => {
const studioToken = 'studio-token'
const projectId = 'studio-project'
+ const studioStorageKey = `__studio_auth_token_${projectId}`
const mockStorage = {
getItem: vi.fn(),
setItem: vi.fn(),
@@ -252,40 +253,38 @@ describe('authStore', () => {
})
const {authState, options} = authStore.getInitialState(instance)
- expect(getStudioTokenFromLocalStorage).toHaveBeenCalledWith(mockStorage, projectId)
+ expect(getStudioTokenFromLocalStorage).toHaveBeenCalledWith(mockStorage, studioStorageKey)
expect(authState).toMatchObject({type: AuthStateType.LOGGED_IN, token: studioToken})
expect(options.authMethod).toBe('localstorage')
})
- it('checks for cookie auth when studio mode is enabled and no studio token exists', async () => {
- vi.useFakeTimers()
+ it('checks for cookie auth during initialize when studio mode is enabled and no studio token exists', () => {
const projectId = 'studio-project'
+ const studioStorageKey = `__studio_auth_token_${projectId}`
const mockStorage = {
getItem: vi.fn(),
setItem: vi.fn(),
removeItem: vi.fn(),
} as unknown as Storage // Mock storage
vi.mocked(getStudioTokenFromLocalStorage).mockReturnValue(null)
- // Mock cookie check to return true asynchronously
vi.mocked(checkForCookieAuth).mockResolvedValue(true)
instance = createSanityInstance({
projectId,
dataset: 'd',
studioMode: {enabled: true},
- auth: {storageArea: mockStorage}, // Provide mock storage
+ auth: {storageArea: mockStorage},
})
- // Initial state might be logged out before the async check completes
+ // Verify initial state without async cookie probe
const {authState: initialAuthState} = authStore.getInitialState(instance)
- expect(initialAuthState.type).toBe(AuthStateType.LOGGED_OUT) // Or potentially logging in depending on other factors
- expect(getStudioTokenFromLocalStorage).toHaveBeenCalledWith(mockStorage, projectId)
- expect(checkForCookieAuth).toHaveBeenCalledWith(projectId, expect.any(Function))
+ expect(initialAuthState.type).toBe(AuthStateType.LOGGED_OUT)
+ expect(getStudioTokenFromLocalStorage).toHaveBeenCalledWith(mockStorage, studioStorageKey)
- // Wait for the promise in getInitialState to resolve
- await vi.runAllTimersAsync()
+ // Trigger store creation + initialize
+ getAuthState(instance)
- vi.useRealTimers()
+ expect(checkForCookieAuth).toHaveBeenCalledWith(projectId, expect.any(Function))
})
it('falls back to default auth (storage token) when studio mode is disabled', () => {
@@ -573,14 +572,7 @@ describe('authStore', () => {
expect(initialOrgId.getCurrent()).toBe('initial-org-id')
// Call handleCallback with the callback URL
- await handleAuthCallback(instance, callbackUrl) // Use await as handleAuthCallback is async
-
- // Wait for the state update to be reflected in the selector
- await vi.waitUntil(
- () => getDashboardOrganizationId(instance).getCurrent() === 'callback-org-id',
- )
- // Add a microtask yield just in case
- await new Promise((resolve) => setTimeout(resolve, 0))
+ await handleAuthCallback(instance, callbackUrl)
// Check that the orgId from the callback context is now set
const finalOrgId = getDashboardOrganizationId(instance)
diff --git a/packages/core/src/auth/authStore.ts b/packages/core/src/auth/authStore.ts
index e7c830496..dd7b434cc 100644
--- a/packages/core/src/auth/authStore.ts
+++ b/packages/core/src/auth/authStore.ts
@@ -67,7 +67,11 @@ export interface DashboardContext {
orgId?: string
}
-type AuthMethodOptions = 'localstorage' | 'cookie' | undefined
+/**
+ * The method of authentication used.
+ * @internal
+ */
+export type AuthMethodOptions = 'localstorage' | 'cookie' | undefined
let tokenRefresherRunning = false
@@ -105,7 +109,8 @@ export const authStore = defineStore({
} = instance.config.auth ?? {}
let storageArea = instance.config.auth?.storageArea
- const storageKey = `__sanity_auth_token`
+ let storageKey = `__sanity_auth_token`
+ const studioModeEnabled = instance.config.studioMode?.enabled
// This login URL will only be used for local development
let loginDomain = 'https://www.sanity.io'
@@ -149,23 +154,21 @@ export const authStore = defineStore({
console.error('Failed to parse dashboard context from initial location:', err)
}
- if (!isInDashboard) {
+ if (!isInDashboard || studioModeEnabled) {
// If not in dashboard, use the storage area from the config
+ // If studio mode is enabled, use the local storage area (default)
storageArea = storageArea ?? getDefaultStorage()
}
let token: string | null
let authMethod: AuthMethodOptions
- if (instance.config.studioMode?.enabled) {
- token = getStudioTokenFromLocalStorage(storageArea, instance.config.projectId)
+ if (studioModeEnabled) {
+ // In studio mode, always use the studio-specific storage key and subscribe to it
+ const studioStorageKey = `__studio_auth_token_${instance.config.projectId ?? ''}`
+ storageKey = studioStorageKey
+ token = getStudioTokenFromLocalStorage(storageArea, studioStorageKey)
if (token) {
authMethod = 'localstorage'
- } else {
- checkForCookieAuth(instance.config.projectId, clientFactory).then((isCookieAuthEnabled) => {
- if (isCookieAuthEnabled) {
- authMethod = 'cookie'
- }
- })
}
} else {
token = getTokenFromStorage(storageArea, storageKey)
@@ -177,14 +180,16 @@ export const authStore = defineStore({
let authState: AuthState
if (providedToken) {
authState = {type: AuthStateType.LOGGED_IN, token: providedToken, currentUser: null}
+ } else if (token && studioModeEnabled) {
+ authState = {type: AuthStateType.LOGGED_IN, token: token ?? '', currentUser: null}
} else if (
getAuthCode(callbackUrl, initialLocationHref) ||
getTokenFromLocation(initialLocationHref)
) {
authState = {type: AuthStateType.LOGGING_IN, isExchangingToken: false}
// Note: dashboardContext from the callback URL can be set later in handleAuthCallback too
- } else if (token && !isInDashboard) {
- // Only use token from storage if NOT running in dashboard
+ } else if (token && !isInDashboard && !studioModeEnabled) {
+ // Only use token from storage if NOT running in dashboard and studio mode is not enabled
authState = {type: AuthStateType.LOGGED_IN, token, currentUser: null}
} else {
// Default to logged out if no provided token, not handling callback,
@@ -212,11 +217,37 @@ export const authStore = defineStore({
initialize(context) {
const subscriptions: Subscription[] = []
subscriptions.push(subscribeToStateAndFetchCurrentUser(context))
-
- if (context.state.get().options?.storageArea) {
+ const storageArea = context.state.get().options?.storageArea
+ if (storageArea) {
subscriptions.push(subscribeToStorageEventsAndSetToken(context))
}
+ // If in Studio mode with no local token, resolve cookie auth asynchronously
+ try {
+ const {instance, state} = context
+ const studioModeEnabled = !!instance.config.studioMode?.enabled
+ const token: string | null =
+ state.get().authState?.type === AuthStateType.LOGGED_IN
+ ? (state.get().authState as LoggedInAuthState).token
+ : null
+ if (studioModeEnabled && !token) {
+ const projectId = instance.config.projectId
+ const clientFactory = state.get().options.clientFactory
+ checkForCookieAuth(projectId, clientFactory).then((isCookieAuthEnabled) => {
+ if (!isCookieAuthEnabled) return
+ state.set('enableCookieAuth', (prev) => ({
+ options: {...prev.options, authMethod: 'cookie'},
+ authState:
+ prev.authState.type === AuthStateType.LOGGED_IN
+ ? prev.authState
+ : {type: AuthStateType.LOGGED_IN, token: '', currentUser: null},
+ }))
+ })
+ }
+ } catch {
+ // best-effort cookie detection
+ }
+
if (!tokenRefresherRunning) {
tokenRefresherRunning = true
subscriptions.push(refreshStampedToken(context))
diff --git a/packages/core/src/auth/studioModeAuth.test.ts b/packages/core/src/auth/studioModeAuth.test.ts
index 9bad45b55..af8a5e3b5 100644
--- a/packages/core/src/auth/studioModeAuth.test.ts
+++ b/packages/core/src/auth/studioModeAuth.test.ts
@@ -96,7 +96,7 @@ describe('getStudioTokenFromLocalStorage', () => {
expect(getTokenFromStorageSpy).not.toHaveBeenCalled()
})
- it('should return null if projectId is undefined', () => {
+ it('should return null if storageKey is undefined', () => {
const result = getStudioTokenFromLocalStorage(storageArea, undefined)
expect(result).toBeNull()
expect(getTokenFromStorageSpy).not.toHaveBeenCalled()
@@ -104,19 +104,19 @@ describe('getStudioTokenFromLocalStorage', () => {
it('should call getTokenFromStorage with correct key', () => {
getTokenFromStorageSpy.mockReturnValue(null) // Assume token not found for this test
- getStudioTokenFromLocalStorage(storageArea, projectId)
+ getStudioTokenFromLocalStorage(storageArea, studioStorageKey)
expect(getTokenFromStorageSpy).toHaveBeenCalledWith(storageArea, studioStorageKey)
})
it('should return the token if found in storage', () => {
getTokenFromStorageSpy.mockReturnValue(mockToken)
- const result = getStudioTokenFromLocalStorage(storageArea, projectId)
+ const result = getStudioTokenFromLocalStorage(storageArea, studioStorageKey)
expect(result).toBe(mockToken)
})
it('should return null if token is not found in storage', () => {
getTokenFromStorageSpy.mockReturnValue(null)
- const result = getStudioTokenFromLocalStorage(storageArea, projectId)
+ const result = getStudioTokenFromLocalStorage(storageArea, studioStorageKey)
expect(result).toBeNull()
})
})
diff --git a/packages/core/src/auth/studioModeAuth.ts b/packages/core/src/auth/studioModeAuth.ts
index ffccfb99f..45941f994 100644
--- a/packages/core/src/auth/studioModeAuth.ts
+++ b/packages/core/src/auth/studioModeAuth.ts
@@ -33,17 +33,16 @@ export async function checkForCookieAuth(
/**
* Attempts to retrieve a studio token from local storage.
* @param storageArea - The storage area to retrieve the token from.
- * @param projectId - The project ID to retrieve the token for.
+ * @param storageKey - The storage key to retrieve the token from.
* @returns The studio token or null if it does not exist.
* @internal
*/
export function getStudioTokenFromLocalStorage(
storageArea: Storage | undefined,
- projectId: string | undefined,
+ storageKey: string | undefined,
): string | null {
- if (!storageArea || !projectId) return null
- const studioStorageKey = `__studio_auth_token_${projectId}`
- const token = getTokenFromStorage(storageArea, studioStorageKey)
+ if (!storageArea || !storageKey) return null
+ const token = getTokenFromStorage(storageArea, storageKey)
if (token) {
return token
}
diff --git a/packages/core/src/auth/subscribeToStateAndFetchCurrentUser.ts b/packages/core/src/auth/subscribeToStateAndFetchCurrentUser.ts
index d208b4b3b..850ed9d6a 100644
--- a/packages/core/src/auth/subscribeToStateAndFetchCurrentUser.ts
+++ b/packages/core/src/auth/subscribeToStateAndFetchCurrentUser.ts
@@ -4,32 +4,43 @@ import {distinctUntilChanged, filter, map, type Subscription, switchMap} from 'r
import {type StoreContext} from '../store/defineStore'
import {DEFAULT_API_VERSION, REQUEST_TAG_PREFIX} from './authConstants'
import {AuthStateType} from './authStateType'
-import {type AuthState, type AuthStoreState} from './authStore'
+import {type AuthMethodOptions, type AuthState, type AuthStoreState} from './authStore'
export const subscribeToStateAndFetchCurrentUser = ({
state,
+ instance,
}: StoreContext): Subscription => {
const {clientFactory, apiHost} = state.get().options
+ const useProjectHostname = !!instance.config.studioMode?.enabled
+ const projectId = instance.config.projectId
const currentUser$ = state.observable
.pipe(
- map(({authState}) => authState),
+ map(({authState, options}) => ({authState, authMethod: options.authMethod})),
filter(
- (authState): authState is Extract =>
- authState.type === AuthStateType.LOGGED_IN && !authState.currentUser,
+ (
+ value,
+ ): value is {
+ authState: Extract
+ authMethod: AuthMethodOptions
+ } => value.authState.type === AuthStateType.LOGGED_IN && !value.authState.currentUser,
+ ),
+ map((value) => ({token: value.authState.token, authMethod: value.authMethod})),
+ distinctUntilChanged(
+ (prev, curr) => prev.token === curr.token && prev.authMethod === curr.authMethod,
),
- map((authState) => authState.token),
- distinctUntilChanged(),
)
.pipe(
- map((token) =>
+ map(({token, authMethod}) =>
clientFactory({
apiVersion: DEFAULT_API_VERSION,
requestTagPrefix: REQUEST_TAG_PREFIX,
- token,
+ token: authMethod === 'cookie' ? undefined : token,
ignoreBrowserTokenWarning: true,
- useProjectHostname: false,
+ useProjectHostname,
useCdn: false,
+ ...(authMethod === 'cookie' ? {withCredentials: true} : {}),
+ ...(useProjectHostname && projectId ? {projectId} : {}),
...(apiHost && {apiHost}),
}),
),
diff --git a/packages/core/src/auth/utils.test.ts b/packages/core/src/auth/utils.test.ts
index e4fc39176..a5332cd4a 100644
--- a/packages/core/src/auth/utils.test.ts
+++ b/packages/core/src/auth/utils.test.ts
@@ -4,6 +4,7 @@ import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'
import {AUTH_CODE_PARAM, DEFAULT_BASE} from './authConstants'
import {
getAuthCode,
+ getCleanedUrl,
getDefaultLocation,
getDefaultStorage,
getStorageEvents,
@@ -230,3 +231,36 @@ describe('getTokenFromLocation', () => {
expect(result).toBe(testToken)
})
})
+
+describe('getCleanedUrl', () => {
+ it('removes only token from hash when it is the only param', () => {
+ const url = 'http://example.com/page#token=abc'
+ const cleaned = getCleanedUrl(url)
+ expect(cleaned).toBe('http://example.com/page')
+ })
+
+ it('removes only token from hash and preserves other hash params', () => {
+ const url = 'http://example.com/page#token=abc&foo=bar'
+ const cleaned = getCleanedUrl(url)
+ expect(cleaned).toBe('http://example.com/page#foo=bar')
+ })
+
+ it('removes token when it appears among multiple hash params', () => {
+ const url = 'http://example.com/page#foo=bar&token=abc&baz=qux'
+ const cleaned = getCleanedUrl(url)
+ expect(cleaned).toBe('http://example.com/page#foo=bar&baz=qux')
+ })
+
+ it('removes sid and url from query string while preserving others', () => {
+ const url =
+ 'http://example.com/callback?sid=s1&url=https%3A%2F%2Freturn.example%2Fdone&x=1#token=abc'
+ const cleaned = getCleanedUrl(url)
+ expect(cleaned).toBe('http://example.com/callback?x=1')
+ })
+
+ it('preserves non key-value hash fragments', () => {
+ const url = 'http://example.com/page#section'
+ const cleaned = getCleanedUrl(url)
+ expect(cleaned).toBe('http://example.com/page#section')
+ })
+})
diff --git a/packages/core/src/auth/utils.ts b/packages/core/src/auth/utils.ts
index 809c4aaf6..92c9e2b73 100644
--- a/packages/core/src/auth/utils.ts
+++ b/packages/core/src/auth/utils.ts
@@ -1,3 +1,4 @@
+import {type ClientError} from '@sanity/client'
import {EMPTY, fromEvent, Observable} from 'rxjs'
import {AUTH_CODE_PARAM, DEFAULT_BASE} from './authConstants'
@@ -116,13 +117,56 @@ export function getDefaultLocation(): string {
}
/**
- * Cleans up the URL by removing the hash and the sid and url parameters.
+ * Cleans up the URL by removing the `token` from the hash and the `sid` and `url` search params.
* @internal
*/
export function getCleanedUrl(locationUrl: string): string {
const loc = new URL(locationUrl)
- loc.hash = ''
+ // Remove only the `token` param from the hash while preserving other fragments
+ const rawHash = loc.hash.startsWith('#') ? loc.hash.slice(1) : loc.hash
+ if (rawHash && rawHash.includes('=')) {
+ const hashParams = new URLSearchParams(rawHash)
+ hashParams.delete('token')
+ hashParams.delete('withSid')
+ const nextHash = hashParams.toString()
+ loc.hash = nextHash ? `#${nextHash}` : ''
+ }
loc.searchParams.delete('sid')
loc.searchParams.delete('url')
return loc.toString()
}
+
+// -----------------------------------------------------------------------------
+// ClientError helpers (shared)
+// -----------------------------------------------------------------------------
+
+/** @internal */
+export type ApiErrorBody = {
+ error?: {type?: string; description?: string}
+ type?: string
+ description?: string
+ message?: string
+}
+
+/** @internal Extracts the structured API error body from a ClientError, if present. */
+export function getClientErrorApiBody(error: ClientError): ApiErrorBody | undefined {
+ const body: unknown = (error as ClientError).response?.body
+ return body && typeof body === 'object' ? (body as ApiErrorBody) : undefined
+}
+
+/** @internal Returns the error type string from an API error body, if available. */
+export function getClientErrorApiType(error: ClientError): string | undefined {
+ const body = getClientErrorApiBody(error)
+ return body?.error?.type ?? body?.type
+}
+
+/** @internal Returns the error description string from an API error body, if available. */
+export function getClientErrorApiDescription(error: ClientError): string | undefined {
+ const body = getClientErrorApiBody(error)
+ return body?.error?.description ?? body?.description
+}
+
+/** @internal True if the error represents a projectUserNotFoundError. */
+export function isProjectUserNotFoundClientError(error: ClientError): boolean {
+ return getClientErrorApiType(error) === 'projectUserNotFoundError'
+}
diff --git a/packages/core/src/client/clientStore.test.ts b/packages/core/src/client/clientStore.test.ts
index c0b912052..18462dac3 100644
--- a/packages/core/src/client/clientStore.test.ts
+++ b/packages/core/src/client/clientStore.test.ts
@@ -3,6 +3,7 @@ import {Subject} from 'rxjs'
import {beforeEach, describe, expect, it, vi} from 'vitest'
import {getAuthMethodState, getTokenState} from '../auth/authStore'
+import {datasetSource, mediaLibrarySource} from '../config/sanityConfig'
import {createSanityInstance, type SanityInstance} from '../store/createSanityInstance'
import {getClient, getClientState} from './clientStore'
@@ -158,4 +159,120 @@ describe('clientStore', () => {
subscription.unsubscribe()
})
})
+
+ describe('source handling', () => {
+ it('should create client when source is provided', () => {
+ const source = datasetSource('source-project', 'source-dataset')
+ const client = getClient(instance, {apiVersion: '2024-11-12', source})
+
+ expect(vi.mocked(createClient)).toHaveBeenCalledWith(
+ expect.objectContaining({
+ apiVersion: '2024-11-12',
+ source: expect.objectContaining({
+ __sanity_internal_sourceId: {
+ projectId: 'source-project',
+ dataset: 'source-dataset',
+ },
+ }),
+ }),
+ )
+ // Client should be projectless - no projectId/dataset in config
+ expect(client.config()).not.toHaveProperty('projectId')
+ expect(client.config()).not.toHaveProperty('dataset')
+ expect(client.config()).toEqual(
+ expect.objectContaining({
+ source: expect.objectContaining({
+ __sanity_internal_sourceId: {
+ projectId: 'source-project',
+ dataset: 'source-dataset',
+ },
+ }),
+ }),
+ )
+ })
+
+ it('should create resource when source has array sourceId and be projectless', () => {
+ const source = mediaLibrarySource('media-lib-123')
+ const client = getClient(instance, {apiVersion: '2024-11-12', source})
+
+ expect(vi.mocked(createClient)).toHaveBeenCalledWith(
+ expect.objectContaining({
+ '~experimental_resource': {type: 'media-library', id: 'media-lib-123'},
+ 'apiVersion': '2024-11-12',
+ }),
+ )
+ // Client should be projectless - no projectId/dataset in config
+ expect(client.config()).not.toHaveProperty('projectId')
+ expect(client.config()).not.toHaveProperty('dataset')
+ expect(client.config()).toEqual(
+ expect.objectContaining({
+ '~experimental_resource': {type: 'media-library', id: 'media-lib-123'},
+ }),
+ )
+ })
+
+ it('should create projectless client when source is provided, ignoring instance config', () => {
+ const source = datasetSource('source-project', 'source-dataset')
+ const client = getClient(instance, {apiVersion: '2024-11-12', source})
+
+ // Client should be projectless - source takes precedence, instance config is ignored
+ expect(client.config()).not.toHaveProperty('projectId')
+ expect(client.config()).not.toHaveProperty('dataset')
+ expect(client.config()).toEqual(
+ expect.objectContaining({
+ source: expect.objectContaining({
+ __sanity_internal_sourceId: {
+ projectId: 'source-project',
+ dataset: 'source-dataset',
+ },
+ }),
+ }),
+ )
+ })
+
+ it('should warn when both source and explicit projectId/dataset are provided', () => {
+ const consoleSpy = vi.spyOn(console, 'warn').mockImplementation(() => {})
+ const source = datasetSource('source-project', 'source-dataset')
+ const client = getClient(instance, {
+ apiVersion: '2024-11-12',
+ source,
+ projectId: 'explicit-project',
+ dataset: 'explicit-dataset',
+ })
+
+ expect(consoleSpy).toHaveBeenCalledWith(
+ 'Both source and explicit projectId/dataset are provided. The source will be used and projectId/dataset will be ignored.',
+ )
+ // Client should still be projectless despite explicit projectId/dataset
+ expect(client.config()).not.toHaveProperty('projectId')
+ expect(client.config()).not.toHaveProperty('dataset')
+ consoleSpy.mockRestore()
+ })
+
+ it('should create different clients for different sources', () => {
+ const source1 = datasetSource('project-1', 'dataset-1')
+ const source2 = datasetSource('project-2', 'dataset-2')
+ const source3 = mediaLibrarySource('media-lib-1')
+
+ const client1 = getClient(instance, {apiVersion: '2024-11-12', source: source1})
+ const client2 = getClient(instance, {apiVersion: '2024-11-12', source: source2})
+ const client3 = getClient(instance, {apiVersion: '2024-11-12', source: source3})
+
+ expect(client1).not.toBe(client2)
+ expect(client2).not.toBe(client3)
+ expect(client1).not.toBe(client3)
+ expect(vi.mocked(createClient)).toHaveBeenCalledTimes(3)
+ })
+
+ it('should reuse clients with identical source configurations', () => {
+ const source = datasetSource('same-project', 'same-dataset')
+ const options = {apiVersion: '2024-11-12', source}
+
+ const client1 = getClient(instance, options)
+ const client2 = getClient(instance, options)
+
+ expect(client1).toBe(client2)
+ expect(vi.mocked(createClient)).toHaveBeenCalledTimes(1)
+ })
+ })
})
diff --git a/packages/core/src/client/clientStore.ts b/packages/core/src/client/clientStore.ts
index c83b266e0..78092d1d0 100644
--- a/packages/core/src/client/clientStore.ts
+++ b/packages/core/src/client/clientStore.ts
@@ -2,6 +2,7 @@ import {type ClientConfig, createClient, type SanityClient} from '@sanity/client
import {pick} from 'lodash-es'
import {getAuthMethodState, getTokenState} from '../auth/authStore'
+import {type DocumentSource, SOURCE_ID} from '../config/sanityConfig'
import {bindActionGlobally} from '../store/createActionBinder'
import {createStateSourceAction} from '../store/createStateSourceAction'
import {defineStore, type StoreContext} from '../store/defineStore'
@@ -39,6 +40,7 @@ const allowedKeys = Object.keys({
'requestTagPrefix': null,
'useProjectHostname': null,
'~experimental_resource': null,
+ 'source': null,
} satisfies Record) as (keyof ClientOptions)[]
const DEFAULT_CLIENT_CONFIG: ClientConfig = {
@@ -90,6 +92,11 @@ export interface ClientOptions extends Pick({
@@ -156,18 +163,42 @@ export const getClient = bindActionGlobally(
const tokenFromState = state.get().token
const {clients, authMethod} = state.get()
+ const hasSource = !!options.source
+ let sourceId = options.source?.[SOURCE_ID]
+
+ let resource
+ if (Array.isArray(sourceId)) {
+ resource = {type: sourceId[0], id: sourceId[1]}
+ sourceId = undefined
+ }
+
const projectId = options.projectId ?? instance.config.projectId
const dataset = options.dataset ?? instance.config.dataset
const apiHost = options.apiHost ?? instance.config.auth?.apiHost
const effectiveOptions: ClientOptions = {
...DEFAULT_CLIENT_CONFIG,
- ...((options.scope === 'global' || !projectId) && {useProjectHostname: false}),
+ ...((options.scope === 'global' || !projectId || hasSource) && {useProjectHostname: false}),
token: authMethod === 'cookie' ? undefined : (tokenFromState ?? undefined),
...options,
...(projectId && {projectId}),
...(dataset && {dataset}),
...(apiHost && {apiHost}),
+ ...(resource && {'~experimental_resource': resource}),
+ }
+
+ // When a source is provided, don't use projectId/dataset - the client should be "projectless"
+ // The client code itself will ignore the non-source config, so we do this to prevent confusing the user.
+ // (ref: https://github.com/sanity-io/client/blob/5c23f81f5ab93a53f5b22b39845c867988508d84/src/data/dataMethods.ts#L691)
+ if (hasSource) {
+ if (options.projectId || options.dataset) {
+ // eslint-disable-next-line no-console
+ console.warn(
+ 'Both source and explicit projectId/dataset are provided. The source will be used and projectId/dataset will be ignored.',
+ )
+ }
+ delete effectiveOptions.projectId
+ delete effectiveOptions.dataset
}
if (effectiveOptions.token === null || typeof effectiveOptions.token === 'undefined') {
diff --git a/packages/core/src/config/sanityConfig.ts b/packages/core/src/config/sanityConfig.ts
index 7dbd8accd..0d6fba4a2 100644
--- a/packages/core/src/config/sanityConfig.ts
+++ b/packages/core/src/config/sanityConfig.ts
@@ -81,3 +81,43 @@ export interface SanityConfig extends DatasetHandle, PerspectiveHandle {
enabled: boolean
}
}
+
+export const SOURCE_ID = '__sanity_internal_sourceId'
+
+/**
+ * A document source can be used for querying.
+ *
+ * @beta
+ * @see datasetSource Construct a document source for a given projectId and dataset.
+ * @see mediaLibrarySource Construct a document source for a mediaLibraryId.
+ */
+export type DocumentSource = {
+ [SOURCE_ID]: ['media-library', string] | ['canvas', string] | {projectId: string; dataset: string}
+}
+
+/**
+ * Returns a document source for a projectId and dataset.
+ *
+ * @beta
+ */
+export function datasetSource(projectId: string, dataset: string): DocumentSource {
+ return {[SOURCE_ID]: {projectId, dataset}}
+}
+
+/**
+ * Returns a document source for a Media Library.
+ *
+ * @beta
+ */
+export function mediaLibrarySource(id: string): DocumentSource {
+ return {[SOURCE_ID]: ['media-library', id]}
+}
+
+/**
+ * Returns a document source for a Canvas.
+ *
+ * @beta
+ */
+export function canvasSource(id: string): DocumentSource {
+ return {[SOURCE_ID]: ['canvas', id]}
+}
diff --git a/packages/core/src/query/queryStore.ts b/packages/core/src/query/queryStore.ts
index 4b59677ea..5f92b02d9 100644
--- a/packages/core/src/query/queryStore.ts
+++ b/packages/core/src/query/queryStore.ts
@@ -23,9 +23,9 @@ import {
} from 'rxjs'
import {getClientState} from '../client/clientStore'
-import {type DatasetHandle} from '../config/sanityConfig'
+import {type DatasetHandle, type DocumentSource} from '../config/sanityConfig'
import {getPerspectiveState} from '../releases/getPerspectiveState'
-import {bindActionByDataset} from '../store/createActionBinder'
+import {bindActionBySource} from '../store/createActionBinder'
import {type SanityInstance} from '../store/createSanityInstance'
import {
createStateSourceAction,
@@ -62,6 +62,7 @@ export interface QueryOptions<
DatasetHandle {
query: TQuery
params?: Record
+ source?: DocumentSource
}
/**
@@ -160,6 +161,7 @@ const listenForNewSubscribersAndFetch = ({state, instance}: StoreContext {
return _getQueryState(...args)
}
-const _getQueryState = bindActionByDataset(
+const _getQueryState = bindActionBySource(
queryStore,
createStateSourceAction({
selector: ({state, instance}: SelectorContext, options: QueryOptions) => {
@@ -317,29 +320,6 @@ const _getQueryState = bindActionByDataset(
}),
)
-/**
- * Returns a state source for the top-level query store error (if any).
- *
- * Unlike {@link getQueryState}, this selector does not throw; it simply returns the error value.
- * Subscribe to this to be notified when a global query error occurs (e.g., CORS failures).
- *
- * @beta
- */
-export function getQueryErrorState(instance: SanityInstance): StateSource {
- return _getQueryErrorState(instance)
-}
-
-const _getQueryErrorState = bindActionByDataset(
- queryStore,
- createStateSourceAction({
- selector: ({state}: SelectorContext) => state.error,
- onSubscribe: () => {
- // No-op subscription as we don't track per-query subscribers here
- return () => {}
- },
- }),
-)
-
/**
* Resolves the result of a query without registering a lasting subscriber.
*
@@ -372,7 +352,7 @@ export function resolveQuery(
export function resolveQuery(...args: Parameters): Promise {
return _resolveQuery(...args)
}
-const _resolveQuery = bindActionByDataset(
+const _resolveQuery = bindActionBySource(
queryStore,
({state, instance}, {signal, ...options}: ResolveQueryOptions) => {
const normalized = normalizeOptionsWithPerspective(instance, options)
@@ -413,16 +393,3 @@ const _resolveQuery = bindActionByDataset(
return firstValueFrom(race([resolved$, aborted$]))
},
)
-
-/**
- * Clears the top-level query store error.
- * @beta
- */
-export function clearQueryError(instance: SanityInstance): void
-export function clearQueryError(...args: Parameters): void {
- return _clearQueryError(...args)
-}
-
-const _clearQueryError = bindActionByDataset(queryStore, ({state}) => {
- state.set('setError', {error: undefined})
-})
diff --git a/packages/core/src/store/createActionBinder.ts b/packages/core/src/store/createActionBinder.ts
index 4d505707e..ad3974d03 100644
--- a/packages/core/src/store/createActionBinder.ts
+++ b/packages/core/src/store/createActionBinder.ts
@@ -1,4 +1,4 @@
-import {type SanityConfig} from '../config/sanityConfig'
+import {type DocumentSource, type SanityConfig, SOURCE_ID} from '../config/sanityConfig'
import {type SanityInstance} from './createSanityInstance'
import {createStoreInstance, type StoreInstance} from './createStoreInstance'
import {type StoreState} from './createStoreState'
@@ -43,7 +43,9 @@ export type BoundStoreAction<_TState, TParams extends unknown[], TReturn> = (
* )
* ```
*/
-export function createActionBinder(keyFn: (config: SanityConfig) => string) {
+export function createActionBinder(
+ keyFn: (config: SanityConfig, ...params: TKeyParams) => string,
+) {
const instanceRegistry = new Map>()
const storeRegistry = new Map>()
@@ -54,12 +56,12 @@ export function createActionBinder(keyFn: (config: SanityConfig) => string) {
* @param action - The action to bind
* @returns A function that executes the action with a Sanity instance
*/
- return function bindAction(
+ return function bindAction(
storeDefinition: StoreDefinition,
action: StoreAction,
): BoundStoreAction {
return function boundAction(instance: SanityInstance, ...params: TParams) {
- const keySuffix = keyFn(instance.config)
+ const keySuffix = keyFn(instance.config, ...params)
const compositeKey = storeDefinition.name + (keySuffix ? `:${keySuffix}` : '')
// Get or create instance set for this composite key
@@ -128,13 +130,32 @@ export function createActionBinder(keyFn: (config: SanityConfig) => string) {
* fetchDocument(sanityInstance, 'doc123')
* ```
*/
-export const bindActionByDataset = createActionBinder(({projectId, dataset}) => {
+export const bindActionByDataset = createActionBinder(({projectId, dataset}) => {
if (!projectId || !dataset) {
throw new Error('This API requires a project ID and dataset configured.')
}
return `${projectId}.${dataset}`
})
+/**
+ * Binds an action to a store that's scoped to a specific document source.
+ **/
+export const bindActionBySource = createActionBinder<[{source?: DocumentSource}, ...unknown[]]>(
+ ({projectId, dataset}, {source}) => {
+ if (source) {
+ const id = source[SOURCE_ID]
+ if (!id) throw new Error('Invalid source (missing ID information)')
+ if (Array.isArray(id)) return id.join(':')
+ return `${id.projectId}.${id.dataset}`
+ }
+
+ if (!projectId || !dataset) {
+ throw new Error('This API requires a project ID and dataset configured.')
+ }
+ return `${projectId}.${dataset}`
+ },
+)
+
/**
* Binds an action to a global store that's shared across all Sanity instances
*
@@ -173,4 +194,4 @@ export const bindActionByDataset = createActionBinder(({projectId, dataset}) =>
* getCurrentUser(sanityInstance)
* ```
*/
-export const bindActionGlobally = createActionBinder(() => 'global')
+export const bindActionGlobally = createActionBinder(() => 'global')
diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md
index 96f382974..2943da2d6 100644
--- a/packages/react/CHANGELOG.md
+++ b/packages/react/CHANGELOG.md
@@ -1,812 +1,755 @@
# Changelog
-## [2.2.0](https://github.com/sanity-io/sdk/compare/sdk-react-v2.1.2...sdk-react-v2.2.0) (2025-09-03)
+## [2.3.1](https://github.com/sanity-io/sdk/compare/sdk-react-v2.3.0...sdk-react-v2.3.1) (2025-10-17)
+### Bug Fixes
-### Features
+- auth race condition when using the SDK in the Studio structure ([#646](https://github.com/sanity-io/sdk/issues/646)) ([a5d0875](https://github.com/sanity-io/sdk/commit/a5d08752cf24661afdedb8470a3cae11a2e11945))
+
+### Dependencies
-* **projects:** add organizationId and includeMembers parameters to useProjects hook ([#607](https://github.com/sanity-io/sdk/issues/607)) ([df4f69c](https://github.com/sanity-io/sdk/commit/df4f69cc62d59cf159d4ab8811f994ba84e712d7))
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.3.1
+## [2.3.0](https://github.com/sanity-io/sdk/compare/sdk-react-v2.2.0...sdk-react-v2.3.0) (2025-10-15)
+
+### Features
+
+- present a link to add CORS Manage setting when a CORS error occurs ([#625](https://github.com/sanity-io/sdk/issues/625)) ([7610ec2](https://github.com/sanity-io/sdk/commit/7610ec255c87dc95f27653c8064f63f0b7100f4b))
+- upgrade groq-js with support for synchronous evaluation ([#637](https://github.com/sanity-io/sdk/issues/637)) ([60996a7](https://github.com/sanity-io/sdk/commit/60996a7c61695ced7c0d37f3c3ee6eff5d772f63))
### Bug Fixes
-* **deps:** update dependency @sanity/client to v7.10.0 ([#605](https://github.com/sanity-io/sdk/issues/605)) ([6ef5b6c](https://github.com/sanity-io/sdk/commit/6ef5b6c711d48f8a922c132e2d77442acebb61d7))
-* error message display when a ResourceProvider is missing ([#602](https://github.com/sanity-io/sdk/issues/602)) ([3d7e1fe](https://github.com/sanity-io/sdk/commit/3d7e1fe617b7ad2a0384d731356bfbf894fdea61))
-* **projects:** properly type the includeMembers option ([#610](https://github.com/sanity-io/sdk/issues/610)) ([f8d9369](https://github.com/sanity-io/sdk/commit/f8d93695200ff004c7dc14ed5b0034af1450b7cc))
-* **react:** find correct instance for hooks that use config ([#598](https://github.com/sanity-io/sdk/issues/598)) ([3183c23](https://github.com/sanity-io/sdk/commit/3183c234ade23b6f5623a11bae3fa75c418ed657))
+- **core:** change ValidProjection to string type ([#627](https://github.com/sanity-io/sdk/issues/627)) ([2079b36](https://github.com/sanity-io/sdk/commit/2079b36572be0ac15a77a02369048cb077520b45))
+- **deps:** update dependency @sanity/client to ^7.12.0 ([#649](https://github.com/sanity-io/sdk/issues/649)) ([eec856f](https://github.com/sanity-io/sdk/commit/eec856f84c1621785e4f5244c29714a7e05298c3))
+- styling for error messaging ([#647](https://github.com/sanity-io/sdk/issues/647)) ([3bf96f2](https://github.com/sanity-io/sdk/commit/3bf96f23c9dbb580707c3071ec5045f9d20c66b4))
+
+### Dependencies
+
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.3.0
+
+## [2.2.0](https://github.com/sanity-io/sdk/compare/sdk-react-v2.1.2...sdk-react-v2.2.0) (2025-09-03)
+
+### Features
+
+- **projects:** add organizationId and includeMembers parameters to useProjects hook ([#607](https://github.com/sanity-io/sdk/issues/607)) ([df4f69c](https://github.com/sanity-io/sdk/commit/df4f69cc62d59cf159d4ab8811f994ba84e712d7))
+
+### Bug Fixes
+- **deps:** update dependency @sanity/client to v7.10.0 ([#605](https://github.com/sanity-io/sdk/issues/605)) ([6ef5b6c](https://github.com/sanity-io/sdk/commit/6ef5b6c711d48f8a922c132e2d77442acebb61d7))
+- error message display when a ResourceProvider is missing ([#602](https://github.com/sanity-io/sdk/issues/602)) ([3d7e1fe](https://github.com/sanity-io/sdk/commit/3d7e1fe617b7ad2a0384d731356bfbf894fdea61))
+- **projects:** properly type the includeMembers option ([#610](https://github.com/sanity-io/sdk/issues/610)) ([f8d9369](https://github.com/sanity-io/sdk/commit/f8d93695200ff004c7dc14ed5b0034af1450b7cc))
+- **react:** find correct instance for hooks that use config ([#598](https://github.com/sanity-io/sdk/issues/598)) ([3183c23](https://github.com/sanity-io/sdk/commit/3183c234ade23b6f5623a11bae3fa75c418ed657))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.2.0
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.2.0
## [2.1.2](https://github.com/sanity-io/sdk/compare/sdk-react-v2.1.1...sdk-react-v2.1.2) (2025-08-05)
-
### Miscellaneous
-* **sdk-react:** Synchronize sdk versions
-
+- **sdk-react:** Synchronize sdk versions
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.1.2
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.1.2
## [2.1.1](https://github.com/sanity-io/sdk/compare/sdk-react-v2.1.0...sdk-react-v2.1.1) (2025-07-24)
-
### Features
-* **hook:** add getUser hook ([#581](https://github.com/sanity-io/sdk/issues/581)) ([8c36794](https://github.com/sanity-io/sdk/commit/8c36794ee41d0934d9337d32c46cb87c5c3445de))
-* **presence:** add user presence events ([#583](https://github.com/sanity-io/sdk/issues/583)) ([9ed405c](https://github.com/sanity-io/sdk/commit/9ed405c8d2d551d53d4e72b79b159d9496407fc3))
-
+- **hook:** add getUser hook ([#581](https://github.com/sanity-io/sdk/issues/581)) ([8c36794](https://github.com/sanity-io/sdk/commit/8c36794ee41d0934d9337d32c46cb87c5c3445de))
+- **presence:** add user presence events ([#583](https://github.com/sanity-io/sdk/issues/583)) ([9ed405c](https://github.com/sanity-io/sdk/commit/9ed405c8d2d551d53d4e72b79b159d9496407fc3))
### Bug Fixes
-* **deps:** update dependency react-compiler-runtime to v19.1.0-rc.2 ([#536](https://github.com/sanity-io/sdk/issues/536)) ([27df27b](https://github.com/sanity-io/sdk/commit/27df27b7fae387d6b00b4773ce8402524c36e3e5))
-* do not redirect to the Dashboard if studioMode is specified ([#588](https://github.com/sanity-io/sdk/issues/588)) ([731b146](https://github.com/sanity-io/sdk/commit/731b146c35ca3becd40255c86db4b10c9bc2a4a9))
-
+- **deps:** update dependency react-compiler-runtime to v19.1.0-rc.2 ([#536](https://github.com/sanity-io/sdk/issues/536)) ([27df27b](https://github.com/sanity-io/sdk/commit/27df27b7fae387d6b00b4773ce8402524c36e3e5))
+- do not redirect to the Dashboard if studioMode is specified ([#588](https://github.com/sanity-io/sdk/issues/588)) ([731b146](https://github.com/sanity-io/sdk/commit/731b146c35ca3becd40255c86db4b10c9bc2a4a9))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.1.1
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.1.1
## [2.1.0](https://github.com/sanity-io/sdk/compare/sdk-react-v2.0.2...sdk-react-v2.1.0) (2025-06-30)
-
### Miscellaneous
-* release 2.1.0 ([bbc53ee](https://github.com/sanity-io/sdk/commit/bbc53ee9bf9707d82a89657f35a2114a3245cadf))
-
+- release 2.1.0 ([bbc53ee](https://github.com/sanity-io/sdk/commit/bbc53ee9bf9707d82a89657f35a2114a3245cadf))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.1.0
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.1.0
## [2.0.2](https://github.com/sanity-io/sdk/compare/sdk-react-v2.0.1...sdk-react-v2.0.2) (2025-06-27)
-
### Bug Fixes
-* clear error overlay on successful comlink token creation ([#572](https://github.com/sanity-io/sdk/issues/572)) ([32eca80](https://github.com/sanity-io/sdk/commit/32eca804d9397d4b45de5fb86833de22cbc0920b))
-
+- clear error overlay on successful comlink token creation ([#572](https://github.com/sanity-io/sdk/issues/572)) ([32eca80](https://github.com/sanity-io/sdk/commit/32eca804d9397d4b45de5fb86833de22cbc0920b))
### Documentation
-* update useDocumentPreview reference doc ([#566](https://github.com/sanity-io/sdk/issues/566)) ([4c6afb2](https://github.com/sanity-io/sdk/commit/4c6afb2fb619e2b0868a837a5683ad84a811d597))
-
+- update useDocumentPreview reference doc ([#566](https://github.com/sanity-io/sdk/issues/566)) ([4c6afb2](https://github.com/sanity-io/sdk/commit/4c6afb2fb619e2b0868a837a5683ad84a811d597))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.0.2
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.0.2
## [2.0.1](https://github.com/sanity-io/sdk/compare/sdk-react-v2.0.0...sdk-react-v2.0.1) (2025-06-20)
-
### Features
-* add new token fetching via comlink ([#475](https://github.com/sanity-io/sdk/issues/475)) ([f646d53](https://github.com/sanity-io/sdk/commit/f646d5309deabec57ebb9bc561ed1849987db5b7))
-
+- add new token fetching via comlink ([#475](https://github.com/sanity-io/sdk/issues/475)) ([f646d53](https://github.com/sanity-io/sdk/commit/f646d5309deabec57ebb9bc561ed1849987db5b7))
### Documentation
-* update readme logos ([#549](https://github.com/sanity-io/sdk/issues/549)) ([857f8ee](https://github.com/sanity-io/sdk/commit/857f8eec2811f411e7ff21668ef12853730c4368))
-
+- update readme logos ([#549](https://github.com/sanity-io/sdk/issues/549)) ([857f8ee](https://github.com/sanity-io/sdk/commit/857f8eec2811f411e7ff21668ef12853730c4368))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.0.1
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.0.1
## [2.0.0](https://github.com/sanity-io/sdk/compare/sdk-react-v1.0.0...sdk-react-v2.0.0) (2025-05-23)
-
### ⚠ BREAKING CHANGES
-* change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527))
+- change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527))
### Features
-* **react:** add navigate function ([#529](https://github.com/sanity-io/sdk/issues/529)) ([8a5bcfc](https://github.com/sanity-io/sdk/commit/8a5bcfc570cf59c73579d3be16f5bef5abc65da7))
-
+- **react:** add navigate function ([#529](https://github.com/sanity-io/sdk/issues/529)) ([8a5bcfc](https://github.com/sanity-io/sdk/commit/8a5bcfc570cf59c73579d3be16f5bef5abc65da7))
### Bug Fixes
-* change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527)) ([79f6df6](https://github.com/sanity-io/sdk/commit/79f6df6fcf5479bb144447c246e093551ed8c865))
-* **deps:** update dependency @sanity/client to ^7.2.1 ([#526](https://github.com/sanity-io/sdk/issues/526)) ([34b4f26](https://github.com/sanity-io/sdk/commit/34b4f260c1d639414908dd2f1dd8f375e7d1b73e))
-* **deps:** update dependency @sanity/comlink to ^3.0.4 ([#543](https://github.com/sanity-io/sdk/issues/543)) ([e9672a8](https://github.com/sanity-io/sdk/commit/e9672a8747db70715e9547da50791b6135264046))
-* **docs:** use correct hook in TS doc ([#523](https://github.com/sanity-io/sdk/issues/523)) ([fe25a11](https://github.com/sanity-io/sdk/commit/fe25a1109a5a4c6a271645ce5cd978572a09b685))
-
+- change `status` to `_status` in projection and preview ([#527](https://github.com/sanity-io/sdk/issues/527)) ([79f6df6](https://github.com/sanity-io/sdk/commit/79f6df6fcf5479bb144447c246e093551ed8c865))
+- **deps:** update dependency @sanity/client to ^7.2.1 ([#526](https://github.com/sanity-io/sdk/issues/526)) ([34b4f26](https://github.com/sanity-io/sdk/commit/34b4f260c1d639414908dd2f1dd8f375e7d1b73e))
+- **deps:** update dependency @sanity/comlink to ^3.0.4 ([#543](https://github.com/sanity-io/sdk/issues/543)) ([e9672a8](https://github.com/sanity-io/sdk/commit/e9672a8747db70715e9547da50791b6135264046))
+- **docs:** use correct hook in TS doc ([#523](https://github.com/sanity-io/sdk/issues/523)) ([fe25a11](https://github.com/sanity-io/sdk/commit/fe25a1109a5a4c6a271645ce5cd978572a09b685))
### Documentation
-* **react:** fix isConnected mentions in comink hook docs ([#521](https://github.com/sanity-io/sdk/issues/521)) ([2cc1bf1](https://github.com/sanity-io/sdk/commit/2cc1bf141cecba6ee6757e472ed65a73ad590cce))
-
+- **react:** fix isConnected mentions in comink hook docs ([#521](https://github.com/sanity-io/sdk/issues/521)) ([2cc1bf1](https://github.com/sanity-io/sdk/commit/2cc1bf141cecba6ee6757e472ed65a73ad590cce))
### Miscellaneous
-* release 2.0.0 ([#544](https://github.com/sanity-io/sdk/issues/544)) ([048cb50](https://github.com/sanity-io/sdk/commit/048cb503ea2e7852c984c376e48ff74d2a7023be))
-
+- release 2.0.0 ([#544](https://github.com/sanity-io/sdk/issues/544)) ([048cb50](https://github.com/sanity-io/sdk/commit/048cb503ea2e7852c984c376e48ff74d2a7023be))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 2.0.0
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 2.0.0
## [1.0.0](https://github.com/sanity-io/sdk/compare/sdk-react-v1.0.0...sdk-react-v1.0.0) (2025-05-07)
-
### Miscellaneous
-* release 1.0.0 ([#517](https://github.com/sanity-io/sdk/issues/517)) ([52c00a1](https://github.com/sanity-io/sdk/commit/52c00a1eb99a6a34681bba363207ebcf4a9b5371))
-
+- release 1.0.0 ([#517](https://github.com/sanity-io/sdk/issues/517)) ([52c00a1](https://github.com/sanity-io/sdk/commit/52c00a1eb99a6a34681bba363207ebcf4a9b5371))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 1.0.0
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 1.0.0
## [0.0.3](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.2...sdk-react-v0.0.3) (2025-05-07)
-
### ⚠ BREAKING CHANGES
-* bump versions ([#516](https://github.com/sanity-io/sdk/issues/516))
-* remove redundant guides: ([#511](https://github.com/sanity-io/sdk/issues/511))
-* rename useProjection to useDocumentProjection & rename usePreview to useDocumentPreview ([#508](https://github.com/sanity-io/sdk/issues/508))
+- bump versions ([#516](https://github.com/sanity-io/sdk/issues/516))
+- remove redundant guides: ([#511](https://github.com/sanity-io/sdk/issues/511))
+- rename useProjection to useDocumentProjection & rename usePreview to useDocumentPreview ([#508](https://github.com/sanity-io/sdk/issues/508))
### Bug Fixes
-* bump versions ([#516](https://github.com/sanity-io/sdk/issues/516)) ([3601ade](https://github.com/sanity-io/sdk/commit/3601adeebe986af4102f639500a754d585694d9e))
-
+- bump versions ([#516](https://github.com/sanity-io/sdk/issues/516)) ([3601ade](https://github.com/sanity-io/sdk/commit/3601adeebe986af4102f639500a754d585694d9e))
### Documentation
-* remove redundant guides: ([#511](https://github.com/sanity-io/sdk/issues/511)) ([c7be7ac](https://github.com/sanity-io/sdk/commit/c7be7ac1170727496fdb725265bd3d51e02101f3))
-* update package readmes ([#513](https://github.com/sanity-io/sdk/issues/513)) ([aa79bc7](https://github.com/sanity-io/sdk/commit/aa79bc74e904cfcac119be415d871fc71fe17277))
-
+- remove redundant guides: ([#511](https://github.com/sanity-io/sdk/issues/511)) ([c7be7ac](https://github.com/sanity-io/sdk/commit/c7be7ac1170727496fdb725265bd3d51e02101f3))
+- update package readmes ([#513](https://github.com/sanity-io/sdk/issues/513)) ([aa79bc7](https://github.com/sanity-io/sdk/commit/aa79bc74e904cfcac119be415d871fc71fe17277))
### Miscellaneous
-* rename useProjection to useDocumentProjection & rename usePreview to useDocumentPreview ([#508](https://github.com/sanity-io/sdk/issues/508)) ([324aec7](https://github.com/sanity-io/sdk/commit/324aec74f69b42bfca3b44934130eeb91f013528))
-
+- rename useProjection to useDocumentProjection & rename usePreview to useDocumentPreview ([#508](https://github.com/sanity-io/sdk/issues/508)) ([324aec7](https://github.com/sanity-io/sdk/commit/324aec74f69b42bfca3b44934130eeb91f013528))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.3
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.3
## [0.0.2](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.1...sdk-react-v0.0.2) (2025-05-06)
-
### ⚠ BREAKING CHANGES
-* make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504))
+- make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504))
### Features
-* make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504)) ([d49bf0e](https://github.com/sanity-io/sdk/commit/d49bf0e4be9268d68dbec186ed3ba6afc075bedb))
-
+- make all comlink hooks suspend ([#504](https://github.com/sanity-io/sdk/issues/504)) ([d49bf0e](https://github.com/sanity-io/sdk/commit/d49bf0e4be9268d68dbec186ed3ba6afc075bedb))
### Bug Fixes
-* **deps:** move react compiler to RC ([#505](https://github.com/sanity-io/sdk/issues/505)) ([217e0a2](https://github.com/sanity-io/sdk/commit/217e0a2fb31731c4f485a2d8eba9f7ebacedcba5))
-
+- **deps:** move react compiler to RC ([#505](https://github.com/sanity-io/sdk/issues/505)) ([217e0a2](https://github.com/sanity-io/sdk/commit/217e0a2fb31731c4f485a2d8eba9f7ebacedcba5))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.2
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.2
## [0.0.1](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0...sdk-react-v0.0.1) (2025-05-02)
-
### Bug Fixes
-* **docs:** remove custom docs entrypoint names ([#498](https://github.com/sanity-io/sdk/issues/498)) ([4499e85](https://github.com/sanity-io/sdk/commit/4499e85a3a30a5086bceb164c19cb18c71376471))
-
+- **docs:** remove custom docs entrypoint names ([#498](https://github.com/sanity-io/sdk/issues/498)) ([4499e85](https://github.com/sanity-io/sdk/commit/4499e85a3a30a5086bceb164c19cb18c71376471))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.1
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.1
## 0.0.0 (2025-05-02)
-
### ⚠ BREAKING CHANGES
-* remove reference to SDKProvider and ResourceProvider in migration guide ([#493](https://github.com/sanity-io/sdk/issues/493))
+- remove reference to SDKProvider and ResourceProvider in migration guide ([#493](https://github.com/sanity-io/sdk/issues/493))
### Bug Fixes
-* **deps:** update dependency @sanity/message-protocol to ^0.12.0 ([#484](https://github.com/sanity-io/sdk/issues/484)) ([f3beb42](https://github.com/sanity-io/sdk/commit/f3beb42ddad7ad9bf7826783602d57be006c15ee))
-
+- **deps:** update dependency @sanity/message-protocol to ^0.12.0 ([#484](https://github.com/sanity-io/sdk/issues/484)) ([f3beb42](https://github.com/sanity-io/sdk/commit/f3beb42ddad7ad9bf7826783602d57be006c15ee))
### Documentation
-* correct categories for new hooks ([#494](https://github.com/sanity-io/sdk/issues/494)) ([96da771](https://github.com/sanity-io/sdk/commit/96da771e061df6fef1570907275c6c7d1d760269))
-* remove reference to SDKProvider and ResourceProvider in migration guide ([#493](https://github.com/sanity-io/sdk/issues/493)) ([0c1bb0e](https://github.com/sanity-io/sdk/commit/0c1bb0e385f177ced9350c927617b0e37d8743fe))
-
+- correct categories for new hooks ([#494](https://github.com/sanity-io/sdk/issues/494)) ([96da771](https://github.com/sanity-io/sdk/commit/96da771e061df6fef1570907275c6c7d1d760269))
+- remove reference to SDKProvider and ResourceProvider in migration guide ([#493](https://github.com/sanity-io/sdk/issues/493)) ([0c1bb0e](https://github.com/sanity-io/sdk/commit/0c1bb0e385f177ced9350c927617b0e37d8743fe))
### Miscellaneous
-* release 0.0.0 ([08c9acc](https://github.com/sanity-io/sdk/commit/08c9acc0a34954cd611a53753fac2b788b61da9b))
-
+- release 0.0.0 ([08c9acc](https://github.com/sanity-io/sdk/commit/08c9acc0a34954cd611a53753fac2b788b61da9b))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0
## [0.0.0-alpha.31](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.30...sdk-react-v0.0.0-alpha.31) (2025-05-01)
-
### Miscellaneous
-* **sdk-react:** Synchronize sdk versions
-
+- **sdk-react:** Synchronize sdk versions
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.31
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.31
## [0.0.0-alpha.30](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.29...sdk-react-v0.0.0-alpha.30) (2025-05-01)
-
### ⚠ BREAKING CHANGES
-* fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437))
+- fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437))
### Features
-* add releases store ([#420](https://github.com/sanity-io/sdk/issues/420)) ([b5a376c](https://github.com/sanity-io/sdk/commit/b5a376c86e700031fe1700fb55b7f0d1236aaea3))
-* fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437)) ([1a8ecb8](https://github.com/sanity-io/sdk/commit/1a8ecb89217b05c6ed90699c7ee162592cedb896))
-* integrate typegen ([#452](https://github.com/sanity-io/sdk/issues/452)) ([8416864](https://github.com/sanity-io/sdk/commit/8416864533f0f14851e8e71c15be4a1596711b52))
-* verify projects match current org for dashboard apps ([#464](https://github.com/sanity-io/sdk/issues/464)) ([52c8c76](https://github.com/sanity-io/sdk/commit/52c8c7668f09b119d6ca618381e1a44d134612a3))
-
+- add releases store ([#420](https://github.com/sanity-io/sdk/issues/420)) ([b5a376c](https://github.com/sanity-io/sdk/commit/b5a376c86e700031fe1700fb55b7f0d1236aaea3))
+- fetch favorites from dashboard ([#437](https://github.com/sanity-io/sdk/issues/437)) ([1a8ecb8](https://github.com/sanity-io/sdk/commit/1a8ecb89217b05c6ed90699c7ee162592cedb896))
+- integrate typegen ([#452](https://github.com/sanity-io/sdk/issues/452)) ([8416864](https://github.com/sanity-io/sdk/commit/8416864533f0f14851e8e71c15be4a1596711b52))
+- verify projects match current org for dashboard apps ([#464](https://github.com/sanity-io/sdk/issues/464)) ([52c8c76](https://github.com/sanity-io/sdk/commit/52c8c7668f09b119d6ca618381e1a44d134612a3))
### Bug Fixes
-* **deps:** update dependency @sanity/client to ^6.29.1 ([#466](https://github.com/sanity-io/sdk/issues/466)) ([f25ba2b](https://github.com/sanity-io/sdk/commit/f25ba2b2aa32e3c010a6adf5658367c6fa3e149e))
-* **deps:** update dependency @sanity/client to v7 ([#478](https://github.com/sanity-io/sdk/issues/478)) ([e5ed504](https://github.com/sanity-io/sdk/commit/e5ed5047c84c3864cdbebd2c158184d57dfdaff9))
-* fix useProjection example (results -> data) ([#460](https://github.com/sanity-io/sdk/issues/460)) ([46d7d51](https://github.com/sanity-io/sdk/commit/46d7d513cedaada7bd19df6f5e813e28f5976c8a))
-
+- **deps:** update dependency @sanity/client to ^6.29.1 ([#466](https://github.com/sanity-io/sdk/issues/466)) ([f25ba2b](https://github.com/sanity-io/sdk/commit/f25ba2b2aa32e3c010a6adf5658367c6fa3e149e))
+- **deps:** update dependency @sanity/client to v7 ([#478](https://github.com/sanity-io/sdk/issues/478)) ([e5ed504](https://github.com/sanity-io/sdk/commit/e5ed5047c84c3864cdbebd2c158184d57dfdaff9))
+- fix useProjection example (results -> data) ([#460](https://github.com/sanity-io/sdk/issues/460)) ([46d7d51](https://github.com/sanity-io/sdk/commit/46d7d513cedaada7bd19df6f5e813e28f5976c8a))
### Documentation
-* cleanup for Apr 30 ([#479](https://github.com/sanity-io/sdk/issues/479)) ([8793c1e](https://github.com/sanity-io/sdk/commit/8793c1e0d93bc9184d9a65f6e11d35dc148e4ac5))
-* update readmes ([#474](https://github.com/sanity-io/sdk/issues/474)) ([042a853](https://github.com/sanity-io/sdk/commit/042a85316c8179b8a135abbae4d66a4e467f5ee0))
-
+- cleanup for Apr 30 ([#479](https://github.com/sanity-io/sdk/issues/479)) ([8793c1e](https://github.com/sanity-io/sdk/commit/8793c1e0d93bc9184d9a65f6e11d35dc148e4ac5))
+- update readmes ([#474](https://github.com/sanity-io/sdk/issues/474)) ([042a853](https://github.com/sanity-io/sdk/commit/042a85316c8179b8a135abbae4d66a4e467f5ee0))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.30
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.30
## [0.0.0-alpha.29](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.28...sdk-react-v0.0.0-alpha.29) (2025-04-23)
-
### Bug Fixes
-* **build:** fixes build to not include node libraries ([#456](https://github.com/sanity-io/sdk/issues/456)) ([11a8d8a](https://github.com/sanity-io/sdk/commit/11a8d8a6c35dcfd0eeba3f5ca926b5e263aa56e8))
-
+- **build:** fixes build to not include node libraries ([#456](https://github.com/sanity-io/sdk/issues/456)) ([11a8d8a](https://github.com/sanity-io/sdk/commit/11a8d8a6c35dcfd0eeba3f5ca926b5e263aa56e8))
### Documentation
-* mark useDocumentPermissions as public ([#449](https://github.com/sanity-io/sdk/issues/449)) ([089798b](https://github.com/sanity-io/sdk/commit/089798bc5f714279ba6148ed8eb5f9ee116b6af4))
-* mark useProjection as public ([#447](https://github.com/sanity-io/sdk/issues/447)) ([ae0661b](https://github.com/sanity-io/sdk/commit/ae0661b1ae4d04d1dac3044e730c36066cc06094))
-
+- mark useDocumentPermissions as public ([#449](https://github.com/sanity-io/sdk/issues/449)) ([089798b](https://github.com/sanity-io/sdk/commit/089798bc5f714279ba6148ed8eb5f9ee116b6af4))
+- mark useProjection as public ([#447](https://github.com/sanity-io/sdk/issues/447)) ([ae0661b](https://github.com/sanity-io/sdk/commit/ae0661b1ae4d04d1dac3044e730c36066cc06094))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.29
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.29
## [0.0.0-alpha.28](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.27...sdk-react-v0.0.0-alpha.28) (2025-04-22)
-
### Bug Fixes
-* **core:** refactor calculatePermissions to fix initialization error ([#443](https://github.com/sanity-io/sdk/issues/443)) ([e59d6e5](https://github.com/sanity-io/sdk/commit/e59d6e54b1da22194446ffffc747ddbf0711f134))
-* update useNavigateToStudioDocument for new dashboard context ([#436](https://github.com/sanity-io/sdk/issues/436)) ([7d7bbd4](https://github.com/sanity-io/sdk/commit/7d7bbd401942aa2839479f5698be53c0af178017))
-
+- **core:** refactor calculatePermissions to fix initialization error ([#443](https://github.com/sanity-io/sdk/issues/443)) ([e59d6e5](https://github.com/sanity-io/sdk/commit/e59d6e54b1da22194446ffffc747ddbf0711f134))
+- update useNavigateToStudioDocument for new dashboard context ([#436](https://github.com/sanity-io/sdk/issues/436)) ([7d7bbd4](https://github.com/sanity-io/sdk/commit/7d7bbd401942aa2839479f5698be53c0af178017))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.28
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.28
## [0.0.0-alpha.27](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.26...sdk-react-v0.0.0-alpha.27) (2025-04-22)
-
### Bug Fixes
-* **react:** allow sdk-react to work in react 18 ([#389](https://github.com/sanity-io/sdk/issues/389)) ([783b2f9](https://github.com/sanity-io/sdk/commit/783b2f9bce5bf2731e2518bf6a21ccdd3a4a6749))
-
+- **react:** allow sdk-react to work in react 18 ([#389](https://github.com/sanity-io/sdk/issues/389)) ([783b2f9](https://github.com/sanity-io/sdk/commit/783b2f9bce5bf2731e2518bf6a21ccdd3a4a6749))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.27
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.27
## [0.0.0-alpha.26](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.25...sdk-react-v0.0.0-alpha.26) (2025-04-21)
-
### Bug Fixes
-* **auth:** ensure initial url does not contain an sid and improve error handling ([#418](https://github.com/sanity-io/sdk/issues/418)) ([4d76bfc](https://github.com/sanity-io/sdk/commit/4d76bfc52542896128efd7cbd6d5342f1c275cd5))
-* **deps:** update dependency @sanity/types to ^3.83.0 ([#412](https://github.com/sanity-io/sdk/issues/412)) ([b40b289](https://github.com/sanity-io/sdk/commit/b40b289ea67026e7f0a0b7a2f95486e7a27a71c1))
-* **deps:** update dependency rxjs to ^7.8.2 ([#427](https://github.com/sanity-io/sdk/issues/427)) ([cbbf964](https://github.com/sanity-io/sdk/commit/cbbf9645eb2b4d43746d6283e237fbdfd5068080))
-* **docs:** fix navigateToStudioDocument doc & type ([#417](https://github.com/sanity-io/sdk/issues/417)) ([e49e799](https://github.com/sanity-io/sdk/commit/e49e799632f0d569a126ed9f7986d6b51f829da3))
-* prevent bridge script addition if already loaded ([#428](https://github.com/sanity-io/sdk/issues/428)) ([7425a97](https://github.com/sanity-io/sdk/commit/7425a9794d357074ff433b051871dd9eaf454572))
-
+- **auth:** ensure initial url does not contain an sid and improve error handling ([#418](https://github.com/sanity-io/sdk/issues/418)) ([4d76bfc](https://github.com/sanity-io/sdk/commit/4d76bfc52542896128efd7cbd6d5342f1c275cd5))
+- **deps:** update dependency @sanity/types to ^3.83.0 ([#412](https://github.com/sanity-io/sdk/issues/412)) ([b40b289](https://github.com/sanity-io/sdk/commit/b40b289ea67026e7f0a0b7a2f95486e7a27a71c1))
+- **deps:** update dependency rxjs to ^7.8.2 ([#427](https://github.com/sanity-io/sdk/issues/427)) ([cbbf964](https://github.com/sanity-io/sdk/commit/cbbf9645eb2b4d43746d6283e237fbdfd5068080))
+- **docs:** fix navigateToStudioDocument doc & type ([#417](https://github.com/sanity-io/sdk/issues/417)) ([e49e799](https://github.com/sanity-io/sdk/commit/e49e799632f0d569a126ed9f7986d6b51f829da3))
+- prevent bridge script addition if already loaded ([#428](https://github.com/sanity-io/sdk/issues/428)) ([7425a97](https://github.com/sanity-io/sdk/commit/7425a9794d357074ff433b051871dd9eaf454572))
### Documentation
-* fix duplication/entrypoints; add SDK Core note ([#430](https://github.com/sanity-io/sdk/issues/430)) ([f1046fa](https://github.com/sanity-io/sdk/commit/f1046faec1c70d3690ddc9b4d4f92d7c433178a2))
-
+- fix duplication/entrypoints; add SDK Core note ([#430](https://github.com/sanity-io/sdk/issues/430)) ([f1046fa](https://github.com/sanity-io/sdk/commit/f1046faec1c70d3690ddc9b4d4f92d7c433178a2))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.26
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.26
## [0.0.0-alpha.25](https://github.com/sanity-io/sdk/compare/v0.0.0-alpha.24...v0.0.0-alpha.25) (2025-04-09)
-
### Features
-* **core, react:** introduce createGroqSearchFilter utility for search ([#407](https://github.com/sanity-io/sdk/issues/407)) ([77766bb](https://github.com/sanity-io/sdk/commit/77766bbf3fdc7efef4cd8a24f0ca206bef3179ec))
-
+- **core, react:** introduce createGroqSearchFilter utility for search ([#407](https://github.com/sanity-io/sdk/issues/407)) ([77766bb](https://github.com/sanity-io/sdk/commit/77766bbf3fdc7efef4cd8a24f0ca206bef3179ec))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.25
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.25
## [0.0.0-alpha.24](https://github.com/sanity-io/sdk/compare/v0.0.0-alpha.23...v0.0.0-alpha.24) (2025-04-09)
-
### ⚠ BREAKING CHANGES
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
-* replace `sanityConfigs` prop with `config` prop in ` ` and ` `
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
-* rename `_type` to `documentType` in DocumentHandle interface and related usages
-* rename `_id` to `documentId` in DocumentHandle interface and related usages
-* update document hooks and actions to expect `DocumentHandle` props
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
-* remove ` `, introduce ` ` for configuration
-* update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360))
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
-* rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363))
-* rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
-* remove `schema` from sanity config
-* remove schema state and schema manager
-* remove `useDocuments` and `useSearch` hooks
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
-* renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187))
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
+- replace `sanityConfigs` prop with `config` prop in ` ` and ` `
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
+- rename `_type` to `documentType` in DocumentHandle interface and related usages
+- rename `_id` to `documentId` in DocumentHandle interface and related usages
+- update document hooks and actions to expect `DocumentHandle` props
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
+- remove ` `, introduce ` ` for configuration
+- update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
+- rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363))
+- rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
+- remove `schema` from sanity config
+- remove schema state and schema manager
+- remove `useDocuments` and `useSearch` hooks
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
+- renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187))
### Features
-* `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
-* add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
-* add authorization ([#52](https://github.com/sanity-io/sdk/issues/52)) ([59501f1](https://github.com/sanity-io/sdk/commit/59501f1525e271e8d724c4eb69a27f01726bb64e))
-* add hooks for AuthStore ([#91](https://github.com/sanity-io/sdk/issues/91)) ([4367719](https://github.com/sanity-io/sdk/commit/43677193fccc08fcf7074f906edf2acdfc440e1c))
-* add initial SanityInstance provider ([#63](https://github.com/sanity-io/sdk/issues/63)) ([2e816b9](https://github.com/sanity-io/sdk/commit/2e816b94c6a706de7792907e7e593970d1570256))
-* add preview store ([#62](https://github.com/sanity-io/sdk/issues/62)) ([c343f1e](https://github.com/sanity-io/sdk/commit/c343f1e15f30afd66dbd4c0309b9152600ceb1be))
-* add React and Vitest ([#3](https://github.com/sanity-io/sdk/issues/3)) ([e55dc32](https://github.com/sanity-io/sdk/commit/e55dc32f080ffaa7470bdcb2ed97f992cfcbe584))
-* add sdk-react-internal package and remove @sanity/ui package ([#193](https://github.com/sanity-io/sdk/issues/193)) ([7fa201e](https://github.com/sanity-io/sdk/commit/7fa201ee49b75bbc71a741503ed0336f94785201))
-* add session hooks and store ([#59](https://github.com/sanity-io/sdk/issues/59)) ([65ac911](https://github.com/sanity-io/sdk/commit/65ac9111d79211aee621f7bfed47bb5cfcf565e1))
-* add storybook and dev affordances ([#6](https://github.com/sanity-io/sdk/issues/6)) ([15b45e8](https://github.com/sanity-io/sdk/commit/15b45e8d7821ec7abc1852998143e19553c06f1e))
-* add suspense boundary to prevent recreating instances ([d92e38d](https://github.com/sanity-io/sdk/commit/d92e38d64dfe5c0a35d8de35faa7ecbe5425f023))
-* add turborepo ([#2](https://github.com/sanity-io/sdk/issues/2)) ([19c53e1](https://github.com/sanity-io/sdk/commit/19c53e1408edacbda4105c75c6fa5c4fe0a6b744))
-* add TypeDoc ([#43](https://github.com/sanity-io/sdk/issues/43)) ([2274873](https://github.com/sanity-io/sdk/commit/227487372c1d04799f7c2ed06839dae06113887c))
-* add useClient hook ([#96](https://github.com/sanity-io/sdk/issues/96)) ([c50883b](https://github.com/sanity-io/sdk/commit/c50883bbf3eed32977a1033615582690234154fc))
-* add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
-* add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
-* add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
-* add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
-* allow useEditDocument to take an updater function ([#218](https://github.com/sanity-io/sdk/issues/218)) ([85b3440](https://github.com/sanity-io/sdk/commit/85b344007df3fd66ce7dae94df8f6b8a81f54574))
-* **auth:** fetch current user when token is present ([#92](https://github.com/sanity-io/sdk/issues/92)) ([f38008c](https://github.com/sanity-io/sdk/commit/f38008c71d55bb3b54bbf5318045a52a918084c2))
-* **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
-* **components:** add initial presentational components ([#44](https://github.com/sanity-io/sdk/issues/44)) ([9d7cf51](https://github.com/sanity-io/sdk/commit/9d7cf517186ee274fe3bd9ea32b36b590ddb7150))
-* **components:** DocumentList & Storybook upgrades ([#54](https://github.com/sanity-io/sdk/issues/54)) ([71e8eca](https://github.com/sanity-io/sdk/commit/71e8eca3da0995f3a8dd4f6eb5b606fdfa139b6c))
-* **components:** swap Sanity UI w/ CSS (doc collection) ([#114](https://github.com/sanity-io/sdk/issues/114)) ([36dcd35](https://github.com/sanity-io/sdk/commit/36dcd3595bd09eba3cd5e6bac57d9dfcd4fee035))
-* **components:** update DocumentList & DocumentPreview ([#61](https://github.com/sanity-io/sdk/issues/61)) ([c00b292](https://github.com/sanity-io/sdk/commit/c00b292dd99bdc6c5b4ee1615b0f3e49106d09c5))
-* **core:** add README and npm keywords ([#115](https://github.com/sanity-io/sdk/issues/115)) ([8a3c492](https://github.com/sanity-io/sdk/commit/8a3c4928647f6e8c4a8fe3f43da9cb8e904af522))
-* **core:** create client store ([#38](https://github.com/sanity-io/sdk/issues/38)) ([8545333](https://github.com/sanity-io/sdk/commit/8545333c02c5691674e90be19951458ab3abbd6a))
-* **core:** use separate client for auth and refresh client store with token ([#64](https://github.com/sanity-io/sdk/issues/64)) ([9d18fbf](https://github.com/sanity-io/sdk/commit/9d18fbfd2fc2708e0f9505617343720c5d7fafb0))
-* **docs:** add a migration guide ([#357](https://github.com/sanity-io/sdk/issues/357)) ([47ef529](https://github.com/sanity-io/sdk/commit/47ef529e7d4c9f4453451ac6141d28a81a1dfbfe))
-* **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
-* document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
-* document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
-* export useClient ([#213](https://github.com/sanity-io/sdk/issues/213)) ([0e79002](https://github.com/sanity-io/sdk/commit/0e790020ee0f688e6f07243c5605b5cbffe4b1c5))
-* introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* **kitchen-sink:** add routing to kitchen-sink ([#99](https://github.com/sanity-io/sdk/issues/99)) ([50483ea](https://github.com/sanity-io/sdk/commit/50483ea66073bfccdc28e51f7606673eb213bebe))
-* make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
-* **react:** add AuthBoundary ([#102](https://github.com/sanity-io/sdk/issues/102)) ([bd657a0](https://github.com/sanity-io/sdk/commit/bd657a058c4ae0989018503fe2fafa319fcdbc7d))
-* **react:** add comlink fetch hook ([#338](https://github.com/sanity-io/sdk/issues/338)) ([1a78882](https://github.com/sanity-io/sdk/commit/1a788824a2c83126c1b39318aa05f8c3964cad8e))
-* **react:** add interaction history and favorite hooks ([#236](https://github.com/sanity-io/sdk/issues/236)) ([b7cdbd6](https://github.com/sanity-io/sdk/commit/b7cdbd648b81dc46054de0e4c1b864471f2daa30))
-* **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
-* **react:** add sanity os bridge script to AuthBoundary ([#196](https://github.com/sanity-io/sdk/issues/196)) ([1fb064d](https://github.com/sanity-io/sdk/commit/1fb064d111541bf93c8933920d7bce00a9c454ef))
-* **react:** add SDKProvider app to use SDK without core ([#263](https://github.com/sanity-io/sdk/issues/263)) ([51e84fc](https://github.com/sanity-io/sdk/commit/51e84fcd7b64558bc108f00d3fb5a98aade25d29))
-* **react:** add useDocuments hook ([#98](https://github.com/sanity-io/sdk/issues/98)) ([d0f0c1a](https://github.com/sanity-io/sdk/commit/d0f0c1ad753b56b7e7cc6ff0830682d4fc6be0d1))
-* **react:** add useNavigateToStudioDocument hook ([#352](https://github.com/sanity-io/sdk/issues/352)) ([a00b9fa](https://github.com/sanity-io/sdk/commit/a00b9fa381bd89f42da4ef95d01f6e5e7c5f0511))
-* **react:** add useSearch hook ([#258](https://github.com/sanity-io/sdk/issues/258)) ([488317a](https://github.com/sanity-io/sdk/commit/488317a72987daf88385f757a60ffdc191333218))
-* **react:** create React hooks for comlink store ([#153](https://github.com/sanity-io/sdk/issues/153)) ([7055347](https://github.com/sanity-io/sdk/commit/7055347160f7d3734c361d182b686e2f835e1846))
-* **react:** create useStudioWorkspaceById hook ([#343](https://github.com/sanity-io/sdk/issues/343)) ([83feb21](https://github.com/sanity-io/sdk/commit/83feb216e13b903a312a5cffd63f793b29570b30))
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
-* **react:** re-export core sdk and update kitchensink ([#393](https://github.com/sanity-io/sdk/issues/393)) ([a27b850](https://github.com/sanity-io/sdk/commit/a27b850e4ea2779360868009f7646445e36c092f))
-* **react:** use refs for nodes and channels ([#341](https://github.com/sanity-io/sdk/issues/341)) ([4a0b763](https://github.com/sanity-io/sdk/commit/4a0b7637463e8808180a2abe091795e1c3bcef1d))
-* redirect to core if app opened without core ([#268](https://github.com/sanity-io/sdk/issues/268)) ([3f6bb83](https://github.com/sanity-io/sdk/commit/3f6bb8344cee6d582aaee0d7ba64b9cb3035469f))
-* refactor to internal auth store ([#95](https://github.com/sanity-io/sdk/issues/95)) ([5807a2b](https://github.com/sanity-io/sdk/commit/5807a2b0b823f9187c25ab82233ad6d30df664f1))
-* remove ` `, introduce ` ` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
-* remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
-* rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363)) ([8e51dcc](https://github.com/sanity-io/sdk/commit/8e51dcc99bfcb84f59dd43f3b7d877daba158fa3))
-* rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364)) ([544019d](https://github.com/sanity-io/sdk/commit/544019d5c85d2c695848dcb6ea089cc84b7fbbcd))
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
-* render AuthProvider components w/ Sanity UI ([#189](https://github.com/sanity-io/sdk/issues/189)) ([a4ab4c3](https://github.com/sanity-io/sdk/commit/a4ab4c35519417bdd92c75f935479fb834f9af18))
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace `sanityConfigs` prop with `config` prop in ` ` and ` ` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace jsdoc with tsdoc ([#75](https://github.com/sanity-io/sdk/issues/75)) ([7074a38](https://github.com/sanity-io/sdk/commit/7074a383b58de66fe2a9badc7122d0345e354b2a))
-* resolve preview projections ([#130](https://github.com/sanity-io/sdk/issues/130)) ([d30997e](https://github.com/sanity-io/sdk/commit/d30997e4a3d40c0edd1b3f31f48934bf846ab56a))
-* update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360)) ([f1617da](https://github.com/sanity-io/sdk/commit/f1617da31ddcb2d0595877f402a6a1ec82c1d0ab))
-* update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
-* use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-
+- `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
+- add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
+- add authorization ([#52](https://github.com/sanity-io/sdk/issues/52)) ([59501f1](https://github.com/sanity-io/sdk/commit/59501f1525e271e8d724c4eb69a27f01726bb64e))
+- add hooks for AuthStore ([#91](https://github.com/sanity-io/sdk/issues/91)) ([4367719](https://github.com/sanity-io/sdk/commit/43677193fccc08fcf7074f906edf2acdfc440e1c))
+- add initial SanityInstance provider ([#63](https://github.com/sanity-io/sdk/issues/63)) ([2e816b9](https://github.com/sanity-io/sdk/commit/2e816b94c6a706de7792907e7e593970d1570256))
+- add preview store ([#62](https://github.com/sanity-io/sdk/issues/62)) ([c343f1e](https://github.com/sanity-io/sdk/commit/c343f1e15f30afd66dbd4c0309b9152600ceb1be))
+- add React and Vitest ([#3](https://github.com/sanity-io/sdk/issues/3)) ([e55dc32](https://github.com/sanity-io/sdk/commit/e55dc32f080ffaa7470bdcb2ed97f992cfcbe584))
+- add sdk-react-internal package and remove @sanity/ui package ([#193](https://github.com/sanity-io/sdk/issues/193)) ([7fa201e](https://github.com/sanity-io/sdk/commit/7fa201ee49b75bbc71a741503ed0336f94785201))
+- add session hooks and store ([#59](https://github.com/sanity-io/sdk/issues/59)) ([65ac911](https://github.com/sanity-io/sdk/commit/65ac9111d79211aee621f7bfed47bb5cfcf565e1))
+- add storybook and dev affordances ([#6](https://github.com/sanity-io/sdk/issues/6)) ([15b45e8](https://github.com/sanity-io/sdk/commit/15b45e8d7821ec7abc1852998143e19553c06f1e))
+- add suspense boundary to prevent recreating instances ([d92e38d](https://github.com/sanity-io/sdk/commit/d92e38d64dfe5c0a35d8de35faa7ecbe5425f023))
+- add turborepo ([#2](https://github.com/sanity-io/sdk/issues/2)) ([19c53e1](https://github.com/sanity-io/sdk/commit/19c53e1408edacbda4105c75c6fa5c4fe0a6b744))
+- add TypeDoc ([#43](https://github.com/sanity-io/sdk/issues/43)) ([2274873](https://github.com/sanity-io/sdk/commit/227487372c1d04799f7c2ed06839dae06113887c))
+- add useClient hook ([#96](https://github.com/sanity-io/sdk/issues/96)) ([c50883b](https://github.com/sanity-io/sdk/commit/c50883bbf3eed32977a1033615582690234154fc))
+- add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
+- add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
+- add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
+- add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
+- allow useEditDocument to take an updater function ([#218](https://github.com/sanity-io/sdk/issues/218)) ([85b3440](https://github.com/sanity-io/sdk/commit/85b344007df3fd66ce7dae94df8f6b8a81f54574))
+- **auth:** fetch current user when token is present ([#92](https://github.com/sanity-io/sdk/issues/92)) ([f38008c](https://github.com/sanity-io/sdk/commit/f38008c71d55bb3b54bbf5318045a52a918084c2))
+- **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
+- **components:** add initial presentational components ([#44](https://github.com/sanity-io/sdk/issues/44)) ([9d7cf51](https://github.com/sanity-io/sdk/commit/9d7cf517186ee274fe3bd9ea32b36b590ddb7150))
+- **components:** DocumentList & Storybook upgrades ([#54](https://github.com/sanity-io/sdk/issues/54)) ([71e8eca](https://github.com/sanity-io/sdk/commit/71e8eca3da0995f3a8dd4f6eb5b606fdfa139b6c))
+- **components:** swap Sanity UI w/ CSS (doc collection) ([#114](https://github.com/sanity-io/sdk/issues/114)) ([36dcd35](https://github.com/sanity-io/sdk/commit/36dcd3595bd09eba3cd5e6bac57d9dfcd4fee035))
+- **components:** update DocumentList & DocumentPreview ([#61](https://github.com/sanity-io/sdk/issues/61)) ([c00b292](https://github.com/sanity-io/sdk/commit/c00b292dd99bdc6c5b4ee1615b0f3e49106d09c5))
+- **core:** add README and npm keywords ([#115](https://github.com/sanity-io/sdk/issues/115)) ([8a3c492](https://github.com/sanity-io/sdk/commit/8a3c4928647f6e8c4a8fe3f43da9cb8e904af522))
+- **core:** create client store ([#38](https://github.com/sanity-io/sdk/issues/38)) ([8545333](https://github.com/sanity-io/sdk/commit/8545333c02c5691674e90be19951458ab3abbd6a))
+- **core:** use separate client for auth and refresh client store with token ([#64](https://github.com/sanity-io/sdk/issues/64)) ([9d18fbf](https://github.com/sanity-io/sdk/commit/9d18fbfd2fc2708e0f9505617343720c5d7fafb0))
+- **docs:** add a migration guide ([#357](https://github.com/sanity-io/sdk/issues/357)) ([47ef529](https://github.com/sanity-io/sdk/commit/47ef529e7d4c9f4453451ac6141d28a81a1dfbfe))
+- **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
+- document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
+- document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
+- export useClient ([#213](https://github.com/sanity-io/sdk/issues/213)) ([0e79002](https://github.com/sanity-io/sdk/commit/0e790020ee0f688e6f07243c5605b5cbffe4b1c5))
+- introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- **kitchen-sink:** add routing to kitchen-sink ([#99](https://github.com/sanity-io/sdk/issues/99)) ([50483ea](https://github.com/sanity-io/sdk/commit/50483ea66073bfccdc28e51f7606673eb213bebe))
+- make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
+- **react:** add AuthBoundary ([#102](https://github.com/sanity-io/sdk/issues/102)) ([bd657a0](https://github.com/sanity-io/sdk/commit/bd657a058c4ae0989018503fe2fafa319fcdbc7d))
+- **react:** add comlink fetch hook ([#338](https://github.com/sanity-io/sdk/issues/338)) ([1a78882](https://github.com/sanity-io/sdk/commit/1a788824a2c83126c1b39318aa05f8c3964cad8e))
+- **react:** add interaction history and favorite hooks ([#236](https://github.com/sanity-io/sdk/issues/236)) ([b7cdbd6](https://github.com/sanity-io/sdk/commit/b7cdbd648b81dc46054de0e4c1b864471f2daa30))
+- **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
+- **react:** add sanity os bridge script to AuthBoundary ([#196](https://github.com/sanity-io/sdk/issues/196)) ([1fb064d](https://github.com/sanity-io/sdk/commit/1fb064d111541bf93c8933920d7bce00a9c454ef))
+- **react:** add SDKProvider app to use SDK without core ([#263](https://github.com/sanity-io/sdk/issues/263)) ([51e84fc](https://github.com/sanity-io/sdk/commit/51e84fcd7b64558bc108f00d3fb5a98aade25d29))
+- **react:** add useDocuments hook ([#98](https://github.com/sanity-io/sdk/issues/98)) ([d0f0c1a](https://github.com/sanity-io/sdk/commit/d0f0c1ad753b56b7e7cc6ff0830682d4fc6be0d1))
+- **react:** add useNavigateToStudioDocument hook ([#352](https://github.com/sanity-io/sdk/issues/352)) ([a00b9fa](https://github.com/sanity-io/sdk/commit/a00b9fa381bd89f42da4ef95d01f6e5e7c5f0511))
+- **react:** add useSearch hook ([#258](https://github.com/sanity-io/sdk/issues/258)) ([488317a](https://github.com/sanity-io/sdk/commit/488317a72987daf88385f757a60ffdc191333218))
+- **react:** create React hooks for comlink store ([#153](https://github.com/sanity-io/sdk/issues/153)) ([7055347](https://github.com/sanity-io/sdk/commit/7055347160f7d3734c361d182b686e2f835e1846))
+- **react:** create useStudioWorkspaceById hook ([#343](https://github.com/sanity-io/sdk/issues/343)) ([83feb21](https://github.com/sanity-io/sdk/commit/83feb216e13b903a312a5cffd63f793b29570b30))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
+- **react:** re-export core sdk and update kitchensink ([#393](https://github.com/sanity-io/sdk/issues/393)) ([a27b850](https://github.com/sanity-io/sdk/commit/a27b850e4ea2779360868009f7646445e36c092f))
+- **react:** use refs for nodes and channels ([#341](https://github.com/sanity-io/sdk/issues/341)) ([4a0b763](https://github.com/sanity-io/sdk/commit/4a0b7637463e8808180a2abe091795e1c3bcef1d))
+- redirect to core if app opened without core ([#268](https://github.com/sanity-io/sdk/issues/268)) ([3f6bb83](https://github.com/sanity-io/sdk/commit/3f6bb8344cee6d582aaee0d7ba64b9cb3035469f))
+- refactor to internal auth store ([#95](https://github.com/sanity-io/sdk/issues/95)) ([5807a2b](https://github.com/sanity-io/sdk/commit/5807a2b0b823f9187c25ab82233ad6d30df664f1))
+- remove ` `, introduce ` ` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
+- remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
+- rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363)) ([8e51dcc](https://github.com/sanity-io/sdk/commit/8e51dcc99bfcb84f59dd43f3b7d877daba158fa3))
+- rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364)) ([544019d](https://github.com/sanity-io/sdk/commit/544019d5c85d2c695848dcb6ea089cc84b7fbbcd))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
+- render AuthProvider components w/ Sanity UI ([#189](https://github.com/sanity-io/sdk/issues/189)) ([a4ab4c3](https://github.com/sanity-io/sdk/commit/a4ab4c35519417bdd92c75f935479fb834f9af18))
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace `sanityConfigs` prop with `config` prop in ` ` and ` ` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace jsdoc with tsdoc ([#75](https://github.com/sanity-io/sdk/issues/75)) ([7074a38](https://github.com/sanity-io/sdk/commit/7074a383b58de66fe2a9badc7122d0345e354b2a))
+- resolve preview projections ([#130](https://github.com/sanity-io/sdk/issues/130)) ([d30997e](https://github.com/sanity-io/sdk/commit/d30997e4a3d40c0edd1b3f31f48934bf846ab56a))
+- update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360)) ([f1617da](https://github.com/sanity-io/sdk/commit/f1617da31ddcb2d0595877f402a6a1ec82c1d0ab))
+- update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
+- use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
### Bug Fixes
-* add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
-* add lint to turbo.json and run prettier ([909f0d3](https://github.com/sanity-io/sdk/commit/909f0d34339c9c8ff8c013dfa13e5d607a2012fc))
-* adjust incorrect release back to alpha.6 ([#212](https://github.com/sanity-io/sdk/issues/212)) ([a946853](https://github.com/sanity-io/sdk/commit/a9468530e16ee056d972d913e4f046ceb0610134))
-* **auth:** do not perform multiple sid token exchanges ([#308](https://github.com/sanity-io/sdk/issues/308)) ([18461c6](https://github.com/sanity-io/sdk/commit/18461c6837bf532fb7a303efe3f2a279e8fce26f))
-* **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
-* correct the React SDK quickstart ([#317](https://github.com/sanity-io/sdk/issues/317)) ([df5474f](https://github.com/sanity-io/sdk/commit/df5474f478ca6bbde8b471d1beea34f5916470a5))
-* **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
-* **deps:** update dependency react-error-boundary to v5 ([#334](https://github.com/sanity-io/sdk/issues/334)) ([a128d7c](https://github.com/sanity-io/sdk/commit/a128d7c7a64f0e724028e0a6f0e0e2f17a399f82))
-* **deps:** Update eslint-tooling ([#69](https://github.com/sanity-io/sdk/issues/69)) ([d9d8e09](https://github.com/sanity-io/sdk/commit/d9d8e099e4711bb6ae90e926ce804715f56ef5d3))
-* **deps:** update message-protocol to 0.7.0 ([#379](https://github.com/sanity-io/sdk/issues/379)) ([553b2f5](https://github.com/sanity-io/sdk/commit/553b2f5249432773c8b0d05b6704a9f17b26137c))
-* **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
-* **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
-* **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
-* **docs:** rename infiniteList pageSize -> batchSize, update reference docs ([#303](https://github.com/sanity-io/sdk/issues/303)) ([953d111](https://github.com/sanity-io/sdk/commit/953d1117d680acf5fc2e4f74350fb8f9fd8a9b1d))
-* ensure usePreview and useProjection hooks subscribe if no ref is passed ([#366](https://github.com/sanity-io/sdk/issues/366)) ([6da3fd1](https://github.com/sanity-io/sdk/commit/6da3fd158de23956b5f1aa732e31be7a6f312c64))
-* fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
-* handle env variable for react and react-internal ([#294](https://github.com/sanity-io/sdk/issues/294)) ([0b733ff](https://github.com/sanity-io/sdk/commit/0b733ffbe00bbcb8c29fbee6628ba53c704e1c11))
-* mark packages as private for now ([#11](https://github.com/sanity-io/sdk/issues/11)) ([a103825](https://github.com/sanity-io/sdk/commit/a1038257192e2c493132b96233d461bdd9a31744))
-* package access and version ([#89](https://github.com/sanity-io/sdk/issues/89)) ([c4eb26d](https://github.com/sanity-io/sdk/commit/c4eb26dac12ec56c5a569c8edc895ffcd46a63a7))
-* **react:** remove react compiler runtime package ([#311](https://github.com/sanity-io/sdk/issues/311)) ([08046b5](https://github.com/sanity-io/sdk/commit/08046b565b187cad00f45f8790940e5735a77d5a))
-* **react:** update app redirect url to new dashboard ([#377](https://github.com/sanity-io/sdk/issues/377)) ([86ec07e](https://github.com/sanity-io/sdk/commit/86ec07e86c194a38f59f2f0f6ee80c0b0b0d0356))
-* **react:** update bridge script import for AuthBoundary ([#234](https://github.com/sanity-io/sdk/issues/234)) ([fe69106](https://github.com/sanity-io/sdk/commit/fe69106d35f5e1dee9f901ec21424042d7f9dc18))
-* route Document edit actions to correct resource instance ([#300](https://github.com/sanity-io/sdk/issues/300)) ([9e8f2ac](https://github.com/sanity-io/sdk/commit/9e8f2ac7de3fa1ec6f9af3cc79e3ec9ab45b3e59))
-* styled is not a function in Remix apps ([#169](https://github.com/sanity-io/sdk/issues/169)) ([7a8cfbf](https://github.com/sanity-io/sdk/commit/7a8cfbfedb60c5877cc4edae0caf92dfb6adf388))
-* trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
-* update the react README to use the updated app template ([#354](https://github.com/sanity-io/sdk/issues/354)) ([a2a41d0](https://github.com/sanity-io/sdk/commit/a2a41d0bee9128317a0ee4de59008c75988daa74))
-* update typedoc to use package mode ([#117](https://github.com/sanity-io/sdk/issues/117)) ([7f4e0e1](https://github.com/sanity-io/sdk/commit/7f4e0e1f08610fb3861e5dc8eb67fb1556b4d965))
-
+- add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
+- add lint to turbo.json and run prettier ([909f0d3](https://github.com/sanity-io/sdk/commit/909f0d34339c9c8ff8c013dfa13e5d607a2012fc))
+- adjust incorrect release back to alpha.6 ([#212](https://github.com/sanity-io/sdk/issues/212)) ([a946853](https://github.com/sanity-io/sdk/commit/a9468530e16ee056d972d913e4f046ceb0610134))
+- **auth:** do not perform multiple sid token exchanges ([#308](https://github.com/sanity-io/sdk/issues/308)) ([18461c6](https://github.com/sanity-io/sdk/commit/18461c6837bf532fb7a303efe3f2a279e8fce26f))
+- **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
+- correct the React SDK quickstart ([#317](https://github.com/sanity-io/sdk/issues/317)) ([df5474f](https://github.com/sanity-io/sdk/commit/df5474f478ca6bbde8b471d1beea34f5916470a5))
+- **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
+- **deps:** update dependency react-error-boundary to v5 ([#334](https://github.com/sanity-io/sdk/issues/334)) ([a128d7c](https://github.com/sanity-io/sdk/commit/a128d7c7a64f0e724028e0a6f0e0e2f17a399f82))
+- **deps:** Update eslint-tooling ([#69](https://github.com/sanity-io/sdk/issues/69)) ([d9d8e09](https://github.com/sanity-io/sdk/commit/d9d8e099e4711bb6ae90e926ce804715f56ef5d3))
+- **deps:** update message-protocol to 0.7.0 ([#379](https://github.com/sanity-io/sdk/issues/379)) ([553b2f5](https://github.com/sanity-io/sdk/commit/553b2f5249432773c8b0d05b6704a9f17b26137c))
+- **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
+- **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
+- **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
+- **docs:** rename infiniteList pageSize -> batchSize, update reference docs ([#303](https://github.com/sanity-io/sdk/issues/303)) ([953d111](https://github.com/sanity-io/sdk/commit/953d1117d680acf5fc2e4f74350fb8f9fd8a9b1d))
+- ensure usePreview and useProjection hooks subscribe if no ref is passed ([#366](https://github.com/sanity-io/sdk/issues/366)) ([6da3fd1](https://github.com/sanity-io/sdk/commit/6da3fd158de23956b5f1aa732e31be7a6f312c64))
+- fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
+- handle env variable for react and react-internal ([#294](https://github.com/sanity-io/sdk/issues/294)) ([0b733ff](https://github.com/sanity-io/sdk/commit/0b733ffbe00bbcb8c29fbee6628ba53c704e1c11))
+- mark packages as private for now ([#11](https://github.com/sanity-io/sdk/issues/11)) ([a103825](https://github.com/sanity-io/sdk/commit/a1038257192e2c493132b96233d461bdd9a31744))
+- package access and version ([#89](https://github.com/sanity-io/sdk/issues/89)) ([c4eb26d](https://github.com/sanity-io/sdk/commit/c4eb26dac12ec56c5a569c8edc895ffcd46a63a7))
+- **react:** remove react compiler runtime package ([#311](https://github.com/sanity-io/sdk/issues/311)) ([08046b5](https://github.com/sanity-io/sdk/commit/08046b565b187cad00f45f8790940e5735a77d5a))
+- **react:** update app redirect url to new dashboard ([#377](https://github.com/sanity-io/sdk/issues/377)) ([86ec07e](https://github.com/sanity-io/sdk/commit/86ec07e86c194a38f59f2f0f6ee80c0b0b0d0356))
+- **react:** update bridge script import for AuthBoundary ([#234](https://github.com/sanity-io/sdk/issues/234)) ([fe69106](https://github.com/sanity-io/sdk/commit/fe69106d35f5e1dee9f901ec21424042d7f9dc18))
+- route Document edit actions to correct resource instance ([#300](https://github.com/sanity-io/sdk/issues/300)) ([9e8f2ac](https://github.com/sanity-io/sdk/commit/9e8f2ac7de3fa1ec6f9af3cc79e3ec9ab45b3e59))
+- styled is not a function in Remix apps ([#169](https://github.com/sanity-io/sdk/issues/169)) ([7a8cfbf](https://github.com/sanity-io/sdk/commit/7a8cfbfedb60c5877cc4edae0caf92dfb6adf388))
+- trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
+- update the react README to use the updated app template ([#354](https://github.com/sanity-io/sdk/issues/354)) ([a2a41d0](https://github.com/sanity-io/sdk/commit/a2a41d0bee9128317a0ee4de59008c75988daa74))
+- update typedoc to use package mode ([#117](https://github.com/sanity-io/sdk/issues/117)) ([7f4e0e1](https://github.com/sanity-io/sdk/commit/7f4e0e1f08610fb3861e5dc8eb67fb1556b4d965))
### Miscellaneous Chores
-* renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187)) ([3220d57](https://github.com/sanity-io/sdk/commit/3220d5729c8012ffc47bfa2d75bfca1f2642df76))
-
+- renames `org` auth scope to `global` ([#187](https://github.com/sanity-io/sdk/issues/187)) ([3220d57](https://github.com/sanity-io/sdk/commit/3220d5729c8012ffc47bfa2d75bfca1f2642df76))
### Code Refactoring
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
-
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
### Dependencies
-* The following workspace dependencies were updated
- * dependencies
- * @sanity/sdk bumped to 0.0.0-alpha.24
+- The following workspace dependencies were updated
+ - dependencies
+ - @sanity/sdk bumped to 0.0.0-alpha.24
## [0.0.0-alpha.23](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.22...sdk-react-v0.0.0-alpha.23) (2025-04-03)
-
### ⚠ BREAKING CHANGES
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
-* replace `sanityConfigs` prop with `config` prop in ` ` and ` `
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
-* rename `_type` to `documentType` in DocumentHandle interface and related usages
-* rename `_id` to `documentId` in DocumentHandle interface and related usages
-* update document hooks and actions to expect `DocumentHandle` props
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
-* remove ` `, introduce ` ` for configuration
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386))
+- replace `sanityConfigs` prop with `config` prop in ` ` and ` `
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles
+- rename `_type` to `documentType` in DocumentHandle interface and related usages
+- rename `_id` to `documentId` in DocumentHandle interface and related usages
+- update document hooks and actions to expect `DocumentHandle` props
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle`
+- remove ` `, introduce ` ` for configuration
### Features
-* introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* remove ` `, introduce ` ` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* replace `sanityConfigs` prop with `config` prop in ` ` and ` ` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
-* use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
-
+- introduce consistent Handle pattern (`ProjectHandle`, `DatasetHandle`, `DocumentHandle`) across the SDK ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- remove ` `, introduce ` ` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `_id` to `documentId` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- rename `_type` to `documentType` in DocumentHandle interface and related usages ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace `resourceId` concept with explicit `projectId` and `dataset` fields in handles ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- replace `sanityConfigs` prop with `config` prop in ` ` and ` ` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update document hooks and actions to expect `DocumentHandle` props ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update project and dataset hooks to use `ProjectHandle` or `DatasetHandle` ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- update query and list hooks to accept optional `DatasetHandle` for configuration ([969d70e](https://github.com/sanity-io/sdk/commit/969d70e41f6987234323f99753f5cf937469532b))
+- use hosted login for standalone apps ([#386](https://github.com/sanity-io/sdk/issues/386)) ([9c1ad58](https://github.com/sanity-io/sdk/commit/9c1ad58bc0b302073c90dd6e584f566eba3d0d17))
### Bug Fixes
-* **deps:** update message-protocol to 0.7.0 ([#379](https://github.com/sanity-io/sdk/issues/379)) ([553b2f5](https://github.com/sanity-io/sdk/commit/553b2f5249432773c8b0d05b6704a9f17b26137c))
-* **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
-* ensure usePreview and useProjection hooks subscribe if no ref is passed ([#366](https://github.com/sanity-io/sdk/issues/366)) ([6da3fd1](https://github.com/sanity-io/sdk/commit/6da3fd158de23956b5f1aa732e31be7a6f312c64))
-* **react:** update app redirect url to new dashboard ([#377](https://github.com/sanity-io/sdk/issues/377)) ([86ec07e](https://github.com/sanity-io/sdk/commit/86ec07e86c194a38f59f2f0f6ee80c0b0b0d0356))
+- **deps:** update message-protocol to 0.7.0 ([#379](https://github.com/sanity-io/sdk/issues/379)) ([553b2f5](https://github.com/sanity-io/sdk/commit/553b2f5249432773c8b0d05b6704a9f17b26137c))
+- **deps:** update pkg-utils to v7 ([#384](https://github.com/sanity-io/sdk/issues/384)) ([ce9a952](https://github.com/sanity-io/sdk/commit/ce9a952a295a32ec86c12cbf9b967128ba5eaf4f))
+- ensure usePreview and useProjection hooks subscribe if no ref is passed ([#366](https://github.com/sanity-io/sdk/issues/366)) ([6da3fd1](https://github.com/sanity-io/sdk/commit/6da3fd158de23956b5f1aa732e31be7a6f312c64))
+- **react:** update app redirect url to new dashboard ([#377](https://github.com/sanity-io/sdk/issues/377)) ([86ec07e](https://github.com/sanity-io/sdk/commit/86ec07e86c194a38f59f2f0f6ee80c0b0b0d0356))
## [0.0.0-alpha.22](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.21...sdk-react-v0.0.0-alpha.22) (2025-03-27)
-
### Bug Fixes
-* **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
+- **deps:** upgrade `@sanity/client`, do not use `withCredentials` ([#368](https://github.com/sanity-io/sdk/issues/368)) ([8e1cbd9](https://github.com/sanity-io/sdk/commit/8e1cbd92501892bf116c3a3473ae693062518f89))
## [0.0.0-alpha.21](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.20...sdk-react-v0.0.0-alpha.21) (2025-03-25)
-
### ⚠ BREAKING CHANGES
-* update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360))
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
-* rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363))
-* rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
+- update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365))
+- rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363))
+- rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358))
### Features
-* **docs:** add a migration guide ([#357](https://github.com/sanity-io/sdk/issues/357)) ([47ef529](https://github.com/sanity-io/sdk/commit/47ef529e7d4c9f4453451ac6141d28a81a1dfbfe))
-* rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
-* rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363)) ([8e51dcc](https://github.com/sanity-io/sdk/commit/8e51dcc99bfcb84f59dd43f3b7d877daba158fa3))
-* rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364)) ([544019d](https://github.com/sanity-io/sdk/commit/544019d5c85d2c695848dcb6ea089cc84b7fbbcd))
-* rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
-* update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360)) ([f1617da](https://github.com/sanity-io/sdk/commit/f1617da31ddcb2d0595877f402a6a1ec82c1d0ab))
-
+- **docs:** add a migration guide ([#357](https://github.com/sanity-io/sdk/issues/357)) ([47ef529](https://github.com/sanity-io/sdk/commit/47ef529e7d4c9f4453451ac6141d28a81a1dfbfe))
+- rename useActions → useDocumentActions and useActions → useDocumentActions ([#362](https://github.com/sanity-io/sdk/issues/362)) ([c753897](https://github.com/sanity-io/sdk/commit/c75389759a57c6da5ad306dbac46c6d58b4f8dda))
+- rename useInfiniteList → useDocuments ([#363](https://github.com/sanity-io/sdk/issues/363)) ([8e51dcc](https://github.com/sanity-io/sdk/commit/8e51dcc99bfcb84f59dd43f3b7d877daba158fa3))
+- rename usePaginatedList → usePaginatedDocuments ([#364](https://github.com/sanity-io/sdk/issues/364)) ([544019d](https://github.com/sanity-io/sdk/commit/544019d5c85d2c695848dcb6ea089cc84b7fbbcd))
+- rename usePermissions → useDocumentPermissions ([#365](https://github.com/sanity-io/sdk/issues/365)) ([6ca2ada](https://github.com/sanity-io/sdk/commit/6ca2ada0b0d9a0633d46ccf8c0170c1712a3afb4))
+- update `useManageFavorite` signature ([#360](https://github.com/sanity-io/sdk/issues/360)) ([f1617da](https://github.com/sanity-io/sdk/commit/f1617da31ddcb2d0595877f402a6a1ec82c1d0ab))
### Bug Fixes
-* fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
-
+- fix typedoc annotations for hooks ([#361](https://github.com/sanity-io/sdk/issues/361)) ([778a63a](https://github.com/sanity-io/sdk/commit/778a63ac5cb52ed6c1e28b1ff22605caad54db33))
### Code Refactoring
-* rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
+- rename useHandleCallback → useHandleAuthCallback and HandleCallback → HandleAuthCallback ([#358](https://github.com/sanity-io/sdk/issues/358)) ([014dc69](https://github.com/sanity-io/sdk/commit/014dc695320273b4e166d946753e851c9701d159))
## [0.0.0-alpha.20](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.19...sdk-react-v0.0.0-alpha.20) (2025-03-21)
-
### ⚠ BREAKING CHANGES
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325))
### Features
-* add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
-* make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
-* **react:** add comlink fetch hook ([#338](https://github.com/sanity-io/sdk/issues/338)) ([1a78882](https://github.com/sanity-io/sdk/commit/1a788824a2c83126c1b39318aa05f8c3964cad8e))
-* **react:** add useNavigateToStudioDocument hook ([#352](https://github.com/sanity-io/sdk/issues/352)) ([a00b9fa](https://github.com/sanity-io/sdk/commit/a00b9fa381bd89f42da4ef95d01f6e5e7c5f0511))
-* **react:** create useStudioWorkspaceById hook ([#343](https://github.com/sanity-io/sdk/issues/343)) ([83feb21](https://github.com/sanity-io/sdk/commit/83feb216e13b903a312a5cffd63f793b29570b30))
-* **react:** use refs for nodes and channels ([#341](https://github.com/sanity-io/sdk/issues/341)) ([4a0b763](https://github.com/sanity-io/sdk/commit/4a0b7637463e8808180a2abe091795e1c3bcef1d))
-* rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
-* rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
-
+- add useDashboardOrganizationId hook ([#339](https://github.com/sanity-io/sdk/issues/339)) ([401468e](https://github.com/sanity-io/sdk/commit/401468e07b8c74deb02d4b7df78af808bddd9242))
+- make packages public ([#320](https://github.com/sanity-io/sdk/issues/320)) ([8c94c29](https://github.com/sanity-io/sdk/commit/8c94c29b0aadd86273db59da1b0577aad682d6e9))
+- **react:** add comlink fetch hook ([#338](https://github.com/sanity-io/sdk/issues/338)) ([1a78882](https://github.com/sanity-io/sdk/commit/1a788824a2c83126c1b39318aa05f8c3964cad8e))
+- **react:** add useNavigateToStudioDocument hook ([#352](https://github.com/sanity-io/sdk/issues/352)) ([a00b9fa](https://github.com/sanity-io/sdk/commit/a00b9fa381bd89f42da4ef95d01f6e5e7c5f0511))
+- **react:** create useStudioWorkspaceById hook ([#343](https://github.com/sanity-io/sdk/issues/343)) ([83feb21](https://github.com/sanity-io/sdk/commit/83feb216e13b903a312a5cffd63f793b29570b30))
+- **react:** use refs for nodes and channels ([#341](https://github.com/sanity-io/sdk/issues/341)) ([4a0b763](https://github.com/sanity-io/sdk/commit/4a0b7637463e8808180a2abe091795e1c3bcef1d))
+- rename `result` to `data` for usePreview hook ([#325](https://github.com/sanity-io/sdk/issues/325)) ([1e5813e](https://github.com/sanity-io/sdk/commit/1e5813e2e26a72c463cafa8c5502043176930a5b))
+- rename `results` to `data` for useProjection hook ([#335](https://github.com/sanity-io/sdk/issues/335)) ([026dd26](https://github.com/sanity-io/sdk/commit/026dd26bffb9fc2a03801ef05a8d075a2968c725))
### Bug Fixes
-* **deps:** update dependency react-error-boundary to v5 ([#334](https://github.com/sanity-io/sdk/issues/334)) ([a128d7c](https://github.com/sanity-io/sdk/commit/a128d7c7a64f0e724028e0a6f0e0e2f17a399f82))
-* update the react README to use the updated app template ([#354](https://github.com/sanity-io/sdk/issues/354)) ([a2a41d0](https://github.com/sanity-io/sdk/commit/a2a41d0bee9128317a0ee4de59008c75988daa74))
+- **deps:** update dependency react-error-boundary to v5 ([#334](https://github.com/sanity-io/sdk/issues/334)) ([a128d7c](https://github.com/sanity-io/sdk/commit/a128d7c7a64f0e724028e0a6f0e0e2f17a399f82))
+- update the react README to use the updated app template ([#354](https://github.com/sanity-io/sdk/issues/354)) ([a2a41d0](https://github.com/sanity-io/sdk/commit/a2a41d0bee9128317a0ee4de59008c75988daa74))
## [0.0.0-alpha.19](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.18...sdk-react-v0.0.0-alpha.19) (2025-03-14)
-
### ⚠ BREAKING CHANGES
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319))
### Features
-* **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
-
+- **react:** flatten sdk-react imports ([#319](https://github.com/sanity-io/sdk/issues/319)) ([3922025](https://github.com/sanity-io/sdk/commit/3922025569abfa4cd824e81222495913875246d7))
### Bug Fixes
-* correct the React SDK quickstart ([#317](https://github.com/sanity-io/sdk/issues/317)) ([df5474f](https://github.com/sanity-io/sdk/commit/df5474f478ca6bbde8b471d1beea34f5916470a5))
+- correct the React SDK quickstart ([#317](https://github.com/sanity-io/sdk/issues/317)) ([df5474f](https://github.com/sanity-io/sdk/commit/df5474f478ca6bbde8b471d1beea34f5916470a5))
## [0.0.0-alpha.18](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.17...sdk-react-v0.0.0-alpha.18) (2025-03-14)
-
### ⚠ BREAKING CHANGES
-* remove `schema` from sanity config
-* remove schema state and schema manager
+- remove `schema` from sanity config
+- remove schema state and schema manager
### Features
-* **react:** add interaction history and favorite hooks ([#236](https://github.com/sanity-io/sdk/issues/236)) ([b7cdbd6](https://github.com/sanity-io/sdk/commit/b7cdbd648b81dc46054de0e4c1b864471f2daa30))
-* remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-* use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
-
+- **react:** add interaction history and favorite hooks ([#236](https://github.com/sanity-io/sdk/issues/236)) ([b7cdbd6](https://github.com/sanity-io/sdk/commit/b7cdbd648b81dc46054de0e4c1b864471f2daa30))
+- remove `schema` from sanity config ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- remove schema state and schema manager ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
+- use projection for previews and remove schema usage ([6257fe3](https://github.com/sanity-io/sdk/commit/6257fe39b4521ace71db54f1d0d173a6019db38d))
### Bug Fixes
-* **react:** remove react compiler runtime package ([#311](https://github.com/sanity-io/sdk/issues/311)) ([08046b5](https://github.com/sanity-io/sdk/commit/08046b565b187cad00f45f8790940e5735a77d5a))
+- **react:** remove react compiler runtime package ([#311](https://github.com/sanity-io/sdk/issues/311)) ([08046b5](https://github.com/sanity-io/sdk/commit/08046b565b187cad00f45f8790940e5735a77d5a))
## [0.0.0-alpha.17](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.16...sdk-react-v0.0.0-alpha.17) (2025-03-12)
-
### Features
-* **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
-
+- **react:** add react compiler to the build process ([#298](https://github.com/sanity-io/sdk/issues/298)) ([bfb74eb](https://github.com/sanity-io/sdk/commit/bfb74ebe538b1218a980b03493890b70dc1311d2))
### Bug Fixes
-* **auth:** do not perform multiple sid token exchanges ([#308](https://github.com/sanity-io/sdk/issues/308)) ([18461c6](https://github.com/sanity-io/sdk/commit/18461c6837bf532fb7a303efe3f2a279e8fce26f))
-* **docs:** rename infiniteList pageSize -> batchSize, update reference docs ([#303](https://github.com/sanity-io/sdk/issues/303)) ([953d111](https://github.com/sanity-io/sdk/commit/953d1117d680acf5fc2e4f74350fb8f9fd8a9b1d))
-* route Document edit actions to correct resource instance ([#300](https://github.com/sanity-io/sdk/issues/300)) ([9e8f2ac](https://github.com/sanity-io/sdk/commit/9e8f2ac7de3fa1ec6f9af3cc79e3ec9ab45b3e59))
+- **auth:** do not perform multiple sid token exchanges ([#308](https://github.com/sanity-io/sdk/issues/308)) ([18461c6](https://github.com/sanity-io/sdk/commit/18461c6837bf532fb7a303efe3f2a279e8fce26f))
+- **docs:** rename infiniteList pageSize -> batchSize, update reference docs ([#303](https://github.com/sanity-io/sdk/issues/303)) ([953d111](https://github.com/sanity-io/sdk/commit/953d1117d680acf5fc2e4f74350fb8f9fd8a9b1d))
+- route Document edit actions to correct resource instance ([#300](https://github.com/sanity-io/sdk/issues/300)) ([9e8f2ac](https://github.com/sanity-io/sdk/commit/9e8f2ac7de3fa1ec6f9af3cc79e3ec9ab45b3e59))
## [0.0.0-alpha.16](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.15...sdk-react-v0.0.0-alpha.16) (2025-03-10)
-
### ⚠ BREAKING CHANGES
-* remove `useDocuments` and `useSearch` hooks
+- remove `useDocuments` and `useSearch` hooks
### Features
-* add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
-* add suspense boundary to prevent recreating instances ([d92e38d](https://github.com/sanity-io/sdk/commit/d92e38d64dfe5c0a35d8de35faa7ecbe5425f023))
-* add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
-* **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
-* remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
-
+- add `useQuery`, `useInfiniteList`, `usePaginatedList` hooks ([1a3f4ad](https://github.com/sanity-io/sdk/commit/1a3f4ad98abf2ab68c552fea20d60639462f3aac))
+- add suspense boundary to prevent recreating instances ([d92e38d](https://github.com/sanity-io/sdk/commit/d92e38d64dfe5c0a35d8de35faa7ecbe5425f023))
+- add versions information to all packages ([#275](https://github.com/sanity-io/sdk/issues/275)) ([afb2fec](https://github.com/sanity-io/sdk/commit/afb2fec63ea3bae53cab9d8f05081daf2f3c2733))
+- **document hooks:** update the documentation for the Document hook s an optional resourceId ([#280](https://github.com/sanity-io/sdk/issues/280)) ([eb65378](https://github.com/sanity-io/sdk/commit/eb65378c884f3aaf9b2c0dbc95dd86075c76f9e0))
+- remove `useDocuments` and `useSearch` hooks ([9f37daf](https://github.com/sanity-io/sdk/commit/9f37daf1243ee0fda558ffd7259c45da9e4ba259))
### Bug Fixes
-* **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
-* **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
-* handle env variable for react and react-internal ([#294](https://github.com/sanity-io/sdk/issues/294)) ([0b733ff](https://github.com/sanity-io/sdk/commit/0b733ffbe00bbcb8c29fbee6628ba53c704e1c11))
+- **deps:** update dependency @sanity/comlink to v3 ([#296](https://github.com/sanity-io/sdk/issues/296)) ([14fbe1b](https://github.com/sanity-io/sdk/commit/14fbe1b89a79d2532e8735a58abbe4a5cff6d635))
+- **deps:** Update sanity monorepo to ^3.78.1 ([#297](https://github.com/sanity-io/sdk/issues/297)) ([835b594](https://github.com/sanity-io/sdk/commit/835b5942d3870a92e0fd1387ab9baa5e555a3ee5))
+- handle env variable for react and react-internal ([#294](https://github.com/sanity-io/sdk/issues/294)) ([0b733ff](https://github.com/sanity-io/sdk/commit/0b733ffbe00bbcb8c29fbee6628ba53c704e1c11))
## [0.0.0-alpha.15](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.14...sdk-react-v0.0.0-alpha.15) (2025-03-07)
-
### ⚠ BREAKING CHANGES
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271))
### Features
-* add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
-* allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
-* redirect to core if app opened without core ([#268](https://github.com/sanity-io/sdk/issues/268)) ([3f6bb83](https://github.com/sanity-io/sdk/commit/3f6bb8344cee6d582aaee0d7ba64b9cb3035469f))
+- add useProjection hook ([#257](https://github.com/sanity-io/sdk/issues/257)) ([fbaafe0](https://github.com/sanity-io/sdk/commit/fbaafe031e235f61b9d60bf5938f18a4683aafe5))
+- allow multiple resources via instances ([#271](https://github.com/sanity-io/sdk/issues/271)) ([6f4d541](https://github.com/sanity-io/sdk/commit/6f4d5410671e8b75759e33380464656a8c961ad6))
+- redirect to core if app opened without core ([#268](https://github.com/sanity-io/sdk/issues/268)) ([3f6bb83](https://github.com/sanity-io/sdk/commit/3f6bb8344cee6d582aaee0d7ba64b9cb3035469f))
## [0.0.0-alpha.14](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.13...sdk-react-v0.0.0-alpha.14) (2025-03-05)
-
### Features
-* `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
-* **react:** add SDKProvider app to use SDK without core ([#263](https://github.com/sanity-io/sdk/issues/263)) ([51e84fc](https://github.com/sanity-io/sdk/commit/51e84fcd7b64558bc108f00d3fb5a98aade25d29))
-* **react:** add useSearch hook ([#258](https://github.com/sanity-io/sdk/issues/258)) ([488317a](https://github.com/sanity-io/sdk/commit/488317a72987daf88385f757a60ffdc191333218))
-
+- `useProjects`, `useProject`, `useDatasets` ([#235](https://github.com/sanity-io/sdk/issues/235)) ([cc95dfd](https://github.com/sanity-io/sdk/commit/cc95dfd45a82171fa7ccf05a8ca331e8de97fbee))
+- **react:** add SDKProvider app to use SDK without core ([#263](https://github.com/sanity-io/sdk/issues/263)) ([51e84fc](https://github.com/sanity-io/sdk/commit/51e84fcd7b64558bc108f00d3fb5a98aade25d29))
+- **react:** add useSearch hook ([#258](https://github.com/sanity-io/sdk/issues/258)) ([488317a](https://github.com/sanity-io/sdk/commit/488317a72987daf88385f757a60ffdc191333218))
### Bug Fixes
-* add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
+- add access api types inside the SDK ([#261](https://github.com/sanity-io/sdk/issues/261)) ([ff53123](https://github.com/sanity-io/sdk/commit/ff53123f2e01a242c22df22b9dc109d2cbc3b1d4))
## [0.0.0-alpha.13](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.12...sdk-react-v0.0.0-alpha.13) (2025-02-28)
-
### Features
-* add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
-
+- add useUsers hook ([#239](https://github.com/sanity-io/sdk/issues/239)) ([b89bcf0](https://github.com/sanity-io/sdk/commit/b89bcf00bc4a849409ae80f45b1917cb1e51c66e))
### Bug Fixes
-* **react:** update bridge script import for AuthBoundary ([#234](https://github.com/sanity-io/sdk/issues/234)) ([fe69106](https://github.com/sanity-io/sdk/commit/fe69106d35f5e1dee9f901ec21424042d7f9dc18))
+- **react:** update bridge script import for AuthBoundary ([#234](https://github.com/sanity-io/sdk/issues/234)) ([fe69106](https://github.com/sanity-io/sdk/commit/fe69106d35f5e1dee9f901ec21424042d7f9dc18))
## [0.0.0-alpha.12](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.11...sdk-react-v0.0.0-alpha.12) (2025-02-28)
-
### Features
-* **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
-* document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
-
+- **auth:** refresh stamped tokens ([#225](https://github.com/sanity-io/sdk/issues/225)) ([10b2745](https://github.com/sanity-io/sdk/commit/10b2745c62f9169b8cd1c66d7fb641d7fda37429))
+- document permissions ([#226](https://github.com/sanity-io/sdk/issues/226)) ([107f434](https://github.com/sanity-io/sdk/commit/107f4349d7defab04d1282ee1ab20766d157eab7))
### Bug Fixes
-* **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
+- **comlink:** expose statuses and destroy unused resources ([#233](https://github.com/sanity-io/sdk/issues/233)) ([8b8a40c](https://github.com/sanity-io/sdk/commit/8b8a40c5ac0b5ba76cda043ffc9bc3b740bce5bd))
## [0.0.0-alpha.11](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.10...sdk-react-v0.0.0-alpha.11) (2025-02-13)
-
### Features
-* add sdk-react-internal package and remove @sanity/ui package ([#193](https://github.com/sanity-io/sdk/issues/193)) ([7fa201e](https://github.com/sanity-io/sdk/commit/7fa201ee49b75bbc71a741503ed0336f94785201))
+- add sdk-react-internal package and remove @sanity/ui package ([#193](https://github.com/sanity-io/sdk/issues/193)) ([7fa201e](https://github.com/sanity-io/sdk/commit/7fa201ee49b75bbc71a741503ed0336f94785201))
## [0.0.0-alpha.10](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.9...sdk-react-v0.0.0-alpha.10) (2025-02-12)
-
### Features
-* allow useEditDocument to take an updater function ([#218](https://github.com/sanity-io/sdk/issues/218)) ([85b3440](https://github.com/sanity-io/sdk/commit/85b344007df3fd66ce7dae94df8f6b8a81f54574))
+- allow useEditDocument to take an updater function ([#218](https://github.com/sanity-io/sdk/issues/218)) ([85b3440](https://github.com/sanity-io/sdk/commit/85b344007df3fd66ce7dae94df8f6b8a81f54574))
## [0.0.0-alpha.9](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.8...sdk-react-v0.0.0-alpha.9) (2025-02-11)
-
### Features
-* document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
+- document store ([#197](https://github.com/sanity-io/sdk/issues/197)) ([497bb26](https://github.com/sanity-io/sdk/commit/497bb2641d5766128dfca4db8247f2f9555b83b1))
## [0.0.0-alpha.8](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.7...sdk-react-v0.0.0-alpha.8) (2025-02-06)
-
### Features
-* export useClient ([#213](https://github.com/sanity-io/sdk/issues/213)) ([0e79002](https://github.com/sanity-io/sdk/commit/0e790020ee0f688e6f07243c5605b5cbffe4b1c5))
+- export useClient ([#213](https://github.com/sanity-io/sdk/issues/213)) ([0e79002](https://github.com/sanity-io/sdk/commit/0e790020ee0f688e6f07243c5605b5cbffe4b1c5))
## [0.0.0-alpha.7](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.6...sdk-react-v0.0.0-alpha.7) (2025-02-05)
-
### Features
-* **react:** add sanity os bridge script to AuthBoundary ([#196](https://github.com/sanity-io/sdk/issues/196)) ([1fb064d](https://github.com/sanity-io/sdk/commit/1fb064d111541bf93c8933920d7bce00a9c454ef))
-
+- **react:** add sanity os bridge script to AuthBoundary ([#196](https://github.com/sanity-io/sdk/issues/196)) ([1fb064d](https://github.com/sanity-io/sdk/commit/1fb064d111541bf93c8933920d7bce00a9c454ef))
### Bug Fixes
-* adjust incorrect release back to alpha.6 ([#212](https://github.com/sanity-io/sdk/issues/212)) ([a946853](https://github.com/sanity-io/sdk/commit/a9468530e16ee056d972d913e4f046ceb0610134))
-* trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
+- adjust incorrect release back to alpha.6 ([#212](https://github.com/sanity-io/sdk/issues/212)) ([a946853](https://github.com/sanity-io/sdk/commit/a9468530e16ee056d972d913e4f046ceb0610134))
+- trigger release ([#210](https://github.com/sanity-io/sdk/issues/210)) ([2b36c98](https://github.com/sanity-io/sdk/commit/2b36c985a91d44be95a9e6c8446e9a11ffa59d61))
## [0.0.0-alpha.6](https://github.com/sanity-io/sdk/compare/sdk-react-v0.0.0-alpha.5...sdk-react-v0.0.0-alpha.6) (2025-01-30)
diff --git a/packages/react/package.json b/packages/react/package.json
index 98d748c9c..bb1cdb29f 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -1,6 +1,6 @@
{
"name": "@sanity/sdk-react",
- "version": "2.2.0",
+ "version": "2.3.1",
"private": false,
"description": "Sanity SDK React toolkit for Content OS",
"keywords": [
@@ -56,7 +56,7 @@
"browserslist": "extends @sanity/browserslist-config",
"prettier": "@sanity/prettier-config",
"dependencies": {
- "@sanity/client": "^7.10.0",
+ "@sanity/client": "^7.12.0",
"@sanity/message-protocol": "^0.12.0",
"@sanity/sdk": "workspace:*",
"@sanity/types": "^3.83.0",
diff --git a/packages/react/src/_exports/sdk-react.ts b/packages/react/src/_exports/sdk-react.ts
index 237ab3798..8cd46f97b 100644
--- a/packages/react/src/_exports/sdk-react.ts
+++ b/packages/react/src/_exports/sdk-react.ts
@@ -2,11 +2,19 @@
* @module exports
*/
export {AuthBoundary, type AuthBoundaryProps} from '../components/auth/AuthBoundary'
+export {IntentLink} from '../components/IntentLink'
export {type IntentHandlerPayload, type IntentHandlers} from '../components/IntentResolver'
export {SanityApp, type SanityAppProps} from '../components/SanityApp'
export {SDKProvider, type SDKProviderProps} from '../components/SDKProvider'
export {ComlinkTokenRefreshProvider} from '../context/ComlinkTokenRefresh'
export {ResourceProvider, type ResourceProviderProps} from '../context/ResourceProvider'
+export {
+ useAgentGenerate,
+ useAgentPatch,
+ useAgentPrompt,
+ useAgentTransform,
+ useAgentTranslate,
+} from '../hooks/agent/agentActions'
export {useAuthState} from '../hooks/auth/useAuthState'
export {useAuthToken} from '../hooks/auth/useAuthToken'
export {useCurrentUser} from '../hooks/auth/useCurrentUser'
@@ -29,7 +37,10 @@ export {
type WindowMessageHandler,
} from '../hooks/comlink/useWindowConnection'
export {useSanityInstance} from '../hooks/context/useSanityInstance'
+export {type DocumentHandleWithSource} from '../hooks/dashboard/types'
export {useDashboardNavigate} from '../hooks/dashboard/useDashboardNavigate'
+export {useDispatchIntent} from '../hooks/dashboard/useDispatchIntent'
+export {useIntentLink} from '../hooks/dashboard/useIntentLink'
export {useManageFavorite} from '../hooks/dashboard/useManageFavorite'
export {
type NavigateToStudioResult,
diff --git a/packages/react/src/components/IntentLink.tsx b/packages/react/src/components/IntentLink.tsx
new file mode 100644
index 000000000..2eadb93bc
--- /dev/null
+++ b/packages/react/src/components/IntentLink.tsx
@@ -0,0 +1,64 @@
+import {type ResourceHandle, useIntentLink} from '../hooks/dashboard/useIntentLink'
+
+export type IntentLinkProps = {
+ resourceHandle: ResourceHandle
+ parameters?: Record
+} & (
+ | (Omit, 'onClick'> & {
+ intentName?: undefined
+ intentAction?: string
+ })
+ | (Omit, 'href' | 'onClick'> & {
+ intentName: string
+ intentAction?: undefined
+ })
+)
+
+/**
+ * IntentLink
+ * @public
+ */
+export function IntentLink({
+ resourceHandle,
+ parameters,
+ children,
+ ...props
+}: IntentLinkProps): React.ReactNode {
+ const {href, onClick} = useIntentLink({
+ intentName: props.intentName,
+ intentAction: props.intentAction,
+ resourceHandle,
+ parameters,
+ })
+
+ const handleClick = (e: React.MouseEvent) => {
+ if (e.metaKey || e.altKey || e.ctrlKey || e.shiftKey) {
+ return
+ }
+
+ e.preventDefault()
+ onClick()
+ }
+
+ if (props.intentName) {
+ const {intentName: _intentName, ...anchorProps} = props
+
+ return (
+
+ {children}
+
+ )
+ }
+
+ if (props.intentName === undefined) {
+ const {intentAction: _intentAction, ...buttonProps} = props
+
+ return (
+
+ {children}
+
+ )
+ }
+
+ return null
+}
diff --git a/packages/react/src/components/auth/AuthBoundary.test.tsx b/packages/react/src/components/auth/AuthBoundary.test.tsx
index d4e88df91..b6682512f 100644
--- a/packages/react/src/components/auth/AuthBoundary.test.tsx
+++ b/packages/react/src/components/auth/AuthBoundary.test.tsx
@@ -8,7 +8,6 @@ import {ResourceProvider} from '../../context/ResourceProvider'
import {useAuthState} from '../../hooks/auth/useAuthState'
import {useLoginUrl} from '../../hooks/auth/useLoginUrl'
import {useVerifyOrgProjects} from '../../hooks/auth/useVerifyOrgProjects'
-import {useSanityInstance} from '../../hooks/context/useSanityInstance'
import {AuthBoundary} from './AuthBoundary'
// Mock hooks
@@ -23,9 +22,6 @@ vi.mock('../../hooks/auth/useHandleAuthCallback', () => ({
vi.mock('../../hooks/auth/useLogOut', () => ({
useLogOut: vi.fn(() => async () => {}),
}))
-vi.mock('../../hooks/context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
// Mock AuthError throwing scenario
vi.mock('./AuthError', async (importOriginal) => {
@@ -109,7 +105,6 @@ describe('AuthBoundary', () => {
const mockUseAuthState = vi.mocked(useAuthState)
const mockUseLoginUrl = vi.mocked(useLoginUrl)
const mockUseVerifyOrgProjects = vi.mocked(useVerifyOrgProjects)
- const mockUseSanityInstance = vi.mocked(useSanityInstance)
const testProjectIds = ['proj-test'] // Example project ID for tests
// Mock Sanity instance
@@ -139,8 +134,6 @@ describe('AuthBoundary', () => {
mockUseLoginUrl.mockReturnValue('http://example.com/login')
// Default mock for useVerifyOrgProjects - returns null (no error)
mockUseVerifyOrgProjects.mockImplementation(() => null)
- // Mock useSanityInstance to return our mock instance
- mockUseSanityInstance.mockReturnValue(mockSanityInstance)
})
afterEach(() => {
@@ -170,7 +163,9 @@ describe('AuthBoundary', () => {
isExchangingToken: false,
})
const {container} = render(
- Protected Content ,
+
+ Protected Content
+ ,
)
// The callback screen renders null check that it renders nothing
@@ -184,7 +179,11 @@ describe('AuthBoundary', () => {
currentUser: null,
token: 'exampleToken',
})
- render(Protected Content )
+ render(
+
+ Protected Content
+ ,
+ )
expect(screen.getByText('Protected Content')).toBeInTheDocument()
})
@@ -194,7 +193,11 @@ describe('AuthBoundary', () => {
type: AuthStateType.ERROR,
error: new Error('test error'),
})
- render(Protected Content )
+ render(
+
+ Protected Content
+ ,
+ )
// The AuthBoundary should throw an AuthError internally
// and then display the LoginError component as the fallback.
@@ -207,7 +210,11 @@ describe('AuthBoundary', () => {
})
it('renders children when logged in and org verification passes', () => {
- render(Protected Content )
+ render(
+
+ Protected Content
+ ,
+ )
expect(screen.getByText('Protected Content')).toBeInTheDocument()
})
@@ -226,9 +233,11 @@ describe('AuthBoundary', () => {
// Need to catch the error thrown during render. ErrorBoundary mock handles this.
render(
-
- Protected Content
- ,
+
+
+ Protected Content
+
+ ,
)
// The ErrorBoundary's FallbackComponent should be rendered
@@ -256,9 +265,11 @@ describe('AuthBoundary', () => {
})
render(
-
- Protected Content
- ,
+
+
+ Protected Content
+
+ ,
)
// Should render children because verification is disabled
@@ -279,9 +290,11 @@ describe('AuthBoundary', () => {
mockUseVerifyOrgProjects.mockImplementation(() => null)
render(
-
- Protected Content
- ,
+
+
+ Protected Content
+
+ ,
)
await waitFor(() => {
diff --git a/packages/react/src/components/auth/AuthBoundary.tsx b/packages/react/src/components/auth/AuthBoundary.tsx
index efb1df0d1..a201cc49b 100644
--- a/packages/react/src/components/auth/AuthBoundary.tsx
+++ b/packages/react/src/components/auth/AuthBoundary.tsx
@@ -7,7 +7,7 @@ import {ComlinkTokenRefreshProvider} from '../../context/ComlinkTokenRefresh'
import {useAuthState} from '../../hooks/auth/useAuthState'
import {useLoginUrl} from '../../hooks/auth/useLoginUrl'
import {useVerifyOrgProjects} from '../../hooks/auth/useVerifyOrgProjects'
-import {useCorsOriginError} from '../../hooks/errors/useCorsOriginError'
+import {useSanityInstance} from '../../hooks/context/useSanityInstance'
import {CorsErrorComponent} from '../errors/CorsErrorComponent'
import {isInIframe} from '../utils'
import {AuthError} from './AuthError'
@@ -108,8 +108,6 @@ export function AuthBoundary({
LoginErrorComponent = LoginError,
...props
}: AuthBoundaryProps): React.ReactNode {
- const {error: corsError, projectId, clear: clearCorsError} = useCorsOriginError()
-
const FallbackComponent = useMemo(() => {
return function LoginComponentWithLayoutProps(fallbackProps: FallbackProps) {
if (fallbackProps.error instanceof CorsOriginError) {
@@ -117,29 +115,17 @@ export function AuthBoundary({
{
- clearCorsError()
- fallbackProps.resetErrorBoundary()
- }}
/>
)
}
return
}
- }, [LoginErrorComponent, clearCorsError])
+ }, [LoginErrorComponent])
return (
- {corsError ? (
- clearCorsError()}
- projectId={projectId}
- />
- ) : (
-
- )}
+
)
@@ -169,17 +155,21 @@ function AuthSwitch({
...props
}: AuthSwitchProps) {
const authState = useAuthState()
- const orgError = useVerifyOrgProjects(!verifyOrganization, projectIds)
+ const instance = useSanityInstance()
+ const studioModeEnabled = instance.config.studioMode?.enabled
+ const disableVerifyOrg =
+ !verifyOrganization || studioModeEnabled || authState.type !== AuthStateType.LOGGED_IN
+ const orgError = useVerifyOrgProjects(disableVerifyOrg, projectIds)
const isLoggedOut = authState.type === AuthStateType.LOGGED_OUT && !authState.isDestroyingSession
const loginUrl = useLoginUrl()
useEffect(() => {
- if (isLoggedOut && !isInIframe()) {
- // We don't want to redirect to login if we're in the Dashboard
+ if (isLoggedOut && !isInIframe() && !studioModeEnabled) {
+ // We don't want to redirect to login if we're in the Dashboard nor in studio mode
window.location.href = loginUrl
}
- }, [isLoggedOut, loginUrl])
+ }, [isLoggedOut, loginUrl, studioModeEnabled])
// Only check the error if verification is enabled
if (verifyOrganization && orgError) {
diff --git a/packages/react/src/components/auth/LoginError.tsx b/packages/react/src/components/auth/LoginError.tsx
index 3213dd8b2..b6bd6df90 100644
--- a/packages/react/src/components/auth/LoginError.tsx
+++ b/packages/react/src/components/auth/LoginError.tsx
@@ -1,10 +1,16 @@
import {ClientError} from '@sanity/client'
-import {AuthStateType} from '@sanity/sdk'
+import {
+ AuthStateType,
+ getClientErrorApiBody,
+ getClientErrorApiDescription,
+ isProjectUserNotFoundClientError,
+} from '@sanity/sdk'
import {useCallback, useEffect, useState} from 'react'
import {type FallbackProps} from 'react-error-boundary'
import {useAuthState} from '../../hooks/auth/useAuthState'
import {useLogOut} from '../../hooks/auth/useLogOut'
+import {Error} from '../errors/Error'
import {AuthError} from './AuthError'
import {ConfigurationError} from './ConfigurationError'
/**
@@ -34,6 +40,7 @@ export function LoginError({error, resetErrorBoundary}: LoginErrorProps): React.
const [authErrorMessage, setAuthErrorMessage] = useState(
'Please try again or contact support if the problem persists.',
)
+ const [showRetryCta, setShowRetryCta] = useState(true)
const handleRetry = useCallback(async () => {
await logout()
@@ -43,33 +50,43 @@ export function LoginError({error, resetErrorBoundary}: LoginErrorProps): React.
useEffect(() => {
if (error instanceof ClientError) {
if (error.statusCode === 401) {
- handleRetry()
+ // Surface a friendly message for projectUserNotFoundError (do not logout/refresh)
+ if (isProjectUserNotFoundClientError(error)) {
+ const description = getClientErrorApiDescription(error)
+ if (description) setAuthErrorMessage(description)
+ setShowRetryCta(false)
+ } else {
+ setShowRetryCta(true)
+ handleRetry()
+ }
} else if (error.statusCode === 404) {
- const errorMessage = error.response.body.message || ''
+ const errorMessage = getClientErrorApiBody(error)?.message || ''
if (errorMessage.startsWith('Session with sid') && errorMessage.endsWith('not found')) {
setAuthErrorMessage('The session ID is invalid or expired.')
} else {
setAuthErrorMessage('The login link is invalid or expired. Please try again.')
}
+ setShowRetryCta(true)
}
}
if (authState.type !== AuthStateType.ERROR && error instanceof ConfigurationError) {
setAuthErrorMessage(error.message)
+ setShowRetryCta(true)
}
}, [authState, handleRetry, error])
return (
-
-
-
- {error instanceof AuthError ? 'Authentication Error' : 'Configuration Error'}
-
-
{authErrorMessage}
-
-
-
- Retry
-
-
+
)
}
diff --git a/packages/react/src/components/errors/CorsErrorComponent.test.tsx b/packages/react/src/components/errors/CorsErrorComponent.test.tsx
index 4f2420e7b..01f90f941 100644
--- a/packages/react/src/components/errors/CorsErrorComponent.test.tsx
+++ b/packages/react/src/components/errors/CorsErrorComponent.test.tsx
@@ -21,7 +21,7 @@ describe('CorsErrorComponent', () => {
/>,
)
- expect(screen.getByText('Before you continue...')).toBeInTheDocument()
+ expect(screen.getByText('Before you continue…')).toBeInTheDocument()
expect(screen.getByText(origin)).toBeInTheDocument()
const link = screen.getByRole('link', {name: 'Manage CORS configuration'}) as HTMLAnchorElement
@@ -41,7 +41,7 @@ describe('CorsErrorComponent', () => {
const error = new Error('some error message')
render( {}} />)
- expect(screen.getByText('Before you continue...')).toBeInTheDocument()
+ expect(screen.getByText('Before you continue…')).toBeInTheDocument()
expect(screen.getByText('some error message')).toBeInTheDocument()
expect(screen.queryByRole('link', {name: 'Manage CORS configuration'})).toBeNull()
})
diff --git a/packages/react/src/components/errors/CorsErrorComponent.tsx b/packages/react/src/components/errors/CorsErrorComponent.tsx
index 22b6de77a..a3edbfe4c 100644
--- a/packages/react/src/components/errors/CorsErrorComponent.tsx
+++ b/packages/react/src/components/errors/CorsErrorComponent.tsx
@@ -1,6 +1,8 @@
import {useMemo} from 'react'
import {type FallbackProps} from 'react-error-boundary'
+import {Error} from './Error'
+
type CorsErrorComponentProps = FallbackProps & {
projectId: string | null
}
@@ -15,26 +17,21 @@ export function CorsErrorComponent({projectId, error}: CorsErrorComponentProps):
return url.toString()
}, [origin, projectId])
return (
-
-
-
Before you continue...
-
- To access your content, you need to add the following URL as a CORS origin to your
- Sanity project.
-
-
- {origin}
-
- {projectId ? (
-
-
- Manage CORS configuration
-
-
- ) : (
-
{error?.message}
- )}
-
-
+ add the following URL as a CORS origin to your Sanity project.',
+ code: origin,
+ cta: {
+ text: 'Manage CORS configuration',
+ href: corsUrl,
+ },
+ }
+ : {
+ description: error?.message,
+ })}
+ />
)
}
diff --git a/packages/react/src/components/errors/Error.styles.ts b/packages/react/src/components/errors/Error.styles.ts
new file mode 100644
index 000000000..ea867dc39
--- /dev/null
+++ b/packages/react/src/components/errors/Error.styles.ts
@@ -0,0 +1,35 @@
+const FONT_SANS_SERIF = `-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif`
+const FONT_MONOSPACE = `-apple-system-ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace`
+
+const styles: Record = {
+ container: {
+ padding: '28px',
+ fontFamily: FONT_SANS_SERIF,
+ display: 'flex',
+ flexDirection: 'column',
+ gap: '21px',
+ fontSize: '14px',
+ },
+ heading: {
+ margin: 0,
+ fontSize: '28px',
+ fontWeight: 700,
+ },
+ paragraph: {
+ margin: 0,
+ },
+ link: {
+ appearance: 'none',
+ background: 'transparent',
+ border: 0,
+ padding: 0,
+ font: 'inherit',
+ textDecoration: 'underline',
+ cursor: 'pointer',
+ },
+ code: {
+ fontFamily: FONT_MONOSPACE,
+ },
+}
+
+export default styles
diff --git a/packages/react/src/components/errors/Error.tsx b/packages/react/src/components/errors/Error.tsx
new file mode 100644
index 000000000..ab1b770e4
--- /dev/null
+++ b/packages/react/src/components/errors/Error.tsx
@@ -0,0 +1,40 @@
+import styles from './Error.styles'
+
+type ErrorProps = {
+ heading: string
+ description?: string
+ code?: string
+ cta?: {
+ text: string
+ href?: string
+ onClick?: () => void
+ }
+}
+
+export function Error({heading, description, code, cta}: ErrorProps): React.ReactNode {
+ return (
+
+
{heading}
+
+ {description && (
+
+ )}
+
+ {code &&
{code}}
+
+ {cta && (cta.href || cta.onClick) && (
+
+ {cta.href ? (
+
+ {cta.text}
+
+ ) : (
+
+ {cta.text}
+
+ )}
+
+ )}
+
+ )
+}
diff --git a/packages/react/src/context/ComlinkTokenRefresh.test.tsx b/packages/react/src/context/ComlinkTokenRefresh.test.tsx
index e6e1316b6..79957ac94 100644
--- a/packages/react/src/context/ComlinkTokenRefresh.test.tsx
+++ b/packages/react/src/context/ComlinkTokenRefresh.test.tsx
@@ -7,6 +7,7 @@ import {useAuthState} from '../hooks/auth/useAuthState'
import {useWindowConnection} from '../hooks/comlink/useWindowConnection'
import {useSanityInstance} from '../hooks/context/useSanityInstance'
import {ComlinkTokenRefreshProvider} from './ComlinkTokenRefresh'
+import {ResourceProvider} from './ResourceProvider'
// Mocks
vi.mock('@sanity/sdk', async () => {
@@ -35,11 +36,15 @@ const mockGetIsInDashboardState = getIsInDashboardState as Mock
const mockSetAuthToken = setAuthToken as Mock
const mockUseAuthState = useAuthState as Mock
const mockUseWindowConnection = useWindowConnection as Mock
-const mockUseSanityInstance = useSanityInstance as Mock
+const mockUseSanityInstance = useSanityInstance as unknown as Mock
const mockFetch = vi.fn()
// eslint-disable-next-line @typescript-eslint/no-explicit-any
-const mockSanityInstance: any = {projectId: 'test', dataset: 'test'}
+const mockSanityInstance: any = {
+ projectId: 'test',
+ dataset: 'test',
+ config: {studioMode: {enabled: false}},
+}
describe('ComlinkTokenRefresh', () => {
beforeEach(() => {
@@ -64,9 +69,11 @@ describe('ComlinkTokenRefresh', () => {
it('should not request new token on 401 if not in dashboard', async () => {
mockUseAuthState.mockReturnValue({type: AuthStateType.LOGGED_IN})
const {rerender} = render(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
mockUseAuthState.mockReturnValue({
@@ -75,9 +82,11 @@ describe('ComlinkTokenRefresh', () => {
})
act(() => {
rerender(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
})
@@ -93,11 +102,14 @@ describe('ComlinkTokenRefresh', () => {
mockGetIsInDashboardState.mockReturnValue({getCurrent: () => true})
})
- it('should initialize useWindowConnection with correct parameters', () => {
+ it('should initialize useWindowConnection with correct parameters when not in studio mode', () => {
+ // Simulate studio mode disabled by default
render(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
expect(mockUseWindowConnection).toHaveBeenCalledWith(
@@ -108,7 +120,7 @@ describe('ComlinkTokenRefresh', () => {
)
})
- it('should handle received token', async () => {
+ it('should handle received token when not in studio mode', async () => {
mockUseAuthState.mockReturnValue({
type: AuthStateType.ERROR,
error: {statusCode: 401, message: 'Unauthorized'},
@@ -116,20 +128,22 @@ describe('ComlinkTokenRefresh', () => {
mockFetch.mockResolvedValueOnce({token: 'new-token'})
render(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
await act(async () => {
await vi.advanceTimersByTimeAsync(100)
})
- expect(mockSetAuthToken).toHaveBeenCalledWith(mockSanityInstance, 'new-token')
+ expect(mockSetAuthToken).toHaveBeenCalledWith(expect.any(Object), 'new-token')
expect(mockFetch).toHaveBeenCalledTimes(1)
})
- it('should not set auth token if received token is null', async () => {
+ it('should not set auth token if received token is null when not in studio mode', async () => {
mockUseAuthState.mockReturnValue({
type: AuthStateType.ERROR,
error: {statusCode: 401, message: 'Unauthorized'},
@@ -137,9 +151,11 @@ describe('ComlinkTokenRefresh', () => {
mockFetch.mockResolvedValueOnce({token: null})
render(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
await act(async () => {
@@ -149,7 +165,7 @@ describe('ComlinkTokenRefresh', () => {
expect(mockSetAuthToken).not.toHaveBeenCalled()
})
- it('should handle fetch errors gracefully', async () => {
+ it('should handle fetch errors gracefully when not in studio mode', async () => {
mockUseAuthState.mockReturnValue({
type: AuthStateType.ERROR,
error: {statusCode: 401, message: 'Unauthorized'},
@@ -157,9 +173,11 @@ describe('ComlinkTokenRefresh', () => {
mockFetch.mockRejectedValueOnce(new Error('Fetch failed'))
render(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
await act(async () => {
@@ -170,12 +188,15 @@ describe('ComlinkTokenRefresh', () => {
})
describe('Automatic token refresh', () => {
- it('should not request new token for non-401 errors', async () => {
+ it('should not request new token for non-401 errors when not in studio mode', async () => {
mockUseAuthState.mockReturnValue({type: AuthStateType.LOGGED_IN})
const {rerender} = render(
-
- Test
- ,
+
+
+ Test
+
+ ,
+ ,
)
mockUseAuthState.mockReturnValue({
@@ -184,9 +205,11 @@ describe('ComlinkTokenRefresh', () => {
})
act(() => {
rerender(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
})
@@ -196,24 +219,50 @@ describe('ComlinkTokenRefresh', () => {
expect(mockFetch).not.toHaveBeenCalled()
})
- it('should request new token on LOGGED_OUT state', async () => {
+ it('should request new token on LOGGED_OUT state when not in studio mode', async () => {
mockUseAuthState.mockReturnValue({type: AuthStateType.LOGGED_IN})
const {rerender} = render(
-
- Test
- ,
+
+
+ Test
+
+ ,
)
mockUseAuthState.mockReturnValue({type: AuthStateType.LOGGED_OUT})
act(() => {
rerender(
+
+
+ Test
+
+ ,
+ )
+ })
+
+ expect(mockFetch).toHaveBeenCalledWith('dashboard/v1/auth/tokens/create')
+ })
+
+ describe('when in studio mode', () => {
+ beforeEach(() => {
+ // Make the instance report studio mode enabled
+ mockUseSanityInstance.mockReturnValue({
+ ...mockSanityInstance,
+ config: {studioMode: {enabled: true}},
+ })
+ })
+
+ it('should not render DashboardTokenRefresh when studio mode enabled', () => {
+ render(
Test
,
)
- })
- expect(mockFetch).toHaveBeenCalledWith('dashboard/v1/auth/tokens/create')
+ // In studio mode, provider should return children directly
+ // So window connection should not be initialized
+ expect(mockUseWindowConnection).not.toHaveBeenCalled()
+ })
})
})
})
diff --git a/packages/react/src/context/ComlinkTokenRefresh.tsx b/packages/react/src/context/ComlinkTokenRefresh.tsx
index 1687bcd17..cb9e8f21a 100644
--- a/packages/react/src/context/ComlinkTokenRefresh.tsx
+++ b/packages/react/src/context/ComlinkTokenRefresh.tsx
@@ -130,8 +130,9 @@ function DashboardTokenRefresh({children}: PropsWithChildren) {
export const ComlinkTokenRefreshProvider: React.FC = ({children}) => {
const instance = useSanityInstance()
const isInDashboard = useMemo(() => getIsInDashboardState(instance).getCurrent(), [instance])
+ const studioModeEnabled = !!instance.config.studioMode?.enabled
- if (isInDashboard) {
+ if (isInDashboard && !studioModeEnabled) {
return {children}
}
diff --git a/packages/react/src/hooks/agent/agentActions.test.tsx b/packages/react/src/hooks/agent/agentActions.test.tsx
new file mode 100644
index 000000000..f3bae2c19
--- /dev/null
+++ b/packages/react/src/hooks/agent/agentActions.test.tsx
@@ -0,0 +1,78 @@
+/* eslint-disable @typescript-eslint/no-explicit-any */
+import {renderHook} from '@testing-library/react'
+import {of} from 'rxjs'
+import {describe, expect, it, vi} from 'vitest'
+
+import {ResourceProvider} from '../../context/ResourceProvider'
+import {
+ useAgentGenerate,
+ useAgentPatch,
+ useAgentPrompt,
+ useAgentTransform,
+ useAgentTranslate,
+} from './agentActions'
+
+vi.mock('@sanity/sdk', async (orig) => {
+ const actual = await orig()
+ return {
+ ...(actual as Record),
+ agentGenerate: vi.fn(() => of('gen')),
+ agentTransform: vi.fn(() => of('xform')),
+ agentTranslate: vi.fn(() => of('xlate')),
+ agentPrompt: vi.fn(() => of('prompted')),
+ agentPatch: vi.fn(() => of('patched')),
+ }
+})
+
+describe('agent action hooks', () => {
+ const wrapper = ({children}: {children: React.ReactNode}) => (
+
+ {children}
+
+ )
+
+ it('useAgentGenerate returns a callable that delegates to core', async () => {
+ const {result} = renderHook(() => useAgentGenerate(), {wrapper})
+ const value = await new Promise((resolve, reject) => {
+ result.current({} as any).subscribe({
+ next: (v) => resolve(v),
+ error: reject,
+ })
+ })
+ expect(value).toBe('gen')
+ })
+
+ it('useAgentTransform returns a callable that delegates to core', async () => {
+ const {result} = renderHook(() => useAgentTransform(), {wrapper})
+ const value = await new Promise((resolve, reject) => {
+ result.current({} as any).subscribe({
+ next: (v) => resolve(v),
+ error: reject,
+ })
+ })
+ expect(value).toBe('xform')
+ })
+
+ it('useAgentTranslate returns a callable that delegates to core', async () => {
+ const {result} = renderHook(() => useAgentTranslate(), {wrapper})
+ const value = await new Promise((resolve, reject) => {
+ result.current({} as any).subscribe({
+ next: (v) => resolve(v),
+ error: reject,
+ })
+ })
+ expect(value).toBe('xlate')
+ })
+
+ it('useAgentPrompt returns a callable that delegates to core', async () => {
+ const {result} = renderHook(() => useAgentPrompt(), {wrapper})
+ const value = await result.current({} as any)
+ expect(value).toBe('prompted')
+ })
+
+ it('useAgentPatch returns a callable that delegates to core', async () => {
+ const {result} = renderHook(() => useAgentPatch(), {wrapper})
+ const value = await result.current({} as any)
+ expect(value).toBe('patched')
+ })
+})
diff --git a/packages/react/src/hooks/agent/agentActions.ts b/packages/react/src/hooks/agent/agentActions.ts
new file mode 100644
index 000000000..55a0d4fcb
--- /dev/null
+++ b/packages/react/src/hooks/agent/agentActions.ts
@@ -0,0 +1,136 @@
+import {
+ agentGenerate,
+ type AgentGenerateOptions,
+ agentPatch,
+ type AgentPatchOptions,
+ type AgentPatchResult,
+ agentPrompt,
+ type AgentPromptOptions,
+ type AgentPromptResult,
+ agentTransform,
+ type AgentTransformOptions,
+ agentTranslate,
+ type AgentTranslateOptions,
+ type SanityInstance,
+} from '@sanity/sdk'
+import {firstValueFrom} from 'rxjs'
+
+import {createCallbackHook} from '../helpers/createCallbackHook'
+
+interface Subscription {
+ unsubscribe(): void
+}
+
+interface Observer {
+ next?: (value: T) => void
+ error?: (err: unknown) => void
+ complete?: () => void
+}
+
+interface Subscribable {
+ subscribe(observer: Observer): Subscription
+ subscribe(
+ next: (value: T) => void,
+ error?: (err: unknown) => void,
+ complete?: () => void,
+ ): Subscription
+}
+
+/**
+ * @alpha
+ * Generates content for a document (or specific fields) via Sanity Agent Actions.
+ * - Uses instruction templates with `$variables` and supports `instructionParams` (constants, fields, documents, GROQ queries).
+ * - Can target specific paths/fields; supports image generation when targeting image fields.
+ * - Supports optional `temperature`, `async`, `noWrite`, and `conditionalPaths`.
+ *
+ * Returns a stable callback that triggers the action and yields a Subscribable stream.
+ */
+export const useAgentGenerate: () => (options: AgentGenerateOptions) => Subscribable =
+ createCallbackHook(agentGenerate) as unknown as () => (
+ options: AgentGenerateOptions,
+ ) => Subscribable
+
+/**
+ * @alpha
+ * Transforms an existing document or selected fields using Sanity Agent Actions.
+ * - Accepts `instruction` and `instructionParams` (constants, fields, documents, GROQ queries).
+ * - Can write to the same or a different `targetDocument` (create/edit), and target specific paths.
+ * - Supports per-path image transform instructions and image description operations.
+ * - Optional `temperature`, `async`, `noWrite`, `conditionalPaths`.
+ *
+ * Returns a stable callback that triggers the action and yields a Subscribable stream.
+ */
+export const useAgentTransform: () => (options: AgentTransformOptions) => Subscribable =
+ createCallbackHook(agentTransform) as unknown as () => (
+ options: AgentTransformOptions,
+ ) => Subscribable
+
+/**
+ * @alpha
+ * Translates documents or fields using Sanity Agent Actions.
+ * - Configure `fromLanguage`/`toLanguage`, optional `styleGuide`, and `protectedPhrases`.
+ * - Can write into a different `targetDocument`, and/or store language in a field.
+ * - Optional `temperature`, `async`, `noWrite`, `conditionalPaths`.
+ *
+ * Returns a stable callback that triggers the action and yields a Subscribable stream.
+ */
+export const useAgentTranslate: () => (options: AgentTranslateOptions) => Subscribable =
+ createCallbackHook(agentTranslate) as unknown as () => (
+ options: AgentTranslateOptions,
+ ) => Subscribable
+
+/**
+ * @alpha
+ * Prompts the LLM using the same instruction template format as other actions.
+ * - `format`: 'string' or 'json' (instruction must contain the word "json" for JSON responses).
+ * - Optional `temperature`.
+ *
+ * Returns a stable callback that triggers the action and resolves a Promise with the prompt result.
+ */
+function promptAdapter(
+ instance: SanityInstance,
+ options: AgentPromptOptions,
+): Promise {
+ return firstValueFrom(agentPrompt(instance, options))
+}
+
+/**
+ * @alpha
+ * Prompts the LLM using the same instruction template format as other actions.
+ * - `format`: 'string' or 'json' (instruction must contain the word "json" for JSON responses).
+ * - Optional `temperature`.
+ *
+ * Returns a stable callback that triggers the action and resolves a Promise with the prompt result.
+ */
+export const useAgentPrompt: () => (options: AgentPromptOptions) => Promise =
+ createCallbackHook(promptAdapter)
+
+/**
+ * @alpha
+ * Schema-aware patching with Sanity Agent Actions.
+ * - Validates provided paths/values against the document schema and merges object values safely.
+ * - Prevents duplicate keys and supports array appends (including after a specific keyed item).
+ * - Accepts `documentId` or `targetDocument` (mutually exclusive).
+ * - Optional `async`, `noWrite`, `conditionalPaths`.
+ *
+ * Returns a stable callback that triggers the action and resolves a Promise with the patch result.
+ */
+function patchAdapter(
+ instance: SanityInstance,
+ options: AgentPatchOptions,
+): Promise {
+ return firstValueFrom(agentPatch(instance, options))
+}
+
+/**
+ * @alpha
+ * Schema-aware patching with Sanity Agent Actions.
+ * - Validates provided paths/values against the document schema and merges object values safely.
+ * - Prevents duplicate keys and supports array appends (including after a specific keyed item).
+ * - Accepts `documentId` or `targetDocument` (mutually exclusive).
+ * - Optional `async`, `noWrite`, `conditionalPaths`.
+ *
+ * Returns a stable callback that triggers the action and resolves a Promise with the patch result.
+ */
+export const useAgentPatch: () => (options: AgentPatchOptions) => Promise =
+ createCallbackHook(patchAdapter)
diff --git a/packages/react/src/hooks/auth/useDashboardOrganizationId.test.tsx b/packages/react/src/hooks/auth/useDashboardOrganizationId.test.tsx
index 9d5d01f48..174b580c1 100644
--- a/packages/react/src/hooks/auth/useDashboardOrganizationId.test.tsx
+++ b/packages/react/src/hooks/auth/useDashboardOrganizationId.test.tsx
@@ -1,14 +1,11 @@
-import {createSanityInstance, getDashboardOrganizationId} from '@sanity/sdk'
+import {getDashboardOrganizationId} from '@sanity/sdk'
import {renderHook} from '@testing-library/react'
import {throwError} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useDashboardOrganizationId} from './useDashboardOrganizationId'
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn().mockReturnValue(createSanityInstance({projectId: 'p', dataset: 'd'})),
-}))
-
vi.mock('@sanity/sdk', async (importOriginal) => {
const actual = await importOriginal()
return {...(actual || {}), getDashboardOrganizationId: vi.fn()}
@@ -23,7 +20,13 @@ describe('useDashboardOrganizationId', () => {
observable: throwError(() => new Error('Unexpected usage of observable')),
})
- const {result} = renderHook(() => useDashboardOrganizationId())
+ const {result} = renderHook(() => useDashboardOrganizationId(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current).toBeUndefined()
})
@@ -36,7 +39,13 @@ describe('useDashboardOrganizationId', () => {
observable: throwError(() => new Error('Unexpected usage of observable')),
})
- const {result} = renderHook(() => useDashboardOrganizationId())
+ const {result} = renderHook(() => useDashboardOrganizationId(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current).toBe(mockOrgId)
})
})
diff --git a/packages/react/src/hooks/auth/useVerifyOrgProjects.test.tsx b/packages/react/src/hooks/auth/useVerifyOrgProjects.test.tsx
index fdb2d472f..472254326 100644
--- a/packages/react/src/hooks/auth/useVerifyOrgProjects.test.tsx
+++ b/packages/react/src/hooks/auth/useVerifyOrgProjects.test.tsx
@@ -3,7 +3,7 @@ import {act, renderHook, waitFor} from '@testing-library/react'
import {Subject} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useVerifyOrgProjects} from './useVerifyOrgProjects'
// Mock dependencies
@@ -14,33 +14,46 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
observeOrganizationVerificationState: vi.fn(),
}
})
-vi.mock('../context/useSanityInstance')
describe('useVerifyOrgProjects', () => {
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
- const mockInstance = {config: {}} as any // Dummy instance
const mockObserve = vi.mocked(observeOrganizationVerificationState)
- const mockUseInstance = vi.mocked(useSanityInstance)
const testProjectIds = ['proj-1']
beforeEach(() => {
vi.clearAllMocks()
- mockUseInstance.mockReturnValue(mockInstance)
})
it('should return null and not observe state if disabled', () => {
- const {result} = renderHook(() => useVerifyOrgProjects(true, testProjectIds))
+ const {result} = renderHook(() => useVerifyOrgProjects(true, testProjectIds), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current).toBeNull()
expect(mockObserve).not.toHaveBeenCalled()
})
it('should return null and not observe state if projectIds is missing or empty', () => {
- const {result: resultUndefined} = renderHook(() => useVerifyOrgProjects(false, undefined))
+ const {result: resultUndefined} = renderHook(() => useVerifyOrgProjects(false, undefined), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(resultUndefined.current).toBeNull()
expect(mockObserve).not.toHaveBeenCalled()
- const {result: resultEmpty} = renderHook(() => useVerifyOrgProjects(false, []))
+ const {result: resultEmpty} = renderHook(() => useVerifyOrgProjects(false, []), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(resultEmpty.current).toBeNull()
expect(mockObserve).not.toHaveBeenCalled()
})
@@ -49,17 +62,29 @@ describe('useVerifyOrgProjects', () => {
const subject = new Subject()
mockObserve.mockReturnValue(subject.asObservable())
- const {result} = renderHook(() => useVerifyOrgProjects(false, testProjectIds))
+ const {result} = renderHook(() => useVerifyOrgProjects(false, testProjectIds), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current).toBeNull()
- expect(mockObserve).toHaveBeenCalledWith(mockInstance, testProjectIds)
+ expect(mockObserve).toHaveBeenCalledWith(expect.any(Object), testProjectIds)
})
it('should return null if observable emits { error: null }', async () => {
const subject = new Subject()
mockObserve.mockReturnValue(subject.asObservable())
- const {result} = renderHook(() => useVerifyOrgProjects(false, testProjectIds))
+ const {result} = renderHook(() => useVerifyOrgProjects(false, testProjectIds), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
act(() => {
subject.next({error: null})
@@ -75,7 +100,13 @@ describe('useVerifyOrgProjects', () => {
const errorMessage = 'Org mismatch'
mockObserve.mockReturnValue(subject.asObservable())
- const {result} = renderHook(() => useVerifyOrgProjects(false, testProjectIds))
+ const {result} = renderHook(() => useVerifyOrgProjects(false, testProjectIds), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
act(() => {
subject.next({error: errorMessage})
@@ -91,7 +122,13 @@ describe('useVerifyOrgProjects', () => {
const unsubscribeSpy = vi.spyOn(subject, 'unsubscribe')
mockObserve.mockReturnValue(subject)
- const {unmount} = renderHook(() => useVerifyOrgProjects(false, testProjectIds))
+ const {unmount} = renderHook(() => useVerifyOrgProjects(false, testProjectIds), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(unsubscribeSpy).not.toHaveBeenCalled()
unmount()
@@ -114,6 +151,11 @@ describe('useVerifyOrgProjects', () => {
({disabled, pIds}) => useVerifyOrgProjects(disabled, pIds),
{
initialProps: {disabled: false, pIds: testProjectIds},
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
},
)
diff --git a/packages/react/src/hooks/dashboard/types.ts b/packages/react/src/hooks/dashboard/types.ts
new file mode 100644
index 000000000..e00205225
--- /dev/null
+++ b/packages/react/src/hooks/dashboard/types.ts
@@ -0,0 +1,12 @@
+import {type DocumentHandle, type DocumentSource} from '@sanity/sdk'
+/**
+ * Document handle that optionally includes a source (e.g., media library source)
+ * or projectId and dataset for traditional dataset sources
+ * (but now marked optional since it's valid to just use a source)
+ * @beta
+ */
+export interface DocumentHandleWithSource extends Omit {
+ source?: DocumentSource
+ projectId?: string
+ dataset?: string
+}
diff --git a/packages/react/src/hooks/dashboard/useDispatchIntent.test.ts b/packages/react/src/hooks/dashboard/useDispatchIntent.test.ts
new file mode 100644
index 000000000..4e836b082
--- /dev/null
+++ b/packages/react/src/hooks/dashboard/useDispatchIntent.test.ts
@@ -0,0 +1,213 @@
+import {type DocumentHandle, mediaLibrarySource} from '@sanity/sdk'
+import {renderHook} from '@testing-library/react'
+import {beforeEach, describe, expect, it, vi} from 'vitest'
+
+import {type DocumentHandleWithSource} from './types'
+import {useDispatchIntent} from './useDispatchIntent'
+
+// Mock the useWindowConnection hook
+const mockSendMessage = vi.fn()
+vi.mock('../comlink/useWindowConnection', () => ({
+ useWindowConnection: vi.fn(() => ({
+ sendMessage: mockSendMessage,
+ })),
+}))
+
+describe('useDispatchIntent', () => {
+ const mockDocumentHandle: DocumentHandle = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ projectId: 'test-project-id',
+ dataset: 'test-dataset',
+ }
+
+ beforeEach(() => {
+ vi.clearAllMocks()
+ // Reset mock implementation to default behavior
+ mockSendMessage.mockImplementation(() => {})
+ })
+
+ it('should return dispatchIntent function', () => {
+ const {result} = renderHook(() =>
+ useDispatchIntent({action: 'edit', documentHandle: mockDocumentHandle}),
+ )
+
+ expect(result.current).toEqual({
+ dispatchIntent: expect.any(Function),
+ })
+ })
+
+ it('should throw error when neither action nor intentId is provided', () => {
+ const {result} = renderHook(() =>
+ // @ts-expect-error - Testing runtime error when neither is provided
+ useDispatchIntent({documentHandle: mockDocumentHandle}),
+ )
+
+ expect(() => result.current.dispatchIntent()).toThrow(
+ 'useDispatchIntent: Either `action` or `intentId` must be provided.',
+ )
+ })
+
+ it('should handle errors gracefully', () => {
+ const consoleErrorSpy = vi.spyOn(console, 'error').mockImplementation(() => {})
+ mockSendMessage.mockImplementation(() => {
+ throw new Error('Test error')
+ })
+
+ const {result} = renderHook(() =>
+ useDispatchIntent({action: 'edit', documentHandle: mockDocumentHandle}),
+ )
+
+ expect(() => result.current.dispatchIntent()).toThrow('Test error')
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Failed to dispatch intent:', expect.any(Error))
+
+ consoleErrorSpy.mockRestore()
+ })
+
+ it('should use memoized dispatchIntent function', () => {
+ const {result, rerender} = renderHook(({params}) => useDispatchIntent(params), {
+ initialProps: {params: {action: 'edit' as const, documentHandle: mockDocumentHandle}},
+ })
+
+ const firstDispatchIntent = result.current.dispatchIntent
+
+ // Rerender with the same params
+ rerender({params: {action: 'edit' as const, documentHandle: mockDocumentHandle}})
+
+ expect(result.current.dispatchIntent).toBe(firstDispatchIntent)
+ })
+
+ it('should create new dispatchIntent function when documentHandle changes', () => {
+ const {result, rerender} = renderHook(({params}) => useDispatchIntent(params), {
+ initialProps: {params: {action: 'edit' as const, documentHandle: mockDocumentHandle}},
+ })
+
+ const firstDispatchIntent = result.current.dispatchIntent
+
+ const newDocumentHandle: DocumentHandle = {
+ documentId: 'new-document-id',
+ documentType: 'new-document-type',
+ projectId: 'new-project-id',
+ dataset: 'new-dataset',
+ }
+
+ rerender({params: {action: 'edit' as const, documentHandle: newDocumentHandle}})
+
+ expect(result.current.dispatchIntent).not.toBe(firstDispatchIntent)
+ })
+
+ it('should warn if both action and intentId are provided', () => {
+ const consoleWarnSpy = vi.spyOn(console, 'warn').mockImplementation(() => {})
+ const {result} = renderHook(() =>
+ useDispatchIntent({
+ action: 'edit' as const,
+ intentId: 'custom-intent' as never, // test runtime error when both are provided
+ documentHandle: mockDocumentHandle,
+ }),
+ )
+ result.current.dispatchIntent()
+ expect(consoleWarnSpy).toHaveBeenCalledWith(
+ 'useDispatchIntent: Both `action` and `intentId` were provided. Using `intentId` and ignoring `action`.',
+ )
+ consoleWarnSpy.mockRestore()
+ })
+
+ it('should send intent message with action and params when both are provided', () => {
+ const intentParams = {view: 'editor', tab: 'content'}
+ const {result} = renderHook(() =>
+ useDispatchIntent({
+ action: 'edit',
+ documentHandle: mockDocumentHandle,
+ parameters: intentParams,
+ }),
+ )
+
+ result.current.dispatchIntent()
+
+ expect(mockSendMessage).toHaveBeenCalledWith('dashboard/v1/events/intents/dispatch-intent', {
+ action: 'edit',
+ document: {
+ id: 'test-document-id',
+ type: 'test-document-type',
+ },
+ resource: {
+ id: 'test-project-id.test-dataset',
+ },
+ parameters: intentParams,
+ })
+ })
+
+ it('should send intent message with intentId and params when both are provided', () => {
+ const intentParams = {view: 'editor', tab: 'content'}
+ const {result} = renderHook(() =>
+ useDispatchIntent({
+ intentId: 'custom-intent',
+ documentHandle: mockDocumentHandle,
+ parameters: intentParams,
+ }),
+ )
+
+ result.current.dispatchIntent()
+
+ expect(mockSendMessage).toHaveBeenCalledWith('dashboard/v1/events/intents/dispatch-intent', {
+ intentId: 'custom-intent',
+ document: {
+ id: 'test-document-id',
+ type: 'test-document-type',
+ },
+ resource: {
+ id: 'test-project-id.test-dataset',
+ },
+ parameters: intentParams,
+ })
+ })
+
+ it('should send intent message with media library source', () => {
+ const mockMediaLibraryHandle: DocumentHandleWithSource = {
+ documentId: 'test-asset-id',
+ documentType: 'sanity.asset',
+ source: mediaLibrarySource('mlPGY7BEqt52'),
+ }
+
+ const {result} = renderHook(() =>
+ useDispatchIntent({
+ action: 'edit',
+ documentHandle: mockMediaLibraryHandle,
+ }),
+ )
+
+ result.current.dispatchIntent()
+
+ expect(mockSendMessage).toHaveBeenCalledWith('dashboard/v1/events/intents/dispatch-intent', {
+ action: 'edit',
+ document: {
+ id: 'test-asset-id',
+ type: 'sanity.asset',
+ },
+ resource: {
+ id: 'mlPGY7BEqt52',
+ type: 'mediaLibrary',
+ },
+ })
+ })
+
+ describe('error handling', () => {
+ it('should throw error when neither source nor projectId/dataset is provided', () => {
+ const invalidHandle = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ }
+
+ const {result} = renderHook(() =>
+ useDispatchIntent({
+ action: 'edit',
+ documentHandle: invalidHandle as unknown as DocumentHandleWithSource,
+ }),
+ )
+
+ expect(() => result.current.dispatchIntent()).toThrow(
+ 'useDispatchIntent: Either `source` or both `projectId` and `dataset` must be provided in documentHandle.',
+ )
+ })
+ })
+})
diff --git a/packages/react/src/hooks/dashboard/useDispatchIntent.ts b/packages/react/src/hooks/dashboard/useDispatchIntent.ts
new file mode 100644
index 000000000..fea9c63fb
--- /dev/null
+++ b/packages/react/src/hooks/dashboard/useDispatchIntent.ts
@@ -0,0 +1,174 @@
+import {SDK_CHANNEL_NAME, SDK_NODE_NAME} from '@sanity/message-protocol'
+import {type FrameMessage} from '@sanity/sdk'
+import {useCallback} from 'react'
+
+import {useWindowConnection} from '../comlink/useWindowConnection'
+import {type DocumentHandleWithSource} from './types'
+import {getResourceIdFromDocumentHandle} from './utils/getResourceIdFromDocumentHandle'
+
+/**
+ * Message type for sending intents to the dashboard
+ * @beta
+ */
+interface IntentMessage {
+ type: 'dashboard/v1/events/intents/dispatch-intent'
+ data: {
+ action?: 'edit'
+ intentId?: string
+ document: {
+ id: string
+ type: string
+ }
+ resource?: {
+ id: string
+ type?: 'mediaLibrary'
+ }
+ parameters?: Record
+ }
+}
+
+/**
+ * Return type for the useDispatchIntent hook
+ * @beta
+ */
+interface DispatchIntent {
+ dispatchIntent: () => void
+}
+
+/**
+ * Parameters for the useDispatchIntent hook
+ * @beta
+ */
+// type UseDispatchIntentParams =
+// | {
+// action: 'edit'
+// intentId?: never
+// documentHandle: DocumentHandleWithSource
+// parameters?: Record
+// }
+// | {
+// action?: never
+// intentId: string
+// documentHandle: DocumentHandleWithSource
+// parameters?: Record
+// }
+
+type UseDispatchIntentParams = {
+ action?: 'edit'
+ intentId?: string
+ documentHandle: DocumentHandleWithSource
+ parameters?: Record
+}
+
+/**
+ * @beta
+ *
+ * A hook for dispatching intent messages to the Dashboard with a document handle.
+ * This allows applications to signal their intent to pass the referenced document to other applications that have registered the ability to perform specific actions on that document.
+ *
+ * @param params - Object containing:
+ * - `action` - Action to perform (currently only 'edit' is supported). Will prompt a picker if multiple handlers are available.
+ * - `intentId` - Specific ID of the intent to dispatch. Either `action` or `intentId` is required.
+ * - `documentHandle` - The document handle containing document ID, type, and either:
+ * - `projectId` and `dataset` for traditional dataset sources, like `{documentId: '123', documentType: 'book', projectId: 'abc123', dataset: 'production'}`
+ * - `source` for media library or dataset sources, like `{documentId: '123', documentType: 'asset', source: mediaLibrarySource('ml123')}`
+ * - `paremeters` - Optional parameters to include in the dispatch; will be passed to the resolved intent handler
+ * @returns An object containing:
+ * - `dispatchIntent` - Function to dispatch the intent message
+ *
+ * @example
+ * ```tsx
+ * import {useDispatchIntent} from '@sanity/sdk-react'
+ * import {Button} from '@sanity/ui'
+ * import {Suspense} from 'react'
+ *
+ * function DispatchIntentButton({documentId, documentType, projectId, dataset}) {
+ * const {dispatchIntent} = useDispatchIntent({
+ * action: 'edit',
+ * documentHandle: {documentId, documentType, projectId, dataset},
+ * })
+ *
+ * return (
+ * dispatchIntent()}
+ * text="Dispatch Intent"
+ * />
+ * )
+ * }
+ *
+ * // Wrap the component with Suspense since the hook may suspend
+ * function MyDocumentAction({documentId, documentType, projectId, dataset}) {
+ * return (
+ * }>
+ *
+ *
+ * )
+ * }
+ * ```
+ */
+export function useDispatchIntent(params: UseDispatchIntentParams): DispatchIntent {
+ const {action, intentId, documentHandle, parameters} = params
+ const {sendMessage} = useWindowConnection({
+ name: SDK_NODE_NAME,
+ connectTo: SDK_CHANNEL_NAME,
+ })
+
+ const dispatchIntent = useCallback(() => {
+ try {
+ // Validate that either action or intentId is provided
+ if (!action && !intentId) {
+ throw new Error('useDispatchIntent: Either `action` or `intentId` must be provided.')
+ }
+
+ const {projectId, dataset, source} = documentHandle
+
+ // Warn if both action and intentId are provided (shouldn't happen with TypeScript, but handle runtime case)
+ if (action && intentId) {
+ // eslint-disable-next-line no-console -- warn if both action and intentId are provided
+ console.warn(
+ 'useDispatchIntent: Both `action` and `intentId` were provided. Using `intentId` and ignoring `action`.',
+ )
+ }
+
+ if (!source && (!projectId || !dataset)) {
+ throw new Error(
+ 'useDispatchIntent: Either `source` or both `projectId` and `dataset` must be provided in documentHandle.',
+ )
+ }
+
+ const resource = getResourceIdFromDocumentHandle(documentHandle)
+
+ const message: IntentMessage = {
+ type: 'dashboard/v1/events/intents/dispatch-intent',
+ data: {
+ ...(action && !intentId ? {action} : {}),
+ ...(intentId ? {intentId} : {}),
+ document: {
+ id: documentHandle.documentId,
+ type: documentHandle.documentType,
+ },
+ resource: {
+ id: resource.id,
+ ...(resource.type ? {type: resource.type} : {}),
+ },
+ ...(parameters && Object.keys(parameters).length > 0 ? {parameters} : {}),
+ },
+ }
+
+ sendMessage(message.type, message.data)
+ } catch (error) {
+ // eslint-disable-next-line no-console
+ console.error('Failed to dispatch intent:', error)
+ throw error
+ }
+ }, [action, intentId, documentHandle, parameters, sendMessage])
+
+ return {
+ dispatchIntent,
+ }
+}
diff --git a/packages/react/src/hooks/dashboard/useIntentLink.ts b/packages/react/src/hooks/dashboard/useIntentLink.ts
new file mode 100644
index 000000000..c2de6922d
--- /dev/null
+++ b/packages/react/src/hooks/dashboard/useIntentLink.ts
@@ -0,0 +1,176 @@
+import {SDK_CHANNEL_NAME, SDK_NODE_NAME} from '@sanity/message-protocol'
+import {type DocumentHandle, type DocumentTypeHandle, type FrameMessage} from '@sanity/sdk'
+import {useCallback, useEffect, useMemo, useState} from 'react'
+
+import {useWindowConnection} from '../comlink/useWindowConnection'
+
+interface AssetHandle {
+ documentId: string
+ type: 'asset'
+}
+
+// Figure out what fields are actually necessary
+interface CanvasHandle<
+ TDocumentType extends string = string,
+ TDataset extends string = string,
+ TProjectId extends string = string,
+> extends DocumentTypeHandle {
+ documentId: string
+ type: 'canvas'
+}
+
+export type ResourceHandle = (DocumentHandle & {type: 'document'}) | AssetHandle | CanvasHandle
+
+/**
+ * Message type for sending intents to the dashboard
+ * @internal
+ */
+export interface IntentMessage {
+ type: 'dashboard/v1/events/intents/dispatch-intent'
+ data: {
+ intentName?: string
+ document: {
+ id: string
+ type?: string
+ }
+ resource: {
+ id?: string
+ type: 'document' | 'asset' | 'canvas'
+ }
+ parameters?: Record
+ }
+}
+
+/**
+ * Parameters for the useIntentLink hook
+ * @public
+ */
+interface UseIntentLinkParams {
+ intentName?: string
+ intentAction?: string
+ resourceHandle: ResourceHandle
+ parameters?: Record
+}
+
+/**
+ * Return type for the useIntentLink hook
+ * @public
+ */
+interface IntentLink {
+ href?: string
+ onClick: () => void
+}
+
+/**
+ * @public
+ *
+ * A hook for sending intent messages to the Dashboard with a document handle.
+ * This allows applications to signal intent for specific documents to the Dashboard.
+ *
+ * @param params - Object containing:
+ * - `intentName` - Optional specific name of the intent to send
+ * - `documentHandle` - The document handle containing document ID, type, project ID and dataset, like `{documentId: '123', documentType: 'book', projectId: 'abc123', dataset: 'production'}`
+ * - `params` - Optional parameters to include in the intent
+ * @returns An object containing:
+ * - `sendIntent` - Function to send the intent message
+ *
+ * @example
+ * ```tsx
+ * import {useIntentLink} from '@sanity/sdk-react'
+ * import {Suspense} from 'react'
+ *
+ * function IntentLink({documentHandle}) {
+ * const intentLink = useIntentLink({
+ * intentName: 'edit-document',
+ * documentHandle,
+ * params: {view: 'editor'}
+ * })
+ *
+ * return (
+ * Open Intent
+ * )
+ * }
+ *
+ * // Wrap the component with Suspense since the hook may suspend
+ * function MyComponent({documentHandle}) {
+ * return (
+ * }>
+ *
+ *
+ * )
+ * }
+ * ```
+ */
+export function useIntentLink({
+ intentName,
+ intentAction,
+ resourceHandle,
+ parameters,
+}: UseIntentLinkParams): IntentLink {
+ const [href, setHref] = useState()
+ const {fetch, sendMessage} = useWindowConnection({
+ name: SDK_NODE_NAME,
+ connectTo: SDK_CHANNEL_NAME,
+ })
+
+ const data = useMemo(
+ () => ({
+ ...(intentName && {intentName}),
+ ...(intentAction && {intentAction}),
+ document: {
+ id: resourceHandle.documentId,
+ ...('documentType' in resourceHandle && {type: resourceHandle.documentType}),
+ },
+ resource: {
+ ...('projectId' in resourceHandle &&
+ 'dataset' in resourceHandle && {
+ id: `${resourceHandle.projectId}.${resourceHandle.dataset}`,
+ }),
+ type: resourceHandle.type,
+ },
+ ...(parameters && !!Object.keys(parameters).length && {parameters}),
+ }),
+ [intentName, intentAction, resourceHandle, parameters],
+ )
+
+ useEffect(() => {
+ if (!fetch || !data.intentName) return
+
+ async function fetchHref() {
+ try {
+ const res = await fetch<{success: boolean; href?: string}>(
+ 'dashboard/v1/events/intents/href',
+ data,
+ )
+
+ if (res.success) {
+ setHref(res.href)
+ }
+ } catch {
+ setHref(undefined)
+ }
+ }
+
+ fetchHref()
+ }, [data, fetch])
+
+ const onClick = useCallback(() => {
+ try {
+ const message: IntentMessage = {
+ type: 'dashboard/v1/events/intents/dispatch-intent',
+ data,
+ }
+
+ sendMessage(message.type, message.data)
+ } catch (error) {
+ // eslint-disable-next-line no-console
+ console.error('Failed to send intent:', error)
+ throw error
+ }
+ }, [data, sendMessage])
+
+ return {
+ href,
+ onClick,
+ }
+}
diff --git a/packages/react/src/hooks/dashboard/useManageFavorite.test.ts b/packages/react/src/hooks/dashboard/useManageFavorite.test.tsx
similarity index 71%
rename from packages/react/src/hooks/dashboard/useManageFavorite.test.ts
rename to packages/react/src/hooks/dashboard/useManageFavorite.test.tsx
index 3ce70b1b9..f346a34c7 100644
--- a/packages/react/src/hooks/dashboard/useManageFavorite.test.ts
+++ b/packages/react/src/hooks/dashboard/useManageFavorite.test.tsx
@@ -1,16 +1,11 @@
import {type Message} from '@sanity/comlink'
-import {
- type FavoriteStatusResponse,
- getFavoritesState,
- resolveFavoritesState,
- type SanityInstance,
-} from '@sanity/sdk'
+import {type FavoriteStatusResponse, getFavoritesState, resolveFavoritesState} from '@sanity/sdk'
+import {act, renderHook} from '@testing-library/react'
import {BehaviorSubject} from 'rxjs'
import {beforeEach, describe, expect, it, vi} from 'vitest'
-import {act, renderHook} from '../../../test/test-utils'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useWindowConnection, type WindowConnection} from '../comlink/useWindowConnection'
-import {useSanityInstance} from '../context/useSanityInstance'
import {useManageFavorite} from './useManageFavorite'
vi.mock(import('@sanity/sdk'), async (importOriginal) => {
@@ -22,8 +17,6 @@ vi.mock(import('@sanity/sdk'), async (importOriginal) => {
}
})
-vi.mock('../context/useSanityInstance')
-
vi.mock('../comlink/useWindowConnection', () => ({
useWindowConnection: vi.fn(),
}))
@@ -62,14 +55,6 @@ describe('useManageFavorite', () => {
return newValue
})
- // Default mock for useSanityInstance
- vi.mocked(useSanityInstance).mockReturnValue({
- config: {
- projectId: 'test',
- dataset: 'test',
- },
- } as unknown as SanityInstance)
-
// Mock useWindowConnection
mockFetch = vi.fn().mockResolvedValue({success: true})
mockSendMessage = vi.fn()
@@ -88,13 +73,25 @@ describe('useManageFavorite', () => {
})
it('should initialize with default states', () => {
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.isFavorited).toBe(false)
})
it('should handle favorite action and update state', async () => {
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.isFavorited).toBe(false)
@@ -123,7 +120,13 @@ describe('useManageFavorite', () => {
})
it('should handle unfavorite action and update state', async () => {
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
// Set initial state to favorited
await act(async () => {
@@ -158,7 +161,13 @@ describe('useManageFavorite', () => {
it('should not update state if favorite action fails', async () => {
mockFetch.mockResolvedValueOnce({success: false})
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.isFavorited).toBe(false)
@@ -178,7 +187,13 @@ describe('useManageFavorite', () => {
throw new Error(errorMessage)
})
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
await act(async () => {
await expect(result.current.favorite()).rejects.toThrow(errorMessage)
@@ -196,23 +211,21 @@ describe('useManageFavorite', () => {
})
it('should throw error when studio resource is missing projectId or dataset', () => {
- // Mock the Sanity instance to not have projectId or dataset
- vi.mocked(useSanityInstance).mockReturnValue({
- config: {
- projectId: undefined,
- dataset: undefined,
- },
- } as unknown as SanityInstance)
-
const mockDocumentHandleWithoutProjectId = {
documentId: 'mock-id',
documentType: 'mock-type',
resourceType: 'studio' as const,
}
- expect(() => renderHook(() => useManageFavorite(mockDocumentHandleWithoutProjectId))).toThrow(
- 'projectId and dataset are required for studio resources',
- )
+ expect(() =>
+ renderHook(() => useManageFavorite(mockDocumentHandleWithoutProjectId), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ }),
+ ).toThrow('projectId and dataset are required for studio resources')
})
it('should throw error when resourceId is missing for non-studio resources', () => {
@@ -223,9 +236,15 @@ describe('useManageFavorite', () => {
resourceId: undefined,
}
- expect(() => renderHook(() => useManageFavorite(mockMediaDocumentHandle))).toThrow(
- 'resourceId is required for media-library and canvas resources',
- )
+ expect(() =>
+ renderHook(() => useManageFavorite(mockMediaDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ }),
+ ).toThrow('resourceId is required for media-library and canvas resources')
})
it('should include schemaName in payload when provided', async () => {
@@ -233,7 +252,13 @@ describe('useManageFavorite', () => {
...mockDocumentHandle,
schemaName: 'testSchema',
}
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandleWithSchema))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandleWithSchema), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
await act(async () => {
await result.current.favorite()
@@ -246,7 +271,7 @@ describe('useManageFavorite', () => {
id: 'mock-id',
type: 'mock-type',
resource: {
- id: 'test.test',
+ id: 'test-project.test-dataset',
type: 'studio',
schemaName: 'testSchema',
},
@@ -268,7 +293,13 @@ describe('useManageFavorite', () => {
getCurrent: () => undefined,
observable: favoriteStatusSubject.asObservable(),
}))
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.isFavorited).toBe(false)
})
@@ -277,7 +308,13 @@ describe('useManageFavorite', () => {
fetch: undefined,
sendMessage: mockSendMessage,
} as unknown as WindowConnection)
- const {result} = renderHook(() => useManageFavorite(mockDocumentHandle))
+ const {result} = renderHook(() => useManageFavorite(mockDocumentHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
await act(async () => {
await result.current.favorite()
await result.current.unfavorite()
@@ -288,7 +325,13 @@ describe('useManageFavorite', () => {
it('should do nothing if documentId is missing', async () => {
const handle = {...mockDocumentHandle, documentId: undefined}
// @ts-expect-error -- no access to ManageFavorite props type
- const {result} = renderHook(() => useManageFavorite(handle))
+ const {result} = renderHook(() => useManageFavorite(handle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
await act(async () => {
await result.current.favorite()
await result.current.unfavorite()
@@ -299,7 +342,13 @@ describe('useManageFavorite', () => {
it('should do nothing if documentType is missing', async () => {
const handle = {...mockDocumentHandle, documentType: undefined}
// @ts-expect-error -- no access to ManageFavorite props type
- const {result} = renderHook(() => useManageFavorite(handle))
+ const {result} = renderHook(() => useManageFavorite(handle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
await act(async () => {
await result.current.favorite()
await result.current.unfavorite()
@@ -310,7 +359,13 @@ describe('useManageFavorite', () => {
it('should do nothing if resourceType is missing', async () => {
const handle = {...mockDocumentHandle, resourceType: undefined, resourceId: 'studio'}
// @ts-expect-error -- no access to ManageFavorite props type
- const {result} = renderHook(() => useManageFavorite(handle))
+ const {result} = renderHook(() => useManageFavorite(handle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
await act(async () => {
await result.current.favorite()
await result.current.unfavorite()
diff --git a/packages/react/src/hooks/dashboard/utils/getResourceIdFromDocumentHandle.test.ts b/packages/react/src/hooks/dashboard/utils/getResourceIdFromDocumentHandle.test.ts
new file mode 100644
index 000000000..94f5e9cc3
--- /dev/null
+++ b/packages/react/src/hooks/dashboard/utils/getResourceIdFromDocumentHandle.test.ts
@@ -0,0 +1,137 @@
+import {
+ datasetSource,
+ type DocumentHandle,
+ type DocumentSource,
+ mediaLibrarySource,
+} from '@sanity/sdk'
+import {describe, expect, it} from 'vitest'
+
+import {type DocumentHandleWithSource} from '../types'
+import {getResourceIdFromDocumentHandle} from './getResourceIdFromDocumentHandle'
+
+describe('getResourceIdFromDocumentHandle', () => {
+ describe('with traditional DocumentHandle (projectId/dataset)', () => {
+ it('should return resource ID from projectId and dataset', () => {
+ const documentHandle: DocumentHandle = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ projectId: 'test-project-id',
+ dataset: 'test-dataset',
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ expect(result).toEqual({
+ id: 'test-project-id.test-dataset',
+ type: undefined,
+ })
+ })
+ })
+
+ describe('with DocumentHandleWithSource - media library', () => {
+ it('should return media library ID and resourceType when media library source is provided', () => {
+ const documentHandle: DocumentHandleWithSource = {
+ documentId: 'test-asset-id',
+ documentType: 'sanity.asset',
+ source: mediaLibrarySource('mlPGY7BEqt52'),
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ expect(result).toEqual({
+ id: 'mlPGY7BEqt52',
+ type: 'mediaLibrary',
+ })
+ })
+
+ it('should prioritize source over projectId/dataset when both are provided', () => {
+ const documentHandle: DocumentHandleWithSource = {
+ documentId: 'test-asset-id',
+ documentType: 'sanity.asset',
+ projectId: 'test-project-id',
+ dataset: 'test-dataset',
+ source: mediaLibrarySource('mlPGY7BEqt52'),
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ expect(result).toEqual({
+ id: 'mlPGY7BEqt52',
+ type: 'mediaLibrary',
+ })
+ })
+ })
+
+ describe('with DocumentHandleWithSource - dataset source', () => {
+ it('should return dataset resource ID when dataset source is provided', () => {
+ const documentHandle: DocumentHandleWithSource = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ source: datasetSource('source-project-id', 'source-dataset'),
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ expect(result).toEqual({
+ id: 'source-project-id.source-dataset',
+ type: undefined,
+ })
+ })
+
+ it('should use dataset source over projectId/dataset when both are provided', () => {
+ const documentHandle: DocumentHandleWithSource = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ projectId: 'test-project-id',
+ dataset: 'test-dataset',
+ source: datasetSource('source-project-id', 'source-dataset'),
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ expect(result).toEqual({
+ id: 'source-project-id.source-dataset',
+ type: undefined,
+ })
+ })
+ })
+
+ describe('edge cases', () => {
+ it('should handle DocumentHandleWithSource with undefined source', () => {
+ const documentHandle: DocumentHandleWithSource = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ projectId: 'test-project-id',
+ dataset: 'test-dataset',
+ source: undefined,
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ expect(result).toEqual({
+ id: 'test-project-id.test-dataset',
+ type: undefined,
+ })
+ })
+
+ it('should fall back to projectId/dataset when source is not recognized', () => {
+ const documentHandle: DocumentHandleWithSource = {
+ documentId: 'test-document-id',
+ documentType: 'test-document-type',
+ projectId: 'test-project-id',
+ dataset: 'test-dataset',
+ source: {
+ __sanity_internal_sourceId: 'unknown-format',
+ } as unknown as DocumentSource,
+ }
+
+ const result = getResourceIdFromDocumentHandle(documentHandle)
+
+ // Falls back to projectId.dataset when source format is not recognized
+ expect(result).toEqual({
+ id: 'test-project-id.test-dataset',
+ type: undefined,
+ })
+ })
+ })
+})
diff --git a/packages/react/src/hooks/dashboard/utils/getResourceIdFromDocumentHandle.ts b/packages/react/src/hooks/dashboard/utils/getResourceIdFromDocumentHandle.ts
new file mode 100644
index 000000000..d1b899795
--- /dev/null
+++ b/packages/react/src/hooks/dashboard/utils/getResourceIdFromDocumentHandle.ts
@@ -0,0 +1,53 @@
+import {type DocumentHandle, type DocumentSource} from '@sanity/sdk'
+
+import {type DocumentHandleWithSource} from '../types'
+
+// Internal constant for accessing source ID
+const SOURCE_ID = '__sanity_internal_sourceId' as const
+
+interface DashboardMessageResource {
+ id: string
+ type?: 'media-library' | 'canvas'
+}
+
+const isDocumentHandleWithSource = (
+ documentHandle: DocumentHandle | DocumentHandleWithSource,
+): documentHandle is DocumentHandleWithSource => {
+ return 'source' in documentHandle
+}
+
+/** Currently only used for dispatching intents to the dashboard,
+ * but could easily be extended to other dashboard hooks
+ * @beta
+ */
+export function getResourceIdFromDocumentHandle(
+ documentHandle: DocumentHandle | DocumentHandleWithSource,
+): DashboardMessageResource {
+ let source: DocumentSource | undefined
+
+ const {projectId, dataset} = documentHandle
+ if (isDocumentHandleWithSource(documentHandle)) {
+ source = documentHandle.source
+ }
+ let resourceId: string = projectId + '.' + dataset
+ let resourceType: 'media-library' | 'canvas' | undefined
+
+ if (source) {
+ const sourceId = (source as Record)[SOURCE_ID]
+ if (Array.isArray(sourceId)) {
+ if (sourceId[0] === 'media-library' || sourceId[0] === 'canvas') {
+ resourceId = sourceId[1] as string
+ resourceType = sourceId[0] as 'media-library' | 'canvas'
+ }
+ } else if (sourceId && typeof sourceId === 'object' && 'projectId' in sourceId) {
+ const datasetSource = sourceId as {projectId: string; dataset: string}
+ // don't create type since it's ambiguous for project / dataset docs
+ resourceId = `${datasetSource.projectId}.${datasetSource.dataset}`
+ }
+ }
+
+ return {
+ id: resourceId,
+ type: resourceType,
+ }
+}
diff --git a/packages/react/src/hooks/document/useDocument.test.ts b/packages/react/src/hooks/document/useDocument.test.tsx
similarity index 77%
rename from packages/react/src/hooks/document/useDocument.test.ts
rename to packages/react/src/hooks/document/useDocument.test.tsx
index e7ba6c910..7160c50d7 100644
--- a/packages/react/src/hooks/document/useDocument.test.ts
+++ b/packages/react/src/hooks/document/useDocument.test.tsx
@@ -1,16 +1,11 @@
// tests/useDocument.test.ts
-import {
- createSanityInstance,
- getDocumentState,
- resolveDocument,
- type StateSource,
-} from '@sanity/sdk'
+import {getDocumentState, resolveDocument, type StateSource} from '@sanity/sdk'
import {type SanityDocument} from '@sanity/types'
import {renderHook} from '@testing-library/react'
import {type SchemaOrigin} from 'groq'
import {beforeEach, describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useDocument} from './useDocument'
vi.mock('@sanity/sdk', async (importOriginal) => {
@@ -18,10 +13,6 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
return {...original, getDocumentState: vi.fn(), resolveDocument: vi.fn()}
})
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
// Define a single generic TestDocument type
type UseDocumentTestType = SchemaOrigin<
SanityDocument & {
@@ -56,8 +47,6 @@ declare module 'groq' {
}
}
-// Create a fake instance to be returned by useSanityInstance.
-const instance = createSanityInstance({projectId: 'p', dataset: 'd'})
const book: SanityDocument = {
_id: 'doc1',
foo: 'bar',
@@ -70,7 +59,6 @@ const book: SanityDocument = {
describe('useDocument hook', () => {
beforeEach(() => {
vi.resetAllMocks()
- vi.mocked(useSanityInstance).mockReturnValue(instance)
})
it('returns the current document when ready (without a path)', () => {
@@ -81,7 +69,13 @@ describe('useDocument hook', () => {
subscribe,
} as unknown as StateSource)
- const {result} = renderHook(() => useDocument({documentId: 'doc1', documentType: 'book'}))
+ const {result} = renderHook(() => useDocument({documentId: 'doc1', documentType: 'book'}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.data).toEqual(book)
expect(getCurrent).toHaveBeenCalled()
@@ -102,13 +96,22 @@ describe('useDocument hook', () => {
vi.mocked(resolveDocument).mockReturnValue(resolveDocPromise)
// Render the hook and capture the thrown promise.
- const {result} = renderHook(() => {
- try {
- return useDocument({documentId: 'doc1', documentType: 'book'})
- } catch (e) {
- return e
- }
- })
+ const {result} = renderHook(
+ () => {
+ try {
+ return useDocument({documentId: 'doc1', documentType: 'book'})
+ } catch (e) {
+ return e
+ }
+ },
+ {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ },
+ )
// When the document is not ready, the hook throws the promise from resolveDocument.
expect(result.current).toBe(resolveDocPromise)
diff --git a/packages/react/src/hooks/document/useDocumentEvent.test.ts b/packages/react/src/hooks/document/useDocumentEvent.test.tsx
similarity index 72%
rename from packages/react/src/hooks/document/useDocumentEvent.test.ts
rename to packages/react/src/hooks/document/useDocumentEvent.test.tsx
index e933b9a53..e0848b526 100644
--- a/packages/react/src/hooks/document/useDocumentEvent.test.ts
+++ b/packages/react/src/hooks/document/useDocumentEvent.test.tsx
@@ -1,14 +1,9 @@
// tests/useDocumentEvent.test.ts
-import {
- createSanityInstance,
- type DocumentEvent,
- type DocumentHandle,
- subscribeDocumentEvents,
-} from '@sanity/sdk'
+import {type DocumentEvent, type DocumentHandle, subscribeDocumentEvents} from '@sanity/sdk'
import {renderHook} from '@testing-library/react'
import {beforeEach, describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useDocumentEvent} from './useDocumentEvent'
vi.mock('@sanity/sdk', async (importOriginal) => {
@@ -16,11 +11,6 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
return {...original, subscribeDocumentEvents: vi.fn()}
})
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
-const instance = createSanityInstance({projectId: 'p', dataset: 'd'})
const docHandle: DocumentHandle = {
documentId: 'doc1',
documentType: 'book',
@@ -29,7 +19,6 @@ const docHandle: DocumentHandle = {
describe('useDocumentEvent hook', () => {
beforeEach(() => {
vi.resetAllMocks()
- vi.mocked(useSanityInstance).mockReturnValue(instance)
})
it('calls subscribeDocumentEvents with instance and a stable handler', () => {
@@ -37,10 +26,16 @@ describe('useDocumentEvent hook', () => {
const unsubscribe = vi.fn()
vi.mocked(subscribeDocumentEvents).mockReturnValue(unsubscribe)
- renderHook(() => useDocumentEvent({...docHandle, onEvent: handleEvent}))
+ renderHook(() => useDocumentEvent({...docHandle, onEvent: handleEvent}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(vi.mocked(subscribeDocumentEvents)).toHaveBeenCalledTimes(1)
- expect(vi.mocked(subscribeDocumentEvents).mock.calls[0][0]).toBe(instance)
+ expect(vi.mocked(subscribeDocumentEvents).mock.calls[0][0]).toEqual(expect.any(Object))
const stableHandler = vi.mocked(subscribeDocumentEvents).mock.calls[0][1]
expect(typeof stableHandler).toBe('function')
@@ -55,7 +50,13 @@ describe('useDocumentEvent hook', () => {
const unsubscribe = vi.fn()
vi.mocked(subscribeDocumentEvents).mockReturnValue(unsubscribe)
- const {unmount} = renderHook(() => useDocumentEvent({...docHandle, onEvent: handleEvent}))
+ const {unmount} = renderHook(() => useDocumentEvent({...docHandle, onEvent: handleEvent}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
unmount()
expect(unsubscribe).toHaveBeenCalledTimes(1)
})
diff --git a/packages/react/src/hooks/document/useDocumentPermissions.test.ts b/packages/react/src/hooks/document/useDocumentPermissions.test.tsx
similarity index 62%
rename from packages/react/src/hooks/document/useDocumentPermissions.test.ts
rename to packages/react/src/hooks/document/useDocumentPermissions.test.tsx
index 380404011..72a1928e0 100644
--- a/packages/react/src/hooks/document/useDocumentPermissions.test.ts
+++ b/packages/react/src/hooks/document/useDocumentPermissions.test.tsx
@@ -1,24 +1,18 @@
-import {
- type DocumentAction,
- type DocumentPermissionsResult,
- getPermissionsState,
- type SanityInstance,
-} from '@sanity/sdk'
+import {type DocumentAction, type DocumentPermissionsResult, getPermissionsState} from '@sanity/sdk'
import {act, renderHook, waitFor} from '@testing-library/react'
import {BehaviorSubject, firstValueFrom} from 'rxjs'
import {afterEach, beforeEach, describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useDocumentPermissions} from './useDocumentPermissions'
-// Mock dependencies before any imports
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
-vi.mock('@sanity/sdk', () => ({
- getPermissionsState: vi.fn(),
-}))
+vi.mock('@sanity/sdk', async (importActual) => {
+ const actual = await importActual()
+ return {
+ ...actual,
+ getPermissionsState: vi.fn(),
+ }
+})
// Move this mock to the top level
vi.mock('rxjs', async (importOriginal) => {
@@ -30,7 +24,6 @@ vi.mock('rxjs', async (importOriginal) => {
})
describe('usePermissions', () => {
- const mockInstance = {id: 'mock-instance'} as unknown as SanityInstance
const mockAction: DocumentAction = {
type: 'document.publish',
documentId: 'doc1',
@@ -59,8 +52,6 @@ describe('usePermissions', () => {
beforeEach(() => {
vi.clearAllMocks()
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
// Create a subject to simulate permissions state updates
permissionsSubject = new BehaviorSubject(
mockPermissionAllowed,
@@ -93,13 +84,20 @@ describe('usePermissions', () => {
permissionsSubject.next(mockPermissionAllowed)
})
- const {result} = renderHook(() => useDocumentPermissions(mockAction))
-
- expect(useSanityInstance).toHaveBeenCalledWith({
- projectId: mockAction.projectId,
- dataset: mockAction.dataset,
+ const {result} = renderHook(() => useDocumentPermissions(mockAction), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
})
- expect(getPermissionsState).toHaveBeenCalledWith(mockInstance, mockAction)
+
+ // ResourceProvider handles the instance configuration
+ expect(getPermissionsState).toHaveBeenCalledWith(expect.any(Object), mockAction)
expect(result.current).toEqual(mockPermissionAllowed)
})
@@ -109,7 +107,17 @@ describe('usePermissions', () => {
permissionsSubject.next(mockPermissionDenied)
})
- const {result} = renderHook(() => useDocumentPermissions(mockAction))
+ const {result} = renderHook(() => useDocumentPermissions(mockAction), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current).toEqual(mockPermissionDenied)
expect(result.current.allowed).toBe(false)
@@ -120,9 +128,19 @@ describe('usePermissions', () => {
it('should accept an array of actions', () => {
const actions = [mockAction, {...mockAction, documentId: 'doc2'}]
- renderHook(() => useDocumentPermissions(actions))
+ renderHook(() => useDocumentPermissions(actions), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
- expect(getPermissionsState).toHaveBeenCalledWith(mockInstance, actions)
+ expect(getPermissionsState).toHaveBeenCalledWith(expect.any(Object), actions)
})
it('should throw an error if actions have mismatched project IDs', () => {
@@ -132,7 +150,17 @@ describe('usePermissions', () => {
]
expect(() => {
- renderHook(() => useDocumentPermissions(actions))
+ renderHook(() => useDocumentPermissions(actions), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
}).toThrow(/Mismatched project IDs found in actions/)
})
@@ -140,7 +168,17 @@ describe('usePermissions', () => {
const actions = [mockAction, {...mockAction, dataset: 'different-dataset', documentId: 'doc2'}]
expect(() => {
- renderHook(() => useDocumentPermissions(actions))
+ renderHook(() => useDocumentPermissions(actions), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
}).toThrow(/Mismatched datasets found in actions/)
})
@@ -155,16 +193,29 @@ describe('usePermissions', () => {
vi.mocked(firstValueFrom).mockReturnValueOnce(mockPromise)
// This should throw the promise and suspend
- const {result} = renderHook(() => {
- try {
- return useDocumentPermissions(mockAction)
- } catch (error) {
- if (error instanceof Promise) {
- return 'suspended'
+ const {result} = renderHook(
+ () => {
+ try {
+ return useDocumentPermissions(mockAction)
+ } catch (error) {
+ if (error instanceof Promise) {
+ return 'suspended'
+ }
+ throw error
}
- throw error
- }
- })
+ },
+ {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ },
+ )
expect(result.current).toBe('suspended')
@@ -175,7 +226,7 @@ describe('usePermissions', () => {
// Now it should render properly
await waitFor(() => {
- expect(getPermissionsState).toHaveBeenCalledWith(mockInstance, mockAction)
+ expect(getPermissionsState).toHaveBeenCalledWith(expect.any(Object), mockAction)
})
})
@@ -185,7 +236,17 @@ describe('usePermissions', () => {
permissionsSubject.next(mockPermissionAllowed)
})
- const {result, rerender} = renderHook(() => useDocumentPermissions(mockAction))
+ const {result, rerender} = renderHook(() => useDocumentPermissions(mockAction), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current).toEqual(mockPermissionAllowed)
diff --git a/packages/react/src/hooks/document/useEditDocument.test.ts b/packages/react/src/hooks/document/useEditDocument.test.tsx
similarity index 81%
rename from packages/react/src/hooks/document/useEditDocument.test.ts
rename to packages/react/src/hooks/document/useEditDocument.test.tsx
index d042c321c..24e605a30 100644
--- a/packages/react/src/hooks/document/useEditDocument.test.ts
+++ b/packages/react/src/hooks/document/useEditDocument.test.tsx
@@ -1,7 +1,6 @@
// tests/useEditDocument.test.ts
import {
createDocumentHandle,
- createSanityInstance,
editDocument,
getDocumentState,
resolveDocument,
@@ -11,7 +10,7 @@ import {type SanityDocument} from '@sanity/types'
import {renderHook} from '@testing-library/react'
import {beforeEach, describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useApplyDocumentActions} from './useApplyDocumentActions'
import {useEditDocument} from './useEditDocument'
@@ -25,17 +24,10 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
}
})
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
vi.mock('./useApplyDocumentActions', () => ({
useApplyDocumentActions: vi.fn(),
}))
-// Create a fake instance to be returned by useSanityInstance.
-const instance = createSanityInstance({projectId: 'p', dataset: 'd'})
-
const doc = {
_id: 'doc1',
foo: 'bar',
@@ -71,7 +63,6 @@ declare module 'groq' {
describe('useEditDocument hook', () => {
beforeEach(() => {
vi.clearAllMocks()
- vi.mocked(useSanityInstance).mockReturnValue(instance)
})
it('applies a single edit action for the given path', async () => {
@@ -85,7 +76,13 @@ describe('useEditDocument hook', () => {
const apply = vi.fn().mockResolvedValue({transactionId: 'tx1'})
vi.mocked(useApplyDocumentActions).mockReturnValue(apply)
- const {result} = renderHook(() => useEditDocument({...docHandle, path: 'foo'}))
+ const {result} = renderHook(() => useEditDocument({...docHandle, path: 'foo'}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
const promise = result.current('newValue')
expect(editDocument).toHaveBeenCalledWith(docHandle, {set: {foo: 'newValue'}})
expect(apply).toHaveBeenCalledWith(editDocument(docHandle, {set: {foo: 'newValue'}}))
@@ -106,7 +103,13 @@ describe('useEditDocument hook', () => {
const apply = vi.fn().mockResolvedValue({transactionId: 'tx2'})
vi.mocked(useApplyDocumentActions).mockReturnValue(apply)
- const {result} = renderHook(() => useEditDocument(docHandle))
+ const {result} = renderHook(() => useEditDocument(docHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
const promise = result.current({...doc, foo: 'baz', extra: 'old', _id: 'doc1'})
expect(apply).toHaveBeenCalledWith([editDocument(docHandle, {set: {foo: 'baz'}})])
const actionsResult = await promise
@@ -124,7 +127,13 @@ describe('useEditDocument hook', () => {
const apply = vi.fn().mockResolvedValue({transactionId: 'tx3'})
vi.mocked(useApplyDocumentActions).mockReturnValue(apply)
- const {result} = renderHook(() => useEditDocument({...docHandle, path: 'foo'}))
+ const {result} = renderHook(() => useEditDocument({...docHandle, path: 'foo'}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
const promise = result.current((prev: unknown) => `${prev}Updated`) // 'bar' becomes 'barUpdated'
expect(editDocument).toHaveBeenCalledWith(docHandle, {set: {foo: 'barUpdated'}})
expect(apply).toHaveBeenCalledWith(editDocument(docHandle, {set: {foo: 'barUpdated'}}))
@@ -144,7 +153,13 @@ describe('useEditDocument hook', () => {
const apply = vi.fn().mockResolvedValue({transactionId: 'tx4'})
vi.mocked(useApplyDocumentActions).mockReturnValue(apply)
- const {result} = renderHook(() => useEditDocument(docHandle))
+ const {result} = renderHook(() => useEditDocument(docHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
const promise = result.current((prevDoc) => ({...prevDoc, foo: 'baz'}))
expect(apply).toHaveBeenCalledWith([editDocument(docHandle, {set: {foo: 'baz'}})])
const actionsResult = await promise
@@ -162,7 +177,13 @@ describe('useEditDocument hook', () => {
const fakeApply = vi.fn()
vi.mocked(useApplyDocumentActions).mockReturnValue(fakeApply)
- const {result} = renderHook(() => useEditDocument(docHandle))
+ const {result} = renderHook(() => useEditDocument(docHandle), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(() => result.current('notAnObject' as unknown as Book)).toThrowError(
'No path was provided to `useEditDocument` and the value provided was not a document object.',
)
@@ -182,13 +203,22 @@ describe('useEditDocument hook', () => {
vi.mocked(resolveDocument).mockReturnValue(resolveDocPromise)
// Render the hook and capture the thrown promise.
- const {result} = renderHook(() => {
- try {
- return useEditDocument(docHandle)
- } catch (e) {
- return e
- }
- })
+ const {result} = renderHook(
+ () => {
+ try {
+ return useEditDocument(docHandle)
+ } catch (e) {
+ return e
+ }
+ },
+ {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ },
+ )
// When the document is not ready, the hook throws the promise from resolveDocument.
expect(result.current).toBe(resolveDocPromise)
diff --git a/packages/react/src/hooks/documents/useDocuments.test.tsx b/packages/react/src/hooks/documents/useDocuments.test.tsx
index 73e51972d..7b6167dff 100644
--- a/packages/react/src/hooks/documents/useDocuments.test.tsx
+++ b/packages/react/src/hooks/documents/useDocuments.test.tsx
@@ -1,14 +1,12 @@
-import {type SanityInstance} from '@sanity/sdk'
import {act, renderHook} from '@testing-library/react'
import {evaluateSync, parse, toJS} from 'groq-js'
import {describe, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useQuery} from '../query/useQuery'
import {useDocuments} from './useDocuments'
vi.mock('../query/useQuery')
-vi.mock('../context/useSanityInstance')
describe('useDocuments', () => {
beforeEach(() => {
@@ -75,18 +73,29 @@ describe('useDocuments', () => {
isPending: false,
}
})
- vi.mocked(useSanityInstance).mockReturnValue({config: {}} as SanityInstance)
})
it('should respect custom page size', () => {
const customBatchSize = 2
- const {result} = renderHook(() => useDocuments({batchSize: customBatchSize}))
+ const {result} = renderHook(() => useDocuments({batchSize: customBatchSize}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.data.length).toBe(customBatchSize)
})
it('should filter by document type', () => {
- const {result} = renderHook(() => useDocuments({filter: '_type == "movie"'}))
+ const {result} = renderHook(() => useDocuments({filter: '_type == "movie"'}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.data.every((doc) => doc.documentType === 'movie')).toBe(true)
expect(result.current.count).toBe(5) // 5 movies in the dataset
@@ -94,18 +103,32 @@ describe('useDocuments', () => {
// groq-js doesn't support search filters yet
it.skip('should apply search filter', () => {
- const {result} = renderHook(() => useDocuments({search: 'inter'}))
+ const {result} = renderHook(() => useDocuments({search: 'inter'}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
// Should match "Interstellar"
expect(result.current.data.some((doc) => doc.documentId === 'movie3')).toBe(true)
})
it('should apply ordering', () => {
- const {result} = renderHook(() =>
- useDocuments({
- filter: '_type == "movie"',
- orderings: [{field: 'releaseYear', direction: 'desc'}],
- }),
+ const {result} = renderHook(
+ () =>
+ useDocuments({
+ filter: '_type == "movie"',
+ orderings: [{field: 'releaseYear', direction: 'desc'}],
+ }),
+ {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ },
)
// First item should be the most recent movie (Interstellar, 2014)
@@ -114,7 +137,13 @@ describe('useDocuments', () => {
it('should load more data when loadMore is called', () => {
const batchSize = 2
- const {result} = renderHook(() => useDocuments({batchSize: batchSize}))
+ const {result} = renderHook(() => useDocuments({batchSize: batchSize}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.data.length).toBe(batchSize)
@@ -126,7 +155,13 @@ describe('useDocuments', () => {
})
it('should indicate when there is more data to load', () => {
- const {result} = renderHook(() => useDocuments({batchSize: 3}))
+ const {result} = renderHook(() => useDocuments({batchSize: 3}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
expect(result.current.hasMore).toBe(true)
// Load all remaining data
act(() => {
@@ -139,6 +174,11 @@ describe('useDocuments', () => {
it('should reset limit when filter changes', () => {
const {result, rerender} = renderHook((props) => useDocuments(props), {
initialProps: {batchSize: 2, filter: ''},
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
})
// Initially, data length equals pageSize (2)
expect(result.current.data.length).toBe(2)
@@ -155,15 +195,13 @@ describe('useDocuments', () => {
})
it('should add projectId and dataset to document handles', () => {
- // Update the mock to include specific projectId and dataset
- vi.mocked(useSanityInstance).mockReturnValue({
- config: {
- projectId: 'test-project',
- dataset: 'test-dataset',
- },
- } as SanityInstance)
-
- const {result} = renderHook(() => useDocuments({}))
+ const {result} = renderHook(() => useDocuments({}), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
// Check that the first document handle has the projectId and dataset
expect(result.current.data[0].projectId).toBe('test-project')
diff --git a/packages/react/src/hooks/errors/useCorsOriginError.ts b/packages/react/src/hooks/errors/useCorsOriginError.ts
deleted file mode 100644
index 93397a99d..000000000
--- a/packages/react/src/hooks/errors/useCorsOriginError.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import {CorsOriginError} from '@sanity/client'
-import {clearQueryError, getCorsErrorProjectId, getQueryErrorState} from '@sanity/sdk'
-import {useCallback, useMemo, useSyncExternalStore} from 'react'
-
-import {useSanityInstance} from '../context/useSanityInstance'
-
-export function useCorsOriginError(): {
- error: Error | null
- projectId: string | null
- clear: () => void
-} {
- const instance = useSanityInstance()
- const {getCurrent, subscribe} = useMemo(() => getQueryErrorState(instance), [instance])
- const error = useSyncExternalStore(subscribe, getCurrent)
- const clear = useCallback(() => clearQueryError(instance), [instance])
- const value = useMemo(() => {
- if (!(error instanceof CorsOriginError)) return {error: null, projectId: null}
-
- return {error: error as unknown as Error, projectId: getCorsErrorProjectId(error)}
- }, [error])
- return useMemo(() => ({...value, clear}), [value, clear])
-}
diff --git a/packages/react/src/hooks/helpers/createCallbackHook.test.tsx b/packages/react/src/hooks/helpers/createCallbackHook.test.tsx
index b49271feb..ef02dcb1f 100644
--- a/packages/react/src/hooks/helpers/createCallbackHook.test.tsx
+++ b/packages/react/src/hooks/helpers/createCallbackHook.test.tsx
@@ -1,15 +1,10 @@
-import {createSanityInstance, type SanityInstance} from '@sanity/sdk'
+import {type SanityInstance} from '@sanity/sdk'
import {renderHook} from '@testing-library/react'
import {describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {createCallbackHook} from './createCallbackHook'
-// Mock the useSanityInstance hook
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
describe('createCallbackHook', () => {
// Reset all mocks before each test
beforeEach(() => {
@@ -17,12 +12,6 @@ describe('createCallbackHook', () => {
})
it('should create a hook that provides a memoized callback', () => {
- // Create a mock Sanity instance
- const mockInstance = createSanityInstance({projectId: 'p', dataset: 'd'})
-
- // Mock the useSanityInstance to return our mock instance
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
// Create a test callback function
const testCallback = (instance: object, param1: string, param2: number) => {
return `${param1}-${param2}-${instance ? 'valid' : 'invalid'}`
@@ -32,7 +21,13 @@ describe('createCallbackHook', () => {
const useTestHook = createCallbackHook(testCallback)
// Render the hook
- const {result, rerender} = renderHook(() => useTestHook())
+ const {result, rerender} = renderHook(() => useTestHook(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
// Test the callback with parameters
const result1 = result.current('test', 123)
@@ -48,38 +43,41 @@ describe('createCallbackHook', () => {
})
it('should create new callback when instance changes', () => {
- // Create two different mock instances
- const mockInstance1 = createSanityInstance({projectId: 'p1', dataset: 'd'})
- const mockInstance2 = createSanityInstance({projectId: 'p2', dataset: 'd'})
-
- vi.mocked(useSanityInstance).mockReturnValueOnce(mockInstance1)
-
// Create a test callback
const testCallback = (instance: SanityInstance) => instance.config.projectId
- // Create and render our hook
+ // Create and render our hook with first provider
const useTestHook = createCallbackHook(testCallback)
- const {result, rerender} = renderHook(() => useTestHook())
+ const {result, unmount} = renderHook(() => useTestHook(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
- // Store the first callback reference
+ // Store the first callback reference and result
const firstCallback = result.current
+ const firstResult = firstCallback()
+ expect(firstResult).toBe('p1')
+
+ unmount()
+
+ // Re-render with different provider configuration
+ const {result: result2} = renderHook(() => useTestHook(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
- // Change the instance
- vi.mocked(useSanityInstance).mockReturnValueOnce(mockInstance2)
- rerender()
-
- // Verify the callback reference changed
- expect(result.current).not.toBe(firstCallback)
-
- // Verify the callbacks return different results
- expect(firstCallback()).toBe('p1')
- expect(result.current()).toBe('p2')
+ // Verify the callback reference changed and returns different result
+ expect(result2.current).not.toBe(firstCallback)
+ expect(result2.current()).toBe('p2')
})
it('should handle callbacks with multiple parameters', () => {
- const mockInstance = createSanityInstance({projectId: 'p', dataset: 'd'})
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
// Create a callback with multiple parameters
const testCallback = (
instance: SanityInstance,
@@ -93,7 +91,13 @@ describe('createCallbackHook', () => {
})
const useTestHook = createCallbackHook(testCallback)
- const {result} = renderHook(() => useTestHook())
+ const {result} = renderHook(() => useTestHook(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
const response = result.current('/users', 'POST', {name: 'Test User'})
diff --git a/packages/react/src/hooks/presence/usePresence.test.tsx b/packages/react/src/hooks/presence/usePresence.test.tsx
index f0db8270a..02e577df4 100644
--- a/packages/react/src/hooks/presence/usePresence.test.tsx
+++ b/packages/react/src/hooks/presence/usePresence.test.tsx
@@ -1,8 +1,9 @@
import {getPresence, type SanityUser, type UserPresence} from '@sanity/sdk'
+import {act, renderHook} from '@testing-library/react'
import {NEVER} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
-import {act, renderHook} from '../../../test/test-utils'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {usePresence} from './usePresence'
vi.mock('@sanity/sdk', () => ({
@@ -14,10 +15,6 @@ vi.mock('@sanity/sdk', () => ({
})),
}))
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(() => ({config: {projectId: 'test', dataset: 'test'}})),
-}))
-
describe('usePresence', () => {
it('should return presence locations and update when the store changes', () => {
const initialLocations: UserPresence[] = [
@@ -60,7 +57,13 @@ describe('usePresence', () => {
}
vi.mocked(getPresence).mockReturnValue(mockPresenceSource)
- const {result, unmount} = renderHook(() => usePresence())
+ const {result, unmount} = renderHook(() => usePresence(), {
+ wrapper: ({children}) => (
+
+ {children}
+
+ ),
+ })
// Initial state should be correct
expect(result.current.locations).toEqual(initialLocations)
diff --git a/packages/react/src/hooks/preview/useDocumentPreview.test.tsx b/packages/react/src/hooks/preview/useDocumentPreview.test.tsx
index 4b4a002eb..12f3460fa 100644
--- a/packages/react/src/hooks/preview/useDocumentPreview.test.tsx
+++ b/packages/react/src/hooks/preview/useDocumentPreview.test.tsx
@@ -1,8 +1,9 @@
import {type DocumentHandle, getPreviewState, type PreviewValue, resolvePreview} from '@sanity/sdk'
import {act, render, screen} from '@testing-library/react'
-import {Suspense, useRef} from 'react'
+import {useRef} from 'react'
import {type Mock} from 'vitest'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useDocumentPreview} from './useDocumentPreview'
// Mock IntersectionObserver
@@ -24,20 +25,18 @@ beforeAll(() => {
})
// Mock the preview store
-vi.mock('@sanity/sdk', () => {
+vi.mock('@sanity/sdk', async (importOriginal) => {
+ const actual = await importOriginal()
const getCurrent = vi.fn()
const subscribe = vi.fn()
return {
+ ...actual,
resolvePreview: vi.fn(),
getPreviewState: vi.fn().mockReturnValue({getCurrent, subscribe}),
}
})
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: () => ({}),
-}))
-
const mockDocument: DocumentHandle = {
documentId: 'doc1',
documentType: 'exampleType',
@@ -82,9 +81,9 @@ describe('useDocumentPreview', () => {
subscribe.mockImplementation(() => eventsUnsubscribe)
render(
- Loading... }>
+ Loading...}>
- ,
+ ,
)
// Initially, element is not intersecting
@@ -127,9 +126,9 @@ describe('useDocumentPreview', () => {
})
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
expect(screen.getByText('Loading...')).toBeInTheDocument()
@@ -162,9 +161,9 @@ describe('useDocumentPreview', () => {
subscribe.mockImplementation(() => vi.fn())
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
expect(screen.getByText('Fallback Title')).toBeInTheDocument()
@@ -192,9 +191,9 @@ describe('useDocumentPreview', () => {
}
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Should subscribe immediately without waiting for intersection
@@ -222,9 +221,9 @@ describe('useDocumentPreview', () => {
}
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Should subscribe immediately without waiting for intersection
diff --git a/packages/react/src/hooks/projection/useDocumentProjection.test.tsx b/packages/react/src/hooks/projection/useDocumentProjection.test.tsx
index 0e529f19a..a61fb34cc 100644
--- a/packages/react/src/hooks/projection/useDocumentProjection.test.tsx
+++ b/packages/react/src/hooks/projection/useDocumentProjection.test.tsx
@@ -1,8 +1,9 @@
import {type DocumentHandle, getProjectionState, resolveProjection} from '@sanity/sdk'
import {act, render, screen} from '@testing-library/react'
-import {Suspense, useRef} from 'react'
+import {useRef} from 'react'
import {type Mock} from 'vitest'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useDocumentProjection} from './useDocumentProjection'
// Mock IntersectionObserver
@@ -24,20 +25,18 @@ beforeAll(() => {
})
// Mock the projection store
-vi.mock('@sanity/sdk', () => {
+vi.mock('@sanity/sdk', async (importOriginal) => {
+ const actual = await importOriginal()
const getCurrent = vi.fn()
const subscribe = vi.fn()
return {
+ ...actual,
resolveProjection: vi.fn(),
getProjectionState: vi.fn().mockReturnValue({getCurrent, subscribe}),
}
})
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: () => ({}),
-}))
-
const mockDocument: DocumentHandle = {
documentId: 'doc1',
documentType: 'exampleType',
@@ -87,9 +86,9 @@ describe('useDocumentProjection', () => {
subscribe.mockImplementation(() => eventsUnsubscribe)
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Initially, element is not intersecting
@@ -137,9 +136,9 @@ describe('useDocumentProjection', () => {
subscribe.mockReturnValue(() => {})
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
await act(async () => {
@@ -164,9 +163,9 @@ describe('useDocumentProjection', () => {
subscribe.mockImplementation(() => vi.fn())
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
expect(screen.getByText('Fallback Title')).toBeInTheDocument()
@@ -184,9 +183,9 @@ describe('useDocumentProjection', () => {
subscribe.mockImplementation(() => eventsUnsubscribe)
const {rerender} = render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Change projection
@@ -196,9 +195,9 @@ describe('useDocumentProjection', () => {
})
rerender(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
expect(screen.getByText('Updated Title')).toBeInTheDocument()
@@ -224,9 +223,9 @@ describe('useDocumentProjection', () => {
}
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Should subscribe immediately without waiting for intersection
@@ -257,9 +256,9 @@ describe('useDocumentProjection', () => {
}
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Should subscribe immediately without waiting for intersection
diff --git a/packages/react/src/hooks/query/useQuery.test.tsx b/packages/react/src/hooks/query/useQuery.test.tsx
index 21a2b2d1c..09e4f6407 100644
--- a/packages/react/src/hooks/query/useQuery.test.tsx
+++ b/packages/react/src/hooks/query/useQuery.test.tsx
@@ -1,9 +1,10 @@
import {getQueryState, resolveQuery, type StateSource} from '@sanity/sdk'
import {act, render, screen} from '@testing-library/react'
-import {Suspense, useState} from 'react'
+import {useState} from 'react'
import {type Observable, Subject} from 'rxjs'
import {beforeEach, describe, expect, it, vi} from 'vitest'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useQuery} from './useQuery'
// Mock the functions from '@sanity/sdk'
@@ -16,11 +17,6 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
}
})
-// Mock the Sanity instance hook to return a dummy instance
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn().mockReturnValue({}),
-}))
-
describe('useQuery', () => {
beforeEach(() => {
vi.resetAllMocks()
@@ -45,7 +41,11 @@ describe('useQuery', () => {
)
}
- render( )
+ render(
+ Loading...
}>
+
+ ,
+ )
// Verify that the output contains the data and that isPending is false
expect(screen.getByTestId('output').textContent).toContain('test data')
@@ -87,9 +87,13 @@ describe('useQuery', () => {
}
render(
- Loading...}>
+ Loading...}
+ >
- ,
+ ,
)
// Initially, since storeValue is undefined, the component should suspend and fallback is shown
@@ -159,7 +163,11 @@ describe('useQuery', () => {
)
}
- render( )
+ render(
+ Loading...}>
+
+ ,
+ )
// Initially, should show data1 and not pending
expect(screen.getByTestId('output').textContent).toContain('data1')
diff --git a/packages/react/src/hooks/releases/useActiveReleases.test.tsx b/packages/react/src/hooks/releases/useActiveReleases.test.tsx
index 907c64de8..c2ff0ec7e 100644
--- a/packages/react/src/hooks/releases/useActiveReleases.test.tsx
+++ b/packages/react/src/hooks/releases/useActiveReleases.test.tsx
@@ -1,16 +1,11 @@
-import {getActiveReleasesState, type ReleaseDocument, type SanityInstance} from '@sanity/sdk'
+import {getActiveReleasesState, type ReleaseDocument} from '@sanity/sdk'
import {renderHook} from '@testing-library/react'
import {BehaviorSubject} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useActiveReleases} from './useActiveReleases'
-// Mock the useSanityInstance hook
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
// Mock the getActiveReleasesState function
vi.mock('@sanity/sdk', async () => {
const actual = await vi.importActual('@sanity/sdk')
@@ -26,9 +21,6 @@ describe('useActiveReleases', () => {
})
it('should suspend when initial state is undefined', () => {
- const mockInstance = {} as SanityInstance
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
const mockSubject = new BehaviorSubject(undefined)
const mockStateSource = {
subscribe: vi.fn((callback) => {
@@ -41,13 +33,22 @@ describe('useActiveReleases', () => {
vi.mocked(getActiveReleasesState).mockReturnValue(mockStateSource)
- const {result} = renderHook(() => {
- try {
- return useActiveReleases()
- } catch (e) {
- return e
- }
- })
+ const {result} = renderHook(
+ () => {
+ try {
+ return useActiveReleases()
+ } catch (e) {
+ return e
+ }
+ },
+ {
+ wrapper: ({children}) => (
+ Loading...}>
+ {children}
+
+ ),
+ },
+ )
// Verify that the hook threw a promise (suspended)
expect(result.current).toBeInstanceOf(Promise)
@@ -55,9 +56,6 @@ describe('useActiveReleases', () => {
})
it('should resolve with releases when data is available', () => {
- const mockInstance = {} as SanityInstance
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
const mockReleases: ReleaseDocument[] = [
{_id: 'release1', _type: 'release'} as ReleaseDocument,
{_id: 'release2', _type: 'release'} as ReleaseDocument,
@@ -75,7 +73,13 @@ describe('useActiveReleases', () => {
vi.mocked(getActiveReleasesState).mockReturnValue(mockStateSource)
- const {result} = renderHook(() => useActiveReleases())
+ const {result} = renderHook(() => useActiveReleases(), {
+ wrapper: ({children}) => (
+ Loading...}>
+ {children}
+
+ ),
+ })
// Verify that the hook returned the releases without suspending
expect(result.current).toEqual(mockReleases)
diff --git a/packages/react/src/hooks/releases/usePerspective.test.tsx b/packages/react/src/hooks/releases/usePerspective.test.tsx
index 34eb3aeea..210fc2de6 100644
--- a/packages/react/src/hooks/releases/usePerspective.test.tsx
+++ b/packages/react/src/hooks/releases/usePerspective.test.tsx
@@ -4,20 +4,14 @@ import {
getPerspectiveState,
type PerspectiveHandle,
type ReleaseDocument,
- type SanityInstance,
} from '@sanity/sdk'
import {renderHook} from '@testing-library/react'
import {BehaviorSubject} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
-import {useSanityInstance} from '../context/useSanityInstance'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {usePerspective} from './usePerspective'
-// Mock the useSanityInstance hook
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn(),
-}))
-
// Mock the SDK functions
vi.mock('@sanity/sdk', async () => {
const actual = await vi.importActual('@sanity/sdk')
@@ -36,9 +30,6 @@ describe('usePerspective', () => {
})
it('should suspend when initial state is undefined', () => {
- const mockInstance = {} as SanityInstance
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
const perspectiveHandle: PerspectiveHandle = {
perspective: 'published',
}
@@ -76,13 +67,18 @@ describe('usePerspective', () => {
vi.mocked(getPerspectiveState).mockReturnValue(mockStateSource)
vi.mocked(getActiveReleasesState).mockReturnValue(mockReleasesStateSource)
- const {result} = renderHook(() => {
- try {
- return usePerspective(perspectiveHandle)
- } catch (e) {
- return e
- }
- })
+ const {result} = renderHook(
+ () => {
+ try {
+ return usePerspective(perspectiveHandle)
+ } catch (e) {
+ return e
+ }
+ },
+ {
+ wrapper: ({children}) => {children} ,
+ },
+ )
// Verify that the hook threw a promise (suspended)
expect(result.current).toBeInstanceOf(Promise)
@@ -90,9 +86,6 @@ describe('usePerspective', () => {
})
it('should resolve with perspective when data is available', () => {
- const mockInstance = {} as SanityInstance
- vi.mocked(useSanityInstance).mockReturnValue(mockInstance)
-
const perspectiveHandle: PerspectiveHandle = {
perspective: 'published',
}
@@ -110,11 +103,12 @@ describe('usePerspective', () => {
vi.mocked(getPerspectiveState).mockReturnValue(mockStateSource)
- const {result} = renderHook(() => usePerspective(perspectiveHandle))
+ const {result} = renderHook(() => usePerspective(perspectiveHandle), {
+ wrapper: ({children}) => {children} ,
+ })
// Verify that the hook returned the perspective without suspending
expect(result.current).toEqual(mockPerspective)
expect(mockStateSource.getCurrent).toHaveBeenCalled()
- expect(getPerspectiveState).toHaveBeenCalledWith(mockInstance, perspectiveHandle)
})
})
diff --git a/packages/react/src/hooks/users/useUser.test.tsx b/packages/react/src/hooks/users/useUser.test.tsx
index b23891e31..df9663e31 100644
--- a/packages/react/src/hooks/users/useUser.test.tsx
+++ b/packages/react/src/hooks/users/useUser.test.tsx
@@ -6,10 +6,11 @@ import {
type UserProfile,
} from '@sanity/sdk'
import {act, fireEvent, render, screen} from '@testing-library/react'
-import {Suspense, useState} from 'react'
+import {useState} from 'react'
import {type Observable, Subject} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useUser} from './useUser'
// Mock the functions from '@sanity/sdk'
@@ -22,11 +23,6 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
}
})
-// Mock the Sanity instance hook to return a dummy instance
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn().mockReturnValue({config: {projectId: 'p'}}),
-}))
-
describe('useUser', () => {
// Create mock user profiles with all required fields
const mockUserProfile: UserProfile = {
@@ -91,7 +87,11 @@ describe('useUser', () => {
)
}
- render( )
+ render(
+
+
+ ,
+ )
// Verify that the output contains the user data and that isPending is false
expect(screen.getByTestId('output').textContent).toContain('John Doe (gabc123)')
@@ -146,9 +146,9 @@ describe('useUser', () => {
}
render(
- Loading...}>
+ Loading...}>
- ,
+ ,
)
// Initially, since storeValue is undefined, the component should suspend and fallback is shown
@@ -237,7 +237,11 @@ describe('useUser', () => {
)
}
- render( )
+ render(
+
+
+ ,
+ )
// Initially, should show data for first user and not pending
expect(screen.getByTestId('output').textContent).toContain('John Doe')
@@ -290,7 +294,11 @@ describe('useUser', () => {
)
}
- render( )
+ render(
+
+
+ ,
+ )
expect(screen.getByTestId('output').textContent).toContain('User not found')
expect(screen.getByTestId('output').textContent).toContain('not pending')
@@ -331,7 +339,11 @@ describe('useUser', () => {
)
}
- render( )
+ render(
+
+
+ ,
+ )
expect(screen.getByTestId('output').textContent).toContain('John Doe (p12345)')
})
@@ -360,8 +372,9 @@ describe('useUser', () => {
const {data} = useUser({
userId: 'gabc123',
resourceType,
- projectId: resourceType === 'project' ? 'test-project' : undefined,
- organizationId: resourceType === 'organization' ? 'test-org' : undefined,
+ ...(resourceType === 'project'
+ ? {projectId: 'test-project'}
+ : {organizationId: 'test-org'}),
})
return (
@@ -373,7 +386,11 @@ describe('useUser', () => {
)
}
- render( )
+ render(
+
+
+ ,
+ )
// Initially should show project user
expect(screen.getByTestId('output').textContent).toContain('John Doe')
diff --git a/packages/react/src/hooks/users/useUsers.test.tsx b/packages/react/src/hooks/users/useUsers.test.tsx
index 0e5de6174..780034a14 100644
--- a/packages/react/src/hooks/users/useUsers.test.tsx
+++ b/packages/react/src/hooks/users/useUsers.test.tsx
@@ -7,10 +7,11 @@ import {
type UserProfile,
} from '@sanity/sdk'
import {act, fireEvent, render, screen} from '@testing-library/react'
-import {Suspense, useState} from 'react'
+import {useState} from 'react'
import {type Observable, Subject} from 'rxjs'
import {describe, expect, it, vi} from 'vitest'
+import {ResourceProvider} from '../../context/ResourceProvider'
import {useUsers} from './useUsers'
// Mock the functions from '@sanity/sdk'
@@ -24,11 +25,6 @@ vi.mock('@sanity/sdk', async (importOriginal) => {
}
})
-// Mock the Sanity instance hook to return a dummy instance
-vi.mock('../context/useSanityInstance', () => ({
- useSanityInstance: vi.fn().mockReturnValue({config: {projectId: 'p'}}),
-}))
-
describe('useUsers', () => {
// Create mock user profiles with all required fields
const mockUserProfile1: UserProfile = {
@@ -94,7 +90,11 @@ describe('useUsers', () => {
)
}
- render( )
+ render(
+ Loading...}>
+
+ ,
+ )
// Verify that the output contains the data and that isPending is false
expect(screen.getByTestId('output').textContent).toContain('2 users')
@@ -152,9 +152,9 @@ describe('useUsers', () => {
}
render(
- Loading...
}>
+ Loading...}>
- ,
+ ,
)
// Initially, since storeValue is undefined, the component should suspend and fallback is shown
@@ -244,7 +244,11 @@ describe('useUsers', () => {
)
}
- render( )
+ render(
+ Loading...}>
+
+ ,
+ )
// Initially, should show data for org1 and not pending
expect(screen.getByTestId('output').textContent).toContain('User One')
@@ -308,7 +312,11 @@ describe('useUsers', () => {
)
}
- render( )
+ render(
+ Loading...}>
+
+ ,
+ )
// Verify initial state
expect(screen.getByTestId('output').textContent).toContain('2 users')
diff --git a/packages/react/src/hooks/users/useUsers.ts b/packages/react/src/hooks/users/useUsers.ts
index dc6eb7c37..5b820e57c 100644
--- a/packages/react/src/hooks/users/useUsers.ts
+++ b/packages/react/src/hooks/users/useUsers.ts
@@ -62,7 +62,7 @@ export interface UsersResult {
* {user.profile.email}
*
* ))}
- * {hasMore && {isPending ? 'Loading...' : 'Load More' }
+ * {hasMore && {isPending ? 'Loading...' : 'Load More'} }
*
* )
* ```
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index c89e51b8a..6f3c70328 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -84,8 +84,8 @@ importers:
specifier: ^5.8.3
version: 5.8.3
vite:
- specifier: ^6.3.4
- version: 6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ specifier: ^6.3.6
+ version: 6.4.0(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
vitest:
specifier: ^3.1.2
version: 3.1.2(@types/node@22.13.9)(jiti@2.6.1)(jsdom@27.0.0(postcss@8.5.6))(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
@@ -98,6 +98,9 @@ importers:
'@sanity/sdk-react':
specifier: workspace:*
version: link:../../packages/react
+ '@sanity/ui':
+ specifier: ^3.1.11
+ version: 3.1.11(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
react:
specifier: ^19
version: 19.1.0
@@ -131,19 +134,19 @@ importers:
version: 19.1.3(@types/react@19.1.2)
eslint:
specifier: ^9.25.1
- version: 9.36.0(jiti@2.4.2)
+ version: 9.36.0(jiti@2.6.1)
prettier:
specifier: ^3.5.3
version: 3.6.2
sanity:
specifier: ^3
- version: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
+ version: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
typescript:
specifier: ^5.1.6
version: 5.8.3
vite:
specifier: ^6.3.3
- version: 6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ version: 6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
apps/kitchensink-react:
dependencies:
@@ -158,7 +161,7 @@ importers:
version: link:../../packages/react
'@sanity/ui':
specifier: ^2.15.13
- version: 2.15.13(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@19.2.0)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ version: 2.15.13(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
groq:
specifier: 3.88.1-typegen-experimental.0
version: 3.88.1-typegen-experimental.0
@@ -185,7 +188,7 @@ importers:
version: 7.5.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
sanity:
specifier: ^3.86.1
- version: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
+ version: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
styled-components:
specifier: ^6.1.18
version: 6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
@@ -207,7 +210,7 @@ importers:
version: link:../../packages/@repo/tsconfig
'@sanity/cli':
specifier: 3.88.1-typegen-experimental.0
- version: 3.88.1-typegen-experimental.0(@types/node@22.13.9)(@types/react@19.1.2)(jiti@2.6.1)(lightningcss@1.29.1)(react@18.3.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
+ version: 3.88.1-typegen-experimental.0(@types/node@22.13.9)(@types/react@19.1.2)(jiti@2.4.2)(lightningcss@1.29.1)(react@18.3.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
'@sanity/prettier-config':
specifier: ^1.0.3
version: 1.0.3(prettier@3.5.3)
@@ -228,19 +231,19 @@ importers:
version: 19.1.3(@types/react@19.1.2)
'@vitejs/plugin-react':
specifier: ^4.4.1
- version: 4.4.1(vite@6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
+ version: 4.4.1(vite@6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
eslint:
specifier: ^9.25.1
- version: 9.25.1(jiti@2.6.1)
+ version: 9.25.1(jiti@2.4.2)
prettier:
specifier: ^3.5.3
version: 3.5.3
vite:
specifier: ^6.3.3
- version: 6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ version: 6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
vitest:
specifier: ^3.1.2
- version: 3.1.2(@types/node@22.13.9)(jiti@2.6.1)(jsdom@27.0.0(postcss@8.5.6))(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ version: 3.1.2(@types/node@22.13.9)(jiti@2.4.2)(jsdom@23.2.0)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
apps/property-detail-app:
dependencies:
@@ -298,7 +301,7 @@ importers:
dependencies:
'@sanity/client':
specifier: ^7.8.2
- version: 7.10.0
+ version: 7.10.0(debug@4.4.1)
'@sanity/sdk-react':
specifier: workspace:*
version: link:../../packages/react
@@ -353,7 +356,7 @@ importers:
version: 2.1.4(@csstools/css-parser-algorithms@3.0.5(@csstools/css-tokenizer@3.0.4))(@csstools/css-tokenizer@3.0.4)
'@sanity/client':
specifier: ^6.0.0
- version: 6.29.1
+ version: 6.29.1(debug@4.4.1)
'@sanity/google-maps-input':
specifier: ^4.1.1
version: 4.2.0(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(sanity@4.10.3(@emotion/is-prop-valid@1.2.2)(@portabletext/sanity-bridge@1.1.14(@sanity/schema@4.10.3(@types/react@19.1.2)(debug@4.4.3))(@sanity/types@4.10.3(@types/react@19.1.2)(debug@4.4.3)))(@types/node@22.13.9)(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
@@ -461,8 +464,8 @@ importers:
packages/@repo/e2e:
dependencies:
'@sanity/client':
- specifier: ^7.10.0
- version: 7.10.0
+ specifier: ^7.12.0
+ version: 7.12.0(debug@4.4.1)
'@sanity/uuid':
specifier: ^3.0.0
version: 3.0.2
@@ -541,8 +544,8 @@ importers:
specifier: ^0.4.1
version: 0.4.1
'@sanity/client':
- specifier: ^7.10.0
- version: 7.10.0
+ specifier: ^7.12.0
+ version: 7.12.0(debug@4.4.1)
'@sanity/comlink':
specifier: ^3.0.4
version: 3.0.4
@@ -563,7 +566,7 @@ importers:
version: 0.12.4
'@sanity/types':
specifier: ^3.83.0
- version: 3.88.1(@types/react@19.1.2)
+ version: 3.88.1(@types/react@19.1.2)(debug@4.4.1)
groq:
specifier: 3.88.1-typegen-experimental.0
version: 3.88.1-typegen-experimental.0
@@ -635,8 +638,8 @@ importers:
packages/react:
dependencies:
'@sanity/client':
- specifier: ^7.10.0
- version: 7.10.0
+ specifier: ^7.12.0
+ version: 7.12.0(debug@4.4.1)
'@sanity/message-protocol':
specifier: ^0.12.0
version: 0.12.0
@@ -645,7 +648,7 @@ importers:
version: link:../core
'@sanity/types':
specifier: ^3.83.0
- version: 3.88.1(@types/react@19.1.2)
+ version: 3.88.1(@types/react@19.1.2)(debug@4.4.1)
'@types/lodash-es':
specifier: ^4.17.12
version: 4.17.12
@@ -1977,6 +1980,12 @@ packages:
'@codemirror/autocomplete@6.19.0':
resolution: {integrity: sha512-61Hfv3cF07XvUxNeC3E7jhG8XNi1Yom1G0lRC936oLnlF+jrbrv8rc/J98XlYzcsAoTVupfsf5fLej1aI8kyIg==}
+ '@codemirror/autocomplete@6.19.1':
+ resolution: {integrity: sha512-q6NenYkEy2fn9+JyjIxMWcNjzTL/IhwqfzOut1/G3PrIFkrbl4AL7Wkse5tLrQUUyqGoAKU5+Pi5jnnXxH5HGw==}
+
+ '@codemirror/commands@6.10.0':
+ resolution: {integrity: sha512-2xUIc5mHXQzT16JnyOFkh8PvfeXuIut3pslWGfsGOhxP/lpgRm9HOl/mpzLErgt5mXDovqA0d11P21gofRLb9w==}
+
'@codemirror/commands@6.9.0':
resolution: {integrity: sha512-454TVgjhO6cMufsyyGN70rGIfJxJEjcqjBG2x2Y03Y/+Fm99d3O/Kv1QDYWuG6hvxsgmjXmBuATikIIYvERX+w==}
@@ -3224,6 +3233,9 @@ packages:
'@lezer/highlight@1.2.2':
resolution: {integrity: sha512-z8TQwaBXXQIvG6i2g3e9cgMwUUXu9Ib7jo2qRRggdhwKpM56Dw3PM3wmexn+EGaaOZ7az0K7sjc3/gcGW7sz7A==}
+ '@lezer/highlight@1.2.3':
+ resolution: {integrity: sha512-qXdH7UqTvGfdVBINrgKhDsVTJTxactNNxLk7+UMwZhU13lMHaOBlJe9Vqp907ya56Y3+ed2tlqzys7jDkTmW0g==}
+
'@lezer/javascript@1.5.4':
resolution: {integrity: sha512-vvYx3MhWqeZtGPwDStM2dwgljd5smolYD2lR2UyFcHfxbBQebqx8yjmFmxtJ/E6nN6u1D9srOiVWm3Rb4tmcUA==}
@@ -4246,8 +4258,8 @@ packages:
react-is: ^18 || >=19.0.0-0
styled-components: ^5.2 || ^6
- '@sanity/ui@2.16.21':
- resolution: {integrity: sha512-aslV3Uwjt4UDEuJv2kwsZQfBEUvxQ7kfoZN4Odz9PeiDqAhty+5X235L6DTVltM7RZ/LAv0czt0wVUwa/lgmHg==}
+ '@sanity/ui@2.16.22':
+ resolution: {integrity: sha512-Zw217nqjLhROHrjFYPCwV61xEYHwUbBOohHO2DZ4LdQKqNfTKsqcjLVx9Heb4oDzB06L+1CamIrvPaexVijfeg==}
engines: {node: '>=14.0.0'}
peerDependencies:
react: ^18 || >=19.0.0-0
@@ -4255,17 +4267,8 @@ packages:
react-is: ^18 || >=19.0.0-0
styled-components: ^5.2 || ^6
- '@sanity/ui@3.1.10':
- resolution: {integrity: sha512-iwhImz9I0nHAj48yKsTGCMOGL+ZDnljvFLxZbvQkzUDwL42UH+JNeo1m/K3fYyRVb6w9SkvpaSyBf2GhFiAVyg==}
- engines: {node: '>=20.19 <22 || >=22.12'}
- peerDependencies:
- react: ^18 || >=19.0.0-0
- react-dom: ^18 || >=19.0.0-0
- react-is: ^18 || >=19.0.0-0
- styled-components: ^5.2 || ^6
-
- '@sanity/ui@3.1.8':
- resolution: {integrity: sha512-oNUi2IyJ6DhuDKd0TFOz/YoF9prwoktLPj+VLZvrU41leeHSxflb7TL2NHsHAfJ2j8qvc/R/2Z4S/uxsdSDXYw==}
+ '@sanity/ui@3.1.11':
+ resolution: {integrity: sha512-UooG4hq0ytUivCe0d5O+QWnG+B6fpuu5npNZNpV9SJNwZNH4hDNbLjnDS8sqEkaYVNhgIS+C26nnkVK134Di4w==}
engines: {node: '>=20.19 <22 || >=22.12'}
peerDependencies:
react: ^18 || >=19.0.0-0
@@ -7656,6 +7659,20 @@ packages:
motion-utils@12.6.3:
resolution: {integrity: sha512-R/b3Ia2VxtTNZ4LTEO5pKYau1OUNHOuUfxuP0WFCTDYdHkeTBR9UtxR1cc8mDmKr8PEhmmfnTKGz3rSMjNRoRg==}
+ motion@12.23.24:
+ resolution: {integrity: sha512-Rc5E7oe2YZ72N//S3QXGzbnXgqNrTESv8KKxABR20q2FLch9gHLo0JLyYo2hZ238bZ9Gx6cWhj9VO0IgwbMjCw==}
+ peerDependencies:
+ '@emotion/is-prop-valid': '*'
+ react: ^18.0.0 || ^19.0.0
+ react-dom: ^18.0.0 || ^19.0.0
+ peerDependenciesMeta:
+ '@emotion/is-prop-valid':
+ optional: true
+ react:
+ optional: true
+ react-dom:
+ optional: true
+
ms@2.0.0:
resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==}
@@ -9426,14 +9443,14 @@ packages:
unist-util-is@4.1.0:
resolution: {integrity: sha512-ZOQSsnce92GrxSqlnEEseX0gi7GH9zTJZ0p9dtu87WRb/37mMPO2Ilx1s/t9vBHrFhbgweUwb+t7cIn5dxPhZg==}
- unist-util-is@6.0.0:
- resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
+ unist-util-is@6.0.1:
+ resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==}
unist-util-visit-parents@3.1.1:
resolution: {integrity: sha512-1KROIZWo6bcMrZEwiH2UrXDyalAa0uqzWCxCJj6lPOvTve2WkfgCytoDTPaMnodXh1WrXOq0haVYHj99ynJlsg==}
- unist-util-visit-parents@6.0.1:
- resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==}
+ unist-util-visit-parents@6.0.2:
+ resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==}
universal-user-agent@6.0.1:
resolution: {integrity: sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==}
@@ -12310,6 +12327,20 @@ snapshots:
'@codemirror/view': 6.38.6
'@lezer/common': 1.3.0
+ '@codemirror/autocomplete@6.19.1':
+ dependencies:
+ '@codemirror/language': 6.11.3
+ '@codemirror/state': 6.5.2
+ '@codemirror/view': 6.38.6
+ '@lezer/common': 1.3.0
+
+ '@codemirror/commands@6.10.0':
+ dependencies:
+ '@codemirror/language': 6.11.3
+ '@codemirror/state': 6.5.2
+ '@codemirror/view': 6.38.6
+ '@lezer/common': 1.3.0
+
'@codemirror/commands@6.9.0':
dependencies:
'@codemirror/language': 6.11.3
@@ -12357,7 +12388,7 @@ snapshots:
'@codemirror/language': 6.11.3
'@codemirror/state': 6.5.2
'@codemirror/view': 6.38.6
- '@lezer/highlight': 1.2.2
+ '@lezer/highlight': 1.2.3
'@codemirror/view@6.38.6':
dependencies:
@@ -12912,6 +12943,11 @@ snapshots:
'@esbuild/win32-x64@0.25.6':
optional: true
+ '@eslint-community/eslint-utils@4.4.1(eslint@9.25.1(jiti@2.4.2))':
+ dependencies:
+ eslint: 9.25.1(jiti@2.4.2)
+ eslint-visitor-keys: 3.4.3
+
'@eslint-community/eslint-utils@4.4.1(eslint@9.25.1(jiti@2.6.1))':
dependencies:
eslint: 9.25.1(jiti@2.6.1)
@@ -12922,11 +12958,6 @@ snapshots:
eslint: 9.36.0(jiti@2.6.1)
eslint-visitor-keys: 3.4.3
- '@eslint-community/eslint-utils@4.9.0(eslint@9.36.0(jiti@2.4.2))':
- dependencies:
- eslint: 9.36.0(jiti@2.4.2)
- eslint-visitor-keys: 3.4.3
-
'@eslint-community/eslint-utils@4.9.0(eslint@9.36.0(jiti@2.6.1))':
dependencies:
eslint: 9.36.0(jiti@2.6.1)
@@ -13365,8 +13396,8 @@ snapshots:
'@jridgewell/source-map@0.3.6':
dependencies:
- '@jridgewell/gen-mapping': 0.3.5
- '@jridgewell/trace-mapping': 0.3.25
+ '@jridgewell/gen-mapping': 0.3.12
+ '@jridgewell/trace-mapping': 0.3.29
'@jridgewell/sourcemap-codec@1.5.0': {}
@@ -13388,6 +13419,10 @@ snapshots:
dependencies:
'@lezer/common': 1.3.0
+ '@lezer/highlight@1.2.3':
+ dependencies:
+ '@lezer/common': 1.3.0
+
'@lezer/javascript@1.5.4':
dependencies:
'@lezer/common': 1.3.0
@@ -13702,7 +13737,7 @@ snapshots:
'@portabletext/block-tools@1.1.38(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))(@types/react@19.1.2)':
dependencies:
- '@sanity/types': 3.99.0(@types/react@19.1.2)
+ '@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@types/react': 19.1.2
get-random-values-esm: 1.0.2
lodash: 4.17.21
@@ -13751,7 +13786,7 @@ snapshots:
'@portabletext/patches': 1.1.5
'@portabletext/to-html': 2.0.17
'@sanity/schema': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
- '@sanity/types': 3.99.0(@types/react@19.1.2)
+ '@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@xstate/react': 6.0.0(@types/react@19.1.2)(react@19.1.0)(xstate@5.23.0)
debug: 4.4.1(supports-color@8.1.1)
get-random-values-esm: 1.0.2
@@ -14252,12 +14287,12 @@ snapshots:
'@sanity/browserslist-config@1.0.5': {}
- '@sanity/cli@3.88.1-typegen-experimental.0(@types/node@22.13.9)(@types/react@19.1.2)(jiti@2.6.1)(lightningcss@1.29.1)(react@18.3.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)':
+ '@sanity/cli@3.88.1-typegen-experimental.0(@types/node@22.13.9)(@types/react@19.1.2)(jiti@2.4.2)(lightningcss@1.29.1)(react@18.3.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)':
dependencies:
'@babel/traverse': 7.27.0
'@sanity/client': 7.2.1(debug@4.4.1)
'@sanity/codegen': 3.88.1-typegen-experimental.0
- '@sanity/runtime-cli': 6.1.1(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
+ '@sanity/runtime-cli': 6.1.1(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
'@sanity/telemetry': 0.8.1(react@18.3.1)
'@sanity/template-validator': 2.4.3
'@sanity/util': 3.88.1(@types/react@19.1.2)(debug@4.4.1)
@@ -14292,7 +14327,7 @@ snapshots:
'@sanity/cli@3.99.0(@types/node@22.13.9)(@types/react@19.1.2)(lightningcss@1.29.1)(react@18.3.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)':
dependencies:
'@babel/traverse': 7.28.0
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/codegen': 3.99.0
'@sanity/runtime-cli': 9.2.0(@types/node@22.13.9)(debug@4.4.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
'@sanity/telemetry': 0.8.1(react@18.3.1)
@@ -14332,7 +14367,7 @@ snapshots:
'@sanity/cli@3.99.0(@types/node@22.13.9)(@types/react@19.1.2)(lightningcss@1.29.1)(react@19.1.0)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)':
dependencies:
'@babel/traverse': 7.28.0
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/codegen': 3.99.0
'@sanity/runtime-cli': 9.2.0(@types/node@22.13.9)(debug@4.4.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
'@sanity/telemetry': 0.8.1(react@19.1.0)
@@ -14408,7 +14443,7 @@ snapshots:
'@sanity/client@6.29.1':
dependencies:
'@sanity/eventsource': 5.0.2
- get-it: 8.6.10
+ get-it: 8.6.10(debug@4.4.1)
rxjs: 7.8.2
transitivePeerDependencies:
- debug
@@ -14429,15 +14464,6 @@ snapshots:
transitivePeerDependencies:
- debug
- '@sanity/client@7.10.0':
- dependencies:
- '@sanity/eventsource': 5.0.2
- get-it: 8.6.10
- nanoid: 3.3.11
- rxjs: 7.8.2
- transitivePeerDependencies:
- - debug
-
'@sanity/client@7.10.0(debug@4.4.1)':
dependencies:
'@sanity/eventsource': 5.0.2
@@ -14447,10 +14473,10 @@ snapshots:
transitivePeerDependencies:
- debug
- '@sanity/client@7.10.0(debug@4.4.3)':
+ '@sanity/client@7.12.0(debug@4.4.1)':
dependencies:
'@sanity/eventsource': 5.0.2
- get-it: 8.6.10(debug@4.4.3)
+ get-it: 8.6.10(debug@4.4.1)
nanoid: 3.3.11
rxjs: 7.8.2
transitivePeerDependencies:
@@ -14459,7 +14485,7 @@ snapshots:
'@sanity/client@7.12.0(debug@4.4.3)':
dependencies:
'@sanity/eventsource': 5.0.2
- get-it: 8.6.10
+ get-it: 8.6.10(debug@4.4.3)
nanoid: 3.3.11
rxjs: 7.8.2
transitivePeerDependencies:
@@ -14642,7 +14668,7 @@ snapshots:
dependencies:
'@sanity/icons': 3.7.0(react@19.1.0)
'@sanity/incompatible-plugin': 1.0.5(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- '@sanity/ui': 3.1.8(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
+ '@sanity/ui': 3.1.11(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
react: 19.1.0
sanity: 4.10.3(@emotion/is-prop-valid@1.2.2)(@portabletext/sanity-bridge@1.1.14(@sanity/schema@4.10.3(@types/react@19.1.2)(debug@4.4.3))(@sanity/types@4.10.3(@types/react@19.1.2)(debug@4.4.3)))(@types/node@22.13.9)(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
styled-components: 6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
@@ -14711,7 +14737,7 @@ snapshots:
dependencies:
'@sanity/icons': 3.7.4(react@18.3.1)
'@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
- '@sanity/ui': 2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ '@sanity/ui': 2.16.22(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
lodash: 4.17.21
react: 18.3.1
react-compiler-runtime: 19.1.0-rc.2(react@18.3.1)
@@ -14724,8 +14750,8 @@ snapshots:
'@sanity/insert-menu@1.1.13(@emotion/is-prop-valid@1.2.2)(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))':
dependencies:
'@sanity/icons': 3.7.4(react@19.1.0)
- '@sanity/types': 3.99.0(@types/react@19.1.2)
- '@sanity/ui': 2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
+ '@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
+ '@sanity/ui': 2.16.22(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
lodash: 4.17.21
react: 19.1.0
react-compiler-runtime: 19.1.0-rc.2(react@19.1.0)
@@ -14739,7 +14765,7 @@ snapshots:
dependencies:
'@sanity/icons': 3.7.4(react@19.1.0)
'@sanity/types': 4.10.3(@types/react@19.1.2)(debug@4.4.3)
- '@sanity/ui': 3.1.8(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
+ '@sanity/ui': 3.1.11(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
lodash: 4.17.21
react: 19.1.0
react-compiler-runtime: 1.0.0(react@19.1.0)
@@ -14777,7 +14803,7 @@ snapshots:
'@sanity/migrate@3.99.0(@types/react@19.1.2)':
dependencies:
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/mutate': 0.12.4(debug@4.4.1)
'@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@sanity/util': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
@@ -14992,6 +15018,14 @@ snapshots:
- '@sanity/client'
- '@sanity/types'
+ '@sanity/presentation-comlink@1.0.33(@sanity/client@7.10.0)(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))':
+ dependencies:
+ '@sanity/comlink': 3.1.1
+ '@sanity/visual-editing-types': 1.1.8(@sanity/client@7.10.0)(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))
+ transitivePeerDependencies:
+ - '@sanity/client'
+ - '@sanity/types'
+
'@sanity/presentation-comlink@1.0.33(@sanity/client@7.12.0(debug@4.4.3))(@sanity/types@4.10.3(@types/react@19.1.2)(debug@4.4.3))':
dependencies:
'@sanity/comlink': 3.1.1
@@ -15010,23 +15044,15 @@ snapshots:
prettier: 3.6.2
prettier-plugin-packagejson: 2.5.3(prettier@3.6.2)
- '@sanity/preview-url-secret@2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@18.3.1))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))':
+ '@sanity/preview-url-secret@2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@18.3.1))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))':
dependencies:
'@sanity/client': 7.10.0(debug@4.4.1)
'@sanity/uuid': 3.0.2
optionalDependencies:
'@sanity/icons': 3.7.4(react@18.3.1)
- sanity: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
-
- '@sanity/preview-url-secret@2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@19.1.0))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))':
- dependencies:
- '@sanity/client': 7.10.0
- '@sanity/uuid': 3.0.2
- optionalDependencies:
- '@sanity/icons': 3.7.4(react@19.1.0)
- sanity: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
+ sanity: 3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
- '@sanity/preview-url-secret@2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@19.1.0))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))':
+ '@sanity/preview-url-secret@2.1.15(@sanity/client@7.10.0)(@sanity/icons@3.7.4(react@19.1.0))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))':
dependencies:
'@sanity/client': 7.10.0(debug@4.4.1)
'@sanity/uuid': 3.0.2
@@ -15086,7 +15112,7 @@ snapshots:
- utf-8-validate
- yaml
- '@sanity/runtime-cli@6.1.1(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)':
+ '@sanity/runtime-cli@6.1.1(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)':
dependencies:
'@oclif/core': 4.3.0
'@oclif/plugin-help': 6.2.27
@@ -15098,8 +15124,8 @@ snapshots:
find-up: 7.0.0
inquirer: 12.6.0(@types/node@22.13.9)
mime-types: 3.0.1
- vite: 6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
- vite-tsconfig-paths: 5.1.4(typescript@5.8.3)(vite@6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
+ vite: 6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ vite-tsconfig-paths: 5.1.4(typescript@5.8.3)(vite@6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
xdg-basedir: 5.1.0
yocto-spinner: 0.2.2
transitivePeerDependencies:
@@ -15123,7 +15149,7 @@ snapshots:
'@architect/inventory': 4.0.9
'@oclif/core': 4.3.0
'@oclif/plugin-help': 6.2.33
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
adm-zip: 0.5.16
array-treeify: 0.1.5
cardinal: 2.1.1
@@ -15163,7 +15189,7 @@ snapshots:
dependencies:
'@sanity/descriptors': 1.1.1
'@sanity/generate-help-url': 3.0.0
- '@sanity/types': 3.99.0(@types/react@19.1.2)
+ '@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
arrify: 2.0.1
groq-js: 1.19.0
humanize-list: 1.0.1
@@ -15279,38 +15305,23 @@ snapshots:
transitivePeerDependencies:
- debug
- '@sanity/types@3.88.1(@types/react@19.1.2)':
- dependencies:
- '@sanity/client': 7.10.0
- '@types/react': 19.1.2
- transitivePeerDependencies:
- - debug
-
'@sanity/types@3.88.1(@types/react@19.1.2)(debug@4.4.1)':
dependencies:
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@types/react': 19.1.2
transitivePeerDependencies:
- debug
'@sanity/types@3.88.1(@types/react@19.1.2)(debug@4.4.3)':
dependencies:
- '@sanity/client': 7.10.0(debug@4.4.3)
- '@types/react': 19.1.2
- transitivePeerDependencies:
- - debug
-
- '@sanity/types@3.99.0(@types/react@19.1.2)':
- dependencies:
- '@sanity/client': 7.10.0
- '@sanity/media-library-types': 1.0.1
+ '@sanity/client': 7.12.0(debug@4.4.3)
'@types/react': 19.1.2
transitivePeerDependencies:
- debug
'@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1)':
dependencies:
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/media-library-types': 1.0.1
'@types/react': 19.1.2
transitivePeerDependencies:
@@ -15318,13 +15329,13 @@ snapshots:
'@sanity/types@4.10.3(@types/react@19.1.2)(debug@4.4.3)':
dependencies:
- '@sanity/client': 7.12.0(debug@4.4.3)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/media-library-types': 1.0.1
'@types/react': 19.1.2
transitivePeerDependencies:
- debug
- '@sanity/ui@2.15.13(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@19.2.0)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))':
+ '@sanity/ui@2.15.13(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))':
dependencies:
'@floating-ui/react-dom': 2.1.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@juggle/resize-observer': 3.4.0
@@ -15335,21 +15346,21 @@ snapshots:
react: 18.3.1
react-compiler-runtime: 19.0.0-beta-e993439-20250405(react@18.3.1)
react-dom: 18.3.1(react@18.3.1)
- react-is: 19.2.0
+ react-is: 18.3.1
react-refractor: 2.2.0(react@18.3.1)
styled-components: 6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
use-effect-event: 1.0.2(react@18.3.1)
transitivePeerDependencies:
- '@emotion/is-prop-valid'
- '@sanity/ui@2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))':
+ '@sanity/ui@2.16.22(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))':
dependencies:
'@floating-ui/react-dom': 2.1.6(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@juggle/resize-observer': 3.4.0
'@sanity/color': 3.0.6
'@sanity/icons': 3.7.4(react@18.3.1)
csstype: 3.1.3
- framer-motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
react: 18.3.1
react-compiler-runtime: 1.0.0(react@18.3.1)
react-dom: 18.3.1(react@18.3.1)
@@ -15360,14 +15371,14 @@ snapshots:
transitivePeerDependencies:
- '@emotion/is-prop-valid'
- '@sanity/ui@2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))':
+ '@sanity/ui@2.16.22(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))':
dependencies:
'@floating-ui/react-dom': 2.1.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
'@juggle/resize-observer': 3.4.0
'@sanity/color': 3.0.6
'@sanity/icons': 3.7.4(react@19.1.0)
csstype: 3.1.3
- framer-motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
+ motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
react: 19.1.0
react-compiler-runtime: 1.0.0(react@19.1.0)
react-dom: 19.1.0(react@19.1.0)
@@ -15378,14 +15389,14 @@ snapshots:
transitivePeerDependencies:
- '@emotion/is-prop-valid'
- '@sanity/ui@3.1.10(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))':
+ '@sanity/ui@3.1.11(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))':
dependencies:
'@floating-ui/react-dom': 2.1.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
'@juggle/resize-observer': 3.4.0
'@sanity/color': 3.0.6
'@sanity/icons': 3.7.4(react@19.1.0)
csstype: 3.1.3
- framer-motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
+ motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
react: 19.1.0
react-compiler-runtime: 1.0.0(react@19.1.0)
react-dom: 19.1.0(react@19.1.0)
@@ -15396,24 +15407,6 @@ snapshots:
transitivePeerDependencies:
- '@emotion/is-prop-valid'
- '@sanity/ui@3.1.8(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))':
- dependencies:
- '@floating-ui/react-dom': 2.1.6(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- '@juggle/resize-observer': 3.4.0
- '@sanity/color': 3.0.6
- '@sanity/icons': 3.7.4(react@19.1.0)
- csstype: 3.1.3
- framer-motion: 12.23.22(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- react: 19.1.0
- react-compiler-runtime: 19.1.0-rc.3(react@19.1.0)
- react-dom: 19.1.0(react@19.1.0)
- react-is: 19.2.0
- react-refractor: 4.0.0(react@19.1.0)
- styled-components: 6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- use-effect-event: 2.0.3(react@19.1.0)
- transitivePeerDependencies:
- - '@emotion/is-prop-valid'
-
'@sanity/util@3.68.3(@types/react@19.1.2)(debug@4.4.1)':
dependencies:
'@sanity/client': 6.29.1(debug@4.4.1)
@@ -15427,7 +15420,7 @@ snapshots:
'@sanity/util@3.88.1(@types/react@19.1.2)(debug@4.4.1)':
dependencies:
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/types': 3.88.1(@types/react@19.1.2)(debug@4.4.1)
get-random-values-esm: 1.0.2
moment: 2.30.1
@@ -15440,7 +15433,7 @@ snapshots:
dependencies:
'@date-fns/tz': 1.4.1
'@date-fns/utc': 2.1.1
- '@sanity/client': 7.10.0(debug@4.4.1)
+ '@sanity/client': 7.12.0(debug@4.4.1)
'@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
date-fns: 4.1.0
get-random-values-esm: 1.0.2
@@ -15482,7 +15475,7 @@ snapshots:
'@rexxars/react-split-pane': 1.0.0(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
'@sanity/color': 3.0.6
'@sanity/icons': 3.7.4(react@19.1.0)
- '@sanity/ui': 3.1.10(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
+ '@sanity/ui': 3.1.11(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
'@sanity/uuid': 3.0.2
'@uiw/react-codemirror': 4.25.2(@babel/runtime@7.28.4)(@codemirror/autocomplete@6.19.0)(@codemirror/language@6.11.3)(@codemirror/lint@6.9.0)(@codemirror/search@6.5.11)(@codemirror/state@6.5.2)(@codemirror/theme-one-dark@6.1.3)(@codemirror/view@6.38.6)(codemirror@6.0.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
is-hotkey-esm: 1.0.0
@@ -15508,9 +15501,15 @@ snapshots:
'@sanity/visual-editing-types@1.1.8(@sanity/client@7.10.0(debug@4.4.1))(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))':
dependencies:
- '@sanity/client': 7.10.0
+ '@sanity/client': 7.10.0(debug@4.4.1)
+ optionalDependencies:
+ '@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
+
+ '@sanity/visual-editing-types@1.1.8(@sanity/client@7.10.0)(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))':
+ dependencies:
+ '@sanity/client': 7.10.0(debug@4.4.1)
optionalDependencies:
- '@sanity/types': 3.99.0(@types/react@19.1.2)
+ '@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@sanity/visual-editing-types@1.1.8(@sanity/client@7.12.0(debug@4.4.3))(@sanity/types@4.10.3(@types/react@19.1.2)(debug@4.4.3))':
dependencies:
@@ -15994,6 +15993,17 @@ snapshots:
'@vercel/edge@1.2.2': {}
+ '@vitejs/plugin-react@4.4.1(vite@6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))':
+ dependencies:
+ '@babel/core': 7.26.10
+ '@babel/plugin-transform-react-jsx-self': 7.25.9(@babel/core@7.26.10)
+ '@babel/plugin-transform-react-jsx-source': 7.25.9(@babel/core@7.26.10)
+ '@types/babel__core': 7.20.5
+ react-refresh: 0.17.0
+ vite: 6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ transitivePeerDependencies:
+ - supports-color
+
'@vitejs/plugin-react@4.4.1(vite@6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))':
dependencies:
'@babel/core': 7.26.10
@@ -16084,6 +16094,14 @@ snapshots:
chai: 5.2.0
tinyrainbow: 2.0.0
+ '@vitest/mocker@3.1.2(vite@6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))':
+ dependencies:
+ '@vitest/spy': 3.1.2
+ estree-walker: 3.0.3
+ magic-string: 0.30.17
+ optionalDependencies:
+ vite: 6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+
'@vitest/mocker@3.1.2(vite@6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))':
dependencies:
'@vitest/spy': 3.1.2
@@ -16765,8 +16783,8 @@ snapshots:
codemirror@6.0.2:
dependencies:
- '@codemirror/autocomplete': 6.19.0
- '@codemirror/commands': 6.9.0
+ '@codemirror/autocomplete': 6.19.1
+ '@codemirror/commands': 6.10.0
'@codemirror/language': 6.11.3
'@codemirror/lint': 6.9.0
'@codemirror/search': 6.5.11
@@ -17687,9 +17705,9 @@ snapshots:
eslint-visitor-keys@4.2.1: {}
- eslint@9.25.1(jiti@2.6.1):
+ eslint@9.25.1(jiti@2.4.2):
dependencies:
- '@eslint-community/eslint-utils': 4.4.1(eslint@9.25.1(jiti@2.6.1))
+ '@eslint-community/eslint-utils': 4.4.1(eslint@9.25.1(jiti@2.4.2))
'@eslint-community/regexpp': 4.12.1
'@eslint/config-array': 0.20.0
'@eslint/config-helpers': 0.2.1
@@ -17725,33 +17743,33 @@ snapshots:
natural-compare: 1.4.0
optionator: 0.9.4
optionalDependencies:
- jiti: 2.6.1
+ jiti: 2.4.2
transitivePeerDependencies:
- supports-color
- eslint@9.36.0(jiti@2.4.2):
+ eslint@9.25.1(jiti@2.6.1):
dependencies:
- '@eslint-community/eslint-utils': 4.9.0(eslint@9.36.0(jiti@2.4.2))
+ '@eslint-community/eslint-utils': 4.4.1(eslint@9.25.1(jiti@2.6.1))
'@eslint-community/regexpp': 4.12.1
- '@eslint/config-array': 0.21.0
- '@eslint/config-helpers': 0.3.1
- '@eslint/core': 0.15.2
+ '@eslint/config-array': 0.20.0
+ '@eslint/config-helpers': 0.2.1
+ '@eslint/core': 0.13.0
'@eslint/eslintrc': 3.3.1
- '@eslint/js': 9.36.0
- '@eslint/plugin-kit': 0.3.5
+ '@eslint/js': 9.25.1
+ '@eslint/plugin-kit': 0.2.8
'@humanfs/node': 0.16.6
'@humanwhocodes/module-importer': 1.0.1
'@humanwhocodes/retry': 0.4.2
- '@types/estree': 1.0.8
+ '@types/estree': 1.0.7
'@types/json-schema': 7.0.15
ajv: 6.12.6
chalk: 4.1.2
cross-spawn: 7.0.6
debug: 4.4.1(supports-color@8.1.1)
escape-string-regexp: 4.0.0
- eslint-scope: 8.4.0
- eslint-visitor-keys: 4.2.1
- espree: 10.4.0
+ eslint-scope: 8.3.0
+ eslint-visitor-keys: 4.2.0
+ espree: 10.3.0
esquery: 1.6.0
esutils: 2.0.3
fast-deep-equal: 3.1.3
@@ -17767,7 +17785,7 @@ snapshots:
natural-compare: 1.4.0
optionator: 0.9.4
optionalDependencies:
- jiti: 2.4.2
+ jiti: 2.6.1
transitivePeerDependencies:
- supports-color
@@ -18196,22 +18214,11 @@ snapshots:
hasown: 2.0.2
math-intrinsics: 1.1.0
- get-it@8.6.10:
- dependencies:
- '@types/follow-redirects': 1.14.4
- decompress-response: 7.0.0
- follow-redirects: 1.15.9(debug@4.4.1)
- is-retry-allowed: 2.2.0
- through2: 4.0.2
- tunnel-agent: 0.6.0
- transitivePeerDependencies:
- - debug
-
get-it@8.6.10(debug@4.4.1):
dependencies:
'@types/follow-redirects': 1.14.4
decompress-response: 7.0.0
- follow-redirects: 1.15.9(debug@4.4.1)
+ follow-redirects: 1.15.9(debug@4.4.3)
is-retry-allowed: 2.2.0
through2: 4.0.2
tunnel-agent: 0.6.0
@@ -18243,7 +18250,7 @@ snapshots:
get-latest-version@5.1.0:
dependencies:
- get-it: 8.6.10
+ get-it: 8.6.10(debug@4.4.1)
registry-auth-token: 5.0.2
registry-url: 5.1.0
semver: 7.7.1
@@ -19576,6 +19583,24 @@ snapshots:
motion-utils@12.6.3: {}
+ motion@12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1):
+ dependencies:
+ framer-motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
+ tslib: 2.8.1
+ optionalDependencies:
+ '@emotion/is-prop-valid': 1.2.2
+ react: 18.3.1
+ react-dom: 18.3.1(react@18.3.1)
+
+ motion@12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0):
+ dependencies:
+ framer-motion: 12.23.24(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
+ tslib: 2.8.1
+ optionalDependencies:
+ '@emotion/is-prop-valid': 1.2.2
+ react: 19.1.0
+ react-dom: 19.1.0(react@19.1.0)
+
ms@2.0.0: {}
ms@2.1.3: {}
@@ -20310,7 +20335,7 @@ snapshots:
react: 19.1.0
refractor: 5.0.0
unist-util-filter: 5.0.1
- unist-util-visit-parents: 6.0.1
+ unist-util-visit-parents: 6.0.2
react-refresh@0.17.0: {}
@@ -20760,178 +20785,7 @@ snapshots:
safer-buffer@2.1.2: {}
- sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1):
- dependencies:
- '@dnd-kit/core': 6.3.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- '@dnd-kit/modifiers': 6.0.1(@dnd-kit/core@6.3.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)
- '@dnd-kit/sortable': 7.0.2(@dnd-kit/core@6.3.1(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(react@19.1.0)
- '@dnd-kit/utilities': 3.2.2(react@19.1.0)
- '@juggle/resize-observer': 3.4.0
- '@mux/mux-player-react': 3.6.1(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- '@portabletext/block-tools': 1.1.38(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))(@types/react@19.1.2)
- '@portabletext/editor': 1.58.0(@sanity/schema@3.99.0(@types/react@19.1.2)(debug@4.4.1))(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))(@types/react@19.1.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(rxjs@7.8.2)
- '@portabletext/react': 3.2.4(react@19.1.0)
- '@portabletext/toolkit': 2.0.18
- '@rexxars/react-json-inspector': 9.0.1(react@19.1.0)
- '@sanity/asset-utils': 2.3.0
- '@sanity/bifur-client': 0.4.1
- '@sanity/cli': 3.99.0(@types/node@22.13.9)(@types/react@19.1.2)(lightningcss@1.29.1)(react@19.1.0)(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1)
- '@sanity/client': 7.10.0
- '@sanity/color': 3.0.6
- '@sanity/comlink': 3.1.1
- '@sanity/diff': 3.99.0
- '@sanity/diff-match-patch': 3.2.0
- '@sanity/diff-patch': 5.0.0
- '@sanity/eventsource': 5.0.2
- '@sanity/export': 3.45.3(@types/react@19.1.2)
- '@sanity/icons': 3.7.4(react@19.1.0)
- '@sanity/id-utils': 1.0.0
- '@sanity/image-url': 1.2.0
- '@sanity/import': 3.38.3(@types/react@19.1.2)
- '@sanity/insert-menu': 1.1.13(@emotion/is-prop-valid@1.2.2)(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
- '@sanity/logos': 2.2.2(react@19.1.0)
- '@sanity/media-library-types': 1.0.1
- '@sanity/message-protocol': 0.13.3
- '@sanity/migrate': 3.99.0(@types/react@19.1.2)
- '@sanity/mutator': 3.99.0(@types/react@19.1.2)
- '@sanity/presentation-comlink': 1.0.33(@sanity/client@7.10.0(debug@4.4.1))(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))
- '@sanity/preview-url-secret': 2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@19.1.0))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))
- '@sanity/schema': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
- '@sanity/sdk': 0.0.0-alpha.25(@types/react@19.1.2)(debug@4.4.1)(immer@10.1.3)(react@19.1.0)(use-sync-external-store@1.5.0(react@19.1.0))
- '@sanity/telemetry': 0.8.1(react@19.1.0)
- '@sanity/types': 3.99.0(@types/react@19.1.2)
- '@sanity/ui': 2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
- '@sanity/util': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
- '@sanity/uuid': 3.0.2
- '@sentry/react': 8.55.0(react@19.1.0)
- '@tanstack/react-table': 8.21.3(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- '@tanstack/react-virtual': 3.13.12(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- '@types/react-is': 19.2.0
- '@types/shallow-equals': 1.0.3
- '@types/speakingurl': 13.0.6
- '@types/tar-stream': 3.1.4
- '@types/use-sync-external-store': 1.5.0
- '@types/which': 3.0.4
- '@vitejs/plugin-react': 4.7.0(vite@6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
- '@xstate/react': 6.0.0(@types/react@19.1.2)(react@19.1.0)(xstate@5.20.0)
- archiver: 7.0.1
- arrify: 2.0.1
- async-mutex: 0.4.1
- chalk: 4.1.2
- chokidar: 3.6.0
- classnames: 2.5.1
- color2k: 2.0.3
- configstore: 5.0.1
- console-table-printer: 2.14.6
- dataloader: 2.2.3
- date-fns: 2.30.0
- debug: 4.4.1(supports-color@8.1.1)
- esbuild: 0.25.6
- esbuild-register: 3.6.0(esbuild@0.25.6)
- execa: 2.1.0
- exif-component: 1.0.1
- fast-deep-equal: 3.1.3
- form-data: 4.0.1
- framer-motion: 12.23.22(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- get-it: 8.6.10(debug@4.4.1)
- get-random-values-esm: 1.0.2
- groq-js: 1.19.0
- gunzip-maybe: 1.4.2
- history: 5.3.0
- i18next: 23.16.8
- import-fresh: 3.3.0
- is-hotkey-esm: 1.0.0
- is-tar: 1.0.0
- isomorphic-dompurify: 2.29.0(postcss@8.5.6)
- jsdom: 23.2.0
- jsdom-global: 3.0.2(jsdom@23.2.0)
- json-lexer: 1.2.0
- json-reduce: 3.0.0
- json5: 2.2.3
- lodash: 4.17.21
- log-symbols: 2.2.0
- mendoza: 3.0.8
- module-alias: 2.2.3
- nano-pubsub: 3.0.0
- nanoid: 3.3.11
- node-html-parser: 6.1.13
- observable-callback: 1.0.3(rxjs@7.8.2)
- oneline: 1.0.4
- open: 8.4.2
- p-map: 7.0.3
- path-to-regexp: 6.3.0
- peek-stream: 1.1.3
- pirates: 4.0.7
- player.style: 0.1.10(react@19.1.0)
- pluralize-esm: 9.0.5
- polished: 4.3.1
- preferred-pm: 4.1.1
- pretty-ms: 7.0.1
- quick-lru: 5.1.1
- raf: 3.4.1
- react: 19.1.0
- react-compiler-runtime: 19.1.0-rc.2(react@19.1.0)
- react-dom: 19.1.0(react@19.1.0)
- react-fast-compare: 3.2.2
- react-focus-lock: 2.13.6(@types/react@19.1.2)(react@19.1.0)
- react-i18next: 14.0.2(i18next@23.16.8)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- react-is: 18.3.1
- react-refractor: 2.2.0(react@19.1.0)
- react-rx: 4.2.1(react@19.1.0)(rxjs@7.8.2)
- read-pkg-up: 7.0.1
- refractor: 3.6.0
- resolve-from: 5.0.0
- resolve.exports: 2.0.3
- rimraf: 5.0.10
- rxjs: 7.8.2
- rxjs-exhaustmap-with-trailing: 2.1.1(rxjs@7.8.2)
- rxjs-mergemap-array: 0.1.0(rxjs@7.8.2)
- scroll-into-view-if-needed: 3.1.0
- scrollmirror: 1.2.4
- semver: 7.7.1
- shallow-equals: 1.0.0
- speakingurl: 14.0.1
- styled-components: 6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0)
- tar-fs: 2.1.4
- tar-stream: 3.1.7
- tinyglobby: 0.2.13
- urlpattern-polyfill: 10.1.0
- use-device-pixel-ratio: 1.1.2(react@19.1.0)
- use-effect-event: 2.0.3(react@19.1.0)
- use-hot-module-reload: 2.0.0(react@19.1.0)
- use-sync-external-store: 1.5.0(react@19.1.0)
- uuid: 11.1.0
- vite: 6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
- which: 5.0.0
- xstate: 5.20.0
- yargs: 17.7.2
- transitivePeerDependencies:
- - '@emotion/is-prop-valid'
- - '@types/node'
- - '@types/react'
- - '@types/react-dom'
- - bare-abort-controller
- - bufferutil
- - canvas
- - immer
- - jiti
- - less
- - lightningcss
- - postcss
- - react-native
- - react-native-b4a
- - sass
- - sass-embedded
- - stylus
- - sugarss
- - supports-color
- - terser
- - tsx
- - typescript
- - utf-8-validate
- - yaml
-
- sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1):
+ sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1):
dependencies:
'@dnd-kit/core': 6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@dnd-kit/modifiers': 6.0.1(@dnd-kit/core@6.3.1(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react@18.3.1)
@@ -20966,12 +20820,12 @@ snapshots:
'@sanity/migrate': 3.99.0(@types/react@19.1.2)
'@sanity/mutator': 3.99.0(@types/react@19.1.2)
'@sanity/presentation-comlink': 1.0.33(@sanity/client@7.10.0(debug@4.4.1))(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))
- '@sanity/preview-url-secret': 2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@18.3.1))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))
+ '@sanity/preview-url-secret': 2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@18.3.1))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.4.2)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))
'@sanity/schema': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@sanity/sdk': 0.0.0-alpha.25(@types/react@19.1.2)(debug@4.4.1)(immer@10.1.3)(react@18.3.1)(use-sync-external-store@1.5.0(react@18.3.1))
'@sanity/telemetry': 0.8.1(react@18.3.1)
'@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
- '@sanity/ui': 2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
+ '@sanity/ui': 2.16.22(@emotion/is-prop-valid@1.2.2)(react-dom@18.3.1(react@18.3.1))(react-is@18.3.1)(react@18.3.1)(styled-components@6.1.18(react-dom@18.3.1(react@18.3.1))(react@18.3.1))
'@sanity/util': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@sanity/uuid': 3.0.2
'@sentry/react': 8.55.0(react@18.3.1)
@@ -20983,7 +20837,7 @@ snapshots:
'@types/tar-stream': 3.1.4
'@types/use-sync-external-store': 1.5.0
'@types/which': 3.0.4
- '@vitejs/plugin-react': 4.7.0(vite@6.4.0(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
+ '@vitejs/plugin-react': 4.7.0(vite@6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
'@xstate/react': 6.0.0(@types/react@19.1.2)(react@18.3.1)(xstate@5.20.0)
archiver: 7.0.1
arrify: 2.0.1
@@ -21072,7 +20926,7 @@ snapshots:
use-hot-module-reload: 2.0.0(react@18.3.1)
use-sync-external-store: 1.5.0(react@18.3.1)
uuid: 11.1.0
- vite: 6.4.0(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ vite: 6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
which: 5.0.0
xstate: 5.20.0
yargs: 17.7.2
@@ -21136,13 +20990,13 @@ snapshots:
'@sanity/message-protocol': 0.13.3
'@sanity/migrate': 3.99.0(@types/react@19.1.2)
'@sanity/mutator': 3.99.0(@types/react@19.1.2)
- '@sanity/presentation-comlink': 1.0.33(@sanity/client@7.10.0(debug@4.4.1))(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))
- '@sanity/preview-url-secret': 2.1.15(@sanity/client@7.10.0(debug@4.4.1))(@sanity/icons@3.7.4(react@19.1.0))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))
+ '@sanity/presentation-comlink': 1.0.33(@sanity/client@7.10.0)(@sanity/types@3.99.0(@types/react@19.1.2)(debug@4.4.1))
+ '@sanity/preview-url-secret': 2.1.15(@sanity/client@7.10.0)(@sanity/icons@3.7.4(react@19.1.0))(sanity@3.99.0(@emotion/is-prop-valid@1.2.2)(@types/node@22.13.9)(@types/react-dom@19.1.3(@types/react@19.1.2))(@types/react@19.1.2)(immer@10.1.3)(jiti@2.6.1)(lightningcss@1.29.1)(postcss@8.5.6)(react-dom@19.1.0(react@19.1.0))(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))(terser@5.36.0)(tsx@4.19.4)(typescript@5.8.3)(yaml@2.7.1))
'@sanity/schema': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@sanity/sdk': 0.0.0-alpha.25(@types/react@19.1.2)(debug@4.4.1)(immer@10.1.3)(react@19.1.0)(use-sync-external-store@1.5.0(react@19.1.0))
'@sanity/telemetry': 0.8.1(react@19.1.0)
'@sanity/types': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
- '@sanity/ui': 2.16.21(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
+ '@sanity/ui': 2.16.22(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@18.3.1)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
'@sanity/util': 3.99.0(@types/react@19.1.2)(debug@4.4.1)
'@sanity/uuid': 3.0.2
'@sentry/react': 8.55.0(react@19.1.0)
@@ -21314,7 +21168,7 @@ snapshots:
'@sanity/sdk': 2.1.2(@types/react@19.1.2)(debug@4.4.3)(immer@10.1.3)(react@19.1.0)(use-sync-external-store@1.6.0(react@19.1.0))
'@sanity/telemetry': 0.8.1(react@19.1.0)
'@sanity/types': 4.10.3(@types/react@19.1.2)(debug@4.4.3)
- '@sanity/ui': 3.1.8(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
+ '@sanity/ui': 3.1.11(@emotion/is-prop-valid@1.2.2)(react-dom@19.1.0(react@19.1.0))(react-is@19.2.0)(react@19.1.0)(styled-components@6.1.18(react-dom@19.1.0(react@19.1.0))(react@19.1.0))
'@sanity/util': 4.10.3(@types/react@19.1.2)(debug@4.4.3)
'@sanity/uuid': 3.0.2
'@sentry/react': 8.55.0(react@19.1.0)
@@ -21972,7 +21826,7 @@ snapshots:
terser@5.36.0:
dependencies:
'@jridgewell/source-map': 0.3.6
- acorn: 8.14.0
+ acorn: 8.15.0
commander: 2.20.3
source-map-support: 0.5.21
@@ -22112,8 +21966,8 @@ snapshots:
tsx@4.19.4:
dependencies:
- esbuild: 0.25.2
- get-tsconfig: 4.10.0
+ esbuild: 0.25.10
+ get-tsconfig: 4.10.1
optionalDependencies:
fsevents: 2.3.3
@@ -22288,12 +22142,12 @@ snapshots:
unist-util-filter@5.0.1:
dependencies:
'@types/unist': 3.0.3
- unist-util-is: 6.0.0
- unist-util-visit-parents: 6.0.1
+ unist-util-is: 6.0.1
+ unist-util-visit-parents: 6.0.2
unist-util-is@4.1.0: {}
- unist-util-is@6.0.0:
+ unist-util-is@6.0.1:
dependencies:
'@types/unist': 3.0.3
@@ -22302,10 +22156,10 @@ snapshots:
'@types/unist': 2.0.11
unist-util-is: 4.1.0
- unist-util-visit-parents@6.0.1:
+ unist-util-visit-parents@6.0.2:
dependencies:
'@types/unist': 3.0.3
- unist-util-is: 6.0.0
+ unist-util-is: 6.0.1
universal-user-agent@6.0.1: {}
@@ -22478,13 +22332,34 @@ snapshots:
dependencies:
builtins: 1.0.3
+ vite-node@3.1.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1):
+ dependencies:
+ cac: 6.7.14
+ debug: 4.4.1(supports-color@8.1.1)
+ es-module-lexer: 1.6.0
+ pathe: 2.0.3
+ vite: 6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ transitivePeerDependencies:
+ - '@types/node'
+ - jiti
+ - less
+ - lightningcss
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
+ - supports-color
+ - terser
+ - tsx
+ - yaml
+
vite-node@3.1.2(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1):
dependencies:
cac: 6.7.14
debug: 4.4.1(supports-color@8.1.1)
es-module-lexer: 1.6.0
pathe: 2.0.3
- vite: 6.3.4(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ vite: 6.4.0(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
transitivePeerDependencies:
- '@types/node'
- jiti
@@ -22568,12 +22443,12 @@ snapshots:
vite@6.4.0(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1):
dependencies:
- esbuild: 0.25.6
- fdir: 6.4.4(picomatch@4.0.2)
- picomatch: 4.0.2
- postcss: 8.5.3
+ esbuild: 0.25.10
+ fdir: 6.5.0(picomatch@4.0.3)
+ picomatch: 4.0.3
+ postcss: 8.5.6
rollup: 4.45.1
- tinyglobby: 0.2.13
+ tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 22.13.9
fsevents: 2.3.3
@@ -22585,12 +22460,12 @@ snapshots:
vite@6.4.0(@types/node@22.13.9)(jiti@2.6.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1):
dependencies:
- esbuild: 0.25.6
- fdir: 6.4.4(picomatch@4.0.2)
- picomatch: 4.0.2
- postcss: 8.5.3
+ esbuild: 0.25.10
+ fdir: 6.5.0(picomatch@4.0.3)
+ picomatch: 4.0.3
+ postcss: 8.5.6
rollup: 4.45.1
- tinyglobby: 0.2.13
+ tinyglobby: 0.2.15
optionalDependencies:
'@types/node': 22.13.9
fsevents: 2.3.3
@@ -22617,6 +22492,46 @@ snapshots:
tsx: 4.19.4
yaml: 2.7.1
+ vitest@3.1.2(@types/node@22.13.9)(jiti@2.4.2)(jsdom@23.2.0)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1):
+ dependencies:
+ '@vitest/expect': 3.1.2
+ '@vitest/mocker': 3.1.2(vite@6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1))
+ '@vitest/pretty-format': 3.1.2
+ '@vitest/runner': 3.1.2
+ '@vitest/snapshot': 3.1.2
+ '@vitest/spy': 3.1.2
+ '@vitest/utils': 3.1.2
+ chai: 5.2.0
+ debug: 4.4.1(supports-color@8.1.1)
+ expect-type: 1.2.1
+ magic-string: 0.30.17
+ pathe: 2.0.3
+ std-env: 3.9.0
+ tinybench: 2.9.0
+ tinyexec: 0.3.2
+ tinyglobby: 0.2.13
+ tinypool: 1.0.2
+ tinyrainbow: 2.0.0
+ vite: 6.3.4(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ vite-node: 3.1.2(@types/node@22.13.9)(jiti@2.4.2)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1)
+ why-is-node-running: 2.3.0
+ optionalDependencies:
+ '@types/node': 22.13.9
+ jsdom: 23.2.0
+ transitivePeerDependencies:
+ - jiti
+ - less
+ - lightningcss
+ - msw
+ - sass
+ - sass-embedded
+ - stylus
+ - sugarss
+ - supports-color
+ - terser
+ - tsx
+ - yaml
+
vitest@3.1.2(@types/node@22.13.9)(jiti@2.6.1)(jsdom@25.0.1)(lightningcss@1.29.1)(terser@5.36.0)(tsx@4.19.4)(yaml@2.7.1):
dependencies:
'@vitest/expect': 3.1.2