sanity 5.0.0-next-major.20251210134624 → 5.0.0-next-major.20251215093220

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.
@@ -194,6 +194,12 @@ const structureLocaleStrings = defineLocalesResources("structure", {
194
194
  "buttons.split-pane-close-group-button.title": "Close pane group",
195
195
  /** The text for the canvas linked banner action button */
196
196
  "canvas.banner.edit-in-canvas-action": "Edit in Canvas",
197
+ /** The text for the canvas linked banner when the document in editable mode*/
198
+ "canvas.banner.editable.linked-text": "This document can be edited in Canvas.",
199
+ /** The description for the canvas linked banner popover in editable mode*/
200
+ "canvas.banner.editable.popover-description": "Canvas lets you write freely, then update content in Studio without manual field-by-field copying.",
201
+ /** The heading for the canvas linked banner popover in editable mode*/
202
+ "canvas.banner.editable.popover-heading": "Free-form writing",
197
203
  /** The text for the canvas linked banner when the document is a draft */
198
204
  "canvas.banner.linked-text.draft": "This draft document is linked to Canvas",
199
205
  /** The text for the canvas linked banner when the document is a live document */
@@ -1 +1 @@
1
- {"version":3,"file":"resources7.js","sources":["../../src/structure/i18n/resources.ts"],"sourcesContent":["/* eslint sort-keys: \"error\" */\nimport {defineLocalesResources} from 'sanity'\n\n/**\n * Defined locale strings for the structure tool, in US English.\n *\n * @internal\n */\nconst structureLocaleStrings = defineLocalesResources('structure', {\n /** Label for the \"Copy Document URL\" document action */\n 'action.copy-document-url.label': 'Copy Document URL',\n /** Tooltip when action button is disabled because the operation is not ready */\n 'action.delete.disabled.not-ready': 'Operation not ready',\n /** Tooltip when action button is disabled because the document does not exist */\n 'action.delete.disabled.nothing-to-delete':\n \"This document doesn't yet exist or is already deleted\",\n /** Label for the \"Delete\" document action button */\n 'action.delete.label': 'Delete',\n /** Label for the \"Delete\" document action while the document is being deleted */\n 'action.delete.running.label': 'Deleting…',\n /** Tooltip when action is disabled because the document is linked to Canvas */\n 'action.disabled-by-canvas.tooltip':\n 'Some document actions are disabled for documents linked to Canvas',\n /** Message prompting the user to confirm discarding changes */\n 'action.discard-changes.confirm-dialog.confirm-discard-changes':\n 'Are you sure you want to discard all changes since last published?',\n /** Message prompting the user to confirm discarding changes */\n 'action.discard-changes.confirm-dialog.confirm-discard-changes-draft':\n 'Are you sure you want to discard all changes and delete this draft document?',\n /**Header for the confirm discard dialog */\n 'action.discard-changes.confirm-dialog.header.text': 'Discard changes?',\n /** Tooltip when action is disabled because the document has no unpublished changes */\n 'action.discard-changes.disabled.no-change': 'This document has no unpublished changes',\n /** Tooltip when action is disabled because the document is not published */\n 'action.discard-changes.disabled.not-published': 'This document is not published',\n /** Tooltip when action button is disabled because the operation is not ready */\n 'action.discard-changes.disabled.not-ready': 'Operation not ready',\n /** Label for the \"Discard changes\" document action */\n 'action.discard-changes.label': 'Discard changes',\n\n /** Tooltip when action is disabled because the operation is not ready */\n 'action.duplicate.disabled.not-ready': 'Operation not ready',\n /** Tooltip when action is disabled because the document doesn't exist */\n 'action.duplicate.disabled.nothing-to-duplicate':\n \"This document doesn't yet exist so there's nothing to duplicate\",\n /** Label for the \"Duplicate\" document action */\n 'action.duplicate.label': 'Duplicate',\n /** Label for the \"Duplicate\" document action while the document is being duplicated */\n 'action.duplicate.running.label': 'Duplicating…',\n /** Tooltip when publish button is disabled because the document is already published, and published time is unavailable.*/\n 'action.publish.already-published.no-time-ago.tooltip': 'Already published',\n /** Tooltip when publish button is disabled because the document is already published.*/\n 'action.publish.already-published.tooltip': 'Published {{timeSincePublished}}',\n\n /** Tooltip when action is disabled because the studio is not ready.*/\n 'action.publish.disabled.not-ready': 'Operation not ready',\n /** Label for action when there are pending changes.*/\n 'action.publish.draft.label': 'Publish',\n /** Label for the \"Publish\" document action */\n 'action.publish.label': 'Publish',\n /** Label for the \"Publish\" document action when the document has live edit enabled.*/\n 'action.publish.live-edit.label': 'Publish',\n /** Fallback tooltip for the \"Publish\" document action when publish is invoked for a document with live edit enabled.*/\n 'action.publish.live-edit.publish-disabled':\n 'Cannot publish since Live Edit is enabled for this document type',\n /** Tooltip for the \"Publish\" document action when the document has live edit enabled.*/\n 'action.publish.live-edit.tooltip':\n 'Live Edit is enabled for this content type and publishing happens automatically as you make changes',\n /** Tooltip when publish button is disabled because there are no changes.*/\n 'action.publish.no-changes.tooltip': 'No unpublished changes',\n /** Label for the \"Publish\" document action when there are no changes.*/\n 'action.publish.published.label': 'Published',\n /** Label for the \"Publish\" document action while publish is being executed.*/\n 'action.publish.running.label': 'Publishing…',\n /** Tooltip when the \"Publish\" document action is disabled due to validation issues */\n 'action.publish.validation-issues.tooltip':\n 'There are validation errors that need to be fixed before this document can be published',\n /** Tooltip when publish button is waiting for validation and async tasks to complete.*/\n 'action.publish.waiting': 'Waiting for tasks to finish before publishing',\n\n /** Message prompting the user to confirm that they want to restore to an earlier revision*/\n 'action.restore.confirm.message': 'Are you sure you want to restore this document?',\n /** Fallback tooltip for when user is looking at the initial revision */\n 'action.restore.disabled.cannot-restore-initial': \"You can't restore to the initial revision\",\n\n /** Label for the \"Restore\" document action */\n 'action.restore.label': 'Revert to revision',\n /** Default tooltip for the action */\n 'action.restore.tooltip': 'Restore to this revision',\n\n /** Tooltip when action is disabled because the document is not already published */\n 'action.unpublish.disabled.not-published': 'This document is not published',\n /** Tooltip when action is disabled because the operation is not ready */\n 'action.unpublish.disabled.not-ready': 'Operation not ready',\n /** Label for the \"Unpublish\" document action */\n 'action.unpublish.label': 'Unpublish',\n /** Fallback tooltip for the Unpublish document action when publish is invoked for a document with live edit enabled.*/\n 'action.unpublish.live-edit.disabled':\n 'This document has live edit enabled and cannot be unpublished',\n /** Description for the archived release banner, rendered when viewing the history of a version document from the publihed view */\n 'banners.archived-release.description':\n 'This document version belongs to the archived <VersionBadge>{{title}}</VersionBadge> release',\n /** Description for the archived scheduled draft banner, rendered when viewing the history of a cardinality one release document */\n 'banners.archived-scheduled-draft.description': 'This scheduled draft is archived',\n /** The explanation displayed when a user attempts to create a new draft document, but the draft model is not switched on */\n 'banners.choose-new-document-destination.cannot-create-draft-document':\n 'Cannot create a draft document.',\n /** The explanation displayed when a user attempts to create a new published document, but the schema type doesn't support live-editing */\n 'banners.choose-new-document-destination.cannot-create-published-document':\n 'Cannot create a published document.',\n /** The prompt displayed when a user must select a different perspective in order to create a document */\n 'banners.choose-new-document-destination.choose-destination':\n 'Choose a destination for this document:',\n /** The explanation displayed when a user attempts to create a new document in a release, but the selected release is inactive */\n 'banners.choose-new-document-destination.release-inactive':\n 'The <VersionBadge>{{title}}</VersionBadge> release is not active.',\n /** The text for the restore button on the deleted document banner */\n 'banners.deleted-document-banner.restore-button.text': 'Restore most recent revision',\n /** The text content for the deleted document banner */\n 'banners.deleted-document-banner.text': 'This document has been deleted.',\n /** The text content for the deprecated document type banner */\n 'banners.deprecated-document-type-banner.text': 'This document type has been deprecated.',\n /** The text for publish action for discarding the version */\n 'banners.live-edit-draft-banner.discard.tooltip': 'Discard draft to continue editing.',\n /** The text for publish action for the draft banner */\n 'banners.live-edit-draft-banner.publish.tooltip': 'Publish draft to continue editing.',\n\n /** The text content for the live edit document when it's a draft */\n 'banners.live-edit-draft-banner.text':\n 'The type <strong>{{schemaType}}</strong> has <code>liveEdit</code> enabled, but a draft version of this document exists. Publish or discard the draft in order to continue live editing it.',\n /** The label for the \"compare draft\" action */\n 'banners.obsolete-draft.actions.compare-draft.text': 'Compare draft',\n /** The label for the \"discard draft\" action */\n 'banners.obsolete-draft.actions.discard-draft.text': 'Discard draft',\n /** The label for the \"publish draft\" action */\n 'banners.obsolete-draft.actions.publish-draft.text': 'Publish draft',\n /** The warning displayed when editing a document that has an obsolete draft because the draft model is not switched on */\n 'banners.obsolete-draft.draft-model-inactive.text':\n 'The workspace does not have drafts enabled, but a draft version of this document exists.',\n /** The text for the permission check banner if the user only has one role, and it does not allow publishing this document */\n 'banners.permission-check-banner.missing-permission_create_one':\n 'Your role <Roles/> does not have permission to publish this document.',\n /** The text for the permission check banner if the user only has multiple roles, but they do not allow publishing this document */\n 'banners.permission-check-banner.missing-permission_create_other':\n 'Your roles <Roles/> do not have permission to publish this document.',\n /** The text for the permission check banner if the user only has one role, and it does not allow editing this document */\n 'banners.permission-check-banner.missing-permission_update_one':\n 'Your role <Roles/> does not have permission to edit this document.',\n /** The text for the permission check banner if the user only has multiple roles, but they do not allow editing this document */\n 'banners.permission-check-banner.missing-permission_update_other':\n 'Your roles <Roles/> do not have permission to edit this document.',\n /** The pending text for the request permission button that appears for viewer roles */\n 'banners.permission-check-banner.request-permission-button.sent': 'Editor request sent',\n /** The text for the request permission button that appears for viewer roles */\n 'banners.permission-check-banner.request-permission-button.text': 'Ask to edit',\n /** Description for the archived release banner, rendered when viewing the history of a version document from the published view */\n 'banners.published-release.description':\n \"You are viewing a read-only document that was published as part of <VersionBadge>{{title}}</VersionBadge>. It can't be edited\",\n /** The text for the reload button */\n 'banners.reference-changed-banner.reason-changed.reload-button.text': 'Reload reference',\n /** The text for the reference change banner if the reason is that the reference has been changed */\n 'banners.reference-changed-banner.reason-changed.text':\n 'This reference has changed since you opened it.',\n /** The text for the close button */\n 'banners.reference-changed-banner.reason-removed.close-button.text': 'Close reference',\n /** The text for the reference change banner if the reason is that the reference has been deleted */\n 'banners.reference-changed-banner.reason-removed.text':\n 'This reference has been removed since you opened it.',\n /** The text that appears for the action button to add the current document to the global release */\n 'banners.release.action.add-to-release': 'Add to release',\n /** The text that appears for the action button to add the current document to the global release */\n 'banners.release.action.open-to-edit': 'Open release to edit',\n /** Toast description in case an error occurs when adding a document to a release */\n 'banners.release.error.description':\n 'An error occurred when adding document to the release: {{message}}',\n /** Toast title in case an error occurs when adding a document to a release */\n 'banners.release.error.title': 'Error adding document to release',\n /** The text for the banner that appears when a document only has versions but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description': 'The document only exists in the',\n /** The text for the banner that appears when a document only has versions but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description-end_one': 'release',\n /** The text for the banner that appears when a document only has versions but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description-end_other': 'releases',\n /** The text for the banner that appears when there are multiple versions but no drafts or published, only one extra releases */\n 'banners.release.navigate-to-edit-description-multiple_one':\n 'This document is part of the <VersionBadge/> release and {{count}} more release.',\n /** The text for the banner that appears when there are multiple versions but no drafts or published, more than one extra releases */\n 'banners.release.navigate-to-edit-description-multiple_other':\n 'This document is part of the <VersionBadge/> release and {{count}} more releases',\n /** The text for the banner that appears when a document is not part of any release\n * @deprecated – no longer in use\n * */\n 'banners.release.navigate-to-edit-description-none': 'This document is not part of any release',\n /** The text for the banner that appears when a document only has one version but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description-single':\n 'This document is part of the <VersionBadge/> release',\n /** The text for the banner that appears when a document is not in the current global release */\n 'banners.release.not-in-release': 'Not in the <VersionBadge>{{title}}</VersionBadge> release.',\n /** Description of toast that will appear in case of latency between the user adding a document to a release and the UI reflecting it */\n 'banners.release.waiting.description':\n 'Please hold tight while the document is added to the release. It should not take longer than a few seconds.',\n /** Title of toast that will appear in case of latency between the user adding a document to a release and the UI reflecting it */\n 'banners.release.waiting.title': 'Adding document to release…',\n /** The text for the revision not found banner */\n 'banners.revision-not-found.description':\n \"We couldn't find the document revision selected, please select another entry from the history list.\",\n /** The text content for the scheduled draft override banner */\n 'banners.scheduled-draft-override-banner.text':\n 'A scheduled draft for this document exists. If you publish changes now they will be overwritten when the schedule runs.',\n /** The text content for the unpublished document banner when is part of a release */\n 'banners.unpublished-release-banner.text':\n 'This document will be unpublished as part of the <VersionBadge>{{title}}</VersionBadge> release.',\n /** The text content for the unpublished document banner letting the user know that the current published version is being shown */\n 'banners.unpublished-release-banner.text-with-published':\n 'Showing the current <strong>published</strong> version:',\n /** Browser/tab title when creating a new document of a given type */\n 'browser-document-title.new-document': 'New {{schemaType}}',\n /** Browser/tab title when editing a document where the title cannot be resolved from preview configuration */\n 'browser-document-title.untitled-document': 'Untitled',\n\n /** The action menu button aria-label */\n 'buttons.action-menu-button.aria-label': 'Open document actions',\n /** The action menu button tooltip */\n 'buttons.action-menu-button.tooltip': 'Document actions',\n\n /** The aria-label for the collapse pane button on the document panel header */\n 'buttons.focus-pane-button.aria-label.collapse': 'Exit focus mode (show navigation)',\n /** The aria-label for the focus pane button on the document panel header */\n 'buttons.focus-pane-button.aria-label.focus': 'Enter focus mode (hide navigation)',\n\n /** The tooltip for the collapse pane button on the document panel header */\n 'buttons.focus-pane-button.tooltip.collapse': 'Exit focus mode',\n /** The tooltip for the focus pane button on the document panel header */\n 'buttons.focus-pane-button.tooltip.focus': 'Enter focus mode',\n /** The aria-label for the split pane button on the document panel header */\n 'buttons.split-pane-button.aria-label': 'Split pane right',\n /** The tool tip for the split pane button on the document panel header */\n 'buttons.split-pane-button.tooltip': 'Split pane right',\n /** The title for the close button on the split pane on the document panel header */\n 'buttons.split-pane-close-button.title': 'Close split pane',\n /** The title for the close group button on the split pane on the document panel header */\n 'buttons.split-pane-close-group-button.title': 'Close pane group',\n\n /** The text for the canvas linked banner action button */\n 'canvas.banner.edit-in-canvas-action': 'Edit in Canvas',\n /** The text for the canvas linked banner when the document is a draft */\n 'canvas.banner.linked-text.draft': 'This draft document is linked to Canvas',\n /** The text for the canvas linked banner when the document is a live document */\n 'canvas.banner.linked-text.published': 'This live document is linked to Canvas',\n /** The text for the canvas linked banner when the document is a version document */\n 'canvas.banner.linked-text.version': 'This version document is linked to Canvas',\n /** The text for the canvas linked banner popover button */\n 'canvas.banner.popover-button-text': 'Learn more',\n /** The description for the canvas linked banner popover */\n 'canvas.banner.popover-description':\n 'Canvas lets you author in a free-form editor that automatically maps back to the Studio as structured content - as you type.',\n /** The heading for the canvas linked banner popover */\n 'canvas.banner.popover-heading': 'Idea first authoring',\n /** The description for the changes banner */\n 'changes.banner.description':\n 'Showing the history for the <strong>{{perspective}}</strong> version of this document.',\n /** The tooltip for the changes banner */\n 'changes.banner.tooltip':\n 'This view shows the changes that occurred in a specific version of this document. Select a different version to see its changes',\n /** The label used in the changes inspector for the from selector */\n 'changes.from.label': 'From',\n /* The label for the history tab in the changes inspector*/\n 'changes.tab.history': 'History',\n /* The label for the review tab in the changes inspector*/\n 'changes.tab.review-changes': 'Review changes',\n /** The label used in the changes inspector for the to selector */\n 'changes.to.label': 'To',\n\n /** The error message shown when the specified document comparison mode is not supported */\n 'compare-version.error.invalidModeParam':\n '\"{{input}}\" is not a supported document comparison mode.',\n /** The error message shown when the next document for comparison could not be extracted from the URL */\n 'compare-version.error.invalidNextDocumentParam': 'The next document parameter is invalid.',\n /** The error message shown when the document comparison URL could not be parsed */\n 'compare-version.error.invalidParams.title': 'Unable to compare documents',\n /** The error message shown when the previous document for comparison could not be extracted from the URL */\n 'compare-version.error.invalidPreviousDocumentParam':\n 'The previous document parameter is invalid.',\n /** The text for the tooltip when the \"Compare versions\" action for a document is disabled */\n 'compare-versions.menu-item.disabled-reason':\n 'There are no other versions of this document to compare.',\n /** The text for the \"Compare versions\" action for a document */\n 'compare-versions.menu-item.title': 'Compare versions',\n /** The string used to label draft documents */\n 'compare-versions.status.draft': 'Draft',\n /** The string used to label published documents */\n 'compare-versions.status.published': 'Published',\n /** The title used when comparing versions of a document */\n 'compare-versions.title': 'Compare versions',\n\n /** The text in the \"Cancel\" button in the confirm delete dialog that cancels the action and closes the dialog */\n 'confirm-delete-dialog.cancel-button.text': 'Cancel',\n /** Used in `confirm-delete-dialog.cdr-summary.title` */\n 'confirm-delete-dialog.cdr-summary.document-count_one': '1 document',\n /** Used in `confirm-delete-dialog.cdr-summary.title` */\n 'confirm-delete-dialog.cdr-summary.document-count_other': '{{count}} documents',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_one': 'Dataset: {{datasets}}',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_other': 'Datasets: {{datasets}}',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_unavailable_one': 'Unavailable dataset',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_unavailable_other': 'Unavailable datasets',\n /** The text that appears in the title `<summary>` that includes the list of CDRs (singular) */\n 'confirm-delete-dialog.cdr-summary.title_one': '{{documentCount}} in another dataset',\n /** The text that appears in the title `<summary>` that includes the list of CDRs (plural) */\n 'confirm-delete-dialog.cdr-summary.title_other': '{{documentCount}} in {{count}} datasets',\n /** Appears when hovering over the copy button to copy */\n 'confirm-delete-dialog.cdr-table.copy-id-button.tooltip': 'Copy ID to clipboard',\n /** The header for the dataset column in the list of cross-dataset references found */\n 'confirm-delete-dialog.cdr-table.dataset.label': 'Dataset',\n /** The header for the document ID column in the list of cross-dataset references found */\n 'confirm-delete-dialog.cdr-table.document-id.label': 'Document ID',\n /** The toast title when the copy button has been clicked but copying failed */\n 'confirm-delete-dialog.cdr-table.id-copied-toast.title-failed': 'Failed to copy document ID',\n /** The header for the project ID column in the list of cross-dataset references found */\n 'confirm-delete-dialog.cdr-table.project-id.label': 'Project ID',\n /** The text in the \"Delete anyway\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-anyway-button.text_delete': 'Delete all versions anyway',\n /** The text in the \"Unpublish anyway\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-anyway-button.text_unpublish': 'Unpublish anyway',\n /** The text in the \"Delete now\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-button.text_delete': 'Delete all versions',\n /** The text in the \"Unpublish now\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-button.text_unpublish': 'Unpublish now',\n /** If no referring documents are found, this text appears above the cancel and confirmation buttons */\n 'confirm-delete-dialog.confirmation.text_delete':\n 'Are you sure you want to delete all the versions of this document?',\n /** If no referring documents are found, this text appears above the cancel and confirmation buttons */\n 'confirm-delete-dialog.confirmation.text_unpublish':\n 'Are you sure you want to unpublish “<DocumentTitle/>”?',\n /** The text body of the error dialog. */\n 'confirm-delete-dialog.error.message.text':\n 'An error occurred while loading referencing documents.',\n /** The text in the retry button of the confirm delete dialog if an error occurred. */\n 'confirm-delete-dialog.error.retry-button.text': 'Retry',\n /** The header of the confirm delete dialog if an error occurred while the confirm delete dialog was open. */\n 'confirm-delete-dialog.error.title.text': 'Error',\n /** The header of the confirm delete dialog */\n 'confirm-delete-dialog.header.text_delete': 'Delete document?',\n /** The header of the confirm delete dialog */\n 'confirm-delete-dialog.header.text_unpublish': 'Unpublish document?',\n /** The text that appears while the referring documents are queried */\n 'confirm-delete-dialog.loading.text': 'Looking for referring documents…',\n /** Shown if there are references to other documents but the user does not have the permission to see the relevant document IDs */\n 'confirm-delete-dialog.other-reference-count.title_one': '1 other reference not show',\n /** Shown if there are references to other documents but the user does not have the permission to see the relevant document IDs */\n 'confirm-delete-dialog.other-reference-count.title_other': '{{count}} other references not shown',\n /** Text in the tooltip of this component if hovering over the info icon */\n 'confirm-delete-dialog.other-reference-count.tooltip':\n \"We can't display metadata for these references due to a missing access token for the related datasets.\",\n /** Appears when unable to render a document preview in the referring document list */\n 'confirm-delete-dialog.preview-item.preview-unavailable.subtitle': 'ID: {{documentId}}',\n /** Appears when unable to render a document preview in the referring document list */\n 'confirm-delete-dialog.preview-item.preview-unavailable.title': 'Preview unavailable',\n /** Warns the user of affects to other documents if the action is confirmed (delete) */\n 'confirm-delete-dialog.referential-integrity-disclaimer.text_delete':\n 'If you delete this document, documents that refer to it will no longer be able to access it.',\n /** Warns the user of affects to other documents if the action is confirmed (unpublish) */\n 'confirm-delete-dialog.referential-integrity-disclaimer.text_unpublish':\n 'If you unpublish this document, documents that refer to it will no longer be able to access it.',\n /** Tells the user the count of how many other referring documents there are before listing them. (singular) */\n 'confirm-delete-dialog.referring-document-count.text_one':\n '1 document refers to “<DocumentTitle/>”',\n /** Tells the user the count of how many other referring documents there are before listing them. (plural) */\n 'confirm-delete-dialog.referring-document-count.text_other':\n '{{count}} documents refer to “<DocumentTitle/>”',\n /** Describes the list of documents that refer to the one trying to be deleted (delete) */\n 'confirm-delete-dialog.referring-documents-descriptor.text_delete':\n 'You may not be able to delete “<DocumentTitle/>” because the following documents refer to it:',\n /** Describes the list of documents that refer to the one trying to be deleted (unpublish) */\n 'confirm-delete-dialog.referring-documents-descriptor.text_unpublish':\n 'You may not be able to unpublish “<DocumentTitle/>” because the following documents refer to it:',\n\n /** The text for the cancel button in the confirm dialog used in document action shortcuts if none is provided */\n 'confirm-dialog.cancel-button.fallback-text': 'Cancel',\n /** The text for the confirm button in the confirm dialog used in document action shortcuts if none is provided */\n 'confirm-dialog.confirm-button.fallback-text': 'Confirm',\n\n /** For the default structure definition, the title for the \"Content\" pane */\n 'default-definition.content-title': 'Content',\n\n /** The text shown if there was an error while getting the document's title via a preview value */\n 'doc-title.error.text': 'Error: {{errorMessage}}',\n /** The text shown if the preview value for a document is non-existent or empty */\n 'doc-title.fallback.text': 'Untitled',\n /** The text shown if a document's title via a preview value cannot be determined due to an unknown schema type */\n 'doc-title.unknown-schema-type.text': 'Unknown schema type: {{schemaType}}',\n\n /** Tooltip text shown for the close button of the document inspector */\n 'document-inspector.close-button.tooltip': 'Close',\n /** The title shown in the dialog header, when inspecting a valid document */\n 'document-inspector.dialog.title': 'Inspecting <DocumentTitle/>',\n /** The title shown in the dialog header, when the document being inspected is not created yet/has no value */\n 'document-inspector.dialog.title-no-value': 'No value',\n /** Title shown for menu item that opens the \"Inspect\" dialog */\n 'document-inspector.menu-item.title': 'Inspect',\n /** the placeholder text for the search input on the inspect dialog */\n 'document-inspector.search.placeholder': 'Search',\n /** The \"parsed\" view mode, meaning the JSON is searchable, collapsible etc */\n 'document-inspector.view-mode.parsed': 'Parsed',\n /** The \"raw\" view mode, meaning the JSON is presented syntax-highlighted, but with no other features - optimal for copying */\n 'document-inspector.view-mode.raw-json': 'Raw JSON',\n\n /** The text for when a form is hidden */\n 'document-view.form-view.form-hidden': 'This form is hidden',\n /** Fallback title shown when a form title is not provided */\n 'document-view.form-view.form-title-fallback': 'Untitled',\n /** The text for when the form view is loading a document */\n 'document-view.form-view.loading': 'Loading document…',\n /** The description of the sync lock toast on the form view */\n 'document-view.form-view.sync-lock-toast.description':\n 'Please hold tight while the document is synced. This usually happens right after the document has been published, and it should not take more than a few seconds',\n /** The title of the sync lock toast on the form view */\n 'document-view.form-view.sync-lock-toast.title': 'Syncing document…',\n\n /** The description for the document favorite action */\n 'document.favorites.add-to-favorites': 'Add to favorites',\n /** The description for the document unfavorite action */\n 'document.favorites.remove-from-favorites': 'Remove from favorites',\n\n /** The description for the events inspector when we can't load the document so we default to compare with published */\n 'events.compare-with-published.description':\n \"We're unable to load the changes for this document, probably due to history retention policy of your plan, this shows you how the <strong>{{version}}</strong> version compares to the <strong>published</strong> version.\",\n\n /** The title for the events inspector when we can't load the document so we default to compare with published */\n 'events.compare-with-published.title': 'Comparing with published',\n\n /**The title for the menu items that will be shown when expanding a publish release event to inspect the document */\n 'events.inspect.release': 'Inspect <VersionBadge>{{releaseTitle}}</VersionBadge> document',\n /**The title for the menu items that will be shown when expanding a publish draft event to inspect the draft document*/\n 'events.open.draft': 'Open <VersionBadge>draft</VersionBadge> document',\n /**The title for the menu items that will be shown when expanding a publish release event to inspect the release*/\n 'events.open.release': 'Open <VersionBadge>{{releaseTitle}}</VersionBadge> release',\n /** The loading messaging for when the tooltip is still loading permission info */\n 'insufficient-permissions-message-tooltip.loading-text': 'Loading…',\n\n /** --- Menu items --- */\n /** The menu item group title to use for the Action menu items */\n 'menu-item-groups.actions-group': 'Actions',\n /** The menu item group title to use for the Layout menu items */\n 'menu-item-groups.layout-group': 'Layout',\n /** The menu item group title to use for the Sort menu items */\n 'menu-item-groups.sorting-group': 'Sort',\n\n /** The menu item title to use the compact view */\n 'menu-items.layout.compact-view': 'Compact view',\n /** The menu item title to use the detailed view */\n 'menu-items.layout.detailed-view': 'Detailed view',\n /** The menu item title to Sort by Created */\n 'menu-items.sort-by.created': 'Sort by Created',\n /** The menu item title to Sort by Last Edited */\n 'menu-items.sort-by.last-edited': 'Sort by Last Edited',\n\n /** The link text of the no document type screen that appears directly below the subtitle */\n 'no-document-types-screen.link-text': 'Learn how to add a document type →',\n /** The subtitle of the no document type screen that appears directly below the title */\n 'no-document-types-screen.subtitle': 'Please define at least one document type in your schema.',\n\n /** The title of the no document type screen */\n 'no-document-types-screen.title': 'No document types',\n\n /** Text shown on back button visible on smaller breakpoints */\n 'pane-header.back-button.text': 'Back',\n /** tooltip text (via `title` attribute) for the menu button */\n 'pane-header.context-menu-button.tooltip': 'Show menu',\n /** Appears in a document list pane header if there are more than one option for create. This is the label for that menu */\n 'pane-header.create-menu.label': 'Create',\n /** Tooltip displayed on the create new button in document lists */\n 'pane-header.create-new-button.tooltip': 'Create new document',\n /** The `aria-label` for the disabled button in the pane header if create permissions are granted */\n 'pane-header.disabled-created-button.aria-label': 'Insufficient permissions',\n /** The text shown in the tooltip of pane item previews of documents if there are unpublished edits */\n 'pane-item.draft-status.has-draft.tooltip': 'Edited <RelativeTime/>',\n /** The text shown in the tooltip of pane item previews of documents if there are no unpublished edits */\n 'pane-item.draft-status.no-draft.tooltip': 'No unpublished edits',\n /** The subtitle tor pane item previews if there isn't a matching schema type found */\n 'pane-item.missing-schema-type.subtitle': 'Document: <Code>{{documentId}}</Code>',\n /** The title tor pane item previews if there isn't a matching schema type found */\n 'pane-item.missing-schema-type.title': 'No schema found for type <Code>{{documentType}}</Code>',\n /** The text shown in the tooltip of pane item previews of documents if there are unpublished edits */\n 'pane-item.published-status.has-published.tooltip': 'Published <RelativeTime/>',\n /** The text shown in the tooltip of pane item previews of documents if there are no unpublished edits */\n 'pane-item.published-status.no-published.tooltip': 'No unpublished edits',\n /** The text used in the document header title if there is an error */\n 'panes.document-header-title.error.text': 'Error: {{error}}',\n /** The text used in the document header title if creating a new item */\n 'panes.document-header-title.new.text': 'New {{schemaType}}',\n /** The text used in the document header title if no other title can be determined */\n 'panes.document-header-title.untitled.text': 'Untitled',\n /** The help text saying that we have given up on automatic retry */\n 'panes.document-list-pane.error.max-retries-attempted':\n 'Not automatically retrying after {{count}} unsuccessful attempts.',\n /** The help text saying that we'll retry fetching the document list */\n 'panes.document-list-pane.error.retrying': 'Retrying…',\n /** The error text on the document list pane */\n 'panes.document-list-pane.error.text': 'Encountered an error while fetching documents.',\n /** The error text on the document list pane */\n 'panes.document-list-pane.error.text.dev': 'Error: <Code>{{error}}</Code>',\n /** The error text on the document list pane if the browser appears to be offlline */\n 'panes.document-list-pane.error.text.offline': 'The Internet connection appears to be offline.',\n /** The error title on the document list pane */\n 'panes.document-list-pane.error.title': 'Could not fetch list items',\n /** The help text saying that we'll retry fetching the document list */\n 'panes.document-list-pane.error.will-retry-automatically_one': 'Retrying…',\n 'panes.document-list-pane.error.will-retry-automatically_other': 'Retrying… (#{{count}}).',\n /** The text of the document list pane if more than a maximum number of documents are returned */\n 'panes.document-list-pane.max-items.text': 'Displaying a maximum of {{limit}} documents',\n /** The text of the document list pane if no documents are found for a specified type */\n 'panes.document-list-pane.no-documents-of-type.text': 'No documents of this type',\n /** The text of the document list pane if no documents are found */\n 'panes.document-list-pane.no-documents.text': 'No results found',\n /** The text of the document list pane if no documents are found matching specified criteria */\n 'panes.document-list-pane.no-matching-documents.text': 'No matching documents',\n /** The search input for the search input on the document list pane */\n 'panes.document-list-pane.reconnecting': 'Trying to connect…',\n /** The aria-label for the search input on the document list pane */\n 'panes.document-list-pane.search-input.aria-label': 'Search list',\n /** The search input for the search input on the document list pane */\n 'panes.document-list-pane.search-input.placeholder': 'Search list',\n /** The summary title when displaying an error for a document operation result */\n 'panes.document-operation-results.error.summary.title': 'Details',\n /** The text when a generic operation failed (fallback, generally not shown) */\n 'panes.document-operation-results.operation-error': 'An error occurred during {{context}}',\n /** The text when a delete operation failed */\n 'panes.document-operation-results.operation-error_delete':\n 'An error occurred while attempting to delete this document. This usually means that there are other documents that refers to it.',\n /** The text when an unpublish operation failed */\n 'panes.document-operation-results.operation-error_unpublish':\n 'An error occurred while attempting to unpublish this document. This usually means that there are other documents that refers to it.',\n /** The text when a generic operation succeeded (fallback, generally not shown) */\n 'panes.document-operation-results.operation-success': 'Successfully performed {{op}} on document',\n /** The text when copy URL operation succeeded */\n 'panes.document-operation-results.operation-success_copy-url': 'Document URL copied to clipboard',\n /** */\n 'panes.document-operation-results.operation-success_createVersion':\n '<Strong>{{title}}</Strong> was added to the release',\n /** The text when a delete operation succeeded */\n 'panes.document-operation-results.operation-success_delete':\n 'The document was successfully deleted',\n /** The text when a discard changes operation succeeded */\n 'panes.document-operation-results.operation-success_discardChanges':\n 'All changes has now been discarded. The discarded draft can still be recovered from history',\n /** The text when a duplicate operation succeeded */\n 'panes.document-operation-results.operation-success_duplicate':\n 'The document was successfully duplicated',\n /** The text when a publish operation succeeded */\n 'panes.document-operation-results.operation-success_publish':\n '<Strong>{{title}}</Strong> was published',\n /** The text when a restore operation succeeded */\n 'panes.document-operation-results.operation-success_restore':\n '<Strong>{{title}}</Strong> was restored',\n /** The text when an unpublish operation succeeded */\n 'panes.document-operation-results.operation-success_unpublish':\n '<Strong>{{title}}</Strong> was unpublished. A draft has been created from the latest published revision.',\n /** The document title shown when document title is \"undefined\" in operation message */\n 'panes.document-operation-results.operation-undefined-title': 'Untitled',\n /** The loading message for the document not found pane */\n 'panes.document-pane.document-not-found.loading': 'Loading document…',\n /** The text of the document not found pane if the schema is known */\n 'panes.document-pane.document-not-found.text':\n 'The document type is not defined, and a document with the <Code>{{id}}</Code> identifier could not be found.',\n /** The title of the document not found pane if the schema is known */\n 'panes.document-pane.document-not-found.title': 'The document was not found',\n /** The text of the document not found pane if the schema is not found */\n 'panes.document-pane.document-unknown-type.text':\n 'This document has the schema type <Code>{{documentType}}</Code>, which is not defined as a type in the local content studio schema.',\n /** The title of the document not found pane if the schema is not found or unknown */\n 'panes.document-pane.document-unknown-type.title':\n 'Unknown document type: <Code>{{documentType}}</Code>',\n /** The title of the document not found pane if the schema is unknown */\n 'panes.document-pane.document-unknown-type.without-schema.text':\n 'This document does not exist, and no schema type was specified for it.',\n /** Default message shown while resolving the structure definition for an asynchronous node */\n 'panes.resolving.default-message': 'Loading…',\n /** Message shown while resolving the structure definition for an asynchronous node and it is taking a while (more than 5s) */\n 'panes.resolving.slow-resolve-message': 'Still loading…',\n /** The text to display when type is missing */\n 'panes.unknown-pane-type.missing-type.text':\n 'Structure item is missing required <Code>type</Code> property.',\n /** The title of the unknown pane */\n 'panes.unknown-pane-type.title': 'Unknown pane type',\n /** The text to display when type is unknown */\n 'panes.unknown-pane-type.unknown-type.text':\n 'Structure item of type <Code>{{type}}</Code> is not a known entity.',\n\n /** The text for the \"Open preview\" action for a document */\n 'production-preview.menu-item.title': 'Open preview',\n\n /** The text for the confirm button in the request permission dialog used in the permissions banner */\n 'request-permission-dialog.confirm-button.text': 'Send request',\n /** The description text for the request permission dialog used in the permissions banner */\n 'request-permission-dialog.description.text':\n \"Your request will be sent to the project administrator(s). If you'd like, you can also include a note\",\n /** The header/title for the request permission dialog used in the permissions banner */\n 'request-permission-dialog.header.text': 'Ask for edit access',\n /** The text describing the note input for the request permission dialog used in the permissions banner */\n 'request-permission-dialog.note-input.description.text': \"If you'd like, you can add a note\",\n /** The placeholder for the note input in the request permission dialog used in the permissions banner */\n 'request-permission-dialog.note-input.placeholder.text': 'Add note...',\n /** The error/warning text in the request permission dialog when the user's request has been declined */\n 'request-permission-dialog.warning.denied.text':\n 'Your request to access this project has been declined.',\n /** The error/warning text in the request permission dialog when the user's request has been denied due to too many outstanding requests */\n 'request-permission-dialog.warning.limit-reached.text':\n \"You've reached the limit for role requests across all projects. Please wait before submitting more requests or contact an administrator for assistance.\",\n\n /** Label for button when status is saved */\n 'status-bar.document-status-pulse.status.saved.text': 'Saved',\n /** Label for button when status is syncing */\n 'status-bar.document-status-pulse.status.syncing.text': 'Saving...',\n /** Accessibility label indicating when the document was last published, in relative time, eg \"3 weeks ago\" */\n 'status-bar.publish-status-button.last-published-time.aria-label':\n 'Last published {{relativeTime}}',\n /** Text for tooltip showing explanation of timestamp/relative time, eg \"Last published <RelativeTime/>\" */\n 'status-bar.publish-status-button.last-published-time.tooltip': 'Last published <RelativeTime/>',\n /** Accessibility label indicating when the document was last updated, in relative time, eg \"2 hours ago\" */\n 'status-bar.publish-status-button.last-updated-time.aria-label': 'Last updated {{relativeTime}}',\n /** Text for tooltip showing explanation of timestamp/relative time, eg \"Last updated <RelativeTime/>\" */\n 'status-bar.publish-status-button.last-updated-time.tooltip': 'Last updated <RelativeTime/>',\n /** Aria label for the button */\n 'status-bar.review-changes-button.aria-label': 'Review changes',\n /** Label for button when status is saved */\n 'status-bar.review-changes-button.status.saved.text': 'Saved!',\n /** Label for button when status is syncing */\n 'status-bar.review-changes-button.status.syncing.text': 'Saving...',\n /** Text for the secondary text for tooltip for the button */\n 'status-bar.review-changes-button.tooltip.changes-saved': 'Changes saved',\n /** Primary text for tooltip for the button */\n 'status-bar.review-changes-button.tooltip.text': 'Review changes',\n\n /** The text that appears in side the documentation link */\n 'structure-error.docs-link.text': 'View documentation',\n /** Labels the error message or error stack of the structure error screen */\n 'structure-error.error.label': 'Error',\n /** The header that appears at the top of the error screen */\n 'structure-error.header.text': 'Encountered an error while reading structure',\n /** The text in the reload button to retry rendering the structure */\n 'structure-error.reload-button.text': 'Reload',\n /** Labels the structure path of the structure error screen */\n 'structure-error.structure-path.label': 'Structure path',\n\n /** The aria label for the menu button in the timeline item */\n 'timeline-item.menu-button.aria-label': 'Open action menu',\n /** The text for the tooltip in menu button the timeline item */\n 'timeline-item.menu-button.tooltip': 'Actions',\n /** The text for the collapse action in the timeline item menu */\n 'timeline-item.menu.action-collapse': 'Collapse',\n /** The text for the expand action in the timeline item menu */\n 'timeline-item.menu.action-expand': 'Expand',\n\n /** The text for the published event menu tooltip when the release is not found */\n 'timeline-item.not-found-release.tooltip': 'Release with id \"{{releaseId}}\" not found',\n\n /** The text for the \"Inline changes\" action, which is used to toggle the visibility of content diffs inside inputs */\n 'toggle-inline-changes.menu-item.title': 'Inline changes',\n})\n\n/**\n * @alpha\n */\nexport type StructureLocaleResourceKeys = keyof typeof structureLocaleStrings\n\nexport default structureLocaleStrings\n"],"names":["structureLocaleStrings","defineLocalesResources"],"mappings":";AAQA,MAAMA,yBAAyBC,uBAAuB,aAAa;AAAA;AAAA,EAEjE,kCAAkC;AAAA;AAAA,EAElC,oCAAoC;AAAA;AAAA,EAEpC,4CACE;AAAA;AAAA,EAEF,uBAAuB;AAAA;AAAA,EAEvB,+BAA+B;AAAA;AAAA,EAE/B,qCACE;AAAA;AAAA,EAEF,iEACE;AAAA;AAAA,EAEF,uEACE;AAAA;AAAA,EAEF,qDAAqD;AAAA;AAAA,EAErD,6CAA6C;AAAA;AAAA,EAE7C,iDAAiD;AAAA;AAAA,EAEjD,6CAA6C;AAAA;AAAA,EAE7C,gCAAgC;AAAA;AAAA,EAGhC,uCAAuC;AAAA;AAAA,EAEvC,kDACE;AAAA;AAAA,EAEF,0BAA0B;AAAA;AAAA,EAE1B,kCAAkC;AAAA;AAAA,EAElC,wDAAwD;AAAA;AAAA,EAExD,4CAA4C;AAAA;AAAA,EAG5C,qCAAqC;AAAA;AAAA,EAErC,8BAA8B;AAAA;AAAA,EAE9B,wBAAwB;AAAA;AAAA,EAExB,kCAAkC;AAAA;AAAA,EAElC,6CACE;AAAA;AAAA,EAEF,oCACE;AAAA;AAAA,EAEF,qCAAqC;AAAA;AAAA,EAErC,kCAAkC;AAAA;AAAA,EAElC,gCAAgC;AAAA;AAAA,EAEhC,4CACE;AAAA;AAAA,EAEF,0BAA0B;AAAA;AAAA,EAG1B,kCAAkC;AAAA;AAAA,EAElC,kDAAkD;AAAA;AAAA,EAGlD,wBAAwB;AAAA;AAAA,EAExB,0BAA0B;AAAA;AAAA,EAG1B,2CAA2C;AAAA;AAAA,EAE3C,uCAAuC;AAAA;AAAA,EAEvC,0BAA0B;AAAA;AAAA,EAE1B,uCACE;AAAA;AAAA,EAEF,wCACE;AAAA;AAAA,EAEF,gDAAgD;AAAA;AAAA,EAEhD,wEACE;AAAA;AAAA,EAEF,4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;AAAA,EAG3C,yCAAyC;AAC3C,CAAC;"}
1
+ {"version":3,"file":"resources7.js","sources":["../../src/structure/i18n/resources.ts"],"sourcesContent":["/* eslint sort-keys: \"error\" */\nimport {defineLocalesResources} from 'sanity'\n\n/**\n * Defined locale strings for the structure tool, in US English.\n *\n * @internal\n */\nconst structureLocaleStrings = defineLocalesResources('structure', {\n /** Label for the \"Copy Document URL\" document action */\n 'action.copy-document-url.label': 'Copy Document URL',\n /** Tooltip when action button is disabled because the operation is not ready */\n 'action.delete.disabled.not-ready': 'Operation not ready',\n /** Tooltip when action button is disabled because the document does not exist */\n 'action.delete.disabled.nothing-to-delete':\n \"This document doesn't yet exist or is already deleted\",\n /** Label for the \"Delete\" document action button */\n 'action.delete.label': 'Delete',\n /** Label for the \"Delete\" document action while the document is being deleted */\n 'action.delete.running.label': 'Deleting…',\n /** Tooltip when action is disabled because the document is linked to Canvas */\n 'action.disabled-by-canvas.tooltip':\n 'Some document actions are disabled for documents linked to Canvas',\n /** Message prompting the user to confirm discarding changes */\n 'action.discard-changes.confirm-dialog.confirm-discard-changes':\n 'Are you sure you want to discard all changes since last published?',\n /** Message prompting the user to confirm discarding changes */\n 'action.discard-changes.confirm-dialog.confirm-discard-changes-draft':\n 'Are you sure you want to discard all changes and delete this draft document?',\n /**Header for the confirm discard dialog */\n 'action.discard-changes.confirm-dialog.header.text': 'Discard changes?',\n /** Tooltip when action is disabled because the document has no unpublished changes */\n 'action.discard-changes.disabled.no-change': 'This document has no unpublished changes',\n /** Tooltip when action is disabled because the document is not published */\n 'action.discard-changes.disabled.not-published': 'This document is not published',\n /** Tooltip when action button is disabled because the operation is not ready */\n 'action.discard-changes.disabled.not-ready': 'Operation not ready',\n /** Label for the \"Discard changes\" document action */\n 'action.discard-changes.label': 'Discard changes',\n\n /** Tooltip when action is disabled because the operation is not ready */\n 'action.duplicate.disabled.not-ready': 'Operation not ready',\n /** Tooltip when action is disabled because the document doesn't exist */\n 'action.duplicate.disabled.nothing-to-duplicate':\n \"This document doesn't yet exist so there's nothing to duplicate\",\n /** Label for the \"Duplicate\" document action */\n 'action.duplicate.label': 'Duplicate',\n /** Label for the \"Duplicate\" document action while the document is being duplicated */\n 'action.duplicate.running.label': 'Duplicating…',\n /** Tooltip when publish button is disabled because the document is already published, and published time is unavailable.*/\n 'action.publish.already-published.no-time-ago.tooltip': 'Already published',\n /** Tooltip when publish button is disabled because the document is already published.*/\n 'action.publish.already-published.tooltip': 'Published {{timeSincePublished}}',\n\n /** Tooltip when action is disabled because the studio is not ready.*/\n 'action.publish.disabled.not-ready': 'Operation not ready',\n /** Label for action when there are pending changes.*/\n 'action.publish.draft.label': 'Publish',\n /** Label for the \"Publish\" document action */\n 'action.publish.label': 'Publish',\n /** Label for the \"Publish\" document action when the document has live edit enabled.*/\n 'action.publish.live-edit.label': 'Publish',\n /** Fallback tooltip for the \"Publish\" document action when publish is invoked for a document with live edit enabled.*/\n 'action.publish.live-edit.publish-disabled':\n 'Cannot publish since Live Edit is enabled for this document type',\n /** Tooltip for the \"Publish\" document action when the document has live edit enabled.*/\n 'action.publish.live-edit.tooltip':\n 'Live Edit is enabled for this content type and publishing happens automatically as you make changes',\n /** Tooltip when publish button is disabled because there are no changes.*/\n 'action.publish.no-changes.tooltip': 'No unpublished changes',\n /** Label for the \"Publish\" document action when there are no changes.*/\n 'action.publish.published.label': 'Published',\n /** Label for the \"Publish\" document action while publish is being executed.*/\n 'action.publish.running.label': 'Publishing…',\n /** Tooltip when the \"Publish\" document action is disabled due to validation issues */\n 'action.publish.validation-issues.tooltip':\n 'There are validation errors that need to be fixed before this document can be published',\n /** Tooltip when publish button is waiting for validation and async tasks to complete.*/\n 'action.publish.waiting': 'Waiting for tasks to finish before publishing',\n\n /** Message prompting the user to confirm that they want to restore to an earlier revision*/\n 'action.restore.confirm.message': 'Are you sure you want to restore this document?',\n /** Fallback tooltip for when user is looking at the initial revision */\n 'action.restore.disabled.cannot-restore-initial': \"You can't restore to the initial revision\",\n\n /** Label for the \"Restore\" document action */\n 'action.restore.label': 'Revert to revision',\n /** Default tooltip for the action */\n 'action.restore.tooltip': 'Restore to this revision',\n\n /** Tooltip when action is disabled because the document is not already published */\n 'action.unpublish.disabled.not-published': 'This document is not published',\n /** Tooltip when action is disabled because the operation is not ready */\n 'action.unpublish.disabled.not-ready': 'Operation not ready',\n /** Label for the \"Unpublish\" document action */\n 'action.unpublish.label': 'Unpublish',\n /** Fallback tooltip for the Unpublish document action when publish is invoked for a document with live edit enabled.*/\n 'action.unpublish.live-edit.disabled':\n 'This document has live edit enabled and cannot be unpublished',\n /** Description for the archived release banner, rendered when viewing the history of a version document from the publihed view */\n 'banners.archived-release.description':\n 'This document version belongs to the archived <VersionBadge>{{title}}</VersionBadge> release',\n /** Description for the archived scheduled draft banner, rendered when viewing the history of a cardinality one release document */\n 'banners.archived-scheduled-draft.description': 'This scheduled draft is archived',\n /** The explanation displayed when a user attempts to create a new draft document, but the draft model is not switched on */\n 'banners.choose-new-document-destination.cannot-create-draft-document':\n 'Cannot create a draft document.',\n /** The explanation displayed when a user attempts to create a new published document, but the schema type doesn't support live-editing */\n 'banners.choose-new-document-destination.cannot-create-published-document':\n 'Cannot create a published document.',\n /** The prompt displayed when a user must select a different perspective in order to create a document */\n 'banners.choose-new-document-destination.choose-destination':\n 'Choose a destination for this document:',\n /** The explanation displayed when a user attempts to create a new document in a release, but the selected release is inactive */\n 'banners.choose-new-document-destination.release-inactive':\n 'The <VersionBadge>{{title}}</VersionBadge> release is not active.',\n /** The text for the restore button on the deleted document banner */\n 'banners.deleted-document-banner.restore-button.text': 'Restore most recent revision',\n /** The text content for the deleted document banner */\n 'banners.deleted-document-banner.text': 'This document has been deleted.',\n /** The text content for the deprecated document type banner */\n 'banners.deprecated-document-type-banner.text': 'This document type has been deprecated.',\n /** The text for publish action for discarding the version */\n 'banners.live-edit-draft-banner.discard.tooltip': 'Discard draft to continue editing.',\n /** The text for publish action for the draft banner */\n 'banners.live-edit-draft-banner.publish.tooltip': 'Publish draft to continue editing.',\n\n /** The text content for the live edit document when it's a draft */\n 'banners.live-edit-draft-banner.text':\n 'The type <strong>{{schemaType}}</strong> has <code>liveEdit</code> enabled, but a draft version of this document exists. Publish or discard the draft in order to continue live editing it.',\n /** The label for the \"compare draft\" action */\n 'banners.obsolete-draft.actions.compare-draft.text': 'Compare draft',\n /** The label for the \"discard draft\" action */\n 'banners.obsolete-draft.actions.discard-draft.text': 'Discard draft',\n /** The label for the \"publish draft\" action */\n 'banners.obsolete-draft.actions.publish-draft.text': 'Publish draft',\n /** The warning displayed when editing a document that has an obsolete draft because the draft model is not switched on */\n 'banners.obsolete-draft.draft-model-inactive.text':\n 'The workspace does not have drafts enabled, but a draft version of this document exists.',\n /** The text for the permission check banner if the user only has one role, and it does not allow publishing this document */\n 'banners.permission-check-banner.missing-permission_create_one':\n 'Your role <Roles/> does not have permission to publish this document.',\n /** The text for the permission check banner if the user only has multiple roles, but they do not allow publishing this document */\n 'banners.permission-check-banner.missing-permission_create_other':\n 'Your roles <Roles/> do not have permission to publish this document.',\n /** The text for the permission check banner if the user only has one role, and it does not allow editing this document */\n 'banners.permission-check-banner.missing-permission_update_one':\n 'Your role <Roles/> does not have permission to edit this document.',\n /** The text for the permission check banner if the user only has multiple roles, but they do not allow editing this document */\n 'banners.permission-check-banner.missing-permission_update_other':\n 'Your roles <Roles/> do not have permission to edit this document.',\n /** The pending text for the request permission button that appears for viewer roles */\n 'banners.permission-check-banner.request-permission-button.sent': 'Editor request sent',\n /** The text for the request permission button that appears for viewer roles */\n 'banners.permission-check-banner.request-permission-button.text': 'Ask to edit',\n /** Description for the archived release banner, rendered when viewing the history of a version document from the published view */\n 'banners.published-release.description':\n \"You are viewing a read-only document that was published as part of <VersionBadge>{{title}}</VersionBadge>. It can't be edited\",\n /** The text for the reload button */\n 'banners.reference-changed-banner.reason-changed.reload-button.text': 'Reload reference',\n /** The text for the reference change banner if the reason is that the reference has been changed */\n 'banners.reference-changed-banner.reason-changed.text':\n 'This reference has changed since you opened it.',\n /** The text for the close button */\n 'banners.reference-changed-banner.reason-removed.close-button.text': 'Close reference',\n /** The text for the reference change banner if the reason is that the reference has been deleted */\n 'banners.reference-changed-banner.reason-removed.text':\n 'This reference has been removed since you opened it.',\n /** The text that appears for the action button to add the current document to the global release */\n 'banners.release.action.add-to-release': 'Add to release',\n /** The text that appears for the action button to add the current document to the global release */\n 'banners.release.action.open-to-edit': 'Open release to edit',\n /** Toast description in case an error occurs when adding a document to a release */\n 'banners.release.error.description':\n 'An error occurred when adding document to the release: {{message}}',\n /** Toast title in case an error occurs when adding a document to a release */\n 'banners.release.error.title': 'Error adding document to release',\n /** The text for the banner that appears when a document only has versions but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description': 'The document only exists in the',\n /** The text for the banner that appears when a document only has versions but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description-end_one': 'release',\n /** The text for the banner that appears when a document only has versions but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description-end_other': 'releases',\n /** The text for the banner that appears when there are multiple versions but no drafts or published, only one extra releases */\n 'banners.release.navigate-to-edit-description-multiple_one':\n 'This document is part of the <VersionBadge/> release and {{count}} more release.',\n /** The text for the banner that appears when there are multiple versions but no drafts or published, more than one extra releases */\n 'banners.release.navigate-to-edit-description-multiple_other':\n 'This document is part of the <VersionBadge/> release and {{count}} more releases',\n /** The text for the banner that appears when a document is not part of any release\n * @deprecated – no longer in use\n * */\n 'banners.release.navigate-to-edit-description-none': 'This document is not part of any release',\n /** The text for the banner that appears when a document only has one version but is in a draft or published pinned release */\n 'banners.release.navigate-to-edit-description-single':\n 'This document is part of the <VersionBadge/> release',\n /** The text for the banner that appears when a document is not in the current global release */\n 'banners.release.not-in-release': 'Not in the <VersionBadge>{{title}}</VersionBadge> release.',\n /** Description of toast that will appear in case of latency between the user adding a document to a release and the UI reflecting it */\n 'banners.release.waiting.description':\n 'Please hold tight while the document is added to the release. It should not take longer than a few seconds.',\n /** Title of toast that will appear in case of latency between the user adding a document to a release and the UI reflecting it */\n 'banners.release.waiting.title': 'Adding document to release…',\n /** The text for the revision not found banner */\n 'banners.revision-not-found.description':\n \"We couldn't find the document revision selected, please select another entry from the history list.\",\n /** The text content for the scheduled draft override banner */\n 'banners.scheduled-draft-override-banner.text':\n 'A scheduled draft for this document exists. If you publish changes now they will be overwritten when the schedule runs.',\n /** The text content for the unpublished document banner when is part of a release */\n 'banners.unpublished-release-banner.text':\n 'This document will be unpublished as part of the <VersionBadge>{{title}}</VersionBadge> release.',\n /** The text content for the unpublished document banner letting the user know that the current published version is being shown */\n 'banners.unpublished-release-banner.text-with-published':\n 'Showing the current <strong>published</strong> version:',\n /** Browser/tab title when creating a new document of a given type */\n 'browser-document-title.new-document': 'New {{schemaType}}',\n /** Browser/tab title when editing a document where the title cannot be resolved from preview configuration */\n 'browser-document-title.untitled-document': 'Untitled',\n\n /** The action menu button aria-label */\n 'buttons.action-menu-button.aria-label': 'Open document actions',\n /** The action menu button tooltip */\n 'buttons.action-menu-button.tooltip': 'Document actions',\n\n /** The aria-label for the collapse pane button on the document panel header */\n 'buttons.focus-pane-button.aria-label.collapse': 'Exit focus mode (show navigation)',\n /** The aria-label for the focus pane button on the document panel header */\n 'buttons.focus-pane-button.aria-label.focus': 'Enter focus mode (hide navigation)',\n\n /** The tooltip for the collapse pane button on the document panel header */\n 'buttons.focus-pane-button.tooltip.collapse': 'Exit focus mode',\n /** The tooltip for the focus pane button on the document panel header */\n 'buttons.focus-pane-button.tooltip.focus': 'Enter focus mode',\n /** The aria-label for the split pane button on the document panel header */\n 'buttons.split-pane-button.aria-label': 'Split pane right',\n /** The tool tip for the split pane button on the document panel header */\n 'buttons.split-pane-button.tooltip': 'Split pane right',\n /** The title for the close button on the split pane on the document panel header */\n 'buttons.split-pane-close-button.title': 'Close split pane',\n /** The title for the close group button on the split pane on the document panel header */\n 'buttons.split-pane-close-group-button.title': 'Close pane group',\n /** The text for the canvas linked banner action button */\n 'canvas.banner.edit-in-canvas-action': 'Edit in Canvas',\n /** The text for the canvas linked banner when the document in editable mode*/\n 'canvas.banner.editable.linked-text': 'This document can be edited in Canvas.',\n /** The description for the canvas linked banner popover in editable mode*/\n 'canvas.banner.editable.popover-description':\n 'Canvas lets you write freely, then update content in Studio without manual field-by-field copying.',\n /** The heading for the canvas linked banner popover in editable mode*/\n 'canvas.banner.editable.popover-heading': 'Free-form writing',\n /** The text for the canvas linked banner when the document is a draft */\n 'canvas.banner.linked-text.draft': 'This draft document is linked to Canvas',\n /** The text for the canvas linked banner when the document is a live document */\n 'canvas.banner.linked-text.published': 'This live document is linked to Canvas',\n /** The text for the canvas linked banner when the document is a version document */\n 'canvas.banner.linked-text.version': 'This version document is linked to Canvas',\n /** The text for the canvas linked banner popover button */\n 'canvas.banner.popover-button-text': 'Learn more',\n /** The description for the canvas linked banner popover */\n 'canvas.banner.popover-description':\n 'Canvas lets you author in a free-form editor that automatically maps back to the Studio as structured content - as you type.',\n /** The heading for the canvas linked banner popover */\n 'canvas.banner.popover-heading': 'Idea first authoring',\n /** The description for the changes banner */\n 'changes.banner.description':\n 'Showing the history for the <strong>{{perspective}}</strong> version of this document.',\n /** The tooltip for the changes banner */\n 'changes.banner.tooltip':\n 'This view shows the changes that occurred in a specific version of this document. Select a different version to see its changes',\n /** The label used in the changes inspector for the from selector */\n 'changes.from.label': 'From',\n /* The label for the history tab in the changes inspector*/\n 'changes.tab.history': 'History',\n /* The label for the review tab in the changes inspector*/\n 'changes.tab.review-changes': 'Review changes',\n /** The label used in the changes inspector for the to selector */\n 'changes.to.label': 'To',\n\n /** The error message shown when the specified document comparison mode is not supported */\n 'compare-version.error.invalidModeParam':\n '\"{{input}}\" is not a supported document comparison mode.',\n /** The error message shown when the next document for comparison could not be extracted from the URL */\n 'compare-version.error.invalidNextDocumentParam': 'The next document parameter is invalid.',\n /** The error message shown when the document comparison URL could not be parsed */\n 'compare-version.error.invalidParams.title': 'Unable to compare documents',\n /** The error message shown when the previous document for comparison could not be extracted from the URL */\n 'compare-version.error.invalidPreviousDocumentParam':\n 'The previous document parameter is invalid.',\n /** The text for the tooltip when the \"Compare versions\" action for a document is disabled */\n 'compare-versions.menu-item.disabled-reason':\n 'There are no other versions of this document to compare.',\n /** The text for the \"Compare versions\" action for a document */\n 'compare-versions.menu-item.title': 'Compare versions',\n /** The string used to label draft documents */\n 'compare-versions.status.draft': 'Draft',\n /** The string used to label published documents */\n 'compare-versions.status.published': 'Published',\n /** The title used when comparing versions of a document */\n 'compare-versions.title': 'Compare versions',\n\n /** The text in the \"Cancel\" button in the confirm delete dialog that cancels the action and closes the dialog */\n 'confirm-delete-dialog.cancel-button.text': 'Cancel',\n /** Used in `confirm-delete-dialog.cdr-summary.title` */\n 'confirm-delete-dialog.cdr-summary.document-count_one': '1 document',\n /** Used in `confirm-delete-dialog.cdr-summary.title` */\n 'confirm-delete-dialog.cdr-summary.document-count_other': '{{count}} documents',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_one': 'Dataset: {{datasets}}',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_other': 'Datasets: {{datasets}}',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_unavailable_one': 'Unavailable dataset',\n /** The text that appears in the subtitle `<summary>` that lists the datasets below the title */\n 'confirm-delete-dialog.cdr-summary.subtitle_unavailable_other': 'Unavailable datasets',\n /** The text that appears in the title `<summary>` that includes the list of CDRs (singular) */\n 'confirm-delete-dialog.cdr-summary.title_one': '{{documentCount}} in another dataset',\n /** The text that appears in the title `<summary>` that includes the list of CDRs (plural) */\n 'confirm-delete-dialog.cdr-summary.title_other': '{{documentCount}} in {{count}} datasets',\n /** Appears when hovering over the copy button to copy */\n 'confirm-delete-dialog.cdr-table.copy-id-button.tooltip': 'Copy ID to clipboard',\n /** The header for the dataset column in the list of cross-dataset references found */\n 'confirm-delete-dialog.cdr-table.dataset.label': 'Dataset',\n /** The header for the document ID column in the list of cross-dataset references found */\n 'confirm-delete-dialog.cdr-table.document-id.label': 'Document ID',\n /** The toast title when the copy button has been clicked but copying failed */\n 'confirm-delete-dialog.cdr-table.id-copied-toast.title-failed': 'Failed to copy document ID',\n /** The header for the project ID column in the list of cross-dataset references found */\n 'confirm-delete-dialog.cdr-table.project-id.label': 'Project ID',\n /** The text in the \"Delete anyway\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-anyway-button.text_delete': 'Delete all versions anyway',\n /** The text in the \"Unpublish anyway\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-anyway-button.text_unpublish': 'Unpublish anyway',\n /** The text in the \"Delete now\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-button.text_delete': 'Delete all versions',\n /** The text in the \"Unpublish now\" button in the confirm delete dialog that confirms the action */\n 'confirm-delete-dialog.confirm-button.text_unpublish': 'Unpublish now',\n /** If no referring documents are found, this text appears above the cancel and confirmation buttons */\n 'confirm-delete-dialog.confirmation.text_delete':\n 'Are you sure you want to delete all the versions of this document?',\n /** If no referring documents are found, this text appears above the cancel and confirmation buttons */\n 'confirm-delete-dialog.confirmation.text_unpublish':\n 'Are you sure you want to unpublish “<DocumentTitle/>”?',\n /** The text body of the error dialog. */\n 'confirm-delete-dialog.error.message.text':\n 'An error occurred while loading referencing documents.',\n /** The text in the retry button of the confirm delete dialog if an error occurred. */\n 'confirm-delete-dialog.error.retry-button.text': 'Retry',\n /** The header of the confirm delete dialog if an error occurred while the confirm delete dialog was open. */\n 'confirm-delete-dialog.error.title.text': 'Error',\n /** The header of the confirm delete dialog */\n 'confirm-delete-dialog.header.text_delete': 'Delete document?',\n /** The header of the confirm delete dialog */\n 'confirm-delete-dialog.header.text_unpublish': 'Unpublish document?',\n /** The text that appears while the referring documents are queried */\n 'confirm-delete-dialog.loading.text': 'Looking for referring documents…',\n /** Shown if there are references to other documents but the user does not have the permission to see the relevant document IDs */\n 'confirm-delete-dialog.other-reference-count.title_one': '1 other reference not show',\n /** Shown if there are references to other documents but the user does not have the permission to see the relevant document IDs */\n 'confirm-delete-dialog.other-reference-count.title_other': '{{count}} other references not shown',\n /** Text in the tooltip of this component if hovering over the info icon */\n 'confirm-delete-dialog.other-reference-count.tooltip':\n \"We can't display metadata for these references due to a missing access token for the related datasets.\",\n /** Appears when unable to render a document preview in the referring document list */\n 'confirm-delete-dialog.preview-item.preview-unavailable.subtitle': 'ID: {{documentId}}',\n /** Appears when unable to render a document preview in the referring document list */\n 'confirm-delete-dialog.preview-item.preview-unavailable.title': 'Preview unavailable',\n /** Warns the user of affects to other documents if the action is confirmed (delete) */\n 'confirm-delete-dialog.referential-integrity-disclaimer.text_delete':\n 'If you delete this document, documents that refer to it will no longer be able to access it.',\n /** Warns the user of affects to other documents if the action is confirmed (unpublish) */\n 'confirm-delete-dialog.referential-integrity-disclaimer.text_unpublish':\n 'If you unpublish this document, documents that refer to it will no longer be able to access it.',\n /** Tells the user the count of how many other referring documents there are before listing them. (singular) */\n 'confirm-delete-dialog.referring-document-count.text_one':\n '1 document refers to “<DocumentTitle/>”',\n /** Tells the user the count of how many other referring documents there are before listing them. (plural) */\n 'confirm-delete-dialog.referring-document-count.text_other':\n '{{count}} documents refer to “<DocumentTitle/>”',\n /** Describes the list of documents that refer to the one trying to be deleted (delete) */\n 'confirm-delete-dialog.referring-documents-descriptor.text_delete':\n 'You may not be able to delete “<DocumentTitle/>” because the following documents refer to it:',\n /** Describes the list of documents that refer to the one trying to be deleted (unpublish) */\n 'confirm-delete-dialog.referring-documents-descriptor.text_unpublish':\n 'You may not be able to unpublish “<DocumentTitle/>” because the following documents refer to it:',\n\n /** The text for the cancel button in the confirm dialog used in document action shortcuts if none is provided */\n 'confirm-dialog.cancel-button.fallback-text': 'Cancel',\n /** The text for the confirm button in the confirm dialog used in document action shortcuts if none is provided */\n 'confirm-dialog.confirm-button.fallback-text': 'Confirm',\n\n /** For the default structure definition, the title for the \"Content\" pane */\n 'default-definition.content-title': 'Content',\n\n /** The text shown if there was an error while getting the document's title via a preview value */\n 'doc-title.error.text': 'Error: {{errorMessage}}',\n /** The text shown if the preview value for a document is non-existent or empty */\n 'doc-title.fallback.text': 'Untitled',\n /** The text shown if a document's title via a preview value cannot be determined due to an unknown schema type */\n 'doc-title.unknown-schema-type.text': 'Unknown schema type: {{schemaType}}',\n\n /** Tooltip text shown for the close button of the document inspector */\n 'document-inspector.close-button.tooltip': 'Close',\n /** The title shown in the dialog header, when inspecting a valid document */\n 'document-inspector.dialog.title': 'Inspecting <DocumentTitle/>',\n /** The title shown in the dialog header, when the document being inspected is not created yet/has no value */\n 'document-inspector.dialog.title-no-value': 'No value',\n /** Title shown for menu item that opens the \"Inspect\" dialog */\n 'document-inspector.menu-item.title': 'Inspect',\n /** the placeholder text for the search input on the inspect dialog */\n 'document-inspector.search.placeholder': 'Search',\n /** The \"parsed\" view mode, meaning the JSON is searchable, collapsible etc */\n 'document-inspector.view-mode.parsed': 'Parsed',\n /** The \"raw\" view mode, meaning the JSON is presented syntax-highlighted, but with no other features - optimal for copying */\n 'document-inspector.view-mode.raw-json': 'Raw JSON',\n\n /** The text for when a form is hidden */\n 'document-view.form-view.form-hidden': 'This form is hidden',\n /** Fallback title shown when a form title is not provided */\n 'document-view.form-view.form-title-fallback': 'Untitled',\n /** The text for when the form view is loading a document */\n 'document-view.form-view.loading': 'Loading document…',\n /** The description of the sync lock toast on the form view */\n 'document-view.form-view.sync-lock-toast.description':\n 'Please hold tight while the document is synced. This usually happens right after the document has been published, and it should not take more than a few seconds',\n /** The title of the sync lock toast on the form view */\n 'document-view.form-view.sync-lock-toast.title': 'Syncing document…',\n\n /** The description for the document favorite action */\n 'document.favorites.add-to-favorites': 'Add to favorites',\n /** The description for the document unfavorite action */\n 'document.favorites.remove-from-favorites': 'Remove from favorites',\n\n /** The description for the events inspector when we can't load the document so we default to compare with published */\n 'events.compare-with-published.description':\n \"We're unable to load the changes for this document, probably due to history retention policy of your plan, this shows you how the <strong>{{version}}</strong> version compares to the <strong>published</strong> version.\",\n\n /** The title for the events inspector when we can't load the document so we default to compare with published */\n 'events.compare-with-published.title': 'Comparing with published',\n\n /**The title for the menu items that will be shown when expanding a publish release event to inspect the document */\n 'events.inspect.release': 'Inspect <VersionBadge>{{releaseTitle}}</VersionBadge> document',\n /**The title for the menu items that will be shown when expanding a publish draft event to inspect the draft document*/\n 'events.open.draft': 'Open <VersionBadge>draft</VersionBadge> document',\n /**The title for the menu items that will be shown when expanding a publish release event to inspect the release*/\n 'events.open.release': 'Open <VersionBadge>{{releaseTitle}}</VersionBadge> release',\n /** The loading messaging for when the tooltip is still loading permission info */\n 'insufficient-permissions-message-tooltip.loading-text': 'Loading…',\n\n /** --- Menu items --- */\n /** The menu item group title to use for the Action menu items */\n 'menu-item-groups.actions-group': 'Actions',\n /** The menu item group title to use for the Layout menu items */\n 'menu-item-groups.layout-group': 'Layout',\n /** The menu item group title to use for the Sort menu items */\n 'menu-item-groups.sorting-group': 'Sort',\n\n /** The menu item title to use the compact view */\n 'menu-items.layout.compact-view': 'Compact view',\n /** The menu item title to use the detailed view */\n 'menu-items.layout.detailed-view': 'Detailed view',\n /** The menu item title to Sort by Created */\n 'menu-items.sort-by.created': 'Sort by Created',\n /** The menu item title to Sort by Last Edited */\n 'menu-items.sort-by.last-edited': 'Sort by Last Edited',\n\n /** The link text of the no document type screen that appears directly below the subtitle */\n 'no-document-types-screen.link-text': 'Learn how to add a document type →',\n /** The subtitle of the no document type screen that appears directly below the title */\n 'no-document-types-screen.subtitle': 'Please define at least one document type in your schema.',\n\n /** The title of the no document type screen */\n 'no-document-types-screen.title': 'No document types',\n\n /** Text shown on back button visible on smaller breakpoints */\n 'pane-header.back-button.text': 'Back',\n /** tooltip text (via `title` attribute) for the menu button */\n 'pane-header.context-menu-button.tooltip': 'Show menu',\n /** Appears in a document list pane header if there are more than one option for create. This is the label for that menu */\n 'pane-header.create-menu.label': 'Create',\n /** Tooltip displayed on the create new button in document lists */\n 'pane-header.create-new-button.tooltip': 'Create new document',\n /** The `aria-label` for the disabled button in the pane header if create permissions are granted */\n 'pane-header.disabled-created-button.aria-label': 'Insufficient permissions',\n /** The text shown in the tooltip of pane item previews of documents if there are unpublished edits */\n 'pane-item.draft-status.has-draft.tooltip': 'Edited <RelativeTime/>',\n /** The text shown in the tooltip of pane item previews of documents if there are no unpublished edits */\n 'pane-item.draft-status.no-draft.tooltip': 'No unpublished edits',\n /** The subtitle tor pane item previews if there isn't a matching schema type found */\n 'pane-item.missing-schema-type.subtitle': 'Document: <Code>{{documentId}}</Code>',\n /** The title tor pane item previews if there isn't a matching schema type found */\n 'pane-item.missing-schema-type.title': 'No schema found for type <Code>{{documentType}}</Code>',\n /** The text shown in the tooltip of pane item previews of documents if there are unpublished edits */\n 'pane-item.published-status.has-published.tooltip': 'Published <RelativeTime/>',\n /** The text shown in the tooltip of pane item previews of documents if there are no unpublished edits */\n 'pane-item.published-status.no-published.tooltip': 'No unpublished edits',\n /** The text used in the document header title if there is an error */\n 'panes.document-header-title.error.text': 'Error: {{error}}',\n /** The text used in the document header title if creating a new item */\n 'panes.document-header-title.new.text': 'New {{schemaType}}',\n /** The text used in the document header title if no other title can be determined */\n 'panes.document-header-title.untitled.text': 'Untitled',\n /** The help text saying that we have given up on automatic retry */\n 'panes.document-list-pane.error.max-retries-attempted':\n 'Not automatically retrying after {{count}} unsuccessful attempts.',\n /** The help text saying that we'll retry fetching the document list */\n 'panes.document-list-pane.error.retrying': 'Retrying…',\n /** The error text on the document list pane */\n 'panes.document-list-pane.error.text': 'Encountered an error while fetching documents.',\n /** The error text on the document list pane */\n 'panes.document-list-pane.error.text.dev': 'Error: <Code>{{error}}</Code>',\n /** The error text on the document list pane if the browser appears to be offlline */\n 'panes.document-list-pane.error.text.offline': 'The Internet connection appears to be offline.',\n /** The error title on the document list pane */\n 'panes.document-list-pane.error.title': 'Could not fetch list items',\n /** The help text saying that we'll retry fetching the document list */\n 'panes.document-list-pane.error.will-retry-automatically_one': 'Retrying…',\n 'panes.document-list-pane.error.will-retry-automatically_other': 'Retrying… (#{{count}}).',\n /** The text of the document list pane if more than a maximum number of documents are returned */\n 'panes.document-list-pane.max-items.text': 'Displaying a maximum of {{limit}} documents',\n /** The text of the document list pane if no documents are found for a specified type */\n 'panes.document-list-pane.no-documents-of-type.text': 'No documents of this type',\n /** The text of the document list pane if no documents are found */\n 'panes.document-list-pane.no-documents.text': 'No results found',\n /** The text of the document list pane if no documents are found matching specified criteria */\n 'panes.document-list-pane.no-matching-documents.text': 'No matching documents',\n /** The search input for the search input on the document list pane */\n 'panes.document-list-pane.reconnecting': 'Trying to connect…',\n /** The aria-label for the search input on the document list pane */\n 'panes.document-list-pane.search-input.aria-label': 'Search list',\n /** The search input for the search input on the document list pane */\n 'panes.document-list-pane.search-input.placeholder': 'Search list',\n /** The summary title when displaying an error for a document operation result */\n 'panes.document-operation-results.error.summary.title': 'Details',\n /** The text when a generic operation failed (fallback, generally not shown) */\n 'panes.document-operation-results.operation-error': 'An error occurred during {{context}}',\n /** The text when a delete operation failed */\n 'panes.document-operation-results.operation-error_delete':\n 'An error occurred while attempting to delete this document. This usually means that there are other documents that refers to it.',\n /** The text when an unpublish operation failed */\n 'panes.document-operation-results.operation-error_unpublish':\n 'An error occurred while attempting to unpublish this document. This usually means that there are other documents that refers to it.',\n /** The text when a generic operation succeeded (fallback, generally not shown) */\n 'panes.document-operation-results.operation-success': 'Successfully performed {{op}} on document',\n /** The text when copy URL operation succeeded */\n 'panes.document-operation-results.operation-success_copy-url': 'Document URL copied to clipboard',\n /** */\n 'panes.document-operation-results.operation-success_createVersion':\n '<Strong>{{title}}</Strong> was added to the release',\n /** The text when a delete operation succeeded */\n 'panes.document-operation-results.operation-success_delete':\n 'The document was successfully deleted',\n /** The text when a discard changes operation succeeded */\n 'panes.document-operation-results.operation-success_discardChanges':\n 'All changes has now been discarded. The discarded draft can still be recovered from history',\n /** The text when a duplicate operation succeeded */\n 'panes.document-operation-results.operation-success_duplicate':\n 'The document was successfully duplicated',\n /** The text when a publish operation succeeded */\n 'panes.document-operation-results.operation-success_publish':\n '<Strong>{{title}}</Strong> was published',\n /** The text when a restore operation succeeded */\n 'panes.document-operation-results.operation-success_restore':\n '<Strong>{{title}}</Strong> was restored',\n /** The text when an unpublish operation succeeded */\n 'panes.document-operation-results.operation-success_unpublish':\n '<Strong>{{title}}</Strong> was unpublished. A draft has been created from the latest published revision.',\n /** The document title shown when document title is \"undefined\" in operation message */\n 'panes.document-operation-results.operation-undefined-title': 'Untitled',\n /** The loading message for the document not found pane */\n 'panes.document-pane.document-not-found.loading': 'Loading document…',\n /** The text of the document not found pane if the schema is known */\n 'panes.document-pane.document-not-found.text':\n 'The document type is not defined, and a document with the <Code>{{id}}</Code> identifier could not be found.',\n /** The title of the document not found pane if the schema is known */\n 'panes.document-pane.document-not-found.title': 'The document was not found',\n /** The text of the document not found pane if the schema is not found */\n 'panes.document-pane.document-unknown-type.text':\n 'This document has the schema type <Code>{{documentType}}</Code>, which is not defined as a type in the local content studio schema.',\n /** The title of the document not found pane if the schema is not found or unknown */\n 'panes.document-pane.document-unknown-type.title':\n 'Unknown document type: <Code>{{documentType}}</Code>',\n /** The title of the document not found pane if the schema is unknown */\n 'panes.document-pane.document-unknown-type.without-schema.text':\n 'This document does not exist, and no schema type was specified for it.',\n /** Default message shown while resolving the structure definition for an asynchronous node */\n 'panes.resolving.default-message': 'Loading…',\n /** Message shown while resolving the structure definition for an asynchronous node and it is taking a while (more than 5s) */\n 'panes.resolving.slow-resolve-message': 'Still loading…',\n /** The text to display when type is missing */\n 'panes.unknown-pane-type.missing-type.text':\n 'Structure item is missing required <Code>type</Code> property.',\n /** The title of the unknown pane */\n 'panes.unknown-pane-type.title': 'Unknown pane type',\n /** The text to display when type is unknown */\n 'panes.unknown-pane-type.unknown-type.text':\n 'Structure item of type <Code>{{type}}</Code> is not a known entity.',\n\n /** The text for the \"Open preview\" action for a document */\n 'production-preview.menu-item.title': 'Open preview',\n\n /** The text for the confirm button in the request permission dialog used in the permissions banner */\n 'request-permission-dialog.confirm-button.text': 'Send request',\n /** The description text for the request permission dialog used in the permissions banner */\n 'request-permission-dialog.description.text':\n \"Your request will be sent to the project administrator(s). If you'd like, you can also include a note\",\n /** The header/title for the request permission dialog used in the permissions banner */\n 'request-permission-dialog.header.text': 'Ask for edit access',\n /** The text describing the note input for the request permission dialog used in the permissions banner */\n 'request-permission-dialog.note-input.description.text': \"If you'd like, you can add a note\",\n /** The placeholder for the note input in the request permission dialog used in the permissions banner */\n 'request-permission-dialog.note-input.placeholder.text': 'Add note...',\n /** The error/warning text in the request permission dialog when the user's request has been declined */\n 'request-permission-dialog.warning.denied.text':\n 'Your request to access this project has been declined.',\n /** The error/warning text in the request permission dialog when the user's request has been denied due to too many outstanding requests */\n 'request-permission-dialog.warning.limit-reached.text':\n \"You've reached the limit for role requests across all projects. Please wait before submitting more requests or contact an administrator for assistance.\",\n\n /** Label for button when status is saved */\n 'status-bar.document-status-pulse.status.saved.text': 'Saved',\n /** Label for button when status is syncing */\n 'status-bar.document-status-pulse.status.syncing.text': 'Saving...',\n /** Accessibility label indicating when the document was last published, in relative time, eg \"3 weeks ago\" */\n 'status-bar.publish-status-button.last-published-time.aria-label':\n 'Last published {{relativeTime}}',\n /** Text for tooltip showing explanation of timestamp/relative time, eg \"Last published <RelativeTime/>\" */\n 'status-bar.publish-status-button.last-published-time.tooltip': 'Last published <RelativeTime/>',\n /** Accessibility label indicating when the document was last updated, in relative time, eg \"2 hours ago\" */\n 'status-bar.publish-status-button.last-updated-time.aria-label': 'Last updated {{relativeTime}}',\n /** Text for tooltip showing explanation of timestamp/relative time, eg \"Last updated <RelativeTime/>\" */\n 'status-bar.publish-status-button.last-updated-time.tooltip': 'Last updated <RelativeTime/>',\n /** Aria label for the button */\n 'status-bar.review-changes-button.aria-label': 'Review changes',\n /** Label for button when status is saved */\n 'status-bar.review-changes-button.status.saved.text': 'Saved!',\n /** Label for button when status is syncing */\n 'status-bar.review-changes-button.status.syncing.text': 'Saving...',\n /** Text for the secondary text for tooltip for the button */\n 'status-bar.review-changes-button.tooltip.changes-saved': 'Changes saved',\n /** Primary text for tooltip for the button */\n 'status-bar.review-changes-button.tooltip.text': 'Review changes',\n\n /** The text that appears in side the documentation link */\n 'structure-error.docs-link.text': 'View documentation',\n /** Labels the error message or error stack of the structure error screen */\n 'structure-error.error.label': 'Error',\n /** The header that appears at the top of the error screen */\n 'structure-error.header.text': 'Encountered an error while reading structure',\n /** The text in the reload button to retry rendering the structure */\n 'structure-error.reload-button.text': 'Reload',\n /** Labels the structure path of the structure error screen */\n 'structure-error.structure-path.label': 'Structure path',\n\n /** The aria label for the menu button in the timeline item */\n 'timeline-item.menu-button.aria-label': 'Open action menu',\n /** The text for the tooltip in menu button the timeline item */\n 'timeline-item.menu-button.tooltip': 'Actions',\n /** The text for the collapse action in the timeline item menu */\n 'timeline-item.menu.action-collapse': 'Collapse',\n /** The text for the expand action in the timeline item menu */\n 'timeline-item.menu.action-expand': 'Expand',\n\n /** The text for the published event menu tooltip when the release is not found */\n 'timeline-item.not-found-release.tooltip': 'Release with id \"{{releaseId}}\" not found',\n\n /** The text for the \"Inline changes\" action, which is used to toggle the visibility of content diffs inside inputs */\n 'toggle-inline-changes.menu-item.title': 'Inline changes',\n})\n\n/**\n * @alpha\n */\nexport type StructureLocaleResourceKeys = keyof typeof structureLocaleStrings\n\nexport default structureLocaleStrings\n"],"names":["structureLocaleStrings","defineLocalesResources"],"mappings":";AAQA,MAAMA,yBAAyBC,uBAAuB,aAAa;AAAA;AAAA,EAEjE,kCAAkC;AAAA;AAAA,EAElC,oCAAoC;AAAA;AAAA,EAEpC,4CACE;AAAA;AAAA,EAEF,uBAAuB;AAAA;AAAA,EAEvB,+BAA+B;AAAA;AAAA,EAE/B,qCACE;AAAA;AAAA,EAEF,iEACE;AAAA;AAAA,EAEF,uEACE;AAAA;AAAA,EAEF,qDAAqD;AAAA;AAAA,EAErD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AA,EAEF,iEACE;AAAA;AAAA,EAEF,mCAAmC;AAAA;AAAA,EAEnC,wCAAwC;AAAA;AAAA,EAExC,6CACE;AAAA;AAAA,EAEF,iCAAiC;AAAA;AAAA,EAEjC,6CACE;AAAA;AAAA,EAGF,sCAAsC;AAAA;AAAA,EAGtC,iDAAiD;AAAA;AAAA,EAEjD,8CACE;AAAA;AAAA,EAEF,yCAAyC;AAAA;AAAA,EAEzC,yDAAyD;AAAA;AAAA,EAEzD,yDAAyD;AAAA;AAAA,EAEzD,iDACE;AAAA;AAAA,EAEF,wDACE;AAAA;AAAA,EAGF,sDAAsD;AAAA;AAAA,EAEtD,wDAAwD;AAAA;AAAA,EAExD,mEACE;AAAA;AAAA,EAEF,gEAAgE;AAAA;AAAA,EAEhE,iEAAiE;AAAA;AAAA,EAEjE,8DAA8D;AAAA;AAAA,EAE9D,+CAA+C;AAAA;AAAA,EAE/C,sDAAsD;AAAA;AAAA,EAEtD,wDAAwD;AAAA;AAAA,EAExD,0DAA0D;AAAA;AAAA,EAE1D,iDAAiD;AAAA;AAAA,EAGjD,kCAAkC;AAAA;AAAA,EAElC,+BAA+B;AAAA;AAAA,EAE/B,+BAA+B;AAAA;AAAA,EAE/B,sCAAsC;AAAA;AAAA,EAEtC,wCAAwC;AAAA;AAAA,EAGxC,wCAAwC;AAAA;AAAA,EAExC,qCAAqC;AAAA;AAAA,EAErC,sCAAsC;AAAA;AAAA,EAEtC,oCAAoC;AAAA;AAAA,EAGpC,2CAA2C;AAAA;AAAA,EAG3C,yCAAyC;AAC3C,CAAC;"}
@@ -11,12 +11,12 @@ import preferredPM from "preferred-pm";
11
11
  import which from "which";
12
12
  const PACKAGES = [{
13
13
  name: "react",
14
- supported: ["^18", "^19.2"],
15
- deprecatedBelow: "^19.2"
14
+ supported: ["^19.2.2"],
15
+ deprecatedBelow: null
16
16
  }, {
17
17
  name: "react-dom",
18
- supported: ["^18", "^19.2"],
19
- deprecatedBelow: "^19.2"
18
+ supported: ["^19.2.2"],
19
+ deprecatedBelow: null
20
20
  }, {
21
21
  name: "styled-components",
22
22
  supported: ["^6"],
@@ -79,7 +79,7 @@ function getUpgradeInstructions(pkgs) {
79
79
  const [highestSupported] = pkg.supported.map((version) => (semver.coerce(version) || {
80
80
  version: ""
81
81
  }).version).sort(semver.rcompare);
82
- return `"${pkg.name}@${highestSupported}"`;
82
+ return `"${pkg.name}@^${highestSupported}"`;
83
83
  }).join(" ");
84
84
  return `To upgrade, run either:
85
85
 
@@ -101,7 +101,7 @@ function getDowngradeInstructions(pkgs) {
101
101
  const [highestSupported] = pkg.supported.map((version) => (semver.coerce(version) || {
102
102
  version: ""
103
103
  }).version).sort(semver.rcompare);
104
- return `"${pkg.name}@${highestSupported}"`;
104
+ return `"${pkg.name}@^${highestSupported}"`;
105
105
  }).join(" ");
106
106
  return `To downgrade, run either:
107
107
 
@@ -1 +1 @@
1
- {"version":3,"file":"upgradePackages.js","sources":["../../src/_internal/cli/util/checkStudioDependencyVersions.ts","../../src/_internal/cli/util/checkRequiredDependencies.ts","../../src/_internal/cli/util/packageManager/packageManagerChoice.ts","../../src/_internal/cli/util/packageManager/upgradePackages.ts"],"sourcesContent":["import path from 'node:path'\n\nimport {generateHelpUrl} from '@sanity/generate-help-url'\nimport resolveFrom from 'resolve-from'\nimport semver, {type SemVer} from 'semver'\n\nimport {readPackageJson, readPackageManifest} from './readPackageManifest'\n\ninterface PackageInfo {\n name: string\n supported: string[]\n deprecatedBelow: null | string\n installed: SemVer\n isUnsupported: boolean\n isDeprecated: boolean\n isUntested: boolean\n}\n\n// NOTE: when doing changes here, also remember to update versions in help docs at\n// https://sanity.io/admin/structure/docs;helpArticle;upgrade-packages\nconst PACKAGES = [\n {name: 'react', supported: ['^18', '^19.2'], deprecatedBelow: '^19.2'},\n {name: 'react-dom', supported: ['^18', '^19.2'], deprecatedBelow: '^19.2'},\n {name: 'styled-components', supported: ['^6'], deprecatedBelow: null},\n {name: '@sanity/ui', supported: ['^2', '^3'], deprecatedBelow: '^3'},\n]\n\nexport async function checkStudioDependencyVersions(workDir: string): Promise<void> {\n const manifest = await readPackageJson(path.join(workDir, 'package.json'))\n const dependencies = {...manifest.dependencies, ...manifest.devDependencies}\n\n const packageInfo = PACKAGES.map(async (pkg): Promise<PackageInfo | false> => {\n const dependency = dependencies[pkg.name]\n if (!dependency) {\n return false\n }\n\n const manifestPath = resolveFrom.silent(workDir, path.join(pkg.name, 'package.json'))\n const installed = semver.coerce(\n manifestPath\n ? (await readPackageManifest(manifestPath)).version\n : dependency.replace(/[\\D.]/g, ''),\n )\n\n if (!installed) {\n return false\n }\n\n const supported = pkg.supported.join(' || ')\n\n // \"Untested\" is usually the case where we have not upgraded the React version requirements\n // before a release, but given that is usually works in a backwards-compatible way, we want\n // to indicate that it's _untested_, not necessarily _unsupported_\n // Ex: Installed is react@20.0.0, but we've only _tested_ with react@^19\n const isUntested = !semver.satisfies(installed, supported) && semver.gtr(installed, supported)\n\n // \"Unsupported\" in that the installed version is _lower than_ the minimum version\n // Ex: Installed is react@18.0.0, but we require react@^19.2\n const isUnsupported = !semver.satisfies(installed, supported) && !isUntested\n\n // \"Deprecated\" in that we will stop supporting it at some point in the near future,\n // so users should be prompted to upgrade\n const isDeprecated = pkg.deprecatedBelow ? semver.ltr(installed, pkg.deprecatedBelow) : false\n\n return {\n ...pkg,\n installed,\n isUnsupported,\n isDeprecated,\n isUntested,\n }\n })\n\n const installedPackages = (await Promise.all(packageInfo)).filter(\n (inp): inp is PackageInfo => inp !== false,\n )\n const unsupported = installedPackages.filter((pkg) => pkg.isUnsupported)\n const deprecated = installedPackages.filter((pkg) => !pkg.isUnsupported && pkg.isDeprecated)\n const untested = installedPackages.filter((pkg) => pkg.isUntested)\n\n if (deprecated.length > 0) {\n console.warn(`\n[WARN] The following package versions have been deprecated and should be upgraded:\n\n ${listPackages(deprecated)}\n\nSupport for these will be removed in a future release!\n\n ${getUpgradeInstructions(deprecated)}\n`)\n }\n\n if (untested.length > 0) {\n console.warn(`\n[WARN] The following package versions have not yet been marked as supported:\n\n ${listPackages(untested)}\n\nYou _may_ encounter bugs while using these versions.\n\n ${getDowngradeInstructions(untested)}\n`)\n }\n\n if (unsupported.length > 0) {\n console.error(`\n[ERROR] The following package versions are no longer supported and needs to be upgraded:\n\n ${listPackages(unsupported)}\n\n ${getUpgradeInstructions(unsupported)}\n`)\n process.exit(1)\n }\n}\n\nfunction listPackages(pkgs: PackageInfo[]) {\n return pkgs\n .map(\n (pkg) =>\n `${pkg.name} (installed: ${pkg.installed}, want: ${\n pkg.deprecatedBelow || pkg.supported.join(' || ')\n })`,\n )\n .join('\\n ')\n}\n\nfunction getUpgradeInstructions(pkgs: PackageInfo[]) {\n const inst = pkgs\n .map((pkg) => {\n const [highestSupported] = pkg.supported\n .map((version) => (semver.coerce(version) || {version: ''}).version)\n .sort(semver.rcompare)\n\n return `\"${pkg.name}@${highestSupported}\"`\n })\n .join(' ')\n\n return `To upgrade, run either:\n\n npm install ${inst}\n\n or\n\n yarn add ${inst}\n\n or\n\n pnpm add ${inst}\n\n\nRead more at ${generateHelpUrl('upgrade-packages')}`\n}\n\nfunction getDowngradeInstructions(pkgs: PackageInfo[]) {\n const inst = pkgs\n .map((pkg) => {\n const [highestSupported] = pkg.supported\n .map((version) => (semver.coerce(version) || {version: ''}).version)\n .sort(semver.rcompare)\n\n return `\"${pkg.name}@${highestSupported}\"`\n })\n .join(' ')\n\n return `To downgrade, run either:\n\n yarn add ${inst}\n\n or\n\n npm install ${inst}\n\n or\n\n pnpm install ${inst}`\n}\n","import path from 'node:path'\n\nimport {type CliCommandContext} from '@sanity/cli'\nimport execa from 'execa'\nimport oneline from 'oneline'\nimport semver, {type SemVer} from 'semver'\n\nimport {peerDependencies} from '../../../../package.json'\nimport {determineIsApp} from './determineIsApp'\nimport {readModuleVersion} from './readModuleVersion'\nimport {type PartialPackageManifest, readPackageManifest} from './readPackageManifest'\n\nconst defaultStudioManifestProps: PartialPackageManifest = {\n name: 'studio',\n version: '1.0.0',\n}\n\ninterface CheckResult {\n didInstall: boolean\n installedSanityVersion: string\n}\n\n/**\n * Checks that the studio has declared and installed the required dependencies\n * needed by the Sanity modules. While we generally use regular, explicit\n * dependencies in modules, there are certain dependencies that are better\n * served being peer dependencies, such as react and styled-components.\n *\n * If these dependencies are not installed/declared, we want to prompt the user\n * whether or not to add them to `package.json` and install them\n *\n * Additionally, returns the version of the 'sanity' dependency from the package.json.\n */\nexport async function checkRequiredDependencies(context: CliCommandContext): Promise<CheckResult> {\n // currently there's no check needed for custom apps,\n // but this should be removed once they are more mature\n const isApp = determineIsApp(context.cliConfig)\n if (isApp) {\n return {didInstall: false, installedSanityVersion: ''}\n }\n\n const {workDir: studioPath, output} = context\n const [studioPackageManifest, installedStyledComponentsVersion, installedSanityVersion] =\n await Promise.all([\n await readPackageManifest(path.join(studioPath, 'package.json'), defaultStudioManifestProps),\n await readModuleVersion(studioPath, 'styled-components'),\n await readModuleVersion(studioPath, 'sanity'),\n ])\n\n const wantedStyledComponentsVersionRange = peerDependencies['styled-components']\n\n // Retrieve the version of the 'sanity' dependency\n if (!installedSanityVersion) {\n throw new Error('Failed to read the installed sanity version.')\n }\n\n // The studio _must_ now declare `styled-components` as a dependency. If it's not there,\n // we'll want to automatically _add it_ to the manifest and tell the user to reinstall\n // dependencies before running whatever command was being run\n const declaredStyledComponentsVersion =\n studioPackageManifest.dependencies['styled-components'] ||\n studioPackageManifest.devDependencies['styled-components']\n\n if (!declaredStyledComponentsVersion) {\n const [file, ...args] = process.argv\n const deps = {'styled-components': wantedStyledComponentsVersionRange}\n await installDependencies(deps, context)\n\n // Re-run the same command (sanity dev/sanity build etc) after installation,\n // as it can have shifted the entire `node_modules` folder around, result in\n // broken assumptions about installation paths. This is a hack, and should be\n // solved properly.\n await execa(file, args, {cwd: studioPath, stdio: 'inherit'})\n return {didInstall: true, installedSanityVersion}\n }\n\n // We ignore catalog identifiers since we check the actual version anyway\n const isStyledComponentsVersionRangeInCatalog =\n declaredStyledComponentsVersion.startsWith('catalog:')\n // Theoretically the version specified in package.json could be incorrect, eg `foo`\n let minDeclaredStyledComponentsVersion: SemVer | null = null\n try {\n minDeclaredStyledComponentsVersion = semver.minVersion(declaredStyledComponentsVersion)\n } catch (err) {\n // Intentional fall-through (variable will be left as null, throwing below)\n }\n\n if (!minDeclaredStyledComponentsVersion && !isStyledComponentsVersionRangeInCatalog) {\n throw new Error(oneline`\n Declared dependency \\`styled-components\\` has an invalid version range:\n \\`${declaredStyledComponentsVersion}\\`.\n `)\n }\n\n // The declared version should be semver-compatible with the version specified as a\n // peer dependency in `sanity`. If not, we should tell the user to change it.\n //\n // Exception: Ranges are hard to compare. `>=5.0.0 && <=5.3.2 || ^6`... Comparing this\n // to anything is going to be challenging, so only compare \"simple\" ranges/versions\n // (^x.x.x / ~x.x.x / x.x.x)\n if (\n !isStyledComponentsVersionRangeInCatalog &&\n isComparableRange(declaredStyledComponentsVersion) &&\n !semver.satisfies(minDeclaredStyledComponentsVersion!, wantedStyledComponentsVersionRange)\n ) {\n output.warn(oneline`\n Declared version of styled-components (${declaredStyledComponentsVersion})\n is not compatible with the version required by sanity (${wantedStyledComponentsVersionRange}).\n This might cause problems!\n `)\n }\n\n // Ensure the studio has _installed_ a version of `styled-components`\n if (!installedStyledComponentsVersion) {\n throw new Error(oneline`\n Declared dependency \\`styled-components\\` is not installed - run\n \\`npm install\\`, \\`yarn install\\` or \\`pnpm install\\` to install it before re-running this command.\n `)\n }\n\n // The studio should have an _installed_ version of `styled-components`, and it should\n // be semver compatible with the version specified in `sanity` peer dependencies.\n if (!semver.satisfies(installedStyledComponentsVersion, wantedStyledComponentsVersionRange)) {\n output.warn(oneline`\n Installed version of styled-components (${installedStyledComponentsVersion})\n is not compatible with the version required by sanity (${wantedStyledComponentsVersionRange}).\n This might cause problems!\n `)\n }\n\n return {didInstall: false, installedSanityVersion}\n}\n\n/**\n * Install the passed dependencies at the given version/version range,\n * prompting the user which package manager to use. We will try to detect\n * a package manager from files in the directory and show that as the default\n *\n * @param dependencies - Object of dependencies `({[package name]: version})`\n * @param context - CLI context\n */\nasync function installDependencies(\n dependencies: Record<string, string>,\n context: CliCommandContext,\n): Promise<void> {\n const {output, prompt, workDir, cliPackageManager} = context\n const packages: string[] = []\n\n output.print('The Sanity studio needs to install missing dependencies:')\n for (const [pkgName, version] of Object.entries(dependencies)) {\n const declaration = `${pkgName}@${version}`\n output.print(`- ${declaration}`)\n packages.push(declaration)\n }\n\n if (!cliPackageManager) {\n output.error(\n 'ERROR: Could not determine package manager choice - run `npm install` or equivalent',\n )\n return\n }\n\n const {getPackageManagerChoice, installNewPackages} = cliPackageManager\n const {mostOptimal, chosen: pkgManager} = await getPackageManagerChoice(workDir, {prompt})\n if (mostOptimal && pkgManager !== mostOptimal) {\n output.warn(\n `WARN: This project appears to be installed with or using ${mostOptimal} - using a different package manager _may_ result in errors.`,\n )\n }\n\n await installNewPackages({packages, packageManager: pkgManager}, context)\n}\n\nfunction isComparableRange(range: string): boolean {\n return /^[\\^~]?\\d+(\\.\\d+)?(\\.\\d+)?$/.test(range)\n}\n","import path from 'node:path'\n\nimport {type CliPrompter} from '@sanity/cli'\nimport preferredPM from 'preferred-pm'\nimport which from 'which'\n\nimport {isInteractive} from '../isInteractive'\n\nexport type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'manual'\n\nexport const ALLOWED_PACKAGE_MANAGERS: PackageManager[] = ['npm', 'yarn', 'pnpm', 'bun', 'manual']\nexport const allowedPackageManagersString = ALLOWED_PACKAGE_MANAGERS.map((pm) => `\"${pm}\"`).join(\n ' | ',\n)\n\nconst EXPERIMENTAL = ['bun']\n\n/**\n * Attempts to resolve the most optimal package manager to use to install/upgrade\n * packages/dependencies at a given path. It does so by looking for package manager\n * specific lockfiles. If it finds a lockfile belonging to a certain package manager,\n * it prioritizes this one. However, if that package manager is not installed, it will\n * prompt the user for which one they want to use and hint at the most optimal one\n * not being installed.\n *\n * Note that this function also takes local npm binary paths into account - for instance,\n * `yarn` can be installed as a dependency of the project instead of globally, and it\n * will use that is available.\n *\n * The user can also select 'manual' to skip the process and run their preferred package\n * manager manually. Commands using this function must take this `manual` choice into\n * account and act accordingly if chosen.\n *\n * @param workDir - The working directory where a lockfile is most likely to be present\n * @param options - Pass `interactive: false` to fall back to npm if most optimal is\n * not available, instead of prompting\n * @returns Object of `chosen` and, if a lockfile is found, the `mostOptimal` choice\n */\nexport async function getPackageManagerChoice(\n workDir: string,\n options: {interactive: false} | {interactive?: true; prompt: CliPrompter},\n): Promise<{chosen: PackageManager; mostOptimal?: PackageManager}> {\n const rootDir = workDir || process.cwd()\n const preferred = (await preferredPM(rootDir))?.name\n\n if (preferred && (await hasCommand(preferred, rootDir))) {\n // There is an optimal/preferred package manager, and the user has it installed!\n return {chosen: preferred, mostOptimal: preferred}\n }\n\n const mostLikelyPM = await getMostLikelyInstalledPackageManager(rootDir)\n const interactive = typeof options.interactive === 'boolean' ? options.interactive : isInteractive\n if (!interactive) {\n // We can't ask the user for their preference, so fall back to either the one that is being run\n // or whatever is installed on the system (npm being the preferred choice).\n // Note that the most optimal choice is already picked above if available.\n return {chosen: mostLikelyPM || (await getFallback(rootDir)), mostOptimal: preferred}\n }\n\n if (!('prompt' in options)) {\n throw new Error('Must pass `prompt` when in interactive mode')\n }\n\n // We can ask the user for their preference, hurray!\n const messageSuffix = preferred ? ` (preferred is ${preferred}, but is not installed)` : ''\n const installed = await getAvailablePackageManagers(rootDir)\n const chosen = await options.prompt.single<PackageManager>({\n type: 'list',\n choices: installed.map((pm) => ({\n value: pm,\n name: EXPERIMENTAL.includes(pm) ? `${pm} (experimental)` : pm,\n })),\n default: preferred || mostLikelyPM,\n message: `Package manager to use for installing dependencies?${messageSuffix}`,\n })\n\n return {chosen, mostOptimal: preferred}\n}\n\nasync function getFallback(cwd: string): Promise<PackageManager> {\n if (await hasNpmInstalled(cwd)) {\n return 'npm'\n }\n\n if (await hasYarnInstalled(cwd)) {\n return 'yarn'\n }\n\n if (await hasPnpmInstalled(cwd)) {\n return 'pnpm'\n }\n\n if (await hasBunInstalled(cwd)) {\n return 'bun'\n }\n\n return 'manual'\n}\n\nasync function getAvailablePackageManagers(cwd: string): Promise<PackageManager[]> {\n const [npm, yarn, pnpm, bun] = await Promise.all([\n hasNpmInstalled(cwd),\n hasYarnInstalled(cwd),\n hasPnpmInstalled(cwd),\n hasBunInstalled(cwd),\n ])\n\n const choices = [npm && 'npm', yarn && 'yarn', pnpm && 'pnpm', bun && 'bun', 'manual']\n return choices.filter((pm): pm is PackageManager => pm !== false)\n}\n\nexport function hasNpmInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('npm', cwd)\n}\n\nexport function hasYarnInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('yarn', cwd)\n}\n\nexport function hasPnpmInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('pnpm', cwd)\n}\n\nexport function hasBunInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('bun', cwd)\n}\n\nexport function getNpmRunPath(cwd: string): string {\n let previous\n let cwdPath = path.resolve(cwd)\n const result: string[] = []\n\n while (previous !== cwdPath) {\n result.push(path.join(cwdPath, 'node_modules', '.bin'))\n previous = cwdPath\n cwdPath = path.resolve(cwdPath, '..')\n }\n\n result.push(path.resolve(cwd, process.execPath, '..'))\n\n const pathEnv = process.env[getPathEnvVarKey()]\n return [...result, pathEnv].join(path.delimiter)\n}\n\nexport function getPartialEnvWithNpmPath(cwd: string): NodeJS.ProcessEnv {\n const key = getPathEnvVarKey()\n return {[key]: getNpmRunPath(cwd)}\n}\n\nfunction getPathEnvVarKey(): string {\n if (process.platform !== 'win32') {\n return 'PATH'\n }\n\n return (\n Object.keys(process.env)\n .reverse()\n .find((key) => key.toUpperCase() === 'PATH') || 'Path'\n )\n}\n\nfunction getCommandPath(cmd: string, cwd?: string): Promise<string | null> {\n const options = {path: cwd ? getNpmRunPath(cwd) : undefined}\n return which(cmd, options).catch(() => null)\n}\n\nfunction hasCommand(cmd: string, cwd?: string): Promise<boolean> {\n return getCommandPath(cmd, cwd).then((cmdPath) => cmdPath !== null)\n}\n\nasync function getMostLikelyInstalledPackageManager(\n rootDir: string,\n): Promise<PackageManager | undefined> {\n const installed = await getAvailablePackageManagers(rootDir)\n const running = getRunningPackageManager()\n return running && installed.includes(running) ? running : undefined\n}\n\nfunction getRunningPackageManager(): PackageManager | undefined {\n // Yes, the env var is lowercase - it is set by the package managers themselves\n const agent = process.env.npm_config_user_agent || ''\n\n if (agent.includes('yarn')) {\n return 'yarn'\n }\n\n if (agent.includes('pnpm')) {\n return 'pnpm'\n }\n\n if (agent.includes('bun')) {\n return 'bun'\n }\n\n // Both yarn and pnpm does a `npm/?` thing, thus the slightly different match here\n // Theoretically not needed since we check for yarn/pnpm above, but in case other\n // package managers do the same thing, we'll (hopefully) catch them here.\n if (/^npm\\/\\d/.test(agent)) {\n return 'npm'\n }\n\n return undefined\n}\n","import execa, {type CommonOptions, type ExecaReturnValue} from 'execa'\n\nimport {getPartialEnvWithNpmPath, type PackageManager} from './packageManagerChoice'\n\nexport interface InstallOptions {\n packageManager: PackageManager\n packages: [name: string, version: string][]\n}\n\nexport async function upgradePackages(\n options: InstallOptions,\n context: {output: {print: (output: string) => void}; workDir: string},\n): Promise<void> {\n const {packageManager, packages} = options\n const {output, workDir} = context\n const execOptions: CommonOptions<'utf8'> = {\n encoding: 'utf8',\n env: getPartialEnvWithNpmPath(workDir),\n cwd: workDir,\n stdio: 'inherit',\n }\n const upgradePackageArgs = packages.map((pkg) => pkg.join('@'))\n let result: ExecaReturnValue<string> | undefined\n if (packageManager === 'npm') {\n const npmArgs = ['install', '--legacy-peer-deps', ...upgradePackageArgs]\n output.print(`Running 'npm ${npmArgs.join(' ')}'`)\n result = await execa('npm', npmArgs, execOptions)\n } else if (packageManager === 'yarn') {\n const yarnArgs = ['upgrade ', ...upgradePackageArgs]\n output.print(`Running 'yarn ${yarnArgs.join(' ')}'`)\n result = await execa('yarn', yarnArgs, execOptions)\n } else if (packageManager === 'pnpm') {\n const pnpmArgs = ['upgrade', ...upgradePackageArgs]\n output.print(`Running 'pnpm ${pnpmArgs.join(' ')}'`)\n result = await execa('pnpm', pnpmArgs, execOptions)\n } else if (packageManager === 'bun') {\n const bunArgs = ['update', ...upgradePackageArgs]\n output.print(`Running 'bun ${bunArgs.join(' ')}'`)\n result = await execa('bun', bunArgs, execOptions)\n } else if (packageManager === 'manual') {\n output.print(\n `Manual installation selected - run 'npm upgrade ${upgradePackageArgs.join(' ')}' or equivalent`,\n )\n }\n\n if (result?.exitCode || result?.failed) {\n throw new Error('Package upgrade failed')\n }\n}\n"],"names":["PACKAGES","name","supported","deprecatedBelow","checkStudioDependencyVersions","workDir","manifest","readPackageJson","path","join","dependencies","devDependencies","packageInfo","map","pkg","dependency","manifestPath","resolveFrom","silent","installed","semver","coerce","readPackageManifest","version","replace","isUntested","satisfies","gtr","isUnsupported","isDeprecated","ltr","installedPackages","Promise","all","filter","inp","unsupported","deprecated","untested","length","console","warn","listPackages","getUpgradeInstructions","getDowngradeInstructions","error","process","exit","pkgs","inst","highestSupported","sort","rcompare","generateHelpUrl","defaultStudioManifestProps","checkRequiredDependencies","context","determineIsApp","cliConfig","didInstall","installedSanityVersion","studioPath","output","studioPackageManifest","installedStyledComponentsVersion","readModuleVersion","wantedStyledComponentsVersionRange","peerDependencies","Error","declaredStyledComponentsVersion","file","args","argv","installDependencies","execa","cwd","stdio","isStyledComponentsVersionRangeInCatalog","startsWith","minDeclaredStyledComponentsVersion","minVersion","oneline","isComparableRange","prompt","cliPackageManager","packages","print","pkgName","Object","entries","declaration","push","getPackageManagerChoice","installNewPackages","mostOptimal","chosen","pkgManager","packageManager","range","test","EXPERIMENTAL","options","rootDir","preferred","preferredPM","hasCommand","mostLikelyPM","getMostLikelyInstalledPackageManager","interactive","isInteractive","getFallback","messageSuffix","getAvailablePackageManagers","single","type","choices","pm","value","includes","default","message","hasNpmInstalled","hasYarnInstalled","hasPnpmInstalled","hasBunInstalled","npm","yarn","pnpm","bun","getNpmRunPath","previous","cwdPath","resolve","result","execPath","pathEnv","env","getPathEnvVarKey","delimiter","getPartialEnvWithNpmPath","platform","keys","reverse","find","key","toUpperCase","getCommandPath","cmd","undefined","which","catch","then","cmdPath","running","getRunningPackageManager","agent","npm_config_user_agent","upgradePackages","execOptions","encoding","upgradePackageArgs","npmArgs","yarnArgs","pnpmArgs","bunArgs","exitCode","failed"],"mappings":";;;;;;;;;;;AAoBA,MAAMA,WAAW,CACf;AAAA,EAACC,MAAM;AAAA,EAASC,WAAW,CAAC,OAAO,OAAO;AAAA,EAAGC,iBAAiB;AAAO,GACrE;AAAA,EAACF,MAAM;AAAA,EAAaC,WAAW,CAAC,OAAO,OAAO;AAAA,EAAGC,iBAAiB;AAAO,GACzE;AAAA,EAACF,MAAM;AAAA,EAAqBC,WAAW,CAAC,IAAI;AAAA,EAAGC,iBAAiB;AAAI,GACpE;AAAA,EAACF,MAAM;AAAA,EAAcC,WAAW,CAAC,MAAM,IAAI;AAAA,EAAGC,iBAAiB;AAAI,CAAC;AAGtE,eAAsBC,8BAA8BC,SAAgC;AAClF,QAAMC,WAAW,MAAMC,gBAAgBC,KAAKC,KAAKJ,SAAS,cAAc,CAAC,GACnEK,eAAe;AAAA,IAAC,GAAGJ,SAASI;AAAAA,IAAc,GAAGJ,SAASK;AAAAA,EAAAA,GAEtDC,cAAcZ,SAASa,IAAI,OAAOC,QAAsC;AAC5E,UAAMC,aAAaL,aAAaI,IAAIb,IAAI;AACxC,QAAI,CAACc;AACH,aAAO;AAGT,UAAMC,eAAeC,YAAYC,OAAOb,SAASG,KAAKC,KAAKK,IAAIb,MAAM,cAAc,CAAC,GAC9EkB,YAAYC,OAAOC,OACvBL,gBACK,MAAMM,oBAAoBN,YAAY,GAAGO,UAC1CR,WAAWS,QAAQ,UAAU,EAAE,CACrC;AAEA,QAAI,CAACL;AACH,aAAO;AAGT,UAAMjB,YAAYY,IAAIZ,UAAUO,KAAK,MAAM,GAMrCgB,aAAa,CAACL,OAAOM,U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,kBAAkB;AACvElG,WAAOwB,MAAM,gBAAgB2E,QAAQxJ,KAAK,GAAG,CAAC,GAAG,GACjD4H,SAAS,MAAM3D,MAAM,OAAOuF,SAASH,WAAW;AAAA,EAClD,WAAW7D,mBAAmB,QAAQ;AACpC,UAAMiE,WAAW,CAAC,YAAY,GAAGF,kBAAkB;AACnDlG,WAAOwB,MAAM,iBAAiB4E,SAASzJ,KAAK,GAAG,CAAC,GAAG,GACnD4H,SAAS,MAAM3D,MAAM,QAAQwF,UAAUJ,WAAW;AAAA,EACpD,WAAW7D,mBAAmB,QAAQ;AACpC,UAAMkE,WAAW,CAAC,WAAW,GAAGH,kBAAkB;AAClDlG,WAAOwB,MAAM,iBAAiB6E,SAAS1J,KAAK,GAAG,CAAC,GAAG,GACnD4H,SAAS,MAAM3D,MAAM,QAAQyF,UAAUL,WAAW;AAAA,EACpD,WAAW7D,mBAAmB,OAAO;AACnC,UAAMmE,UAAU,CAAC,UAAU,GAAGJ,kBAAkB;AAChDlG,WAAOwB,MAAM,gBAAgB8E,QAAQ3J,KAAK,GAAG,CAAC,GAAG,GACjD4H,SAAS,MAAM3D,MAAM,OAAO0F,SAASN,WAAW;AAAA,EAClD,MAAW7D,oBAAmB,YAC5BnC,OAAOwB,MACL,mDAAmD0E,mBAAmBvJ,KAAK,GAAG,CAAC,iBACjF;AAGF,MAAI4H,QAAQgC,YAAYhC,QAAQiC;AAC9B,UAAM,IAAIlG,MAAM,wBAAwB;AAE5C;"}
1
+ {"version":3,"file":"upgradePackages.js","sources":["../../src/_internal/cli/util/checkStudioDependencyVersions.ts","../../src/_internal/cli/util/checkRequiredDependencies.ts","../../src/_internal/cli/util/packageManager/packageManagerChoice.ts","../../src/_internal/cli/util/packageManager/upgradePackages.ts"],"sourcesContent":["import path from 'node:path'\n\nimport {generateHelpUrl} from '@sanity/generate-help-url'\nimport resolveFrom from 'resolve-from'\nimport semver, {type SemVer} from 'semver'\n\nimport {readPackageJson, readPackageManifest} from './readPackageManifest'\n\ninterface PackageInfo {\n name: string\n supported: string[]\n deprecatedBelow: null | string\n installed: SemVer\n isUnsupported: boolean\n isDeprecated: boolean\n isUntested: boolean\n}\n\n// NOTE: when doing changes here, also remember to update versions in help docs at\n// https://sanity.io/admin/structure/docs;helpArticle;upgrade-packages\nconst PACKAGES = [\n {name: 'react', supported: ['^19.2.2'], deprecatedBelow: null},\n {name: 'react-dom', supported: ['^19.2.2'], deprecatedBelow: null},\n {name: 'styled-components', supported: ['^6'], deprecatedBelow: null},\n {name: '@sanity/ui', supported: ['^2', '^3'], deprecatedBelow: '^3'},\n]\n\nexport async function checkStudioDependencyVersions(workDir: string): Promise<void> {\n const manifest = await readPackageJson(path.join(workDir, 'package.json'))\n const dependencies = {...manifest.dependencies, ...manifest.devDependencies}\n\n const packageInfo = PACKAGES.map(async (pkg): Promise<PackageInfo | false> => {\n const dependency = dependencies[pkg.name]\n if (!dependency) {\n return false\n }\n\n const manifestPath = resolveFrom.silent(workDir, path.join(pkg.name, 'package.json'))\n const installed = semver.coerce(\n manifestPath\n ? (await readPackageManifest(manifestPath)).version\n : dependency.replace(/[\\D.]/g, ''),\n )\n\n if (!installed) {\n return false\n }\n\n const supported = pkg.supported.join(' || ')\n\n // \"Untested\" is usually the case where we have not upgraded the React version requirements\n // before a release, but given that is usually works in a backwards-compatible way, we want\n // to indicate that it's _untested_, not necessarily _unsupported_\n // Ex: Installed is react@20.0.0, but we've only _tested_ with react@^19\n const isUntested = !semver.satisfies(installed, supported) && semver.gtr(installed, supported)\n\n // \"Unsupported\" in that the installed version is _lower than_ the minimum version\n // Ex: Installed is react@18.0.0, but we require react@^19.2\n const isUnsupported = !semver.satisfies(installed, supported) && !isUntested\n\n // \"Deprecated\" in that we will stop supporting it at some point in the near future,\n // so users should be prompted to upgrade\n const isDeprecated = pkg.deprecatedBelow ? semver.ltr(installed, pkg.deprecatedBelow) : false\n\n return {\n ...pkg,\n installed,\n isUnsupported,\n isDeprecated,\n isUntested,\n }\n })\n\n const installedPackages = (await Promise.all(packageInfo)).filter(\n (inp): inp is PackageInfo => inp !== false,\n )\n const unsupported = installedPackages.filter((pkg) => pkg.isUnsupported)\n const deprecated = installedPackages.filter((pkg) => !pkg.isUnsupported && pkg.isDeprecated)\n const untested = installedPackages.filter((pkg) => pkg.isUntested)\n\n if (deprecated.length > 0) {\n console.warn(`\n[WARN] The following package versions have been deprecated and should be upgraded:\n\n ${listPackages(deprecated)}\n\nSupport for these will be removed in a future release!\n\n ${getUpgradeInstructions(deprecated)}\n`)\n }\n\n if (untested.length > 0) {\n console.warn(`\n[WARN] The following package versions have not yet been marked as supported:\n\n ${listPackages(untested)}\n\nYou _may_ encounter bugs while using these versions.\n\n ${getDowngradeInstructions(untested)}\n`)\n }\n\n if (unsupported.length > 0) {\n console.error(`\n[ERROR] The following package versions are no longer supported and needs to be upgraded:\n\n ${listPackages(unsupported)}\n\n ${getUpgradeInstructions(unsupported)}\n`)\n process.exit(1)\n }\n}\n\nfunction listPackages(pkgs: PackageInfo[]) {\n return pkgs\n .map(\n (pkg) =>\n `${pkg.name} (installed: ${pkg.installed}, want: ${\n pkg.deprecatedBelow || pkg.supported.join(' || ')\n })`,\n )\n .join('\\n ')\n}\n\nfunction getUpgradeInstructions(pkgs: PackageInfo[]) {\n const inst = pkgs\n .map((pkg) => {\n const [highestSupported] = pkg.supported\n .map((version) => (semver.coerce(version) || {version: ''}).version)\n .sort(semver.rcompare)\n\n return `\"${pkg.name}@^${highestSupported}\"`\n })\n .join(' ')\n\n return `To upgrade, run either:\n\n npm install ${inst}\n\n or\n\n yarn add ${inst}\n\n or\n\n pnpm add ${inst}\n\n\nRead more at ${generateHelpUrl('upgrade-packages')}`\n}\n\nfunction getDowngradeInstructions(pkgs: PackageInfo[]) {\n const inst = pkgs\n .map((pkg) => {\n const [highestSupported] = pkg.supported\n .map((version) => (semver.coerce(version) || {version: ''}).version)\n .sort(semver.rcompare)\n\n return `\"${pkg.name}@^${highestSupported}\"`\n })\n .join(' ')\n\n return `To downgrade, run either:\n\n yarn add ${inst}\n\n or\n\n npm install ${inst}\n\n or\n\n pnpm install ${inst}`\n}\n","import path from 'node:path'\n\nimport {type CliCommandContext} from '@sanity/cli'\nimport execa from 'execa'\nimport oneline from 'oneline'\nimport semver, {type SemVer} from 'semver'\n\nimport {peerDependencies} from '../../../../package.json'\nimport {determineIsApp} from './determineIsApp'\nimport {readModuleVersion} from './readModuleVersion'\nimport {type PartialPackageManifest, readPackageManifest} from './readPackageManifest'\n\nconst defaultStudioManifestProps: PartialPackageManifest = {\n name: 'studio',\n version: '1.0.0',\n}\n\ninterface CheckResult {\n didInstall: boolean\n installedSanityVersion: string\n}\n\n/**\n * Checks that the studio has declared and installed the required dependencies\n * needed by the Sanity modules. While we generally use regular, explicit\n * dependencies in modules, there are certain dependencies that are better\n * served being peer dependencies, such as react and styled-components.\n *\n * If these dependencies are not installed/declared, we want to prompt the user\n * whether or not to add them to `package.json` and install them\n *\n * Additionally, returns the version of the 'sanity' dependency from the package.json.\n */\nexport async function checkRequiredDependencies(context: CliCommandContext): Promise<CheckResult> {\n // currently there's no check needed for custom apps,\n // but this should be removed once they are more mature\n const isApp = determineIsApp(context.cliConfig)\n if (isApp) {\n return {didInstall: false, installedSanityVersion: ''}\n }\n\n const {workDir: studioPath, output} = context\n const [studioPackageManifest, installedStyledComponentsVersion, installedSanityVersion] =\n await Promise.all([\n await readPackageManifest(path.join(studioPath, 'package.json'), defaultStudioManifestProps),\n await readModuleVersion(studioPath, 'styled-components'),\n await readModuleVersion(studioPath, 'sanity'),\n ])\n\n const wantedStyledComponentsVersionRange = peerDependencies['styled-components']\n\n // Retrieve the version of the 'sanity' dependency\n if (!installedSanityVersion) {\n throw new Error('Failed to read the installed sanity version.')\n }\n\n // The studio _must_ now declare `styled-components` as a dependency. If it's not there,\n // we'll want to automatically _add it_ to the manifest and tell the user to reinstall\n // dependencies before running whatever command was being run\n const declaredStyledComponentsVersion =\n studioPackageManifest.dependencies['styled-components'] ||\n studioPackageManifest.devDependencies['styled-components']\n\n if (!declaredStyledComponentsVersion) {\n const [file, ...args] = process.argv\n const deps = {'styled-components': wantedStyledComponentsVersionRange}\n await installDependencies(deps, context)\n\n // Re-run the same command (sanity dev/sanity build etc) after installation,\n // as it can have shifted the entire `node_modules` folder around, result in\n // broken assumptions about installation paths. This is a hack, and should be\n // solved properly.\n await execa(file, args, {cwd: studioPath, stdio: 'inherit'})\n return {didInstall: true, installedSanityVersion}\n }\n\n // We ignore catalog identifiers since we check the actual version anyway\n const isStyledComponentsVersionRangeInCatalog =\n declaredStyledComponentsVersion.startsWith('catalog:')\n // Theoretically the version specified in package.json could be incorrect, eg `foo`\n let minDeclaredStyledComponentsVersion: SemVer | null = null\n try {\n minDeclaredStyledComponentsVersion = semver.minVersion(declaredStyledComponentsVersion)\n } catch (err) {\n // Intentional fall-through (variable will be left as null, throwing below)\n }\n\n if (!minDeclaredStyledComponentsVersion && !isStyledComponentsVersionRangeInCatalog) {\n throw new Error(oneline`\n Declared dependency \\`styled-components\\` has an invalid version range:\n \\`${declaredStyledComponentsVersion}\\`.\n `)\n }\n\n // The declared version should be semver-compatible with the version specified as a\n // peer dependency in `sanity`. If not, we should tell the user to change it.\n //\n // Exception: Ranges are hard to compare. `>=5.0.0 && <=5.3.2 || ^6`... Comparing this\n // to anything is going to be challenging, so only compare \"simple\" ranges/versions\n // (^x.x.x / ~x.x.x / x.x.x)\n if (\n !isStyledComponentsVersionRangeInCatalog &&\n isComparableRange(declaredStyledComponentsVersion) &&\n !semver.satisfies(minDeclaredStyledComponentsVersion!, wantedStyledComponentsVersionRange)\n ) {\n output.warn(oneline`\n Declared version of styled-components (${declaredStyledComponentsVersion})\n is not compatible with the version required by sanity (${wantedStyledComponentsVersionRange}).\n This might cause problems!\n `)\n }\n\n // Ensure the studio has _installed_ a version of `styled-components`\n if (!installedStyledComponentsVersion) {\n throw new Error(oneline`\n Declared dependency \\`styled-components\\` is not installed - run\n \\`npm install\\`, \\`yarn install\\` or \\`pnpm install\\` to install it before re-running this command.\n `)\n }\n\n // The studio should have an _installed_ version of `styled-components`, and it should\n // be semver compatible with the version specified in `sanity` peer dependencies.\n if (!semver.satisfies(installedStyledComponentsVersion, wantedStyledComponentsVersionRange)) {\n output.warn(oneline`\n Installed version of styled-components (${installedStyledComponentsVersion})\n is not compatible with the version required by sanity (${wantedStyledComponentsVersionRange}).\n This might cause problems!\n `)\n }\n\n return {didInstall: false, installedSanityVersion}\n}\n\n/**\n * Install the passed dependencies at the given version/version range,\n * prompting the user which package manager to use. We will try to detect\n * a package manager from files in the directory and show that as the default\n *\n * @param dependencies - Object of dependencies `({[package name]: version})`\n * @param context - CLI context\n */\nasync function installDependencies(\n dependencies: Record<string, string>,\n context: CliCommandContext,\n): Promise<void> {\n const {output, prompt, workDir, cliPackageManager} = context\n const packages: string[] = []\n\n output.print('The Sanity studio needs to install missing dependencies:')\n for (const [pkgName, version] of Object.entries(dependencies)) {\n const declaration = `${pkgName}@${version}`\n output.print(`- ${declaration}`)\n packages.push(declaration)\n }\n\n if (!cliPackageManager) {\n output.error(\n 'ERROR: Could not determine package manager choice - run `npm install` or equivalent',\n )\n return\n }\n\n const {getPackageManagerChoice, installNewPackages} = cliPackageManager\n const {mostOptimal, chosen: pkgManager} = await getPackageManagerChoice(workDir, {prompt})\n if (mostOptimal && pkgManager !== mostOptimal) {\n output.warn(\n `WARN: This project appears to be installed with or using ${mostOptimal} - using a different package manager _may_ result in errors.`,\n )\n }\n\n await installNewPackages({packages, packageManager: pkgManager}, context)\n}\n\nfunction isComparableRange(range: string): boolean {\n return /^[\\^~]?\\d+(\\.\\d+)?(\\.\\d+)?$/.test(range)\n}\n","import path from 'node:path'\n\nimport {type CliPrompter} from '@sanity/cli'\nimport preferredPM from 'preferred-pm'\nimport which from 'which'\n\nimport {isInteractive} from '../isInteractive'\n\nexport type PackageManager = 'npm' | 'yarn' | 'pnpm' | 'bun' | 'manual'\n\nexport const ALLOWED_PACKAGE_MANAGERS: PackageManager[] = ['npm', 'yarn', 'pnpm', 'bun', 'manual']\nexport const allowedPackageManagersString = ALLOWED_PACKAGE_MANAGERS.map((pm) => `\"${pm}\"`).join(\n ' | ',\n)\n\nconst EXPERIMENTAL = ['bun']\n\n/**\n * Attempts to resolve the most optimal package manager to use to install/upgrade\n * packages/dependencies at a given path. It does so by looking for package manager\n * specific lockfiles. If it finds a lockfile belonging to a certain package manager,\n * it prioritizes this one. However, if that package manager is not installed, it will\n * prompt the user for which one they want to use and hint at the most optimal one\n * not being installed.\n *\n * Note that this function also takes local npm binary paths into account - for instance,\n * `yarn` can be installed as a dependency of the project instead of globally, and it\n * will use that is available.\n *\n * The user can also select 'manual' to skip the process and run their preferred package\n * manager manually. Commands using this function must take this `manual` choice into\n * account and act accordingly if chosen.\n *\n * @param workDir - The working directory where a lockfile is most likely to be present\n * @param options - Pass `interactive: false` to fall back to npm if most optimal is\n * not available, instead of prompting\n * @returns Object of `chosen` and, if a lockfile is found, the `mostOptimal` choice\n */\nexport async function getPackageManagerChoice(\n workDir: string,\n options: {interactive: false} | {interactive?: true; prompt: CliPrompter},\n): Promise<{chosen: PackageManager; mostOptimal?: PackageManager}> {\n const rootDir = workDir || process.cwd()\n const preferred = (await preferredPM(rootDir))?.name\n\n if (preferred && (await hasCommand(preferred, rootDir))) {\n // There is an optimal/preferred package manager, and the user has it installed!\n return {chosen: preferred, mostOptimal: preferred}\n }\n\n const mostLikelyPM = await getMostLikelyInstalledPackageManager(rootDir)\n const interactive = typeof options.interactive === 'boolean' ? options.interactive : isInteractive\n if (!interactive) {\n // We can't ask the user for their preference, so fall back to either the one that is being run\n // or whatever is installed on the system (npm being the preferred choice).\n // Note that the most optimal choice is already picked above if available.\n return {chosen: mostLikelyPM || (await getFallback(rootDir)), mostOptimal: preferred}\n }\n\n if (!('prompt' in options)) {\n throw new Error('Must pass `prompt` when in interactive mode')\n }\n\n // We can ask the user for their preference, hurray!\n const messageSuffix = preferred ? ` (preferred is ${preferred}, but is not installed)` : ''\n const installed = await getAvailablePackageManagers(rootDir)\n const chosen = await options.prompt.single<PackageManager>({\n type: 'list',\n choices: installed.map((pm) => ({\n value: pm,\n name: EXPERIMENTAL.includes(pm) ? `${pm} (experimental)` : pm,\n })),\n default: preferred || mostLikelyPM,\n message: `Package manager to use for installing dependencies?${messageSuffix}`,\n })\n\n return {chosen, mostOptimal: preferred}\n}\n\nasync function getFallback(cwd: string): Promise<PackageManager> {\n if (await hasNpmInstalled(cwd)) {\n return 'npm'\n }\n\n if (await hasYarnInstalled(cwd)) {\n return 'yarn'\n }\n\n if (await hasPnpmInstalled(cwd)) {\n return 'pnpm'\n }\n\n if (await hasBunInstalled(cwd)) {\n return 'bun'\n }\n\n return 'manual'\n}\n\nasync function getAvailablePackageManagers(cwd: string): Promise<PackageManager[]> {\n const [npm, yarn, pnpm, bun] = await Promise.all([\n hasNpmInstalled(cwd),\n hasYarnInstalled(cwd),\n hasPnpmInstalled(cwd),\n hasBunInstalled(cwd),\n ])\n\n const choices = [npm && 'npm', yarn && 'yarn', pnpm && 'pnpm', bun && 'bun', 'manual']\n return choices.filter((pm): pm is PackageManager => pm !== false)\n}\n\nexport function hasNpmInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('npm', cwd)\n}\n\nexport function hasYarnInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('yarn', cwd)\n}\n\nexport function hasPnpmInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('pnpm', cwd)\n}\n\nexport function hasBunInstalled(cwd?: string): Promise<boolean> {\n return hasCommand('bun', cwd)\n}\n\nexport function getNpmRunPath(cwd: string): string {\n let previous\n let cwdPath = path.resolve(cwd)\n const result: string[] = []\n\n while (previous !== cwdPath) {\n result.push(path.join(cwdPath, 'node_modules', '.bin'))\n previous = cwdPath\n cwdPath = path.resolve(cwdPath, '..')\n }\n\n result.push(path.resolve(cwd, process.execPath, '..'))\n\n const pathEnv = process.env[getPathEnvVarKey()]\n return [...result, pathEnv].join(path.delimiter)\n}\n\nexport function getPartialEnvWithNpmPath(cwd: string): NodeJS.ProcessEnv {\n const key = getPathEnvVarKey()\n return {[key]: getNpmRunPath(cwd)}\n}\n\nfunction getPathEnvVarKey(): string {\n if (process.platform !== 'win32') {\n return 'PATH'\n }\n\n return (\n Object.keys(process.env)\n .reverse()\n .find((key) => key.toUpperCase() === 'PATH') || 'Path'\n )\n}\n\nfunction getCommandPath(cmd: string, cwd?: string): Promise<string | null> {\n const options = {path: cwd ? getNpmRunPath(cwd) : undefined}\n return which(cmd, options).catch(() => null)\n}\n\nfunction hasCommand(cmd: string, cwd?: string): Promise<boolean> {\n return getCommandPath(cmd, cwd).then((cmdPath) => cmdPath !== null)\n}\n\nasync function getMostLikelyInstalledPackageManager(\n rootDir: string,\n): Promise<PackageManager | undefined> {\n const installed = await getAvailablePackageManagers(rootDir)\n const running = getRunningPackageManager()\n return running && installed.includes(running) ? running : undefined\n}\n\nfunction getRunningPackageManager(): PackageManager | undefined {\n // Yes, the env var is lowercase - it is set by the package managers themselves\n const agent = process.env.npm_config_user_agent || ''\n\n if (agent.includes('yarn')) {\n return 'yarn'\n }\n\n if (agent.includes('pnpm')) {\n return 'pnpm'\n }\n\n if (agent.includes('bun')) {\n return 'bun'\n }\n\n // Both yarn and pnpm does a `npm/?` thing, thus the slightly different match here\n // Theoretically not needed since we check for yarn/pnpm above, but in case other\n // package managers do the same thing, we'll (hopefully) catch them here.\n if (/^npm\\/\\d/.test(agent)) {\n return 'npm'\n }\n\n return undefined\n}\n","import execa, {type CommonOptions, type ExecaReturnValue} from 'execa'\n\nimport {getPartialEnvWithNpmPath, type PackageManager} from './packageManagerChoice'\n\nexport interface InstallOptions {\n packageManager: PackageManager\n packages: [name: string, version: string][]\n}\n\nexport async function upgradePackages(\n options: InstallOptions,\n context: {output: {print: (output: string) => void}; workDir: string},\n): Promise<void> {\n const {packageManager, packages} = options\n const {output, workDir} = context\n const execOptions: CommonOptions<'utf8'> = {\n encoding: 'utf8',\n env: getPartialEnvWithNpmPath(workDir),\n cwd: workDir,\n stdio: 'inherit',\n }\n const upgradePackageArgs = packages.map((pkg) => pkg.join('@'))\n let result: ExecaReturnValue<string> | undefined\n if (packageManager === 'npm') {\n const npmArgs = ['install', '--legacy-peer-deps', ...upgradePackageArgs]\n output.print(`Running 'npm ${npmArgs.join(' ')}'`)\n result = await execa('npm', npmArgs, execOptions)\n } else if (packageManager === 'yarn') {\n const yarnArgs = ['upgrade ', ...upgradePackageArgs]\n output.print(`Running 'yarn ${yarnArgs.join(' ')}'`)\n result = await execa('yarn', yarnArgs, execOptions)\n } else if (packageManager === 'pnpm') {\n const pnpmArgs = ['upgrade', ...upgradePackageArgs]\n output.print(`Running 'pnpm ${pnpmArgs.join(' ')}'`)\n result = await execa('pnpm', pnpmArgs, execOptions)\n } else if (packageManager === 'bun') {\n const bunArgs = ['update', ...upgradePackageArgs]\n output.print(`Running 'bun ${bunArgs.join(' ')}'`)\n result = await execa('bun', bunArgs, execOptions)\n } else if (packageManager === 'manual') {\n output.print(\n `Manual installation selected - run 'npm upgrade ${upgradePackageArgs.join(' ')}' or equivalent`,\n )\n }\n\n if (result?.exitCode || result?.failed) {\n throw new Error('Package upgrade failed')\n }\n}\n"],"names":["PACKAGES","name","supported","deprecatedBelow","checkStudioDependencyVersions","workDir","manifest","readPackageJson","path","join","dependencies","devDependencies","packageInfo","map","pkg","dependency","manifestPath","resolveFrom","silent","installed","semver","coerce","readPackageManifest","version","replace","isUntested","satisfies","gtr","isUnsupported","isDeprecated","ltr","installedPackages","Promise","all","filter","inp","unsupported","deprecated","untested","length","console","warn","listPackages","getUpgradeInstructions","getDowngradeInstructions","error","process","exit","pkgs","inst","highestSupported","sort","rcompare","generateHelpUrl","defaultStudioManifestProps","checkRequiredDependencies","context","determineIsApp","cliConfig","didInstall","installedSanityVersion","studioPath","output","studioPackageManifest","installedStyledComponentsVersion","readModuleVersion","wantedStyledComponentsVersionRange","peerDependencies","Error","declaredStyledComponentsVersion","file","args","argv","installDependencies","execa","cwd","stdio","isStyledComponentsVersionRangeInCatalog","startsWith","minDeclaredStyledComponentsVersion","minVersion","oneline","isComparableRange","prompt","cliPackageManager","packages","print","pkgName","Object","entries","declaration","push","getPackageManagerChoice","installNewPackages","mostOptimal","chosen","pkgManager","packageManager","range","test","EXPERIMENTAL","options","rootDir","preferred","preferredPM","hasCommand","mostLikelyPM","getMostLikelyInstalledPackageManager","interactive","isInteractive","getFallback","messageSuffix","getAvailablePackageManagers","single","type","choices","pm","value","includes","default","message","hasNpmInstalled","hasYarnInstalled","hasPnpmInstalled","hasBunInstalled","npm","yarn","pnpm","bun","getNpmRunPath","previous","cwdPath","resolve","result","execPath","pathEnv","env","getPathEnvVarKey","delimiter","getPartialEnvWithNpmPath","platform","keys","reverse","find","key","toUpperCase","getCommandPath","cmd","undefined","which","catch","then","cmdPath","running","getRunningPackageManager","agent","npm_config_user_agent","upgradePackages","execOptions","encoding","upgradePackageArgs","npmArgs","yarnArgs","pnpmArgs","bunArgs","exitCode","failed"],"mappings":";;;;;;;;;;;AAoBA,MAAMA,WAAW,CACf;AAAA,EAACC,MAAM;AAAA,EAASC,WAAW,CAAC,SAAS;AAAA,EAAGC,iBAAiB;AAAI,GAC7D;AAAA,EAACF,MAAM;AAAA,EAAaC,WAAW,CAAC,SAAS;AAAA,EAAGC,iBAAiB;AAAI,GACjE;AAAA,EAACF,MAAM;AAAA,EAAqBC,WAAW,CAAC,IAAI;AAAA,EAAGC,iBAAiB;AAAI,GACpE;AAAA,EAACF,MAAM;AAAA,EAAcC,WAAW,CAAC,MAAM,IAAI;AAAA,EAAGC,iBAAiB;AAAI,CAAC;AAGtE,eAAsBC,8BAA8BC,SAAgC;AAClF,QAAMC,WAAW,MAAMC,gBAAgBC,KAAKC,KAAKJ,SAAS,cAAc,CAAC,GACnEK,eAAe;AAAA,IAAC,GAAGJ,SAASI;AAAAA,IAAc,GAAGJ,SAASK;AAAAA,EAAAA,GAEtDC,cAAcZ,SAASa,IAAI,OAAOC,QAAsC;AAC5E,UAAMC,aAAaL,aA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IlG,MAAM,wBAAwB;AAE5C;"}
@@ -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.0.0-next-major.20251210134624+f29c4bb975";
10
+ "5.0.0-next-major.20251215093220+1199cb7c73";
11
11
  } catch {
12
12
  }
13
13
  const SANITY_VERSION = buildVersion || `${version}-dev`;
@@ -18391,7 +18391,6 @@ declare interface UserApplication {
18391
18391
  title?: string
18392
18392
  urlType: 'internal' | 'external'
18393
18393
  appHost: string
18394
- apiHost: string
18395
18394
  }
18396
18395
 
18397
18396
  /**
@@ -18404,7 +18403,7 @@ declare interface UserApplicationCache {
18404
18403
  * Get user applications for a project.
18405
18404
  * Returns cached results if available, otherwise fetches from API.
18406
18405
  */
18407
- get: (projectId: string, apiHost?: string) => Promise<UserApplication[]>
18406
+ get: (client: SanityClient) => Promise<UserApplication[]>
18408
18407
  }
18409
18408
 
18410
18409
  /**
package/lib/desk.d.ts CHANGED
@@ -11924,6 +11924,12 @@ declare const structureLocaleStrings: {
11924
11924
  'buttons.split-pane-close-group-button.title': string
11925
11925
  /** The text for the canvas linked banner action button */
11926
11926
  'canvas.banner.edit-in-canvas-action': string
11927
+ /** The text for the canvas linked banner when the document in editable mode*/
11928
+ 'canvas.banner.editable.linked-text': string
11929
+ /** The description for the canvas linked banner popover in editable mode*/
11930
+ 'canvas.banner.editable.popover-description': string
11931
+ /** The heading for the canvas linked banner popover in editable mode*/
11932
+ 'canvas.banner.editable.popover-heading': string
11927
11933
  /** The text for the canvas linked banner when the document is a draft */
11928
11934
  'canvas.banner.linked-text.draft': string
11929
11935
  /** The text for the canvas linked banner when the document is a live document */
package/lib/index.d.ts CHANGED
@@ -3197,6 +3197,7 @@ declare interface CompanionDoc {
3197
3197
  _id: string
3198
3198
  canvasDocumentId: string
3199
3199
  studioDocumentId: string
3200
+ isStudioDocumentEditable?: boolean
3200
3201
  }
3201
3202
 
3202
3203
  declare interface CompatibleStudioAppId {
@@ -16304,6 +16305,7 @@ export declare function useArchivedReleases(): {
16304
16305
  */
16305
16306
  export declare const useCanvasCompanionDoc: (documentId: string) => {
16306
16307
  isLinked: boolean
16308
+ isLockedByCanvas: boolean
16307
16309
  companionDoc: CompanionDoc | undefined
16308
16310
  loading: boolean | undefined
16309
16311
  }