sanity 5.2.0-next.79 → 5.2.0-next.82

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
- var version = "5.2.0-next.79+7f5bae1a9b", peerDependencies = {
1
+ var version = "5.2.0-next.82+26e2519a62", peerDependencies = {
2
2
  "styled-components": "^6.1.15"
3
3
  };
4
4
  export {
@@ -7990,7 +7990,7 @@ const DocumentEventsPane = (props) => {
7990
7990
  $[9] !== options.id ? (t32 = getPublishedId(options.id), $[9] = options.id, $[10] = t32) : t32 = $[10], t2 = t32;
7991
7991
  break bb0;
7992
7992
  }
7993
- if (selectedReleaseId) {
7993
+ if (selectedPerspectiveName.length !== 0) {
7994
7994
  let t32;
7995
7995
  $[11] !== options.id || $[12] !== selectedPerspectiveName ? (t32 = getVersionId(options.id, selectedPerspectiveName), $[11] = options.id, $[12] = selectedPerspectiveName, $[13] = t32) : t32 = $[13], t2 = t32;
7996
7996
  break bb0;
@@ -12253,62 +12253,63 @@ function ChangesTabs(props) {
12253
12253
  changesInspectorTab: tab,
12254
12254
  since: tab === "history" ? void 0 : params?.since
12255
12255
  }), $[2] = params, $[3] = setParams, $[4] = t1) : t1 = $[4];
12256
- const setPaneRouterTab = t1;
12257
- let t2;
12258
- $[5] !== selectedPerspective || $[6] !== t ? (t2 = isReleaseDocument(selectedPerspective) ? selectedPerspective.metadata.title : t(selectedPerspective === "drafts" ? "compare-versions.status.draft" : "compare-versions.status.published"), $[5] = selectedPerspective, $[6] = t, $[7] = t2) : t2 = $[7];
12259
- const perspectiveName2 = t2, t3 = isReady ? "" : void 0;
12256
+ const setPaneRouterTab = t1, t2 = isReady ? "" : void 0;
12257
+ let t3;
12258
+ $[5] !== t ? (t3 = t("changes.tab.history"), $[5] = t, $[6] = t3) : t3 = $[6];
12260
12259
  let t4;
12261
- $[8] !== t ? (t4 = t("changes.tab.history"), $[8] = t, $[9] = t4) : t4 = $[9];
12262
- let t5;
12263
- $[10] !== setPaneRouterTab ? (t5 = () => setPaneRouterTab("history"), $[10] = setPaneRouterTab, $[11] = t5) : t5 = $[11];
12264
- const t6 = paneRouterTab === "history";
12260
+ $[7] !== setPaneRouterTab ? (t4 = () => setPaneRouterTab("history"), $[7] = setPaneRouterTab, $[8] = t4) : t4 = $[8];
12261
+ const t5 = paneRouterTab === "history";
12262
+ let t6;
12263
+ $[9] !== t3 || $[10] !== t4 || $[11] !== t5 ? (t6 = /* @__PURE__ */ jsx(Tab, { "aria-controls": "history-panel", id: "history-tab", label: t3, onClick: t4, selected: t5 }), $[9] = t3, $[10] = t4, $[11] = t5, $[12] = t6) : t6 = $[12];
12265
12264
  let t7;
12266
- $[12] !== t4 || $[13] !== t5 || $[14] !== t6 ? (t7 = /* @__PURE__ */ jsx(Tab, { "aria-controls": "history-panel", id: "history-tab", label: t4, onClick: t5, selected: t6 }), $[12] = t4, $[13] = t5, $[14] = t6, $[15] = t7) : t7 = $[15];
12265
+ $[13] !== t ? (t7 = t("changes.tab.review-changes"), $[13] = t, $[14] = t7) : t7 = $[14];
12267
12266
  let t8;
12268
- $[16] !== t ? (t8 = t("changes.tab.review-changes"), $[16] = t, $[17] = t8) : t8 = $[17];
12269
- let t9;
12270
- $[18] !== setPaneRouterTab ? (t9 = () => setPaneRouterTab("review"), $[18] = setPaneRouterTab, $[19] = t9) : t9 = $[19];
12271
- const t10 = paneRouterTab === "review";
12267
+ $[15] !== setPaneRouterTab ? (t8 = () => setPaneRouterTab("review"), $[15] = setPaneRouterTab, $[16] = t8) : t8 = $[16];
12268
+ const t9 = paneRouterTab === "review";
12269
+ let t10;
12270
+ $[17] !== t7 || $[18] !== t8 || $[19] !== t9 ? (t10 = /* @__PURE__ */ jsx(Tab, { "aria-controls": "review-changes-panel", id: "changes-tab", label: t7, onClick: t8, selected: t9 }), $[17] = t7, $[18] = t8, $[19] = t9, $[20] = t10) : t10 = $[20];
12272
12271
  let t11;
12273
- $[20] !== t10 || $[21] !== t8 || $[22] !== t9 ? (t11 = /* @__PURE__ */ jsx(Tab, { "aria-controls": "review-changes-panel", id: "changes-tab", label: t8, onClick: t9, selected: t10 }), $[20] = t10, $[21] = t8, $[22] = t9, $[23] = t11) : t11 = $[23];
12272
+ $[21] !== t10 || $[22] !== t6 ? (t11 = /* @__PURE__ */ jsxs(TabList, { space: 1, flex: 1, children: [
12273
+ t6,
12274
+ t10
12275
+ ] }), $[21] = t10, $[22] = t6, $[23] = t11) : t11 = $[23];
12274
12276
  let t12;
12275
- $[24] !== t11 || $[25] !== t7 ? (t12 = /* @__PURE__ */ jsxs(TabList, { space: 1, flex: 1, children: [
12276
- t7,
12277
- t11
12278
- ] }), $[24] = t11, $[25] = t7, $[26] = t12) : t12 = $[26];
12279
- let t13;
12280
- $[27] !== t ? (t13 = t("changes.action.close-label"), $[27] = t, $[28] = t13) : t13 = $[28];
12281
- const t14 = props.onClose;
12277
+ $[24] !== t ? (t12 = t("changes.action.close-label"), $[24] = t, $[25] = t12) : t12 = $[25];
12278
+ const t13 = props.onClose;
12279
+ let t14;
12280
+ $[26] !== t ? (t14 = t("document-inspector.close-button.tooltip"), $[26] = t, $[27] = t14) : t14 = $[27];
12282
12281
  let t15;
12283
- $[29] !== t ? (t15 = t("document-inspector.close-button.tooltip"), $[29] = t, $[30] = t15) : t15 = $[30];
12282
+ $[28] !== t14 ? (t15 = {
12283
+ content: t14
12284
+ }, $[28] = t14, $[29] = t15) : t15 = $[29];
12284
12285
  let t16;
12285
- $[31] !== t15 ? (t16 = {
12286
- content: t15
12287
- }, $[31] = t15, $[32] = t16) : t16 = $[32];
12286
+ $[30] !== props.onClose || $[31] !== t12 || $[32] !== t15 ? (t16 = /* @__PURE__ */ jsx(Button$1, { "aria-label": t12, icon: CloseIcon, mode: "bleed", onClick: t13, tooltipProps: t15 }), $[30] = props.onClose, $[31] = t12, $[32] = t15, $[33] = t16) : t16 = $[33];
12288
12287
  let t17;
12289
- $[33] !== props.onClose || $[34] !== t13 || $[35] !== t16 ? (t17 = /* @__PURE__ */ jsx(Button$1, { "aria-label": t13, icon: CloseIcon, mode: "bleed", onClick: t14, tooltipProps: t16 }), $[33] = props.onClose, $[34] = t13, $[35] = t16, $[36] = t17) : t17 = $[36];
12288
+ $[34] !== t11 || $[35] !== t16 ? (t17 = /* @__PURE__ */ jsx(Card, { paddingBottom: 1, children: /* @__PURE__ */ jsxs(Flex, { align: "center", padding: 3, gap: 2, children: [
12289
+ t11,
12290
+ t16
12291
+ ] }) }), $[34] = t11, $[35] = t16, $[36] = t17) : t17 = $[36];
12290
12292
  let t18;
12291
- $[37] !== t12 || $[38] !== t17 ? (t18 = /* @__PURE__ */ jsx(Card, { paddingBottom: 1, children: /* @__PURE__ */ jsxs(Flex, { align: "center", padding: 3, gap: 2, children: [
12292
- t12,
12293
- t17
12294
- ] }) }), $[37] = t12, $[38] = t17, $[39] = t18) : t18 = $[39];
12293
+ $[37] !== t ? (t18 = /* @__PURE__ */ jsx(Box, { flex: 1, padding: 1, children: /* @__PURE__ */ jsx(Text, { size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "changes.banner.tooltip" }) }) }), $[37] = t, $[38] = t18) : t18 = $[38];
12295
12294
  let t19;
12296
- $[40] !== t ? (t19 = /* @__PURE__ */ jsx(Box, { flex: 1, padding: 1, children: /* @__PURE__ */ jsx(Text, { size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "changes.banner.tooltip" }) }) }), $[40] = t, $[41] = t19) : t19 = $[41];
12295
+ $[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t19 = /* @__PURE__ */ jsx(Text, { size: 0, muted: !0, children: /* @__PURE__ */ jsx(InfoOutlineIcon, { fontSize: 1 }) }), $[39] = t19) : t19 = $[39];
12297
12296
  let t20;
12298
- $[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = /* @__PURE__ */ jsx(Text, { size: 0, muted: !0, children: /* @__PURE__ */ jsx(InfoOutlineIcon, { fontSize: 1 }) }), $[42] = t20) : t20 = $[42];
12297
+ $[40] !== parentRef || $[41] !== t18 ? (t20 = /* @__PURE__ */ jsx(Tooltip, { portal: !0, placement: "bottom-end", boundaryElement: parentRef, content: t18, children: t19 }), $[40] = parentRef, $[41] = t18, $[42] = t20) : t20 = $[42];
12299
12298
  let t21;
12300
- $[43] !== parentRef || $[44] !== t19 ? (t21 = /* @__PURE__ */ jsx(Tooltip, { portal: !0, placement: "bottom-end", boundaryElement: parentRef, content: t19, children: t20 }), $[43] = parentRef, $[44] = t19, $[45] = t21) : t21 = $[45];
12299
+ $[43] !== selectedPerspective || $[44] !== t ? (t21 = perspectiveLabel(selectedPerspective, {
12300
+ t
12301
+ }), $[43] = selectedPerspective, $[44] = t, $[45] = t21) : t21 = $[45];
12301
12302
  let t22;
12302
- $[46] !== perspectiveName2 ? (t22 = {
12303
- perspective: perspectiveName2
12304
- }, $[46] = perspectiveName2, $[47] = t22) : t22 = $[47];
12303
+ $[46] !== t21 ? (t22 = {
12304
+ perspective: t21
12305
+ }, $[46] = t21, $[47] = t22) : t22 = $[47];
12305
12306
  let t23;
12306
12307
  $[48] !== t || $[49] !== t22 ? (t23 = /* @__PURE__ */ jsx(Text, { size: 0, muted: !0, children: /* @__PURE__ */ jsx(Translate, { t, values: t22, i18nKey: "changes.banner.description" }) }), $[48] = t, $[49] = t22, $[50] = t23) : t23 = $[50];
12307
12308
  let t24;
12308
- $[51] !== t21 || $[52] !== t23 ? (t24 = /* @__PURE__ */ jsx(Card, { padding: 2, marginBottom: 3, marginX: 3, tone: "neutral", border: !0, radius: 3, children: /* @__PURE__ */ jsxs(Flex, { gap: 2, align: "flex-start", children: [
12309
- t21,
12309
+ $[51] !== t20 || $[52] !== t23 ? (t24 = /* @__PURE__ */ jsx(Card, { padding: 2, marginBottom: 3, marginX: 3, tone: "neutral", border: !0, radius: 3, children: /* @__PURE__ */ jsxs(Flex, { gap: 2, align: "flex-start", children: [
12310
+ t20,
12310
12311
  t23
12311
- ] }) }), $[51] = t21, $[52] = t23, $[53] = t24) : t24 = $[53];
12312
+ ] }) }), $[51] = t20, $[52] = t23, $[53] = t24) : t24 = $[53];
12312
12313
  const t25 = paneRouterTab !== "history";
12313
12314
  let t26;
12314
12315
  $[54] !== paneRouterTab || $[55] !== source.beta?.eventsAPI?.documents ? (t26 = source.beta?.eventsAPI?.documents ? /* @__PURE__ */ jsx(EventsSelector, { showList: paneRouterTab === "history" }) : /* @__PURE__ */ jsx(HistorySelector, { showList: paneRouterTab === "history" }), $[54] = paneRouterTab, $[55] = source.beta?.eventsAPI?.documents, $[56] = t26) : t26 = $[56];
@@ -12320,12 +12321,17 @@ function ChangesTabs(props) {
12320
12321
  let t30;
12321
12322
  $[63] !== t28 || $[64] !== t29 ? (t30 = /* @__PURE__ */ jsx(TabPanel, { "aria-labelledby": "review-tab", hidden: t28, id: "review-panel", height: "fill", children: t29 }), $[63] = t28, $[64] = t29, $[65] = t30) : t30 = $[65];
12322
12323
  let t31;
12323
- return $[66] !== t18 || $[67] !== t24 || $[68] !== t27 || $[69] !== t3 || $[70] !== t30 ? (t31 = /* @__PURE__ */ jsxs(FadeInFlex, { direction: "column", padding: 0, height: "fill", "data-ready": t3, ref: setParentRef, children: [
12324
- t18,
12324
+ return $[66] !== t17 || $[67] !== t2 || $[68] !== t24 || $[69] !== t27 || $[70] !== t30 ? (t31 = /* @__PURE__ */ jsxs(FadeInFlex, { direction: "column", padding: 0, height: "fill", "data-ready": t2, ref: setParentRef, children: [
12325
+ t17,
12325
12326
  t24,
12326
12327
  t27,
12327
12328
  t30
12328
- ] }), $[66] = t18, $[67] = t24, $[68] = t27, $[69] = t3, $[70] = t30, $[71] = t31) : t31 = $[71], t31;
12329
+ ] }), $[66] = t17, $[67] = t2, $[68] = t24, $[69] = t27, $[70] = t30, $[71] = t31) : t31 = $[71], t31;
12330
+ }
12331
+ function perspectiveLabel(perspective, {
12332
+ t
12333
+ }) {
12334
+ return isReleaseDocument(perspective) ? perspective.metadata.title ?? perspective._id : perspective === "drafts" ? t("compare-versions.status.draft") : perspective === "published" ? t("compare-versions.status.published") : perspective;
12329
12335
  }
12330
12336
  const changesInspector = {
12331
12337
  name: HISTORY_INSPECTOR_NAME,