sanity 5.27.0 → 5.28.0-next.10

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,7 +3,7 @@ import { SanityDocument } from "@sanity/types";
3
3
  import { ClientPerspective, StackablePerspective } from "@sanity/client";
4
4
  import { Observable } from "rxjs";
5
5
  import { DocumentStore, DocumentValuePermission, PermissionCheckResult, SanityClient as SanityClient$1 } from "sanity";
6
- import { PreviewUrlResolver } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+preview-url-secret@4.0.5_@sanity+client@7.22.0/node_modules/@sanity/preview-url-secret/dist/define-preview-url.js";
6
+ import { PreviewUrlResolver } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+preview-url-secret@4.0.6_@sanity+client@7.22.0/node_modules/@sanity/preview-url-secret/dist/define-preview-url.js";
7
7
  import * as _$xstate from "xstate";
8
8
  import { ActorRefFrom } from "xstate";
9
9
  interface Context$2 {
@@ -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.10+9dea35af2b";
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.10+9dea35af2b";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
package/lib/index.js CHANGED
@@ -21393,14 +21393,14 @@ const NestedDialogOpened = defineEvent({
21393
21393
  name: "Removed Object in Array List",
21394
21394
  version: 1,
21395
21395
  description: "User removed a object from an array list via actions"
21396
- }), OpenedPortableTextEditorFullScreen = defineEvent({
21397
- name: "Opened Portable Text Editor Full Screen in Nested Object Dialog",
21396
+ }), NestedDialogEditorOpened = defineEvent({
21397
+ name: "Editor Opened",
21398
21398
  version: 1,
21399
- description: "User opened a portable text editor in full screen mode in a object dialog"
21400
- }), ClosedPortableTextEditorFullScreen = defineEvent({
21401
- name: "Closed Portable Text Editor Full Screen in Nested Object Dialog",
21399
+ description: "User opened a fullscreen Portable Text Editor inside a nested object dialog"
21400
+ }), NestedDialogEditorClosed = defineEvent({
21401
+ name: "Editor Closed",
21402
21402
  version: 1,
21403
- description: "User closed a portable text editor in full screen mode in a object dialog"
21403
+ description: "User closed a fullscreen Portable Text Editor inside a nested object dialog"
21404
21404
  });
21405
21405
  function useEnhancedObjectDialog() {
21406
21406
  return useContext(EnhancedObjectDialogContext);
@@ -34139,7 +34139,7 @@ function Compositor(props2) {
34139
34139
  return $[165] !== portal.element || $[166] !== portalElements || $[167] !== t31 ? (t32 = /* @__PURE__ */ jsx(SelectedAnnotationsProvider, { children: /* @__PURE__ */ jsx(PortalProvider, { __unstable_elements: portalElements, element: t17, children: t31 }) }), $[165] = portal.element, $[166] = portalElements, $[167] = t31, $[168] = t32) : t32 = $[168], t32;
34140
34140
  }
34141
34141
  function FullscreenPTEProvider(t0) {
34142
- const $ = c(17), {
34142
+ const $ = c(16), {
34143
34143
  children
34144
34144
  } = t0;
34145
34145
  let t1;
@@ -34151,29 +34151,39 @@ function FullscreenPTEProvider(t0) {
34151
34151
  $[1] !== fullscreenPaths ? (t2 = (path) => fullscreenPaths.find((savedPath) => savedPath === pathToString(path)) ?? void 0, $[1] = fullscreenPaths, $[2] = t2) : t2 = $[2];
34152
34152
  const getFullscreenPath = t2;
34153
34153
  let t3;
34154
- $[3] !== enhancedObjectDialogEnabled || $[4] !== fullscreenPaths || $[5] !== telemetry ? (t3 = (path_0, isFullscreen) => {
34155
- isFullscreen ? (telemetry.log(OpenedPortableTextEditorFullScreen, {
34156
- path: pathToString(path_0),
34157
- origin: enhancedObjectDialogEnabled ? "nested-object" : "default"
34158
- }), setFullscreenPaths([...fullscreenPaths, pathToString(path_0)])) : (telemetry.log(ClosedPortableTextEditorFullScreen, {
34159
- path: pathToString(path_0),
34160
- origin: enhancedObjectDialogEnabled ? "nested-object" : "default"
34161
- }), setFullscreenPaths(fullscreenPaths.filter((savedPath_0) => savedPath_0 !== pathToString(path_0))));
34162
- }, $[3] = enhancedObjectDialogEnabled, $[4] = fullscreenPaths, $[5] = telemetry, $[6] = t3) : t3 = $[6];
34154
+ $[3] !== enhancedObjectDialogEnabled || $[4] !== telemetry ? (t3 = (path_0, isFullscreen) => {
34155
+ const pathString = pathToString(path_0);
34156
+ setFullscreenPaths((currentPaths) => {
34157
+ const alreadyOpen = currentPaths.includes(pathString);
34158
+ return isFullscreen ? alreadyOpen ? currentPaths : (telemetry.log(NestedDialogEditorOpened, {
34159
+ path: pathString,
34160
+ origin: enhancedObjectDialogEnabled ? "nested-object" : "default",
34161
+ editor_type: "pte",
34162
+ fullscreen: !0,
34163
+ location: "nested_object_dialog"
34164
+ }), [...currentPaths, pathString]) : alreadyOpen ? (telemetry.log(NestedDialogEditorClosed, {
34165
+ path: pathString,
34166
+ origin: enhancedObjectDialogEnabled ? "nested-object" : "default",
34167
+ editor_type: "pte",
34168
+ fullscreen: !0,
34169
+ location: "nested_object_dialog"
34170
+ }), currentPaths.filter((savedPath_0) => savedPath_0 !== pathString)) : currentPaths;
34171
+ });
34172
+ }, $[3] = enhancedObjectDialogEnabled, $[4] = telemetry, $[5] = t3) : t3 = $[5];
34163
34173
  const setFullscreenPath = t3;
34164
34174
  let t4;
34165
- $[7] !== fullscreenPaths ? (t4 = () => fullscreenPaths.length > 0, $[7] = fullscreenPaths, $[8] = t4) : t4 = $[8];
34175
+ $[6] !== fullscreenPaths ? (t4 = () => fullscreenPaths.length > 0, $[6] = fullscreenPaths, $[7] = t4) : t4 = $[7];
34166
34176
  const hasAnyFullscreen = t4;
34167
34177
  let t5;
34168
- $[9] !== fullscreenPaths || $[10] !== getFullscreenPath || $[11] !== hasAnyFullscreen || $[12] !== setFullscreenPath ? (t5 = {
34178
+ $[8] !== fullscreenPaths || $[9] !== getFullscreenPath || $[10] !== hasAnyFullscreen || $[11] !== setFullscreenPath ? (t5 = {
34169
34179
  getFullscreenPath,
34170
34180
  setFullscreenPath,
34171
34181
  hasAnyFullscreen,
34172
34182
  allFullscreenPaths: fullscreenPaths
34173
- }, $[9] = fullscreenPaths, $[10] = getFullscreenPath, $[11] = hasAnyFullscreen, $[12] = setFullscreenPath, $[13] = t5) : t5 = $[13];
34183
+ }, $[8] = fullscreenPaths, $[9] = getFullscreenPath, $[10] = hasAnyFullscreen, $[11] = setFullscreenPath, $[12] = t5) : t5 = $[12];
34174
34184
  const contextValue = t5;
34175
34185
  let t6;
34176
- return $[14] !== children || $[15] !== contextValue ? (t6 = /* @__PURE__ */ jsx(FullscreenPTEContext.Provider, { value: contextValue, children }), $[14] = children, $[15] = contextValue, $[16] = t6) : t6 = $[16], t6;
34186
+ return $[13] !== children || $[14] !== contextValue ? (t6 = /* @__PURE__ */ jsx(FullscreenPTEContext.Provider, { value: contextValue, children }), $[13] = children, $[14] = contextValue, $[15] = t6) : t6 = $[15], t6;
34177
34187
  }
34178
34188
  function useFullscreenPTE() {
34179
34189
  return useContext(FullscreenPTEContext);
@@ -67949,7 +67959,7 @@ const VideoField = (props2) => props2.renderDefault({
67949
67959
  version: 1,
67950
67960
  description: "User confirmed that they want the Studio document unlinked"
67951
67961
  }), CanvasOpened = defineEvent({
67952
- name: "Canvas Opened from studio",
67962
+ name: "Canvas Opened",
67953
67963
  version: 1,
67954
67964
  description: 'User clicked "Edit in Canvas"'
67955
67965
  }), getDiffTypesCount = (diffs) => diffs.reduce((acc, diff) => (acc[diff.type] = (acc[diff.type] || 0) + 1, acc), {});
@@ -67969,7 +67979,8 @@ function useCanvasTelemetry() {
67969
67979
  unlinkCtaClicked: () => telemetry.log(CanvasUnlinkCtaClicked),
67970
67980
  unlinkApproved: () => telemetry.log(CanvasUnlinkApproved),
67971
67981
  canvasOpened: (origin_0) => telemetry.log(CanvasOpened, {
67972
- origin: origin_0
67982
+ origin: origin_0,
67983
+ source: "studio"
67973
67984
  })
67974
67985
  }, $[0] = telemetry, $[1] = t0) : t0 = $[1], t0;
67975
67986
  }
@@ -78965,7 +78976,7 @@ function MentionUserMenuItem(props2) {
78965
78976
  let t8;
78966
78977
  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
78978
  }
78968
- const StyledMenu$5 = styled(Menu).withConfig({
78979
+ const StyledMenu$6 = styled(Menu).withConfig({
78969
78980
  displayName: "StyledMenu",
78970
78981
  componentId: "sc-195clky-0"
78971
78982
  })`width:308px;border-radius:3px;`, IGNORED_KEYS = ["Control", "Shift", "Alt", "Enter", "Home", "End", "PageUp", "PageDown", "Meta", "Tab", "CapsLock"], NO_ASSIGNEE_OPTION = {
@@ -79056,7 +79067,7 @@ function AssigneeSelectionMenu(props2) {
79056
79067
  value
79057
79068
  } = props2;
79058
79069
  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];
79070
+ $[0] !== onSelect || $[1] !== value ? (t0 = /* @__PURE__ */ jsx(StyledMenu$6, { children: /* @__PURE__ */ jsx(MentionsMenu, { onSelect, value }) }), $[0] = onSelect, $[1] = value, $[2] = t0) : t0 = $[2];
79060
79071
  let t1;
79061
79072
  $[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = {
79062
79073
  placement: "bottom",
@@ -81012,7 +81023,7 @@ const MENU_BUTTON_POPOVER_PROPS = {
81012
81023
  fallbackPlacements: ["bottom-end"],
81013
81024
  placement: "bottom-end",
81014
81025
  portal: !0
81015
- }, StyledMenu$4 = styled(Menu).withConfig({
81026
+ }, StyledMenu$5 = styled(Menu).withConfig({
81016
81027
  displayName: "StyledMenu",
81017
81028
  componentId: "sc-1p0npqq-0"
81018
81029
  })`width:220px;`;
@@ -81060,7 +81071,7 @@ function TasksHeaderDraftsMenu() {
81060
81071
  $[2] !== t ? (t1 = t("buttons.draft.text"), $[2] = t, $[3] = t1) : t1 = $[3];
81061
81072
  let t2;
81062
81073
  $[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;
81074
+ const t3 = "edit-task-menu", T1 = StyledMenu$5;
81064
81075
  let t4;
81065
81076
  $[6] !== t ? (t4 = t("panel.drafts.title"), $[6] = t, $[7] = t4) : t4 = $[7];
81066
81077
  let t5;
@@ -82333,7 +82344,7 @@ const ToolLink = forwardRef(function(props2, ref) {
82333
82344
  height: 4,
82334
82345
  borderRadius: 3,
82335
82346
  boxShadow: "0 0 0 1px var(--card-bg-color)"
82336
- }), OversizedButton$2 = styled(ToolLink).withConfig({
82347
+ }), OversizedButton$4 = styled(ToolLink).withConfig({
82337
82348
  displayName: "OversizedButton",
82338
82349
  componentId: "sc-1wfug2b-1"
82339
82350
  })`${oversizedButtonStyle}`;
@@ -82355,17 +82366,13 @@ function ReleasesToolLink() {
82355
82366
  backgroundColor: "var(--card-badge-critical-dot-color)"
82356
82367
  } }), $[4] = hasError, $[5] = t3) : t3 = $[5];
82357
82368
  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];
82369
+ $[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
82370
  let t5;
82360
82371
  return $[10] !== t0 || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsx(Tooltip, { content: t0, children: t4 }), $[10] = t0, $[11] = t4, $[12] = t5) : t5 = $[12], t5;
82361
82372
  }
82362
82373
  function _temp$G(routerState) {
82363
82374
  return typeof routerState.tool == "string" ? routerState.tool : void 0;
82364
82375
  }
82365
- const OversizedButton$1 = styled(IntentLink).withConfig({
82366
- displayName: "OversizedButton",
82367
- componentId: "sc-1pt35p9-0"
82368
- })`${oversizedButtonStyle}`;
82369
82376
  function AnimatedTextWidth(t0) {
82370
82377
  const $ = c(18), {
82371
82378
  children,
@@ -82418,7 +82425,10 @@ function AnimatedTextWidth(t0) {
82418
82425
  let t13;
82419
82426
  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
82427
  }
82421
- const ReleasesLink = (t0) => {
82428
+ const OversizedButton$3 = styled(IntentLink).withConfig({
82429
+ displayName: "OversizedButton",
82430
+ componentId: "sc-1pt35p9-0"
82431
+ })`${oversizedButtonStyle}`, ReleasesLink = (t0) => {
82422
82432
  const $ = c(10), {
82423
82433
  selectedPerspective
82424
82434
  } = t0, {
@@ -82430,7 +82440,7 @@ const ReleasesLink = (t0) => {
82430
82440
  children,
82431
82441
  ...intentProps
82432
82442
  } = t22;
82433
- return /* @__PURE__ */ jsx(OversizedButton$1, { ...intentProps, ref: linkRef, intent: RELEASES_INTENT, params: {
82443
+ return /* @__PURE__ */ jsx(OversizedButton$3, { ...intentProps, ref: linkRef, intent: RELEASES_INTENT, params: {
82434
82444
  id: getReleaseIdFromReleaseDocumentId(selectedPerspective._id)
82435
82445
  }, children });
82436
82446
  }), $[0] = selectedPerspective._id, $[1] = t1) : t1 = $[1];
@@ -83083,10 +83093,10 @@ const useScrollIndicatorVisibility = () => {
83083
83093
  setScrollContainer,
83084
83094
  scrollElementRef
83085
83095
  }, $[5] = isRangeVisible, $[6] = t5) : t5 = $[6], t5;
83086
- }, StyledMenu$3 = styled(Menu).withConfig({
83096
+ }, StyledMenu$4 = styled(Menu).withConfig({
83087
83097
  displayName: "StyledMenu",
83088
83098
  componentId: "sc-3ke5c8-0"
83089
- })`min-width:200px;max-width:320px;> [data-ui='Stack']{gap:0;}`, OversizedButton = styled(Button$1).withConfig({
83099
+ })`min-width:200px;max-width:320px;> [data-ui='Stack']{gap:0;}`, OversizedButton$2 = styled(Button$1).withConfig({
83090
83100
  displayName: "OversizedButton",
83091
83101
  componentId: "sc-3ke5c8-1"
83092
83102
  })`${oversizedButtonStyle}`;
@@ -83119,9 +83129,9 @@ function GlobalPerspectiveMenu(t0) {
83119
83129
  }, $[3] = t3) : t3 = $[3];
83120
83130
  const handleClose = t3;
83121
83131
  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];
83132
+ $[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
83133
  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];
83134
+ $[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
83135
  let t6;
83126
83136
  $[13] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = [0, 0, 32, 0], $[13] = t6) : t6 = $[13];
83127
83137
  let t7;
@@ -83176,49 +83186,276 @@ const ReleasesNavContainer = styled(Card).withConfig({
83176
83186
  t3,
83177
83187
  t5
83178
83188
  ] }), $[9] = border, $[10] = t2, $[11] = t3, $[12] = t5, $[13] = t6) : t6 = $[13], t6;
83179
- }, ReleaseNavContainer = styled(Card).withConfig({
83180
- displayName: "ReleaseNavContainer",
83189
+ }, RhombusIcon = forwardRef(function(props2, ref) {
83190
+ const $ = c(4);
83191
+ let t0;
83192
+ $[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];
83193
+ let t1;
83194
+ 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;
83195
+ }), OversizedButton$1 = styled(IntentLink).withConfig({
83196
+ displayName: "OversizedButton",
83197
+ componentId: "sc-1ima4yx-0"
83198
+ })`${oversizedButtonStyle}`;
83199
+ function VariantDetailLink(t0) {
83200
+ const $ = c(10), {
83201
+ variant
83202
+ } = t0;
83203
+ let t1;
83204
+ $[0] !== variant._id ? (t1 = getVariantId(variant._id), $[0] = variant._id, $[1] = t1) : t1 = $[1];
83205
+ const encodedVariantId = t1;
83206
+ let t2;
83207
+ $[2] !== encodedVariantId ? (t2 = forwardRef(function(linkProps, ref) {
83208
+ return /* @__PURE__ */ jsx(OversizedButton$1, { ...linkProps, ref, intent: VARIANTS_INTENT, params: {
83209
+ id: encodedVariantId
83210
+ } });
83211
+ }), $[2] = encodedVariantId, $[3] = t2) : t2 = $[3];
83212
+ const VariantLink = t2;
83213
+ let t3;
83214
+ $[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = {
83215
+ maxWidth: "180px"
83216
+ }, $[4] = t3) : t3 = $[4];
83217
+ let t4;
83218
+ $[5] !== variant ? (t4 = getVariantTitle(variant), $[5] = variant, $[6] = t4) : t4 = $[6];
83219
+ let t5;
83220
+ 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;
83221
+ }
83222
+ function CurrentVariantLabel(t0) {
83223
+ const $ = c(6), {
83224
+ selectedVariant
83225
+ } = t0, {
83226
+ t
83227
+ } = useTranslation(variantsLocaleNamespace), animationKey = selectedVariant?._id ?? "default";
83228
+ let t1;
83229
+ $[0] !== selectedVariant || $[1] !== t ? (t1 = selectedVariant ? /* @__PURE__ */ jsx(VariantDetailLink, { variant: selectedVariant }) : /* @__PURE__ */ jsx(Box, { padding: 2, style: {
83230
+ userSelect: "none",
83231
+ overflow: "hidden"
83232
+ }, children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, children: [
83233
+ /* @__PURE__ */ jsx(Text$1, { size: 0, children: /* @__PURE__ */ jsx(RhombusIcon, {}) }),
83234
+ /* @__PURE__ */ jsx(Text$1, { "data-testid": "variants-nav-label", size: 1, textOverflow: "ellipsis", weight: "medium", children: t("navbar.variant.default") })
83235
+ ] }) }), $[0] = selectedVariant, $[1] = t, $[2] = t1) : t1 = $[2];
83236
+ let t2;
83237
+ return $[3] !== animationKey || $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(AnimatedTextWidth, { text: animationKey, children: t1 }), $[3] = animationKey, $[4] = t1, $[5] = t2) : t2 = $[5], t2;
83238
+ }
83239
+ const StyledMenu$3 = styled(Menu).withConfig({
83240
+ displayName: "StyledMenu",
83241
+ componentId: "sc-1cdn8fr-0"
83242
+ })`min-width:240px;max-width:320px;> [data-ui='Stack']{gap:0;}`, SectionHeader = styled(Text$1).withConfig({
83243
+ displayName: "SectionHeader",
83244
+ componentId: "sc-1cdn8fr-1"
83245
+ })`text-transform:uppercase;letter-spacing:0.04em;`, OversizedButton = styled(Button$1).withConfig({
83246
+ displayName: "OversizedButton",
83247
+ componentId: "sc-1cdn8fr-2"
83248
+ })`${oversizedButtonStyle}`;
83249
+ function VariantsMenu() {
83250
+ const $ = c(44), {
83251
+ t
83252
+ } = useTranslation(variantsLocaleNamespace), router = useRouter(), {
83253
+ data: variants2
83254
+ } = useAllVariants(), [filterQuery, setFilterQuery] = useState(""), t0 = router.stickyParams.variant ?? void 0;
83255
+ let t1;
83256
+ $[0] !== t0 ? (t1 = decodeVariantIdFromRoute(t0), $[0] = t0, $[1] = t1) : t1 = $[1];
83257
+ const selectedVariantDocumentId = t1;
83258
+ let t2;
83259
+ $[2] !== selectedVariantDocumentId || $[3] !== variants2 ? (t2 = selectedVariantDocumentId ? variants2.find((variant) => variant._id === selectedVariantDocumentId) : void 0, $[2] = selectedVariantDocumentId, $[3] = variants2, $[4] = t2) : t2 = $[4];
83260
+ const selectedVariant = t2;
83261
+ let t3;
83262
+ $[5] !== filterQuery || $[6] !== variants2 ? (t3 = filterVariantsForSearch(variants2, filterQuery), $[5] = filterQuery, $[6] = variants2, $[7] = t3) : t3 = $[7];
83263
+ const filteredVariants = t3;
83264
+ let t4;
83265
+ $[8] !== router ? (t4 = (variant_0) => {
83266
+ router.navigate({
83267
+ stickyParams: {
83268
+ variant: variant_0 ? getVariantId(variant_0._id) : null
83269
+ }
83270
+ });
83271
+ }, $[8] = router, $[9] = t4) : t4 = $[9];
83272
+ const setVariantSelection = t4;
83273
+ let t5;
83274
+ $[10] !== setVariantSelection ? (t5 = () => {
83275
+ setVariantSelection(void 0), setFilterQuery("");
83276
+ }, $[10] = setVariantSelection, $[11] = t5) : t5 = $[11];
83277
+ const handleSelectDefault = t5;
83278
+ let t6;
83279
+ $[12] !== setVariantSelection ? (t6 = (variant_1) => {
83280
+ setVariantSelection(variant_1), setFilterQuery("");
83281
+ }, $[12] = setVariantSelection, $[13] = t6) : t6 = $[13];
83282
+ const handleSelectVariant = t6;
83283
+ let t7;
83284
+ $[14] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = (event) => {
83285
+ setFilterQuery(event.currentTarget.value);
83286
+ }, $[14] = t7) : t7 = $[14];
83287
+ const handleFilterChange = t7;
83288
+ let t8;
83289
+ $[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t8 = () => {
83290
+ setFilterQuery("");
83291
+ }, $[15] = t8) : t8 = $[15];
83292
+ const handleMenuClose = t8, isDefaultSelected = !selectedVariant;
83293
+ let t9;
83294
+ $[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];
83295
+ let t10;
83296
+ $[17] !== t ? (t10 = t("navbar.variant.filter-placeholder"), $[17] = t, $[18] = t10) : t10 = $[18];
83297
+ let t11;
83298
+ $[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];
83299
+ let t12;
83300
+ $[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t12 = /* @__PURE__ */ jsx(MenuDivider, {}), $[22] = t12) : t12 = $[22];
83301
+ let t13;
83302
+ $[23] !== t ? (t13 = t("navbar.variant.default"), $[23] = t, $[24] = t13) : t13 = $[24];
83303
+ let t14;
83304
+ $[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];
83305
+ let t15;
83306
+ $[29] !== filteredVariants || $[30] !== handleSelectVariant || $[31] !== selectedVariant?._id || $[32] !== t ? (t15 = filteredVariants.length > 0 && /* @__PURE__ */ jsxs(Fragment$1, { children: [
83307
+ /* @__PURE__ */ jsx(Box, { padding: 3, paddingBottom: 2, children: /* @__PURE__ */ jsx(SectionHeader, { muted: !0, size: 0, weight: "medium", children: t("navbar.variant.other") }) }),
83308
+ filteredVariants.map((variant_2) => {
83309
+ const isSelected = selectedVariant?._id === variant_2._id;
83310
+ 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);
83311
+ })
83312
+ ] }), $[29] = filteredVariants, $[30] = handleSelectVariant, $[31] = selectedVariant?._id, $[32] = t, $[33] = t15) : t15 = $[33];
83313
+ let t16;
83314
+ $[34] !== t11 || $[35] !== t14 || $[36] !== t15 ? (t16 = /* @__PURE__ */ jsxs(StyledMenu$3, { "data-testid": "variants-nav-menu", padding: 0, children: [
83315
+ t11,
83316
+ t12,
83317
+ t14,
83318
+ t15
83319
+ ] }), $[34] = t11, $[35] = t14, $[36] = t15, $[37] = t16) : t16 = $[37];
83320
+ let t17;
83321
+ $[38] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t17 = [0, 0, 32, 0], $[38] = t17) : t17 = $[38];
83322
+ let t18;
83323
+ $[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t18 = ["bottom-end"], $[39] = t18) : t18 = $[39];
83324
+ let t19;
83325
+ $[40] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t19 = {
83326
+ overflow: "hidden"
83327
+ }, $[40] = t19) : t19 = $[40];
83328
+ let t20;
83329
+ $[41] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = {
83330
+ __unstable_margins: t17,
83331
+ constrainSize: !0,
83332
+ fallbackPlacements: t18,
83333
+ placement: "bottom-end",
83334
+ portal: !0,
83335
+ style: t19,
83336
+ tone: "default",
83337
+ zOffset: 3e3
83338
+ }, $[41] = t20) : t20 = $[41];
83339
+ let t21;
83340
+ 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;
83341
+ }
83342
+ const VariantsNavContainer = styled(Card).withConfig({
83343
+ displayName: "VariantsNavContainer",
83344
+ componentId: "sc-1bbf04-0"
83345
+ })`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;}`;
83346
+ function VariantsNav() {
83347
+ const $ = c(8), router = useRouter(), {
83348
+ byId
83349
+ } = useAllVariants();
83350
+ let t0;
83351
+ if ($[0] !== byId || $[1] !== router.stickyParams.variant) {
83352
+ const selectedVariantDocumentId = decodeVariantIdFromRoute(router.stickyParams.variant ?? void 0);
83353
+ t0 = selectedVariantDocumentId ? byId.get(selectedVariantDocumentId) : void 0, $[0] = byId, $[1] = router.stickyParams.variant, $[2] = t0;
83354
+ } else
83355
+ t0 = $[2];
83356
+ const selectedVariant = t0;
83357
+ let t1;
83358
+ $[3] !== selectedVariant ? (t1 = /* @__PURE__ */ jsx(CurrentVariantLabel, { selectedVariant }), $[3] = selectedVariant, $[4] = t1) : t1 = $[4];
83359
+ let t2;
83360
+ $[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx(VariantsMenu, {}), $[5] = t2) : t2 = $[5];
83361
+ let t3;
83362
+ return $[6] !== t1 ? (t3 = /* @__PURE__ */ jsxs(VariantsNavContainer, { flex: "none", tone: "inherit", radius: "full", "data-ui": "VariantsNav", children: [
83363
+ t1,
83364
+ t2
83365
+ ] }), $[6] = t1, $[7] = t3) : t3 = $[7], t3;
83366
+ }
83367
+ const NavRowContainer = styled(Card).withConfig({
83368
+ displayName: "NavRowContainer",
83181
83369
  componentId: "sc-t5zhvx-0"
83182
- })`[data-ui='ReleasesNav']{margin:0;}`;
83370
+ })`[data-ui='ReleasesNav'],[data-ui='VariantsNav']{margin:0;}`;
83183
83371
  function VariantsStudioNavbar(props2) {
83184
- const $ = c(24), {
83372
+ const $ = c(46), {
83185
83373
  t
83186
83374
  } = useTranslation(variantsLocaleNamespace), {
83187
83375
  selectedPerspective
83188
- } = usePerspective();
83376
+ } = usePerspective(), router = useRouter(), hasVariantSelection = !!router.stickyParams.variant;
83189
83377
  let t0;
83190
- $[0] !== props2 ? (t0 = props2.renderDefault(props2), $[0] = props2, $[1] = t0) : t0 = $[1];
83378
+ $[0] !== selectedPerspective ? (t0 = !isDraftPerspective(selectedPerspective) && !isPublishedPerspective(selectedPerspective), $[0] = selectedPerspective, $[1] = t0) : t0 = $[1];
83379
+ const canClear = hasVariantSelection || t0;
83191
83380
  let t1;
83192
- $[2] !== t ? (t1 = t("navbar.view-as"), $[2] = t, $[3] = t1) : t1 = $[3];
83381
+ $[2] !== router ? (t1 = () => {
83382
+ router.navigate({
83383
+ stickyParams: {
83384
+ excludedPerspectives: null,
83385
+ perspective: "",
83386
+ variant: null
83387
+ }
83388
+ });
83389
+ }, $[2] = router, $[3] = t1) : t1 = $[3];
83390
+ const handleClearViewAs = t1;
83193
83391
  let t2;
83194
- $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: t1 }), $[4] = t1, $[5] = t2) : t2 = $[5];
83392
+ $[4] !== props2 ? (t2 = props2.renderDefault(props2), $[4] = props2, $[5] = t2) : t2 = $[5];
83195
83393
  let t3;
83196
- $[6] !== selectedPerspective ? (t3 = getReleaseTone(selectedPerspective), $[6] = selectedPerspective, $[7] = t3) : t3 = $[7];
83394
+ $[6] !== t ? (t3 = t("navbar.view-as"), $[6] = t, $[7] = t3) : t3 = $[7];
83197
83395
  let t4;
83198
- $[8] !== t ? (t4 = t("navbar.version"), $[8] = t, $[9] = t4) : t4 = $[9];
83396
+ $[8] !== t3 ? (t4 = /* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: t3 }), $[8] = t3, $[9] = t4) : t4 = $[9];
83199
83397
  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];
83398
+ $[10] !== selectedPerspective ? (t5 = getReleaseTone(selectedPerspective), $[10] = selectedPerspective, $[11] = t5) : t5 = $[11];
83201
83399
  let t6;
83202
- $[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = /* @__PURE__ */ jsx(ReleasesNav, { withReleasesToolButton: !0, border: !1 }), $[12] = t6) : t6 = $[12];
83400
+ $[12] !== t ? (t6 = t("navbar.version"), $[12] = t, $[13] = t6) : t6 = $[13];
83203
83401
  let t7;
83204
- $[13] !== t5 ? (t7 = /* @__PURE__ */ jsxs(Flex, { marginLeft: 1, children: [
83205
- t5,
83206
- t6
83207
- ] }), $[13] = t5, $[14] = t7) : t7 = $[14];
83402
+ $[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
83403
  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];
83404
+ $[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsx(ReleasesNav, { withReleasesToolButton: !0, border: !1 }), $[16] = t8) : t8 = $[16];
83210
83405
  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,
83406
+ $[17] !== t7 ? (t9 = /* @__PURE__ */ jsxs(Flex, { marginLeft: 1, children: [
83407
+ t7,
83213
83408
  t8
83214
- ] }) }), $[18] = t2, $[19] = t8, $[20] = t9) : t9 = $[20];
83409
+ ] }), $[17] = t7, $[18] = t9) : t9 = $[18];
83215
83410
  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;
83411
+ $[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];
83412
+ const t11 = hasVariantSelection ? "suggest" : "default";
83413
+ let t12;
83414
+ $[22] !== t ? (t12 = t("navbar.variant"), $[22] = t, $[23] = t12) : t12 = $[23];
83415
+ let t13;
83416
+ $[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];
83417
+ let t14;
83418
+ $[26] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t14 = /* @__PURE__ */ jsx(VariantsNav, {}), $[26] = t14) : t14 = $[26];
83419
+ let t15;
83420
+ $[27] !== t13 ? (t15 = /* @__PURE__ */ jsxs(Flex, { marginLeft: 1, children: [
83421
+ t13,
83422
+ t14
83423
+ ] }), $[27] = t13, $[28] = t15) : t15 = $[28];
83424
+ let t16;
83425
+ $[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];
83426
+ let t17;
83427
+ $[32] !== canClear || $[33] !== handleClearViewAs || $[34] !== t ? (t17 = canClear && /* @__PURE__ */ jsx(motion.div, { animate: {
83428
+ clipPath: "inset(0 0% 0 0%)",
83429
+ opacity: 1
83430
+ }, exit: {
83431
+ clipPath: "inset(0 50% 0 50%)",
83432
+ opacity: 0
83433
+ }, initial: {
83434
+ clipPath: "inset(0 50% 0 50%)",
83435
+ opacity: 0
83436
+ }, style: {
83437
+ display: "flex"
83438
+ }, transition: {
83439
+ type: "spring",
83440
+ bounce: 0,
83441
+ duration: 0.3
83442
+ }, 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];
83443
+ let t18;
83444
+ $[36] !== t17 ? (t18 = /* @__PURE__ */ jsx(AnimatePresence, { initial: !1, children: t17 }), $[36] = t17, $[37] = t18) : t18 = $[37];
83445
+ let t19;
83446
+ $[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: [
83447
+ t4,
83448
+ t10,
83449
+ t16,
83450
+ t18
83451
+ ] }) }), $[38] = t10, $[39] = t16, $[40] = t18, $[41] = t4, $[42] = t19) : t19 = $[42];
83452
+ let t20;
83453
+ return $[43] !== t19 || $[44] !== t2 ? (t20 = /* @__PURE__ */ jsxs(Flex, { direction: "column", children: [
83454
+ t2,
83455
+ t19
83456
+ ] }), $[43] = t19, $[44] = t2, $[45] = t20) : t20 = $[45], t20;
83220
83457
  }
83221
- const VARIANTS_NAME = "sanity/variants", VARIANTS_TOOL_NAME = "variants", variants = definePlugin({
83458
+ const VARIANTS_NAME = "sanity/variants", VARIANTS_INTENT = "variant", VARIANTS_TOOL_NAME = "variants", variants = definePlugin({
83222
83459
  name: VARIANTS_NAME,
83223
83460
  studio: {
83224
83461
  components: {
@@ -83230,7 +83467,13 @@ const VARIANTS_NAME = "sanity/variants", VARIANTS_TOOL_NAME = "variants", varian
83230
83467
  title: "Variants",
83231
83468
  component: VariantsTool,
83232
83469
  router: route.create("/", [route.create("/:variantId")]),
83233
- __internalApplicationType: VARIANTS_NAME
83470
+ __internalApplicationType: VARIANTS_NAME,
83471
+ canHandleIntent: (intent) => intent === VARIANTS_INTENT,
83472
+ getIntentState(intent, params) {
83473
+ return intent === VARIANTS_INTENT ? {
83474
+ variantId: params.id
83475
+ } : null;
83476
+ }
83234
83477
  }],
83235
83478
  i18n: {
83236
83479
  bundles: [variantsUsEnglishLocaleBundle]