@sanity/client 8.3.0 → 8.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/{browserUpload-2tz6Sdqp.js → browserUpload-C7PwCs-C.js} +6 -9
  2. package/dist/browserUpload-C7PwCs-C.js.map +1 -0
  3. package/dist/{browserUpload-CwpNx7Vl.js → browserUpload-D-2Rmfjo.js} +6 -9
  4. package/dist/browserUpload-D-2Rmfjo.js.map +1 -0
  5. package/dist/{config-3wiPP-sZ.js → config-CgJ16jET.js} +4 -2
  6. package/dist/config-CgJ16jET.js.map +1 -0
  7. package/dist/csm.js +1 -1
  8. package/dist/{dist-C9ExSk2R.js → dist-C5K_YcEU.js} +3 -2
  9. package/dist/{dist-C9ExSk2R.js.map → dist-C5K_YcEU.js.map} +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.js +912 -75
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.node.d.ts +3255 -2
  14. package/dist/index.node.js +835 -19
  15. package/dist/index.node.js.map +1 -1
  16. package/dist/media-library.d.ts +1 -1
  17. package/dist/rolldown-runtime-4YWMqDIC.js +9 -0
  18. package/dist/{stegaEncodeSourceMap-DbM2fTN4.js → stegaEncodeSourceMap-CO1HKnm2.js} +2 -2
  19. package/dist/{stegaEncodeSourceMap-DbM2fTN4.js.map → stegaEncodeSourceMap-CO1HKnm2.js.map} +1 -1
  20. package/dist/{types-0x2hPfhJ.d.ts → types-DiPF0ENT.d.ts} +3256 -3
  21. package/package.json +3 -2
  22. package/src/SanityClient.ts +7 -0
  23. package/src/assets/AssetsClient.ts +5 -0
  24. package/src/config.ts +1 -0
  25. package/src/context/ContextClient.ts +1006 -0
  26. package/src/context/openapi.json +5345 -0
  27. package/src/context/reads.ts +206 -0
  28. package/src/context/store.ts +100 -0
  29. package/src/context/types.gen.ts +2428 -0
  30. package/src/context/types.ts +228 -0
  31. package/src/data/dataMethods.ts +4 -1
  32. package/src/defineCreateClient.ts +1 -0
  33. package/src/http/browserUpload.ts +0 -12
  34. package/src/types.ts +23 -2
  35. package/src/validators.ts +1 -0
  36. package/dist/browserUpload-2tz6Sdqp.js.map +0 -1
  37. package/dist/browserUpload-CwpNx7Vl.js.map +0 -1
  38. package/dist/config-3wiPP-sZ.js.map +0 -1
@@ -1,8 +1,5 @@
1
1
  import { a as ServerError, n as parseJsonText, r as ClientError, s as httpResponseFromFetch } from "./request-SnMg7nUX.js";
2
2
  import { Observable } from "rxjs";
3
- import { createDebug } from "obug";
4
- const log = createDebug("sanity:client");
5
- let nextRequestId = 1;
6
3
  /**
7
4
  * Run an asset upload through `XMLHttpRequest` so we can surface per-chunk
8
5
  * upload progress events. get-it v9 / fetch has no equivalent hook in the
@@ -13,8 +10,8 @@ let nextRequestId = 1;
13
10
  */
14
11
  function uploadWithProgress(options) {
15
12
  return new Observable((subscriber) => {
16
- let xhr = new XMLHttpRequest(), requestId = nextRequestId++, { url, method, headers, body, withCredentials, timeout, signal } = options;
17
- log("[%d] %s %s (XHR upload with progress)", requestId, method, url), xhr.open(method, url), xhr.withCredentials = withCredentials, typeof timeout == "number" && timeout > 0 && (xhr.timeout = timeout);
13
+ let xhr = new XMLHttpRequest(), { url, method, headers, body, withCredentials, timeout, signal } = options;
14
+ xhr.open(method, url), xhr.withCredentials = withCredentials, typeof timeout == "number" && timeout > 0 && (xhr.timeout = timeout);
18
15
  for (let [key, value] of Object.entries(headers)) xhr.setRequestHeader(key, value);
19
16
  xhr.upload.onprogress = (e) => {
20
17
  subscriber.next({
@@ -26,7 +23,7 @@ function uploadWithProgress(options) {
26
23
  lengthComputable: e.lengthComputable
27
24
  });
28
25
  }, xhr.onload = () => {
29
- if (log("[%d] %s %s — %d", requestId, method, url, xhr.status), xhr.status >= 400) {
26
+ if (xhr.status >= 400) {
30
27
  let errorHeaders = parseXhrResponseHeaders(xhr.getAllResponseHeaders()), canonical = httpResponseFromFetch({
31
28
  status: xhr.status,
32
29
  statusText: xhr.statusText,
@@ -49,9 +46,9 @@ function uploadWithProgress(options) {
49
46
  body: responseBody
50
47
  }), subscriber.complete();
51
48
  }, xhr.onerror = () => {
52
- log("[%d] %s %s — network error", requestId, method, url), subscriber.error(/* @__PURE__ */ Error("XHR upload network error"));
49
+ subscriber.error(/* @__PURE__ */ Error("XHR upload network error"));
53
50
  }, xhr.ontimeout = () => {
54
- log("[%d] %s %s — timed out after %dms", requestId, method, url, timeout), subscriber.error(new DOMException(`The operation timed out after ${timeout}ms while attempting to reach ${url}`, "TimeoutError"));
51
+ subscriber.error(new DOMException(`The operation timed out after ${timeout}ms while attempting to reach ${url}`, "TimeoutError"));
55
52
  }, xhr.onabort = () => {
56
53
  subscriber.error(new DOMException("Upload aborted", "AbortError"));
57
54
  };
@@ -84,4 +81,4 @@ function parseXhrResponseHeaders(raw) {
84
81
  }
85
82
  export { uploadWithProgress };
86
83
 
87
- //# sourceMappingURL=browserUpload-2tz6Sdqp.js.map
84
+ //# sourceMappingURL=browserUpload-C7PwCs-C.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browserUpload-C7PwCs-C.js","names":[],"sources":["../src/http/browserUpload.ts"],"sourcesContent":["import {Observable} from 'rxjs'\n\nimport type {UploadEvent} from '../types'\nimport {ClientError, httpResponseFromFetch, ServerError} from './errors'\nimport {parseJsonText} from './request'\n\n/**\n * Options for a browser-side asset upload that needs progress events.\n *\n * @internal\n */\nexport interface BrowserUploadOptions {\n url: string\n method: string\n headers: Record<string, string>\n body: unknown\n withCredentials: boolean\n /** Milliseconds before the upload is aborted; `false` and `0` both disable the timeout. */\n timeout?: number | false\n signal?: AbortSignal\n}\n\n/**\n * Run an asset upload through `XMLHttpRequest` so we can surface per-chunk\n * upload progress events. get-it v9 / fetch has no equivalent hook in the\n * browser, so the observable asset-upload API falls back to this path when\n * `XMLHttpRequest` is available.\n *\n * @internal\n */\nexport function uploadWithProgress<T>(options: BrowserUploadOptions): Observable<UploadEvent<T>> {\n return new Observable<UploadEvent<T>>((subscriber) => {\n const xhr = new XMLHttpRequest()\n const {url, method, headers, body, withCredentials, timeout, signal} = options\n\n xhr.open(method, url)\n xhr.withCredentials = withCredentials\n if (typeof timeout === 'number' && timeout > 0) {\n xhr.timeout = timeout\n }\n\n for (const [key, value] of Object.entries(headers)) {\n xhr.setRequestHeader(key, value)\n }\n\n xhr.upload.onprogress = (e) => {\n subscriber.next({\n type: 'progress',\n stage: 'upload',\n percent: e.lengthComputable ? Math.round((e.loaded / e.total) * 100) : 0,\n total: e.total || undefined,\n loaded: e.loaded,\n lengthComputable: e.lengthComputable,\n })\n }\n\n xhr.onload = () => {\n if (xhr.status >= 400) {\n // Same typed errors as the fetch transport, so consumers can keep\n // detecting `ClientError`/`ServerError` and reading `statusCode`,\n // `responseBody` and the structured API `details` on failed uploads.\n const errorHeaders = parseXhrResponseHeaders(xhr.getAllResponseHeaders())\n const canonical = httpResponseFromFetch(\n {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: errorHeaders,\n body: parseJsonText(xhr.responseText, errorHeaders),\n url: xhr.responseURL,\n },\n url,\n method,\n )\n subscriber.error(\n xhr.status >= 500 ? new ServerError(canonical) : new ClientError(canonical),\n )\n return\n }\n\n let responseBody: T\n try {\n responseBody = JSON.parse(xhr.responseText) as T\n } catch {\n subscriber.error(new Error('Failed to parse upload response as JSON'))\n return\n }\n\n subscriber.next({type: 'response', body: responseBody})\n subscriber.complete()\n }\n\n xhr.onerror = () => {\n subscriber.error(new Error('XHR upload network error'))\n }\n\n xhr.ontimeout = () => {\n // Same error shape as the fetch transport's timeout rejection.\n subscriber.error(\n new DOMException(\n `The operation timed out after ${timeout}ms while attempting to reach ${url}`,\n 'TimeoutError',\n ),\n )\n }\n\n xhr.onabort = () => {\n subscriber.error(new DOMException('Upload aborted', 'AbortError'))\n }\n\n const onSignalAbort = () => xhr.abort()\n if (signal) {\n if (signal.aborted) {\n // `xhr.abort()` before `send()` fires no `abort` event per spec, so\n // error out directly instead of relying on `onabort`.\n subscriber.error(new DOMException('Upload aborted', 'AbortError'))\n return undefined\n }\n signal.addEventListener('abort', onSignalAbort, {once: true})\n }\n\n xhr.send(body as XMLHttpRequestBodyInit)\n\n // Unsubscribing cancels the in-flight upload, mirroring how the fetch\n // path aborts its request (`_observe`). After settle this is a no-op —\n // except for detaching from the caller's signal, which may be long-lived\n // and must not accumulate a listener per upload.\n return () => {\n signal?.removeEventListener('abort', onSignalAbort)\n xhr.abort()\n }\n })\n}\n\n/**\n * Parse `XMLHttpRequest.getAllResponseHeaders()` output (CRLF-separated\n * `name: value` lines) into a `Headers` instance.\n */\nfunction parseXhrResponseHeaders(raw: string): Headers {\n const headers = new Headers()\n for (const line of raw.split('\\r\\n')) {\n const separator = line.indexOf(':')\n if (separator <= 0) continue\n try {\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim())\n } catch {\n // Skip header lines the Headers constructor rejects — better a partial\n // header record on the error than no error details at all.\n }\n }\n return headers\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,mBAAsB,SAA2D;CAC/F,OAAO,IAAI,YAA4B,eAAe;EACpD,IAAM,MAAM,IAAI,eAAe,GACzB,EAAC,KAAK,QAAQ,SAAS,MAAM,iBAAiB,SAAS,WAAU;EAIvE,AAFA,IAAI,KAAK,QAAQ,GAAG,GACpB,IAAI,kBAAkB,iBAClB,OAAO,WAAY,YAAY,UAAU,MAC3C,IAAI,UAAU;EAGhB,KAAK,IAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,GAC/C,IAAI,iBAAiB,KAAK,KAAK;EA+DjC,AA5DA,IAAI,OAAO,cAAc,MAAM;GAC7B,WAAW,KAAK;IACd,MAAM;IACN,OAAO;IACP,SAAS,EAAE,mBAAmB,KAAK,MAAO,EAAE,SAAS,EAAE,QAAS,GAAG,IAAI;IACvE,OAAO,EAAE,SAAS,KAAA;IAClB,QAAQ,EAAE;IACV,kBAAkB,EAAE;GACtB,CAAC;EACH,GAEA,IAAI,eAAe;GACjB,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,mBAAa,IACjB,IAAI;GACF,QAAQ,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,KAAK,GAAG,KAAK,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;EAClF,QAAQ,CAGR;CACF;CACA,OAAO;AACT"}
@@ -1,8 +1,5 @@
1
1
  import { a as ServerError, n as parseJsonText, r as ClientError, s as httpResponseFromFetch } from "./request-BhMuKj0D.js";
2
2
  import { Observable } from "rxjs";
3
- import { createDebug } from "obug";
4
- const log = createDebug("sanity:client");
5
- let nextRequestId = 1;
6
3
  /**
7
4
  * Run an asset upload through `XMLHttpRequest` so we can surface per-chunk
8
5
  * upload progress events. get-it v9 / fetch has no equivalent hook in the
@@ -13,8 +10,8 @@ let nextRequestId = 1;
13
10
  */
14
11
  function uploadWithProgress(options) {
15
12
  return new Observable((subscriber) => {
16
- let xhr = new XMLHttpRequest(), requestId = nextRequestId++, { url, method, headers, body, withCredentials, timeout, signal } = options;
17
- log("[%d] %s %s (XHR upload with progress)", requestId, method, url), xhr.open(method, url), xhr.withCredentials = withCredentials, typeof timeout == "number" && timeout > 0 && (xhr.timeout = timeout);
13
+ let xhr = new XMLHttpRequest(), { url, method, headers, body, withCredentials, timeout, signal } = options;
14
+ xhr.open(method, url), xhr.withCredentials = withCredentials, typeof timeout == "number" && timeout > 0 && (xhr.timeout = timeout);
18
15
  for (let [key, value] of Object.entries(headers)) xhr.setRequestHeader(key, value);
19
16
  xhr.upload.onprogress = (e) => {
20
17
  subscriber.next({
@@ -26,7 +23,7 @@ function uploadWithProgress(options) {
26
23
  lengthComputable: e.lengthComputable
27
24
  });
28
25
  }, xhr.onload = () => {
29
- if (log("[%d] %s %s — %d", requestId, method, url, xhr.status), xhr.status >= 400) {
26
+ if (xhr.status >= 400) {
30
27
  let errorHeaders = parseXhrResponseHeaders(xhr.getAllResponseHeaders()), canonical = httpResponseFromFetch({
31
28
  status: xhr.status,
32
29
  statusText: xhr.statusText,
@@ -49,9 +46,9 @@ function uploadWithProgress(options) {
49
46
  body: responseBody
50
47
  }), subscriber.complete();
51
48
  }, xhr.onerror = () => {
52
- log("[%d] %s %s — network error", requestId, method, url), subscriber.error(/* @__PURE__ */ Error("XHR upload network error"));
49
+ subscriber.error(/* @__PURE__ */ Error("XHR upload network error"));
53
50
  }, xhr.ontimeout = () => {
54
- log("[%d] %s %s — timed out after %dms", requestId, method, url, timeout), subscriber.error(new DOMException(`The operation timed out after ${timeout}ms while attempting to reach ${url}`, "TimeoutError"));
51
+ subscriber.error(new DOMException(`The operation timed out after ${timeout}ms while attempting to reach ${url}`, "TimeoutError"));
55
52
  }, xhr.onabort = () => {
56
53
  subscriber.error(new DOMException("Upload aborted", "AbortError"));
57
54
  };
@@ -84,4 +81,4 @@ function parseXhrResponseHeaders(raw) {
84
81
  }
85
82
  export { uploadWithProgress };
86
83
 
87
- //# sourceMappingURL=browserUpload-CwpNx7Vl.js.map
84
+ //# sourceMappingURL=browserUpload-D-2Rmfjo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"browserUpload-D-2Rmfjo.js","names":[],"sources":["../src/http/browserUpload.ts"],"sourcesContent":["import {Observable} from 'rxjs'\n\nimport type {UploadEvent} from '../types'\nimport {ClientError, httpResponseFromFetch, ServerError} from './errors'\nimport {parseJsonText} from './request'\n\n/**\n * Options for a browser-side asset upload that needs progress events.\n *\n * @internal\n */\nexport interface BrowserUploadOptions {\n url: string\n method: string\n headers: Record<string, string>\n body: unknown\n withCredentials: boolean\n /** Milliseconds before the upload is aborted; `false` and `0` both disable the timeout. */\n timeout?: number | false\n signal?: AbortSignal\n}\n\n/**\n * Run an asset upload through `XMLHttpRequest` so we can surface per-chunk\n * upload progress events. get-it v9 / fetch has no equivalent hook in the\n * browser, so the observable asset-upload API falls back to this path when\n * `XMLHttpRequest` is available.\n *\n * @internal\n */\nexport function uploadWithProgress<T>(options: BrowserUploadOptions): Observable<UploadEvent<T>> {\n return new Observable<UploadEvent<T>>((subscriber) => {\n const xhr = new XMLHttpRequest()\n const {url, method, headers, body, withCredentials, timeout, signal} = options\n\n xhr.open(method, url)\n xhr.withCredentials = withCredentials\n if (typeof timeout === 'number' && timeout > 0) {\n xhr.timeout = timeout\n }\n\n for (const [key, value] of Object.entries(headers)) {\n xhr.setRequestHeader(key, value)\n }\n\n xhr.upload.onprogress = (e) => {\n subscriber.next({\n type: 'progress',\n stage: 'upload',\n percent: e.lengthComputable ? Math.round((e.loaded / e.total) * 100) : 0,\n total: e.total || undefined,\n loaded: e.loaded,\n lengthComputable: e.lengthComputable,\n })\n }\n\n xhr.onload = () => {\n if (xhr.status >= 400) {\n // Same typed errors as the fetch transport, so consumers can keep\n // detecting `ClientError`/`ServerError` and reading `statusCode`,\n // `responseBody` and the structured API `details` on failed uploads.\n const errorHeaders = parseXhrResponseHeaders(xhr.getAllResponseHeaders())\n const canonical = httpResponseFromFetch(\n {\n status: xhr.status,\n statusText: xhr.statusText,\n headers: errorHeaders,\n body: parseJsonText(xhr.responseText, errorHeaders),\n url: xhr.responseURL,\n },\n url,\n method,\n )\n subscriber.error(\n xhr.status >= 500 ? new ServerError(canonical) : new ClientError(canonical),\n )\n return\n }\n\n let responseBody: T\n try {\n responseBody = JSON.parse(xhr.responseText) as T\n } catch {\n subscriber.error(new Error('Failed to parse upload response as JSON'))\n return\n }\n\n subscriber.next({type: 'response', body: responseBody})\n subscriber.complete()\n }\n\n xhr.onerror = () => {\n subscriber.error(new Error('XHR upload network error'))\n }\n\n xhr.ontimeout = () => {\n // Same error shape as the fetch transport's timeout rejection.\n subscriber.error(\n new DOMException(\n `The operation timed out after ${timeout}ms while attempting to reach ${url}`,\n 'TimeoutError',\n ),\n )\n }\n\n xhr.onabort = () => {\n subscriber.error(new DOMException('Upload aborted', 'AbortError'))\n }\n\n const onSignalAbort = () => xhr.abort()\n if (signal) {\n if (signal.aborted) {\n // `xhr.abort()` before `send()` fires no `abort` event per spec, so\n // error out directly instead of relying on `onabort`.\n subscriber.error(new DOMException('Upload aborted', 'AbortError'))\n return undefined\n }\n signal.addEventListener('abort', onSignalAbort, {once: true})\n }\n\n xhr.send(body as XMLHttpRequestBodyInit)\n\n // Unsubscribing cancels the in-flight upload, mirroring how the fetch\n // path aborts its request (`_observe`). After settle this is a no-op —\n // except for detaching from the caller's signal, which may be long-lived\n // and must not accumulate a listener per upload.\n return () => {\n signal?.removeEventListener('abort', onSignalAbort)\n xhr.abort()\n }\n })\n}\n\n/**\n * Parse `XMLHttpRequest.getAllResponseHeaders()` output (CRLF-separated\n * `name: value` lines) into a `Headers` instance.\n */\nfunction parseXhrResponseHeaders(raw: string): Headers {\n const headers = new Headers()\n for (const line of raw.split('\\r\\n')) {\n const separator = line.indexOf(':')\n if (separator <= 0) continue\n try {\n headers.append(line.slice(0, separator).trim(), line.slice(separator + 1).trim())\n } catch {\n // Skip header lines the Headers constructor rejects — better a partial\n // header record on the error than no error details at all.\n }\n }\n return headers\n}\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,mBAAsB,SAA2D;CAC/F,OAAO,IAAI,YAA4B,eAAe;EACpD,IAAM,MAAM,IAAI,eAAe,GACzB,EAAC,KAAK,QAAQ,SAAS,MAAM,iBAAiB,SAAS,WAAU;EAIvE,AAFA,IAAI,KAAK,QAAQ,GAAG,GACpB,IAAI,kBAAkB,iBAClB,OAAO,WAAY,YAAY,UAAU,MAC3C,IAAI,UAAU;EAGhB,KAAK,IAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,GAC/C,IAAI,iBAAiB,KAAK,KAAK;EA+DjC,AA5DA,IAAI,OAAO,cAAc,MAAM;GAC7B,WAAW,KAAK;IACd,MAAM;IACN,OAAO;IACP,SAAS,EAAE,mBAAmB,KAAK,MAAO,EAAE,SAAS,EAAE,QAAS,GAAG,IAAI;IACvE,OAAO,EAAE,SAAS,KAAA;IAClB,QAAQ,EAAE;IACV,kBAAkB,EAAE;GACtB,CAAC;EACH,GAEA,IAAI,eAAe;GACjB,IAAI,IAAI,UAAU,KAAK;IAIrB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,OAAO,KAAK,MAAM,GAAG,SAAS,CAAC,CAAC,KAAK,GAAG,KAAK,MAAM,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC;EAClF,QAAQ,CAGR;CACF;CACA,OAAO;AACT"}
@@ -54,6 +54,7 @@ const VALID_ASSET_TYPES = ["image", "file"], VALID_INSERT_LOCATIONS = [
54
54
  if (id.split(".").length !== 2) throw Error("Dataset resource ID must be in the format \"project.dataset\"");
55
55
  return;
56
56
  case "dashboard":
57
+ case "knowledge-base":
57
58
  case "media-library":
58
59
  case "canvas": return;
59
60
  default: throw Error(`Unsupported resource type: ${type.toString()}`);
@@ -102,7 +103,8 @@ const initConfig = (config, prevConfig) => {
102
103
  specifiedConfig.apiVersion || printNoApiVersionSpecifiedWarning();
103
104
  let newConfig = {
104
105
  ...defaultConfig,
105
- ...specifiedConfig
106
+ ...specifiedConfig,
107
+ apiHost: specifiedConfig.apiHost ?? defaultConfig.apiHost
106
108
  };
107
109
  newConfig["~experimental_resource"] && !newConfig.resource && (printDeprecatedResourceConfigWarning(), newConfig.resource = newConfig["~experimental_resource"]);
108
110
  let resourceConfig$1 = newConfig.resource, projectBased = newConfig.useProjectHostname && !resourceConfig$1;
@@ -123,4 +125,4 @@ const initConfig = (config, prevConfig) => {
123
125
  };
124
126
  export { validateDocumentId as _, printCreateVersionWithBaseIdWarning as a, validateVersionIdMatch as b, printPreviewDraftsDeprecationWarning as c, requestTag as d, requireDocumentId as f, validateAssetType as g, resourceGuard as h, printCdnPreviewDraftsWarning as i, dataset as l, resourceConfig as m, initConfig as n, printDeprecatedUriOptionWarning as o, requireDocumentType as p, validateApiPerspective as r, printNoDefaultExport as s, defaultConfig as t, hasDataset as u, validateInsert as v, validateObject as y };
125
127
 
126
- //# sourceMappingURL=config-3wiPP-sZ.js.map
128
+ //# sourceMappingURL=config-CgJ16jET.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-CgJ16jET.js","names":["resourceConfig","validate.requestTag"],"sources":["../src/generateHelpUrl.ts","../src/validators.ts","../src/util/once.ts","../src/warnings.ts","../src/config.ts"],"sourcesContent":["const BASE_URL = 'https://www.sanity.io/help/'\n\nexport function generateHelpUrl(slug: string) {\n return BASE_URL + slug\n}\n","import type {Any, InitializedClientConfig, SanityDocumentStub} from './types'\n\nconst VALID_ASSET_TYPES = ['image', 'file']\nconst VALID_INSERT_LOCATIONS = ['before', 'after', 'replace']\n\nexport const dataset = (name: string) => {\n if (!/^(~[a-z0-9]{1}[-\\w]{0,63}|[a-z0-9]{1}[-\\w]{0,63})$/.test(name)) {\n throw new Error(\n 'Datasets can only contain lowercase characters, numbers, underscores and dashes, and start with tilde, and be maximum 64 characters',\n )\n }\n}\n\nexport const projectId = (id: string) => {\n if (!/^[-a-z0-9]+$/i.test(id)) {\n throw new Error('`projectId` can only contain only a-z, 0-9 and dashes')\n }\n}\n\nexport const validateAssetType = (type: string) => {\n if (VALID_ASSET_TYPES.indexOf(type) === -1) {\n throw new Error(`Invalid asset type: ${type}. Must be one of ${VALID_ASSET_TYPES.join(', ')}`)\n }\n}\n\nexport const validateObject = (op: string, val: Any) => {\n if (val === null || typeof val !== 'object' || Array.isArray(val)) {\n throw new Error(`${op}() takes an object of properties`)\n }\n}\n\nexport const validateDocumentId = (op: string, id: string) => {\n if (typeof id !== 'string' || !/^[a-z0-9_][a-z0-9_.-]{0,127}$/i.test(id) || id.includes('..')) {\n throw new Error(`${op}(): \"${id}\" is not a valid document ID`)\n }\n}\n\nexport const requireDocumentId = (op: string, doc: Record<string, Any>) => {\n if (!doc._id) {\n throw new Error(`${op}() requires that the document contains an ID (\"_id\" property)`)\n }\n\n validateDocumentId(op, doc._id)\n}\n\nconst validateDocumentType = (op: string, type: string) => {\n if (typeof type !== 'string') {\n throw new Error(`\\`${op}()\\`: \\`${type}\\` is not a valid document type`)\n }\n}\n\nexport const requireDocumentType = (op: string, doc: Record<string, Any>) => {\n if (!doc._type) {\n throw new Error(`\\`${op}()\\` requires that the document contains a type (\\`_type\\` property)`)\n }\n\n validateDocumentType(op, doc._type)\n}\n\nexport const validateVersionIdMatch = (builtVersionId: string, document: SanityDocumentStub) => {\n if (document._id && document._id !== builtVersionId) {\n throw new Error(\n `The provided document ID (\\`${document._id}\\`) does not match the generated version ID (\\`${builtVersionId}\\`)`,\n )\n }\n}\n\nexport const validateInsert = (at: string, selector: string, items: Any[]) => {\n const signature = 'insert(at, selector, items)'\n if (VALID_INSERT_LOCATIONS.indexOf(at) === -1) {\n const valid = VALID_INSERT_LOCATIONS.map((loc) => `\"${loc}\"`).join(', ')\n throw new Error(`${signature} takes an \"at\"-argument which is one of: ${valid}`)\n }\n\n if (typeof selector !== 'string') {\n throw new Error(`${signature} takes a \"selector\"-argument which must be a string`)\n }\n\n if (!Array.isArray(items)) {\n throw new Error(`${signature} takes an \"items\"-argument which must be an array`)\n }\n}\n\nexport const hasDataset = (config: InitializedClientConfig): string => {\n // Check if dataset is directly on the config\n if (config.dataset) {\n return config.dataset\n }\n\n // Check if dataset is in resource configuration\n // Note: ~experimental_resource is normalized to resource during client initialization\n const resource = config.resource\n if (resource && resource.type === 'dataset') {\n const segments = resource.id.split('.')\n if (segments.length !== 2) {\n throw new Error('Dataset resource ID must be in the format \"project.dataset\"')\n }\n return segments[1]\n }\n\n throw new Error('`dataset` must be provided to perform queries')\n}\n\nexport const requestTag = (tag: string) => {\n if (typeof tag !== 'string' || !/^[a-z0-9._-]{1,75}$/i.test(tag)) {\n throw new Error(\n `Tag can only contain alphanumeric characters, underscores, dashes and dots, and be between one and 75 characters long.`,\n )\n }\n\n return tag\n}\n\nexport const resourceConfig = (config: InitializedClientConfig): void => {\n // Note: ~experimental_resource is normalized to resource during client initialization\n const resource = config.resource\n if (!resource) {\n throw new Error('`resource` must be provided to perform resource queries')\n }\n const {type, id} = resource\n\n switch (type) {\n case 'dataset': {\n const segments = id.split('.')\n if (segments.length !== 2) {\n throw new Error('Dataset resource ID must be in the format \"project.dataset\"')\n }\n return\n }\n case 'dashboard':\n case 'knowledge-base':\n case 'media-library':\n case 'canvas': {\n return\n }\n default:\n // @ts-expect-error - handle all supported resource types\n throw new Error(`Unsupported resource type: ${type.toString()}`)\n }\n}\n\nexport const resourceGuard = (service: string, config: InitializedClientConfig): void => {\n // Note: ~experimental_resource is normalized to resource during client initialization\n const resource = config.resource\n if (resource) {\n throw new Error(`\\`${service}\\` does not support resource-based operations`)\n }\n}\n","import type {Any} from '../types'\n\nexport function once(fn: Any) {\n let didCall = false\n let returnValue: Any\n return (...args: Any[]) => {\n if (didCall) {\n return returnValue\n }\n returnValue = fn(...args)\n didCall = true\n return returnValue\n }\n}\n","import {generateHelpUrl} from './generateHelpUrl'\nimport {type Any} from './types'\nimport {once} from './util/once'\n\nconst createWarningPrinter = (message: string[]) =>\n // oxlint-disable-next-line no-console\n once((...args: Any[]) => console.warn(message.join(' '), ...args))\n\nexport const printCdnAndWithCredentialsWarning = createWarningPrinter([\n `Because you set \\`withCredentials\\` to true, we will override your \\`useCdn\\``,\n `setting to be false since (cookie-based) credentials are never set on the CDN`,\n])\n\nexport const printCdnWarning = createWarningPrinter([\n `Since you haven't set a value for \\`useCdn\\`, we will deliver content using our`,\n `global, edge-cached API-CDN. If you wish to have content delivered faster, set`,\n `\\`useCdn: false\\` to use the Live API. Note: You may incur higher costs using the live API.`,\n])\n\nexport const printCdnPreviewDraftsWarning = createWarningPrinter([\n `The Sanity client is configured with the \\`perspective\\` set to \\`drafts\\` or \\`previewDrafts\\`, which doesn't support the API-CDN.`,\n `The Live API will be used instead. Set \\`useCdn: false\\` in your configuration to hide this warning.`,\n])\n\nexport const printPreviewDraftsDeprecationWarning = createWarningPrinter([\n `The \\`previewDrafts\\` perspective has been renamed to \\`drafts\\` and will be removed in a future API version`,\n])\n\nexport const printBrowserTokenWarning = createWarningPrinter([\n 'You have configured Sanity client to use a token in the browser. This may cause unintentional security issues.',\n `See ${generateHelpUrl(\n 'js-client-browser-token',\n )} for more information and how to hide this warning.`,\n])\n\nexport const printCredentialedTokenWarning = createWarningPrinter([\n 'You have configured Sanity client to use a token, but also provided `withCredentials: true`.',\n 'This is no longer supported - only token will be used - remove `withCredentials: true`.',\n])\n\nexport const printNoApiVersionSpecifiedWarning = createWarningPrinter([\n 'Using the Sanity client without specifying an API version is deprecated.',\n `See ${generateHelpUrl('js-client-api-version')}`,\n])\n\nexport const printNoDefaultExport = createWarningPrinter([\n 'The default export of @sanity/client has been deprecated. Use the named export `createClient` instead.',\n])\n\n// Phrased as a condition rather than as a correction, because the client cannot\n// tell the two cases apart. `baseId` creates a version of a document that\n// already exists, so a caller creating a genuinely new document inside a release\n// has no alternative to `document` - and the previous wording told them they had\n// picked the wrong approach when they had not.\nexport const printCreateVersionWithBaseIdWarning = createWarningPrinter([\n 'You have called `createVersion()` with a defined `document`.',\n 'If you are creating a version of a document that already exists, prefer providing `baseId` and `releaseId` instead.',\n])\n\nexport const printDeprecatedUriOptionWarning = createWarningPrinter([\n 'The `uri` request option has been renamed to `url`.',\n 'Please update your code to use `url` instead. Support for `uri` will be removed in a future version.',\n])\n\nexport const printDeprecatedResourceConfigWarning = createWarningPrinter([\n 'The `~experimental_resource` configuration property has been renamed to `resource`.',\n 'Please update your client configuration to use `resource` instead. Support for `~experimental_resource` will be removed in a future version.',\n])\n","import {generateHelpUrl} from './generateHelpUrl'\nimport type {ClientConfig, ClientPerspective, InitializedClientConfig} from './types'\nimport * as validate from './validators'\nimport * as warnings from './warnings'\n\nconst defaultCdnHost = 'apicdn.sanity.io'\nexport const defaultConfig = {\n apiHost: 'https://api.sanity.io',\n apiVersion: '1',\n useProjectHostname: true,\n stega: {enabled: false},\n} satisfies ClientConfig\n\nconst LOCALHOSTS = ['localhost', '127.0.0.1', '0.0.0.0']\nconst isLocal = (host: string) => LOCALHOSTS.indexOf(host) !== -1\n\nfunction validateApiVersion(apiVersion: string) {\n if (apiVersion === '1' || apiVersion === 'X') {\n return\n }\n\n const apiDate = new Date(apiVersion)\n const apiVersionValid =\n /^\\d{4}-\\d{2}-\\d{2}$/.test(apiVersion) && apiDate instanceof Date && apiDate.getTime() > 0\n\n if (!apiVersionValid) {\n throw new Error('Invalid API version string, expected `1` or date in format `YYYY-MM-DD`')\n }\n}\n\n/**\n * @internal - it may have breaking changes in any release\n */\nexport function validateApiPerspective(\n perspective: unknown,\n): asserts perspective is ClientPerspective {\n if (Array.isArray(perspective) && perspective.length > 1 && perspective.includes('raw')) {\n throw new TypeError(\n `Invalid API perspective value: \"raw\". The raw-perspective can not be combined with other perspectives`,\n )\n }\n}\n\nexport const initConfig = (\n config: Partial<ClientConfig>,\n prevConfig: Partial<ClientConfig>,\n): InitializedClientConfig => {\n const specifiedConfig = {\n ...prevConfig,\n ...config,\n stega: {\n ...(typeof prevConfig.stega === 'boolean'\n ? {enabled: prevConfig.stega}\n : prevConfig.stega || defaultConfig.stega),\n ...(typeof config.stega === 'boolean' ? {enabled: config.stega} : config.stega || {}),\n },\n }\n if (!specifiedConfig.apiVersion) {\n warnings.printNoApiVersionSpecifiedWarning()\n }\n\n const newConfig = {\n ...defaultConfig,\n ...specifiedConfig,\n apiHost: specifiedConfig.apiHost ?? defaultConfig.apiHost,\n } as InitializedClientConfig\n\n // Normalize resource configuration - prefer `resource` over deprecated `~experimental_resource`\n if (newConfig['~experimental_resource'] && !newConfig.resource) {\n warnings.printDeprecatedResourceConfigWarning()\n newConfig.resource = newConfig['~experimental_resource']\n }\n\n const resourceConfig = newConfig.resource\n const projectBased = newConfig.useProjectHostname && !resourceConfig\n\n if (typeof Promise === 'undefined') {\n const helpUrl = generateHelpUrl('js-client-promise-polyfill')\n throw new Error(`No native Promise-implementation found, polyfill needed - see ${helpUrl}`)\n }\n\n if (projectBased && !newConfig.projectId) {\n throw new Error('Configuration must contain `projectId`')\n }\n\n if (resourceConfig) {\n validate.resourceConfig(newConfig)\n }\n\n if (typeof newConfig.perspective !== 'undefined') {\n validateApiPerspective(newConfig.perspective)\n }\n\n if ('encodeSourceMap' in newConfig) {\n throw new Error(\n `It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMap' is not supported in '@sanity/client'. Did you mean 'stega.enabled'?`,\n )\n }\n if ('encodeSourceMapAtPath' in newConfig) {\n throw new Error(\n `It looks like you're using options meant for '@sanity/preview-kit/client'. 'encodeSourceMapAtPath' is not supported in '@sanity/client'. Did you mean 'stega.filter'?`,\n )\n }\n if (typeof newConfig.stega.enabled !== 'boolean') {\n throw new Error(`stega.enabled must be a boolean, received ${newConfig.stega.enabled}`)\n }\n if (newConfig.stega.enabled && newConfig.stega.studioUrl === undefined) {\n throw new Error(`stega.studioUrl must be defined when stega.enabled is true`)\n }\n if (\n newConfig.stega.enabled &&\n typeof newConfig.stega.studioUrl !== 'string' &&\n typeof newConfig.stega.studioUrl !== 'function'\n ) {\n throw new Error(\n `stega.studioUrl must be a string or a function, received ${newConfig.stega.studioUrl}`,\n )\n }\n\n const isBrowser = typeof window !== 'undefined' && window.location && window.location.hostname\n const isLocalhost = isBrowser && isLocal(window.location.hostname)\n\n const hasToken = Boolean(newConfig.token)\n if (newConfig.withCredentials && hasToken) {\n warnings.printCredentialedTokenWarning()\n newConfig.withCredentials = false\n }\n\n if (isBrowser && isLocalhost && hasToken && newConfig.ignoreBrowserTokenWarning !== true) {\n warnings.printBrowserTokenWarning()\n } else if (typeof newConfig.useCdn === 'undefined') {\n warnings.printCdnWarning()\n }\n\n if (projectBased) {\n validate.projectId(newConfig.projectId!)\n }\n\n if (newConfig.dataset) {\n validate.dataset(newConfig.dataset)\n }\n\n if ('requestTagPrefix' in newConfig) {\n // Allow setting and unsetting request tag prefix\n newConfig.requestTagPrefix = newConfig.requestTagPrefix\n ? validate.requestTag(newConfig.requestTagPrefix).replace(/\\.+$/, '')\n : undefined\n }\n\n newConfig.apiVersion = `${newConfig.apiVersion}`.replace(/^v/, '')\n newConfig.isDefaultApi = newConfig.apiHost === defaultConfig.apiHost\n\n if (newConfig.useCdn === true && newConfig.withCredentials) {\n warnings.printCdnAndWithCredentialsWarning()\n }\n\n // If `useCdn` is undefined, we treat it as `true`\n newConfig.useCdn = newConfig.useCdn !== false && !newConfig.withCredentials\n\n validateApiVersion(newConfig.apiVersion)\n\n const hostParts = newConfig.apiHost.split('://', 2)\n const protocol = hostParts[0]\n const host = hostParts[1]\n const cdnHost = newConfig.isDefaultApi ? defaultCdnHost : host\n\n if (projectBased) {\n newConfig.url = `${protocol}://${newConfig.projectId}.${host}/v${newConfig.apiVersion}`\n newConfig.cdnUrl = `${protocol}://${newConfig.projectId}.${cdnHost}/v${newConfig.apiVersion}`\n } else {\n newConfig.url = `${newConfig.apiHost}/v${newConfig.apiVersion}`\n newConfig.cdnUrl = newConfig.url\n }\n\n return newConfig\n}\n"],"mappings":"AAEA,SAAgB,gBAAgB,MAAc;CAC5C,OAAO,gCAAW;AACpB;ACFA,MAAM,oBAAoB,CAAC,SAAS,MAAM,GACpC,yBAAyB;CAAC;CAAU;CAAS;AAAS,GAE/C,WAAW,SAAiB;CACvC,IAAI,CAAC,qDAAqD,KAAK,IAAI,GACjE,MAAU,MACR,qIACF;AAEJ,GAEa,aAAa,OAAe;CACvC,IAAI,CAAC,gBAAgB,KAAK,EAAE,GAC1B,MAAU,MAAM,uDAAuD;AAE3E,GAEa,qBAAqB,SAAiB;CACjD,IAAI,kBAAkB,QAAQ,IAAI,MAAM,IACtC,MAAU,MAAM,uBAAuB,KAAK,mBAAmB,kBAAkB,KAAK,IAAI,GAAG;AAEjG,GAEa,kBAAkB,IAAY,QAAa;CACtD,IAAoB,OAAO,OAAQ,aAA/B,OAA2C,MAAM,QAAQ,GAAG,GAC9D,MAAU,MAAM,GAAG,GAAG,iCAAiC;AAE3D,GAEa,sBAAsB,IAAY,OAAe;CAC5D,IAAI,OAAO,MAAO,YAAY,CAAC,iCAAiC,KAAK,EAAE,KAAK,GAAG,SAAS,IAAI,GAC1F,MAAU,MAAM,GAAG,GAAG,OAAO,GAAG,6BAA6B;AAEjE,GAEa,qBAAqB,IAAY,QAA6B;CACzE,IAAI,CAAC,IAAI,KACP,MA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,gBACF,UAAU,MAAM,GAAG,SAAS,KAAK,UAAU,UAAU,GAAG,KAAK,IAAI,UAAU,cAC3E,UAAU,SAAS,GAAG,SAAS,KAAK,UAAU,UAAU,GAAG,QAAQ,IAAI,UAAU,iBAEjF,UAAU,MAAM,GAAG,UAAU,QAAQ,IAAI,UAAU,cACnD,UAAU,SAAS,UAAU,MAGxB;AACT"}
package/dist/csm.js CHANGED
@@ -1,4 +1,4 @@
1
- import { r as validateApiPerspective } from "./config-3wiPP-sZ.js";
1
+ import { r as validateApiPerspective } from "./config-CgJ16jET.js";
2
2
  import { S as toString, _ as isPublishedId, a as resolveMapping, c as parseJsonPath, d as VERSION_FOLDER, f as getDraftId, g as isDraftId, h as getVersionId, i as walkMap, l as studioPathToJsonPath, m as getVersionFromId, o as jsonPath, p as getPublishedId, r as createEditUrl, s as jsonPathToStudioPath, t as resolveEditInfo, u as DRAFTS_FOLDER, v as isVersionId, x as studioPath_exports, y as get } from "./resolveEditInfo-Cz-smq3a.js";
3
3
  /**
4
4
  * This resolves the perspectives to how documents should be resolved when applying optimistic updates,
@@ -1,4 +1,5 @@
1
- var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports), require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
1
+ import { t as __commonJSMin } from "./rolldown-runtime-4YWMqDIC.js";
2
+ var require_dist = /* @__PURE__ */ __commonJSMin(((exports) => {
2
3
  Object.defineProperty(exports, "__esModule", { value: !0 });
3
4
  var p = {
4
5
  0: 8203,
@@ -70,4 +71,4 @@ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).expor
70
71
  }));
71
72
  export { require_dist as t };
72
73
 
73
- //# sourceMappingURL=dist-C9ExSk2R.js.map
74
+ //# sourceMappingURL=dist-C5K_YcEU.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dist-C9ExSk2R.js","names":[],"sources":["../node_modules/.pnpm/@vercel+stega@1.1.0/node_modules/@vercel/stega/dist/index.js"],"sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true});var p={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},l={0:8203,1:8204,2:8205,3:65279},d={0:String.fromCodePoint(l[0]),1:String.fromCodePoint(l[1]),2:String.fromCodePoint(l[2]),3:String.fromCodePoint(l[3])},u=new Array(4).fill(String.fromCodePoint(l[0])).join(\"\"),g=String.fromCharCode(0);function A(e){let r=JSON.stringify(e),t=new TextEncoder().encode(r),i=\"\";for(let c=0;c<t.length;c++){let n=t[c];i+=d[n>>6&3]+d[n>>4&3]+d[n>>2&3]+d[n&3]}return u+i}function C(e){let r=JSON.stringify(e);return Array.from(r).map(t=>{let i=t.charCodeAt(0);if(i>255)throw new Error(`Only ASCII edit info can be encoded. Error attempting to encode ${r} on character ${t} (${i})`);return Array.from(i.toString(16).padStart(2,\"0\")).map(c=>String.fromCodePoint(p[c])).join(\"\")}).join(\"\")}function I(e){return!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\\d+(?:[-:\\/]\\d+){2}(?:T\\d+(?:[-:\\/]\\d+){1,2}(\\.\\d+)?Z?)?/.test(e)?!1:!!Date.parse(e)}function S(e){try{new URL(e,e.startsWith(\"/\")?\"https://acme.com\":void 0)}catch (e2){return!1}return!0}function y(e,r,t=\"auto\"){return t===!0||t===\"auto\"&&(I(e)||S(e))?e:`${e}${A(r)}`}var m=Object.fromEntries(Object.entries(d).map(e=>[e[1],+e[0]])),T=Object.fromEntries(Object.entries(p).map(e=>e.reverse())),h=`${Object.values(p).map(e=>`\\\\u{${e.toString(16)}}`).join(\"\")}`,x= exports.VERCEL_STEGA_REGEX =new RegExp(`[${h}]{4,}`,\"gu\");function X(e){let r=e.match(x);if(r)return E(r[0],!0)[0]}function M(e){let r=e.match(x);if(r)return r.map(t=>E(t)).flat()}function E(e,r=!1){let t=Array.from(e),i=1/0,c=-1;for(let n=0;n<t.length;++n)t[n]===u[0]&&t[n+1]===u[1]&&t[n+2]===u[2]&&t[n+3]===u[3]&&(i=Math.min(i,n),c=Math.max(c,n));if(c===-1)return _(t,r);for(let n=i;n<=c;++n)if(!((t.length-n)%4))try{let f=t.slice(n+4),s=new Uint8Array(f.length/4);for(let o=0;o<s.length;o++)s[o]=m[f[o*4]]<<6|m[f[o*4+1]]<<4|m[f[o*4+2]]<<2|m[f[o*4+3]];let a=new TextDecoder().decode(s);if(r){let o=a.indexOf(g);return o===-1&&(o=a.length),[JSON.parse(a.slice(0,o))]}return a.split(g).filter(Boolean).map(o=>JSON.parse(o))}catch (e3){}return[]}function _(e,r){var f;let t=[];for(let s=e.length*.5;s--;){let a=`${T[e[s*2].codePointAt(0)]}${T[e[s*2+1].codePointAt(0)]}`;t.unshift(String.fromCharCode(parseInt(a,16)))}let i=[],c=[t.join(\"\")],n=10;for(;c.length;){let s=c.shift();try{if(i.push(JSON.parse(s)),r)return i}catch(a){if(!n--)throw a;let o=+((f=a.message.match(/\\sposition\\s(\\d+)$/))==null?void 0:f[1]);if(!o)throw a;c.unshift(s.substring(0,o),s.substring(o))}}return i}function P(e){var r;return{cleaned:e.replace(x,\"\"),encoded:((r=e.match(x))==null?void 0:r[0])||\"\"}}function w(e){return e&&JSON.parse(P(JSON.stringify(e)).cleaned)}exports.VERCEL_STEGA_REGEX = x; exports.legacyStegaEncode = C; exports.vercelStegaClean = w; exports.vercelStegaCombine = y; exports.vercelStegaDecode = X; exports.vercelStegaDecodeAll = M; exports.vercelStegaEncode = A; exports.vercelStegaSplit = P;\n"],"x_google_ignoreList":[0],"mappings":";CAAa,OAAO,eAAe,SAAS,cAAc,EAAC,OAAO,GAAI,CAAC;CAAE,IAAI,IAAE;EAAC,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAM,GAAE;EAAK,GAAE;EAAO,GAAE;EAAO,GAAE;EAAO,GA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,YAAY,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAI,MAAG,CAAC,EAAE,IAAG,CAAC,EAAE,EAAE,CAAC,CAAC,GAAI,OAAO,YAAY,OAAO,QAAQ,CAAC,CAAC,CAAC,KAAI,MAAG,EAAE,QAAQ,CAAC,CAAC;CAAE,IAAA,IAAE,GAAG,OAAO,OAAO,CAAC,CAAC,CAAC,KAAI,MAAG,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAAC,KAAK,EAAE,KAAI,IAAG,QAAQ,qBAAwB,OAAO,IAAI,EAAE,QAAO,IAAI;CAAkmC,SAAS,EAAE,GAAE;EAAO,OAAM;GAAC,SAAQ,EAAE,QAAQ,GAAE,EAAE;GAAE,SAAY,EAAE,MAAM,CAAC,CAAA,GAAkB,MAAK;EAAE;CAAC;CAAC,SAAS,EAAE,GAAE;EAAC,OAAO,KAAG,KAAK,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO;CAAC;CAA8F,AAA7F,QAAQ,qBAAqB,GAAkC,QAAQ,mBAAmB,GAAG,QAAQ,qBAAqB"}
1
+ {"version":3,"file":"dist-C5K_YcEU.js","names":[],"sources":["../node_modules/.pnpm/@vercel+stega@1.1.0/node_modules/@vercel/stega/dist/index.js"],"sourcesContent":["\"use strict\";Object.defineProperty(exports, \"__esModule\", {value: true});var p={0:8203,1:8204,2:8205,3:8290,4:8291,5:8288,6:65279,7:8289,8:119155,9:119156,a:119157,b:119158,c:119159,d:119160,e:119161,f:119162},l={0:8203,1:8204,2:8205,3:65279},d={0:String.fromCodePoint(l[0]),1:String.fromCodePoint(l[1]),2:String.fromCodePoint(l[2]),3:String.fromCodePoint(l[3])},u=new Array(4).fill(String.fromCodePoint(l[0])).join(\"\"),g=String.fromCharCode(0);function A(e){let r=JSON.stringify(e),t=new TextEncoder().encode(r),i=\"\";for(let c=0;c<t.length;c++){let n=t[c];i+=d[n>>6&3]+d[n>>4&3]+d[n>>2&3]+d[n&3]}return u+i}function C(e){let r=JSON.stringify(e);return Array.from(r).map(t=>{let i=t.charCodeAt(0);if(i>255)throw new Error(`Only ASCII edit info can be encoded. Error attempting to encode ${r} on character ${t} (${i})`);return Array.from(i.toString(16).padStart(2,\"0\")).map(c=>String.fromCodePoint(p[c])).join(\"\")}).join(\"\")}function I(e){return!Number.isNaN(Number(e))||/[a-z]/i.test(e)&&!/\\d+(?:[-:\\/]\\d+){2}(?:T\\d+(?:[-:\\/]\\d+){1,2}(\\.\\d+)?Z?)?/.test(e)?!1:!!Date.parse(e)}function S(e){try{new URL(e,e.startsWith(\"/\")?\"https://acme.com\":void 0)}catch (e2){return!1}return!0}function y(e,r,t=\"auto\"){return t===!0||t===\"auto\"&&(I(e)||S(e))?e:`${e}${A(r)}`}var m=Object.fromEntries(Object.entries(d).map(e=>[e[1],+e[0]])),T=Object.fromEntries(Object.entries(p).map(e=>e.reverse())),h=`${Object.values(p).map(e=>`\\\\u{${e.toString(16)}}`).join(\"\")}`,x= exports.VERCEL_STEGA_REGEX =new RegExp(`[${h}]{4,}`,\"gu\");function X(e){let r=e.match(x);if(r)return E(r[0],!0)[0]}function M(e){let r=e.match(x);if(r)return r.map(t=>E(t)).flat()}function E(e,r=!1){let t=Array.from(e),i=1/0,c=-1;for(let n=0;n<t.length;++n)t[n]===u[0]&&t[n+1]===u[1]&&t[n+2]===u[2]&&t[n+3]===u[3]&&(i=Math.min(i,n),c=Math.max(c,n));if(c===-1)return _(t,r);for(let n=i;n<=c;++n)if(!((t.length-n)%4))try{let f=t.slice(n+4),s=new Uint8Array(f.length/4);for(let o=0;o<s.length;o++)s[o]=m[f[o*4]]<<6|m[f[o*4+1]]<<4|m[f[o*4+2]]<<2|m[f[o*4+3]];let a=new TextDecoder().decode(s);if(r){let o=a.indexOf(g);return o===-1&&(o=a.length),[JSON.parse(a.slice(0,o))]}return a.split(g).filter(Boolean).map(o=>JSON.parse(o))}catch (e3){}return[]}function _(e,r){var f;let t=[];for(let s=e.length*.5;s--;){let a=`${T[e[s*2].codePointAt(0)]}${T[e[s*2+1].codePointAt(0)]}`;t.unshift(String.fromCharCode(parseInt(a,16)))}let i=[],c=[t.join(\"\")],n=10;for(;c.length;){let s=c.shift();try{if(i.push(JSON.parse(s)),r)return i}catch(a){if(!n--)throw a;let o=+((f=a.message.match(/\\sposition\\s(\\d+)$/))==null?void 0:f[1]);if(!o)throw a;c.unshift(s.substring(0,o),s.substring(o))}}return i}function P(e){var r;return{cleaned:e.replace(x,\"\"),encoded:((r=e.match(x))==null?void 0:r[0])||\"\"}}function w(e){return e&&JSON.parse(P(JSON.stringify(e)).cleaned)}exports.VERCEL_STEGA_REGEX = x; exports.legacyStegaEncode = C; exports.vercelStegaClean = w; exports.vercelStegaCombine = y; exports.vercelStegaDecode = X; exports.vercelStegaDecodeAll = M; exports.vercelStegaEncode = A; exports.vercelStegaSplit = P;\n"],"x_google_ignoreList":[0],"mappings":";;CAAa,OAAO,eAAe,SAAS,cAAc,EAAC,OAAO,GAAI,CAAC;CAAE,IAAI,IAAE;EAAC,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;EAAM,GAAE;EAAK,GAAE;EAAO,GAAE;EAAO,GAAE;EAAO,GAAE;EAAO,GAAE;EAAO,GAAE;EAAO,GAAE;EAAO,GAAE;CAAM,GAAE,IAAE;EAAC,GAAE;EAAK,GAAE;EAAK,GAAE;EAAK,GAAE;CAAK,GAAE,IAAE;EAAC,GAAE,OAAO,cAAc,EAAE,EAAE;EAAE,GAAE,OAAO,cAAc,EAAE,EAAE;EAAE,GAAE,OAAO,cAAc,EAAE,EAAE;EAAE,GAAE,OAAO,cAAc,EAAE,EAAE;CAAC,GAAE,IAAE;;;;;CAAW,CAAC,CAAC,KAAK,OAAO,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE;CAA2B,SAAS,EAAE,GAAE;EAAC,IAAI,IAAE,KAAK,UAAU,CAAC,GAAE,I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E,SAAY,EAAE,MAAM,CAAC,CAAA,GAAkB,MAAK;EAAE;CAAC;CAAC,SAAS,EAAE,GAAE;EAAC,OAAO,KAAG,KAAK,MAAM,EAAE,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,OAAO;CAAC;CAA8F,AAA7F,QAAQ,qBAAqB,GAAkC,QAAQ,mBAAmB,GAAG,QAAQ,qBAAqB"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { d as ResolveStudioUrl, f as StegaConfig, g as StudioUrl, h as StudioBaseUrl, i as ContentSourceMapParsedPathKeyedSegment, l as InitializedStegaConfig, m as StudioBaseRoute, p as StegaConfigRequiredKeys, r as ContentSourceMapParsedPath, s as FilterDefault, u as Logger } from "./types-CfGzbXrl.js";
2
- import { $ as DisconnectEvent, $n as UploadClientConfig, $r as CollaborationCommentMessage, $t as QueryWithoutParams, A as ContentSourceMapMappings, Ai as AgentActionTarget, An as SanityReference, Ar as ObservableProjectsClient, At as MediaLibraryAssetVersion, B as CreateVersionAction, Bn as TransactionAllDocumentIdsMutationOptions, Br as ObservablePatchBuilder, Bt as MutationSelection, C as ContentSourceMap, Ci as PatchDocument, Cn as SanityDocument, Cr as GenerateTarget, Ct as LiveEventGoAway, D as ContentSourceMapDocuments, Di as AgentActionParams, Dn as SanityProject, Dr as SanityClient, Dt as LiveEventWelcome, E as ContentSourceMapDocumentValueSource, Ei as AgentActionParam, En as SanityImagePalette, Er as ObservableSanityClient, Et as LiveEventRestart, F as ContentSourceMapValueMapping, Fn as StackablePerspective, Fr as InvokeFunctionOptions, Ft as Mutation, G as DatasetResponse, Gn as UnarchiveReleaseAction, Gr as ObservablePatch, Gt as PatchOperations, H as DatasetAclMode, Hn as TransactionFirstDocumentIdMutationOptions, Hr as PatchBuilder, Ht as OpenEvent, I as CreateAction, In as StillImageFormat, Ir as InvokeFunctionRequest, It as MutationError, J as DeleteReleaseAction, Jn as UnpublishAction, Jr as CollaborationCommentsClient, Jt as PublishReleaseAction, K as DatasetsResponse, Kn as UnfilteredResponseQueryOptions, Kr as Patch, Kt as PatchSelection, L as CreateReleaseAction, Ln as StoryboardTransformOptions, Lr as DatasetsClient, Lt as MutationErrorItem, M as ContentSourceMapRemoteDocument, Mi as DocumentAgentActionParam, Mn as ScheduleReleaseAction, Mr as MediaLibraryVideoClient, Mt as MediaLibraryVideoPlaybackTransformations, N as ContentSourceMapSource, Ni as FieldAgentActionParam, Nn as SingleActionResult, Nr as ObservableMediaLibraryVideoClient, Nt as MultipleActionResult, O as ContentSourceMapLiteralSource, Oi as AgentActionPath, On as SanityProjectMember, Or as ObservableUsersClient, Ot as MediaLibraryAssetDocument, P as ContentSourceMapUnknownSource, Pi as GroqAgentActionParam, Pn as SingleMutationResult, Pr as InvokeFunctionEvent, Pt as MultipleMutationResult, Q as DiscardVersionAction, Qn as UploadBody, Qr as CollaborationCommentFieldValue, Qt as QueryParseError, R as CreateVariantAction, Rn as SyncTag, Rr as ObservableDatasetsClient, Rt as MutationEvent, S as ClientVariantConditions, Si as PromptRequest, Sn as SanityAssetDocument, Sr as GenerateOperation, St as LiveEvent, T as ContentSourceMapDocumentBase, Ti as PatchTarget, Tn as SanityImageAssetDocument, Tr as GenerateTargetInclude, Tt as LiveEventReconnect, U as DatasetCreateOptions, Un as TransactionFirstDocumentMutationOptions, Ur as Transaction, Ut as PartialExcept, V as CurrentSanityUser, Vn as TransactionAllDocumentsMutationOptions, Vr as ObservableTransaction, Vt as MutationSelectionQueryParams, W as DatasetEditOptions, Wn as TransactionMutationOptions, Wr as BasePatch, Wt as PatchMutationOperation, X as DeleteVariantDefinitionAction, Xn as UnpublishVersionAction, Xr as CollaborationCommentCreate, Xt as QueryOptions, Y as DeleteVariantAction, Yn as UnpublishVariantAction, Yr as ObservableCollaborationCommentsClient, Yt as PublishVariantAction, Z as DiscardAction, Zn as UnscheduleReleaseAction, Zr as CollaborationCommentDocument, Zt as QueryParams, _ as ChannelErrorEvent, _i as TransformDocument, _n as Requester, _r as VideoSubtitleInfoPublic, _t as InsertPatch, a as AllDocumentsMutationOptions, ai as CollaborationCommentTarget, an as ReleaseCardinality, ar as VersionAction, at as EditableReleaseDocument, b as ClientReturn, bi as TransformTargetDocument, bn as ResumableListenEventNames, br as WelcomeEvent, bt as ListenOptions, c as Any, ci as CollaborationCommentsRequestOptions, cn as ReleaseState, cr as VideoPlaybackInfoItemPublic, ct as ErrorProps, d as AssetMetadataType, di as AssetsClient, dn as ReplaceVersionAction, dr as VideoPlaybackInfoSigned, dt as FirstDocumentMutationOptions, ei as CollaborationCommentPortableTextBlock, en as RawQueryResponse, er as UploadEvent, et as EXPERIMENTAL_API_WARNING, f as AttributeSet, fi as ObservableAssetsClient, fn as RequestHandler, fr as VideoPlaybackTokens, ft as FitMode, g as BaseMutationOptions, gi as ImageDescriptionOperation, gn as RequestUrlOptions, gr as VideoSubtitleInfo, gt as InitializedClientConfig, h as BaseActionOptions, hi as TranslateTargetInclude, hn as RequestOptions, hr as VideoRenditionInfoSigned, ht as ImportReleaseAction, i as AllDocumentIdsMutationOptions, ii as CollaborationCommentStatus, in as ReleaseAction, ir as VariantDefinitionAction, it as EditVariantDefinitionAction, j as ContentSourceMapPaths, ji as ConstantAgentActionParam, jn as SanityUser, jr as ProjectsClient, jt as MediaLibraryPlaybackInfoOptions, k as ContentSourceMapMapping, ki as AgentActionPathSegment, kn as SanityQueries, kr as UsersClient, kt as MediaLibraryAssetInstanceIdentifier, l as ApiError, li as CollaborationCommentsWriteOptions, ln as ReleaseType, lr as VideoPlaybackInfoItemSigned, lt as FilteredResponseQueryOptions, m as AuthProviderResponse, mi as TranslateTarget, mn as RequestObservableOptions, mr as VideoRenditionInfoPublic, mt as IdentifiedSanityDocumentStub, n as ActionError, ni as CollaborationCommentReactionShortName, nn as RawRequestOptions, nr as UploadResponseEvent, nt as EditReleaseAction, o as AnimatedImageFormat, oi as CollaborationCommentUpdate, on as ReleaseDocument, or as VideoPlaybackInfo, ot as EmbeddingsSettings, p as AuthProvider, pi as TranslateDocument, pn as RequestHandlerOptions, pr as VideoRenditionInfo, pt as HttpRequest, q as DeleteAction, qn as UnfilteredResponseWithoutQuery, qr as LiveClient, qt as PublishAction, r as ActionErrorItem, ri as CollaborationCommentSelection, rn as ReconnectEvent, rr as VariantAction, rt as EditVariantAction, s as AnimatedTransformOptions, si as CollaborationCommentsListenOptions, sn as ReleaseId, sr as VideoPlaybackInfoItem, st as EmbeddingsSettingsBody, t as Action, ti as CollaborationCommentRange, tn as RawQuerylessQueryResponse, tr as UploadProgressEvent, tt as EditAction, u as ArchiveReleaseAction, ui as _listen, un as ReplaceDraftAction, ur as VideoPlaybackInfoPublic, ut as FirstDocumentIdMutationOptions, v as ClientConfig, vi as TransformOperation, vn as ResetEvent, vr as VideoSubtitleInfoSigned, vt as ListenEvent, w as ContentSourceMapDocument, wi as PatchOperation, wn as SanityDocumentStub, wr as GenerateTargetDocument, wt as LiveEventMessage, x as ClientVariant, xi as TransformTargetInclude, xn as ResumableListenOptions, xr as GenerateInstruction, xt as ListenParams, y as ClientPerspective, yi as TransformTarget, yn as ResponseQueryOptions, yr as WelcomeBackEvent, yt as ListenEventName, z as CreateVariantDefinitionAction, zn as ThumbnailTransformOptions, zr as BaseTransaction, zt as MutationOperation } from "./types-0x2hPfhJ.js";
2
+ import { $ as DisconnectEvent, $n as UploadClientConfig, $r as CollaborationCommentFieldValue, $t as QueryWithoutParams, A as ContentSourceMapMappings, Ai as AgentActionPathSegment, An as SanityReference, Ar as ObservableProjectsClient, At as MediaLibraryAssetVersion, B as CreateVersionAction, Bn as TransactionAllDocumentIdsMutationOptions, Br as ObservablePatchBuilder, Bt as MutationSelection, C as ContentSourceMap, Ci as PromptRequest, Cn as SanityDocument, Cr as GenerateTarget, Ct as LiveEventGoAway, D as ContentSourceMapDocuments, Di as AgentActionParam, Dn as SanityProject, Dr as SanityClient, Dt as LiveEventWelcome, E as ContentSourceMapDocumentValueSource, Ei as PatchTarget, En as SanityImagePalette, Er as ObservableSanityClient, Et as LiveEventRestart, F as ContentSourceMapValueMapping, Fi as GroqAgentActionParam, Fn as StackablePerspective, Fr as InvokeFunctionOptions, Ft as Mutation, G as DatasetResponse, Gn as UnarchiveReleaseAction, Gr as ObservablePatch, Gt as PatchOperations, H as DatasetAclMode, Hn as TransactionFirstDocumentIdMutationOptions, Hr as PatchBuilder, Ht as OpenEvent, I as CreateAction, In as StillImageFormat, Ir as InvokeFunctionRequest, It as MutationError, J as DeleteReleaseAction, Jn as UnpublishAction, Jr as types_d_exports, Jt as PublishReleaseAction, K as DatasetsResponse, Kn as UnfilteredResponseQueryOptions, Kr as Patch, Kt as PatchSelection, L as CreateReleaseAction, Ln as StoryboardTransformOptions, Lr as DatasetsClient, Lt as MutationErrorItem, M as ContentSourceMapRemoteDocument, Mi as ConstantAgentActionParam, Mn as ScheduleReleaseAction, Mr as MediaLibraryVideoClient, Mt as MediaLibraryVideoPlaybackTransformations, N as ContentSourceMapSource, Ni as DocumentAgentActionParam, Nn as SingleActionResult, Nr as ObservableMediaLibraryVideoClient, Nt as MultipleActionResult, O as ContentSourceMapLiteralSource, Oi as AgentActionParams, On as SanityProjectMember, Or as ObservableUsersClient, Ot as MediaLibraryAssetDocument, P as ContentSourceMapUnknownSource, Pi as FieldAgentActionParam, Pn as SingleMutationResult, Pr as InvokeFunctionEvent, Pt as MultipleMutationResult, Q as DiscardVersionAction, Qn as UploadBody, Qr as CollaborationCommentDocument, Qt as QueryParseError, R as CreateVariantAction, Rn as SyncTag, Rr as ObservableDatasetsClient, Rt as MutationEvent, S as ClientVariantConditions, Si as TransformTargetInclude, Sn as SanityAssetDocument, Sr as GenerateOperation, St as LiveEvent, T as ContentSourceMapDocumentBase, Ti as PatchOperation, Tn as SanityImageAssetDocument, Tr as GenerateTargetInclude, Tt as LiveEventReconnect, U as DatasetCreateOptions, Un as TransactionFirstDocumentMutationOptions, Ur as Transaction, Ut as PartialExcept, V as CurrentSanityUser, Vn as TransactionAllDocumentsMutationOptions, Vr as ObservableTransaction, Vt as MutationSelectionQueryParams, W as DatasetEditOptions, Wn as TransactionMutationOptions, Wr as BasePatch, Wt as PatchMutationOperation, X as DeleteVariantDefinitionAction, Xn as UnpublishVersionAction, Xr as ObservableCollaborationCommentsClient, Xt as QueryOptions, Y as DeleteVariantAction, Yn as UnpublishVariantAction, Yr as CollaborationCommentsClient, Yt as PublishVariantAction, Z as DiscardAction, Zn as UnscheduleReleaseAction, Zr as CollaborationCommentCreate, Zt as QueryParams, _ as ChannelErrorEvent, _i as ImageDescriptionOperation, _n as Requester, _r as VideoSubtitleInfoPublic, _t as InsertPatch, a as AllDocumentsMutationOptions, ai as CollaborationCommentStatus, an as ReleaseCardinality, ar as VersionAction, at as EditableReleaseDocument, b as ClientReturn, bi as TransformTarget, bn as ResumableListenEventNames, br as WelcomeEvent, bt as ListenOptions, c as Any, ci as CollaborationCommentsListenOptions, cn as ReleaseState, cr as VideoPlaybackInfoItemPublic, ct as ErrorProps, d as AssetMetadataType, di as _listen, dn as ReplaceVersionAction, dr as VideoPlaybackInfoSigned, dt as FirstDocumentMutationOptions, ei as CollaborationCommentMessage, en as RawQueryResponse, er as UploadEvent, et as EXPERIMENTAL_API_WARNING, f as AttributeSet, fi as AssetsClient, fn as RequestHandler, fr as VideoPlaybackTokens, ft as FitMode, g as BaseMutationOptions, gi as TranslateTargetInclude, gn as RequestUrlOptions, gr as VideoSubtitleInfo, gt as InitializedClientConfig, h as BaseActionOptions, hi as TranslateTarget, hn as RequestOptions, hr as VideoRenditionInfoSigned, ht as ImportReleaseAction, i as AllDocumentIdsMutationOptions, ii as CollaborationCommentSelection, in as ReleaseAction, ir as VariantDefinitionAction, it as EditVariantDefinitionAction, j as ContentSourceMapPaths, ji as AgentActionTarget, jn as SanityUser, jr as ProjectsClient, jt as MediaLibraryPlaybackInfoOptions, k as ContentSourceMapMapping, ki as AgentActionPath, kn as SanityQueries, kr as UsersClient, kt as MediaLibraryAssetInstanceIdentifier, l as ApiError, li as CollaborationCommentsRequestOptions, ln as ReleaseType, lr as VideoPlaybackInfoItemSigned, lt as FilteredResponseQueryOptions, m as AuthProviderResponse, mi as TranslateDocument, mn as RequestObservableOptions, mr as VideoRenditionInfoPublic, mt as IdentifiedSanityDocumentStub, n as ActionError, ni as CollaborationCommentRange, nn as RawRequestOptions, nr as UploadResponseEvent, nt as EditReleaseAction, o as AnimatedImageFormat, oi as CollaborationCommentTarget, on as ReleaseDocument, or as VideoPlaybackInfo, ot as EmbeddingsSettings, p as AuthProvider, pi as ObservableAssetsClient, pn as RequestHandlerOptions, pr as VideoRenditionInfo, pt as HttpRequest, q as DeleteAction, qn as UnfilteredResponseWithoutQuery, qr as LiveClient, qt as PublishAction, r as ActionErrorItem, ri as CollaborationCommentReactionShortName, rn as ReconnectEvent, rr as VariantAction, rt as EditVariantAction, s as AnimatedTransformOptions, si as CollaborationCommentUpdate, sn as ReleaseId, sr as VideoPlaybackInfoItem, st as EmbeddingsSettingsBody, t as Action, ti as CollaborationCommentPortableTextBlock, tn as RawQuerylessQueryResponse, tr as UploadProgressEvent, tt as EditAction, u as ArchiveReleaseAction, ui as CollaborationCommentsWriteOptions, un as ReplaceDraftAction, ur as VideoPlaybackInfoPublic, ut as FirstDocumentIdMutationOptions, v as ClientConfig, vi as TransformDocument, vn as ResetEvent, vr as VideoSubtitleInfoSigned, vt as ListenEvent, w as ContentSourceMapDocument, wi as PatchDocument, wn as SanityDocumentStub, wr as GenerateTargetDocument, wt as LiveEventMessage, x as ClientVariant, xi as TransformTargetDocument, xn as ResumableListenOptions, xr as GenerateInstruction, xt as ListenParams, y as ClientPerspective, yi as TransformOperation, yn as ResponseQueryOptions, yr as WelcomeBackEvent, yt as ListenEventName, z as CreateVariantDefinitionAction, zn as ThumbnailTransformOptions, zr as BaseTransaction, zt as MutationOperation } from "./types-DiPF0ENT.js";
3
3
  import { FetchFunction, RequestOptions as RequestOptions$1, TimeoutErrorLike, isTimeoutError } from "get-it";
4
4
  import { Observable } from "rxjs";
5
5
  import { EventSourceConstructor } from "eventsource";
@@ -181,5 +181,5 @@ declare const createClient: (config: ClientConfig) => SanityClient;
181
181
  * @deprecated Use the named export `createClient` instead of the `default` export
182
182
  */
183
183
  declare const deprecatedCreateClient: (config: ClientConfig) => SanityClient;
184
- export { Action, ActionError, ActionErrorItem, type AgentActionParam, type AgentActionParams, type AgentActionPath, type AgentActionPathSegment, type AgentActionTarget, AllDocumentIdsMutationOptions, AllDocumentsMutationOptions, AnimatedImageFormat, AnimatedTransformOptions, Any, ApiError, ArchiveReleaseAction, AssetMetadataType, type AssetsClient, AttributeSet, AuthProvider, AuthProviderResponse, BaseActionOptions, BaseMutationOptions, BasePatch, BaseTransaction, ChannelError, ChannelErrorEvent, ClientConfig, ClientError, ClientPerspective, ClientReturn, ClientVariant, ClientVariantConditions, type CollaborationCommentCreate, type CollaborationCommentDocument, type CollaborationCommentFieldValue, type CollaborationCommentMessage, type CollaborationCommentPortableTextBlock, type CollaborationCommentRange, type CollaborationCommentReactionShortName, type CollaborationCommentSelection, type CollaborationCommentStatus, type CollaborationCommentTarget, type CollaborationCommentUpdate, type CollaborationCommentsClient, type CollaborationCommentsListenOptions, type CollaborationCommentsRequestOptions, type CollaborationCommentsWriteOptions, ConnectionFailedError, type ConstantAgentActionParam, ContentSourceMap, ContentSourceMapDocument, ContentSourceMapDocumentBase, ContentSourceMapDocumentValueSource, ContentSourceMapDocuments, ContentSourceMapLiteralSource, ContentSourceMapMapping, ContentSourceMapMappings, type ContentSourceMapParsedPath, type ContentSourceMapParsedPathKeyedSegment, ContentSourceMapPaths, ContentSourceMapRemoteDocument, ContentSourceMapSource, ContentSourceMapUnknownSource, ContentSourceMapValueMapping, CorsOriginError, CreateAction, CreateReleaseAction, CreateVariantAction, CreateVariantDefinitionAction, CreateVersionAction, CurrentSanityUser, DatasetAclMode, DatasetCreateOptions, DatasetEditOptions, DatasetResponse, type DatasetsClient, DatasetsResponse, DeleteAction, DeleteReleaseAction, DeleteVariantAction, DeleteVariantDefinitionAction, DiscardAction, DiscardVersionAction, DisconnectError, DisconnectEvent, type DocumentAgentActionParam, EXPERIMENTAL_API_WARNING, EditAction, EditReleaseAction, EditVariantAction, EditVariantDefinitionAction, EditableReleaseDocument, EmbeddingsSettings, EmbeddingsSettingsBody, ErrorProps, type EventSourceEvent, type EventSourceInstance, type FieldAgentActionParam, type FilterDefault, FilteredResponseQueryOptions, FirstDocumentIdMutationOptions, FirstDocumentMutationOptions, FitMode, type GenerateInstruction, type GenerateOperation, type GenerateTarget, type GenerateTargetDocument, type GenerateTargetInclude, type GroqAgentActionParam, type HttpError, HttpRequest, IdentifiedSanityDocumentStub, type ImageDescriptionOperation, ImportReleaseAction, InitializedClientConfig, type InitializedStegaConfig, InsertPatch, type InvokeFunctionEvent, type InvokeFunctionOptions, type InvokeFunctionRequest, ListenEvent, ListenEventName, ListenOptions, ListenParams, type LiveClient, LiveEvent, LiveEventGoAway, LiveEventMessage, LiveEventReconnect, LiveEventRestart, LiveEventWelcome, type Logger, MediaLibraryAssetDocument, MediaLibraryAssetInstanceIdentifier, MediaLibraryAssetVersion, MediaLibraryPlaybackInfoOptions, type MediaLibraryVideoClient, MediaLibraryVideoPlaybackTransformations, MessageError, MessageParseError, MultipleActionResult, MultipleMutationResult, Mutation, MutationError, MutationErrorItem, MutationEvent, MutationOperation, MutationSelection, MutationSelectionQueryParams, type ObservableAssetsClient, type ObservableCollaborationCommentsClient, type ObservableDatasetsClient, type ObservableMediaLibraryVideoClient, ObservablePatch, ObservablePatchBuilder, type ObservableProjectsClient, ObservableSanityClient, ObservableTransaction, type ObservableUsersClient, OpenEvent, PartialExcept, Patch, PatchBuilder, type PatchDocument, PatchMutationOperation, type PatchOperation, PatchOperations, PatchSelection, type PatchTarget, type ProjectsClient, type PromptRequest, PublishAction, PublishReleaseAction, PublishVariantAction, QueryOptions, QueryParams, QueryParseError, QueryWithoutParams, RawQueryResponse, RawQuerylessQueryResponse, RawRequestOptions, ReconnectEvent, ReleaseAction, ReleaseCardinality, ReleaseDocument, ReleaseId, ReleaseState, ReleaseType, ReplaceDraftAction, ReplaceVersionAction, RequestHandler, RequestHandlerOptions, RequestObservableOptions, RequestOptions, RequestUrlOptions, Requester, ResetEvent, type ResolveStudioUrl, ResponseQueryOptions, ResumableListenEventNames, ResumableListenOptions, SanityAssetDocument, SanityClient, SanityDocument, SanityDocumentStub, SanityImageAssetDocument, SanityImagePalette, SanityProject, SanityProjectMember, SanityQueries, SanityReference, SanityUser, ScheduleReleaseAction, ServerError, type ServerSentEvent, SingleActionResult, SingleMutationResult, StackablePerspective, type StegaConfig, type StegaConfigRequiredKeys, StillImageFormat, StoryboardTransformOptions, type StudioBaseRoute, type StudioBaseUrl, type StudioUrl, SyncTag, ThumbnailTransformOptions, type TimeoutErrorLike, Transaction, TransactionAllDocumentIdsMutationOptions, TransactionAllDocumentsMutationOptions, TransactionFirstDocumentIdMutationOptions, TransactionFirstDocumentMutationOptions, TransactionMutationOptions, type TransformDocument, type TransformOperation, type TransformTarget, type TransformTargetDocument, type TransformTargetInclude, type TranslateDocument, type TranslateTarget, type TranslateTargetInclude, UnarchiveReleaseAction, UnfilteredResponseQueryOptions, UnfilteredResponseWithoutQuery, UnpublishAction, UnpublishVariantAction, UnpublishVersionAction, UnscheduleReleaseAction, UploadBody, UploadClientConfig, UploadEvent, UploadProgressEvent, UploadResponseEvent, type UsersClient, VariantAction, VariantDefinitionAction, VersionAction, VideoPlaybackInfo, VideoPlaybackInfoItem, VideoPlaybackInfoItemPublic, VideoPlaybackInfoItemSigned, VideoPlaybackInfoPublic, VideoPlaybackInfoSigned, VideoPlaybackTokens, VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned, VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned, WelcomeBackEvent, WelcomeEvent, type _listen, connectEventSource, createClient, deprecatedCreateClient as default, formatQueryParseError, isHttpError, isQueryParseError, isTimeoutError, requester, validateApiPerspective };
184
+ export { Action, ActionError, ActionErrorItem, type AgentActionParam, type AgentActionParams, type AgentActionPath, type AgentActionPathSegment, type AgentActionTarget, AllDocumentIdsMutationOptions, AllDocumentsMutationOptions, AnimatedImageFormat, AnimatedTransformOptions, Any, ApiError, ArchiveReleaseAction, AssetMetadataType, type AssetsClient, AttributeSet, AuthProvider, AuthProviderResponse, BaseActionOptions, BaseMutationOptions, BasePatch, BaseTransaction, ChannelError, ChannelErrorEvent, ClientConfig, ClientError, ClientPerspective, ClientReturn, ClientVariant, ClientVariantConditions, type CollaborationCommentCreate, type CollaborationCommentDocument, type CollaborationCommentFieldValue, type CollaborationCommentMessage, type CollaborationCommentPortableTextBlock, type CollaborationCommentRange, type CollaborationCommentReactionShortName, type CollaborationCommentSelection, type CollaborationCommentStatus, type CollaborationCommentTarget, type CollaborationCommentUpdate, type CollaborationCommentsClient, type CollaborationCommentsListenOptions, type CollaborationCommentsRequestOptions, type CollaborationCommentsWriteOptions, ConnectionFailedError, type ConstantAgentActionParam, ContentSourceMap, ContentSourceMapDocument, ContentSourceMapDocumentBase, ContentSourceMapDocumentValueSource, ContentSourceMapDocuments, ContentSourceMapLiteralSource, ContentSourceMapMapping, ContentSourceMapMappings, type ContentSourceMapParsedPath, type ContentSourceMapParsedPathKeyedSegment, ContentSourceMapPaths, ContentSourceMapRemoteDocument, ContentSourceMapSource, ContentSourceMapUnknownSource, ContentSourceMapValueMapping, types_d_exports as Context, CorsOriginError, CreateAction, CreateReleaseAction, CreateVariantAction, CreateVariantDefinitionAction, CreateVersionAction, CurrentSanityUser, DatasetAclMode, DatasetCreateOptions, DatasetEditOptions, DatasetResponse, type DatasetsClient, DatasetsResponse, DeleteAction, DeleteReleaseAction, DeleteVariantAction, DeleteVariantDefinitionAction, DiscardAction, DiscardVersionAction, DisconnectError, DisconnectEvent, type DocumentAgentActionParam, EXPERIMENTAL_API_WARNING, EditAction, EditReleaseAction, EditVariantAction, EditVariantDefinitionAction, EditableReleaseDocument, EmbeddingsSettings, EmbeddingsSettingsBody, ErrorProps, type EventSourceEvent, type EventSourceInstance, type FieldAgentActionParam, type FilterDefault, FilteredResponseQueryOptions, FirstDocumentIdMutationOptions, FirstDocumentMutationOptions, FitMode, type GenerateInstruction, type GenerateOperation, type GenerateTarget, type GenerateTargetDocument, type GenerateTargetInclude, type GroqAgentActionParam, type HttpError, HttpRequest, IdentifiedSanityDocumentStub, type ImageDescriptionOperation, ImportReleaseAction, InitializedClientConfig, type InitializedStegaConfig, InsertPatch, type InvokeFunctionEvent, type InvokeFunctionOptions, type InvokeFunctionRequest, ListenEvent, ListenEventName, ListenOptions, ListenParams, type LiveClient, LiveEvent, LiveEventGoAway, LiveEventMessage, LiveEventReconnect, LiveEventRestart, LiveEventWelcome, type Logger, MediaLibraryAssetDocument, MediaLibraryAssetInstanceIdentifier, MediaLibraryAssetVersion, MediaLibraryPlaybackInfoOptions, type MediaLibraryVideoClient, MediaLibraryVideoPlaybackTransformations, MessageError, MessageParseError, MultipleActionResult, MultipleMutationResult, Mutation, MutationError, MutationErrorItem, MutationEvent, MutationOperation, MutationSelection, MutationSelectionQueryParams, type ObservableAssetsClient, type ObservableCollaborationCommentsClient, type ObservableDatasetsClient, type ObservableMediaLibraryVideoClient, ObservablePatch, ObservablePatchBuilder, type ObservableProjectsClient, ObservableSanityClient, ObservableTransaction, type ObservableUsersClient, OpenEvent, PartialExcept, Patch, PatchBuilder, type PatchDocument, PatchMutationOperation, type PatchOperation, PatchOperations, PatchSelection, type PatchTarget, type ProjectsClient, type PromptRequest, PublishAction, PublishReleaseAction, PublishVariantAction, QueryOptions, QueryParams, QueryParseError, QueryWithoutParams, RawQueryResponse, RawQuerylessQueryResponse, RawRequestOptions, ReconnectEvent, ReleaseAction, ReleaseCardinality, ReleaseDocument, ReleaseId, ReleaseState, ReleaseType, ReplaceDraftAction, ReplaceVersionAction, RequestHandler, RequestHandlerOptions, RequestObservableOptions, RequestOptions, RequestUrlOptions, Requester, ResetEvent, type ResolveStudioUrl, ResponseQueryOptions, ResumableListenEventNames, ResumableListenOptions, SanityAssetDocument, SanityClient, SanityDocument, SanityDocumentStub, SanityImageAssetDocument, SanityImagePalette, SanityProject, SanityProjectMember, SanityQueries, SanityReference, SanityUser, ScheduleReleaseAction, ServerError, type ServerSentEvent, SingleActionResult, SingleMutationResult, StackablePerspective, type StegaConfig, type StegaConfigRequiredKeys, StillImageFormat, StoryboardTransformOptions, type StudioBaseRoute, type StudioBaseUrl, type StudioUrl, SyncTag, ThumbnailTransformOptions, type TimeoutErrorLike, Transaction, TransactionAllDocumentIdsMutationOptions, TransactionAllDocumentsMutationOptions, TransactionFirstDocumentIdMutationOptions, TransactionFirstDocumentMutationOptions, TransactionMutationOptions, type TransformDocument, type TransformOperation, type TransformTarget, type TransformTargetDocument, type TransformTargetInclude, type TranslateDocument, type TranslateTarget, type TranslateTargetInclude, UnarchiveReleaseAction, UnfilteredResponseQueryOptions, UnfilteredResponseWithoutQuery, UnpublishAction, UnpublishVariantAction, UnpublishVersionAction, UnscheduleReleaseAction, UploadBody, UploadClientConfig, UploadEvent, UploadProgressEvent, UploadResponseEvent, type UsersClient, VariantAction, VariantDefinitionAction, VersionAction, VideoPlaybackInfo, VideoPlaybackInfoItem, VideoPlaybackInfoItemPublic, VideoPlaybackInfoItemSigned, VideoPlaybackInfoPublic, VideoPlaybackInfoSigned, VideoPlaybackTokens, VideoRenditionInfo, VideoRenditionInfoPublic, VideoRenditionInfoSigned, VideoSubtitleInfo, VideoSubtitleInfoPublic, VideoSubtitleInfoSigned, WelcomeBackEvent, WelcomeEvent, type _listen, connectEventSource, createClient, deprecatedCreateClient as default, formatQueryParseError, isHttpError, isQueryParseError, isTimeoutError, requester, validateApiPerspective };
185
185
  //# sourceMappingURL=index.d.ts.map