@sanity/sdk 3.9.1 → 3.9.2-next.20261014121948

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 (27) hide show
  1. package/dist/_exports/_internal.d.ts +2 -2
  2. package/dist/_exports/_internal.js +9 -17
  3. package/dist/_exports/_internal.js.map +1 -1
  4. package/dist/_exports/agent.js +1 -1
  5. package/dist/_exports/comlink.d.ts +1 -0
  6. package/dist/_exports/comlink.d.ts.map +1 -1
  7. package/dist/_exports/comlink.js +1 -1
  8. package/dist/_exports/dashboard.d.ts +2 -2
  9. package/dist/_exports/dashboard.js +2 -2
  10. package/dist/{applications-DowvM7CN.d.ts → applications-CkDu_W5X.d.ts} +3 -3
  11. package/dist/{applications-DowvM7CN.d.ts.map → applications-CkDu_W5X.d.ts.map} +1 -1
  12. package/dist/{authStore-KH1GNOOB.js → authStore-DwKgZOzo.js} +8 -26
  13. package/dist/{authStore-KH1GNOOB.js.map → authStore-DwKgZOzo.js.map} +1 -1
  14. package/dist/{bus-ClLO0kQU.d.ts → bus-bvKfVggT.d.ts} +2 -2
  15. package/dist/{bus-ClLO0kQU.d.ts.map → bus-bvKfVggT.d.ts.map} +1 -1
  16. package/dist/{clientStore-DW3iIcbg.js → clientStore-DnMH7LPG.js} +2 -2
  17. package/dist/{clientStore-DW3iIcbg.js.map → clientStore-DnMH7LPG.js.map} +1 -1
  18. package/dist/{getNodeState-CkxvEZD5.js → getNodeState-Bp9sxNE1.js} +2 -5
  19. package/dist/{getNodeState-CkxvEZD5.js.map → getNodeState-Bp9sxNE1.js.map} +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +50 -74
  22. package/dist/index.js.map +1 -1
  23. package/dist/{topicStore-CU-oF3fc.js → topicStore-CNzfuPGY.js} +2 -2
  24. package/dist/{topicStore-CU-oF3fc.js.map → topicStore-CNzfuPGY.js.map} +1 -1
  25. package/dist/{version-7EzMhxQE.js → version-Bx_0tNcN.js} +10 -14
  26. package/dist/{version-7EzMhxQE.js.map → version-Bx_0tNcN.js.map} +1 -1
  27. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  import { m as SanityConfig, s as DocumentResource, t as SanityInstance } from "../createSanityInstance--Lrldto8.js";
2
2
  import { n as StateSource, r as BoundStoreAction } from "../createStateSourceAction-CICvr0ZE.js";
3
- import { Bt as SetFavoriteInput, Et as GetUsersOptions, G as getQueryKey, Ii as ProjectAccessErrorDetails, Li as getProjectAccessErrorDetails, Rt as FavoriteDocumentContext, _a as MutationResult, ar as getTopicState, ct as PreviewValue, da as CacheTag, di as parseCommentsOptionsKey, dr as ApplicationStatus, fa as CacheWriter, fr as ApplicationStatusUpdate, ga as MutationDefinition, ha as FetcherSnapshot, li as getCommentsOptionsKey, ma as FetcherDefinition, or as resolveTopic, pa as Fetcher, q as parseQueryKey, r as ApplicationBase, st as PreviewQueryResult, ti as createLogger, va as defineFetcher, xr as MessageBusTopics, ya as defineMutation, zi as getSignInMethodLabel, zt as FavoriteStatusResponse } from "../applications-DowvM7CN.js";
4
- import { _ as installMessageBus, n as InstallMessageBusOptions, o as MessageBusConnection, v as isMessageBusEnvironment, y as resetMessageBus } from "../bus-ClLO0kQU.js";
3
+ import { Bt as SetFavoriteInput, Et as GetUsersOptions, G as getQueryKey, Ii as ProjectAccessErrorDetails, Li as getProjectAccessErrorDetails, Rt as FavoriteDocumentContext, _a as MutationResult, ar as getTopicState, ct as PreviewValue, da as CacheTag, di as parseCommentsOptionsKey, dr as ApplicationStatus, fa as CacheWriter, fr as ApplicationStatusUpdate, ga as MutationDefinition, ha as FetcherSnapshot, li as getCommentsOptionsKey, ma as FetcherDefinition, or as resolveTopic, pa as Fetcher, q as parseQueryKey, r as ApplicationBase, st as PreviewQueryResult, ti as createLogger, va as defineFetcher, xr as MessageBusTopics, ya as defineMutation, zi as getSignInMethodLabel, zt as FavoriteStatusResponse } from "../applications-CkDu_W5X.js";
4
+ import { _ as installMessageBus, n as InstallMessageBusOptions, o as MessageBusConnection, v as isMessageBusEnvironment, y as resetMessageBus } from "../bus-bvKfVggT.js";
5
5
  import { ClientError, SanityClient } from "@sanity/client";
6
6
  import { Observable } from "rxjs";
7
7
  import { CurrentUser } from "@sanity/types";
@@ -1,9 +1,9 @@
1
1
  import { t as __exportAll } from "../rolldown-runtime-vyAXikos.js";
2
- import { $ as randomUuid, D as parseCommentsOptionsKey, Q as randomId, S as toFavoriteDocument, T as getCommentsOptionsKey, X as defineFetcher, Y as getSignInMethodLabel, Z as defineMutation, d as getUsersKey, i as parseQueryKey, n as getQueryKey, p as parseUsersKey, q as getProjectAccessErrorDetails, t as CORE_SDK_VERSION } from "../version-7EzMhxQE.js";
3
- import { D as isStudioConfig, H as createLogger, I as resetMessageBus, N as installMessageBus, P as isMessageBusEnvironment, b as getClientErrorApiBody } from "../authStore-KH1GNOOB.js";
2
+ import { $ as randomUuid, D as parseCommentsOptionsKey, Q as randomId, S as toFavoriteDocument, T as getCommentsOptionsKey, X as defineFetcher, Y as getSignInMethodLabel, Z as defineMutation, d as getUsersKey, i as parseQueryKey, n as getQueryKey, p as parseUsersKey, q as getProjectAccessErrorDetails, t as CORE_SDK_VERSION } from "../version-Bx_0tNcN.js";
3
+ import { D as isStudioConfig, H as createLogger, I as resetMessageBus, N as installMessageBus, P as isMessageBusEnvironment, b as getClientErrorApiBody } from "../authStore-DwKgZOzo.js";
4
4
  import { i as pickProperties, n as isObject, t as isDeepEqual } from "../object-CxXlSVg7.js";
5
- import { n as getClient } from "../clientStore-DW3iIcbg.js";
6
- import { a as getDashboardMessageBus, i as resolveTopic, o as isDashboardEnvironment, r as getTopicState, s as requireDashboardMessageBus } from "../topicStore-CU-oF3fc.js";
5
+ import { n as getClient } from "../clientStore-DnMH7LPG.js";
6
+ import { a as getDashboardMessageBus, i as resolveTopic, o as isDashboardEnvironment, r as getTopicState, s as requireDashboardMessageBus } from "../topicStore-CNzfuPGY.js";
7
7
  import "@sanity/client";
8
8
  import { EMPTY, catchError, defer, distinctUntilChanged, map, merge } from "rxjs";
9
9
  import { DocumentId, isPublishedIdEqual } from "@sanity/id-utils";
@@ -397,22 +397,14 @@ const logger = createLogger("telemetry"), telemetryManagers = /* @__PURE__ */ ne
397
397
  */
398
398
  function initTelemetry(instance, projectId) {
399
399
  let environment = getTelemetryEnvironment();
400
- if (!environment) {
401
- logger.trace("initTelemetry skipped: environment not eligible", { internal: !0 });
402
- return;
403
- }
404
- if (!projectId) {
405
- logger.trace("initTelemetry skipped: no projectId", { internal: !0 });
406
- return;
407
- }
408
- telemetryManagers.has(instance) || initInFlight.has(instance) || (initInFlight.add(instance), logger.debug("initializing telemetry", {
400
+ environment ? projectId ? telemetryManagers.has(instance) || initInFlight.has(instance) || (initInFlight.add(instance), logger.debug("initializing telemetry", {
409
401
  projectId,
410
402
  environment
411
403
  }), Promise.all([
412
404
  Promise.resolve().then(() => telemetryManager_exports),
413
- import("../clientStore-DW3iIcbg.js").then((n) => n.t),
414
- import("../authStore-KH1GNOOB.js").then((n) => n.n),
415
- import("../authStore-KH1GNOOB.js").then((n) => n.E)
405
+ import("../clientStore-DnMH7LPG.js").then((n) => n.t),
406
+ import("../authStore-DwKgZOzo.js").then((n) => n.n),
407
+ import("../authStore-DwKgZOzo.js").then((n) => n.E)
416
408
  ]).then(async ([{ createTelemetryManager }, { getClient }, { getTokenState }, { isStudioConfig }]) => {
417
409
  if (instance.isDisposed()) {
418
410
  initInFlight.delete(instance), logger.debug("telemetry skipped: instance disposed before imports resolved");
@@ -467,7 +459,7 @@ function initTelemetry(instance, projectId) {
467
459
  });
468
460
  }).catch((err) => {
469
461
  initInFlight.delete(instance), logger.warn("telemetry init failed", { error: err });
470
- }));
462
+ })) : logger.trace("initTelemetry skipped: no projectId", { internal: !0 }) : logger.trace("initTelemetry skipped: environment not eligible", { internal: !0 });
471
463
  }
472
464
  /**
473
465
  * Retrieves the telemetry manager for an instance, if one exists.
@@ -1 +1 @@
1
- {"version":3,"file":"_internal.js","names":["\"NODE_ENV\""],"sources":["../../src/applications/applicationOrigin.ts","../../src/favorites/busFavorites.ts","../../src/preview/previewConstants.ts","../../src/preview/previewProjectionUtils.ts","../../src/telemetry/environment.ts","../../src/telemetry/events.ts","../../src/telemetry/telemetryManager.ts","../../src/telemetry/initTelemetry.ts","../../src/utils/createGroqSearchFilter.ts"],"sourcesContent":["import {type ApplicationBase} from './applications'\n\ntype SanityGlobal = typeof globalThis & {__SANITY_STAGING__?: boolean}\n\n/**\n * The origin an application is served from, or `null` when it has neither an external URL nor\n * a slug to derive one from. Callers treat `null` as \"nothing to load\" rather than failing the\n * whole list on one bad record.\n *\n * @internal\n */\nexport function getApplicationOrigin(\n application: Pick<ApplicationBase, 'externalUrl' | 'slug' | 'isSingleton' | 'organizationId'>,\n): string | null {\n if (application.externalUrl !== null) return new URL(application.externalUrl).origin\n if (application.slug === null) return null\n\n // Read at runtime, not via a bundler define: a remote is built once and runs in whichever\n // host page loaded it, and the host sets this flag. Mirrors workbench's `getSanityEnv`.\n const staging = (globalThis as SanityGlobal).__SANITY_STAGING__ === true\n if (application.isSingleton) {\n const domain = staging ? 'run.sanity.work' : 'sanity.run'\n return `https://${application.slug}-apps-${application.organizationId}.${domain}`\n }\n\n const domain = staging ? 'studio.sanity.work' : 'sanity.studio'\n return `https://${application.slug}.${domain}`\n}\n","import {FETCH_TIMEOUT_DEFAULT} from '@sanity/comlink'\nimport {DocumentId, isPublishedIdEqual} from '@sanity/id-utils'\nimport {catchError, defer, distinctUntilChanged, EMPTY, map, merge, type Observable} from 'rxjs'\n\nimport {requireDashboardMessageBus} from '../dashboard/messageBus/store'\nimport {type CapabilityRecord, type FavoriteDocument} from '../dashboard/messageBus/topics'\nimport {getTopicState, resolveTopic} from '../dashboard/messageBus/topicStore'\nimport {type SanityInstance} from '../store/createSanityInstance'\nimport {type StateSource} from '../store/createStateSourceAction'\nimport {defineMutation} from '../store/fetcherStore'\nimport {\n type FavoriteDocumentContext,\n type FavoriteStatusResponse,\n type SetFavoriteInput,\n toFavoriteDocument,\n} from './favorites'\n\nfunction toBusFavoriteDocument(context: FavoriteDocumentContext): FavoriteDocument {\n const document = toFavoriteDocument(context)\n const type = context.resourceType === 'studio' ? 'dataset' : context.resourceType\n return {...document, resource: {...document.resource, type}}\n}\n\n// Published IDs mirror Dashboard's `_stableId` match.\nconst isSameFavorite = (a: FavoriteDocument, b: FavoriteDocument): boolean =>\n a.type === b.type &&\n a.resource.id === b.resource.id &&\n a.resource.type === b.resource.type &&\n a.resource.schemaName === b.resource.schemaName &&\n isPublishedIdEqual(DocumentId(a.id), DocumentId(b.id))\n\n/**\n * A state source for whether a document is favorited, matched against the `favorites.documents`\n * the dashboard message bus host publishes. The message bus counterpart to the Comlink\n * {@link favorites} fetcher.\n *\n * @remarks\n * Returns `undefined` until the host publishes `applications.capabilities` and, while it provides\n * `favorites`, `favorites.documents`; use {@link resolveBusFavorite} to wait for them. Returns\n * `false` when the host does not provide `favorites` or the `favorites.documents` read fails.\n * A favorite is identified by its published document ID, type, resource and `schemaName`\n * (workspace), like in Dashboard.\n * @internal\n */\nexport function getBusFavoriteState(\n instance: SanityInstance,\n context: FavoriteDocumentContext,\n): StateSource<boolean | undefined> {\n const capabilities = getTopicState(instance, 'applications.capabilities')\n const documents = getTopicState(instance, 'favorites.documents')\n const target = toBusFavoriteDocument(context)\n\n const getCurrent = (): boolean | undefined => {\n const provided = capabilities.getCurrent() as CapabilityRecord | undefined\n if (provided === undefined) return undefined\n if (provided.favorites !== true) return false\n // A failed read degrades to \"not favorited\", like the Comlink fetcher.\n try {\n const favorites = documents.getCurrent() as FavoriteDocument[] | undefined\n return favorites?.some((favorite) => isSameFavorite(favorite, target))\n } catch {\n return false\n }\n }\n\n const subscribe = (onStoreChanged?: () => void) => {\n const unsubscribes = [\n capabilities.subscribe(onStoreChanged),\n documents.subscribe(onStoreChanged),\n ]\n return () => unsubscribes.forEach((unsubscribe) => unsubscribe())\n }\n\n const observable: Observable<boolean | undefined> = merge(\n capabilities.observable,\n documents.observable.pipe(catchError(() => EMPTY)),\n ).pipe(map(getCurrent), distinctUntilChanged())\n\n return {getCurrent, subscribe, observable}\n}\n\n/**\n * Resolves once {@link getBusFavoriteState} has the next value it waits for: the host's\n * capabilities first, then its `favorites.documents`.\n *\n * @internal\n */\nexport function resolveBusFavorite(instance: SanityInstance): Promise<void> {\n const capabilities = getTopicState(instance, 'applications.capabilities').getCurrent()\n return resolveTopic(\n instance,\n capabilities === undefined ? 'applications.capabilities' : 'favorites.documents',\n )\n}\n\n/**\n * Sets a document's favorite state over the dashboard message bus. The message bus counterpart\n * to `setFavorite`; the host keeps `favorites.documents` current, so there is no cache to\n * invalidate.\n *\n * @internal\n */\nexport const setBusFavorite = defineMutation<SetFavoriteInput, FavoriteStatusResponse>({\n name: 'setBusFavorite',\n mutationFn:\n (instance) =>\n ({isFavorited, ...context}) =>\n defer(() =>\n requireDashboardMessageBus(instance, 'update a favorite').emit(\n 'favorites.update',\n {document: toBusFavoriteDocument(context), favorited: isFavorited},\n // Matches the reply timeout of the Comlink write.\n {timeout: FETCH_TIMEOUT_DEFAULT},\n ),\n ).pipe(map(() => ({isFavorited}))),\n})\n","/**\n * The fields to check for a title.\n * The order of the items in the array defines the priority.\n *\n * @internal\n */\nexport const TITLE_CANDIDATES = ['title', 'name', 'label', 'heading', 'header', 'caption']\n\n/**\n * The fields to check for a subtitle.\n * The order of the items in the array defines the priority.\n *\n * @internal\n */\nexport const SUBTITLE_CANDIDATES = ['description', 'subtitle', ...TITLE_CANDIDATES]\n\n/**\n * Generates a GROQ projection for preview data without requiring a schema.\n * Uses common field names to make educated guesses about which fields to use.\n *\n * @internal\n */\nexport const PREVIEW_PROJECTION = `{\n // Get all potential title fields\n \"titleCandidates\": {\n ${TITLE_CANDIDATES.map((field) => `\"${field}\": ${field}`).join(',\\n ')}\n },\n // Get all potential subtitle fields\n \"subtitleCandidates\": {\n ${SUBTITLE_CANDIDATES.map((field) => `\"${field}\": ${field}`).join(',\\n ')}\n },\n \"media\": coalesce(\n select(\n defined(asset) => {\"type\": \"image-asset\", \"_ref\": asset._ref},\n defined(image.asset) => {\"type\": \"image-asset\", \"_ref\": image.asset._ref},\n defined(mainImage.asset) => {\"type\": \"image-asset\", \"_ref\": mainImage.asset._ref},\n null\n )\n ),\n _type,\n _id,\n _updatedAt\n}`\n","import {type SanityClient} from '@sanity/client'\nimport {createImageUrlBuilder} from '@sanity/image-url'\n\nimport {getClient} from '../client/clientStore'\nimport {type DocumentResource} from '../config/sanityConfig'\nimport {type SanityInstance} from '../store/createSanityInstance'\nimport {isObject} from '../utils/object'\nimport {SUBTITLE_CANDIDATES, TITLE_CANDIDATES} from './previewConstants'\nimport {type PreviewQueryResult, type PreviewValue} from './types'\n\nconst API_VERSION = 'v2025-05-06'\n\n/**\n * Checks if the provided value has `_ref` property that is a string and starts with `image-`\n */\nfunction hasImageRef<T>(value: unknown): value is T & {_ref: string} {\n return isObject(value) && '_ref' in value && typeof (value as {_ref: unknown})._ref === 'string'\n}\n\n/**\n * Normalizes a media asset to a preview value.\n * Adds a url to a media asset reference using `@sanity/image-url`.\n *\n * @internal\n */\nexport function normalizeMedia(media: unknown, client: SanityClient): PreviewValue['media'] {\n if (!media) return null\n if (!hasImageRef(media)) return null\n\n const builder = createImageUrlBuilder(client)\n const url = builder.image({_ref: media._ref}).url()\n\n return {\n type: 'image-asset',\n _ref: media._ref,\n url,\n }\n}\n\n/**\n * Finds a single field value from a set of candidates based on a priority list of field names.\n * Returns the first non-empty string value found from the candidates matching the priority list order.\n *\n * @internal\n */\nfunction findFirstDefined(\n fieldsToSearch: string[],\n candidates: Record<string, unknown>,\n exclude?: unknown,\n): string | undefined {\n if (!candidates) return undefined\n\n for (const field of fieldsToSearch) {\n const value = candidates[field]\n if (typeof value === 'string' && value.trim() !== '' && value !== exclude) {\n return value\n }\n }\n\n return undefined\n}\n\n/**\n * Transforms a projection result (with titleCandidates, subtitleCandidates, media)\n * into a PreviewValue (with title, subtitle, media).\n *\n * @param projectionResult - The raw projection result from GROQ\n * @param instance - The Sanity instance to use for client configuration\n * @param resource - Data resource for the preview\n * @internal\n */\nexport function transformProjectionToPreview(\n instance: SanityInstance,\n projectionResult: PreviewQueryResult,\n resource?: DocumentResource,\n): PreviewValue {\n const title = findFirstDefined(TITLE_CANDIDATES, projectionResult.titleCandidates)\n const subtitle = findFirstDefined(SUBTITLE_CANDIDATES, projectionResult.subtitleCandidates, title)\n\n // Get a client for the resource (if provided) or use the instance config\n const client = getClient(instance, {\n apiVersion: API_VERSION,\n resource,\n })\n\n return {\n title: String(title || `${projectionResult._type}: ${projectionResult._id}`),\n subtitle: subtitle || undefined,\n media: normalizeMedia(projectionResult.media, client),\n ...(projectionResult._status && {_status: projectionResult._status}),\n }\n}\n","/**\n * Telemetry environment classification.\n *\n * - `'development'` — the SDK is running on the local developer's machine\n * (`localhost` / `127.0.0.1` in the browser, or `NODE_ENV=development`\n * in Node). These are the original dev-only telemetry sessions.\n *\n * - `'production'` — the SDK is running on a production Sanity-controlled\n * domain (Studio deployments on `*.sanity.studio`, the dashboard on\n * `*.sanity.io`) where end users are authenticated Sanity users with\n * Populus consent records. Production telemetry is gated to this\n * allowlist; SDK apps deployed to customer-controlled domains do not\n * emit telemetry. Staging (`*.sanity.work`) and preview\n * (`*.sanity.dev`) hosts are deliberately excluded.\n *\n * @internal\n */\nexport type TelemetryEnvironment = 'development' | 'production'\n\n/**\n * Hostname suffixes that count as Sanity-controlled for the purposes of\n * production telemetry. A user reaching one of these hosts in the\n * browser is authenticated against Sanity and has a Populus consent\n * record, so we apply the same telemetry rules as the Studio's\n * `telemetry-sink`.\n *\n * The leading `.` is required: it ensures suffix matches hit a real\n * subdomain boundary, so apex matches (`sanity.io`, `sanity.studio`)\n * and lookalikes (`evilsanity.studio`) are excluded. Only production\n * hosts are listed; staging (`*.sanity.work`) and preview\n * (`*.sanity.dev`) hosts are excluded by omission.\n *\n * @internal\n */\nconst SANITY_CONTROLLED_HOST_SUFFIXES = ['.sanity.studio', '.sanity.io'] as const\n\nfunction getBrowserHostname(win: Window): string | null {\n const hostname = win.location?.hostname\n return typeof hostname === 'string' && hostname.length > 0 ? hostname.toLowerCase() : null\n}\n\nfunction isLocalHostname(hostname: string): boolean {\n return hostname === 'localhost' || hostname === '127.0.0.1'\n}\n\nfunction isSanityControlledHostname(hostname: string): boolean {\n return SANITY_CONTROLLED_HOST_SUFFIXES.some((suffix) => hostname.endsWith(suffix))\n}\n\n/**\n * Returns the telemetry environment for the current runtime, or `null`\n * when telemetry should not run at all.\n *\n * Browser:\n * - `localhost` / `127.0.0.1` → `'development'`\n * - host matches the Sanity-controlled allowlist → `'production'`\n * - anything else (customer domains, unknown contexts) → `null`\n *\n * Node (scripts, SSR, tests):\n * - `NODE_ENV=development` → `'development'`\n * - otherwise → `null`. Production-side server runtimes don't carry the\n * browser-authenticated user/consent assumption, so we don't enable\n * them under the production gate.\n *\n * Bracket-notation `process.env['NODE_ENV']` is used to avoid bundler\n * dead-code replacement.\n *\n * @internal\n */\nexport function getTelemetryEnvironment(): TelemetryEnvironment | null {\n if (typeof window !== 'undefined') {\n const hostname = getBrowserHostname(window)\n if (!hostname) return null\n if (isLocalHostname(hostname)) return 'development'\n if (isSanityControlledHostname(hostname)) return 'production'\n return null\n }\n\n if (typeof process !== 'undefined' && process.env?.['NODE_ENV'] === 'development') {\n return 'development'\n }\n return null\n}\n\n/**\n * Convenience predicate for \"telemetry can run in this environment\".\n *\n * @internal\n */\nexport function isTelemetryEnabled(): boolean {\n return getTelemetryEnvironment() !== null\n}\n","import {defineEvent} from '@sanity/telemetry'\n\n/**\n * Whether the instance has Studio configuration. Apps include Dashboard and standalone apps.\n * This describes instance configuration, not credential source or who authored a hook call.\n * @internal\n */\nexport type TelemetryRuntimeContext = 'studio' | 'app'\n\n// Keep attribution in event data to preserve the warehouse's data_auth_method convention.\ninterface TelemetryAttribution {\n /** Configured credential source (token/studio/default), distinct from getAuthMethodState's transport. */\n authMethod: string\n runtimeContext: TelemetryRuntimeContext\n}\n\n/** @internal */\nexport const SDKSessionStarted = defineEvent<\n TelemetryAttribution & {\n version: string\n projectId: string\n perspective: string\n }\n>({\n name: 'SDK Session Started',\n version: 1,\n description: 'SDK instance created (environment is recorded in the event context)',\n})\n\n/** @internal */\nexport const SDKHookMounted = defineEvent<\n TelemetryAttribution & {\n hookName: string\n }\n>({\n name: 'SDK Hook Mounted',\n version: 1,\n description: 'An SDK hook was mounted for the first time in this session',\n})\n\n/** @internal */\nexport const SDKSessionEnded = defineEvent<\n TelemetryAttribution & {\n durationSeconds: number\n hooksUsed: string[]\n }\n>({\n name: 'SDK Session Ended',\n version: 1,\n description: 'SDK instance disposed (environment is recorded in the event context)',\n})\n\n/** @internal */\nexport const SDKError = defineEvent<{\n errorType: string\n hookName: string\n}>({\n name: 'SDK Error',\n version: 1,\n description: 'Runtime error caught in the SDK',\n})\n","import {type SanityClient} from '@sanity/client'\nimport {\n type ConsentStatus,\n createBatchedStore,\n type SessionId,\n type TelemetryEvent,\n type TelemetryLogger,\n type TelemetryStore,\n} from '@sanity/telemetry'\n\nimport {createLogger} from '../utils/logger'\nimport {CORE_SDK_VERSION} from '../version'\nimport {type TelemetryEnvironment} from './environment'\nimport {\n SDKError,\n SDKHookMounted,\n SDKSessionEnded,\n SDKSessionStarted,\n type TelemetryRuntimeContext,\n} from './events'\n\nconst FLUSH_INTERVAL_MS = 30_000\nconst CONSENT_TAG = 'telemetry-consent.sdk'\nconst BATCH_TAG = 'telemetry.batch'\n\nconst log = createLogger('telemetry')\n\n/**\n * Manages telemetry for a single SDK instance.\n *\n * Wraps `@sanity/telemetry`'s batched store with SDK-specific concerns:\n * consent caching, session lifecycle events, and hook usage tracking.\n * The `environment` is captured at construction time and recorded in\n * the event context so downstream pipelines can distinguish dev and\n * production sessions.\n *\n * @internal\n */\nexport interface TelemetryManager {\n /**\n * Eagerly resolve and cache the user's consent status.\n * Returns true only when the user has explicitly opted in (`granted`).\n * Call this before logging any events to avoid buffering events that\n * will be dropped on the first flush.\n */\n checkConsent(): Promise<boolean>\n\n /** Log a \"SDK Session Started\" event */\n logSessionStarted(data: {projectId: string; perspective: string}): void\n\n /** Log a \"SDK Hook Mounted\" event (deduplicated per hook name) */\n logHookFirstUsed(hookName: string): void\n\n /** Log a \"SDK Error\" event */\n logError(errorType: string, hookName: string): void\n\n /** Log a \"SDK Session Ended\" event and tear down the store */\n endSession(): void\n\n /** Tear down the store without logging a session-end event */\n dispose(): void\n\n /** The set of hook names used during this session */\n readonly hooksUsed: ReadonlySet<string>\n}\n\ninterface TelemetryManagerOptions {\n sessionId: string\n getClient: () => SanityClient\n projectId: string\n environment: TelemetryEnvironment\n authMethod: string\n runtimeContext: TelemetryRuntimeContext\n}\n\n/**\n * Creates a telemetry manager for a single SDK instance session.\n *\n * The manager initializes a `createBatchedStore` from `@sanity/telemetry`,\n * caches the consent check for the lifetime of the session, and provides\n * typed methods for each SDK telemetry event.\n *\n * @internal\n */\nexport function createTelemetryManager(options: TelemetryManagerOptions): TelemetryManager {\n const {sessionId, getClient, projectId, environment, authMethod, runtimeContext} = options\n const startedAt = Date.now()\n const emittedHooks = new Set<string>()\n\n let cachedConsent: {status: ConsentStatus} | null = null\n\n const resolveConsent = async (): Promise<{status: ConsentStatus}> => {\n if (cachedConsent) return cachedConsent\n try {\n const client = getClient()\n const result = await client.request<{status: ConsentStatus}>({\n url: '/intake/telemetry-status',\n tag: CONSENT_TAG,\n })\n cachedConsent = result\n } catch {\n cachedConsent = {status: 'undetermined'}\n }\n return cachedConsent\n }\n\n const enrichBatch = (batch: TelemetryEvent[]) =>\n batch.map((event) => {\n // Trace events (`trace.start` / `trace.log` / `trace.error` /\n // `trace.complete`) arrive with their own caller-provided `context`.\n // Log / userProperties events don't. Narrow via `in` so `event`\n // stays typed as `TelemetryEvent`, then merge so we don't drop the\n // trace context. SDK-owned fields below win on conflict.\n const existing =\n 'context' in event ? (event.context as Record<string, unknown> | undefined) : undefined\n return {\n ...event,\n context: {\n ...existing,\n version: CORE_SDK_VERSION,\n environment,\n origin: typeof window !== 'undefined' ? window.location.origin : 'node',\n },\n }\n })\n\n const sendEvents = async (batch: TelemetryEvent[]): Promise<unknown> => {\n const client = getClient()\n log.debug('sending event batch', {batchSize: batch.length, environment})\n return client.request({\n url: '/intake/batch',\n method: 'POST',\n body: {projectId, batch: enrichBatch(batch)},\n tag: BATCH_TAG,\n })\n }\n\n const store: TelemetryStore<Record<string, unknown>> = createBatchedStore(\n sessionId as SessionId,\n {\n flushInterval: FLUSH_INTERVAL_MS,\n resolveConsent,\n sendEvents,\n },\n )\n\n const logger: TelemetryLogger<Record<string, unknown>> = store.logger\n\n return {\n async checkConsent() {\n const {status} = await resolveConsent()\n return status === 'granted'\n },\n\n logSessionStarted(data) {\n log.debug('event: SDK Session Started', {\n projectId: data.projectId,\n perspective: data.perspective,\n authMethod,\n runtimeContext,\n version: CORE_SDK_VERSION,\n environment,\n })\n logger.log(SDKSessionStarted, {\n version: CORE_SDK_VERSION,\n ...data,\n authMethod,\n runtimeContext,\n })\n },\n\n logHookFirstUsed(hookName: string) {\n if (emittedHooks.has(hookName)) return\n emittedHooks.add(hookName)\n log.debug('event: SDK Hook Mounted', {hookName, authMethod, runtimeContext})\n logger.log(SDKHookMounted, {hookName, authMethod, runtimeContext})\n },\n\n logError(errorType: string, hookName: string) {\n log.debug('event: SDK Error', {errorType, hookName})\n logger.log(SDKError, {errorType, hookName})\n },\n\n endSession() {\n const durationSeconds = Math.round((Date.now() - startedAt) / 1000)\n log.debug('event: SDK Session Ended', {\n durationSeconds,\n hooksUsed: [...emittedHooks],\n authMethod,\n runtimeContext,\n environment,\n })\n logger.log(SDKSessionEnded, {\n durationSeconds,\n hooksUsed: [...emittedHooks],\n authMethod,\n runtimeContext,\n })\n\n store.flush().catch(() => {\n // Best-effort flush on dispose; swallow errors\n })\n store.end()\n },\n\n dispose() {\n store.end()\n },\n\n get hooksUsed(): ReadonlySet<string> {\n return emittedHooks\n },\n }\n}\n","import {type SanityInstance} from '../store/createSanityInstance'\nimport {createLogger} from '../utils/logger'\nimport {getTelemetryEnvironment} from './environment'\nimport {type TelemetryManager} from './telemetryManager'\n\nconst DEFAULT_TELEMETRY_API_VERSION = '2024-11-12'\n\nconst logger = createLogger('telemetry')\n\n/**\n * Per-instance map of active telemetry managers. Allows the React\n * package (and other consumers) to look up the manager for a given\n * instance and log hook usage / errors without importing the full\n * telemetry module themselves.\n *\n * @internal\n */\nconst telemetryManagers = new WeakMap<SanityInstance, TelemetryManager>()\nconst pendingHooks = new WeakMap<SanityInstance, Set<string>>()\nconst initInFlight = new WeakSet<SanityInstance>()\n\n/**\n * Initializes telemetry for a SDK instance if the runtime environment\n * qualifies. The environment is resolved by `getTelemetryEnvironment()`:\n *\n * - `'development'` — local dev servers (`localhost` / `127.0.0.1`, or\n * Node with `NODE_ENV=development`). This is the original opt-in\n * surface.\n * - `'production'` — apps deployed to Sanity-controlled domains\n * (e.g. `*.sanity.studio`, the dashboard). End users are\n * authenticated Sanity users with Populus consent records, so we\n * apply the same consent gate as the Studio's `telemetry-sink`.\n *\n * Apps on customer-controlled domains return `null` and skip telemetry\n * entirely.\n *\n * `telemetryManager` and `clientStore` are dynamically imported so the\n * telemetry code path stays out of production bundles for apps that\n * don't qualify. Only the lightweight environment check runs at boot.\n *\n * The `projectId` must be passed explicitly because the resource\n * configuration is typically set by the React layer after the\n * instance has already been created.\n *\n * @internal\n */\nexport function initTelemetry(instance: SanityInstance, projectId: string): void {\n const environment = getTelemetryEnvironment()\n if (!environment) {\n logger.trace('initTelemetry skipped: environment not eligible', {internal: true})\n return\n }\n if (!projectId) {\n logger.trace('initTelemetry skipped: no projectId', {internal: true})\n return\n }\n if (telemetryManagers.has(instance) || initInFlight.has(instance)) {\n return\n }\n initInFlight.add(instance)\n\n logger.debug('initializing telemetry', {projectId, environment})\n\n Promise.all([\n import('./telemetryManager'),\n import('../client/clientStore'),\n import('../auth/authStore'),\n import('../auth/authMode'),\n ])\n .then(async ([{createTelemetryManager}, {getClient}, {getTokenState}, {isStudioConfig}]) => {\n if (instance.isDisposed()) {\n initInFlight.delete(instance)\n logger.debug('telemetry skipped: instance disposed before imports resolved')\n return\n }\n\n // Wait for the auth store to resolve a token. The client needs a\n // Bearer token for the consent check and batch POSTs. If the token\n // is already available (e.g. static token config), this resolves\n // immediately. For OAuth/localStorage discovery it waits for the\n // first emission. For unauthenticated apps the promise never\n // resolves, which is fine since telemetry requires auth anyway.\n const token = getTokenState(instance).getCurrent()\n logger.trace('auth token check', {tokenPresent: !!token, internal: true})\n\n if (!token) {\n logger.debug('waiting for auth token')\n const hasToken = await new Promise<boolean>((resolve) => {\n if (instance.isDisposed()) return resolve(false)\n const cleanup = {unsubscribe: () => {}}\n const unsub = instance.onDispose(() => {\n cleanup.unsubscribe()\n resolve(false)\n })\n // The token observable is a `shareReplay({bufferSize: 1, refCount: true})`\n // (see `createStateSourceAction`), so it can deliver a buffered value\n // synchronously while we're still inside `.subscribe(cb)`. At that\n // moment `sub` is in the TDZ, so the callback can't reach it. We\n // gate on a `received` flag and let the post-subscribe block do the\n // unsubscribe in the sync-emission case.\n let received = false\n const sub = getTokenState(instance).observable.subscribe((t) => {\n if (received || !t) return\n received = true\n logger.debug('auth token received')\n unsub()\n resolve(true)\n cleanup.unsubscribe()\n })\n cleanup.unsubscribe = () => sub.unsubscribe()\n if (received) cleanup.unsubscribe()\n })\n if (!hasToken || instance.isDisposed()) {\n initInFlight.delete(instance)\n logger.debug('telemetry skipped: no token resolved or instance disposed')\n return\n }\n }\n\n const config = instance.config\n const perspective = typeof config.perspective === 'string' ? config.perspective : 'published'\n // Studio instances can use explicit tokens. Keep runtime context independent of auth.\n const runtimeContext = isStudioConfig(config) ? 'studio' : 'app'\n const authMethod = config.auth?.token\n ? 'token'\n : config.studio?.auth?.token\n ? 'studio'\n : 'default'\n\n const manager = createTelemetryManager({\n sessionId: instance.instanceId,\n getClient: () => getClient(instance, {apiVersion: DEFAULT_TELEMETRY_API_VERSION}),\n projectId,\n environment,\n authMethod,\n runtimeContext,\n })\n\n const consented = await manager.checkConsent()\n logger.debug('consent check complete', {consented})\n if (!consented || instance.isDisposed()) {\n initInFlight.delete(instance)\n manager.dispose()\n return\n }\n\n initInFlight.delete(instance)\n telemetryManagers.set(instance, manager)\n\n const buffered = pendingHooks.get(instance)\n if (buffered) {\n logger.debug('flushing buffered hooks', {hooks: Array.from(buffered)})\n for (const hookName of buffered) {\n manager.logHookFirstUsed(hookName)\n }\n pendingHooks.delete(instance)\n }\n\n logger.info('telemetry session started', {\n projectId,\n perspective,\n authMethod,\n runtimeContext,\n environment,\n })\n manager.logSessionStarted({\n projectId,\n perspective,\n })\n\n instance.onDispose(() => {\n manager.endSession()\n telemetryManagers.delete(instance)\n logger.debug('telemetry session ended')\n })\n })\n .catch((err) => {\n initInFlight.delete(instance)\n logger.warn('telemetry init failed', {error: err})\n })\n}\n\n/**\n * Retrieves the telemetry manager for an instance, if one exists.\n * Returns undefined when telemetry is disabled or not yet initialized.\n *\n * @internal\n */\nexport function getTelemetryManager(instance: SanityInstance): TelemetryManager | undefined {\n return telemetryManagers.get(instance)\n}\n\n/**\n * Record a hook name for an instance. If the telemetry manager is\n * already initialized the event is logged immediately. Otherwise\n * the name is buffered and flushed when init completes.\n *\n * @internal\n */\nexport function trackHookMounted(instance: SanityInstance, hookName: string): void {\n if (!getTelemetryEnvironment()) return\n\n const manager = findManager(instance)\n if (manager) {\n logger.trace('hook mounted (logged)', {hookName, internal: true})\n manager.logHookFirstUsed(hookName)\n return\n }\n\n const root = getRootInstance(instance)\n let hooks = pendingHooks.get(root)\n if (!hooks) {\n hooks = new Set()\n pendingHooks.set(root, hooks)\n }\n if (!hooks.has(hookName)) {\n logger.trace('hook mounted (buffered)', {hookName, internal: true})\n }\n hooks.add(hookName)\n}\n\nfunction findManager(instance: SanityInstance): TelemetryManager | undefined {\n return telemetryManagers.get(instance)\n}\n\nfunction getRootInstance(instance: SanityInstance): SanityInstance {\n return instance\n}\n","const WILDCARD_TOKEN = '*'\nconst NEGATION_TOKEN = '-'\n// This regex handles simple cases including quoted phrases.\n// More complex query syntaxes might need a more robust parser.\nconst TOKEN_REGEX = /(?:[^\\s\"]+|\"[^\"]*\")+/g\n\n/**\n * @internal\n * Checks if a token starts with the negation character.\n */\nfunction isNegationToken(token: string | undefined): boolean {\n return typeof token !== 'undefined' && token.trim().startsWith(NEGATION_TOKEN)\n}\n\n/**\n * @internal\n * Checks if a token ends with the wildcard character.\n */\nfunction isPrefixToken(token: string | undefined): boolean {\n return typeof token !== 'undefined' && token.trim().endsWith(WILDCARD_TOKEN)\n}\n\n/**\n * @internal\n * Checks if a token is enclosed in double quotes.\n */\nfunction isExactMatchToken(token: string | undefined): boolean {\n // Ensure the token exists, has at least 2 characters, and starts/ends with \"\n return !!token && token.length >= 2 && token.startsWith('\"') && token.endsWith('\"')\n}\n\n/**\n * Creates a GROQ search filter string (`[@] match text::query(\"...\")`)\n * from a raw search query string.\n *\n * It applies wildcard ('*') logic to the last eligible token and escapes\n * backslashes and double quotes within the search term.\n *\n * If the input query is empty or only whitespace, it returns an empty string.\n *\n * @param query - The raw input search string.\n * @returns The GROQ search filter string, or an empty string.\n * @internal\n */\nexport function createGroqSearchFilter(query: string): string {\n // Trim leading/trailing whitespace from the overall query first\n const trimmedQuery = query.trim()\n if (!trimmedQuery) {\n return '' // Return empty if query is empty or just whitespace\n }\n\n // Extract tokens using the regex\n const tokens = trimmedQuery.match(TOKEN_REGEX) ?? []\n\n // Find the index of the last token eligible for wildcard appending\n const reversedTokens = [...tokens].reverse()\n const reversedIndex = reversedTokens.findIndex(\n (token: string) => !isNegationToken(token) && !isExactMatchToken(token),\n )\n const finalIncrementalTokenIndex = reversedIndex === -1 ? -1 : tokens.length - 1 - reversedIndex\n\n // Get the actual token based on the found index\n const finalIncrementalToken = tokens[finalIncrementalTokenIndex]\n\n const processedTokens = [...tokens]\n // If a suitable token was found and it doesn't already end with a wildcard,\n // apply the wildcard.\n if (finalIncrementalToken !== undefined && !isPrefixToken(finalIncrementalToken)) {\n // Replace the identified token with its wildcarded version\n processedTokens.splice(\n finalIncrementalTokenIndex,\n 1,\n `${finalIncrementalToken}${WILDCARD_TOKEN}`,\n )\n }\n\n // Join the tokens back into a space-separated string\n const wildcardSearch = processedTokens.join(' ')\n\n // Escape backslashes and double quotes within the final search term for the\n // GROQ query. Backslashes go first, so the escapes added for quotes are not\n // themselves escaped. Without this a trailing backslash would escape the\n // closing quote and let the input break out of the string literal.\n const escapedSearch = wildcardSearch.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')\n\n // Construct the final GROQ filter clause\n return `[@] match text::query(\"${escapedSearch}\")`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,SAAgB,qBACd,aACe;CACf,IAAI,YAAY,gBAAgB,MAAM,OAAO,IAAI,IAAI,YAAY,WAAW,CAAC,CAAC;CAC9E,IAAI,YAAY,SAAS,MAAM,OAAO;CAItC,IAAM,UAAW,WAA4B,uBAAuB;CACpE,IAAI,YAAY,aAAa;EAC3B,IAAM,SAAS,UAAU,oBAAoB;EAC7C,OAAO,WAAW,YAAY,KAAK,QAAQ,YAAY,eAAe,GAAG;CAC3E;CAEA,IAAM,SAAS,UAAU,uBAAuB;CAChD,OAAO,WAAW,YAAY,KAAK,GAAG;AACxC;ACVA,SAAS,sBAAsB,SAAoD;CACjF,IAAM,WAAW,mBAAmB,OAAO,GACrC,OAAO,QAAQ,iBAAiB,WAAW,YAAY,QAAQ;CACrE,OAAO;EAAC,GAAG;EAAU,UAAU;GAAC,GAAG,SAAS;GAAU;EAAI;CAAC;AAC7D;AAGA,MAAM,kBAAkB,GAAqB,MAC3C,EAAE,SAAS,EAAE,QACb,EAAE,SAAS,OAAO,EAAE,SAAS,MAC7B,EAAE,SAAS,SAAS,EAAE,SAAS,QAC/B,EAAE,SAAS,eAAe,EAAE,SAAS,cACrC,mBAAmB,WAAW,EAAE,EAAE,GAAG,WAAW,EAAE,EAAE,CAAC;;;;;;;;;;;;;;AAevD,S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,MAIM,cAAc;;;;;AAMpB,SAAS,gBAAgB,OAAoC;CAC3D,OAAc,UAAU,UAAe,MAAM,KAAK,CAAC,CAAC,WAAW,GAAc;AAC/E;;;;;AAMA,SAAS,cAAc,OAAoC;CACzD,OAAc,UAAU,UAAe,MAAM,KAAK,CAAC,CAAC,SAAS,GAAc;AAC7E;;;;;AAMA,SAAS,kBAAkB,OAAoC;CAE7D,OAAO,CAAC,CAAC,SAAS,MAAM,UAAU,KAAK,MAAM,WAAW,IAAG,KAAK,MAAM,SAAS,IAAG;AACpF;;;;;;;;;;;;;;AAeA,SAAgB,uBAAuB,OAAuB;CAE5D,IAAM,eAAe,MAAM,KAAK;CAChC,IAAI,CAAC,cACH,OAAO;CAIT,IAAM,SAAS,aAAa,MAAM,WAAW,KAAK,CAAC,GAI7C,gBADiB,CAAC,GAAG,MAAM,CAAC,CAAC,QACA,CAAC,CAAC,WAClC,UAAkB,CAAC,gBAAgB,KAAK,KAAK,CAAC,kBAAkB,KAAK,CACxE,GACM,6BAA6B,kBAAkB,KAAK,KAAK,OAAO,SAAS,IAAI,eAG7E,wBAAwB,OAAO,6BAE/B,kBAAkB,CAAC,GAAG,MAAM;CAsBlC,OAnBI,0BAA0B,KAAA,KAAa,CAAC,cAAc,qBAAqB,KAE7E,gBAAgB,OACd,4BACA,GACA,GAAG,wBACL,GAaK,0BATgB,gBAAgB,KAAK,GAMT,CAAC,CAAC,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,MAG7B,EAAE;AACjD"}
1
+ {"version":3,"file":"_internal.js","names":["\"NODE_ENV\""],"sources":["../../src/applications/applicationOrigin.ts","../../src/favorites/busFavorites.ts","../../src/preview/previewConstants.ts","../../src/preview/previewProjectionUtils.ts","../../src/telemetry/environment.ts","../../src/telemetry/events.ts","../../src/telemetry/telemetryManager.ts","../../src/telemetry/initTelemetry.ts","../../src/utils/createGroqSearchFilter.ts"],"sourcesContent":["import {type ApplicationBase} from './applications'\n\ntype SanityGlobal = typeof globalThis & {__SANITY_STAGING__?: boolean}\n\n/**\n * The origin an application is served from, or `null` when it has neither an external URL nor\n * a slug to derive one from. Callers treat `null` as \"nothing to load\" rather than failing the\n * whole list on one bad record.\n *\n * @internal\n */\nexport function getApplicationOrigin(\n application: Pick<ApplicationBase, 'externalUrl' | 'slug' | 'isSingleton' | 'organizationId'>,\n): string | null {\n if (application.externalUrl !== null) return new URL(application.externalUrl).origin\n if (application.slug === null) return null\n\n // Read at runtime, not via a bundler define: a remote is built once and runs in whichever\n // host page loaded it, and the host sets this flag. Mirrors workbench's `getSanityEnv`.\n const staging = (globalThis as SanityGlobal).__SANITY_STAGING__ === true\n if (application.isSingleton) {\n const domain = staging ? 'run.sanity.work' : 'sanity.run'\n return `https://${application.slug}-apps-${application.organizationId}.${domain}`\n }\n\n const domain = staging ? 'studio.sanity.work' : 'sanity.studio'\n return `https://${application.slug}.${domain}`\n}\n","import {FETCH_TIMEOUT_DEFAULT} from '@sanity/comlink'\nimport {DocumentId, isPublishedIdEqual} from '@sanity/id-utils'\nimport {catchError, defer, distinctUntilChanged, EMPTY, map, merge, type Observable} from 'rxjs'\n\nimport {requireDashboardMessageBus} from '../dashboard/messageBus/store'\nimport {type CapabilityRecord, type FavoriteDocument} from '../dashboard/messageBus/topics'\nimport {getTopicState, resolveTopic} from '../dashboard/messageBus/topicStore'\nimport {type SanityInstance} from '../store/createSanityInstance'\nimport {type StateSource} from '../store/createStateSourceAction'\nimport {defineMutation} from '../store/fetcherStore'\nimport {\n type FavoriteDocumentContext,\n type FavoriteStatusResponse,\n type SetFavoriteInput,\n toFavoriteDocument,\n} from './favorites'\n\nfunction toBusFavoriteDocument(context: FavoriteDocumentContext): FavoriteDocument {\n const document = toFavoriteDocument(context)\n const type = context.resourceType === 'studio' ? 'dataset' : context.resourceType\n return {...document, resource: {...document.resource, type}}\n}\n\n// Published IDs mirror Dashboard's `_stableId` match.\nconst isSameFavorite = (a: FavoriteDocument, b: FavoriteDocument): boolean =>\n a.type === b.type &&\n a.resource.id === b.resource.id &&\n a.resource.type === b.resource.type &&\n a.resource.schemaName === b.resource.schemaName &&\n isPublishedIdEqual(DocumentId(a.id), DocumentId(b.id))\n\n/**\n * A state source for whether a document is favorited, matched against the `favorites.documents`\n * the dashboard message bus host publishes. The message bus counterpart to the Comlink\n * {@link favorites} fetcher.\n *\n * @remarks\n * Returns `undefined` until the host publishes `applications.capabilities` and, while it provides\n * `favorites`, `favorites.documents`; use {@link resolveBusFavorite} to wait for them. Returns\n * `false` when the host does not provide `favorites` or the `favorites.documents` read fails.\n * A favorite is identified by its published document ID, type, resource and `schemaName`\n * (workspace), like in Dashboard.\n * @internal\n */\nexport function getBusFavoriteState(\n instance: SanityInstance,\n context: FavoriteDocumentContext,\n): StateSource<boolean | undefined> {\n const capabilities = getTopicState(instance, 'applications.capabilities')\n const documents = getTopicState(instance, 'favorites.documents')\n const target = toBusFavoriteDocument(context)\n\n const getCurrent = (): boolean | undefined => {\n const provided = capabilities.getCurrent() as CapabilityRecord | undefined\n if (provided === undefined) return undefined\n if (provided.favorites !== true) return false\n // A failed read degrades to \"not favorited\", like the Comlink fetcher.\n try {\n const favorites = documents.getCurrent() as FavoriteDocument[] | undefined\n return favorites?.some((favorite) => isSameFavorite(favorite, target))\n } catch {\n return false\n }\n }\n\n const subscribe = (onStoreChanged?: () => void) => {\n const unsubscribes = [\n capabilities.subscribe(onStoreChanged),\n documents.subscribe(onStoreChanged),\n ]\n return () => unsubscribes.forEach((unsubscribe) => unsubscribe())\n }\n\n const observable: Observable<boolean | undefined> = merge(\n capabilities.observable,\n documents.observable.pipe(catchError(() => EMPTY)),\n ).pipe(map(getCurrent), distinctUntilChanged())\n\n return {getCurrent, subscribe, observable}\n}\n\n/**\n * Resolves once {@link getBusFavoriteState} has the next value it waits for: the host's\n * capabilities first, then its `favorites.documents`.\n *\n * @internal\n */\nexport function resolveBusFavorite(instance: SanityInstance): Promise<void> {\n const capabilities = getTopicState(instance, 'applications.capabilities').getCurrent()\n return resolveTopic(\n instance,\n capabilities === undefined ? 'applications.capabilities' : 'favorites.documents',\n )\n}\n\n/**\n * Sets a document's favorite state over the dashboard message bus. The message bus counterpart\n * to `setFavorite`; the host keeps `favorites.documents` current, so there is no cache to\n * invalidate.\n *\n * @internal\n */\nexport const setBusFavorite = defineMutation<SetFavoriteInput, FavoriteStatusResponse>({\n name: 'setBusFavorite',\n mutationFn:\n (instance) =>\n ({isFavorited, ...context}) =>\n defer(() =>\n requireDashboardMessageBus(instance, 'update a favorite').emit(\n 'favorites.update',\n {document: toBusFavoriteDocument(context), favorited: isFavorited},\n // Matches the reply timeout of the Comlink write.\n {timeout: FETCH_TIMEOUT_DEFAULT},\n ),\n ).pipe(map(() => ({isFavorited}))),\n})\n","/**\n * The fields to check for a title.\n * The order of the items in the array defines the priority.\n *\n * @internal\n */\nexport const TITLE_CANDIDATES = ['title', 'name', 'label', 'heading', 'header', 'caption']\n\n/**\n * The fields to check for a subtitle.\n * The order of the items in the array defines the priority.\n *\n * @internal\n */\nexport const SUBTITLE_CANDIDATES = ['description', 'subtitle', ...TITLE_CANDIDATES]\n\n/**\n * Generates a GROQ projection for preview data without requiring a schema.\n * Uses common field names to make educated guesses about which fields to use.\n *\n * @internal\n */\nexport const PREVIEW_PROJECTION = `{\n // Get all potential title fields\n \"titleCandidates\": {\n ${TITLE_CANDIDATES.map((field) => `\"${field}\": ${field}`).join(',\\n ')}\n },\n // Get all potential subtitle fields\n \"subtitleCandidates\": {\n ${SUBTITLE_CANDIDATES.map((field) => `\"${field}\": ${field}`).join(',\\n ')}\n },\n \"media\": coalesce(\n select(\n defined(asset) => {\"type\": \"image-asset\", \"_ref\": asset._ref},\n defined(image.asset) => {\"type\": \"image-asset\", \"_ref\": image.asset._ref},\n defined(mainImage.asset) => {\"type\": \"image-asset\", \"_ref\": mainImage.asset._ref},\n null\n )\n ),\n _type,\n _id,\n _updatedAt\n}`\n","import {type SanityClient} from '@sanity/client'\nimport {createImageUrlBuilder} from '@sanity/image-url'\n\nimport {getClient} from '../client/clientStore'\nimport {type DocumentResource} from '../config/sanityConfig'\nimport {type SanityInstance} from '../store/createSanityInstance'\nimport {isObject} from '../utils/object'\nimport {SUBTITLE_CANDIDATES, TITLE_CANDIDATES} from './previewConstants'\nimport {type PreviewQueryResult, type PreviewValue} from './types'\n\nconst API_VERSION = 'v2025-05-06'\n\n/**\n * Checks if the provided value has `_ref` property that is a string and starts with `image-`\n */\nfunction hasImageRef<T>(value: unknown): value is T & {_ref: string} {\n return isObject(value) && '_ref' in value && typeof (value as {_ref: unknown})._ref === 'string'\n}\n\n/**\n * Normalizes a media asset to a preview value.\n * Adds a url to a media asset reference using `@sanity/image-url`.\n *\n * @internal\n */\nexport function normalizeMedia(media: unknown, client: SanityClient): PreviewValue['media'] {\n if (!media) return null\n if (!hasImageRef(media)) return null\n\n const builder = createImageUrlBuilder(client)\n const url = builder.image({_ref: media._ref}).url()\n\n return {\n type: 'image-asset',\n _ref: media._ref,\n url,\n }\n}\n\n/**\n * Finds a single field value from a set of candidates based on a priority list of field names.\n * Returns the first non-empty string value found from the candidates matching the priority list order.\n *\n * @internal\n */\nfunction findFirstDefined(\n fieldsToSearch: string[],\n candidates: Record<string, unknown>,\n exclude?: unknown,\n): string | undefined {\n if (!candidates) return undefined\n\n for (const field of fieldsToSearch) {\n const value = candidates[field]\n if (typeof value === 'string' && value.trim() !== '' && value !== exclude) {\n return value\n }\n }\n\n return undefined\n}\n\n/**\n * Transforms a projection result (with titleCandidates, subtitleCandidates, media)\n * into a PreviewValue (with title, subtitle, media).\n *\n * @param projectionResult - The raw projection result from GROQ\n * @param instance - The Sanity instance to use for client configuration\n * @param resource - Data resource for the preview\n * @internal\n */\nexport function transformProjectionToPreview(\n instance: SanityInstance,\n projectionResult: PreviewQueryResult,\n resource?: DocumentResource,\n): PreviewValue {\n const title = findFirstDefined(TITLE_CANDIDATES, projectionResult.titleCandidates)\n const subtitle = findFirstDefined(SUBTITLE_CANDIDATES, projectionResult.subtitleCandidates, title)\n\n // Get a client for the resource (if provided) or use the instance config\n const client = getClient(instance, {\n apiVersion: API_VERSION,\n resource,\n })\n\n return {\n title: String(title || `${projectionResult._type}: ${projectionResult._id}`),\n subtitle: subtitle || undefined,\n media: normalizeMedia(projectionResult.media, client),\n ...(projectionResult._status && {_status: projectionResult._status}),\n }\n}\n","/**\n * Telemetry environment classification.\n *\n * - `'development'` — the SDK is running on the local developer's machine\n * (`localhost` / `127.0.0.1` in the browser, or `NODE_ENV=development`\n * in Node). These are the original dev-only telemetry sessions.\n *\n * - `'production'` — the SDK is running on a production Sanity-controlled\n * domain (Studio deployments on `*.sanity.studio`, the dashboard on\n * `*.sanity.io`) where end users are authenticated Sanity users with\n * Populus consent records. Production telemetry is gated to this\n * allowlist; SDK apps deployed to customer-controlled domains do not\n * emit telemetry. Staging (`*.sanity.work`) and preview\n * (`*.sanity.dev`) hosts are deliberately excluded.\n *\n * @internal\n */\nexport type TelemetryEnvironment = 'development' | 'production'\n\n/**\n * Hostname suffixes that count as Sanity-controlled for the purposes of\n * production telemetry. A user reaching one of these hosts in the\n * browser is authenticated against Sanity and has a Populus consent\n * record, so we apply the same telemetry rules as the Studio's\n * `telemetry-sink`.\n *\n * The leading `.` is required: it ensures suffix matches hit a real\n * subdomain boundary, so apex matches (`sanity.io`, `sanity.studio`)\n * and lookalikes (`evilsanity.studio`) are excluded. Only production\n * hosts are listed; staging (`*.sanity.work`) and preview\n * (`*.sanity.dev`) hosts are excluded by omission.\n *\n * @internal\n */\nconst SANITY_CONTROLLED_HOST_SUFFIXES = ['.sanity.studio', '.sanity.io'] as const\n\nfunction getBrowserHostname(win: Window): string | null {\n const hostname = win.location?.hostname\n return typeof hostname === 'string' && hostname.length > 0 ? hostname.toLowerCase() : null\n}\n\nfunction isLocalHostname(hostname: string): boolean {\n return hostname === 'localhost' || hostname === '127.0.0.1'\n}\n\nfunction isSanityControlledHostname(hostname: string): boolean {\n return SANITY_CONTROLLED_HOST_SUFFIXES.some((suffix) => hostname.endsWith(suffix))\n}\n\n/**\n * Returns the telemetry environment for the current runtime, or `null`\n * when telemetry should not run at all.\n *\n * Browser:\n * - `localhost` / `127.0.0.1` → `'development'`\n * - host matches the Sanity-controlled allowlist → `'production'`\n * - anything else (customer domains, unknown contexts) → `null`\n *\n * Node (scripts, SSR, tests):\n * - `NODE_ENV=development` → `'development'`\n * - otherwise → `null`. Production-side server runtimes don't carry the\n * browser-authenticated user/consent assumption, so we don't enable\n * them under the production gate.\n *\n * Bracket-notation `process.env['NODE_ENV']` is used to avoid bundler\n * dead-code replacement.\n *\n * @internal\n */\nexport function getTelemetryEnvironment(): TelemetryEnvironment | null {\n if (typeof window !== 'undefined') {\n const hostname = getBrowserHostname(window)\n if (!hostname) return null\n if (isLocalHostname(hostname)) return 'development'\n if (isSanityControlledHostname(hostname)) return 'production'\n return null\n }\n\n if (typeof process !== 'undefined' && process.env?.['NODE_ENV'] === 'development') {\n return 'development'\n }\n return null\n}\n\n/**\n * Convenience predicate for \"telemetry can run in this environment\".\n *\n * @internal\n */\nexport function isTelemetryEnabled(): boolean {\n return getTelemetryEnvironment() !== null\n}\n","import {defineEvent} from '@sanity/telemetry'\n\n/**\n * Whether the instance has Studio configuration. Apps include Dashboard and standalone apps.\n * This describes instance configuration, not credential source or who authored a hook call.\n * @internal\n */\nexport type TelemetryRuntimeContext = 'studio' | 'app'\n\n// Keep attribution in event data to preserve the warehouse's data_auth_method convention.\ninterface TelemetryAttribution {\n /** Configured credential source (token/studio/default), distinct from getAuthMethodState's transport. */\n authMethod: string\n runtimeContext: TelemetryRuntimeContext\n}\n\n/** @internal */\nexport const SDKSessionStarted = defineEvent<\n TelemetryAttribution & {\n version: string\n projectId: string\n perspective: string\n }\n>({\n name: 'SDK Session Started',\n version: 1,\n description: 'SDK instance created (environment is recorded in the event context)',\n})\n\n/** @internal */\nexport const SDKHookMounted = defineEvent<\n TelemetryAttribution & {\n hookName: string\n }\n>({\n name: 'SDK Hook Mounted',\n version: 1,\n description: 'An SDK hook was mounted for the first time in this session',\n})\n\n/** @internal */\nexport const SDKSessionEnded = defineEvent<\n TelemetryAttribution & {\n durationSeconds: number\n hooksUsed: string[]\n }\n>({\n name: 'SDK Session Ended',\n version: 1,\n description: 'SDK instance disposed (environment is recorded in the event context)',\n})\n\n/** @internal */\nexport const SDKError = defineEvent<{\n errorType: string\n hookName: string\n}>({\n name: 'SDK Error',\n version: 1,\n description: 'Runtime error caught in the SDK',\n})\n","import {type SanityClient} from '@sanity/client'\nimport {\n type ConsentStatus,\n createBatchedStore,\n type SessionId,\n type TelemetryEvent,\n type TelemetryLogger,\n type TelemetryStore,\n} from '@sanity/telemetry'\n\nimport {createLogger} from '../utils/logger'\nimport {CORE_SDK_VERSION} from '../version'\nimport {type TelemetryEnvironment} from './environment'\nimport {\n SDKError,\n SDKHookMounted,\n SDKSessionEnded,\n SDKSessionStarted,\n type TelemetryRuntimeContext,\n} from './events'\n\nconst FLUSH_INTERVAL_MS = 30_000\nconst CONSENT_TAG = 'telemetry-consent.sdk'\nconst BATCH_TAG = 'telemetry.batch'\n\nconst log = createLogger('telemetry')\n\n/**\n * Manages telemetry for a single SDK instance.\n *\n * Wraps `@sanity/telemetry`'s batched store with SDK-specific concerns:\n * consent caching, session lifecycle events, and hook usage tracking.\n * The `environment` is captured at construction time and recorded in\n * the event context so downstream pipelines can distinguish dev and\n * production sessions.\n *\n * @internal\n */\nexport interface TelemetryManager {\n /**\n * Eagerly resolve and cache the user's consent status.\n * Returns true only when the user has explicitly opted in (`granted`).\n * Call this before logging any events to avoid buffering events that\n * will be dropped on the first flush.\n */\n checkConsent(): Promise<boolean>\n\n /** Log a \"SDK Session Started\" event */\n logSessionStarted(data: {projectId: string; perspective: string}): void\n\n /** Log a \"SDK Hook Mounted\" event (deduplicated per hook name) */\n logHookFirstUsed(hookName: string): void\n\n /** Log a \"SDK Error\" event */\n logError(errorType: string, hookName: string): void\n\n /** Log a \"SDK Session Ended\" event and tear down the store */\n endSession(): void\n\n /** Tear down the store without logging a session-end event */\n dispose(): void\n\n /** The set of hook names used during this session */\n readonly hooksUsed: ReadonlySet<string>\n}\n\ninterface TelemetryManagerOptions {\n sessionId: string\n getClient: () => SanityClient\n projectId: string\n environment: TelemetryEnvironment\n authMethod: string\n runtimeContext: TelemetryRuntimeContext\n}\n\n/**\n * Creates a telemetry manager for a single SDK instance session.\n *\n * The manager initializes a `createBatchedStore` from `@sanity/telemetry`,\n * caches the consent check for the lifetime of the session, and provides\n * typed methods for each SDK telemetry event.\n *\n * @internal\n */\nexport function createTelemetryManager(options: TelemetryManagerOptions): TelemetryManager {\n const {sessionId, getClient, projectId, environment, authMethod, runtimeContext} = options\n const startedAt = Date.now()\n const emittedHooks = new Set<string>()\n\n let cachedConsent: {status: ConsentStatus} | null = null\n\n const resolveConsent = async (): Promise<{status: ConsentStatus}> => {\n if (cachedConsent) return cachedConsent\n try {\n const client = getClient()\n const result = await client.request<{status: ConsentStatus}>({\n url: '/intake/telemetry-status',\n tag: CONSENT_TAG,\n })\n cachedConsent = result\n } catch {\n cachedConsent = {status: 'undetermined'}\n }\n return cachedConsent\n }\n\n const enrichBatch = (batch: TelemetryEvent[]) =>\n batch.map((event) => {\n // Trace events (`trace.start` / `trace.log` / `trace.error` /\n // `trace.complete`) arrive with their own caller-provided `context`.\n // Log / userProperties events don't. Narrow via `in` so `event`\n // stays typed as `TelemetryEvent`, then merge so we don't drop the\n // trace context. SDK-owned fields below win on conflict.\n const existing =\n 'context' in event ? (event.context as Record<string, unknown> | undefined) : undefined\n return {\n ...event,\n context: {\n ...existing,\n version: CORE_SDK_VERSION,\n environment,\n origin: typeof window !== 'undefined' ? window.location.origin : 'node',\n },\n }\n })\n\n const sendEvents = async (batch: TelemetryEvent[]): Promise<unknown> => {\n const client = getClient()\n log.debug('sending event batch', {batchSize: batch.length, environment})\n return client.request({\n url: '/intake/batch',\n method: 'POST',\n body: {projectId, batch: enrichBatch(batch)},\n tag: BATCH_TAG,\n })\n }\n\n const store: TelemetryStore<Record<string, unknown>> = createBatchedStore(\n sessionId as SessionId,\n {\n flushInterval: FLUSH_INTERVAL_MS,\n resolveConsent,\n sendEvents,\n },\n )\n\n const logger: TelemetryLogger<Record<string, unknown>> = store.logger\n\n return {\n async checkConsent() {\n const {status} = await resolveConsent()\n return status === 'granted'\n },\n\n logSessionStarted(data) {\n log.debug('event: SDK Session Started', {\n projectId: data.projectId,\n perspective: data.perspective,\n authMethod,\n runtimeContext,\n version: CORE_SDK_VERSION,\n environment,\n })\n logger.log(SDKSessionStarted, {\n version: CORE_SDK_VERSION,\n ...data,\n authMethod,\n runtimeContext,\n })\n },\n\n logHookFirstUsed(hookName: string) {\n if (emittedHooks.has(hookName)) return\n emittedHooks.add(hookName)\n log.debug('event: SDK Hook Mounted', {hookName, authMethod, runtimeContext})\n logger.log(SDKHookMounted, {hookName, authMethod, runtimeContext})\n },\n\n logError(errorType: string, hookName: string) {\n log.debug('event: SDK Error', {errorType, hookName})\n logger.log(SDKError, {errorType, hookName})\n },\n\n endSession() {\n const durationSeconds = Math.round((Date.now() - startedAt) / 1000)\n log.debug('event: SDK Session Ended', {\n durationSeconds,\n hooksUsed: [...emittedHooks],\n authMethod,\n runtimeContext,\n environment,\n })\n logger.log(SDKSessionEnded, {\n durationSeconds,\n hooksUsed: [...emittedHooks],\n authMethod,\n runtimeContext,\n })\n\n store.flush().catch(() => {\n // Best-effort flush on dispose; swallow errors\n })\n store.end()\n },\n\n dispose() {\n store.end()\n },\n\n get hooksUsed(): ReadonlySet<string> {\n return emittedHooks\n },\n }\n}\n","import {type SanityInstance} from '../store/createSanityInstance'\nimport {createLogger} from '../utils/logger'\nimport {getTelemetryEnvironment} from './environment'\nimport {type TelemetryManager} from './telemetryManager'\n\nconst DEFAULT_TELEMETRY_API_VERSION = '2024-11-12'\n\nconst logger = createLogger('telemetry')\n\n/**\n * Per-instance map of active telemetry managers. Allows the React\n * package (and other consumers) to look up the manager for a given\n * instance and log hook usage / errors without importing the full\n * telemetry module themselves.\n *\n * @internal\n */\nconst telemetryManagers = new WeakMap<SanityInstance, TelemetryManager>()\nconst pendingHooks = new WeakMap<SanityInstance, Set<string>>()\nconst initInFlight = new WeakSet<SanityInstance>()\n\n/**\n * Initializes telemetry for a SDK instance if the runtime environment\n * qualifies. The environment is resolved by `getTelemetryEnvironment()`:\n *\n * - `'development'` — local dev servers (`localhost` / `127.0.0.1`, or\n * Node with `NODE_ENV=development`). This is the original opt-in\n * surface.\n * - `'production'` — apps deployed to Sanity-controlled domains\n * (e.g. `*.sanity.studio`, the dashboard). End users are\n * authenticated Sanity users with Populus consent records, so we\n * apply the same consent gate as the Studio's `telemetry-sink`.\n *\n * Apps on customer-controlled domains return `null` and skip telemetry\n * entirely.\n *\n * `telemetryManager` and `clientStore` are dynamically imported so the\n * telemetry code path stays out of production bundles for apps that\n * don't qualify. Only the lightweight environment check runs at boot.\n *\n * The `projectId` must be passed explicitly because the resource\n * configuration is typically set by the React layer after the\n * instance has already been created.\n *\n * @internal\n */\nexport function initTelemetry(instance: SanityInstance, projectId: string): void {\n const environment = getTelemetryEnvironment()\n if (!environment) {\n logger.trace('initTelemetry skipped: environment not eligible', {internal: true})\n return\n }\n if (!projectId) {\n logger.trace('initTelemetry skipped: no projectId', {internal: true})\n return\n }\n if (telemetryManagers.has(instance) || initInFlight.has(instance)) {\n return\n }\n initInFlight.add(instance)\n\n logger.debug('initializing telemetry', {projectId, environment})\n\n Promise.all([\n import('./telemetryManager'),\n import('../client/clientStore'),\n import('../auth/authStore'),\n import('../auth/authMode'),\n ])\n .then(async ([{createTelemetryManager}, {getClient}, {getTokenState}, {isStudioConfig}]) => {\n if (instance.isDisposed()) {\n initInFlight.delete(instance)\n logger.debug('telemetry skipped: instance disposed before imports resolved')\n return\n }\n\n // Wait for the auth store to resolve a token. The client needs a\n // Bearer token for the consent check and batch POSTs. If the token\n // is already available (e.g. static token config), this resolves\n // immediately. For OAuth/localStorage discovery it waits for the\n // first emission. For unauthenticated apps the promise never\n // resolves, which is fine since telemetry requires auth anyway.\n const token = getTokenState(instance).getCurrent()\n logger.trace('auth token check', {tokenPresent: !!token, internal: true})\n\n if (!token) {\n logger.debug('waiting for auth token')\n const hasToken = await new Promise<boolean>((resolve) => {\n if (instance.isDisposed()) return resolve(false)\n const cleanup = {unsubscribe: () => {}}\n const unsub = instance.onDispose(() => {\n cleanup.unsubscribe()\n resolve(false)\n })\n // The token observable is a `shareReplay({bufferSize: 1, refCount: true})`\n // (see `createStateSourceAction`), so it can deliver a buffered value\n // synchronously while we're still inside `.subscribe(cb)`. At that\n // moment `sub` is in the TDZ, so the callback can't reach it. We\n // gate on a `received` flag and let the post-subscribe block do the\n // unsubscribe in the sync-emission case.\n let received = false\n const sub = getTokenState(instance).observable.subscribe((t) => {\n if (received || !t) return\n received = true\n logger.debug('auth token received')\n unsub()\n resolve(true)\n cleanup.unsubscribe()\n })\n cleanup.unsubscribe = () => sub.unsubscribe()\n if (received) cleanup.unsubscribe()\n })\n if (!hasToken || instance.isDisposed()) {\n initInFlight.delete(instance)\n logger.debug('telemetry skipped: no token resolved or instance disposed')\n return\n }\n }\n\n const config = instance.config\n const perspective = typeof config.perspective === 'string' ? config.perspective : 'published'\n // Studio instances can use explicit tokens. Keep runtime context independent of auth.\n const runtimeContext = isStudioConfig(config) ? 'studio' : 'app'\n const authMethod = config.auth?.token\n ? 'token'\n : config.studio?.auth?.token\n ? 'studio'\n : 'default'\n\n const manager = createTelemetryManager({\n sessionId: instance.instanceId,\n getClient: () => getClient(instance, {apiVersion: DEFAULT_TELEMETRY_API_VERSION}),\n projectId,\n environment,\n authMethod,\n runtimeContext,\n })\n\n const consented = await manager.checkConsent()\n logger.debug('consent check complete', {consented})\n if (!consented || instance.isDisposed()) {\n initInFlight.delete(instance)\n manager.dispose()\n return\n }\n\n initInFlight.delete(instance)\n telemetryManagers.set(instance, manager)\n\n const buffered = pendingHooks.get(instance)\n if (buffered) {\n logger.debug('flushing buffered hooks', {hooks: Array.from(buffered)})\n for (const hookName of buffered) {\n manager.logHookFirstUsed(hookName)\n }\n pendingHooks.delete(instance)\n }\n\n logger.info('telemetry session started', {\n projectId,\n perspective,\n authMethod,\n runtimeContext,\n environment,\n })\n manager.logSessionStarted({\n projectId,\n perspective,\n })\n\n instance.onDispose(() => {\n manager.endSession()\n telemetryManagers.delete(instance)\n logger.debug('telemetry session ended')\n })\n })\n .catch((err) => {\n initInFlight.delete(instance)\n logger.warn('telemetry init failed', {error: err})\n })\n}\n\n/**\n * Retrieves the telemetry manager for an instance, if one exists.\n * Returns undefined when telemetry is disabled or not yet initialized.\n *\n * @internal\n */\nexport function getTelemetryManager(instance: SanityInstance): TelemetryManager | undefined {\n return telemetryManagers.get(instance)\n}\n\n/**\n * Record a hook name for an instance. If the telemetry manager is\n * already initialized the event is logged immediately. Otherwise\n * the name is buffered and flushed when init completes.\n *\n * @internal\n */\nexport function trackHookMounted(instance: SanityInstance, hookName: string): void {\n if (!getTelemetryEnvironment()) return\n\n const manager = findManager(instance)\n if (manager) {\n logger.trace('hook mounted (logged)', {hookName, internal: true})\n manager.logHookFirstUsed(hookName)\n return\n }\n\n const root = getRootInstance(instance)\n let hooks = pendingHooks.get(root)\n if (!hooks) {\n hooks = new Set()\n pendingHooks.set(root, hooks)\n }\n if (!hooks.has(hookName)) {\n logger.trace('hook mounted (buffered)', {hookName, internal: true})\n }\n hooks.add(hookName)\n}\n\nfunction findManager(instance: SanityInstance): TelemetryManager | undefined {\n return telemetryManagers.get(instance)\n}\n\nfunction getRootInstance(instance: SanityInstance): SanityInstance {\n return instance\n}\n","const WILDCARD_TOKEN = '*'\nconst NEGATION_TOKEN = '-'\n// This regex handles simple cases including quoted phrases.\n// More complex query syntaxes might need a more robust parser.\nconst TOKEN_REGEX = /(?:[^\\s\"]+|\"[^\"]*\")+/g\n\n/**\n * @internal\n * Checks if a token starts with the negation character.\n */\nfunction isNegationToken(token: string | undefined): boolean {\n return typeof token !== 'undefined' && token.trim().startsWith(NEGATION_TOKEN)\n}\n\n/**\n * @internal\n * Checks if a token ends with the wildcard character.\n */\nfunction isPrefixToken(token: string | undefined): boolean {\n return typeof token !== 'undefined' && token.trim().endsWith(WILDCARD_TOKEN)\n}\n\n/**\n * @internal\n * Checks if a token is enclosed in double quotes.\n */\nfunction isExactMatchToken(token: string | undefined): boolean {\n // Ensure the token exists, has at least 2 characters, and starts/ends with \"\n return !!token && token.length >= 2 && token.startsWith('\"') && token.endsWith('\"')\n}\n\n/**\n * Creates a GROQ search filter string (`[@] match text::query(\"...\")`)\n * from a raw search query string.\n *\n * It applies wildcard ('*') logic to the last eligible token and escapes\n * backslashes and double quotes within the search term.\n *\n * If the input query is empty or only whitespace, it returns an empty string.\n *\n * @param query - The raw input search string.\n * @returns The GROQ search filter string, or an empty string.\n * @internal\n */\nexport function createGroqSearchFilter(query: string): string {\n // Trim leading/trailing whitespace from the overall query first\n const trimmedQuery = query.trim()\n if (!trimmedQuery) {\n return '' // Return empty if query is empty or just whitespace\n }\n\n // Extract tokens using the regex\n const tokens = trimmedQuery.match(TOKEN_REGEX) ?? []\n\n // Find the index of the last token eligible for wildcard appending\n const reversedTokens = [...tokens].reverse()\n const reversedIndex = reversedTokens.findIndex(\n (token: string) => !isNegationToken(token) && !isExactMatchToken(token),\n )\n const finalIncrementalTokenIndex = reversedIndex === -1 ? -1 : tokens.length - 1 - reversedIndex\n\n // Get the actual token based on the found index\n const finalIncrementalToken = tokens[finalIncrementalTokenIndex]\n\n const processedTokens = [...tokens]\n // If a suitable token was found and it doesn't already end with a wildcard,\n // apply the wildcard.\n if (finalIncrementalToken !== undefined && !isPrefixToken(finalIncrementalToken)) {\n // Replace the identified token with its wildcarded version\n processedTokens.splice(\n finalIncrementalTokenIndex,\n 1,\n `${finalIncrementalToken}${WILDCARD_TOKEN}`,\n )\n }\n\n // Join the tokens back into a space-separated string\n const wildcardSearch = processedTokens.join(' ')\n\n // Escape backslashes and double quotes within the final search term for the\n // GROQ query. Backslashes go first, so the escapes added for quotes are not\n // themselves escaped. Without this a trailing backslash would escape the\n // closing quote and let the input break out of the string literal.\n const escapedSearch = wildcardSearch.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"')\n\n // Construct the final GROQ filter clause\n return `[@] match text::query(\"${escapedSearch}\")`\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAWA,SAAgB,qBACd,aACe;CACf,IAAI,YAAY,gBAAgB,MAAM,OAAO,IAAI,IAAI,YAAY,WAAW,CAAC,CAAC;CAC9E,IAAI,YAAY,SAAS,MAAM,OAAO;CAItC,IAAM,UAAW,WAA4B,uBAAuB;CACpE,IAAI,YAAY,aAAa;EAC3B,IAAM,SAAS,UAAU,oBAAoB;EAC7C,OAAO,WAAW,YAAY,KAAK,QAAQ,YAAY,eAAe,GAAG;CAC3E;CAEA,IAAM,SAAS,UAAU,uBAAuB;CAChD,OAAO,WAAW,YAAY,KAAK,GAAG;AACxC;ACVA,SAAS,sBAAsB,SAAoD;CACjF,IAAM,WAAW,mBAAmB,OAAO,GACrC,OAAO,QAAQ,iBAAiB,WAAW,YAAY,QAAQ;CACrE,OAAO;EAAC,GAAG;EAAU,UAAU;GAAC,GAAG,SAAS;GAAU;EAAI;CAAC;AAC7D;AAGA,MAAM,kBAAkB,GAAqB,MAC3C,EAAE,SAAS,EAAE,QACb,EAAE,SAAS,OAAO,EAAE,SAAS,MAC7B,EAAE,SAAS,SAAS,EAAE,SAAS,QAC/B,EAAE,SAAS,eAAe,EAAE,SAAS,cACrC,mBAAmB,WAAW,EAAE,EAAE,GAAG,WAAW,EAAE,EAAE,CAAC;;;;;;;;;;;;;;AAevD,SAAgB,oBACd,UACA,SACkC;CAClC,IAAM,eAAe,cAAc,UAAU,2BAA2B,GAClE,YAAY,cAAc,UAAU,qBAAqB,GACzD,SAAS,sBAAsB,OAAO,GAEtC,mBAAwC;EAC5C,IAAM,WAAW,aAAa,WAAW;EACzC,IAAI,aAAa,KAAA,GACjB;OAAI,SAAS,cAAc,IAAM,OAAO;GAExC,IAAI;IAEF,OADkB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,WAAW,IAAG,KAAK,MAAM,SAAS,IAAG;AACpF;;;;;;;;;;;;;;AAeA,SAAgB,uBAAuB,OAAuB;CAE5D,IAAM,eAAe,MAAM,KAAK;CAChC,IAAI,CAAC,cACH,OAAO;CAIT,IAAM,SAAS,aAAa,MAAM,WAAW,KAAK,CAAC,GAI7C,gBADiB,CAAC,GAAG,MAAM,CAAC,CAAC,QACA,CAAC,CAAC,WAClC,UAAkB,CAAC,gBAAgB,KAAK,KAAK,CAAC,kBAAkB,KAAK,CACxE,GACM,6BAA6B,kBAAkB,KAAK,KAAK,OAAO,SAAS,IAAI,eAG7E,wBAAwB,OAAO,6BAE/B,kBAAkB,CAAC,GAAG,MAAM;CAsBlC,OAnBI,0BAA0B,KAAA,KAAa,CAAC,cAAc,qBAAqB,KAE7E,gBAAgB,OACd,4BACA,GACA,GAAG,wBACL,GAaK,0BATgB,gBAAgB,KAAK,GAMT,CAAC,CAAC,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,MAG7B,EAAE;AACjD"}
@@ -1,4 +1,4 @@
1
- import { r as getClientState } from "../clientStore-DW3iIcbg.js";
1
+ import { r as getClientState } from "../clientStore-DnMH7LPG.js";
2
2
  import "@sanity/client";
3
3
  import { from, switchMap } from "rxjs";
4
4
  /**
@@ -113,6 +113,7 @@ interface NodeState<TWindowMessage extends WindowMessage = WindowMessage, TFrame
113
113
  * Provides a subscribable state source for a node by name
114
114
  * @param instance - The Sanity instance to get the node state for
115
115
  * @param nodeInput - The configuration for the node to get the state for
116
+
116
117
  * @returns A subscribable state source for the node
117
118
  * @public
118
119
  */
@@ -1 +1 @@
1
- {"version":3,"file":"comlink.d.ts","names":["_$______store_createActionBinder0.BoundStoreAction","_$______store_createActionBinder0.BoundStoreAction"],"sources":["../../src/comlink/types.ts","../../src/comlink/controller/comlinkControllerStore.ts","../../src/comlink/node/comlinkNodeStore.ts","../../src/comlink/node/getNodeState.ts"],"mappings":";;;;;;;KAMY,eAAe;;;;;KAMf,gBAAgB;;;;;KAMhB;EACV;EACA;;;;;;KAOU;EACV;EACA;IAAU;IAAsB;;;;;;;UCfjB;EACf,SAAS,gBAAgB,cAAc;EAEvC,SAAS;EAET;;;;;;UAOe;EACf,YAAY;EACZ;EACA,UAAU,YAAY;;;;;;qBAyBX,mBAAiBA,iBAAA;;;;;;qBAUjB,oBAAkBA,iBAAA,yBAAA,SAAA,eAAA,0CAAA,mCAAA;;;;;;qBAUlB,uBAAqBA,iBAAA,yBAAA,uBAAA;;;;;qBASrB,gBAAcA,iBAAA,yBAAA;;;;;UCtEV;EACf,MAAM,KAAK,eAAe;EAE1B,SAAS;EAET,QAAQ;EACR;;;;;;UAOe;EACf,OAAO,YAAY;EAEnB,eAAe,YAAY;;;;;;qBAuBhB,aAAWC,iBAAA,mBAAA;;;;;;;;;wBAYR,gBACd,uBAAuB,gBAAgB,eACvC,sBAAsB,eAAe,cACrC,UAAU,gBAAgB,SAAS,YAAY,KAAK,gBAAgB;;;;UC1CrD,UACf,uBAAuB,gBAAgB,eACvC,sBAAsB,eAAe;EAErC,MAAM,KAAK,gBAAgB;EAC3B,QAAQ;;;;;;;;;wBAaM,aACd,uBAAuB,gBAAgB,eACvC,sBAAsB,eAAe,cAErC,UAAU,gBACV,WAAW,YACV,YAAY,UAAU,gBAAgB"}
1
+ {"version":3,"file":"comlink.d.ts","names":["_$______store_createActionBinder0.BoundStoreAction","_$______store_createActionBinder0.BoundStoreAction"],"sources":["../../src/comlink/types.ts","../../src/comlink/controller/comlinkControllerStore.ts","../../src/comlink/node/comlinkNodeStore.ts","../../src/comlink/node/getNodeState.ts"],"mappings":";;;;;;;KAMY,eAAe;;;;;KAMf,gBAAgB;;;;;KAMhB;EACV;EACA;;;;;;KAOU;EACV;EACA;IAAU;IAAsB;;;;;;;UCfjB;EACf,SAAS,gBAAgB,cAAc;EAEvC,SAAS;EAET;;;;;;UAOe;EACf,YAAY;EACZ;EACA,UAAU,YAAY;;;;;;qBAyBX,mBAAiBA,iBAAA;;;;;;qBAUjB,oBAAkBA,iBAAA,yBAAA,SAAA,eAAA,0CAAA,mCAAA;;;;;;qBAUlB,uBAAqBA,iBAAA,yBAAA,uBAAA;;;;;qBASrB,gBAAcA,iBAAA,yBAAA;;;;;UCtEV;EACf,MAAM,KAAK,eAAe;EAE1B,SAAS;EAET,QAAQ;EACR;;;;;;UAOe;EACf,OAAO,YAAY;EAEnB,eAAe,YAAY;;;;;;qBAuBhB,aAAWC,iBAAA,mBAAA;;;;;;;;;wBAYR,gBACd,uBAAuB,gBAAgB,eACvC,sBAAsB,eAAe,cACrC,UAAU,gBAAgB,SAAS,YAAY,KAAK,gBAAgB;;;;UC1CrD,UACf,uBAAuB,gBAAgB,eACvC,sBAAsB,eAAe;EAErC,MAAM,KAAK,gBAAgB;EAC3B,QAAQ;;;;;;;;;;wBAaM,aACd,uBAAuB,gBAAgB,eACvC,sBAAsB,eAAe,cAErC,UAAU,gBACV,WAAW,YACV,YAAY,UAAU,gBAAgB"}
@@ -1,6 +1,6 @@
1
1
  import { i as bindActionGlobally, s as defineStore } from "../createStateSourceAction-Bn0po7Z3.js";
2
2
  import { t as isDeepEqual } from "../object-CxXlSVg7.js";
3
- import { n as getOrCreateNode, r as releaseNode, t as getNodeState } from "../getNodeState-CkxvEZD5.js";
3
+ import { n as getOrCreateNode, r as releaseNode, t as getNodeState } from "../getNodeState-Bp9sxNE1.js";
4
4
  import { createController } from "@sanity/comlink";
5
5
  /**
6
6
  * Calls the destroy method on the controller and resets the controller state.
@@ -1,3 +1,3 @@
1
- import { Ar as TopicResult, Cr as NavigationTarget, Dr as StateTopic, Er as ReplyOf, Mr as ValueOf, Nr as capabilities, Or as StateTopicDef, Sr as NavigationLocation, Tr as RemoteModuleRef, _r as EventTopic, br as LocalApplication, cr as ApplicationConfig, gr as DocumentActivity, hr as DashboardTopics, jr as Topics, kr as TopicName, lr as ApplicationConfigAppType, mr as CapabilityRecord, nr as TopicData, pr as Capability, rr as TopicError, sr as ApplicationActivity, ur as ApplicationContext, vr as EventTopicDef, wr as PayloadOf, yr as FavoriteDocument } from "../applications-DowvM7CN.js";
2
- import { a as MessageBusClient, c as MessageBusEmitResult, d as MessageBusHost, f as MessageBusMessage, g as connectMessageBus, h as MessageBusStateSource, i as MessageBusAbortOptions, l as MessageBusError, m as MessageBusQueryOptions, o as MessageBusConnection, p as MessageBusMeta, r as MessageBus, s as MessageBusEmitOptions, t as ConnectMessageBusOptions, u as MessageBusErrorCode } from "../bus-ClLO0kQU.js";
1
+ import { Ar as TopicResult, Cr as NavigationTarget, Dr as StateTopic, Er as ReplyOf, Mr as ValueOf, Nr as capabilities, Or as StateTopicDef, Sr as NavigationLocation, Tr as RemoteModuleRef, _r as EventTopic, br as LocalApplication, cr as ApplicationConfig, gr as DocumentActivity, hr as DashboardTopics, jr as Topics, kr as TopicName, lr as ApplicationConfigAppType, mr as CapabilityRecord, nr as TopicData, pr as Capability, rr as TopicError, sr as ApplicationActivity, ur as ApplicationContext, vr as EventTopicDef, wr as PayloadOf, yr as FavoriteDocument } from "../applications-CkDu_W5X.js";
2
+ import { a as MessageBusClient, c as MessageBusEmitResult, d as MessageBusHost, f as MessageBusMessage, g as connectMessageBus, h as MessageBusStateSource, i as MessageBusAbortOptions, l as MessageBusError, m as MessageBusQueryOptions, o as MessageBusConnection, p as MessageBusMeta, r as MessageBus, s as MessageBusEmitOptions, t as ConnectMessageBusOptions, u as MessageBusErrorCode } from "../bus-bvKfVggT.js";
3
3
  export { type ApplicationActivity, type ApplicationConfig, type ApplicationConfigAppType, type ApplicationContext, type Capability, type CapabilityRecord, type ConnectMessageBusOptions, type DashboardTopics, type DocumentActivity, type EventTopic, type EventTopicDef, type FavoriteDocument, type LocalApplication, type MessageBus, type MessageBusAbortOptions, type MessageBusClient, type MessageBusConnection, type MessageBusEmitOptions, type MessageBusEmitResult, MessageBusError, type MessageBusErrorCode, type MessageBusHost, type MessageBusMessage, type MessageBusMeta, type MessageBusQueryOptions, type MessageBusStateSource, type NavigationLocation, type NavigationTarget, type PayloadOf, type RemoteModuleRef, type ReplyOf, type StateTopic, type StateTopicDef, type TopicData, TopicError, type TopicName, type TopicResult, type Topics, type ValueOf, capabilities, connectMessageBus };
@@ -1,3 +1,3 @@
1
- import { M as connectMessageBus, R as capabilities, j as MessageBusError } from "../authStore-KH1GNOOB.js";
2
- import { t as TopicError } from "../topicStore-CU-oF3fc.js";
1
+ import { M as connectMessageBus, R as capabilities, j as MessageBusError } from "../authStore-DwKgZOzo.js";
2
+ import { t as TopicError } from "../topicStore-CNzfuPGY.js";
3
3
  export { MessageBusError, TopicError, capabilities, connectMessageBus };
@@ -2367,8 +2367,8 @@ type PathParts<TPath extends string> = TPath extends `${infer Head}.${infer Tail
2367
2367
  * If a part is a key, it looks up that property.
2368
2368
  * If T is an array and the part is a number, it "indexes" into the element type.
2369
2369
  */
2370
- type DeepGet<TValue, TPath extends readonly (string | number)[]> = TPath extends [] ? TValue : TPath extends readonly [infer THead, ...infer TTail] ? DeepGet<TValue extends undefined | null ? undefined : THead extends keyof TValue ? TValue[THead] : THead extends number ? TValue extends readonly (infer TElement)[] ? TElement | undefined : undefined : undefined // Key/index doesn't exist
2371
- , TTail extends readonly (string | number)[] ? TTail : []> : never;
2370
+ type DeepGet<TValue, TPath extends readonly (string | number)[]> = TPath extends [] ? TValue : TPath extends readonly [infer THead, ...infer TTail] ? DeepGet<TValue extends undefined | null ? undefined : THead extends keyof TValue ? TValue[THead] : THead extends number ? TValue extends readonly (infer TElement)[] ? TElement | undefined : undefined : undefined, // Key/index doesn't exist
2371
+ TTail extends readonly (string | number)[] ? TTail : []> : never;
2372
2372
  /**
2373
2373
  * Given a document type TDocument and a JSON Match path string TPath,
2374
2374
  * compute the type found at that path.
@@ -4164,4 +4164,4 @@ interface DeleteApplicationInput {
4164
4164
  */
4165
4165
  declare const deleteApplication: (instance: SanityInstance, input: DeleteApplicationInput) => Promise<MutationResult<DeletedResult>>;
4166
4166
  export { Project as $, LoggedOutAuthState as $i, ResolveProjectionResult as $n, Logger as $r, DocumentPublishedEvent as $t, stringifyPath$1 as A, CommentTextSelectionItem as Ai, EditReleaseAction as An, TopicResult as Ar, SanityUser as At, getPerspectiveState as B, getOAuthTokensState as Bi, createRelease as Bn, InstallationAccess as Br, SetFavoriteInput as Bt, SanityDocument$3 as C, updateComment as Ci, CreateReleaseAction as Cn, NavigationTarget as Cr, TransportEvent as Ct, joinPaths as D, CommentReaction as Di, DocumentAction as Dn, StateTopic as Dr, Membership as Dt, getPathDepth as E, CommentMessage as Ei, DiscardDocumentAction as En, ReplyOf as Er, GetUsersOptions as Et, getUsersState as F, getClientState as Fi, UnarchiveReleaseAction as Fn, OrganizationBase as Fr, Organizations as Ft, getQueryKey as G, logout as Gi, editRelease as Gn, InstallationsResponse as Gr, ApplyDocumentActionsOptions as Gt, getActiveReleasesState as H, refreshOAuthTokens as Hi, deleteRelease as Hn, InstallationBase as Hr, setFavorite as Ht, loadMoreUsers as I, ProjectAccessErrorDetails as Ii, UnpublishDocumentAction as In, OrganizationMember as Ir, OrganizationsOptions as It, resolveQuery as J, OrgVerificationResult as Ji, scheduleRelease as Jn, configureLogging as Jr, DocumentCreatedEvent as Jt, getQueryState as K, handleAuthCallback as Ki, publishDocument as Kn, installation as Kr, applyDocumentActions as Kt, resolveUser as L, getProjectAccessErrorDetails as Li, UnscheduleReleaseAction as Ln, OrganizationOptions as Lr, organizations as Lt, isImportError as M, ClientOptions as Mi, PublishReleaseAction as Mn, ValueOf as Mr, UserProfile as Mt, getCorsErrorProjectId as N, ClientStoreState as Ni, ReleaseAction as Nn, capabilities as Nr, UsersGroupState as Nt, jsonMatch$1 as O, CommentStatus as Oi, EditDocumentAction as On, StateTopicDef as Or, ResolveUserOptions as Ot, getUserState as P, getClient as Pi, ScheduleReleaseAction as Pn, Organization as Pr, UsersStoreState as Pt, getProjectionState as Q, LoggedInAuthState as Qi, ResolveDocument as Qn, LogNamespace as Qr, DocumentEvent as Qt, resolveUsers as R, getProjectAccessErrorProjectId as Ri, archiveRelease as Rn, organization as Rr, FavoriteDocumentContext as Rt, Role as S, setCommentStatus as Si, CreateDocumentAction as Sn, NavigationLocation as Sr, StateEvent as St, getIndexForKey$1 as T, CommentLocalState as Ti, DeleteReleaseAction as Tn, RemoteModuleRef as Tr, GetUserOptions as Tt, getAllReleasesState as U, revokeOAuthTokens as Ui, discardDocument as Un, InstallationInclude as Ur, getReleaseDocumentId as Ut, ReleaseState as V, handleOAuthCallback as Vi, deleteDocument as Vn, InstallationActiveConfig as Vr, favorites as Vt, QueryOptions as W, startOAuthAuthorization as Wi, editDocument as Wn, InstallationsOptions as Wr, ActionsResult as Wt, projects as X, AuthStoreState as Xi, unpublishDocument as Xn, LogContext as Xr, DocumentDiscardedEvent as Xt, ProjectsOptions as Y, AuthState as Yi, unarchiveRelease as Yn, InstanceContext as Yr, DocumentDeletedEvent as Yt, resolveProjection as Z, ErrorAuthState as Zi, unscheduleRelease as Zn, LogLevel as Zr, DocumentEditedEvent as Zt, applications as _, MutationResult as _a, SetCommentStatusOptions as _i, patchOperations as _n, EventTopic as _r, PresencePerspectiveOptions as _t, ApplicationInclude as a, getTokenState as aa, createProjectHandle as ai, TransactionSubmissionFailedEvent as an, getTopicState as ar, project as at, CurrentUser$1 as b, removeComment as bi, Action as bn, LocalApplication as br, ReportPresenceOptions as bt, ApplicationStudioConfig as c, AuthStateType as ca, getCommentThreadsState as ci, getDocumentSyncStatus as cn, ApplicationConfig$1 as cr, PreviewValue as ct, ApplicationsOptions as d, CacheTag as da, parseCommentsOptionsKey as di, resolvePermissions as dn, ApplicationStatus as dr, getPresence as dt, LoggingInAuthState as ea, LoggerConfig as ei, DocumentRemotePatchesEvent as en, ResolveQueryResult as er, ProjectBase as et, ApplicationsResponse as f, CacheWriter as fa, resolveCommentThreads as fi, subscribeDocumentEvents as fn, ApplicationStatusUpdate as fr, reportPresence as ft, application as g, MutationDefinition as ga, ReplyToCommentOptions as gi, ProcessMutationsOptions as gn, DocumentActivity as gr, PresenceLocation as gt, UpdateApplicationInput as h, FetcherSnapshot as ha, RemoveCommentOptions as hi, DocumentSet as hn, DashboardTopics as hr, DocumentPresenceOptions as ht, ApplicationDeployment as i, getLoginUrlState as ia, createDocumentTypeHandle as ii, TransactionRevertedEvent as in, getDashboardOrganizationId as ir, ProjectOptions as it, CORE_SDK_VERSION as j, CommentThread as ji, PublishDocumentAction as jn, Topics as jr, SanityUserResponse as jt, slicePath$1 as k, CommentTextSelection as ki, EditDocumentOptions as kn, TopicName as kr, ResolveUsersOptions as kt, ApplicationVisibility as l, AccessResourceType as la, getCommentsOptionsKey as li, getPermissionsState as ln, ApplicationConfigAppType as lr, ProjectionValuePending as lt, DeletedResult as m, FetcherDefinition as ma, CreateCommentOptions as mi, PermissionDeniedReason as mn, CapabilityRecord as mr, DocumentPresence as mt, ApplicationAccess as n, getCurrentUserState as na, createDatasetHandle as ni, DocumentUnpublishedEvent as nn, TopicData as nr, ProjectMemberRole as nt, ApplicationInterface as o, setAuthToken as oa, CommentsOptions as oi, DocumentOptions as on, resolveTopic as or, PreviewMedia as ot, DeleteApplicationInput as p, Fetcher as pa, resolveComments as pi, DocumentPermissionsResult as pn, Capability as pr, DisconnectEvent as pt, parseQueryKey as q, observeOrganizationVerificationState as qi, publishRelease as qn, installations as qr, ActionErrorEvent as qt, ApplicationBase as r, getIsInDashboardState as ra, createDocumentHandle as ri, TransactionAcceptedEvent as rn, TopicError as rr, ProjectMetadata as rt, ApplicationInterfacePlacementMetadata as s, OAuthTokens as sa, ResolveCommentsOptions as si, getDocumentState as sn, ApplicationActivity as sr, PreviewQueryResult as st, Application as t, getAuthState as ta, createLogger as ti, DocumentTransactionSubmissionResult as tn, datasets as tr, ProjectMember as tt, ApplicationWorkspace as u, checkPermissions as ua, getCommentsState as ui, resolveDocument as un, ApplicationContext as ur, getDocumentPresence as ut, deleteApplication as v, defineFetcher as va, UpdateCommentOptions as vi, processMutations as vn, EventTopicDef as vr, PresenceSelection as vt, SanityProject$1 as w, Comment as wi, DeleteDocumentAction as wn, PayloadOf as wr, UserPresence as wt, ReleaseDocument$1 as x, replyToComment as xi, ArchiveReleaseAction as xn, MessageBusTopics as xr, RollCallEvent as xt, updateApplication as y, defineMutation as ya, createComment as yi, JsonMatch as yn, FavoriteDocument as yr, PresenceSelectionPoint as yt, defineProjection as z, getSignInMethodLabel as zi, createDocument as zn, Installation as zr, FavoriteStatusResponse as zt };
4167
- //# sourceMappingURL=applications-DowvM7CN.d.ts.map
4167
+ //# sourceMappingURL=applications-CkDu_W5X.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"applications-DowvM7CN.d.ts","names":["_$___store_fetcherStore0.Fetcher","_$____exports0.StateSource","_$___store_createActionBinder0.BoundStoreAction","_$___store_createActionBinder0.BoundStoreAction","_$__authStore0.AuthStoreState","_$___store_createActionBinder0.BoundStoreAction","_$______store_createActionBinder0.BoundStoreAction","_$_______exports0.StateSource","_$___store_createActionBinder0.BoundStoreAction","_$____exports0.StateSource","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.Fetcher","ApplicationConfig","_$______store_createActionBinder0.BoundStoreAction","_$___store_fetcherStore0.Fetcher","SanityQueries","SanityProjections","SanityDocument","SanityMutatePatchMutation","SanityDocument","_$___store_createActionBinder0.BoundStoreAction","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.MutationResult","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.Fetcher","_$____exports0.StateSource","_$___store_createActionBinder0.StoreAction","_$____exports0.StateSource","_$___store_createActionBinder0.BoundStoreAction","SanityProject","_SanityProject","_$___store_fetcherStore0.Fetcher","_$____exports0.SanityInstance","_$___store_fetcherStore0.MutationResult"],"sources":["../src/store/fetcherStore.ts","../src/access/checkPermissions.ts","../src/auth/authStateType.ts","../src/auth/oauth/types.ts","../src/auth/authStore.ts","../src/project/organizationVerification.ts","../src/auth/getOrganizationVerificationState.ts","../src/auth/handleAuthCallback.ts","../src/auth/logout.ts","../src/auth/oauth/oauthActions.ts","../src/auth/projectAccessError.ts","../src/client/clientStore.ts","../src/comments/types.ts","../src/comments/commentActions.ts","../src/comments/commentsStore.ts","../src/config/handles.ts","../src/utils/logger.ts","../src/config/loggingConfig.ts","../src/utils/includeShape.ts","../src/installations/installations.ts","../src/organization/organization.ts","../src/dashboard/messageBus/topics.ts","../src/dashboard/messageBus/topicStore.ts","../src/datasets/datasets.ts","../src/typegen/groqCompat.ts","../src/typegen/resolve.ts","../src/document/actions.ts","../src/document/patchOperations.ts","../src/document/processMutations.ts","../src/document/permissions.ts","../src/document/sharedListener.ts","../src/document/documentStore.ts","../src/document/reducers.ts","../src/document/events.ts","../src/document/applyDocumentActions.ts","../src/document/processActions/releaseUtil.ts","../src/favorites/favorites.ts","../src/organizations/organizations.ts","../src/users/types.ts","../src/presence/types.ts","../src/presence/presenceStore.ts","../src/projection/types.ts","../src/preview/types.ts","../src/project/project.ts","../src/projection/getProjectionState.ts","../src/projection/resolveProjection.ts","../src/projects/projects.ts","../src/query/queryStore.ts","../src/releases/releasesStore.ts","../src/releases/getPerspectiveState.ts","../src/typegen/defineProjection.ts","../src/users/usersStore.ts","../src/utils/getCorsErrorProjectId.ts","../src/utils/isImportError.ts","../src/version.ts","../src/_exports/index.ts","../src/applications/applications.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UA6BiB;EACf;;EAEA;;;;;;;;;;;;;;KAeU,gBAAgB;;EAGtB;EACA;EACA;EACA;EACA;;;EAIA;EACA,MAAM;;EAEN;EACA;;EAEA;;;EAIA;EACA;EACA;EACA;EACA;;;;;;;;;;;;;;;;UAiBW,kBAAkB,2BAA2B;;EAE5D;;;;;EAKA,QAAQ,UAAU,uBAAuB,QAAQ,YAAY,WAAW;;EAExE,SAAS,UAAU,mBAAmB,QAAQ;;;;;;EAM9C,OAAO,eAAe,MAAM,UAAU,QAAQ,YAAY;;;;;;EAM1D;;;;;;;EAOA;;;;;EAKA;;;;;;;;;EASA,eACE,UAAU,mBACP,QA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;;;;;KAYnC,YAAY,gBAAgB,8BAA8B,kBACpE,uBAAuB,WACvB,2BAA2B;;;;;;;UAQZ,oBAAoB,gBAAgB,qBAAqB;EACxE;;EAEA;EACA,UAAU;;EAEV;;EAEA;;;;;;;;UASe,qBAAqB,gBAAgB;EACpD;EACA,MAAM,YAAY;;;;;;;;;cAeP,cAAYC,SAAA,SAAA,oBAAA,sBAAA,qBAAA;;;;;;;;;cA2CZ,aAkBXA,SAlBsB,uBAAA;EACuB,UAAA;gBAiB7C,YAAA;;;;;;;UAQe;EACf;;;;;;;;KASU,wBAAwB;;;;;;;;KASxB;EAA0B;IAAyB,QAC7D,KAAK;;;;;;;;cAUM,oBAAiB,UAAjBC,gBAAiB,OAAA,2BAAA,QAAAC,eAAA;;;;;;UA0Bb;EACf;;;;;;;;;cAUW,oBAAiB,UAAjBD,gBAAiB,OAAA,2BAAA,QAAAC,eAAA"}
1
+ {"version":3,"file":"applications-CkDu_W5X.d.ts","names":["_$___store_fetcherStore0.Fetcher","_$____exports0.StateSource","_$___store_createActionBinder0.BoundStoreAction","_$___store_createActionBinder0.BoundStoreAction","_$__authStore0.AuthStoreState","_$___store_createActionBinder0.BoundStoreAction","_$______store_createActionBinder0.BoundStoreAction","_$_______exports0.StateSource","_$___store_createActionBinder0.BoundStoreAction","_$____exports0.StateSource","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.Fetcher","ApplicationConfig","_$______store_createActionBinder0.BoundStoreAction","_$___store_fetcherStore0.Fetcher","SanityQueries","SanityProjections","SanityDocument","SanityMutatePatchMutation","SanityDocument","_$___store_createActionBinder0.BoundStoreAction","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.MutationResult","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.Fetcher","_$___store_fetcherStore0.Fetcher","_$____exports0.StateSource","_$___store_createActionBinder0.StoreAction","_$____exports0.StateSource","_$___store_createActionBinder0.BoundStoreAction","SanityProject","_SanityProject","_$___store_fetcherStore0.Fetcher","_$____exports0.SanityInstance","_$___store_fetcherStore0.MutationResult"],"sources":["../src/store/fetcherStore.ts","../src/access/checkPermissions.ts","../src/auth/authStateType.ts","../src/auth/oauth/types.ts","../src/auth/authStore.ts","../src/project/organizationVerification.ts","../src/auth/getOrganizationVerificationState.ts","../src/auth/handleAuthCallback.ts","../src/auth/logout.ts","../src/auth/oauth/oauthActions.ts","../src/auth/projectAccessError.ts","../src/client/clientStore.ts","../src/comments/types.ts","../src/comments/commentActions.ts","../src/comments/commentsStore.ts","../src/config/handles.ts","../src/utils/logger.ts","../src/config/loggingConfig.ts","../src/utils/includeShape.ts","../src/installations/installations.ts","../src/organization/organization.ts","../src/dashboard/messageBus/topics.ts","../src/dashboard/messageBus/topicStore.ts","../src/datasets/datasets.ts","../src/typegen/groqCompat.ts","../src/typegen/resolve.ts","../src/document/actions.ts","../src/document/patchOperations.ts","../src/document/processMutations.ts","../src/document/permissions.ts","../src/document/sharedListener.ts","../src/document/documentStore.ts","../src/document/reducers.ts","../src/document/events.ts","../src/document/applyDocumentActions.ts","../src/document/processActions/releaseUtil.ts","../src/favorites/favorites.ts","../src/organizations/organizations.ts","../src/users/types.ts","../src/presence/types.ts","../src/presence/presenceStore.ts","../src/projection/types.ts","../src/preview/types.ts","../src/project/project.ts","../src/projection/getProjectionState.ts","../src/projection/resolveProjection.ts","../src/projects/projects.ts","../src/query/queryStore.ts","../src/releases/releasesStore.ts","../src/releases/getPerspectiveState.ts","../src/typegen/defineProjection.ts","../src/users/usersStore.ts","../src/utils/getCorsErrorProjectId.ts","../src/utils/isImportError.ts","../src/version.ts","../src/_exports/index.ts","../src/applications/applications.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UA6BiB;EACf;;EAEA;;;;;;;;;;;;;;KAeU,gBAAgB;;EAGtB;EACA;EACA;EACA;EACA;;;EAIA;EACA,MAAM;;EAEN;EACA;;EAEA;;;EAIA;EACA;EACA;EACA;EACA;;;;;;;;;;;;;;;;UAiBW,kBAAkB,2BAA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EAAU;;KAGzD,uBAAuB,gBAAgB,uBAAuB,6BACjE;EAEG,SAAS,kBAAkB;IAC5B,YAAY,SAAS;EAClB,QAAQ,kBAAkB;;KAK5B,2BAA2B,gBAAgB,uBAAuB,6BACrE;EAEG,mBAAmB,sBAAsB;IAC1C,YAAY,SAAS;EAClB,kBAAkB,sBAAsB;;;;;;;;;;;KAYnC,YAAY,gBAAgB,8BAA8B,kBACpE,uBAAuB,WACvB,2BAA2B;;;;;;;UAQZ,oBAAoB,gBAAgB,qBAAqB;EACxE;;EAEA;EACA,UAAU;;EAEV;;EAEA;;;;;;;;UASe,qBAAqB,gBAAgB;EACpD;EACA,MAAM,YAAY;;;;;;;;;cAeP,cAAYC,SAAA,SAAA,oBAAA,sBAAA,qBAAA;;;;;;;;;cA2CZ,aAkBXA,SAlBsB,uBAAA;EACuB,UAAA;gBAiB7C,YAAA;;;;;;;UAQe;EACf;;;;;;;;KASU,wBAAwB;;;;;;;;KASxB;EAA0B;IAAyB,QAC7D,KAAK;;;;;;;;cAUM,oBAAiB,UAAjBC,gBAAiB,OAAA,2BAAA,QAAAC,eAAA;;;;;;UA0Bb;EACf;;;;;;;;;cAUW,oBAAiB,UAAjBD,gBAAiB,OAAA,2BAAA,QAAAC,eAAA"}
@@ -334,21 +334,13 @@ function createEventMessage(appId, moduleId, type, payload, pendingReply) {
334
334
  timestamp: Date.now()
335
335
  },
336
336
  reply: (value) => {
337
- if (pendingReply.settled) {
338
- console.warn(`[sanity-sdk:message-bus] reply ignored for "${type}": no waiting caller or already replied`);
339
- return;
340
- }
341
- settleReply(pendingReply, {
337
+ pendingReply.settled ? console.warn(`[sanity-sdk:message-bus] reply ignored for "${type}": no waiting caller or already replied`) : settleReply(pendingReply, {
342
338
  ok: !0,
343
339
  value
344
340
  });
345
341
  },
346
342
  reject: (reason) => {
347
- if (pendingReply.settled) {
348
- console.warn(`[sanity-sdk:message-bus] reject ignored for "${type}": no waiting caller or already replied`);
349
- return;
350
- }
351
- settleReply(pendingReply, {
343
+ pendingReply.settled ? console.warn(`[sanity-sdk:message-bus] reject ignored for "${type}": no waiting caller or already replied`) : settleReply(pendingReply, {
352
344
  ok: !1,
353
345
  error: new MessageBusError("REFUSED", reason)
354
346
  });
@@ -441,13 +433,7 @@ function query(source, type, options, connectionSignal, resetSignal, connection)
441
433
  });
442
434
  }
443
435
  function unsubscribeOnAbort(subscription, signal) {
444
- if (signal) {
445
- if (signal.aborted) {
446
- subscription.unsubscribe();
447
- return;
448
- }
449
- signal.addEventListener("abort", () => subscription.unsubscribe(), { once: !0 });
450
- }
436
+ signal && (signal.aborted ? subscription.unsubscribe() : signal.addEventListener("abort", () => subscription.unsubscribe(), { once: !0 }));
451
437
  }
452
438
  function scopeSignal(signal, ...lifecycles) {
453
439
  return signal ? AbortSignal.any([signal, ...lifecycles]) : AbortSignal.any(lifecycles);
@@ -602,11 +588,7 @@ function createClient$1(registry, record, compatibility) {
602
588
  moduleId: record.moduleId,
603
589
  closed: record.abort.signal,
604
590
  emit: (type, value) => {
605
- if (record.abort.signal.aborted) {
606
- console.warn(`[sanity-sdk:message-bus] "${type}" not written: connection "${record.moduleId}" has closed`);
607
- return;
608
- }
609
- emitState(registry, record, type, compatibility.toInstalledEmission(type, value));
591
+ record.abort.signal.aborted ? console.warn(`[sanity-sdk:message-bus] "${type}" not written: connection "${record.moduleId}" has closed`) : emitState(registry, record, type, compatibility.toInstalledEmission(type, value));
610
592
  },
611
593
  reject: (type, message) => {
612
594
  record.abort.signal.aborted || (record.rejections.set(type, message), record.rejected$.next(type));
@@ -645,10 +627,10 @@ function createConnection(registry, config) {
645
627
  let source = stateSource(type);
646
628
  if (!handler) return source;
647
629
  unsubscribeOnAbort(source.subscribe(handler), scopeSignal(options?.signal, registry.resetAbort.signal, connectionSignal));
648
- return;
630
+ } else {
631
+ if (!handler) return eventStream(type);
632
+ respond(registry, type, (message) => handler(migrateEventMessage(message, (value) => compatibility.toApplicationEventPayload(type, value), (value) => compatibility.toInstalledEventReply(type, value))), options, appId, connectionSignal);
649
633
  }
650
- if (!handler) return eventStream(type);
651
- respond(registry, type, (message) => handler(migrateEventMessage(message, (value) => compatibility.toApplicationEventPayload(type, value), (value) => compatibility.toInstalledEventReply(type, value))), options, appId, connectionSignal);
652
634
  },
653
635
  disconnect: () => {
654
636
  if (!connectionSignal.aborted) {
@@ -1738,4 +1720,4 @@ const authStore = defineStore({
1738
1720
  });
1739
1721
  export { REQUEST_TAG_PREFIX as A, getStagingApiHost as B, getDefaultLocation as C, isStudioConfig as D, authMode_exports as E, isMessageBusInstalled as F, createLogger as H, resetMessageBus as I, _defineProperty as L, connectMessageBus as M, installMessageBus as N, DEFAULT_API_VERSION as O, isMessageBusEnvironment as P, capabilities as R, getClientErrorApiType as S, AuthStateType as T, configureLogging as V, createLoggedInAuthState as _, getCurrentUserState as a, getClientErrorApiBody as b, getTokenState as c, appendResourceIndicator as d, createOAuthClient as f, toOAuthTokens as g, serializeTokens as h, getAuthState as i, MessageBusError as j, DEFAULT_BASE as k, setAuthToken as l, postTokenRequest as m, authStore_exports as n, getIsInDashboardState as o, getOAuthOptions as p, getAuthMethodState as r, getLoginUrlState as s, authStore as t, runOAuthTokenRefresh as u, getAuthCode as v, getTokenFromLocation as w, getClientErrorApiProjectId as x, getCleanedUrl as y, getAuthLogger as z };
1740
1722
 
1741
- //# sourceMappingURL=authStore-KH1GNOOB.js.map
1723
+ //# sourceMappingURL=authStore-DwKgZOzo.js.map