@sanity/sdk 3.1.0 → 3.3.0-rc.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.
- package/dist/_exports/_internal.d.ts +52 -21
- package/dist/_exports/_internal.d.ts.map +1 -1
- package/dist/_exports/_internal.js +10 -9
- package/dist/_exports/_internal.js.map +1 -1
- package/dist/_exports/agent.d.ts +7 -7
- package/dist/_exports/agent.d.ts.map +1 -1
- package/dist/_exports/agent.js +1 -1
- package/dist/_exports/comlink.d.ts +9 -9
- package/dist/_exports/comlink.d.ts.map +1 -1
- package/dist/_exports/comlink.js +3 -2
- package/dist/_exports/comlink.js.map +1 -1
- package/dist/_exports/dashboard.d.ts +2 -0
- package/dist/_exports/dashboard.js +2 -0
- package/dist/{authStore-C-OEkGaM.d.ts → authStore-BGoEGxOq.d.ts} +531 -63
- package/dist/authStore-BGoEGxOq.d.ts.map +1 -0
- package/dist/{clientStore-gUALQ0qW.js → clientStore-QDrJNTM4.js} +128 -7
- package/dist/clientStore-QDrJNTM4.js.map +1 -0
- package/dist/{createSanityInstance-DCePpBYW.d.ts → createSanityInstance-BQIqyGLX.d.ts} +16 -1
- package/dist/createSanityInstance-BQIqyGLX.d.ts.map +1 -0
- package/dist/{object-BwynGPRZ.js → createStateSourceAction-DdAhEfnZ.js} +2 -82
- package/dist/createStateSourceAction-DdAhEfnZ.js.map +1 -0
- package/dist/defineProperty-Bho9Ngsi.js +31 -0
- package/dist/{getNodeState-E0hjqFOo.js → getNodeState-B4nG0sjm.js} +3 -2
- package/dist/{getNodeState-E0hjqFOo.js.map → getNodeState-B4nG0sjm.js.map} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +371 -54
- package/dist/index.js.map +1 -1
- package/dist/object-CxXlSVg7.js +83 -0
- package/dist/object-CxXlSVg7.js.map +1 -0
- package/dist/topicStore-Ct7IFNtY.js +565 -0
- package/dist/topicStore-Ct7IFNtY.js.map +1 -0
- package/dist/topicStore-DXvuH9h4.d.ts +435 -0
- package/dist/topicStore-DXvuH9h4.d.ts.map +1 -0
- package/dist/{version-C90rNWaX.js → version-CIhX5ppJ.js} +6 -6
- package/dist/{version-C90rNWaX.js.map → version-CIhX5ppJ.js.map} +1 -1
- package/package.json +20 -19
- package/src/_exports/_internal.ts +12 -0
- package/src/_exports/dashboard.ts +36 -0
- package/src/_exports/index.ts +17 -1
- package/src/applications/applications.test-d.ts +28 -4
- package/src/applications/applications.ts +39 -14
- package/src/auth/authMode.test.ts +24 -0
- package/src/auth/authMode.ts +8 -3
- package/src/auth/authStore.test.ts +18 -0
- package/src/auth/authStore.ts +15 -0
- package/src/auth/authStrategy.ts +2 -0
- package/src/auth/handleAuthCallback.test.ts +33 -0
- package/src/auth/handleAuthCallback.ts +11 -1
- package/src/auth/logout.test.ts +53 -0
- package/src/auth/logout.ts +19 -1
- package/src/auth/oauth/oauthActions.test.ts +593 -0
- package/src/auth/oauth/oauthActions.ts +438 -0
- package/src/auth/oauth/oauthAuth.test.ts +229 -0
- package/src/auth/oauth/oauthAuth.ts +178 -0
- package/src/auth/oauth/pkce.test.ts +44 -0
- package/src/auth/oauth/pkce.ts +60 -0
- package/src/auth/oauth/types.ts +12 -0
- package/src/config/authConfig.ts +18 -0
- package/src/dashboard/messageBus/__fixtures__/test-topics.ts +18 -0
- package/src/dashboard/messageBus/bus.test.ts +1033 -0
- package/src/dashboard/messageBus/bus.ts +1246 -0
- package/src/dashboard/messageBus/store.test.ts +142 -0
- package/src/dashboard/messageBus/store.ts +74 -0
- package/src/dashboard/messageBus/topicStore.test.ts +172 -0
- package/src/dashboard/messageBus/topicStore.ts +184 -0
- package/src/dashboard/messageBus/topics.test.ts +71 -0
- package/src/dashboard/messageBus/topics.ts +260 -0
- package/src/document/actions.ts +3 -3
- package/src/document/applyDocumentActions.ts +3 -3
- package/src/document/documentStore.ts +12 -12
- package/src/document/processMutations.ts +58 -22
- package/src/installations/installations.test-d.ts +3 -3
- package/src/installations/installations.ts +2 -19
- package/src/projection/getProjectionState.ts +2 -2
- package/src/projection/resolveProjection.ts +2 -2
- package/src/query/queryStore.ts +3 -3
- package/src/typegen/defineProjection.test.ts +17 -0
- package/src/typegen/defineProjection.ts +19 -0
- package/src/typegen/groqCompat.ts +122 -0
- package/src/typegen/resolve.ts +37 -0
- package/src/utils/createGroqSearchFilter.test.ts +8 -0
- package/src/utils/createGroqSearchFilter.ts +6 -3
- package/dist/authStore-C-OEkGaM.d.ts.map +0 -1
- package/dist/clientStore-gUALQ0qW.js.map +0 -1
- package/dist/createSanityInstance-DCePpBYW.d.ts.map +0 -1
- package/dist/object-BwynGPRZ.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { n as getClient, r as getClientState } from "./clientStore-
|
|
2
|
-
import {
|
|
1
|
+
import { n as getClient, r as getClientState } from "./clientStore-QDrJNTM4.js";
|
|
2
|
+
import { c as isReleasePerspective, i as bindActionGlobally, n as bindActionByResource, o as defineStore, s as getEnv, t as createStateSourceAction, u as isDatasetResource } from "./createStateSourceAction-DdAhEfnZ.js";
|
|
3
|
+
import { r as omitProperty } from "./object-CxXlSVg7.js";
|
|
3
4
|
import { n as setCleanupTimeout, t as setCleanupInterval } from "./setCleanupTimeout-BiM6q1KF.js";
|
|
4
5
|
import { ConnectionFailedError, CorsOriginError, DisconnectError } from "@sanity/client";
|
|
5
6
|
import { BehaviorSubject, EMPTY, NEVER, Observable, Subscription, catchError, combineLatest, defer, distinctUntilChanged, filter, first, firstValueFrom, groupBy, map, mergeMap, of, pairwise, race, retry, share, startWith, switchMap, take, tap } from "rxjs";
|
|
6
7
|
import "@sanity/types";
|
|
7
8
|
import { DocumentId, getPublishedId } from "@sanity/id-utils";
|
|
8
9
|
import { stringifyPath } from "@sanity/json-match";
|
|
9
|
-
import "groq";
|
|
10
10
|
import { createSelector } from "reselect";
|
|
11
11
|
/**
|
|
12
12
|
* Generates a random ID of the given length from the alphabet `[a-zA-Z0-9]`, the same shape
|
|
@@ -742,7 +742,7 @@ const addComment = (key, comment) => (prev) => {
|
|
|
742
742
|
let entries = { ...prev.entries }, changed = !1;
|
|
743
743
|
for (let [key, entry] of Object.entries(prev.entries)) {
|
|
744
744
|
let comment = entry?.comments?.[commentId];
|
|
745
|
-
|
|
745
|
+
entry && comment && (changed = !0, entries[key] = {
|
|
746
746
|
...entry,
|
|
747
747
|
comments: {
|
|
748
748
|
...entry.comments,
|
|
@@ -1372,7 +1372,7 @@ const _resolveQuery = bindActionByResource(queryStore, ({ state, instance }, { s
|
|
|
1372
1372
|
}, QUERY_STATE_CLEAR_DELAY);
|
|
1373
1373
|
};
|
|
1374
1374
|
return promise.then(releaseSubscriber, releaseSubscriber), promise;
|
|
1375
|
-
}), CORE_SDK_VERSION = getEnv("PKG_VERSION") || "3.
|
|
1375
|
+
}), CORE_SDK_VERSION = getEnv("PKG_VERSION") || "3.3.0-rc.0-development";
|
|
1376
1376
|
export { clearPendingTransaction as A, assertDatasetResource as B, getCommentsState as C, toCommentsKeyParts as D, resolveComments as E, rollbackCommentUpdate as F, defineMutation as G, provisionAddonDataset as H, setCommentCreateError as I, randomId as K, setPendingTransaction as L, receiveComment as M, removeCommentById as N, addComment as O, restoreComments as P, normalizeComment as R, getCommentsOptionsKey as S, resolveCommentThreads as T, COMMENTS_API_VERSION as U, getAddonDatasetState as V, defineFetcher as W, updateLastLoadMoreRequest as _, resolveQuery as a, commentsStore as b, getAllReleasesState as c, getUsersKey as d, initializeRequest as f, setUsersError as g, setUsersData as h, parseQueryKey as i, getCommentsKey as j, applyCommentUpdate as k, addSubscription as l, removeSubscription as m, getQueryKey as n, getPerspectiveState as o, parseUsersKey as p, randomUuid as q, getQueryState as r, getActiveReleasesState as s, CORE_SDK_VERSION as t, cancelRequest as u, PROJECT_API_VERSION as v, parseCommentsOptionsKey as w, getCommentThreadsState as x, USERS_STATE_CLEAR_DELAY as y, toCommentFieldPath as z };
|
|
1377
1377
|
|
|
1378
|
-
//# sourceMappingURL=version-
|
|
1378
|
+
//# sourceMappingURL=version-CIhX5ppJ.js.map
|