sanity 5.30.1-next.7 → 5.31.0-next.10

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.
@@ -7,14 +7,14 @@ import { FlatNamespace, KeyPrefix, Namespace, TFunction, TFunction as TFunction$
7
7
  import { MonoTypeOperatorFunction, Observable, OperatorFunction, Subject } from "rxjs";
8
8
  import { IntentLinkProps, IntentParameters, Router, RouterState, SearchParam } from "sanity/router";
9
9
  import { ScrollToOptions } from "@tanstack/react-virtual";
10
- import { DRAFTS_FOLDER, DraftId, PublishedId, VERSION_FOLDER, getDraftId, getPublishedId, getVersionFromId, getVersionId, isDraftId, isPublishedId, isVersionId } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+client@7.22.0/node_modules/@sanity/client/dist/csm.js";
10
+ import { DRAFTS_FOLDER, DraftId, PublishedId, VERSION_FOLDER, getDraftId, getPublishedId, getVersionFromId, getVersionId, isDraftId, isPublishedId, isVersionId } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+client@7.22.1/node_modules/@sanity/client/dist/csm.js";
11
11
  import { Mutation } from "@sanity/mutator";
12
12
  import { CanvasResource, FrameMessages, MediaResource, StudioResource, WindowMessages } from "@sanity/message-protocol";
13
13
  import { DocumentHandle } from "@sanity/sdk";
14
14
  import { DocumentDivergencesContextValue, DocumentLimitUpsellContextValue, FeedbackContext, FeedbackContextValue, FieldActionsContextValue, HoveredFieldContextValue, LocaleContextValue, SchedulesContext, SingleDocReleaseContextValue } from "sanity/_singletons";
15
15
  import { FallbackNs } from "react-i18next";
16
16
  import { BrowserHistory, HashHistory, History, MemoryHistory } from "history";
17
- import { RootTheme, ThemeColorSchemeKey as ThemeColorSchemeKey$1 } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+ui@3.1.14_@emotion+is-prop-valid@1.4.0_@sanity+styled-components@6.1.24_react-d_528b1f4be90cc37f64b725ea29f6a91b/node_modules/@sanity/ui/dist/theme.mjs";
17
+ import { RootTheme, ThemeColorSchemeKey as ThemeColorSchemeKey$1 } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+ui@3.2.0_@emotion+is-prop-valid@1.4.0_@sanity+styled-components@6.1.24_react-do_657cee7e7fa6b581f13603982324de3e/node_modules/@sanity/ui/dist/theme.mjs";
18
18
  import { EditorSelection, HotkeyOptions, InvalidValueResolution, OnCopyFn, OnPasteResultOrPromise, PasteData, Patch, PortableTextEditor, RangeDecoration, RangeDecorationOnMovedDetails, RenderBlockFunction } from "@portabletext/editor";
19
19
  import { ColorHueKey, ColorTintKey, ColorTints } from "@sanity/color";
20
20
  import { Subscriber } from "nano-pubsub";
@@ -306,10 +306,22 @@ type LoginComponentProps = {
306
306
  projectId: string; /** @deprecated use redirectPath instead */
307
307
  basePath: string;
308
308
  redirectPath?: string;
309
+ /**
310
+ * Invoked when the user chooses to switch workspaces from the login screen
311
+ * (e.g. when the active workspace has no usable login providers). Only
312
+ * provided when more than one workspace is available to switch to.
313
+ */
314
+ onChooseAnotherWorkspace?: () => void;
309
315
  } | {
310
316
  projectId: string;
311
317
  redirectPath: string; /** @deprecated use redirectPath instead */
312
318
  basePath?: string;
319
+ /**
320
+ * Invoked when the user chooses to switch workspaces from the login screen
321
+ * (e.g. when the active workspace has no usable login providers). Only
322
+ * provided when more than one workspace is available to switch to.
323
+ */
324
+ onChooseAnotherWorkspace?: () => void;
313
325
  };
314
326
  /**
315
327
  * Result returned from `handleCallbackUrl` describing what happened during
@@ -3,7 +3,7 @@ import { SanityDocument } from "@sanity/types";
3
3
  import { ClientPerspective, StackablePerspective } from "@sanity/client";
4
4
  import { Observable } from "rxjs";
5
5
  import { DocumentStore, DocumentValuePermission, PermissionCheckResult, SanityClient as SanityClient$1 } from "sanity";
6
- import { PreviewUrlResolver } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+preview-url-secret@4.0.6_@sanity+client@7.22.0/node_modules/@sanity/preview-url-secret/dist/define-preview-url.js";
6
+ import { PreviewUrlResolver } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+preview-url-secret@4.0.7_@sanity+client@7.22.1/node_modules/@sanity/preview-url-secret/dist/define-preview-url.js";
7
7
  import { ActorRefFrom } from "xstate";
8
8
  interface Context$2 {
9
9
  url: URL | null;
@@ -5,7 +5,7 @@ import { defineLocaleResourceBundle, DEFAULT_STUDIO_CLIENT_OPTIONS, getPublished
5
5
  import { StructureToolContext } from "sanity/_singletons";
6
6
  import { SortIcon, AddIcon, StackCompactIcon, StackIcon } from "@sanity/icons";
7
7
  import camelCase from "lodash-es/camelCase.js";
8
- import speakingurl from "speakingurl";
8
+ import getSlug from "speakingurl";
9
9
  import { isValidElementType } from "react-is";
10
10
  import uniqueId from "lodash-es/uniqueId.js";
11
11
  import uniq from "lodash-es/uniq.js";
@@ -16,7 +16,7 @@ import startCase from "lodash-es/startCase.js";
16
16
  const structureLocaleNamespace = "structure", structureUsEnglishLocaleBundle = defineLocaleResourceBundle({
17
17
  locale: "en-US",
18
18
  namespace: structureLocaleNamespace,
19
- resources: () => import("./resources8.js")
19
+ resources: () => import("./resources.js")
20
20
  });
21
21
  class SerializeError extends Error {
22
22
  constructor(message, parentPath, pathSegment, hint) {
@@ -406,7 +406,7 @@ function getStructureNodeId(title, id) {
406
406
  if (id)
407
407
  return id;
408
408
  const camelCased = camelCase(title);
409
- return disallowedPattern.test(camelCased) ? camelCase(speakingurl(title)) : camelCased;
409
+ return disallowedPattern.test(camelCased) ? camelCase(getSlug(title)) : camelCased;
410
410
  }
411
411
  class ComponentBuilder {
412
412
  /** component builder option object */