sanity 6.2.0-next.142 → 6.2.0-next.143

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.
@@ -11,7 +11,7 @@ import throttle from "lodash-es/throttle.js";
11
11
  import { styled, css, useTheme as useTheme$1, keyframes, createGlobalStyle } from "styled-components";
12
12
  import { EllipsisHorizontalIcon, ErrorOutlineIcon, ArrowLeftIcon, WarningOutlineIcon, CircleIcon, CalendarIcon, UnpublishIcon, PublishIcon, EditIcon, CloseIcon, TrashIcon, AddCircleIcon, TimelineIcon, ChevronRightIcon, ArrowRightIcon, ArrowDownIcon, DocumentIcon, ImageIcon, ChevronDownIcon, RevertIcon, InfoOutlineIcon, CheckmarkIcon, AddIcon, HelpCircleIcon, AccessDeniedIcon, ToggleArrowRightIcon, SyncIcon, LaunchIcon, BulbOutlineIcon, UnknownIcon, LinkIcon, ChevronUpIcon, DownloadIcon, DocumentsIcon, UploadIcon, DragHandleIcon, InsertAboveIcon, InsertBelowIcon, CopyIcon, AddDocumentIcon, SearchIcon, ChevronLeftIcon, EarthGlobeIcon, EarthAmericasIcon, UlistIcon, OlistIcon, CodeIcon, UnderlineIcon, StrikethroughIcon, ItalicIcon, BoldIcon, BlockElementIcon, InlineElementIcon, CollapseIcon, ExpandIcon, ResetIcon, Icon, ReadOnlyIcon, BinaryDocumentIcon, LockIcon, CropIcon, EyeOpenIcon, ClockIcon, DotIcon, BoltIcon, ComposeSparklesIcon, UnlockIcon, ClipboardIcon, CheckmarkCircleIcon, StringIcon, NumberIcon, BlockContentIcon, UndoIcon, UnlinkIcon, LinkRemovedIcon, CommentIcon, TaskIcon, DesktopIcon, MoonIcon, SunIcon, SpinnerIcon, ControlsIcon, SortIcon, SparkleIcon, EyeClosedIcon, DoubleChevronRightIcon, AddUserIcon, CogIcon, LeaveIcon, UsersIcon, FaceHappyIcon, FaceIndifferentIcon, FaceSadIcon, FeedbackIcon, GithubIcon, RefreshIcon, MenuIcon, UserIcon } from "@sanity/icons";
13
13
  import { createMemoryHistory, createBrowserHistory } from "history";
14
- import { of, concat, defer, EMPTY as EMPTY$5, map as map$1, merge, defaultIfEmpty, catchError as catchError$1, switchMap as switchMap$1, take, concatMap, from, Observable, BehaviorSubject, fromEvent, skip, ReplaySubject, timer, firstValueFrom, throwError, NEVER, Subject, tap as tap$1, finalize, share as share$1, combineLatest, asyncScheduler, bufferTime, mergeMap as mergeMap$1, filter as filter$1, lastValueFrom, partition as partition$1, distinctUntilChanged as distinctUntilChanged$1, asapScheduler, using, shareReplay as shareReplay$1, repeat, pipe, iif, startWith as startWith$1, concatWith, scan as scan$1, count, toArray as toArray$2, reduce as reduce$1, switchScan, delayWhen, first as first$1, zipWith, takeWhile, debounceTime as debounceTime$1, find, zip, isObservable, retry, debounce as debounce$1, delay as delay$1, timeout as timeout$1, connect, forkJoin } from "rxjs";
14
+ import { of, concat, defer, EMPTY as EMPTY$5, map as map$1, merge, defaultIfEmpty, catchError as catchError$1, switchMap as switchMap$1, take, concatMap, from, Observable, BehaviorSubject, fromEvent, skip, ReplaySubject, timer, firstValueFrom, throwError, NEVER, Subject, tap as tap$1, finalize, share as share$1, combineLatest, asyncScheduler, bufferTime, mergeMap as mergeMap$1, filter as filter$1, lastValueFrom, partition as partition$1, distinctUntilChanged as distinctUntilChanged$1, asapScheduler, using, shareReplay as shareReplay$1, repeat, scan as scan$1, pipe, iif, startWith as startWith$1, concatWith, count, toArray as toArray$2, reduce as reduce$1, switchScan, delayWhen, first as first$1, zipWith, takeWhile, debounceTime as debounceTime$1, find, zip, isObservable, retry, debounce as debounce$1, delay as delay$1, timeout as timeout$1, connect, forkJoin } from "rxjs";
15
15
  import { catchError, tap, switchMap, map, scan, distinctUntilChanged, startWith, shareReplay, mergeMap, filter, share, mergeMapTo, takeUntil, take as take$1, publishReplay, refCount, withLatestFrom, concatMap as concatMap$1, groupBy as groupBy$1, throttleTime, last, mergeAll, toArray as toArray$1, distinct, skip as skip$1, first, debounceTime, auditTime, switchMapTo, delay, reduce as reduce$2, finalize as finalize$1, expand, mapTo, debounce as debounce$2, retry as retry$1, timeout } from "rxjs/operators";
16
16
  import { useObservable, useObservableEvent } from "react-rx";
17
17
  import { getVersionId, getDraftId, getPublishedId, isPublishedId, isDraftId, getVersionFromId, isVersionId, DRAFTS_FOLDER } from "@sanity/client/csm";
@@ -10161,15 +10161,25 @@ const REFETCH_INTERVAL = 300 * 1e3, getProjectOrg = memoize((client) => client.o
10161
10161
  includeFeatures: "false",
10162
10162
  includeOrganization: "true"
10163
10163
  }
10164
- }).pipe(catchError$1(() => of(null)), repeat({
10165
- delay: REFETCH_INTERVAL
10166
- }), share$1({
10167
- connector: () => new ReplaySubject(1),
10168
- resetOnComplete: !0,
10169
- // delay unsubscriptions a little to keep the observable active
10170
- // during React effect setup and teardown due to rapidly changing deps
10171
- resetOnRefCountZero: () => timer(1e3)
10172
- })), (client) => `${client.config().projectId}-${client.config().dataset}`);
10164
+ }).pipe(
10165
+ catchError$1(() => of(null)),
10166
+ repeat({
10167
+ delay: REFETCH_INTERVAL
10168
+ }),
10169
+ // A transient refetch failure emits `null`. Retain the last known
10170
+ // project data so a failed refetch does not clobber a previously-good
10171
+ // organization id (which would strip org_id from telemetry events
10172
+ // flushed during the refetch window). See SAPP-3824.
10173
+ scan$1((lastKnown, next) => next ?? lastKnown, null),
10174
+ distinctUntilChanged$1(),
10175
+ share$1({
10176
+ connector: () => new ReplaySubject(1),
10177
+ resetOnComplete: !0,
10178
+ // delay unsubscriptions a little to keep the observable active
10179
+ // during React effect setup and teardown due to rapidly changing deps
10180
+ resetOnRefCountZero: () => timer(1e3)
10181
+ })
10182
+ ), (client) => `${client.config().projectId}-${client.config().dataset}`);
10173
10183
  function createProjectStore(context) {
10174
10184
  const {
10175
10185
  client