sanity 6.4.0-next.41 → 6.4.0-next.46

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.
@@ -5410,7 +5410,7 @@ function useDiffAnnotationColor(diff, t0) {
5410
5410
  const CLIENT_OPTIONS$1 = {
5411
5411
  apiVersion: "v2025-02-19"
5412
5412
  };
5413
- function useAgentBundles() {
5413
+ function useAgentBundlesStore() {
5414
5414
  const $ = c(5), resourceCache = useResourceCache(), workspace = useWorkspace(), client = useClient(CLIENT_OPTIONS$1), projectStore = useProjectStore();
5415
5415
  let agentBundlesStore;
5416
5416
  return $[0] !== client || $[1] !== projectStore || $[2] !== resourceCache || $[3] !== workspace ? (agentBundlesStore = resourceCache.get({
@@ -5423,7 +5423,13 @@ function useAgentBundles() {
5423
5423
  namespace: "AgentBundlesStore",
5424
5424
  dependencies: [workspace],
5425
5425
  value: agentBundlesStore
5426
- }), $[0] = client, $[1] = projectStore, $[2] = resourceCache, $[3] = workspace, $[4] = agentBundlesStore) : agentBundlesStore = $[4], useObservable(agentBundlesStore.state$, INITIAL_STATE$d);
5426
+ }), $[0] = client, $[1] = projectStore, $[2] = resourceCache, $[3] = workspace, $[4] = agentBundlesStore) : agentBundlesStore = $[4], agentBundlesStore;
5427
+ }
5428
+ function useAgentBundles() {
5429
+ const {
5430
+ state$
5431
+ } = useAgentBundlesStore();
5432
+ return useObservable(state$, INITIAL_STATE$d);
5427
5433
  }
5428
5434
  const AGENT_TONE = "suggest";
5429
5435
  function useAgentVersionDisplay(versionIds, activeBundleId) {
@@ -83149,13 +83155,15 @@ const CommentsEnabledProvider = memo(function(props2) {
83149
83155
  let t2;
83150
83156
  return $[5] !== children || $[6] !== ctxValue ? (t2 = /* @__PURE__ */ jsx(CommentsSelectedPathContext.Provider, { value: ctxValue, children }), $[5] = children, $[6] = ctxValue, $[7] = t2) : t2 = $[7], t2;
83151
83157
  }), DocumentGroupInventoryAction = (t0) => {
83152
- const $ = c(25), {
83158
+ const $ = c(26), {
83153
83159
  children,
83154
83160
  documentId,
83155
83161
  portalElementName,
83156
83162
  isDocumentGroupInventoryActive,
83157
83163
  setIsDocumentGroupInventoryActive
83158
- } = t0, displayedRelease = useVersionRelease(documentId), buttonElement = useRef(null), popoverElement = useRef(null);
83164
+ } = t0, {
83165
+ t
83166
+ } = useTranslation(), displayedRelease = useVersionRelease(documentId), buttonElement = useRef(null), popoverElement = useRef(null);
83159
83167
  let t1;
83160
83168
  $[0] !== documentId ? (t1 = {
83161
83169
  documentId
@@ -83177,21 +83185,27 @@ const CommentsEnabledProvider = memo(function(props2) {
83177
83185
  return null;
83178
83186
  const t5 = displayedRelease?.release;
83179
83187
  let t6;
83180
- $[7] !== t5 ? (t6 = variantLabel(t5), $[7] = t5, $[8] = t6) : t6 = $[8];
83188
+ $[7] !== t || $[8] !== t5 ? (t6 = variantLabel({
83189
+ perspective: t5,
83190
+ t
83191
+ }), $[7] = t, $[8] = t5, $[9] = t6) : t6 = $[9];
83181
83192
  let t7;
83182
- $[9] !== isDocumentGroupInventoryActive || $[10] !== setIsDocumentGroupInventoryActive ? (t7 = () => setIsDocumentGroupInventoryActive(!isDocumentGroupInventoryActive), $[9] = isDocumentGroupInventoryActive, $[10] = setIsDocumentGroupInventoryActive, $[11] = t7) : t7 = $[11];
83193
+ $[10] !== isDocumentGroupInventoryActive || $[11] !== setIsDocumentGroupInventoryActive ? (t7 = () => setIsDocumentGroupInventoryActive(!isDocumentGroupInventoryActive), $[10] = isDocumentGroupInventoryActive, $[11] = setIsDocumentGroupInventoryActive, $[12] = t7) : t7 = $[12];
83183
83194
  let t8;
83184
- $[12] !== displayedRelease.release ? (t8 = /* @__PURE__ */ jsx(VariantIcon, { perspective: displayedRelease.release }), $[12] = displayedRelease.release, $[13] = t8) : t8 = $[13];
83195
+ $[13] !== displayedRelease.release ? (t8 = /* @__PURE__ */ jsx(VariantIcon, { perspective: displayedRelease.release }), $[13] = displayedRelease.release, $[14] = t8) : t8 = $[14];
83185
83196
  const t9 = isDocumentGroupInventoryActive ? ChevronDownIcon : ChevronUpIcon;
83186
83197
  let t10;
83187
- $[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = {}, $[14] = t10) : t10 = $[14];
83198
+ $[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = {}, $[15] = t10) : t10 = $[15];
83188
83199
  let t11;
83189
- $[15] !== t6 || $[16] !== t7 || $[17] !== t8 || $[18] !== t9 ? (t11 = /* @__PURE__ */ jsx(Button, { ref: buttonElement, "data-testid": "action-document-group-inventory", text: t6, tone: "neutral", onClick: t7, icon: t8, iconRight: t9, tooltipProps: t10, mode: "ghost" }), $[15] = t6, $[16] = t7, $[17] = t8, $[18] = t9, $[19] = t11) : t11 = $[19];
83200
+ $[16] !== t6 || $[17] !== t7 || $[18] !== t8 || $[19] !== t9 ? (t11 = /* @__PURE__ */ jsx(Button, { ref: buttonElement, "data-testid": "action-document-group-inventory", text: t6, tone: "neutral", onClick: t7, icon: t8, iconRight: t9, tooltipProps: t10, mode: "ghost" }), $[16] = t6, $[17] = t7, $[18] = t8, $[19] = t9, $[20] = t11) : t11 = $[20];
83190
83201
  let t12;
83191
- return $[20] !== children || $[21] !== isDocumentGroupInventoryActive || $[22] !== portalElementName || $[23] !== t11 ? (t12 = /* @__PURE__ */ jsx(LayerProvider, { children: /* @__PURE__ */ jsx(Popover, { ref: popoverElement, content: children, placement: "top-end", padding: 0, open: isDocumentGroupInventoryActive, portal: portalElementName, children: t11 }) }), $[20] = children, $[21] = isDocumentGroupInventoryActive, $[22] = portalElementName, $[23] = t11, $[24] = t12) : t12 = $[24], t12;
83202
+ return $[21] !== children || $[22] !== isDocumentGroupInventoryActive || $[23] !== portalElementName || $[24] !== t11 ? (t12 = /* @__PURE__ */ jsx(LayerProvider, { children: /* @__PURE__ */ jsx(Popover, { ref: popoverElement, content: children, placement: "top-end", padding: 0, open: isDocumentGroupInventoryActive, portal: portalElementName, children: t11 }) }), $[21] = children, $[22] = isDocumentGroupInventoryActive, $[23] = portalElementName, $[24] = t11, $[25] = t12) : t12 = $[25], t12;
83192
83203
  };
83193
- function variantLabel(perspective) {
83194
- return typeof perspective > "u" ? "" : isDraftPerspective(perspective) ? "Draft" : isPublishedPerspective(perspective) ? "Published" : typeof perspective == "string" ? perspective : perspective.metadata.title ?? perspective._id;
83204
+ function variantLabel({
83205
+ perspective,
83206
+ t
83207
+ }) {
83208
+ return typeof perspective > "u" ? "" : isAgentBundleName(perspective) ? t("version.agent-bundle.proposed-changes") : isDraftPerspective(perspective) ? "Draft" : isPublishedPerspective(perspective) ? "Published" : typeof perspective == "string" ? perspective : perspective.metadata.title ?? perspective._id;
83195
83209
  }
83196
83210
  const VariantIcon = (t0) => {
83197
83211
  const $ = c(3), {
@@ -83423,7 +83437,8 @@ const deletionMachine = setup({
83423
83437
  input: void 0
83424
83438
  }),
83425
83439
  sets: [],
83426
- releases: /* @__PURE__ */ new Map()
83440
+ releases: /* @__PURE__ */ new Map(),
83441
+ t: input.t
83427
83442
  }),
83428
83443
  invoke: {
83429
83444
  src: "meta",
@@ -83432,7 +83447,11 @@ const deletionMachine = setup({
83432
83447
  sets: ({
83433
83448
  context,
83434
83449
  event
83435
- }) => computeSets(event.snapshot.context, context.sets),
83450
+ }) => computeSets({
83451
+ meta: event.snapshot.context,
83452
+ current: context.sets,
83453
+ t: context.t
83454
+ }),
83436
83455
  releases: ({
83437
83456
  event
83438
83457
  }) => event.snapshot.context?.releases.releases ?? /* @__PURE__ */ new Map()
@@ -83500,18 +83519,30 @@ function metaHasError(meta) {
83500
83519
  function metaIsLoaded(meta) {
83501
83520
  return meta?.versionState.loading === !1 && meta.releases.state === "loaded";
83502
83521
  }
83503
- function computeSets(meta, current) {
83522
+ function computeSets({
83523
+ meta,
83524
+ current,
83525
+ t
83526
+ }) {
83504
83527
  if (!meta)
83505
83528
  return current;
83506
83529
  const {
83507
83530
  releases: releases2
83508
- } = meta.releases;
83531
+ } = meta.releases, userBundleIds = new Set(meta.agentBundles.bundles.map(({
83532
+ id: id2
83533
+ }) => id2)), proposedChangesId = meta.versionState.data.find((id2) => {
83534
+ const bundleId = getVersionFromId(id2);
83535
+ return typeof bundleId == "string" && userBundleIds.has(bundleId);
83536
+ });
83509
83537
  return [{
83510
83538
  key: "studio:all",
83511
- variants: meta.versionState.data.map((id2) => ({
83539
+ variants: meta.versionState.data.filter((id2) => !isAgentBundleName(getVersionFromId(id2))).map((id2) => ({
83512
83540
  id: id2,
83513
83541
  name: getVariantName(id2, releases2)
83514
- }))
83542
+ })).concat(typeof proposedChangesId > "u" ? [] : {
83543
+ id: proposedChangesId,
83544
+ name: t("version.agent-bundle.proposed-changes")
83545
+ })
83515
83546
  }];
83516
83547
  }
83517
83548
  function getVariantName(documentId, releases2) {
@@ -84172,7 +84203,7 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84172
84203
  border-radius: ${radius[3]}px ${radius[3]}px 0 0;
84173
84204
  `;
84174
84205
  }), DocumentGroupInventory = (t0) => {
84175
- const $ = c(90), {
84206
+ const $ = c(93), {
84176
84207
  documentType,
84177
84208
  documentId,
84178
84209
  portalElementName,
@@ -84194,7 +84225,9 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84194
84225
  }, $[3] = documentId, $[4] = t3) : t3 = $[4];
84195
84226
  const versionState = useDocumentVersionsObservable(t3), {
84196
84227
  state$: releases2
84197
- } = useReleasesStore(), [containerElement, setContainerElement] = useState(null);
84228
+ } = useReleasesStore(), {
84229
+ state$: agentBundles
84230
+ } = useAgentBundlesStore(), [containerElement, setContainerElement] = useState(null);
84198
84231
  let t4;
84199
84232
  $[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = new Subject(), $[5] = t4) : t4 = $[5];
84200
84233
  const filterStringEvent = t4, [menuPortalElement, setMenuPortalElement] = useState(null), {
@@ -84204,35 +84237,36 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84204
84237
  $[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t5 = filterStringEvent.pipe(map$1(_temp$c), debounceTime$1(150), map$1(_temp2$2), map$1(_temp3$2), startWith$1(void 0)), $[6] = t5) : t5 = $[6];
84205
84238
  const filterString = t5;
84206
84239
  let t6;
84207
- if ($[7] !== feedbackDialogOpened || $[8] !== releases2 || $[9] !== versionState) {
84240
+ if ($[7] !== agentBundles || $[8] !== feedbackDialogOpened || $[9] !== releases2 || $[10] !== versionState) {
84208
84241
  let t72;
84209
- $[11] !== releases2 || $[12] !== versionState ? (t72 = () => combineLatest({
84242
+ $[12] !== agentBundles || $[13] !== releases2 || $[14] !== versionState ? (t72 = () => combineLatest({
84210
84243
  versionState,
84211
- releases: releases2
84212
- }), $[11] = releases2, $[12] = versionState, $[13] = t72) : t72 = $[13], t6 = documentGroupInventoryMachine.provide({
84244
+ releases: releases2,
84245
+ agentBundles
84246
+ }), $[12] = agentBundles, $[13] = releases2, $[14] = versionState, $[15] = t72) : t72 = $[15], t6 = documentGroupInventoryMachine.provide({
84213
84247
  actors: {
84214
84248
  meta: fromObservable(t72)
84215
84249
  },
84216
84250
  actions: {
84217
84251
  onFeedbackBegin: feedbackDialogOpened
84218
84252
  }
84219
- }), $[7] = feedbackDialogOpened, $[8] = releases2, $[9] = versionState, $[10] = t6;
84253
+ }), $[7] = agentBundles, $[8] = feedbackDialogOpened, $[9] = releases2, $[10] = versionState, $[11] = t6;
84220
84254
  } else
84221
- t6 = $[10];
84255
+ t6 = $[11];
84222
84256
  const inventoryMachine = t6;
84223
84257
  let t7;
84224
- $[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = selectionMachine.provide({
84258
+ $[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = selectionMachine.provide({
84225
84259
  actors: {
84226
84260
  filterString: fromObservable(() => filterString)
84227
84261
  }
84228
- }), $[14] = t7) : t7 = $[14];
84262
+ }), $[16] = t7) : t7 = $[16];
84229
84263
  const t8 = t7;
84230
84264
  let t9;
84231
- if ($[15] !== client || $[16] !== referringDocuments$) {
84265
+ if ($[17] !== client || $[18] !== referringDocuments$) {
84232
84266
  let t102;
84233
- $[18] !== referringDocuments$ ? (t102 = () => referringDocuments$, $[18] = referringDocuments$, $[19] = t102) : t102 = $[19];
84267
+ $[20] !== referringDocuments$ ? (t102 = () => referringDocuments$, $[20] = referringDocuments$, $[21] = t102) : t102 = $[21];
84234
84268
  let t112;
84235
- $[20] !== client ? (t112 = (t122) => {
84269
+ $[22] !== client ? (t112 = (t122) => {
84236
84270
  const {
84237
84271
  input,
84238
84272
  signal
@@ -84242,65 +84276,66 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84242
84276
  skipCrossDatasetReferenceValidation: !0,
84243
84277
  signal
84244
84278
  });
84245
- }, $[20] = client, $[21] = t112) : t112 = $[21], t9 = deletionMachine.provide({
84279
+ }, $[22] = client, $[23] = t112) : t112 = $[23], t9 = deletionMachine.provide({
84246
84280
  actors: {
84247
84281
  referringDocuments: fromObservable(t102),
84248
84282
  deleteVariants: fromPromise(t112)
84249
84283
  }
84250
- }), $[15] = client, $[16] = referringDocuments$, $[17] = t9;
84284
+ }), $[17] = client, $[18] = referringDocuments$, $[19] = t9;
84251
84285
  } else
84252
- t9 = $[17];
84286
+ t9 = $[19];
84253
84287
  const t10 = t9;
84254
84288
  let t11;
84255
- $[22] !== t10 ? (t11 = {
84289
+ $[24] !== t || $[25] !== t10 ? (t11 = {
84256
84290
  input: {
84291
+ t,
84257
84292
  selectionMachine: t8,
84258
84293
  deletionMachine: t10
84259
84294
  }
84260
- }, $[22] = t10, $[23] = t11) : t11 = $[23];
84295
+ }, $[24] = t, $[25] = t10, $[26] = t11) : t11 = $[26];
84261
84296
  const inventoryRef = useActorRef(inventoryMachine, t11), selectionRef = useSelector(inventoryRef, _temp5$1), deletionRef = useSelector(inventoryRef, _temp6), selectionCount = useSelector(selectionRef, _temp7), isReadOnly = useSelector(selectionRef, _temp8), isDeletionActive = useSelector(deletionRef, _temp9), isFeedbackActive = useSelector(inventoryRef, _temp0), canRequestDeletion = useSelector(deletionRef, _temp1), hasFilter = useSelector(selectionRef, _temp10);
84262
84297
  let t12;
84263
- $[24] !== containerElement || $[25] !== hasFilter ? (t12 = {
84298
+ $[27] !== containerElement || $[28] !== hasFilter ? (t12 = {
84264
84299
  element: containerElement,
84265
84300
  isActive: hasFilter
84266
- }, $[24] = containerElement, $[25] = hasFilter, $[26] = t12) : t12 = $[26], usePreserveIntrinsicBlockSize(t12);
84301
+ }, $[27] = containerElement, $[28] = hasFilter, $[29] = t12) : t12 = $[29], usePreserveIntrinsicBlockSize(t12);
84267
84302
  let t13;
84268
- $[27] !== inventoryRef ? (t13 = () => inventoryRef.send({
84303
+ $[30] !== inventoryRef ? (t13 = () => inventoryRef.send({
84269
84304
  type: "feedback.begin"
84270
- }), $[27] = inventoryRef, $[28] = t13) : t13 = $[28];
84305
+ }), $[30] = inventoryRef, $[31] = t13) : t13 = $[31];
84271
84306
  let t14;
84272
- $[29] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(FeedbackIcon, {}), $[29] = t14) : t14 = $[29];
84307
+ $[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(FeedbackIcon, {}), $[32] = t14) : t14 = $[32];
84273
84308
  let t15;
84274
- $[30] !== feedbackT ? (t15 = feedbackT("feedback.menu-item"), $[30] = feedbackT, $[31] = t15) : t15 = $[31];
84309
+ $[33] !== feedbackT ? (t15 = feedbackT("feedback.menu-item"), $[33] = feedbackT, $[34] = t15) : t15 = $[34];
84275
84310
  let t16;
84276
- $[32] !== t15 ? (t16 = /* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", justify: "flex-end", children: [
84311
+ $[35] !== t15 ? (t16 = /* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsxs(Flex, { gap: 2, align: "center", justify: "flex-end", children: [
84277
84312
  t14,
84278
84313
  " ",
84279
84314
  t15
84280
- ] }) }), $[32] = t15, $[33] = t16) : t16 = $[33];
84315
+ ] }) }), $[35] = t15, $[36] = t16) : t16 = $[36];
84281
84316
  let t17;
84282
- $[34] !== t13 || $[35] !== t16 ? (t17 = /* @__PURE__ */ jsx(TextButton, { onClick: t13, children: t16 }), $[34] = t13, $[35] = t16, $[36] = t17) : t17 = $[36];
84317
+ $[37] !== t13 || $[38] !== t16 ? (t17 = /* @__PURE__ */ jsx(TextButton, { onClick: t13, children: t16 }), $[37] = t13, $[38] = t16, $[39] = t17) : t17 = $[39];
84283
84318
  let t18;
84284
- $[37] !== t ? (t18 = t("document-group-inventory.filter-string.label", {
84319
+ $[40] !== t ? (t18 = t("document-group-inventory.filter-string.label", {
84285
84320
  subject: t("document-group.subject.version_other")
84286
- }), $[37] = t, $[38] = t18) : t18 = $[38];
84321
+ }), $[40] = t, $[41] = t18) : t18 = $[41];
84287
84322
  let t19;
84288
- $[39] !== t ? (t19 = t("document-group-inventory.filter-string.label", {
84323
+ $[42] !== t ? (t19 = t("document-group-inventory.filter-string.label", {
84289
84324
  subject: t("document-group.subject.version_other")
84290
- }), $[39] = t, $[40] = t19) : t19 = $[40];
84325
+ }), $[42] = t, $[43] = t19) : t19 = $[43];
84291
84326
  let t20;
84292
- $[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = /* @__PURE__ */ jsx(SearchIcon, {}), $[41] = t20) : t20 = $[41];
84327
+ $[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = /* @__PURE__ */ jsx(SearchIcon, {}), $[44] = t20) : t20 = $[44];
84293
84328
  let t21;
84294
- $[42] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t21 = (event_0) => filterStringEvent.next(event_0), $[42] = t21) : t21 = $[42];
84329
+ $[45] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t21 = (event_0) => filterStringEvent.next(event_0), $[45] = t21) : t21 = $[45];
84295
84330
  let t22;
84296
- $[43] !== isReadOnly || $[44] !== t18 || $[45] !== t19 ? (t22 = /* @__PURE__ */ jsx("search", { children: /* @__PURE__ */ jsx(TextInput$1, { name: t18, placeholder: t19, icon: t20, readOnly: isReadOnly, onChange: t21 }) }), $[43] = isReadOnly, $[44] = t18, $[45] = t19, $[46] = t22) : t22 = $[46];
84331
+ $[46] !== isReadOnly || $[47] !== t18 || $[48] !== t19 ? (t22 = /* @__PURE__ */ jsx("search", { children: /* @__PURE__ */ jsx(TextInput$1, { name: t18, placeholder: t19, icon: t20, readOnly: isReadOnly, onChange: t21 }) }), $[46] = isReadOnly, $[47] = t18, $[48] = t19, $[49] = t22) : t22 = $[49];
84297
84332
  let t23;
84298
- $[47] !== t17 || $[48] !== t22 ? (t23 = /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
84333
+ $[50] !== t17 || $[51] !== t22 ? (t23 = /* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(Stack, { gap: 4, children: [
84299
84334
  t17,
84300
84335
  t22
84301
- ] }) }), $[47] = t17, $[48] = t22, $[49] = t23) : t23 = $[49];
84336
+ ] }) }), $[50] = t17, $[51] = t22, $[52] = t23) : t23 = $[52];
84302
84337
  let t24;
84303
- $[50] !== documentType || $[51] !== inventoryRef || $[52] !== menuPortalElement || $[53] !== navigatePerspective || $[54] !== perspectiveList || $[55] !== schema2 || $[56] !== selectionRef ? (t24 = schema2 && /* @__PURE__ */ jsx(Select, { machine: selectionRef, inventoryRef, documentType, menuPortalElement, perspectiveList, onPrimaryAction: (variantId) => {
84338
+ $[53] !== documentType || $[54] !== inventoryRef || $[55] !== menuPortalElement || $[56] !== navigatePerspective || $[57] !== perspectiveList || $[58] !== schema2 || $[59] !== selectionRef ? (t24 = schema2 && /* @__PURE__ */ jsx(Select, { machine: selectionRef, inventoryRef, documentType, menuPortalElement, perspectiveList, onPrimaryAction: (variantId) => {
84304
84339
  let perspective;
84305
84340
  bb56: switch (!0) {
84306
84341
  case isPublishedId(variantId): {
@@ -84319,41 +84354,41 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84319
84354
  perspective = void 0;
84320
84355
  }
84321
84356
  typeof perspective < "u" && navigatePerspective(perspective);
84322
- } }), $[50] = documentType, $[51] = inventoryRef, $[52] = menuPortalElement, $[53] = navigatePerspective, $[54] = perspectiveList, $[55] = schema2, $[56] = selectionRef, $[57] = t24) : t24 = $[57];
84357
+ } }), $[53] = documentType, $[54] = inventoryRef, $[55] = menuPortalElement, $[56] = navigatePerspective, $[57] = perspectiveList, $[58] = schema2, $[59] = selectionRef, $[60] = t24) : t24 = $[60];
84323
84358
  let t25;
84324
- $[58] !== t24 ? (t25 = /* @__PURE__ */ jsx(Body, { children: t24 }), $[58] = t24, $[59] = t25) : t25 = $[59];
84359
+ $[61] !== t24 ? (t25 = /* @__PURE__ */ jsx(Body, { children: t24 }), $[61] = t24, $[62] = t25) : t25 = $[62];
84325
84360
  let t26;
84326
- $[60] !== selectionCount || $[61] !== t ? (t26 = t("document-group.delete.confirm-button.text", {
84361
+ $[63] !== selectionCount || $[64] !== t ? (t26 = t("document-group.delete.confirm-button.text", {
84327
84362
  count: selectionCount
84328
- }), $[60] = selectionCount, $[61] = t, $[62] = t26) : t26 = $[62];
84363
+ }), $[63] = selectionCount, $[64] = t, $[65] = t26) : t26 = $[65];
84329
84364
  let t27;
84330
- $[63] !== deletionRef ? (t27 = () => deletionRef.send({
84365
+ $[66] !== deletionRef ? (t27 = () => deletionRef.send({
84331
84366
  type: "delete.request"
84332
- }), $[63] = deletionRef, $[64] = t27) : t27 = $[64];
84367
+ }), $[66] = deletionRef, $[67] = t27) : t27 = $[67];
84333
84368
  const t28 = !canRequestDeletion;
84334
84369
  let t29;
84335
- $[65] !== t26 || $[66] !== t27 || $[67] !== t28 ? (t29 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Button$1, { text: t26, onClick: t27, disabled: t28, tone: "critical", size: "large", icon: TrashIcon }) }), $[65] = t26, $[66] = t27, $[67] = t28, $[68] = t29) : t29 = $[68];
84370
+ $[68] !== t26 || $[69] !== t27 || $[70] !== t28 ? (t29 = /* @__PURE__ */ jsx(Footer, { children: /* @__PURE__ */ jsx(Button$1, { text: t26, onClick: t27, disabled: t28, tone: "critical", size: "large", icon: TrashIcon }) }), $[68] = t26, $[69] = t27, $[70] = t28, $[71] = t29) : t29 = $[71];
84336
84371
  let t30;
84337
- $[69] !== t23 || $[70] !== t25 || $[71] !== t29 ? (t30 = /* @__PURE__ */ jsxs(Container, { ref: setContainerElement, "data-testid": "document-group-inventory", children: [
84372
+ $[72] !== t23 || $[73] !== t25 || $[74] !== t29 ? (t30 = /* @__PURE__ */ jsxs(Container, { ref: setContainerElement, "data-testid": "document-group-inventory", children: [
84338
84373
  t23,
84339
84374
  t25,
84340
84375
  t29
84341
- ] }), $[69] = t23, $[70] = t25, $[71] = t29, $[72] = t30) : t30 = $[72];
84376
+ ] }), $[72] = t23, $[73] = t25, $[74] = t29, $[75] = t30) : t30 = $[75];
84342
84377
  let t31;
84343
- $[73] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t31 = /* @__PURE__ */ jsx("div", { ref: setMenuPortalElement }), $[73] = t31) : t31 = $[73];
84378
+ $[76] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t31 = /* @__PURE__ */ jsx("div", { ref: setMenuPortalElement }), $[76] = t31) : t31 = $[76];
84344
84379
  let t32;
84345
- $[74] !== components2 || $[75] !== deletionRef || $[76] !== documentId || $[77] !== documentType || $[78] !== isDeletionActive || $[79] !== portalElementName || $[80] !== selectionRef ? (t32 = isDeletionActive && /* @__PURE__ */ jsx(ConfirmDeleteDialog, { documentId, documentType, deletionRef, selectionRef, portalElementName, components: components2 }), $[74] = components2, $[75] = deletionRef, $[76] = documentId, $[77] = documentType, $[78] = isDeletionActive, $[79] = portalElementName, $[80] = selectionRef, $[81] = t32) : t32 = $[81];
84380
+ $[77] !== components2 || $[78] !== deletionRef || $[79] !== documentId || $[80] !== documentType || $[81] !== isDeletionActive || $[82] !== portalElementName || $[83] !== selectionRef ? (t32 = isDeletionActive && /* @__PURE__ */ jsx(ConfirmDeleteDialog, { documentId, documentType, deletionRef, selectionRef, portalElementName, components: components2 }), $[77] = components2, $[78] = deletionRef, $[79] = documentId, $[80] = documentType, $[81] = isDeletionActive, $[82] = portalElementName, $[83] = selectionRef, $[84] = t32) : t32 = $[84];
84346
84381
  let t33;
84347
- $[82] !== inventoryRef || $[83] !== isFeedbackActive || $[84] !== t ? (t33 = isFeedbackActive && /* @__PURE__ */ jsx(StudioFeedbackDialog, { dsn: STUDIO_DSN, feedbackVersion: "1", source: "document-group-inventory", onClose: () => inventoryRef.send({
84382
+ $[85] !== inventoryRef || $[86] !== isFeedbackActive || $[87] !== t ? (t33 = isFeedbackActive && /* @__PURE__ */ jsx(StudioFeedbackDialog, { dsn: STUDIO_DSN, feedbackVersion: "1", source: "document-group-inventory", onClose: () => inventoryRef.send({
84348
84383
  type: "feedback.end"
84349
- }), sentimentLabel: t("document-group-inventory.feedback.sentiment-label") }), $[82] = inventoryRef, $[83] = isFeedbackActive, $[84] = t, $[85] = t33) : t33 = $[85];
84384
+ }), sentimentLabel: t("document-group-inventory.feedback.sentiment-label") }), $[85] = inventoryRef, $[86] = isFeedbackActive, $[87] = t, $[88] = t33) : t33 = $[88];
84350
84385
  let t34;
84351
- return $[86] !== t30 || $[87] !== t32 || $[88] !== t33 ? (t34 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
84386
+ return $[89] !== t30 || $[90] !== t32 || $[91] !== t33 ? (t34 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
84352
84387
  t30,
84353
84388
  t31,
84354
84389
  t32,
84355
84390
  t33
84356
- ] }), $[86] = t30, $[87] = t32, $[88] = t33, $[89] = t34) : t34 = $[89], t34;
84391
+ ] }), $[89] = t30, $[90] = t32, $[91] = t33, $[92] = t34) : t34 = $[92], t34;
84357
84392
  }, Select = (t0) => {
84358
84393
  const $ = c(23), {
84359
84394
  machine,
@@ -84395,7 +84430,7 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84395
84430
  let t2;
84396
84431
  return $[21] !== t1 ? (t2 = /* @__PURE__ */ jsx(Stack, { gap: 5, children: t1 }), $[21] = t1, $[22] = t2) : t2 = $[22], t2;
84397
84432
  }, Variant = (t0) => {
84398
- const $ = c(97), {
84433
+ const $ = c(100), {
84399
84434
  variant,
84400
84435
  machine,
84401
84436
  inventoryRef,
@@ -84483,33 +84518,32 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
84483
84518
  " ",
84484
84519
  t("document-group-inventory.viewing-item-label")
84485
84520
  ] }), $[45] = isSelected, $[46] = t, $[47] = t15) : t15 = $[47];
84486
- const t16 = (isDraftVersion2 ? "drafts" : isPublishedVersion2 ? "published" : release) ?? "";
84521
+ let t16;
84522
+ $[48] !== isDraftVersion2 || $[49] !== isPublishedVersion2 || $[50] !== release || $[51] !== variant.id ? (t16 = /* @__PURE__ */ jsx(Text$1, { size: 1, children: isAgentBundleName(getVersionFromId(variant.id)) ? /* @__PURE__ */ jsx(ReleaseAvatarIcon, { tone: "suggest" }) : /* @__PURE__ */ jsx(ReleaseAvatarIcon, { release: (isDraftVersion2 ? "drafts" : isPublishedVersion2 ? "published" : release) ?? "" }) }), $[48] = isDraftVersion2, $[49] = isPublishedVersion2, $[50] = release, $[51] = variant.id, $[52] = t16) : t16 = $[52];
84487
84523
  let t17;
84488
- $[48] !== t16 ? (t17 = /* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(ReleaseAvatarIcon, { release: t16 }) }), $[48] = t16, $[49] = t17) : t17 = $[49];
84489
- let t18;
84490
- $[50] !== t15 || $[51] !== t17 ? (t18 = /* @__PURE__ */ jsxs("div", { className: "atom inert", children: [
84524
+ $[53] !== t15 || $[54] !== t16 ? (t17 = /* @__PURE__ */ jsxs("div", { className: "atom inert", children: [
84491
84525
  t15,
84492
- t17
84493
- ] }), $[50] = t15, $[51] = t17, $[52] = t18) : t18 = $[52];
84494
- let t19;
84495
- $[53] !== t14 || $[54] !== t18 || $[55] !== t8 || $[56] !== t9 ? (t19 = /* @__PURE__ */ jsxs(VariantSetEntry, { "data-testid": t8, "data-selected": t9, children: [
84526
+ t16
84527
+ ] }), $[53] = t15, $[54] = t16, $[55] = t17) : t17 = $[55];
84528
+ let t18;
84529
+ $[56] !== t14 || $[57] !== t17 || $[58] !== t8 || $[59] !== t9 ? (t18 = /* @__PURE__ */ jsxs(VariantSetEntry, { "data-testid": t8, "data-selected": t9, children: [
84496
84530
  t14,
84497
- t18
84498
- ] }), $[53] = t14, $[54] = t18, $[55] = t8, $[56] = t9, $[57] = t19) : t19 = $[57];
84499
- const t20 = filteredReleases.notCurrentReleases, t21 = !!menuPortalElement;
84531
+ t17
84532
+ ] }), $[56] = t14, $[57] = t17, $[58] = t8, $[59] = t9, $[60] = t18) : t18 = $[60];
84533
+ const t19 = filteredReleases.notCurrentReleases, t20 = !!menuPortalElement;
84534
+ let t21;
84535
+ $[61] !== bundleId || $[62] !== contextMenu || $[63] !== documentId || $[64] !== documentType || $[65] !== filteredReleases.notCurrentReleases || $[66] !== handleAddVersion || $[67] !== handleCopyToDraftsNavigate || $[68] !== isReadOnly || $[69] !== isScheduledDraft || $[70] !== isVersion || $[71] !== openCopyToDraftsDialog || $[72] !== openCreateReleaseDialog || $[73] !== openDiscardDialog || $[74] !== popoverRef || $[75] !== referenceElement || $[76] !== release || $[77] !== releasesLoading || $[78] !== scheduledDraftMenuActions || $[79] !== t20 ? (t21 = /* @__PURE__ */ jsx(VersionContextMenuPopover, { contextMenu, popoverRef, referenceElement, documentId, documentType, bundleId, isVersion, releases: t19, releasesLoading, onDiscard: openDiscardDialog, onCreateRelease: openCreateReleaseDialog, onCopyToDrafts: openCopyToDraftsDialog, onCopyToDraftsNavigate: handleCopyToDraftsNavigate, onCreateVersion: handleAddVersion, disabled: isReadOnly, release, isScheduledDraft, scheduledDraftMenuActions, portal: t20, isDiscardable: !1 }), $[61] = bundleId, $[62] = contextMenu, $[63] = documentId, $[64] = documentType, $[65] = filteredReleases.notCurrentReleases, $[66] = handleAddVersion, $[67] = handleCopyToDraftsNavigate, $[68] = isReadOnly, $[69] = isScheduledDraft, $[70] = isVersion, $[71] = openCopyToDraftsDialog, $[72] = openCreateReleaseDialog, $[73] = openDiscardDialog, $[74] = popoverRef, $[75] = referenceElement, $[76] = release, $[77] = releasesLoading, $[78] = scheduledDraftMenuActions, $[79] = t20, $[80] = t21) : t21 = $[80];
84500
84536
  let t22;
84501
- $[58] !== bundleId || $[59] !== contextMenu || $[60] !== documentId || $[61] !== documentType || $[62] !== filteredReleases.notCurrentReleases || $[63] !== handleAddVersion || $[64] !== handleCopyToDraftsNavigate || $[65] !== isReadOnly || $[66] !== isScheduledDraft || $[67] !== isVersion || $[68] !== openCopyToDraftsDialog || $[69] !== openCreateReleaseDialog || $[70] !== openDiscardDialog || $[71] !== popoverRef || $[72] !== referenceElement || $[73] !== release || $[74] !== releasesLoading || $[75] !== scheduledDraftMenuActions || $[76] !== t21 ? (t22 = /* @__PURE__ */ jsx(VersionContextMenuPopover, { contextMenu, popoverRef, referenceElement, documentId, documentType, bundleId, isVersion, releases: t20, releasesLoading, onDiscard: openDiscardDialog, onCreateRelease: openCreateReleaseDialog, onCopyToDrafts: openCopyToDraftsDialog, onCopyToDraftsNavigate: handleCopyToDraftsNavigate, onCreateVersion: handleAddVersion, disabled: isReadOnly, release, isScheduledDraft, scheduledDraftMenuActions, portal: t21, isDiscardable: !1 }), $[58] = bundleId, $[59] = contextMenu, $[60] = documentId, $[61] = documentType, $[62] = filteredReleases.notCurrentReleases, $[63] = handleAddVersion, $[64] = handleCopyToDraftsNavigate, $[65] = isReadOnly, $[66] = isScheduledDraft, $[67] = isVersion, $[68] = openCopyToDraftsDialog, $[69] = openCreateReleaseDialog, $[70] = openDiscardDialog, $[71] = popoverRef, $[72] = referenceElement, $[73] = release, $[74] = releasesLoading, $[75] = scheduledDraftMenuActions, $[76] = t21, $[77] = t22) : t22 = $[77];
84502
- let t23;
84503
- $[78] !== menuPortalElement || $[79] !== t22 ? (t23 = /* @__PURE__ */ jsx(PortalProvider, { element: menuPortalElement, children: t22 }), $[78] = menuPortalElement, $[79] = t22, $[80] = t23) : t23 = $[80];
84504
- const t24 = isScheduledDraft && scheduledDraftMenuActions.dialogs;
84537
+ $[81] !== menuPortalElement || $[82] !== t21 ? (t22 = /* @__PURE__ */ jsx(PortalProvider, { element: menuPortalElement, children: t21 }), $[81] = menuPortalElement, $[82] = t21, $[83] = t22) : t22 = $[83];
84538
+ const t23 = isScheduledDraft && scheduledDraftMenuActions.dialogs;
84539
+ let t24;
84540
+ $[84] !== bundleId || $[85] !== closeDialog || $[86] !== dialogState || $[87] !== documentId || $[88] !== documentType || $[89] !== handleAddVersion || $[90] !== handleCopyToDraftsNavigate || $[91] !== isVersion || $[92] !== sourceReleasePerspective || $[93] !== t23 || $[94] !== variant.name ? (t24 = /* @__PURE__ */ jsx(VersionContextMenuDialogs, { dialogState, onClose: closeDialog, documentId, documentType, bundleId, isVersion, title: variant.name, sourceReleasePerspective, onCreateVersion: handleAddVersion, onCopyToDraftsNavigate: handleCopyToDraftsNavigate, scheduledDraftDialogs: t23 }), $[84] = bundleId, $[85] = closeDialog, $[86] = dialogState, $[87] = documentId, $[88] = documentType, $[89] = handleAddVersion, $[90] = handleCopyToDraftsNavigate, $[91] = isVersion, $[92] = sourceReleasePerspective, $[93] = t23, $[94] = variant.name, $[95] = t24) : t24 = $[95];
84505
84541
  let t25;
84506
- $[81] !== bundleId || $[82] !== closeDialog || $[83] !== dialogState || $[84] !== documentId || $[85] !== documentType || $[86] !== handleAddVersion || $[87] !== handleCopyToDraftsNavigate || $[88] !== isVersion || $[89] !== sourceReleasePerspective || $[90] !== t24 || $[91] !== variant.name ? (t25 = /* @__PURE__ */ jsx(VersionContextMenuDialogs, { dialogState, onClose: closeDialog, documentId, documentType, bundleId, isVersion, title: variant.name, sourceReleasePerspective, onCreateVersion: handleAddVersion, onCopyToDraftsNavigate: handleCopyToDraftsNavigate, scheduledDraftDialogs: t24 }), $[81] = bundleId, $[82] = closeDialog, $[83] = dialogState, $[84] = documentId, $[85] = documentType, $[86] = handleAddVersion, $[87] = handleCopyToDraftsNavigate, $[88] = isVersion, $[89] = sourceReleasePerspective, $[90] = t24, $[91] = variant.name, $[92] = t25) : t25 = $[92];
84507
- let t26;
84508
- return $[93] !== t19 || $[94] !== t23 || $[95] !== t25 ? (t26 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
84509
- t19,
84510
- t23,
84511
- t25
84512
- ] }), $[93] = t19, $[94] = t23, $[95] = t25, $[96] = t26) : t26 = $[96], t26;
84542
+ return $[96] !== t18 || $[97] !== t22 || $[98] !== t24 ? (t25 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
84543
+ t18,
84544
+ t22,
84545
+ t24
84546
+ ] }), $[96] = t18, $[97] = t22, $[98] = t24, $[99] = t25) : t25 = $[99], t25;
84513
84547
  };
84514
84548
  function usePreserveIntrinsicBlockSize(t0) {
84515
84549
  const $ = c(10), {