sanity 6.5.1-next.5 → 6.5.1-next.7

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,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
2
2
  import { c } from "react/compiler-runtime";
3
- import { Badge, Button, Box, Text, Flex, Menu, MenuItem, Stack, DialogProvider, PortalProvider, BoundaryElementProvider, Container as Container$1, Card, useToast, Layer, MenuDivider, TextSkeleton, useElementRect, LayerProvider, _raf2, rem, TextInput, Code, TabList, TabPanel, useClickOutsideEvent, Heading, Inline, Spinner, focusFirstDescendant, usePortal, Dialog as Dialog$1, Popover as Popover$1, useLayer, useGlobalKeyDown, AvatarStack, Skeleton } from "@sanity/ui";
3
+ import { Badge, Button, Box, Text, Flex, Menu, MenuItem, Stack, DialogProvider, PortalProvider, BoundaryElementProvider, Container as Container$1, Card, useToast, Layer, MenuDivider, Label, TextSkeleton, useElementRect, LayerProvider, _raf2, rem, TextInput, Code, TabList, TabPanel, useClickOutsideEvent, Heading, Inline, Spinner, focusFirstDescendant, usePortal, Dialog as Dialog$1, Popover as Popover$1, useLayer, useGlobalKeyDown, AvatarStack, Skeleton } from "@sanity/ui";
4
4
  import { useRef, useEffect, forwardRef, useState, useContext, useImperativeHandle, useLayoutEffect, useId, memo, Suspense, useEffectEvent, Fragment as Fragment$1, useDeferredValue, lazy, startTransition } from "react";
5
5
  import { ReviewChangesContext, CommentsEnabledContext, ReferenceInputOptionsContext, PaneLayoutContext, PaneContext, DocumentPaneContext, DocumentActionsStateContext, StructureToolContext, DocumentPaneInfoContext, PaneRouterContext, ResolvedPanesContext, EventsContext, DocumentChangeContext } from "sanity/_singletons";
6
6
  import { styled, css, keyframes } from "styled-components";
@@ -1122,7 +1122,7 @@ const MENU_GROUP_POPOVER_PROPS = {
1122
1122
  portal: !0
1123
1123
  };
1124
1124
  function PaneMenuButtonItem(props) {
1125
- const $ = c(35), {
1125
+ const $ = c(38), {
1126
1126
  disabled,
1127
1127
  isAfterGroup,
1128
1128
  node
@@ -1143,35 +1143,38 @@ function PaneMenuButtonItem(props) {
1143
1143
  let t13;
1144
1144
  $[4] !== isAfterGroup ? (t13 = isAfterGroup && /* @__PURE__ */ jsx(MenuDivider, {}), $[4] = isAfterGroup, $[5] = t13) : t13 = $[5];
1145
1145
  let t23;
1146
- $[6] !== disabled || $[7] !== node.children || $[8] !== node.disabled ? (t23 = node.children.map((child, childIndex) => /* @__PURE__ */ jsx(PaneMenuButtonItem, { disabled: disabled || !!node.disabled, isAfterGroup: node.children[childIndex - 1]?.type === "group", node: child }, child.key)), $[6] = disabled, $[7] = node.children, $[8] = node.disabled, $[9] = t23) : t23 = $[9];
1146
+ $[6] !== title ? (t23 = title && /* @__PURE__ */ jsx(Box, { padding: 3, paddingBottom: 2, children: /* @__PURE__ */ jsx(Label, { size: 1, children: title }) }), $[6] = title, $[7] = t23) : t23 = $[7];
1147
1147
  let t33;
1148
- return $[10] !== t13 || $[11] !== t23 ? (t33 = /* @__PURE__ */ jsxs(Fragment, { children: [
1148
+ $[8] !== disabled || $[9] !== node.children || $[10] !== node.disabled ? (t33 = node.children.map((child, childIndex) => /* @__PURE__ */ jsx(PaneMenuButtonItem, { disabled: disabled || !!node.disabled, isAfterGroup: node.children[childIndex - 1]?.type === "group", node: child }, child.key)), $[8] = disabled, $[9] = node.children, $[10] = node.disabled, $[11] = t33) : t33 = $[11];
1149
+ let t42;
1150
+ return $[12] !== t13 || $[13] !== t23 || $[14] !== t33 ? (t42 = /* @__PURE__ */ jsxs(Fragment, { children: [
1149
1151
  t13,
1150
- t23
1151
- ] }), $[10] = t13, $[11] = t23, $[12] = t33) : t33 = $[12], t33;
1152
+ t23,
1153
+ t33
1154
+ ] }), $[12] = t13, $[13] = t23, $[14] = t33, $[15] = t42) : t42 = $[15], t42;
1152
1155
  }
1153
1156
  let t12;
1154
- $[13] !== isAfterGroup ? (t12 = isAfterGroup && /* @__PURE__ */ jsx(MenuDivider, {}), $[13] = isAfterGroup, $[14] = t12) : t12 = $[14];
1157
+ $[16] !== isAfterGroup ? (t12 = isAfterGroup && /* @__PURE__ */ jsx(MenuDivider, {}), $[16] = isAfterGroup, $[17] = t12) : t12 = $[17];
1155
1158
  const t22 = node.icon;
1156
1159
  let t32;
1157
- $[15] !== disabled || $[16] !== node.children || $[17] !== node.disabled ? (t32 = node.children.map((child_0, childIndex_0) => /* @__PURE__ */ jsx(PaneMenuButtonItem, { disabled: disabled || !!node.disabled, isAfterGroup: node.children[childIndex_0 - 1]?.type === "group", node: child_0 }, child_0.key)), $[15] = disabled, $[16] = node.children, $[17] = node.disabled, $[18] = t32) : t32 = $[18];
1160
+ $[18] !== disabled || $[19] !== node.children || $[20] !== node.disabled ? (t32 = node.children.map((child_0, childIndex_0) => /* @__PURE__ */ jsx(PaneMenuButtonItem, { disabled: disabled || !!node.disabled, isAfterGroup: node.children[childIndex_0 - 1]?.type === "group", node: child_0 }, child_0.key)), $[18] = disabled, $[19] = node.children, $[20] = node.disabled, $[21] = t32) : t32 = $[21];
1158
1161
  let t4;
1159
- $[19] !== disabled || $[20] !== node.icon || $[21] !== t32 || $[22] !== title ? (t4 = /* @__PURE__ */ jsx(MenuGroup, { disabled, icon: t22, popover: MENU_GROUP_POPOVER_PROPS, text: title, children: t32 }), $[19] = disabled, $[20] = node.icon, $[21] = t32, $[22] = title, $[23] = t4) : t4 = $[23];
1162
+ $[22] !== disabled || $[23] !== node.icon || $[24] !== t32 || $[25] !== title ? (t4 = /* @__PURE__ */ jsx(MenuGroup, { disabled, icon: t22, popover: MENU_GROUP_POPOVER_PROPS, text: title, children: t32 }), $[22] = disabled, $[23] = node.icon, $[24] = t32, $[25] = title, $[26] = t4) : t4 = $[26];
1160
1163
  let t5;
1161
- return $[24] !== t12 || $[25] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Fragment, { children: [
1164
+ return $[27] !== t12 || $[28] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Fragment, { children: [
1162
1165
  t12,
1163
1166
  t4
1164
- ] }), $[24] = t12, $[25] = t4, $[26] = t5) : t5 = $[26], t5;
1167
+ ] }), $[27] = t12, $[28] = t4, $[29] = t5) : t5 = $[29], t5;
1165
1168
  }
1166
1169
  let t1;
1167
- $[27] !== isAfterGroup ? (t1 = isAfterGroup && /* @__PURE__ */ jsx(MenuDivider, {}), $[27] = isAfterGroup, $[28] = t1) : t1 = $[28];
1170
+ $[30] !== isAfterGroup ? (t1 = isAfterGroup && /* @__PURE__ */ jsx(MenuDivider, {}), $[30] = isAfterGroup, $[31] = t1) : t1 = $[31];
1168
1171
  let t2;
1169
- $[29] !== disabled || $[30] !== node ? (t2 = /* @__PURE__ */ jsx(PaneContextMenuItemResolver, { disabled, node }), $[29] = disabled, $[30] = node, $[31] = t2) : t2 = $[31];
1172
+ $[32] !== disabled || $[33] !== node ? (t2 = /* @__PURE__ */ jsx(PaneContextMenuItemResolver, { disabled, node }), $[32] = disabled, $[33] = node, $[34] = t2) : t2 = $[34];
1170
1173
  let t3;
1171
- return $[32] !== t1 || $[33] !== t2 ? (t3 = /* @__PURE__ */ jsxs(Fragment, { children: [
1174
+ return $[35] !== t1 || $[36] !== t2 ? (t3 = /* @__PURE__ */ jsxs(Fragment, { children: [
1172
1175
  t1,
1173
1176
  t2
1174
- ] }), $[32] = t1, $[33] = t2, $[34] = t3) : t3 = $[34], t3;
1177
+ ] }), $[35] = t1, $[36] = t2, $[37] = t3) : t3 = $[37], t3;
1175
1178
  }
1176
1179
  function PaneContextMenuItemResolver(props) {
1177
1180
  const $ = c(5), {