Skip to content

Commit 9b6f76a

Browse files
authored
chore: change @beta tags to @public (#514)
1 parent aa79bc7 commit 9b6f76a

File tree

10 files changed

+27
-27
lines changed

10 files changed

+27
-27
lines changed

packages/react/src/hooks/document/useApplyDocumentActions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {createCallbackHook} from '../helpers/createCallbackHook'
1212
import type {useEditDocument} from './useEditDocument'
1313

1414
/**
15-
* @beta
15+
* @public
1616
*/
1717
interface UseApplyDocumentActions {
1818
(): <
@@ -28,7 +28,7 @@ interface UseApplyDocumentActions {
2828
}
2929

3030
/**
31-
* @beta
31+
* @public
3232
*
3333
* Provides a stable callback function for applying one or more document actions.
3434
*

packages/react/src/hooks/document/useDocument.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ interface UseDocument {
5757
/**
5858
* ## useDocument via Type Inference (Recommended)
5959
*
60-
* @beta
60+
* @public
6161
*
6262
* The preferred way to use this hook when working with Sanity Typegen.
6363
*
@@ -132,7 +132,7 @@ interface UseDocument {
132132
: {data: SanityDocumentResult<TDocumentType, TDataset, TProjectId> | null}
133133

134134
/**
135-
* @beta
135+
* @public
136136
*
137137
* ## useDocument via Explicit Types
138138
*
@@ -202,7 +202,7 @@ interface UseDocument {
202202
}
203203

204204
/**
205-
* @beta
205+
* @public
206206
* Reads and subscribes to a document's realtime state, incorporating both local and remote changes.
207207
*
208208
* This hook comes in two main flavors to suit your needs:

packages/react/src/hooks/document/useDocumentEvent.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {useCallback, useEffect, useInsertionEffect, useRef} from 'react'
44
import {useSanityInstance} from '../context/useSanityInstance'
55

66
/**
7-
* @beta
7+
* @public
88
*/
99
export interface UseDocumentEventOptions<
1010
TDataset extends string = string,
@@ -15,7 +15,7 @@ export interface UseDocumentEventOptions<
1515

1616
/**
1717
*
18-
* @beta
18+
* @public
1919
*
2020
* Subscribes an event handler to events in your application's document store.
2121
*

packages/react/src/hooks/document/useDocumentSyncStatus.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ type UseDocumentSyncStatus = {
4646
}
4747

4848
/**
49-
* @beta
49+
* @public
5050
* @function
5151
*/
5252
export const useDocumentSyncStatus: UseDocumentSyncStatus = createStateSourceHook({

packages/react/src/hooks/document/useEditDocument.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ type Updater<TValue> = TValue | ((currentValue: TValue) => TValue)
1818

1919
// Overload 1: No path, relies on Typegen
2020
/**
21-
* @beta
21+
* @public
2222
* Edit an entire document, relying on Typegen for the type.
2323
*
2424
* @param options - Document options including `documentId`, `documentType`, and optionally `projectId`/`dataset`.
@@ -37,7 +37,7 @@ export function useEditDocument<
3737

3838
// Overload 2: Path provided, relies on Typegen
3939
/**
40-
* @beta
40+
* @public
4141
* Edit a specific path within a document, relying on Typegen for the type.
4242
*
4343
* @param options - Document options including `documentId`, `documentType`, `path`, and optionally `projectId`/`dataset`.
@@ -57,7 +57,7 @@ export function useEditDocument<
5757

5858
// Overload 3: Explicit type, no path
5959
/**
60-
* @beta
60+
* @public
6161
* Edit an entire document with an explicit type `TData`.
6262
*
6363
* @param options - Document options including `documentId` and optionally `projectId`/`dataset`.
@@ -70,7 +70,7 @@ export function useEditDocument<TData>(
7070

7171
// Overload 4: Explicit type, path provided
7272
/**
73-
* @beta
73+
* @public
7474
* Edit a specific path within a document with an explicit type `TData`.
7575
*
7676
* @param options - Document options including `documentId`, `path`, and optionally `projectId`/`dataset`.
@@ -82,7 +82,7 @@ export function useEditDocument<TData>(
8282
): (nextValue: Updater<TData>) => Promise<ActionsResult>
8383

8484
/**
85-
* @beta
85+
* @public
8686
* Provides a stable function to apply edits to a document or a specific path within it.
8787
*
8888
* @category Documents

packages/react/src/hooks/documents/useDocuments.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DEFAULT_BATCH_SIZE = 25
1616
/**
1717
* Configuration options for the useDocuments hook
1818
*
19-
* @beta
19+
* @public
2020
* @category Types
2121
*/
2222
export interface DocumentsOptions<
@@ -50,7 +50,7 @@ export interface DocumentsOptions<
5050
/**
5151
* Return value from the useDocuments hook
5252
*
53-
* @beta
53+
* @public
5454
* @category Types
5555
*/
5656
export interface DocumentsResponse<
@@ -85,7 +85,7 @@ export interface DocumentsResponse<
8585
* with infinite scrolling support. The number of document handles returned per batch is customizable,
8686
* and additional batches can be loaded using the supplied `loadMore` function.
8787
*
88-
* @beta
88+
* @public
8989
* @category Documents
9090
* @param options - Configuration options for the infinite list
9191
* @returns An object containing the list of document handles, the loading state, the total count of retrieved document handles, and a function to load more

packages/react/src/hooks/paginatedDocuments/usePaginatedDocuments.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {useQuery} from '../query/useQuery'
99
/**
1010
* Configuration options for the usePaginatedDocuments hook
1111
*
12-
* @beta
12+
* @public
1313
* @category Types
1414
*/
1515
export interface PaginatedDocumentsOptions<
@@ -39,7 +39,7 @@ export interface PaginatedDocumentsOptions<
3939
/**
4040
* Return value from the usePaginatedDocuments hook
4141
*
42-
* @beta
42+
* @public
4343
* @category Types
4444
*/
4545
export interface PaginatedDocumentsResponse<
@@ -130,7 +130,7 @@ export interface PaginatedDocumentsResponse<
130130
* with support for traditional paginated interfaces. The number of document handles returned per page is customizable,
131131
* while page navigation is handled via the included navigation functions.
132132
*
133-
* @beta
133+
* @public
134134
* @category Documents
135135
* @param options - Configuration options for the paginated list
136136
* @returns An object containing the list of document handles, pagination details, and functions to navigate between pages

packages/react/src/hooks/preview/useDocumentPreview.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {distinctUntilChanged, EMPTY, Observable, startWith, switchMap} from 'rxj
55
import {useSanityInstance} from '../context/useSanityInstance'
66

77
/**
8-
* @beta
8+
* @public
99
* @category Types
1010
*/
1111
export interface useDocumentPreviewOptions extends DocumentHandle {
@@ -17,7 +17,7 @@ export interface useDocumentPreviewOptions extends DocumentHandle {
1717
}
1818

1919
/**
20-
* @beta
20+
* @public
2121
* @category Types
2222
*/
2323
export interface useDocumentPreviewResults {
@@ -28,7 +28,7 @@ export interface useDocumentPreviewResults {
2828
}
2929

3030
/**
31-
* @beta
31+
* @public
3232
*
3333
* Returns the preview values of a document (specified via a `DocumentHandle`),
3434
* including the document’s `title`, `subtitle`, `media`, and `status`. These values are live and will update in realtime.

packages/react/src/hooks/projection/useDocumentProjection.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export interface useDocumentProjectionResults<TData> {
5959

6060
// Overload 1: Relies on Typegen
6161
/**
62-
* @beta
62+
* @public
6363
* Fetch a projection, relying on Typegen for the return type based on the handle and projection.
6464
*
6565
* @category Documents
@@ -127,7 +127,7 @@ export function useDocumentProjection<
127127

128128
// Overload 2: Explicit type provided
129129
/**
130-
* @beta
130+
* @public
131131
* Fetch a projection with an explicitly defined return type `TData`.
132132
*
133133
* @param options - Options including the document handle properties (`documentId`, etc.) and the `projection`.

packages/react/src/hooks/query/useQuery.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {useSanityInstance} from '../context/useSanityInstance'
1212

1313
// Overload 1: Inferred Type (using Typegen)
1414
/**
15-
* @beta
15+
* @public
1616
* Executes a GROQ query, inferring the result type from the query string and options.
1717
* Leverages Sanity Typegen if configured for enhanced type safety.
1818
*
@@ -81,7 +81,7 @@ export function useQuery<
8181

8282
// Overload 2: Explicit Type Provided
8383
/**
84-
* @beta
84+
* @public
8585
* Executes a GROQ query with an explicitly provided result type `TData`.
8686
*
8787
* @param options - Configuration for the query, including `query`, optional `params`, `projectId`, `dataset`, etc.
@@ -116,7 +116,7 @@ export function useQuery<TData>(options: QueryOptions): {
116116
}
117117

118118
/**
119-
* @beta
119+
* @public
120120
* Fetches data and subscribes to real-time updates using a GROQ query.
121121
*
122122
* @remarks

0 commit comments

Comments
 (0)