@sanity/sdk 2.9.0 → 2.10.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 (50) hide show
  1. package/dist/_chunks-dts/utils.d.ts +105 -51
  2. package/dist/_chunks-es/createGroqSearchFilter.js +131 -54
  3. package/dist/_chunks-es/createGroqSearchFilter.js.map +1 -1
  4. package/dist/_chunks-es/version.js +1 -1
  5. package/dist/_exports/_internal.d.ts +1 -1
  6. package/dist/index.d.ts +2 -2
  7. package/dist/index.js +119 -73
  8. package/dist/index.js.map +1 -1
  9. package/package.json +8 -10
  10. package/src/_exports/index.ts +8 -0
  11. package/src/client/clientStore.test.ts +30 -30
  12. package/src/client/clientStore.ts +47 -47
  13. package/src/comlink/controller/actions/getOrCreateChannel.ts +2 -2
  14. package/src/comlink/node/actions/getOrCreateNode.ts +2 -2
  15. package/src/config/sanityConfig.ts +72 -12
  16. package/src/document/applyDocumentActions.test.ts +7 -7
  17. package/src/document/applyDocumentActions.ts +5 -5
  18. package/src/document/documentStore.test.ts +68 -62
  19. package/src/document/documentStore.ts +36 -36
  20. package/src/document/processActions.ts +2 -2
  21. package/src/document/reducers.ts +4 -4
  22. package/src/document/sharedListener.ts +7 -7
  23. package/src/presence/bifurTransport.test.ts +46 -6
  24. package/src/presence/bifurTransport.ts +13 -1
  25. package/src/presence/presenceStore.test.ts +96 -0
  26. package/src/presence/presenceStore.ts +96 -24
  27. package/src/preview/getPreviewState.ts +1 -1
  28. package/src/preview/previewProjectionUtils.test.ts +4 -4
  29. package/src/preview/previewProjectionUtils.ts +7 -7
  30. package/src/preview/resolvePreview.ts +5 -1
  31. package/src/projection/getProjectionState.ts +4 -4
  32. package/src/projection/projectionStore.test.ts +2 -2
  33. package/src/projection/resolveProjection.ts +2 -2
  34. package/src/projection/subscribeToStateAndFetchBatches.test.ts +1 -1
  35. package/src/projection/subscribeToStateAndFetchBatches.ts +12 -11
  36. package/src/query/queryStore.test.ts +12 -12
  37. package/src/query/queryStore.ts +10 -10
  38. package/src/query/reducers.ts +3 -3
  39. package/src/releases/getPerspectiveState.ts +5 -5
  40. package/src/releases/releasesStore.test.ts +6 -6
  41. package/src/releases/releasesStore.ts +9 -9
  42. package/src/store/createActionBinder.test.ts +31 -31
  43. package/src/store/createActionBinder.ts +43 -38
  44. package/src/store/createSanityInstance.ts +2 -3
  45. package/src/users/reducers.ts +3 -4
  46. package/src/utils/createFetcherStore.ts +6 -4
  47. package/src/utils/isImportError.test.ts +72 -0
  48. package/src/utils/isImportError.ts +34 -0
  49. package/src/utils/object.test.ts +95 -0
  50. package/src/utils/object.ts +142 -0
@@ -1,8 +1,8 @@
1
- import * as _sanity_client12 from "@sanity/client";
1
+ import * as _sanity_client20 from "@sanity/client";
2
2
  import { ClientConfig, ClientError, ClientPerspective, ListenEvent, MultipleMutationResult, ResponseQueryOptions, SanityClient, SanityDocument, SanityProject, StackablePerspective } from "@sanity/client";
3
3
  import { CurrentUser, CurrentUser as CurrentUser$1, Mutation, PatchOperations, Role, SanityDocument as SanityDocument$1, SanityDocument as SanityDocument$3, SanityDocumentLike } from "@sanity/types";
4
4
  import { Observable, Subject } from "rxjs";
5
- import * as _sanity_comlink5 from "@sanity/comlink";
5
+ import * as _sanity_comlink3 from "@sanity/comlink";
6
6
  import { ChannelInput, ChannelInstance, Controller, Message, Node, NodeInput, Status } from "@sanity/comlink";
7
7
  import { PatchMutation } from "@sanity/mutate/_unstable_store";
8
8
  import { SanityDocument as SanityDocument$2, SanityProjectionResult, SanityQueryResult } from "groq";
@@ -145,9 +145,14 @@ interface DatasetHandle<TDataset extends string = string, TProjectId extends str
145
145
  dataset?: TDataset;
146
146
  /**
147
147
  * @beta
148
- * Explicit source object to use for this operation.
148
+ * Explicit resource object to use for this operation.
149
149
  */
150
- source?: DocumentSource;
150
+ resource?: DocumentResource;
151
+ /**
152
+ * @deprecated Use `resource` instead.
153
+ * @beta
154
+ */
155
+ source?: DocumentResource;
151
156
  }
152
157
  /**
153
158
  * Identifies a specific document type within a Sanity dataset and project.
@@ -204,45 +209,85 @@ interface SanityConfig extends DatasetHandle, PerspectiveHandle {
204
209
  };
205
210
  /**
206
211
  * @beta
207
- * A list of named sources to use for this instance.
212
+ * A list of named resources to use for this instance.
213
+ */
214
+ resources?: Record<string, DocumentResource>;
215
+ /**
216
+ * @deprecated Use `resources` instead.
217
+ * @beta
208
218
  */
209
- sources?: Record<string, DocumentSource>;
219
+ sources?: Record<string, DocumentResource>;
210
220
  }
211
221
  /**
212
- * A document source can be used for querying.
222
+ * A document resource can be used for querying.
213
223
  * This will soon be the default way to identify where you are querying from.
214
224
  *
215
225
  * @beta
216
226
  */
217
- type DocumentSource = DatasetSource | MediaLibrarySource | CanvasSource;
227
+ type DocumentResource = DatasetResource | MediaLibraryResource | CanvasResource$1;
218
228
  /**
219
229
  * @beta
220
230
  */
221
- type DatasetSource = {
231
+ type DatasetResource = {
222
232
  projectId: string;
223
233
  dataset: string;
224
234
  };
225
235
  /**
226
236
  * @beta
227
237
  */
228
- type MediaLibrarySource = {
238
+ type MediaLibraryResource = {
229
239
  mediaLibraryId: string;
230
240
  };
231
241
  /**
232
242
  * @beta
233
243
  */
234
- type CanvasSource = {
244
+ type CanvasResource$1 = {
235
245
  canvasId: string;
236
246
  };
237
247
  /**
238
248
  * @beta
239
249
  */
250
+ declare function isDatasetResource(resource: DocumentResource): resource is DatasetResource;
251
+ /**
252
+ * @beta
253
+ */
254
+ declare function isMediaLibraryResource(resource: DocumentResource): resource is MediaLibraryResource;
255
+ /**
256
+ * @beta
257
+ */
258
+ declare function isCanvasResource(resource: DocumentResource): resource is CanvasResource$1;
259
+ /**
260
+ * @deprecated Use `DocumentResource` instead.
261
+ * @beta
262
+ */
263
+ type DocumentSource = DocumentResource;
264
+ /**
265
+ * @deprecated Use `DatasetResource` instead.
266
+ * @beta
267
+ */
268
+ type DatasetSource = DatasetResource;
269
+ /**
270
+ * @deprecated Use `MediaLibraryResource` instead.
271
+ * @beta
272
+ */
273
+ type MediaLibrarySource = MediaLibraryResource;
274
+ /**
275
+ * @deprecated Use `CanvasResource` instead.
276
+ * @beta
277
+ */
278
+ type CanvasSource = CanvasResource$1;
279
+ /**
280
+ * @deprecated Use `isDatasetResource` instead.
281
+ * @beta
282
+ */
240
283
  declare function isDatasetSource(source: DocumentSource): source is DatasetSource;
241
284
  /**
285
+ * @deprecated Use `isMediaLibraryResource` instead.
242
286
  * @beta
243
287
  */
244
288
  declare function isMediaLibrarySource(source: DocumentSource): source is MediaLibrarySource;
245
289
  /**
290
+ * @deprecated Use `isCanvasResource` instead.
246
291
  * @beta
247
292
  */
248
293
  declare function isCanvasSource(source: DocumentSource): source is CanvasSource;
@@ -502,19 +547,16 @@ interface ClientOptions extends Pick<ClientConfig, AllowedClientConfigKey> {
502
547
  * and the global client ('global'). When set to `'global'`, the global client
503
548
  * is used.
504
549
  */
505
- 'scope'?: 'default' | 'global';
550
+ scope?: 'default' | 'global';
506
551
  /**
507
552
  * A required string indicating the API version for the client.
508
553
  */
509
- 'apiVersion': string;
554
+ apiVersion: string;
510
555
  /**
511
556
  * @internal
557
+ * The SDK resource to use for the client -- this will get transformed into a ClientConfig resource.
512
558
  */
513
- '~experimental_resource'?: ClientConfig['~experimental_resource'];
514
- /**
515
- * @internal
516
- */
517
- 'source'?: DocumentSource;
559
+ resource?: DocumentResource;
518
560
  }
519
561
  /**
520
562
  * Retrieves a Sanity client instance configured with the provided options.
@@ -595,7 +637,7 @@ declare const destroyController: BoundStoreAction<ComlinkControllerState, [], vo
595
637
  * an application and the controller.
596
638
  * @public
597
639
  */
598
- declare const getOrCreateChannel: BoundStoreAction<ComlinkControllerState, [options: ChannelInput], ChannelInstance<_sanity_comlink5.Message, _sanity_comlink5.Message>>;
640
+ declare const getOrCreateChannel: BoundStoreAction<ComlinkControllerState, [options: ChannelInput], ChannelInstance<_sanity_comlink3.Message, _sanity_comlink3.Message>>;
599
641
  /**
600
642
  * Initializes or fetches a controller to handle communication
601
643
  * between an application and iframes.
@@ -636,7 +678,7 @@ declare const releaseNode: BoundStoreAction<ComlinkNodeState, [name: string], vo
636
678
  * be created within a frame / window to communicate with the controller.
637
679
  * @public
638
680
  */
639
- declare const getOrCreateNode: BoundStoreAction<ComlinkNodeState, [options: NodeInput], Node<_sanity_comlink5.Message, _sanity_comlink5.Message>>;
681
+ declare const getOrCreateNode: BoundStoreAction<ComlinkNodeState, [options: NodeInput], Node<_sanity_comlink3.Message, _sanity_comlink3.Message>>;
640
682
  /**
641
683
  * @public
642
684
  */
@@ -957,9 +999,9 @@ interface Logger {
957
999
  */
958
1000
  declare function configureLogging(config: LoggerConfig): void;
959
1001
  /** @public */
960
- declare const getDatasetsState: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client12.DatasetsResponse>, [options?: ProjectHandle<string> | undefined], StateSource<_sanity_client12.DatasetsResponse | undefined>>;
1002
+ declare const getDatasetsState: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client20.DatasetsResponse>, [options?: ProjectHandle<string> | undefined], StateSource<_sanity_client20.DatasetsResponse | undefined>>;
961
1003
  /** @public */
962
- declare const resolveDatasets: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client12.DatasetsResponse>, [options?: ProjectHandle<string> | undefined], Promise<_sanity_client12.DatasetsResponse>>;
1004
+ declare const resolveDatasets: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client20.DatasetsResponse>, [options?: ProjectHandle<string> | undefined], Promise<_sanity_client20.DatasetsResponse>>;
963
1005
  /**
964
1006
  * Represents an action to create a new document.
965
1007
  * Specifies the document type and optionally a document ID (which will be treated as the published ID).
@@ -1273,7 +1315,7 @@ declare function resolveDocument<TData extends SanityDocument$2>(instance: Sanit
1273
1315
  /** @beta */
1274
1316
  declare const getDocumentSyncStatus: BoundStoreAction<DocumentStoreState, [doc: DocumentHandle<string, string, string>], StateSource<boolean | undefined>>;
1275
1317
  type PermissionsStateOptions = {
1276
- source?: DocumentSource;
1318
+ resource?: DocumentResource;
1277
1319
  actions: DocumentAction[];
1278
1320
  };
1279
1321
  /** @beta */
@@ -1282,7 +1324,7 @@ declare const getPermissionsState: BoundStoreAction<DocumentStoreState, [Permiss
1282
1324
  declare const resolvePermissions: BoundStoreAction<DocumentStoreState, [options: PermissionsStateOptions], Promise<DocumentPermissionsResult>>;
1283
1325
  /** @beta */
1284
1326
  declare const subscribeDocumentEvents: BoundStoreAction<DocumentStoreState, [options: {
1285
- source?: DocumentSource;
1327
+ resource?: DocumentResource;
1286
1328
  eventHandler: (e: DocumentEvent) => void;
1287
1329
  }], () => void>;
1288
1330
  type ActionMap = {
@@ -1531,9 +1573,9 @@ interface ApplyDocumentActionsOptions {
1531
1573
  */
1532
1574
  actions: DocumentAction[];
1533
1575
  /**
1534
- * The source to which the documents being acted on belong.
1576
+ * The resource to which the documents being acted on belong.
1535
1577
  */
1536
- source?: DocumentSource;
1578
+ resource?: DocumentResource;
1537
1579
  /**
1538
1580
  * Optionally provide an ID to be used as this transaction ID
1539
1581
  */
@@ -1704,20 +1746,10 @@ interface DisconnectEvent {
1704
1746
  sessionId: string;
1705
1747
  timestamp: string;
1706
1748
  }
1707
- type PresenceStoreState = {
1708
- locations: Map<string, {
1709
- userId: string;
1710
- locations: PresenceLocation[];
1711
- }>;
1712
- users: Record<string, SanityUser | undefined>;
1713
- };
1714
- /** @public */
1715
-
1716
- /** @public */
1717
- declare const getPresence: BoundStoreAction<PresenceStoreState, [((object & {
1718
- projectId?: string;
1719
- dataset?: string;
1720
- }) | undefined)?, ...unknown[]], StateSource<UserPresence[]>>;
1749
+ /** @beta */
1750
+ declare function getPresence(instance: SanityInstance, params?: {
1751
+ resource?: DocumentResource;
1752
+ }): StateSource<UserPresence[]>;
1721
1753
  /**
1722
1754
  * @public
1723
1755
  * The result of a projection query
@@ -1843,10 +1875,10 @@ declare const PREVIEW_PROJECTION: string;
1843
1875
  *
1844
1876
  * @param projectionResult - The raw projection result from GROQ
1845
1877
  * @param instance - The Sanity instance to use for client configuration
1846
- * @param source - Data source for the preview
1878
+ * @param resource - Data resource for the preview
1847
1879
  * @internal
1848
1880
  */
1849
- declare function transformProjectionToPreview(instance: SanityInstance, projectionResult: PreviewQueryResult, source?: DocumentSource): PreviewValue;
1881
+ declare function transformProjectionToPreview(instance: SanityInstance, projectionResult: PreviewQueryResult, resource?: DocumentResource): PreviewValue;
1850
1882
  /**
1851
1883
  * @beta
1852
1884
  * @deprecated This type is deprecated and will be removed in a future release.
@@ -1858,9 +1890,9 @@ type ResolvePreviewOptions = DocumentHandle;
1858
1890
  */
1859
1891
  declare function resolvePreview(instance: SanityInstance, options: ResolvePreviewOptions): Promise<ValuePending<PreviewValue>>;
1860
1892
  /** @public */
1861
- declare const getProjectState: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client12.SanityProject>, [options?: ProjectHandle<string> | undefined], StateSource<_sanity_client12.SanityProject | undefined>>;
1893
+ declare const getProjectState: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client20.SanityProject>, [options?: ProjectHandle<string> | undefined], StateSource<_sanity_client20.SanityProject | undefined>>;
1862
1894
  /** @public */
1863
- declare const resolveProject: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client12.SanityProject>, [options?: ProjectHandle<string> | undefined], Promise<_sanity_client12.SanityProject>>;
1895
+ declare const resolveProject: BoundStoreAction<FetcherStoreState<[options?: ProjectHandle<string> | undefined], _sanity_client20.SanityProject>, [options?: ProjectHandle<string> | undefined], Promise<_sanity_client20.SanityProject>>;
1864
1896
  interface ProjectionOptions<TProjection extends string = string, TDocumentType extends string = string, TDataset extends string = string, TProjectId extends string = string> extends DocumentHandle<TDocumentType, TDataset, TProjectId> {
1865
1897
  projection: TProjection;
1866
1898
  }
@@ -1884,18 +1916,18 @@ declare function resolveProjection<TData extends object>(instance: SanityInstanc
1884
1916
  declare const getProjectsState: BoundStoreAction<FetcherStoreState<[options?: {
1885
1917
  organizationId?: string;
1886
1918
  includeMembers?: boolean;
1887
- } | undefined], Omit<_sanity_client12.SanityProject, "members">[]>, [options?: {
1919
+ } | undefined], Omit<_sanity_client20.SanityProject, never>[]>, [options?: {
1888
1920
  organizationId?: string;
1889
1921
  includeMembers?: boolean;
1890
- } | undefined], StateSource<Omit<_sanity_client12.SanityProject, "members">[] | undefined>>;
1922
+ } | undefined], StateSource<Omit<_sanity_client20.SanityProject, never>[] | undefined>>;
1891
1923
  /** @public */
1892
1924
  declare const resolveProjects: BoundStoreAction<FetcherStoreState<[options?: {
1893
1925
  organizationId?: string;
1894
1926
  includeMembers?: boolean;
1895
- } | undefined], Omit<_sanity_client12.SanityProject, "members">[]>, [options?: {
1927
+ } | undefined], Omit<_sanity_client20.SanityProject, never>[]>, [options?: {
1896
1928
  organizationId?: string;
1897
1929
  includeMembers?: boolean;
1898
- } | undefined], Promise<Omit<_sanity_client12.SanityProject, "members">[]>>;
1930
+ } | undefined], Promise<Omit<_sanity_client20.SanityProject, never>[]>>;
1899
1931
  /**
1900
1932
  * @beta
1901
1933
  */
@@ -1975,12 +2007,12 @@ interface ReleasesStoreState {
1975
2007
  * @internal
1976
2008
  */
1977
2009
  declare const getActiveReleasesState: (instance: SanityInstance, options?: {
1978
- source?: DocumentSource;
2010
+ resource?: DocumentResource;
1979
2011
  }) => StateSource<ReleaseDocument[] | undefined>;
1980
2012
  declare const _getPerspectiveStateSelector: StoreAction<ReleasesStoreState, [_?: (PerspectiveHandle & {
1981
2013
  projectId?: string;
1982
2014
  dataset?: string;
1983
- source?: DocumentSource;
2015
+ resource?: DocumentResource;
1984
2016
  }) | undefined], StateSource<string[] | "previewDrafts" | "published" | "drafts" | "raw" | undefined>, unknown>;
1985
2017
  type OmitFirst<T extends unknown[]> = T extends [unknown, ...infer R] ? R : never;
1986
2018
  type SelectorParams = OmitFirst<Parameters<typeof _getPerspectiveStateSelector>>;
@@ -2260,6 +2292,28 @@ declare function defineIntent(intent: Intent): Intent;
2260
2292
  * @returns The project ID or null if the error is not a CorsOriginError.
2261
2293
  */
2262
2294
  declare function getCorsErrorProjectId(error: Error): string | null;
2295
+ /**
2296
+ * Returns true when the given error looks like a dynamic-import or
2297
+ * code-split chunk-loading failure.
2298
+ *
2299
+ * These errors typically surface when a user has a tab open against a
2300
+ * previously-deployed version of an app and the JavaScript or CSS chunk
2301
+ * filenames have since changed: a fresh deployment removes the hashed assets
2302
+ * the open tab still references. Detecting them lets the SDK trigger an
2303
+ * automatic reload so the user gets the new build without manual intervention.
2304
+ *
2305
+ * Recognized shapes (webpack ChunkLoadError, Vite "Failed to fetch
2306
+ * dynamically imported module", Firefox "error loading dynamically imported
2307
+ * module", Safari "Importing a module script failed", and Vite "Unable to
2308
+ * preload CSS").
2309
+ *
2310
+ * @param error - The value to inspect. Anything that is not an Error
2311
+ * instance returns false.
2312
+ * @returns True if the error matches a known import/chunk-load failure.
2313
+ *
2314
+ * @public
2315
+ */
2316
+ declare function isImportError(error: unknown): boolean;
2263
2317
  /**
2264
2318
  * This version is provided by pkg-utils at build time
2265
2319
  * @internal
@@ -2393,4 +2447,4 @@ declare function getClientErrorApiType(error: ClientError): string | undefined;
2393
2447
  declare function getClientErrorApiDescription(error: ClientError): string | undefined;
2394
2448
  /** @internal True if the error represents a projectUserNotFoundError. */
2395
2449
  declare function isProjectUserNotFoundClientError(error: ClientError): boolean;
2396
- export { resolveProjects as $, logout as $n, getDocumentSyncStatus as $t, getCorsErrorProjectId as A, LoggerConfig as An, ProjectHandle as Ar, SanityUserResponse as At, resolveUser as B, ComlinkControllerState as Bn, ActionErrorEvent as Bt, getIndexForKey as C, resolveDatasets as Cn, DatasetHandle as Cr, UserPresence as Ct, slicePath as D, LogLevel as Dn, DocumentTypeHandle as Dr, ResolveUserOptions as Dt, jsonMatch as E, LogContext as En, DocumentSource as Er, Membership as Et, FetcherStore as F, NodeState as Fn, isCanvasSource as Fr, getFavoritesState as Ft, ReleaseDocument as G, FrameMessage as Gn, DocumentEvent as Gt, getUsersKey as H, getOrCreateChannel as Hn, DocumentDeletedEvent as Ht, FetcherStoreState as I, getNodeState as In, isDatasetSource as Ir, resolveFavoritesState as It, getQueryKey as J, WindowMessage as Jn, DocumentUnpublishedEvent as Jt, getActiveReleasesState as K, NewTokenResponseMessage as Kn, DocumentPublishedEvent as Kt, getUserState as L, ComlinkNodeState as Ln, isMediaLibrarySource as Lr, ActionsResult as Lt, IntentFilter as M, createDocumentHandle as Mn, SanityConfig as Mr, UsersGroupState as Mt, defineIntent as N, createDocumentTypeHandle as Nn, StudioConfig as Nr, UsersStoreState as Nt, stringifyPath as O, LogNamespace as On, MediaLibrarySource as Or, ResolveUsersOptions as Ot, createGroqSearchFilter as P, createProjectHandle as Pn, TokenSource as Pr, FavoriteStatusResponse as Pt, getProjectsState as Q, getClientState as Qn, getDocumentState as Qt, getUsersState as R, getOrCreateNode as Rn, AuthConfig as Rr, ApplyDocumentActionsOptions as Rt, SanityProject$1 as S, getDatasetsState as Sn, CanvasSource as Sr, TransportEvent as St, joinPaths as T, InstanceContext as Tn, DocumentHandle as Tr, GetUsersOptions as Tt, parseUsersKey as U, getOrCreateController as Un, DocumentDiscardedEvent as Ut, resolveUsers as V, destroyController as Vn, DocumentCreatedEvent as Vt, getPerspectiveState as W, releaseChannel as Wn, DocumentEditedEvent as Wt, parseQueryKey as X, ClientStoreState as Xn, TransactionRevertedEvent as Xt, getQueryState as Y, ClientOptions as Yn, TransactionAcceptedEvent as Yt, resolveQuery as Z, getClient as Zn, DocumentOptions as Zt, getTokenState as _, deleteDocument as _n, agentTransform as _r, getPresence as _t, isProjectUserNotFoundClientError as a, PermissionDeniedReason as an, AgentGenerateResult as ar, resolvePreview as at, Role as b, publishDocument as bn, createSanityInstance as br, RollCallEvent as bt, ErrorAuthState as c, StateSource as cn, AgentPromptOptions as cr, GetPreviewStateOptions as ct, LoggingInAuthState as d, DiscardDocumentAction as dn, AgentTransformResult as dr, PreviewQueryResult as dt, getPermissionsState as en, handleAuthCallback as er, resolveProjection as et, getAuthState as f, DocumentAction as fn, AgentTranslateOptions as fr, PreviewStoreState as ft, getLoginUrlState as g, createDocument as gn, agentPrompt as gr, ValidProjection as gt, getIsInDashboardState as h, UnpublishDocumentAction as hn, agentPatch as hr, ProjectionValuePending as ht, getClientErrorApiType as i, DocumentPermissionsResult as in, AgentGenerateOptions as ir, ResolvePreviewOptions as it, Intent as j, createDatasetHandle as jn, ReleasePerspective as jr, UserProfile as jt, CORE_SDK_VERSION as k, Logger as kn, PerspectiveHandle as kr, SanityUser as kt, LoggedInAuthState as l, CreateDocumentAction as ln, AgentPromptResult as lr, getPreviewState as lt, getDashboardOrganizationId as m, PublishDocumentAction as mn, agentGenerate as mr, ValuePending as mt, getClientErrorApiBody as n, resolvePermissions as nn, OrgVerificationResult as nr, getProjectState as nt, AuthState as o, JsonMatch as on, AgentPatchOptions as or, transformProjectionToPreview as ot, getCurrentUserState as p, EditDocumentAction as pn, AgentTranslateResult as pr, PreviewValue as pt, QueryOptions as q, RequestNewTokenMessage as qn, DocumentTransactionSubmissionResult as qt, getClientErrorApiDescription as r, subscribeDocumentEvents as rn, AuthStateType as rr, resolveProject as rt, AuthStoreState as s, Selector as sn, AgentPatchResult as sr, PREVIEW_PROJECTION as st, ApiErrorBody as t, resolveDocument as tn, observeOrganizationVerificationState as tr, getProjectionState as tt, LoggedOutAuthState as u, DeleteDocumentAction as un, AgentTransformOptions as ur, PreviewMedia as ut, setAuthToken as v, discardDocument as vn, agentTranslate as vr, DisconnectEvent as vt, getPathDepth as w, configureLogging as wn, DatasetSource as wr, GetUserOptions as wt, SanityDocument$3 as x, unpublishDocument as xn, isStudioConfig as xr, StateEvent as xt, CurrentUser$1 as y, editDocument as yn, SanityInstance as yr, PresenceLocation as yt, loadMoreUsers as z, releaseNode as zn, AuthProvider as zr, applyDocumentActions as zt };
2450
+ export { getProjectsState as $, getClientState as $n, getDocumentState as $t, isImportError as A, Logger as An, DocumentSource as Ar, SanityUser as At, loadMoreUsers as B, releaseNode as Bn, isCanvasResource as Br, applyDocumentActions as Bt, getIndexForKey as C, getDatasetsState as Cn, CanvasResource$1 as Cr, TransportEvent as Ct, slicePath as D, LogContext as Dn, DatasetSource as Dr, Membership as Dt, jsonMatch as E, InstanceContext as En, DatasetResource as Er, GetUsersOptions as Et, createGroqSearchFilter as F, createProjectHandle as Fn, ProjectHandle as Fr, FavoriteStatusResponse as Ft, getPerspectiveState as G, releaseChannel as Gn, isMediaLibrarySource as Gr, DocumentEditedEvent as Gt, resolveUsers as H, destroyController as Hn, isDatasetResource as Hr, DocumentCreatedEvent as Ht, FetcherStore as I, NodeState as In, ReleasePerspective as Ir, getFavoritesState as It, QueryOptions as J, RequestNewTokenMessage as Jn, DocumentTransactionSubmissionResult as Jt, ReleaseDocument as K, FrameMessage as Kn, AuthConfig as Kr, DocumentEvent as Kt, FetcherStoreState as L, getNodeState as Ln, SanityConfig as Lr, resolveFavoritesState as Lt, Intent as M, createDatasetHandle as Mn, MediaLibraryResource as Mr, UserProfile as Mt, IntentFilter as N, createDocumentHandle as Nn, MediaLibrarySource as Nr, UsersGroupState as Nt, stringifyPath as O, LogLevel as On, DocumentHandle as Or, ResolveUserOptions as Ot, defineIntent as P, createDocumentTypeHandle as Pn, PerspectiveHandle as Pr, UsersStoreState as Pt, resolveQuery as Q, getClient as Qn, DocumentOptions as Qt, getUserState as R, ComlinkNodeState as Rn, StudioConfig as Rr, ActionsResult as Rt, SanityProject$1 as S, unpublishDocument as Sn, isStudioConfig as Sr, StateEvent as St, joinPaths as T, configureLogging as Tn, DatasetHandle as Tr, GetUserOptions as Tt, getUsersKey as U, getOrCreateChannel as Un, isDatasetSource as Ur, DocumentDeletedEvent as Ut, resolveUser as V, ComlinkControllerState as Vn, isCanvasSource as Vr, ActionErrorEvent as Vt, parseUsersKey as W, getOrCreateController as Wn, isMediaLibraryResource as Wr, DocumentDiscardedEvent as Wt, getQueryState as X, ClientOptions as Xn, TransactionAcceptedEvent as Xt, getQueryKey as Y, WindowMessage as Yn, DocumentUnpublishedEvent as Yt, parseQueryKey as Z, ClientStoreState as Zn, TransactionRevertedEvent as Zt, getTokenState as _, createDocument as _n, agentPrompt as _r, ValidProjection as _t, isProjectUserNotFoundClientError as a, DocumentPermissionsResult as an, AgentGenerateOptions as ar, ResolvePreviewOptions as at, Role as b, editDocument as bn, SanityInstance as br, PresenceLocation as bt, ErrorAuthState as c, Selector as cn, AgentPatchResult as cr, PREVIEW_PROJECTION as ct, LoggingInAuthState as d, DeleteDocumentAction as dn, AgentTransformOptions as dr, PreviewMedia as dt, getDocumentSyncStatus as en, logout as er, resolveProjects as et, getAuthState as f, DiscardDocumentAction as fn, AgentTransformResult as fr, PreviewQueryResult as ft, getLoginUrlState as g, UnpublishDocumentAction as gn, agentPatch as gr, ProjectionValuePending as gt, getIsInDashboardState as h, PublishDocumentAction as hn, agentGenerate as hr, ValuePending as ht, getClientErrorApiType as i, subscribeDocumentEvents as in, AuthStateType as ir, resolveProject as it, getCorsErrorProjectId as j, LoggerConfig as jn, DocumentTypeHandle as jr, SanityUserResponse as jt, CORE_SDK_VERSION as k, LogNamespace as kn, DocumentResource as kr, ResolveUsersOptions as kt, LoggedInAuthState as l, StateSource as ln, AgentPromptOptions as lr, GetPreviewStateOptions as lt, getDashboardOrganizationId as m, EditDocumentAction as mn, AgentTranslateResult as mr, PreviewValue as mt, getClientErrorApiBody as n, resolveDocument as nn, observeOrganizationVerificationState as nr, getProjectionState as nt, AuthState as o, PermissionDeniedReason as on, AgentGenerateResult as or, resolvePreview as ot, getCurrentUserState as p, DocumentAction as pn, AgentTranslateOptions as pr, PreviewStoreState as pt, getActiveReleasesState as q, NewTokenResponseMessage as qn, AuthProvider as qr, DocumentPublishedEvent as qt, getClientErrorApiDescription as r, resolvePermissions as rn, OrgVerificationResult as rr, getProjectState as rt, AuthStoreState as s, JsonMatch as sn, AgentPatchOptions as sr, transformProjectionToPreview as st, ApiErrorBody as t, getPermissionsState as tn, handleAuthCallback as tr, resolveProjection as tt, LoggedOutAuthState as u, CreateDocumentAction as un, AgentPromptResult as ur, getPreviewState as ut, setAuthToken as v, deleteDocument as vn, agentTransform as vr, getPresence as vt, getPathDepth as w, resolveDatasets as wn, CanvasSource as wr, UserPresence as wt, SanityDocument$3 as x, publishDocument as xn, createSanityInstance as xr, RollCallEvent as xt, CurrentUser$1 as y, discardDocument as yn, agentTranslate as yr, DisconnectEvent as yt, getUsersState as z, getOrCreateNode as zn, TokenSource as zr, ApplyDocumentActionsOptions as zt };