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.
package/lib/_chunks-cjs/pane.js
CHANGED
@@ -4603,7 +4603,7 @@ const DISABLED_REASON_KEY = {
|
|
4603
4603
|
UnpublishAction.action = "unpublish";
|
4604
4604
|
UnpublishAction.displayName = "UnpublishAction";
|
4605
4605
|
const DocumentStatusBarActionsInner = React.memo(function(props) {
|
4606
|
-
const $ = reactCompilerRuntime.c(
|
4606
|
+
const $ = reactCompilerRuntime.c(37), {
|
4607
4607
|
disabled,
|
4608
4608
|
states
|
4609
4609
|
} = props, {
|
@@ -4611,6 +4611,8 @@ const DocumentStatusBarActionsInner = React.memo(function(props) {
|
|
4611
4611
|
} = sanity.useSource(), {
|
4612
4612
|
editState
|
4613
4613
|
} = useDocumentPane(), {
|
4614
|
+
params
|
4615
|
+
} = usePaneRouter(), showingRevision = !!params?.rev, {
|
4614
4616
|
selectedReleaseId
|
4615
4617
|
} = sanity.usePerspective();
|
4616
4618
|
let firstActionState, menuActionStates;
|
@@ -4639,23 +4641,26 @@ const DocumentStatusBarActionsInner = React.memo(function(props) {
|
|
4639
4641
|
t32
|
4640
4642
|
] }), $[8] = t22, $[9] = t32, $[10] = t42) : t42 = $[10], t0 = t42;
|
4641
4643
|
}
|
4642
|
-
const tooltipContent = t0
|
4644
|
+
const tooltipContent = t0;
|
4643
4645
|
let t1;
|
4644
|
-
$[11] !==
|
4645
|
-
const
|
4646
|
-
let
|
4647
|
-
$[
|
4646
|
+
$[11] !== editState?.liveEdit || $[12] !== firstActionState || $[13] !== selectedReleaseId || $[14] !== showingRevision ? (t1 = showingRevision ? !!firstActionState : selectedReleaseId ? firstActionState && !sanity.isSanityDefinedAction(firstActionState) : firstActionState && !editState?.liveEdit, $[11] = editState?.liveEdit, $[12] = firstActionState, $[13] = selectedReleaseId, $[14] = showingRevision, $[15] = t1) : t1 = $[15];
|
4647
|
+
const showFirstActionButton = t1;
|
4648
|
+
let t2;
|
4649
|
+
$[16] !== firstActionState || $[17] !== menuActionStates || $[18] !== showFirstActionButton ? (t2 = showFirstActionButton ? menuActionStates : [firstActionState, ...menuActionStates], $[16] = firstActionState, $[17] = menuActionStates, $[18] = showFirstActionButton, $[19] = t2) : t2 = $[19];
|
4650
|
+
const sideMenuItems = t2, t3 = __internal_tasks && __internal_tasks.footerAction;
|
4648
4651
|
let t4;
|
4649
|
-
$[20] !== disabled || $[21] !==
|
4652
|
+
$[20] !== disabled || $[21] !== firstActionState || $[22] !== showFirstActionButton || $[23] !== tooltipContent ? (t4 = showFirstActionButton && /* @__PURE__ */ jsxRuntime.jsx(ui.LayerProvider, { zOffset: 200, children: /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupProvider.Tooltip, { disabled: !tooltipContent, content: tooltipContent, placement: "top", children: /* @__PURE__ */ jsxRuntime.jsx(ui.Stack, { children: /* @__PURE__ */ jsxRuntime.jsx(TooltipDelayGroupProvider.Button, { "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];
|
4650
4653
|
let t5;
|
4651
|
-
$[
|
4654
|
+
$[25] !== disabled || $[26] !== sideMenuItems ? (t5 = sideMenuItems.length > 0 && /* @__PURE__ */ jsxRuntime.jsx(ActionMenuButton, { actionStates: sideMenuItems, disabled }), $[25] = disabled, $[26] = sideMenuItems, $[27] = t5) : t5 = $[27];
|
4652
4655
|
let t6;
|
4653
|
-
|
4654
|
-
|
4656
|
+
$[28] !== buttonElement || $[29] !== firstActionState || $[30] !== showFirstActionButton ? (t6 = showFirstActionButton && firstActionState && firstActionState.dialog && /* @__PURE__ */ jsxRuntime.jsx(ActionStateDialog, { dialog: firstActionState.dialog, referenceElement: buttonElement }), $[28] = buttonElement, $[29] = firstActionState, $[30] = showFirstActionButton, $[31] = t6) : t6 = $[31];
|
4657
|
+
let t7;
|
4658
|
+
return $[32] !== t3 || $[33] !== t4 || $[34] !== t5 || $[35] !== t6 ? (t7 = /* @__PURE__ */ jsxRuntime.jsxs(ui.Flex, { align: "center", gap: 1, children: [
|
4655
4659
|
t3,
|
4656
4660
|
t4,
|
4657
|
-
t5
|
4658
|
-
|
4661
|
+
t5,
|
4662
|
+
t6
|
4663
|
+
] }), $[32] = t3, $[33] = t4, $[34] = t5, $[35] = t6, $[36] = t7) : t7 = $[36], t7;
|
4659
4664
|
}), DocumentStatusBarActions = React.memo(function() {
|
4660
4665
|
const $ = reactCompilerRuntime.c(14), {
|
4661
4666
|
actions: allActions,
|