sanity 5.28.0-next.1 → 5.28.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.
@@ -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.5_@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.6_@sanity+client@7.22.0/node_modules/@sanity/preview-url-secret/dist/define-preview-url.js";
7
7
  import * as _$xstate from "xstate";
8
8
  import { ActorRefFrom } from "xstate";
9
9
  interface Context$2 {
@@ -1,4 +1,4 @@
1
- var version = "5.28.0-next.1+4b5e4bb96a";
1
+ var version = "5.28.0-next.10+9dea35af2b";
2
2
  let buildVersion;
3
3
  try {
4
4
  buildVersion = process.env.PKG_BUILD_VERSION;
@@ -7,7 +7,7 @@ try {
7
7
  try {
8
8
  buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
9
9
  // and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
10
- "5.28.0-next.1+4b5e4bb96a";
10
+ "5.28.0-next.10+9dea35af2b";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.js CHANGED
@@ -21393,14 +21393,14 @@ const NestedDialogOpened = defineEvent({
21393
21393
  name: "Removed Object in Array List",
21394
21394
  version: 1,
21395
21395
  description: "User removed a object from an array list via actions"
21396
- }), OpenedPortableTextEditorFullScreen = defineEvent({
21397
- name: "Opened Portable Text Editor Full Screen in Nested Object Dialog",
21396
+ }), NestedDialogEditorOpened = defineEvent({
21397
+ name: "Editor Opened",
21398
21398
  version: 1,
21399
- description: "User opened a portable text editor in full screen mode in a object dialog"
21400
- }), ClosedPortableTextEditorFullScreen = defineEvent({
21401
- name: "Closed Portable Text Editor Full Screen in Nested Object Dialog",
21399
+ description: "User opened a fullscreen Portable Text Editor inside a nested object dialog"
21400
+ }), NestedDialogEditorClosed = defineEvent({
21401
+ name: "Editor Closed",
21402
21402
  version: 1,
21403
- description: "User closed a portable text editor in full screen mode in a object dialog"
21403
+ description: "User closed a fullscreen Portable Text Editor inside a nested object dialog"
21404
21404
  });
21405
21405
  function useEnhancedObjectDialog() {
21406
21406
  return useContext(EnhancedObjectDialogContext);
@@ -34139,7 +34139,7 @@ function Compositor(props2) {
34139
34139
  return $[165] !== portal.element || $[166] !== portalElements || $[167] !== t31 ? (t32 = /* @__PURE__ */ jsx(SelectedAnnotationsProvider, { children: /* @__PURE__ */ jsx(PortalProvider, { __unstable_elements: portalElements, element: t17, children: t31 }) }), $[165] = portal.element, $[166] = portalElements, $[167] = t31, $[168] = t32) : t32 = $[168], t32;
34140
34140
  }
34141
34141
  function FullscreenPTEProvider(t0) {
34142
- const $ = c(17), {
34142
+ const $ = c(16), {
34143
34143
  children
34144
34144
  } = t0;
34145
34145
  let t1;
@@ -34151,29 +34151,39 @@ function FullscreenPTEProvider(t0) {
34151
34151
  $[1] !== fullscreenPaths ? (t2 = (path) => fullscreenPaths.find((savedPath) => savedPath === pathToString(path)) ?? void 0, $[1] = fullscreenPaths, $[2] = t2) : t2 = $[2];
34152
34152
  const getFullscreenPath = t2;
34153
34153
  let t3;
34154
- $[3] !== enhancedObjectDialogEnabled || $[4] !== fullscreenPaths || $[5] !== telemetry ? (t3 = (path_0, isFullscreen) => {
34155
- isFullscreen ? (telemetry.log(OpenedPortableTextEditorFullScreen, {
34156
- path: pathToString(path_0),
34157
- origin: enhancedObjectDialogEnabled ? "nested-object" : "default"
34158
- }), setFullscreenPaths([...fullscreenPaths, pathToString(path_0)])) : (telemetry.log(ClosedPortableTextEditorFullScreen, {
34159
- path: pathToString(path_0),
34160
- origin: enhancedObjectDialogEnabled ? "nested-object" : "default"
34161
- }), setFullscreenPaths(fullscreenPaths.filter((savedPath_0) => savedPath_0 !== pathToString(path_0))));
34162
- }, $[3] = enhancedObjectDialogEnabled, $[4] = fullscreenPaths, $[5] = telemetry, $[6] = t3) : t3 = $[6];
34154
+ $[3] !== enhancedObjectDialogEnabled || $[4] !== telemetry ? (t3 = (path_0, isFullscreen) => {
34155
+ const pathString = pathToString(path_0);
34156
+ setFullscreenPaths((currentPaths) => {
34157
+ const alreadyOpen = currentPaths.includes(pathString);
34158
+ return isFullscreen ? alreadyOpen ? currentPaths : (telemetry.log(NestedDialogEditorOpened, {
34159
+ path: pathString,
34160
+ origin: enhancedObjectDialogEnabled ? "nested-object" : "default",
34161
+ editor_type: "pte",
34162
+ fullscreen: !0,
34163
+ location: "nested_object_dialog"
34164
+ }), [...currentPaths, pathString]) : alreadyOpen ? (telemetry.log(NestedDialogEditorClosed, {
34165
+ path: pathString,
34166
+ origin: enhancedObjectDialogEnabled ? "nested-object" : "default",
34167
+ editor_type: "pte",
34168
+ fullscreen: !0,
34169
+ location: "nested_object_dialog"
34170
+ }), currentPaths.filter((savedPath_0) => savedPath_0 !== pathString)) : currentPaths;
34171
+ });
34172
+ }, $[3] = enhancedObjectDialogEnabled, $[4] = telemetry, $[5] = t3) : t3 = $[5];
34163
34173
  const setFullscreenPath = t3;
34164
34174
  let t4;
34165
- $[7] !== fullscreenPaths ? (t4 = () => fullscreenPaths.length > 0, $[7] = fullscreenPaths, $[8] = t4) : t4 = $[8];
34175
+ $[6] !== fullscreenPaths ? (t4 = () => fullscreenPaths.length > 0, $[6] = fullscreenPaths, $[7] = t4) : t4 = $[7];
34166
34176
  const hasAnyFullscreen = t4;
34167
34177
  let t5;
34168
- $[9] !== fullscreenPaths || $[10] !== getFullscreenPath || $[11] !== hasAnyFullscreen || $[12] !== setFullscreenPath ? (t5 = {
34178
+ $[8] !== fullscreenPaths || $[9] !== getFullscreenPath || $[10] !== hasAnyFullscreen || $[11] !== setFullscreenPath ? (t5 = {
34169
34179
  getFullscreenPath,
34170
34180
  setFullscreenPath,
34171
34181
  hasAnyFullscreen,
34172
34182
  allFullscreenPaths: fullscreenPaths
34173
- }, $[9] = fullscreenPaths, $[10] = getFullscreenPath, $[11] = hasAnyFullscreen, $[12] = setFullscreenPath, $[13] = t5) : t5 = $[13];
34183
+ }, $[8] = fullscreenPaths, $[9] = getFullscreenPath, $[10] = hasAnyFullscreen, $[11] = setFullscreenPath, $[12] = t5) : t5 = $[12];
34174
34184
  const contextValue = t5;
34175
34185
  let t6;
34176
- return $[14] !== children || $[15] !== contextValue ? (t6 = /* @__PURE__ */ jsx(FullscreenPTEContext.Provider, { value: contextValue, children }), $[14] = children, $[15] = contextValue, $[16] = t6) : t6 = $[16], t6;
34186
+ return $[13] !== children || $[14] !== contextValue ? (t6 = /* @__PURE__ */ jsx(FullscreenPTEContext.Provider, { value: contextValue, children }), $[13] = children, $[14] = contextValue, $[15] = t6) : t6 = $[15], t6;
34177
34187
  }
34178
34188
  function useFullscreenPTE() {
34179
34189
  return useContext(FullscreenPTEContext);
@@ -67949,7 +67959,7 @@ const VideoField = (props2) => props2.renderDefault({
67949
67959
  version: 1,
67950
67960
  description: "User confirmed that they want the Studio document unlinked"
67951
67961
  }), CanvasOpened = defineEvent({
67952
- name: "Canvas Opened from studio",
67962
+ name: "Canvas Opened",
67953
67963
  version: 1,
67954
67964
  description: 'User clicked "Edit in Canvas"'
67955
67965
  }), getDiffTypesCount = (diffs) => diffs.reduce((acc, diff) => (acc[diff.type] = (acc[diff.type] || 0) + 1, acc), {});
@@ -67969,7 +67979,8 @@ function useCanvasTelemetry() {
67969
67979
  unlinkCtaClicked: () => telemetry.log(CanvasUnlinkCtaClicked),
67970
67980
  unlinkApproved: () => telemetry.log(CanvasUnlinkApproved),
67971
67981
  canvasOpened: (origin_0) => telemetry.log(CanvasOpened, {
67972
- origin: origin_0
67982
+ origin: origin_0,
67983
+ source: "studio"
67973
67984
  })
67974
67985
  }, $[0] = telemetry, $[1] = t0) : t0 = $[1], t0;
67975
67986
  }