sanity 4.7.0-next.53 → 4.7.0-next.55

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.
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
- const SANITY_VERSION = "4.7.0-next.53+8a1f41fad5";
2
+ const SANITY_VERSION = "4.7.0-next.55+d71f9d349f";
3
3
  exports.SANITY_VERSION = SANITY_VERSION;
4
4
  //# sourceMappingURL=version.js.map
@@ -4625,7 +4625,7 @@ const DISABLED_REASON_KEY = {
4625
4625
  UnpublishAction.action = "unpublish";
4626
4626
  UnpublishAction.displayName = "UnpublishAction";
4627
4627
  const DocumentStatusBarActionsInner = memo(function(props) {
4628
- const $ = c(32), {
4628
+ const $ = c(37), {
4629
4629
  disabled,
4630
4630
  states
4631
4631
  } = props, {
@@ -4633,6 +4633,8 @@ const DocumentStatusBarActionsInner = memo(function(props) {
4633
4633
  } = useSource(), {
4634
4634
  editState
4635
4635
  } = useDocumentPane(), {
4636
+ params
4637
+ } = usePaneRouter(), showingRevision = !!params?.rev, {
4636
4638
  selectedReleaseId
4637
4639
  } = usePerspective();
4638
4640
  let firstActionState, menuActionStates;
@@ -4661,23 +4663,26 @@ const DocumentStatusBarActionsInner = memo(function(props) {
4661
4663
  t32
4662
4664
  ] }), $[8] = t22, $[9] = t32, $[10] = t42) : t42 = $[10], t0 = t42;
4663
4665
  }
4664
- const tooltipContent = t0, showFirstActionButton = selectedReleaseId ? firstActionState && !isSanityDefinedAction(firstActionState) : firstActionState && !editState?.liveEdit;
4666
+ const tooltipContent = t0;
4665
4667
  let t1;
4666
- $[11] !== firstActionState || $[12] !== menuActionStates || $[13] !== showFirstActionButton ? (t1 = showFirstActionButton ? menuActionStates : [firstActionState, ...menuActionStates], $[11] = firstActionState, $[12] = menuActionStates, $[13] = showFirstActionButton, $[14] = t1) : t1 = $[14];
4667
- const sideMenuItems = t1, t2 = __internal_tasks && __internal_tasks.footerAction;
4668
- let t3;
4669
- $[15] !== disabled || $[16] !== firstActionState || $[17] !== showFirstActionButton || $[18] !== tooltipContent ? (t3 = showFirstActionButton && /* @__PURE__ */ jsx(LayerProvider, { zOffset: 200, children: /* @__PURE__ */ jsx(Tooltip, { disabled: !tooltipContent, content: tooltipContent, placement: "top", children: /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsx(Button$1, { "data-testid": `action-${toLowerCaseNoSpaces(firstActionState.label)}`, disabled: disabled || !!firstActionState.disabled, icon: firstActionState.icon, onClick: firstActionState.onHandle, ref: setButtonElement, text: firstActionState.label, tone: firstActionState.tone || "primary" }) }) }) }), $[15] = disabled, $[16] = firstActionState, $[17] = showFirstActionButton, $[18] = tooltipContent, $[19] = t3) : t3 = $[19];
4668
+ $[11] !== editState?.liveEdit || $[12] !== firstActionState || $[13] !== selectedReleaseId || $[14] !== showingRevision ? (t1 = showingRevision ? !!firstActionState : selectedReleaseId ? firstActionState && !isSanityDefinedAction(firstActionState) : firstActionState && !editState?.liveEdit, $[11] = editState?.liveEdit, $[12] = firstActionState, $[13] = selectedReleaseId, $[14] = showingRevision, $[15] = t1) : t1 = $[15];
4669
+ const showFirstActionButton = t1;
4670
+ let t2;
4671
+ $[16] !== firstActionState || $[17] !== menuActionStates || $[18] !== showFirstActionButton ? (t2 = showFirstActionButton ? menuActionStates : [firstActionState, ...menuActionStates], $[16] = firstActionState, $[17] = menuActionStates, $[18] = showFirstActionButton, $[19] = t2) : t2 = $[19];
4672
+ const sideMenuItems = t2, t3 = __internal_tasks && __internal_tasks.footerAction;
4670
4673
  let t4;
4671
- $[20] !== disabled || $[21] !== sideMenuItems ? (t4 = sideMenuItems.length > 0 && /* @__PURE__ */ jsx(ActionMenuButton, { actionStates: sideMenuItems, disabled }), $[20] = disabled, $[21] = sideMenuItems, $[22] = t4) : t4 = $[22];
4674
+ $[20] !== disabled || $[21] !== firstActionState || $[22] !== showFirstActionButton || $[23] !== tooltipContent ? (t4 = showFirstActionButton && /* @__PURE__ */ jsx(LayerProvider, { zOffset: 200, children: /* @__PURE__ */ jsx(Tooltip, { disabled: !tooltipContent, content: tooltipContent, placement: "top", children: /* @__PURE__ */ jsx(Stack, { children: /* @__PURE__ */ jsx(Button$1, { "data-testid": `action-${toLowerCaseNoSpaces(firstActionState.label)}`, disabled: disabled || !!firstActionState.disabled, icon: firstActionState.icon, onClick: firstActionState.onHandle, ref: setButtonElement, text: firstActionState.label, tone: firstActionState.tone || "primary" }) }) }) }), $[20] = disabled, $[21] = firstActionState, $[22] = showFirstActionButton, $[23] = tooltipContent, $[24] = t4) : t4 = $[24];
4672
4675
  let t5;
4673
- $[23] !== buttonElement || $[24] !== firstActionState || $[25] !== showFirstActionButton ? (t5 = showFirstActionButton && firstActionState && firstActionState.dialog && /* @__PURE__ */ jsx(ActionStateDialog, { dialog: firstActionState.dialog, referenceElement: buttonElement }), $[23] = buttonElement, $[24] = firstActionState, $[25] = showFirstActionButton, $[26] = t5) : t5 = $[26];
4676
+ $[25] !== disabled || $[26] !== sideMenuItems ? (t5 = sideMenuItems.length > 0 && /* @__PURE__ */ jsx(ActionMenuButton, { actionStates: sideMenuItems, disabled }), $[25] = disabled, $[26] = sideMenuItems, $[27] = t5) : t5 = $[27];
4674
4677
  let t6;
4675
- return $[27] !== t2 || $[28] !== t3 || $[29] !== t4 || $[30] !== t5 ? (t6 = /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 1, children: [
4676
- t2,
4678
+ $[28] !== buttonElement || $[29] !== firstActionState || $[30] !== showFirstActionButton ? (t6 = showFirstActionButton && firstActionState && firstActionState.dialog && /* @__PURE__ */ jsx(ActionStateDialog, { dialog: firstActionState.dialog, referenceElement: buttonElement }), $[28] = buttonElement, $[29] = firstActionState, $[30] = showFirstActionButton, $[31] = t6) : t6 = $[31];
4679
+ let t7;
4680
+ return $[32] !== t3 || $[33] !== t4 || $[34] !== t5 || $[35] !== t6 ? (t7 = /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 1, children: [
4677
4681
  t3,
4678
4682
  t4,
4679
- t5
4680
- ] }), $[27] = t2, $[28] = t3, $[29] = t4, $[30] = t5, $[31] = t6) : t6 = $[31], t6;
4683
+ t5,
4684
+ t6
4685
+ ] }), $[32] = t3, $[33] = t4, $[34] = t5, $[35] = t6, $[36] = t7) : t7 = $[36], t7;
4681
4686
  }), DocumentStatusBarActions = memo(function() {
4682
4687
  const $ = c(14), {
4683
4688
  actions: allActions,