sanity 5.27.0 → 5.28.0-next.2

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.
@@ -3,6 +3,18 @@ const variantsLocaleStrings = {
3
3
  "navbar.view-as": "View as",
4
4
  /** Label for the version selector in the variants navigation row. */
5
5
  "navbar.version": "Version",
6
+ /** Label for the variant selector in the variants navigation row. */
7
+ "navbar.variant": "Variant",
8
+ /** Default option label when no variant is selected. */
9
+ "navbar.variant.default": "All users (Default)",
10
+ /** Placeholder for the variant filter input in the dropdown. */
11
+ "navbar.variant.filter-placeholder": "Filter variants\u2026",
12
+ /** Section header for non-default variants in the dropdown. */
13
+ "navbar.variant.other": "Other variants",
14
+ /** Label for clearing version and variant selections. */
15
+ "navbar.clear": "Clear",
16
+ /** Tooltip for clearing the selected variant. */
17
+ "navbar.variant.clear": "Clear variant selection",
6
18
  /** Label for the Variants overview create action. */
7
19
  "overview.action.create-variant": "Create variant",
8
20
  /** Label for the Variants overview delete action. */
@@ -1 +1 @@
1
- {"version":3,"file":"resources7.js","sources":["../../src/core/variants/i18n/resources.ts"],"sourcesContent":["/**\n * Defined locale strings for variants, in US English.\n *\n * @internal\n */\nconst variantsLocaleStrings = {\n /** Label for the variants navigation row. */\n 'navbar.view-as': 'View as',\n /** Label for the version selector in the variants navigation row. */\n 'navbar.version': 'Version',\n /** Label for the Variants overview create action. */\n 'overview.action.create-variant': 'Create variant',\n /** Label for the Variants overview delete action. */\n 'overview.action.delete-variant': 'Delete variant',\n /** Error toast title when variant deletion fails. */\n 'overview.action.delete-variant.error.title': 'Unable to delete variant',\n /** Link label for Variants overview documentation (empty state). */\n 'overview.action.documentation': 'Documentation',\n /** Description for the Variants overview empty state. */\n 'overview.empty-state.description':\n 'Variant definitions describe how content is personalized for audiences, locales, segments, and more.',\n /** Description for the Variants overview. */\n 'overview.description':\n 'Manage variant definitions that control how content is personalized for different audiences, locales, and segments.',\n /** Error message for the Variants overview. */\n 'overview.error': 'Unable to load variants',\n /** Placeholder for the Variants overview search field. */\n 'overview.search.placeholder': 'Search variant definitions…',\n /** Column header for the variant title column in the overview table. */\n 'overview.table.variant': 'Variant',\n /** Column header for document count in the overview table. */\n 'overview.table.documents': 'Documents',\n /** Fallback text when a variant has no conditions. */\n 'overview.table.no-conditions': 'No conditions',\n /** Title for the Variants overview. */\n 'overview.title': 'Variants',\n /** Back action on the Variant detail page. */\n 'detail.back': 'Back to variants',\n /** Loading message on the Variant detail page. */\n 'detail.loading': 'Loading variant',\n /** Fallback text when a variant has no description. */\n 'detail.no-description': 'No description yet.',\n /** Description for the missing Variant detail page. */\n 'detail.not-found.description': 'The requested variant could not be found.',\n /** Title for the missing Variant detail page. */\n 'detail.not-found.title': 'Variant not found',\n /** Placeholder text on the Variant detail page. */\n 'detail.placeholder': 'Variant detail editing will be added in a future iteration.',\n /** Title for the create variant dialog. */\n 'dialog.create.title': 'Create variant',\n /** Confirm action for the create variant dialog. */\n 'dialog.create.action.confirm': 'Create variant',\n /** Add condition action for the create variant dialog. */\n 'dialog.create.action.add-condition': 'Add condition',\n /** Tooltip when add condition is disabled because the current row is incomplete. */\n 'dialog.create.action.add-condition.disabled-hint':\n 'Complete the current condition key and value before adding another.',\n /** Remove condition action for the create variant dialog. */\n 'dialog.create.remove-condition': 'Remove condition',\n /** Label for the variant title field in the create variant dialog. */\n 'dialog.create.variant-title.label': 'Title',\n /** Placeholder for the variant title field in the create variant dialog. */\n 'dialog.create.variant-title.placeholder': 'e.g. Loyal customers',\n /** Validation message when the variant title is missing. */\n 'dialog.create.variant-title.required': 'Title is required',\n /** Label for the description field in the create variant dialog. */\n 'dialog.create.description.label': 'Description',\n /** Placeholder for the description field in the create variant dialog. */\n 'dialog.create.description.placeholder': 'Describe who this variant targets',\n /** Title for the conditions section in the create variant dialog. */\n 'dialog.create.conditions.title': 'Conditions',\n /** Description for the conditions section in the create variant dialog. */\n 'dialog.create.conditions.description':\n 'Add key/value pairs that define when this variant applies.',\n /** Label for the condition key field in the create variant dialog. */\n 'dialog.create.condition-key.label': 'Key',\n /** Validation message when a condition key is repeated. */\n 'dialog.create.condition-key.duplicate': 'Condition keys must be unique',\n /** Placeholder for the condition key field in the create variant dialog. */\n 'dialog.create.condition-key.placeholder': 'e.g. audience',\n /** Label for the condition value field in the create variant dialog. */\n 'dialog.create.condition-value.label': 'Value',\n /** Placeholder for the condition value field in the create variant dialog. */\n 'dialog.create.condition-value.placeholder': 'e.g. loyal-customers',\n /** Error toast title when variant creation fails. */\n 'dialog.create.error.title': 'Unable to create variant',\n}\n\n/**\n * @alpha\n */\nexport type VariantsLocaleResourceKeys = keyof typeof variantsLocaleStrings\n\nexport default variantsLocaleStrings\n"],"names":["variantsLocaleStrings"],"mappings":"AAKA,MAAMA,wBAAwB;AAAA;AAAA,EAE5B,kBAAkB;AAAA;AAAA,EAElB,kBAAkB;AAAA;AAAA,EAElB,kCAAkC;AAAA;AAAA,EAElC,kCAAkC;AAAA;AAAA,EAElC,8CAA8C;AAAA;AAAA,EAE9C,iCAAiC;AAAA;AAAA,EAEjC,oCACE;AAAA;AAAA,EAEF,wBACE;AAAA;AAAA,EAEF,kBAAkB;AAAA;AAAA,EAElB,+BAA+B;AAAA;AAAA,EAE/B,0BAA0B;AAAA;AAAA,EAE1B,4BAA4B;AAAA;AAAA,EAE5B,gCAAgC;AAAA;AAAA,EAEhC,kBAAkB;AAAA;AAAA,EAElB,eAAe;AAAA;AAAA,EAEf,kBAAkB;AAAA;AAAA,EAElB,yBAAyB;AAAA;AAAA,EAEzB,gCAAgC;AAAA;AAAA,EAEhC,0BAA0B;AAAA;AAAA,EAE1B,sBAAsB;AAAA;AAAA,EAEtB,uBAAuB;AAAA;AAAA,EAEvB,gCAAgC;AAAA;AAAA,EAEhC,sCAAsC;AAAA;AAAA,EAEtC,oDACE;AAAA;AAAA,EAEF,kCAAkC;AAAA;AAAA,EAElC,qCAAqC;AAAA;AAAA,EAErC,2CAA2C;AAAA;AAAA,EAE3C,wCAAwC;AAAA;AAAA,EAExC,mCAAmC;AAAA;AAAA,EAEnC,yCAAyC;AAAA;AAAA,EAEzC,kCAAkC;AAAA;AAAA,EAElC,wCACE;AAAA;AAAA,EAEF,qCAAqC;AAAA;AAAA,EAErC,yCAAyC;AAAA;AAAA,EAEzC,2CAA2C;AAAA;AAAA,EAE3C,uCAAuC;AAAA;AAAA,EAEvC,6CAA6C;AAAA;AAAA,EAE7C,6BAA6B;AAC/B;"}
1
+ {"version":3,"file":"resources7.js","sources":["../../src/core/variants/i18n/resources.ts"],"sourcesContent":["/**\n * Defined locale strings for variants, in US English.\n *\n * @internal\n */\nconst variantsLocaleStrings = {\n /** Label for the variants navigation row. */\n 'navbar.view-as': 'View as',\n /** Label for the version selector in the variants navigation row. */\n 'navbar.version': 'Version',\n /** Label for the variant selector in the variants navigation row. */\n 'navbar.variant': 'Variant',\n /** Default option label when no variant is selected. */\n 'navbar.variant.default': 'All users (Default)',\n /** Placeholder for the variant filter input in the dropdown. */\n 'navbar.variant.filter-placeholder': 'Filter variants…',\n /** Section header for non-default variants in the dropdown. */\n 'navbar.variant.other': 'Other variants',\n /** Label for clearing version and variant selections. */\n 'navbar.clear': 'Clear',\n /** Tooltip for clearing the selected variant. */\n 'navbar.variant.clear': 'Clear variant selection',\n /** Label for the Variants overview create action. */\n 'overview.action.create-variant': 'Create variant',\n /** Label for the Variants overview delete action. */\n 'overview.action.delete-variant': 'Delete variant',\n /** Error toast title when variant deletion fails. */\n 'overview.action.delete-variant.error.title': 'Unable to delete variant',\n /** Link label for Variants overview documentation (empty state). */\n 'overview.action.documentation': 'Documentation',\n /** Description for the Variants overview empty state. */\n 'overview.empty-state.description':\n 'Variant definitions describe how content is personalized for audiences, locales, segments, and more.',\n /** Description for the Variants overview. */\n 'overview.description':\n 'Manage variant definitions that control how content is personalized for different audiences, locales, and segments.',\n /** Error message for the Variants overview. */\n 'overview.error': 'Unable to load variants',\n /** Placeholder for the Variants overview search field. */\n 'overview.search.placeholder': 'Search variant definitions…',\n /** Column header for the variant title column in the overview table. */\n 'overview.table.variant': 'Variant',\n /** Column header for document count in the overview table. */\n 'overview.table.documents': 'Documents',\n /** Fallback text when a variant has no conditions. */\n 'overview.table.no-conditions': 'No conditions',\n /** Title for the Variants overview. */\n 'overview.title': 'Variants',\n /** Back action on the Variant detail page. */\n 'detail.back': 'Back to variants',\n /** Loading message on the Variant detail page. */\n 'detail.loading': 'Loading variant',\n /** Fallback text when a variant has no description. */\n 'detail.no-description': 'No description yet.',\n /** Description for the missing Variant detail page. */\n 'detail.not-found.description': 'The requested variant could not be found.',\n /** Title for the missing Variant detail page. */\n 'detail.not-found.title': 'Variant not found',\n /** Placeholder text on the Variant detail page. */\n 'detail.placeholder': 'Variant detail editing will be added in a future iteration.',\n /** Title for the create variant dialog. */\n 'dialog.create.title': 'Create variant',\n /** Confirm action for the create variant dialog. */\n 'dialog.create.action.confirm': 'Create variant',\n /** Add condition action for the create variant dialog. */\n 'dialog.create.action.add-condition': 'Add condition',\n /** Tooltip when add condition is disabled because the current row is incomplete. */\n 'dialog.create.action.add-condition.disabled-hint':\n 'Complete the current condition key and value before adding another.',\n /** Remove condition action for the create variant dialog. */\n 'dialog.create.remove-condition': 'Remove condition',\n /** Label for the variant title field in the create variant dialog. */\n 'dialog.create.variant-title.label': 'Title',\n /** Placeholder for the variant title field in the create variant dialog. */\n 'dialog.create.variant-title.placeholder': 'e.g. Loyal customers',\n /** Validation message when the variant title is missing. */\n 'dialog.create.variant-title.required': 'Title is required',\n /** Label for the description field in the create variant dialog. */\n 'dialog.create.description.label': 'Description',\n /** Placeholder for the description field in the create variant dialog. */\n 'dialog.create.description.placeholder': 'Describe who this variant targets',\n /** Title for the conditions section in the create variant dialog. */\n 'dialog.create.conditions.title': 'Conditions',\n /** Description for the conditions section in the create variant dialog. */\n 'dialog.create.conditions.description':\n 'Add key/value pairs that define when this variant applies.',\n /** Label for the condition key field in the create variant dialog. */\n 'dialog.create.condition-key.label': 'Key',\n /** Validation message when a condition key is repeated. */\n 'dialog.create.condition-key.duplicate': 'Condition keys must be unique',\n /** Placeholder for the condition key field in the create variant dialog. */\n 'dialog.create.condition-key.placeholder': 'e.g. audience',\n /** Label for the condition value field in the create variant dialog. */\n 'dialog.create.condition-value.label': 'Value',\n /** Placeholder for the condition value field in the create variant dialog. */\n 'dialog.create.condition-value.placeholder': 'e.g. loyal-customers',\n /** Error toast title when variant creation fails. */\n 'dialog.create.error.title': 'Unable to create variant',\n}\n\n/**\n * @alpha\n */\nexport type VariantsLocaleResourceKeys = keyof typeof variantsLocaleStrings\n\nexport default variantsLocaleStrings\n"],"names":["variantsLocaleStrings"],"mappings":"AAKA,MAAMA,wBAAwB;AAAA;AAAA,EAE5B,kBAAkB;AAAA;AAAA,EAElB,kBAAkB;AAAA;AAAA,EAElB,kBAAkB;AAAA;AAAA,EAElB,0BAA0B;AAAA;AAAA,EAE1B,qCAAqC;AAAA;AAAA,EAErC,wBAAwB;AAAA;AAAA,EAExB,gBAAgB;AAAA;AAAA,EAEhB,wBAAwB;AAAA;AAAA,EAExB,kCAAkC;AAAA;AAAA,EAElC,kCAAkC;AAAA;AAAA,EAElC,8CAA8C;AAAA;AAAA,EAE9C,iCAAiC;AAAA;AAAA,EAEjC,oCACE;AAAA;AAAA,EAEF,wBACE;AAAA;AAAA,EAEF,kBAAkB;AAAA;AAAA,EAElB,+BAA+B;AAAA;AAAA,EAE/B,0BAA0B;AAAA;AAAA,EAE1B,4BAA4B;AAAA;AAAA,EAE5B,gCAAgC;AAAA;AAAA,EAEhC,kBAAkB;AAAA;AAAA,EAElB,eAAe;AAAA;AAAA,EAEf,kBAAkB;AAAA;AAAA,EAElB,yBAAyB;AAAA;AAAA,EAEzB,gCAAgC;AAAA;AAAA,EAEhC,0BAA0B;AAAA;AAAA,EAE1B,sBAAsB;AAAA;AAAA,EAEtB,uBAAuB;AAAA;AAAA,EAEvB,gCAAgC;AAAA;AAAA,EAEhC,sCAAsC;AAAA;AAAA,EAEtC,oDACE;AAAA;AAAA,EAEF,kCAAkC;AAAA;AAAA,EAElC,qCAAqC;AAAA;AAAA,EAErC,2CAA2C;AAAA;AAAA,EAE3C,wCAAwC;AAAA;AAAA,EAExC,mCAAmC;AAAA;AAAA,EAEnC,yCAAyC;AAAA;AAAA,EAEzC,kCAAkC;AAAA;AAAA,EAElC,wCACE;AAAA;AAAA,EAEF,qCAAqC;AAAA;AAAA,EAErC,yCAAyC;AAAA;AAAA,EAEzC,2CAA2C;AAAA;AAAA,EAE3C,uCAAuC;AAAA;AAAA,EAEvC,6CAA6C;AAAA;AAAA,EAE7C,6BAA6B;AAC/B;"}
@@ -1,4 +1,4 @@
1
- var version = "5.27.0";
1
+ var version = "5.28.0-next.2+c4b5b4d587";
2
2
  let buildVersion;
3
3
  try {
4
4
  buildVersion = process.env.PKG_BUILD_VERSION;
@@ -7,7 +7,7 @@ try {
7
7
  try {
8
8
  buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
9
9
  // and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
10
- "5.27.0";
10
+ "5.28.0-next.2+c4b5b4d587";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.js CHANGED
@@ -78965,7 +78965,7 @@ function MentionUserMenuItem(props2) {
78965
78965
  let t8;
78966
78966
  return $[16] !== handleSelect || $[17] !== pressed || $[18] !== t1 || $[19] !== t7 ? (t8 = /* @__PURE__ */ jsx(MenuItem$1, { onClick: handleSelect, padding: 1, disabled: t1, pressed, children: t7 }), $[16] = handleSelect, $[17] = pressed, $[18] = t1, $[19] = t7, $[20] = t8) : t8 = $[20], t8;
78967
78967
  }
78968
- const StyledMenu$5 = styled(Menu).withConfig({
78968
+ const StyledMenu$6 = styled(Menu).withConfig({
78969
78969
  displayName: "StyledMenu",
78970
78970
  componentId: "sc-195clky-0"
78971
78971
  })`width:308px;border-radius:3px;`, IGNORED_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], NO_ASSIGNEE_OPTION = {
@@ -79056,7 +79056,7 @@ function AssigneeSelectionMenu(props2) {
79056
79056
  value
79057
79057
  } = props2;
79058
79058
  let t0;
79059
- $[0] !== onSelect || $[1] !== value ? (t0 = /* @__PURE__ */ jsx(StyledMenu$5, { children: /* @__PURE__ */ jsx(MentionsMenu, { onSelect, value }) }), $[0] = onSelect, $[1] = value, $[2] = t0) : t0 = $[2];
79059
+ $[0] !== onSelect || $[1] !== value ? (t0 = /* @__PURE__ */ jsx(StyledMenu$6, { children: /* @__PURE__ */ jsx(MentionsMenu, { onSelect, value }) }), $[0] = onSelect, $[1] = value, $[2] = t0) : t0 = $[2];
79060
79060
  let t1;
79061
79061
  $[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = {
79062
79062
  placement: "bottom",
@@ -81012,7 +81012,7 @@ const MENU_BUTTON_POPOVER_PROPS = {
81012
81012
  fallbackPlacements: ["bottom-end"],
81013
81013
  placement: "bottom-end",
81014
81014
  portal: !0
81015
- }, StyledMenu$4 = styled(Menu).withConfig({
81015
+ }, StyledMenu$5 = styled(Menu).withConfig({
81016
81016
  displayName: "StyledMenu",
81017
81017
  componentId: "sc-1p0npqq-0"
81018
81018
  })`width:220px;`;
@@ -81060,7 +81060,7 @@ function TasksHeaderDraftsMenu() {
81060
81060
  $[2] !== t ? (t1 = t("buttons.draft.text"), $[2] = t, $[3] = t1) : t1 = $[3];
81061
81061
  let t2;
81062
81062
  $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Button, { text: t1, mode: "ghost", iconRight: ChevronDownIcon }), $[4] = t1, $[5] = t2) : t2 = $[5];
81063
- const t3 = "edit-task-menu", T1 = StyledMenu$4;
81063
+ const t3 = "edit-task-menu", T1 = StyledMenu$5;
81064
81064
  let t4;
81065
81065
  $[6] !== t ? (t4 = t("panel.drafts.title"), $[6] = t, $[7] = t4) : t4 = $[7];
81066
81066
  let t5;
@@ -82333,7 +82333,7 @@ const ToolLink = forwardRef(function(props2, ref) {
82333
82333
  height: 4,
82334
82334
  borderRadius: 3,
82335
82335
  boxShadow: "0 0 0 1px var(--card-bg-color)"
82336
- }), OversizedButton$2 = styled(ToolLink).withConfig({
82336
+ }), OversizedButton$4 = styled(ToolLink).withConfig({
82337
82337
  displayName: "OversizedButton",
82338
82338
  componentId: "sc-1wfug2b-1"
82339
82339
  })`${oversizedButtonStyle}`;
@@ -82355,17 +82355,13 @@ function ReleasesToolLink() {
82355
82355
  backgroundColor: "var(--card-badge-critical-dot-color)"
82356
82356
  } }), $[4] = hasError, $[5] = t3) : t3 = $[5];
82357
82357
  let t4;
82358
- $[6] !== t1 || $[7] !== t2 || $[8] !== t3 ? (t4 = /* @__PURE__ */ jsx(Button$1, { as: OversizedButton$2, name: SCHEDULES_TOOL_NAME, "data-as": "a", icon: t1, mode: "bleed", padding: 2, radius: "full", "data-testid": "releases-tool-link", selected: t2, children: t3 }), $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4) : t4 = $[9];
82358
+ $[6] !== t1 || $[7] !== t2 || $[8] !== t3 ? (t4 = /* @__PURE__ */ jsx(Button$1, { as: OversizedButton$4, name: SCHEDULES_TOOL_NAME, "data-as": "a", icon: t1, mode: "bleed", padding: 2, radius: "full", "data-testid": "releases-tool-link", selected: t2, children: t3 }), $[6] = t1, $[7] = t2, $[8] = t3, $[9] = t4) : t4 = $[9];
82359
82359
  let t5;
82360
82360
  return $[10] !== t0 || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsx(Tooltip, { content: t0, children: t4 }), $[10] = t0, $[11] = t4, $[12] = t5) : t5 = $[12], t5;
82361
82361
  }
82362
82362
  function _temp$G(routerState) {
82363
82363
  return typeof routerState.tool == "string" ? routerState.tool : void 0;
82364
82364
  }
82365
- const OversizedButton$1 = styled(IntentLink).withConfig({
82366
- displayName: "OversizedButton",
82367
- componentId: "sc-1pt35p9-0"
82368
- })`${oversizedButtonStyle}`;
82369
82365
  function AnimatedTextWidth(t0) {
82370
82366
  const $ = c(18), {
82371
82367
  children,
@@ -82418,7 +82414,10 @@ function AnimatedTextWidth(t0) {
82418
82414
  let t13;
82419
82415
  return $[14] !== t12 || $[15] !== t7 || $[16] !== t9 ? (t13 = /* @__PURE__ */ jsx(motion.div, { style: t7, animate: t9, transition: t10, onAnimationStart, onAnimationComplete, children: t12 }), $[14] = t12, $[15] = t7, $[16] = t9, $[17] = t13) : t13 = $[17], t13;
82420
82416
  }
82421
- const ReleasesLink = (t0) => {
82417
+ const OversizedButton$3 = styled(IntentLink).withConfig({
82418
+ displayName: "OversizedButton",
82419
+ componentId: "sc-1pt35p9-0"
82420
+ })`${oversizedButtonStyle}`, ReleasesLink = (t0) => {
82422
82421
  const $ = c(10), {
82423
82422
  selectedPerspective
82424
82423
  } = t0, {
@@ -82430,7 +82429,7 @@ const ReleasesLink = (t0) => {
82430
82429
  children,
82431
82430
  ...intentProps
82432
82431
  } = t22;
82433
- return /* @__PURE__ */ jsx(OversizedButton$1, { ...intentProps, ref: linkRef, intent: RELEASES_INTENT, params: {
82432
+ return /* @__PURE__ */ jsx(OversizedButton$3, { ...intentProps, ref: linkRef, intent: RELEASES_INTENT, params: {
82434
82433
  id: getReleaseIdFromReleaseDocumentId(selectedPerspective._id)
82435
82434
  }, children });
82436
82435
  }), $[0] = selectedPerspective._id, $[1] = t1) : t1 = $[1];
@@ -83083,10 +83082,10 @@ const useScrollIndicatorVisibility = () => {
83083
83082
  setScrollContainer,
83084
83083
  scrollElementRef
83085
83084
  }, $[5] = isRangeVisible, $[6] = t5) : t5 = $[6], t5;
83086
- }, StyledMenu$3 = styled(Menu).withConfig({
83085
+ }, StyledMenu$4 = styled(Menu).withConfig({
83087
83086
  displayName: "StyledMenu",
83088
83087
  componentId: "sc-3ke5c8-0"
83089
- })`min-width:200px;max-width:320px;> [data-ui='Stack']{gap:0;}`, OversizedButton = styled(Button$1).withConfig({
83088
+ })`min-width:200px;max-width:320px;> [data-ui='Stack']{gap:0;}`, OversizedButton$2 = styled(Button$1).withConfig({
83090
83089
  displayName: "OversizedButton",
83091
83090
  componentId: "sc-3ke5c8-1"
83092
83091
  })`${oversizedButtonStyle}`;
@@ -83119,9 +83118,9 @@ function GlobalPerspectiveMenu(t0) {
83119
83118
  }, $[3] = t3) : t3 = $[3];
83120
83119
  const handleClose = t3;
83121
83120
  let t4;
83122
- $[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsx(OversizedButton, { "data-testid": "global-perspective-menu-button", iconRight: ChevronDownIcon, mode: "bleed", padding: 2, radius: "full" }), $[4] = t4) : t4 = $[4];
83121
+ $[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = /* @__PURE__ */ jsx(OversizedButton$2, { "data-testid": "global-perspective-menu-button", iconRight: ChevronDownIcon, mode: "bleed", padding: 2, radius: "full" }), $[4] = t4) : t4 = $[4];
83123
83122
  let t5;
83124
- $[5] !== areReleasesEnabled || $[6] !== handleOpenBundleDialog || $[7] !== isRangeVisible || $[8] !== menuItemProps || $[9] !== scrollElementRef || $[10] !== selectedPerspectiveName || $[11] !== setScrollContainer ? (t5 = /* @__PURE__ */ jsx(StyledMenu$3, { "data-testid": "release-menu", ref: styledMenuRef, padding: 0, children: /* @__PURE__ */ jsx(ReleasesList, { areReleasesEnabled, setScrollContainer, isRangeVisible, scrollElementRef, selectedPerspectiveName, handleOpenBundleDialog, menuItemProps }) }), $[5] = areReleasesEnabled, $[6] = handleOpenBundleDialog, $[7] = isRangeVisible, $[8] = menuItemProps, $[9] = scrollElementRef, $[10] = selectedPerspectiveName, $[11] = setScrollContainer, $[12] = t5) : t5 = $[12];
83123
+ $[5] !== areReleasesEnabled || $[6] !== handleOpenBundleDialog || $[7] !== isRangeVisible || $[8] !== menuItemProps || $[9] !== scrollElementRef || $[10] !== selectedPerspectiveName || $[11] !== setScrollContainer ? (t5 = /* @__PURE__ */ jsx(StyledMenu$4, { "data-testid": "release-menu", ref: styledMenuRef, padding: 0, children: /* @__PURE__ */ jsx(ReleasesList, { areReleasesEnabled, setScrollContainer, isRangeVisible, scrollElementRef, selectedPerspectiveName, handleOpenBundleDialog, menuItemProps }) }), $[5] = areReleasesEnabled, $[6] = handleOpenBundleDialog, $[7] = isRangeVisible, $[8] = menuItemProps, $[9] = scrollElementRef, $[10] = selectedPerspectiveName, $[11] = setScrollContainer, $[12] = t5) : t5 = $[12];
83125
83124
  let t6;
83126
83125
  $[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = [0, 0, 32, 0], $[13] = t6) : t6 = $[13];
83127
83126
  let t7;
@@ -83176,49 +83175,276 @@ const ReleasesNavContainer = styled(Card).withConfig({
83176
83175
  t3,
83177
83176
  t5
83178
83177
  ] }), $[9] = border, $[10] = t2, $[11] = t3, $[12] = t5, $[13] = t6) : t6 = $[13], t6;
83179
- }, ReleaseNavContainer = styled(Card).withConfig({
83180
- displayName: "ReleaseNavContainer",
83178
+ }, RhombusIcon = forwardRef(function(props2, ref) {
83179
+ const $ = c(4);
83180
+ let t0;
83181
+ $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx("path", { d: "M10.5 3.78L17.22 10.5L10.5 17.22L3.78 10.5L10.5 3.78Z", stroke: "currentColor", strokeWidth: 1.2, strokeLinejoin: "round" }), $[0] = t0) : t0 = $[0];
83182
+ let t1;
83183
+ return $[1] !== props2 || $[2] !== ref ? (t1 = /* @__PURE__ */ jsx("svg", { "data-sanity-icon": "rhombus", width: "1em", height: "1em", viewBox: "0 0 21 21", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props2, ref, children: t0 }), $[1] = props2, $[2] = ref, $[3] = t1) : t1 = $[3], t1;
83184
+ }), OversizedButton$1 = styled(IntentLink).withConfig({
83185
+ displayName: "OversizedButton",
83186
+ componentId: "sc-1ima4yx-0"
83187
+ })`${oversizedButtonStyle}`;
83188
+ function VariantDetailLink(t0) {
83189
+ const $ = c(10), {
83190
+ variant
83191
+ } = t0;
83192
+ let t1;
83193
+ $[0] !== variant._id ? (t1 = getVariantId(variant._id), $[0] = variant._id, $[1] = t1) : t1 = $[1];
83194
+ const encodedVariantId = t1;
83195
+ let t2;
83196
+ $[2] !== encodedVariantId ? (t2 = forwardRef(function(linkProps, ref) {
83197
+ return /* @__PURE__ */ jsx(OversizedButton$1, { ...linkProps, ref, intent: VARIANTS_INTENT, params: {
83198
+ id: encodedVariantId
83199
+ } });
83200
+ }), $[2] = encodedVariantId, $[3] = t2) : t2 = $[3];
83201
+ const VariantLink = t2;
83202
+ let t3;
83203
+ $[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = {
83204
+ maxWidth: "180px"
83205
+ }, $[4] = t3) : t3 = $[4];
83206
+ let t4;
83207
+ $[5] !== variant ? (t4 = getVariantTitle(variant), $[5] = variant, $[6] = t4) : t4 = $[6];
83208
+ let t5;
83209
+ return $[7] !== VariantLink || $[8] !== t4 ? (t5 = /* @__PURE__ */ jsx(Button$1, { as: VariantLink, "data-as": "a", "data-testid": "variants-nav-label-link", icon: RhombusIcon, mode: "bleed", padding: 2, radius: "full", style: t3, text: t4 }), $[7] = VariantLink, $[8] = t4, $[9] = t5) : t5 = $[9], t5;
83210
+ }
83211
+ function CurrentVariantLabel(t0) {
83212
+ const $ = c(6), {
83213
+ selectedVariant
83214
+ } = t0, {
83215
+ t
83216
+ } = useTranslation(variantsLocaleNamespace), animationKey = selectedVariant?._id ?? "default";
83217
+ let t1;
83218
+ $[0] !== selectedVariant || $[1] !== t ? (t1 = selectedVariant ? /* @__PURE__ */ jsx(VariantDetailLink, { variant: selectedVariant }) : /* @__PURE__ */ jsx(Box, { padding: 2, style: {
83219
+ userSelect: "none",
83220
+ overflow: "hidden"
83221
+ }, children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, children: [
83222
+ /* @__PURE__ */ jsx(Text$1, { size: 0, children: /* @__PURE__ */ jsx(RhombusIcon, {}) }),
83223
+ /* @__PURE__ */ jsx(Text$1, { "data-testid": "variants-nav-label", size: 1, textOverflow: "ellipsis", weight: "medium", children: t("navbar.variant.default") })
83224
+ ] }) }), $[0] = selectedVariant, $[1] = t, $[2] = t1) : t1 = $[2];
83225
+ let t2;
83226
+ return $[3] !== animationKey || $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(AnimatedTextWidth, { text: animationKey, children: t1 }), $[3] = animationKey, $[4] = t1, $[5] = t2) : t2 = $[5], t2;
83227
+ }
83228
+ const StyledMenu$3 = styled(Menu).withConfig({
83229
+ displayName: "StyledMenu",
83230
+ componentId: "sc-1cdn8fr-0"
83231
+ })`min-width:240px;max-width:320px;> [data-ui='Stack']{gap:0;}`, SectionHeader = styled(Text$1).withConfig({
83232
+ displayName: "SectionHeader",
83233
+ componentId: "sc-1cdn8fr-1"
83234
+ })`text-transform:uppercase;letter-spacing:0.04em;`, OversizedButton = styled(Button$1).withConfig({
83235
+ displayName: "OversizedButton",
83236
+ componentId: "sc-1cdn8fr-2"
83237
+ })`${oversizedButtonStyle}`;
83238
+ function VariantsMenu() {
83239
+ const $ = c(44), {
83240
+ t
83241
+ } = useTranslation(variantsLocaleNamespace), router = useRouter(), {
83242
+ data: variants2
83243
+ } = useAllVariants(), [filterQuery, setFilterQuery] = useState(""), t0 = router.stickyParams.variant ?? void 0;
83244
+ let t1;
83245
+ $[0] !== t0 ? (t1 = decodeVariantIdFromRoute(t0), $[0] = t0, $[1] = t1) : t1 = $[1];
83246
+ const selectedVariantDocumentId = t1;
83247
+ let t2;
83248
+ $[2] !== selectedVariantDocumentId || $[3] !== variants2 ? (t2 = selectedVariantDocumentId ? variants2.find((variant) => variant._id === selectedVariantDocumentId) : void 0, $[2] = selectedVariantDocumentId, $[3] = variants2, $[4] = t2) : t2 = $[4];
83249
+ const selectedVariant = t2;
83250
+ let t3;
83251
+ $[5] !== filterQuery || $[6] !== variants2 ? (t3 = filterVariantsForSearch(variants2, filterQuery), $[5] = filterQuery, $[6] = variants2, $[7] = t3) : t3 = $[7];
83252
+ const filteredVariants = t3;
83253
+ let t4;
83254
+ $[8] !== router ? (t4 = (variant_0) => {
83255
+ router.navigate({
83256
+ stickyParams: {
83257
+ variant: variant_0 ? getVariantId(variant_0._id) : null
83258
+ }
83259
+ });
83260
+ }, $[8] = router, $[9] = t4) : t4 = $[9];
83261
+ const setVariantSelection = t4;
83262
+ let t5;
83263
+ $[10] !== setVariantSelection ? (t5 = () => {
83264
+ setVariantSelection(void 0), setFilterQuery("");
83265
+ }, $[10] = setVariantSelection, $[11] = t5) : t5 = $[11];
83266
+ const handleSelectDefault = t5;
83267
+ let t6;
83268
+ $[12] !== setVariantSelection ? (t6 = (variant_1) => {
83269
+ setVariantSelection(variant_1), setFilterQuery("");
83270
+ }, $[12] = setVariantSelection, $[13] = t6) : t6 = $[13];
83271
+ const handleSelectVariant = t6;
83272
+ let t7;
83273
+ $[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = (event) => {
83274
+ setFilterQuery(event.currentTarget.value);
83275
+ }, $[14] = t7) : t7 = $[14];
83276
+ const handleFilterChange = t7;
83277
+ let t8;
83278
+ $[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t8 = () => {
83279
+ setFilterQuery("");
83280
+ }, $[15] = t8) : t8 = $[15];
83281
+ const handleMenuClose = t8, isDefaultSelected = !selectedVariant;
83282
+ let t9;
83283
+ $[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = /* @__PURE__ */ jsx(OversizedButton, { "data-testid": "variants-nav-menu-button", iconRight: ChevronDownIcon, mode: "bleed", padding: 2, radius: "full" }), $[16] = t9) : t9 = $[16];
83284
+ let t10;
83285
+ $[17] !== t ? (t10 = t("navbar.variant.filter-placeholder"), $[17] = t, $[18] = t10) : t10 = $[18];
83286
+ let t11;
83287
+ $[19] !== filterQuery || $[20] !== t10 ? (t11 = /* @__PURE__ */ jsx(Box, { padding: 2, children: /* @__PURE__ */ jsx(TextInput$1, { fontSize: 1, onChange: handleFilterChange, placeholder: t10, radius: 2, value: filterQuery }) }), $[19] = filterQuery, $[20] = t10, $[21] = t11) : t11 = $[21];
83288
+ let t12;
83289
+ $[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(MenuDivider, {}), $[22] = t12) : t12 = $[22];
83290
+ let t13;
83291
+ $[23] !== t ? (t13 = t("navbar.variant.default"), $[23] = t, $[24] = t13) : t13 = $[24];
83292
+ let t14;
83293
+ $[25] !== handleSelectDefault || $[26] !== isDefaultSelected || $[27] !== t13 ? (t14 = /* @__PURE__ */ jsx(MenuItem, { "data-testid": "variant-default", icon: RhombusIcon, onClick: handleSelectDefault, pressed: isDefaultSelected, selected: isDefaultSelected, text: t13 }), $[25] = handleSelectDefault, $[26] = isDefaultSelected, $[27] = t13, $[28] = t14) : t14 = $[28];
83294
+ let t15;
83295
+ $[29] !== filteredVariants || $[30] !== handleSelectVariant || $[31] !== selectedVariant?._id || $[32] !== t ? (t15 = filteredVariants.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
83296
+ /* @__PURE__ */ jsx(Box, { padding: 3, paddingBottom: 2, children: /* @__PURE__ */ jsx(SectionHeader, { muted: !0, size: 0, weight: "medium", children: t("navbar.variant.other") }) }),
83297
+ filteredVariants.map((variant_2) => {
83298
+ const isSelected = selectedVariant?._id === variant_2._id;
83299
+ return /* @__PURE__ */ jsx(MenuItem, { "data-testid": `variant-${getVariantId(variant_2._id)}`, icon: RhombusIcon, onClick: () => handleSelectVariant(variant_2), pressed: isSelected, selected: isSelected, text: getVariantTitle(variant_2) }, variant_2._id);
83300
+ })
83301
+ ] }), $[29] = filteredVariants, $[30] = handleSelectVariant, $[31] = selectedVariant?._id, $[32] = t, $[33] = t15) : t15 = $[33];
83302
+ let t16;
83303
+ $[34] !== t11 || $[35] !== t14 || $[36] !== t15 ? (t16 = /* @__PURE__ */ jsxs(StyledMenu$3, { "data-testid": "variants-nav-menu", padding: 0, children: [
83304
+ t11,
83305
+ t12,
83306
+ t14,
83307
+ t15
83308
+ ] }), $[34] = t11, $[35] = t14, $[36] = t15, $[37] = t16) : t16 = $[37];
83309
+ let t17;
83310
+ $[38] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t17 = [0, 0, 32, 0], $[38] = t17) : t17 = $[38];
83311
+ let t18;
83312
+ $[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t18 = ["bottom-end"], $[39] = t18) : t18 = $[39];
83313
+ let t19;
83314
+ $[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t19 = {
83315
+ overflow: "hidden"
83316
+ }, $[40] = t19) : t19 = $[40];
83317
+ let t20;
83318
+ $[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = {
83319
+ __unstable_margins: t17,
83320
+ constrainSize: !0,
83321
+ fallbackPlacements: t18,
83322
+ placement: "bottom-end",
83323
+ portal: !0,
83324
+ style: t19,
83325
+ tone: "default",
83326
+ zOffset: 3e3
83327
+ }, $[41] = t20) : t20 = $[41];
83328
+ let t21;
83329
+ return $[42] !== t16 ? (t21 = /* @__PURE__ */ jsx(MenuButton, { button: t9, id: "variants-nav-menu", onClose: handleMenuClose, menu: t16, popover: t20 }), $[42] = t16, $[43] = t21) : t21 = $[43], t21;
83330
+ }
83331
+ const VariantsNavContainer = styled(Card).withConfig({
83332
+ displayName: "VariantsNavContainer",
83333
+ componentId: "sc-1bbf04-0"
83334
+ })`position:relative;display:flex;&:not([hidden]){display:flex;}align-items:center;gap:2px;padding:2px;margin:-3px 0;a:hover,button:hover{position:relative;z-index:2;}`;
83335
+ function VariantsNav() {
83336
+ const $ = c(8), router = useRouter(), {
83337
+ byId
83338
+ } = useAllVariants();
83339
+ let t0;
83340
+ if ($[0] !== byId || $[1] !== router.stickyParams.variant) {
83341
+ const selectedVariantDocumentId = decodeVariantIdFromRoute(router.stickyParams.variant ?? void 0);
83342
+ t0 = selectedVariantDocumentId ? byId.get(selectedVariantDocumentId) : void 0, $[0] = byId, $[1] = router.stickyParams.variant, $[2] = t0;
83343
+ } else
83344
+ t0 = $[2];
83345
+ const selectedVariant = t0;
83346
+ let t1;
83347
+ $[3] !== selectedVariant ? (t1 = /* @__PURE__ */ jsx(CurrentVariantLabel, { selectedVariant }), $[3] = selectedVariant, $[4] = t1) : t1 = $[4];
83348
+ let t2;
83349
+ $[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx(VariantsMenu, {}), $[5] = t2) : t2 = $[5];
83350
+ let t3;
83351
+ return $[6] !== t1 ? (t3 = /* @__PURE__ */ jsxs(VariantsNavContainer, { flex: "none", tone: "inherit", radius: "full", "data-ui": "VariantsNav", children: [
83352
+ t1,
83353
+ t2
83354
+ ] }), $[6] = t1, $[7] = t3) : t3 = $[7], t3;
83355
+ }
83356
+ const NavRowContainer = styled(Card).withConfig({
83357
+ displayName: "NavRowContainer",
83181
83358
  componentId: "sc-t5zhvx-0"
83182
- })`[data-ui='ReleasesNav']{margin:0;}`;
83359
+ })`[data-ui='ReleasesNav'],[data-ui='VariantsNav']{margin:0;}`;
83183
83360
  function VariantsStudioNavbar(props2) {
83184
- const $ = c(24), {
83361
+ const $ = c(46), {
83185
83362
  t
83186
83363
  } = useTranslation(variantsLocaleNamespace), {
83187
83364
  selectedPerspective
83188
- } = usePerspective();
83365
+ } = usePerspective(), router = useRouter(), hasVariantSelection = !!router.stickyParams.variant;
83189
83366
  let t0;
83190
- $[0] !== props2 ? (t0 = props2.renderDefault(props2), $[0] = props2, $[1] = t0) : t0 = $[1];
83367
+ $[0] !== selectedPerspective ? (t0 = !isDraftPerspective(selectedPerspective) && !isPublishedPerspective(selectedPerspective), $[0] = selectedPerspective, $[1] = t0) : t0 = $[1];
83368
+ const canClear = hasVariantSelection || t0;
83191
83369
  let t1;
83192
- $[2] !== t ? (t1 = t("navbar.view-as"), $[2] = t, $[3] = t1) : t1 = $[3];
83370
+ $[2] !== router ? (t1 = () => {
83371
+ router.navigate({
83372
+ stickyParams: {
83373
+ excludedPerspectives: null,
83374
+ perspective: "",
83375
+ variant: null
83376
+ }
83377
+ });
83378
+ }, $[2] = router, $[3] = t1) : t1 = $[3];
83379
+ const handleClearViewAs = t1;
83193
83380
  let t2;
83194
- $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: t1 }), $[4] = t1, $[5] = t2) : t2 = $[5];
83381
+ $[4] !== props2 ? (t2 = props2.renderDefault(props2), $[4] = props2, $[5] = t2) : t2 = $[5];
83195
83382
  let t3;
83196
- $[6] !== selectedPerspective ? (t3 = getReleaseTone(selectedPerspective), $[6] = selectedPerspective, $[7] = t3) : t3 = $[7];
83383
+ $[6] !== t ? (t3 = t("navbar.view-as"), $[6] = t, $[7] = t3) : t3 = $[7];
83197
83384
  let t4;
83198
- $[8] !== t ? (t4 = t("navbar.version"), $[8] = t, $[9] = t4) : t4 = $[9];
83385
+ $[8] !== t3 ? (t4 = /* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: t3 }), $[8] = t3, $[9] = t4) : t4 = $[9];
83199
83386
  let t5;
83200
- $[10] !== t4 ? (t5 = /* @__PURE__ */ jsx(Card, { borderRight: !0, tone: "inherit", children: /* @__PURE__ */ jsx(Flex, { align: "center", paddingX: 2, height: "fill", children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: t4 }) }) }), $[10] = t4, $[11] = t5) : t5 = $[11];
83387
+ $[10] !== selectedPerspective ? (t5 = getReleaseTone(selectedPerspective), $[10] = selectedPerspective, $[11] = t5) : t5 = $[11];
83201
83388
  let t6;
83202
- $[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = /* @__PURE__ */ jsx(ReleasesNav, { withReleasesToolButton: !0, border: !1 }), $[12] = t6) : t6 = $[12];
83389
+ $[12] !== t ? (t6 = t("navbar.version"), $[12] = t, $[13] = t6) : t6 = $[13];
83203
83390
  let t7;
83204
- $[13] !== t5 ? (t7 = /* @__PURE__ */ jsxs(Flex, { marginLeft: 1, children: [
83205
- t5,
83206
- t6
83207
- ] }), $[13] = t5, $[14] = t7) : t7 = $[14];
83391
+ $[14] !== t6 ? (t7 = /* @__PURE__ */ jsx(Card, { borderRight: !0, tone: "inherit", children: /* @__PURE__ */ jsx(Flex, { align: "center", paddingX: 2, height: "fill", children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: t6 }) }) }), $[14] = t6, $[15] = t7) : t7 = $[15];
83208
83392
  let t8;
83209
- $[15] !== t3 || $[16] !== t7 ? (t8 = /* @__PURE__ */ jsx(ReleaseNavContainer, { tone: t3, border: !0, radius: 4, paddingLeft: 1, children: t7 }), $[15] = t3, $[16] = t7, $[17] = t8) : t8 = $[17];
83393
+ $[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsx(ReleasesNav, { withReleasesToolButton: !0, border: !1 }), $[16] = t8) : t8 = $[16];
83210
83394
  let t9;
83211
- $[18] !== t2 || $[19] !== t8 ? (t9 = /* @__PURE__ */ jsx(Card, { tone: "neutral", paddingY: 2, paddingX: 3, borderBottom: !0, children: /* @__PURE__ */ jsxs(Flex, { justify: "center", align: "center", gap: 2, children: [
83212
- t2,
83395
+ $[17] !== t7 ? (t9 = /* @__PURE__ */ jsxs(Flex, { marginLeft: 1, children: [
83396
+ t7,
83213
83397
  t8
83214
- ] }) }), $[18] = t2, $[19] = t8, $[20] = t9) : t9 = $[20];
83398
+ ] }), $[17] = t7, $[18] = t9) : t9 = $[18];
83215
83399
  let t10;
83216
- return $[21] !== t0 || $[22] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
83217
- t0,
83218
- t9
83219
- ] }), $[21] = t0, $[22] = t9, $[23] = t10) : t10 = $[23], t10;
83400
+ $[19] !== t5 || $[20] !== t9 ? (t10 = /* @__PURE__ */ jsx(NavRowContainer, { tone: t5, border: !0, radius: 4, paddingLeft: 1, children: t9 }), $[19] = t5, $[20] = t9, $[21] = t10) : t10 = $[21];
83401
+ const t11 = hasVariantSelection ? "suggest" : "default";
83402
+ let t12;
83403
+ $[22] !== t ? (t12 = t("navbar.variant"), $[22] = t, $[23] = t12) : t12 = $[23];
83404
+ let t13;
83405
+ $[24] !== t12 ? (t13 = /* @__PURE__ */ jsx(Card, { borderRight: !0, tone: "inherit", children: /* @__PURE__ */ jsx(Flex, { align: "center", paddingX: 2, height: "fill", children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: t12 }) }) }), $[24] = t12, $[25] = t13) : t13 = $[25];
83406
+ let t14;
83407
+ $[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(VariantsNav, {}), $[26] = t14) : t14 = $[26];
83408
+ let t15;
83409
+ $[27] !== t13 ? (t15 = /* @__PURE__ */ jsxs(Flex, { marginLeft: 1, children: [
83410
+ t13,
83411
+ t14
83412
+ ] }), $[27] = t13, $[28] = t15) : t15 = $[28];
83413
+ let t16;
83414
+ $[29] !== t11 || $[30] !== t15 ? (t16 = /* @__PURE__ */ jsx(NavRowContainer, { tone: t11, border: !0, radius: 4, paddingLeft: 1, children: t15 }), $[29] = t11, $[30] = t15, $[31] = t16) : t16 = $[31];
83415
+ let t17;
83416
+ $[32] !== canClear || $[33] !== handleClearViewAs || $[34] !== t ? (t17 = canClear && /* @__PURE__ */ jsx(motion.div, { animate: {
83417
+ clipPath: "inset(0 0% 0 0%)",
83418
+ opacity: 1
83419
+ }, exit: {
83420
+ clipPath: "inset(0 50% 0 50%)",
83421
+ opacity: 0
83422
+ }, initial: {
83423
+ clipPath: "inset(0 50% 0 50%)",
83424
+ opacity: 0
83425
+ }, style: {
83426
+ display: "flex"
83427
+ }, transition: {
83428
+ type: "spring",
83429
+ bounce: 0,
83430
+ duration: 0.3
83431
+ }, children: /* @__PURE__ */ jsx(Button, { "data-testid": "view-as-clear-button", mode: "bleed", onClick: handleClearViewAs, text: t("navbar.clear") }) }, "view-as-clear-button"), $[32] = canClear, $[33] = handleClearViewAs, $[34] = t, $[35] = t17) : t17 = $[35];
83432
+ let t18;
83433
+ $[36] !== t17 ? (t18 = /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, children: t17 }), $[36] = t17, $[37] = t18) : t18 = $[37];
83434
+ let t19;
83435
+ $[38] !== t10 || $[39] !== t16 || $[40] !== t18 || $[41] !== t4 ? (t19 = /* @__PURE__ */ jsx(Card, { tone: "neutral", paddingY: 2, paddingX: 3, borderBottom: !0, children: /* @__PURE__ */ jsxs(Flex, { justify: "center", align: "center", gap: 2, children: [
83436
+ t4,
83437
+ t10,
83438
+ t16,
83439
+ t18
83440
+ ] }) }), $[38] = t10, $[39] = t16, $[40] = t18, $[41] = t4, $[42] = t19) : t19 = $[42];
83441
+ let t20;
83442
+ return $[43] !== t19 || $[44] !== t2 ? (t20 = /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
83443
+ t2,
83444
+ t19
83445
+ ] }), $[43] = t19, $[44] = t2, $[45] = t20) : t20 = $[45], t20;
83220
83446
  }
83221
- const VARIANTS_NAME = "sanity/variants", VARIANTS_TOOL_NAME = "variants", variants = definePlugin({
83447
+ const VARIANTS_NAME = "sanity/variants", VARIANTS_INTENT = "variant", VARIANTS_TOOL_NAME = "variants", variants = definePlugin({
83222
83448
  name: VARIANTS_NAME,
83223
83449
  studio: {
83224
83450
  components: {
@@ -83230,7 +83456,13 @@ const VARIANTS_NAME = "sanity/variants", VARIANTS_TOOL_NAME = "variants", varian
83230
83456
  title: "Variants",
83231
83457
  component: VariantsTool,
83232
83458
  router: route.create("/", [route.create("/:variantId")]),
83233
- __internalApplicationType: VARIANTS_NAME
83459
+ __internalApplicationType: VARIANTS_NAME,
83460
+ canHandleIntent: (intent) => intent === VARIANTS_INTENT,
83461
+ getIntentState(intent, params) {
83462
+ return intent === VARIANTS_INTENT ? {
83463
+ variantId: params.id
83464
+ } : null;
83465
+ }
83234
83466
  }],
83235
83467
  i18n: {
83236
83468
  bundles: [variantsUsEnglishLocaleBundle]