@sanity/client 5.4.3-dev.4 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/index.browser.cjs.map +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/{types/_legacy.ts → types.ts} +73 -4
- package/umd/sanityClient.js +20 -18
- package/umd/sanityClient.min.js +3 -4
- package/src/types/index.ts +0 -2
- package/src/types/resultSourceMap.ts +0 -72
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ export async function updateDocumentTitle(_id, title) {
|
|
|
65
65
|
- [UMD](#umd)
|
|
66
66
|
- [Specifying API version](#specifying-api-version)
|
|
67
67
|
- [Performing queries](#performing-queries)
|
|
68
|
-
- [
|
|
68
|
+
- [Fetching Content Source Maps](#fetching-content-source-maps)
|
|
69
69
|
- [Listening to queries](#listening-to-queries)
|
|
70
70
|
- [Fetch a single document](#fetch-a-single-document)
|
|
71
71
|
- [Fetch multiple documents in one go](#fetch-multiple-documents-in-one-go)
|
|
@@ -405,15 +405,17 @@ client.fetch(query, params).then((bikes) => {
|
|
|
405
405
|
|
|
406
406
|
Perform a query using the given parameters (if any).
|
|
407
407
|
|
|
408
|
-
###
|
|
408
|
+
### Fetching Content Source Maps
|
|
409
|
+
|
|
410
|
+
Content Source Maps annotate fragments in your query results with metadata about its origin: the field, document, and dataset it originated from.
|
|
409
411
|
|
|
410
412
|
> **Note**
|
|
411
413
|
>
|
|
412
414
|
> [Content Source Maps][content-source-maps-intro] are available [as an API][content-source-maps] for select [Sanity enterprise customers][enterprise-cta]. [Contact our sales team for more information.][sales-cta]
|
|
413
415
|
|
|
414
|
-
[Visual editing][visual-editing] is available in [`@sanity/preview-kit/client`][preview-kit-client]. It offers both a turn-key solution and a flexible API for custom experiences.
|
|
416
|
+
A high level API using Content Source Maps for [Visual editing][visual-editing] is also available in [`@sanity/preview-kit/client`][preview-kit-client]. It offers both a turn-key solution and a flexible API for custom experiences.
|
|
415
417
|
|
|
416
|
-
|
|
418
|
+
Read the [Content Source Maps introduction][content-source-maps-intro] before diving in, and keep the [Content Source Maps reference][content-source-maps] handy.
|
|
417
419
|
|
|
418
420
|
Enabling Content Source Maps is a two-step process:
|
|
419
421
|
|