diff --git a/dev/embedded-studio/src/main.tsx b/dev/embedded-studio/src/main.tsx index 3b864e619900..1e721423cc8d 100644 --- a/dev/embedded-studio/src/main.tsx +++ b/dev/embedded-studio/src/main.tsx @@ -1,5 +1,6 @@ import React from 'react' import ReactDOM from 'react-dom/client' +// eslint-disable-next-line import/no-unassigned-import import './index.css' import {App} from './App' diff --git a/dev/test-studio/sanity.config.ts b/dev/test-studio/sanity.config.ts index d970b87ec520..3c877eb10526 100644 --- a/dev/test-studio/sanity.config.ts +++ b/dev/test-studio/sanity.config.ts @@ -33,8 +33,8 @@ import { } from './components/studioComponents' import {GoogleLogo, TailwindLogo, VercelLogo} from './components/workspaceLogos' import {resolveDocumentActions as documentActions} from './documentActions' -import {copyAction} from './fieldActions/copyAction' import {assistFieldActionGroup} from './fieldActions/assistFieldActionGroup' +import {copyAction} from './fieldActions/copyAction' import {pasteAction} from './fieldActions/pasteAction' import {resolveInitialValueTemplates} from './initialValueTemplates' import {customInspector} from './inspectors/custom' diff --git a/packages/@sanity/cli/src/actions/init-project/initProject.ts b/packages/@sanity/cli/src/actions/init-project/initProject.ts index a0106fb5f4b9..41ca093613cf 100644 --- a/packages/@sanity/cli/src/actions/init-project/initProject.ts +++ b/packages/@sanity/cli/src/actions/init-project/initProject.ts @@ -15,17 +15,28 @@ import which from 'which' import {CLIInitStepCompleted} from '../../__telemetry__/init.telemetry' import {type InitFlags} from '../../commands/init/initCommand' import {debug} from '../../debug' +import { + getPackageManagerChoice, + installDeclaredPackages, + installNewPackages, +} from '../../packageManager' +import {getPartialEnvWithNpmPath, PackageManager} from '../../packageManager/packageManagerChoice' +import { + CliApiClient, + CliCommandArguments, + CliCommandContext, + CliCommandDefinition, + SanityCore, + SanityModuleInternal, +} from '../../types' +import {getClientWrapper} from '../../util/clientWrapper' +import {dynamicRequire} from '../../util/dynamicRequire' import {getProjectDefaults, ProjectDefaults} from '../../util/getProjectDefaults' import {getUserConfig} from '../../util/getUserConfig' import {isCommandGroup} from '../../util/isCommandGroup' import {isInteractive} from '../../util/isInteractive' import {login, LoginFlags} from '../login/login' import {createProject} from '../project/createProject' -import { - getPackageManagerChoice, - installDeclaredPackages, - installNewPackages, -} from '../../packageManager' import {BootstrapOptions, bootstrapTemplate} from './bootstrapTemplate' import {GenerateConfigOptions} from './createStudioConfig' import {absolutify, validateEmptyPath} from './fsUtils' @@ -39,6 +50,7 @@ import { promptForNextTemplate, promptForStudioPath, } from './prompts/nextjs' +import {reconfigureV2Project} from './reconfigureV2Project' import templates from './templates' import { sanityCliTemplate, @@ -47,18 +59,6 @@ import { sanityStudioAppTemplate, sanityStudioPagesTemplate, } from './templates/nextjs' -import {reconfigureV2Project} from './reconfigureV2Project' -import {getPartialEnvWithNpmPath, PackageManager} from '../../packageManager/packageManagerChoice' -import { - CliApiClient, - CliCommandArguments, - CliCommandContext, - CliCommandDefinition, - SanityCore, - SanityModuleInternal, -} from '../../types' -import {getClientWrapper} from '../../util/clientWrapper' -import {dynamicRequire} from '../../util/dynamicRequire' // eslint-disable-next-line no-process-env const isCI = process.env.CI diff --git a/packages/@sanity/cli/src/cli.ts b/packages/@sanity/cli/src/cli.ts index eff98fc300c3..c4604a616c17 100755 --- a/packages/@sanity/cli/src/cli.ts +++ b/packages/@sanity/cli/src/cli.ts @@ -11,15 +11,15 @@ import {CliCommand} from './__telemetry__/cli.telemetry' import {baseCommands} from './commands' import {debug} from './debug' import {getInstallCommand} from './packageManager' +import {CommandRunnerOptions, TelemetryUserProperties} from './types' +import {createTelemetryStore} from './util/createTelemetryStore' +import {detectRuntime} from './util/detectRuntime' import {CliConfigResult, getCliConfig} from './util/getCliConfig' import {loadEnv} from './util/loadEnv' import {mergeCommands} from './util/mergeCommands' -import {parseArguments} from './util/parseArguments' import {neatStack} from './util/neatStack' +import {parseArguments} from './util/parseArguments' import {resolveRootDir} from './util/resolveRootDir' -import {CommandRunnerOptions, TelemetryUserProperties} from './types' -import {createTelemetryStore} from './util/createTelemetryStore' -import {detectRuntime} from './util/detectRuntime' import {telemetryDisclosure} from './util/telemetryDisclosure' import {runUpdateCheck} from './util/updateNotifier' diff --git a/packages/@sanity/import/src/importFromFolder.js b/packages/@sanity/import/src/importFromFolder.js index 5c09063cf415..220131446d69 100644 --- a/packages/@sanity/import/src/importFromFolder.js +++ b/packages/@sanity/import/src/importFromFolder.js @@ -1,8 +1,8 @@ const fs = require('fs') const path = require('path') +const debug = require('debug')('sanity:import:folder') const getFileUrl = require('file-url') const globby = require('globby') -const debug = require('debug')('sanity:import:folder') const readJson = require('./util/readJson') const rimraf = require('./util/rimraf') diff --git a/packages/@sanity/import/src/references.js b/packages/@sanity/import/src/references.js index 3cc40f4e84e0..08edcb7be350 100644 --- a/packages/@sanity/import/src/references.js +++ b/packages/@sanity/import/src/references.js @@ -1,7 +1,7 @@ +const {extractWithPath} = require('@sanity/mutator') const debug = require('debug')('sanity:import') const {get} = require('lodash') const pMap = require('p-map') -const {extractWithPath} = require('@sanity/mutator') const serializePath = require('./serializePath') const progressStepper = require('./util/progressStepper') const retryOnFailure = require('./util/retryOnFailure') diff --git a/packages/@sanity/import/src/uploadAssets.js b/packages/@sanity/import/src/uploadAssets.js index 737b832e8d2c..c1f62d51cda6 100644 --- a/packages/@sanity/import/src/uploadAssets.js +++ b/packages/@sanity/import/src/uploadAssets.js @@ -1,8 +1,8 @@ const basename = require('path').basename const parseUrl = require('url').parse +const {isSanityImageUrl} = require('@sanity/asset-utils') const debug = require('debug')('sanity:import') const pMap = require('p-map') -const {isSanityImageUrl} = require('@sanity/asset-utils') const getHashedBufferForUri = require('./util/getHashedBufferForUri') const progressStepper = require('./util/progressStepper') const retryOnFailure = require('./util/retryOnFailure') diff --git a/packages/@sanity/import/src/validateAssetDocuments.js b/packages/@sanity/import/src/validateAssetDocuments.js index 35e6ac9f9deb..97d74f26f6a0 100644 --- a/packages/@sanity/import/src/validateAssetDocuments.js +++ b/packages/@sanity/import/src/validateAssetDocuments.js @@ -1,5 +1,5 @@ -const debug = require('debug')('sanity:import:asset-validation') const {generateHelpUrl} = require('@sanity/generate-help-url') +const debug = require('debug')('sanity:import:asset-validation') const pMap = require('p-map') const urlExists = require('./util/urlExists') diff --git a/packages/@sanity/types/src/schema/definition/type/block.ts b/packages/@sanity/types/src/schema/definition/type/block.ts index 43261974fb50..d897b590dd3c 100644 --- a/packages/@sanity/types/src/schema/definition/type/block.ts +++ b/packages/@sanity/types/src/schema/definition/type/block.ts @@ -1,7 +1,7 @@ import {type ComponentType, type ReactNode} from 'react' import {type RuleDef, type ValidationBuilder} from '../../ruleBuilder' import {type InitialValueProperty} from '../../types' -import {type ArrayOfType} from './array' +import {type ArrayOfType} from './array' import {type BaseSchemaDefinition} from './common' import {type ObjectDefinition} from './object' diff --git a/packages/@sanity/types/src/schema/types.ts b/packages/@sanity/types/src/schema/types.ts index b81404746bb5..eb40ed667df8 100644 --- a/packages/@sanity/types/src/schema/types.ts +++ b/packages/@sanity/types/src/schema/types.ts @@ -1,6 +1,8 @@ import {type SanityClient} from '@sanity/client' import {type ComponentType} from 'react' +import {type SanityDocument} from '../documents' import {type CurrentUser} from '../user' +import {type Rule} from '../validation' import {type SchemaTypeDefinition} from './definition/schemaDefinition' import { type BlockDecoratorDefinition, @@ -18,8 +20,6 @@ import { } from './definition/type' import {type ArrayOptions} from './definition/type/array' import {type PreviewConfig} from './preview' -import type {SanityDocument} from '../documents' -import type {Rule} from '../validation' export {defineType, defineField, defineArrayMember, typed} from './define' diff --git a/packages/@sanity/vision/src/components/VisionGui.tsx b/packages/@sanity/vision/src/components/VisionGui.tsx index 798a5c6391b8..9188ac3191e2 100644 --- a/packages/@sanity/vision/src/components/VisionGui.tsx +++ b/packages/@sanity/vision/src/components/VisionGui.tsx @@ -32,10 +32,10 @@ import {type VisionProps} from '../types' import {encodeQueryString} from '../util/encodeQueryString' import {getLocalStorage, LocalStorageish} from '../util/localStorage' import {parseApiQueryString, ParsedApiQueryString} from '../util/parseApiQueryString' -import {validateApiVersion} from '../util/validateApiVersion' import {prefixApiVersion} from '../util/prefixApiVersion' -import {tryParseParams} from '../util/tryParseParams' import {ResizeObserver} from '../util/resizeObserver' +import {tryParseParams} from '../util/tryParseParams' +import {validateApiVersion} from '../util/validateApiVersion' import {DelayedSpinner} from './DelayedSpinner' import {ParamsEditor, type ParamsEditorChangeEvent} from './ParamsEditor' import {PerspectivePopover} from './PerspectivePopover' diff --git a/packages/sanity/src/_internal/cli/commands/index.ts b/packages/sanity/src/_internal/cli/commands/index.ts index f63bc7476887..e8d65ee86f3e 100644 --- a/packages/sanity/src/_internal/cli/commands/index.ts +++ b/packages/sanity/src/_internal/cli/commands/index.ts @@ -10,13 +10,13 @@ import aliasDatasetCommand from './dataset/alias/aliasCommands' import copyDatasetCommand from './dataset/copyDatasetCommand' import createDatasetCommand from './dataset/createDatasetCommand' import datasetGroup from './dataset/datasetGroup' -import listDatasetsCommand from './dataset/listDatasetsCommand' -import deployCommand from './deploy/deployCommand' -import undeployCommand from './deploy/undeployCommand' import datasetVisibilityCommand from './dataset/datasetVisibilityCommand' import deleteDatasetCommand from './dataset/deleteDatasetCommand' import exportDatasetCommand from './dataset/exportDatasetCommand' import importDatasetCommand from './dataset/importDatasetCommand' +import listDatasetsCommand from './dataset/listDatasetsCommand' +import deployCommand from './deploy/deployCommand' +import undeployCommand from './deploy/undeployCommand' import devCommand from './dev/devCommand' import createDocumentsCommand from './documents/createDocumentsCommand' import deleteDocumentsCommand from './documents/deleteDocumentsCommand' @@ -24,20 +24,20 @@ import documentsGroup from './documents/documentsGroup' import getDocumentsCommand from './documents/getDocumentsCommand' import queryDocumentsCommand from './documents/queryDocumentsCommand' import validateDocumentsCommand from './documents/validateDocumentsCommand' +import execCommand from './exec/execCommand' +import deleteGraphQLAPICommand from './graphql/deleteGraphQLAPICommand' +import deployGraphQLAPICommand from './graphql/deployGraphQLAPICommand' +import graphqlGroup from './graphql/graphqlGroup' +import listGraphQLAPIsCommand from './graphql/listGraphQLAPIsCommand' import createHookCommand from './hook/createHookCommand' import deleteHookCommand from './hook/deleteHookCommand' import hookGroup from './hook/hookGroup' +import listHookLogsCommand from './hook/listHookLogsCommand' +import listHooksCommand from './hook/listHooksCommand' +import printHookAttemptCommand from './hook/printHookAttemptCommand' import previewCommand from './preview/previewCommand' import startCommand from './start/startCommand' import uninstallCommand from './uninstall/uninstallCommand' -import listHooksCommand from './hook/listHooksCommand' -import printHookAttemptCommand from './hook/printHookAttemptCommand' -import listHookLogsCommand from './hook/listHookLogsCommand' -import execCommand from './exec/execCommand' -import graphqlGroup from './graphql/graphqlGroup' -import listGraphQLAPIsCommand from './graphql/listGraphQLAPIsCommand' -import deployGraphQLAPICommand from './graphql/deployGraphQLAPICommand' -import deleteGraphQLAPICommand from './graphql/deleteGraphQLAPICommand' import inviteUserCommand from './users/inviteUserCommand' import listUsersCommand from './users/listUsersCommand' import usersGroup from './users/usersGroup' diff --git a/packages/sanity/src/core/config/prepareConfig.ts b/packages/sanity/src/core/config/prepareConfig.ts index 608a19a2538d..3d2af87b1c66 100644 --- a/packages/sanity/src/core/config/prepareConfig.ts +++ b/packages/sanity/src/core/config/prepareConfig.ts @@ -13,10 +13,10 @@ import {prepareI18n} from '../i18n/i18nConfig' import {createSchema} from '../schema' import {type AuthStore, createAuthStore, isAuthStore} from '../store/_legacy' import {validateWorkspaces} from '../studio' -import {type InitialValueTemplateItem, type Template, type TemplateItem} from '../templates' -import {EMPTY_ARRAY, isNonNullable} from '../util' import {filterDefinitions} from '../studio/components/navbar/search/definitions/defaultFilters' import {operatorDefinitions} from '../studio/components/navbar/search/definitions/operators/defaultOperators' +import {type InitialValueTemplateItem, type Template, type TemplateItem} from '../templates' +import {EMPTY_ARRAY, isNonNullable} from '../util' import {ConfigResolutionError} from './ConfigResolutionError' import {SchemaError} from './SchemaError' import { diff --git a/packages/sanity/src/core/config/types.ts b/packages/sanity/src/core/config/types.ts index 66475df1cec7..de2ac16f000b 100644 --- a/packages/sanity/src/core/config/types.ts +++ b/packages/sanity/src/core/config/types.ts @@ -1,14 +1,26 @@ +import {type BifurClient} from '@sanity/bifur-client' +import {type ClientConfig as SanityClientConfig, type SanityClient} from '@sanity/client' +import { + type AssetSource, + type CurrentUser, + type ObjectSchemaType, + type SanityDocumentLike, + type Schema, + type SchemaType, + type SchemaTypeDefinition, +} from '@sanity/types' +import {type i18n} from 'i18next' import {type ComponentType, type ReactNode} from 'react' import {type Observable} from 'rxjs' -import {type LocalePluginOptions, type LocaleSource} from '../i18n/types' -import {type InitialValueTemplateItem, type Template, type TemplateItem} from '../templates' -import {type AuthStore} from '../store' -import {type StudioTheme} from '../theme' -import {type SearchFilterDefinition} from '../studio/components/navbar/search/definitions/filters' -import {type SearchOperatorDefinition} from '../studio/components/navbar/search/definitions/operators' -import {type StudioComponents, type StudioComponentsPluginOptions} from './studio' -import {type AuthConfig} from './auth/types' -import { +import {type FormBuilderCustomMarkersComponent, type FormBuilderMarkersComponent} from '../form' +import {type LocalePluginOptions, type LocaleSource} from '../i18n/types' +import {type AuthStore} from '../store' +import {type SearchFilterDefinition} from '../studio/components/navbar/search/definitions/filters' +import {type SearchOperatorDefinition} from '../studio/components/navbar/search/definitions/operators' +import {type InitialValueTemplateItem, type Template, type TemplateItem} from '../templates' +import {type StudioTheme} from '../theme' +import {type AuthConfig} from './auth/types' +import { type DocumentActionComponent, type DocumentBadgeComponent, type DocumentFieldAction, @@ -17,19 +29,7 @@ import { type DocumentInspector, } from './document' import {FormComponents} from './form' -import type {FormBuilderCustomMarkersComponent, FormBuilderMarkersComponent} from '../form' -import type {BifurClient} from '@sanity/bifur-client' -import type {ClientConfig as SanityClientConfig, SanityClient} from '@sanity/client' -import type { - AssetSource, - CurrentUser, - ObjectSchemaType, - SanityDocumentLike, - Schema, - SchemaType, - SchemaTypeDefinition, -} from '@sanity/types' -import type {i18n} from 'i18next' +import {type StudioComponents, type StudioComponentsPluginOptions} from './studio' import {type Router, type RouterState} from 'sanity/router' /** diff --git a/packages/sanity/src/core/form/inputs/PortableText/object/Annotation.tsx b/packages/sanity/src/core/form/inputs/PortableText/object/Annotation.tsx index b21436767f92..2939ae83ef3f 100644 --- a/packages/sanity/src/core/form/inputs/PortableText/object/Annotation.tsx +++ b/packages/sanity/src/core/form/inputs/PortableText/object/Annotation.tsx @@ -7,7 +7,7 @@ import {pathToString} from '../../../../field' import {useTranslation} from '../../../../i18n' import {EMPTY_ARRAY} from '../../../../util' import {useChildPresence} from '../../../studio/contexts/Presence' -import { +import { type BlockAnnotationProps, type RenderAnnotationCallback, type RenderArrayOfObjectsItemCallback, @@ -23,8 +23,8 @@ import {debugRender} from '../debugRender' import {useMemberValidation} from '../hooks/useMemberValidation' import {usePortableTextMarkers} from '../hooks/usePortableTextMarkers' import {usePortableTextMemberItem} from '../hooks/usePortableTextMembers' -import {AnnotationToolbarPopover} from './AnnotationToolbarPopover' import {Root, TooltipBox} from './Annotation.styles' +import {AnnotationToolbarPopover} from './AnnotationToolbarPopover' import {ObjectEditModal} from './modals/ObjectEditModal' interface AnnotationProps { diff --git a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceField.tsx b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceField.tsx index 18a37395720f..93a8fefa8ec4 100644 --- a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceField.tsx +++ b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceField.tsx @@ -10,10 +10,10 @@ import React, { useRef, useState, } from 'react' -import {useTranslation} from '../../../i18n' import {MenuButton, MenuItem, TooltipDelayGroupProvider} from '../../../../ui-components' import {ContextMenuButton} from '../../../components/contextMenuButton' import {DocumentFieldActionNode} from '../../../config' +import {useTranslation} from '../../../i18n' import {FormField} from '../../components' import {usePublishedId} from '../../contexts/DocumentIdProvider' import {FieldActionsProvider, FieldActionsResolver} from '../../field' diff --git a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceItem.tsx b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceItem.tsx index f9dfe9c06b4e..6bb40b5fc13b 100644 --- a/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceItem.tsx +++ b/packages/sanity/src/core/form/inputs/ReferenceInput/ReferenceItem.tsx @@ -17,11 +17,12 @@ import {FieldPresence} from '../../../presence' import {FormFieldSet, FormFieldValidationStatus} from '../../components/formField' import {useDidUpdate} from '../../hooks/useDidUpdate' import {useScrollIntoViewOnFocusWithin} from '../../hooks/useScrollIntoViewOnFocusWithin' +import {set, unset} from '../../patch' +import {type ObjectItem, type ObjectItemProps} from '../../types' import {randomKey} from '../../utils/randomKey' import {InsertMenu} from '../arrays/ArrayOfObjectsInput/InsertMenu' import {createProtoArrayValue} from '../arrays/ArrayOfObjectsInput/createProtoArrayValue' import {RowLayout} from '../arrays/layouts/RowLayout' -import {set, unset} from '../../patch' import {PreviewReferenceValue} from './PreviewReferenceValue' import {ReferenceFinalizeAlertStrip} from './ReferenceFinalizeAlertStrip' import {ReferenceItemRefProvider} from './ReferenceItemRefProvider' @@ -30,7 +31,6 @@ import {ReferenceMetadataLoadErrorAlertStrip} from './ReferenceMetadataLoadFailu import {ReferenceStrengthMismatchAlertStrip} from './ReferenceStrengthMismatchAlertStrip' import {useReferenceInfo} from './useReferenceInfo' import {useReferenceInput} from './useReferenceInput' -import {type ObjectItem, type ObjectItemProps} from '../../types' import {IntentLink} from 'sanity/router' export interface ReferenceItemValue extends Omit, Omit {} diff --git a/packages/sanity/src/core/form/inputs/arrays/ArrayOfObjectsInput/Grid/GridItem.tsx b/packages/sanity/src/core/form/inputs/arrays/ArrayOfObjectsInput/Grid/GridItem.tsx index 290f211ef86e..bf2694037c8e 100644 --- a/packages/sanity/src/core/form/inputs/arrays/ArrayOfObjectsInput/Grid/GridItem.tsx +++ b/packages/sanity/src/core/form/inputs/arrays/ArrayOfObjectsInput/Grid/GridItem.tsx @@ -16,9 +16,9 @@ import {EditPortal} from '../../../../components/EditPortal' import {useDidUpdate} from '../../../../hooks/useDidUpdate' import {useScrollIntoViewOnFocusWithin} from '../../../../hooks/useScrollIntoViewOnFocusWithin' import {useChildPresence} from '../../../../studio/contexts/Presence' +import {useChildValidation} from '../../../../studio/contexts/Validation' import {ObjectItem, ObjectItemProps} from '../../../../types' import {randomKey} from '../../../../utils/randomKey' -import {useChildValidation} from '../../../../studio/contexts/Validation' import {CellLayout} from '../../layouts/CellLayout' import {InsertMenu} from '../InsertMenu' import {createProtoArrayValue} from '../createProtoArrayValue' diff --git a/packages/sanity/src/core/form/inputs/files/FileInput/FileInput.tsx b/packages/sanity/src/core/form/inputs/files/FileInput/FileInput.tsx index 82c8830044a1..f8ee105d2089 100644 --- a/packages/sanity/src/core/form/inputs/files/FileInput/FileInput.tsx +++ b/packages/sanity/src/core/form/inputs/files/FileInput/FileInput.tsx @@ -23,13 +23,13 @@ import {MemberField, MemberFieldError, MemberFieldSet} from '../../../members' import {PatchEvent, setIfMissing, unset} from '../../../patch' import {Uploader, UploaderResolver, UploadOptions} from '../../../studio/uploads/types' import {InputProps, ObjectInputProps} from '../../../types' +import {WithReferencedAsset} from '../../../utils/WithReferencedAsset' import {ActionsMenu} from '../common/ActionsMenu' -import {UploadProgress} from '../common/UploadProgress' -import {handleSelectAssetFromSource} from '../common/assetSource' import {PlaceholderText} from '../common/PlaceholderText' import {UploadPlaceholder} from '../common/UploadPlaceholder' +import {UploadProgress} from '../common/UploadProgress' import {UploadWarning} from '../common/UploadWarning' -import {WithReferencedAsset} from '../../../utils/WithReferencedAsset' +import {handleSelectAssetFromSource} from '../common/assetSource' import {FileInfo, FileTarget} from '../common/styles' import {FileActionsMenu} from './FileActionsMenu' import {FileSkeleton} from './FileSkeleton' diff --git a/packages/sanity/src/core/form/inputs/files/ImageInput/ImageInput.tsx b/packages/sanity/src/core/form/inputs/files/ImageInput/ImageInput.tsx index 93ee4e187727..7ce1003f1f33 100644 --- a/packages/sanity/src/core/form/inputs/files/ImageInput/ImageInput.tsx +++ b/packages/sanity/src/core/form/inputs/files/ImageInput/ImageInput.tsx @@ -38,10 +38,10 @@ import {ImageToolInput} from '../ImageToolInput' import {ActionsMenu} from '../common/ActionsMenu' import {UploadPlaceholder} from '../common/UploadPlaceholder' import {UploadProgress} from '../common/UploadProgress' +import {UploadWarning} from '../common/UploadWarning' import {handleSelectAssetFromSource} from '../common/assetSource' import {FileTarget} from '../common/styles' import {ImageUrlBuilder} from '../types' -import {UploadWarning} from '../common/UploadWarning' import {ImageActionsMenu} from './ImageActionsMenu' import {ImagePreview} from './ImagePreview' import {InvalidImageWarning} from './InvalidImageWarning' diff --git a/packages/sanity/src/core/form/members/object/fields/ArrayOfObjectsField.tsx b/packages/sanity/src/core/form/members/object/fields/ArrayOfObjectsField.tsx index fc392c6606ea..fe8f288520a8 100644 --- a/packages/sanity/src/core/form/members/object/fields/ArrayOfObjectsField.tsx +++ b/packages/sanity/src/core/form/members/object/fields/ArrayOfObjectsField.tsx @@ -13,6 +13,7 @@ import {applyAll} from '../../../patch/applyPatch' import {ArrayOfObjectsFormNode, FieldMember} from '../../../store' import {useDocumentFieldActions} from '../../../studio/contexts/DocumentFieldActions' import {FormCallbacksProvider, useFormCallbacks} from '../../../studio/contexts/FormCallbacks' +import {resolveUploader as defaultResolveUploader} from '../../../studio/uploads/resolveUploader' import {FileLike, UploadProgressEvent} from '../../../studio/uploads/types' import { ArrayFieldProps, @@ -30,7 +31,6 @@ import { } from '../../../types' import {useFormBuilder} from '../../../useFormBuilder' import {ensureKey} from '../../../utils/ensureKey' -import {resolveUploader as defaultResolveUploader} from '../../../studio/uploads/resolveUploader' import * as is from '../../../utils/is' import {createDescriptionId} from '../../common/createDescriptionId' import {resolveInitialArrayValues} from '../../common/resolveInitialArrayValues' diff --git a/packages/sanity/src/core/form/studio/inputs/reference/StudioReferenceInput.tsx b/packages/sanity/src/core/form/studio/inputs/reference/StudioReferenceInput.tsx index f2df5139ec18..c2e2c9690205 100644 --- a/packages/sanity/src/core/form/studio/inputs/reference/StudioReferenceInput.tsx +++ b/packages/sanity/src/core/form/studio/inputs/reference/StudioReferenceInput.tsx @@ -22,8 +22,8 @@ import {isNonNullable} from '../../../../util' import {useFormValue} from '../../../contexts/FormValue' import {ReferenceInput} from '../../../inputs/ReferenceInput/ReferenceInput' import {CreateReferenceOption, EditReferenceEvent} from '../../../inputs/ReferenceInput/types' -import {useReferenceInputOptions} from '../../contexts' import {ObjectInputProps} from '../../../types' +import {useReferenceInputOptions} from '../../contexts' import * as adapter from '../client-adapters/reference' async function resolveUserDefinedFilter( diff --git a/packages/sanity/src/core/studio/components/navbar/search/contexts/search/reducer.ts b/packages/sanity/src/core/studio/components/navbar/search/contexts/search/reducer.ts index 88e592e0631a..e914cdfb2be7 100644 --- a/packages/sanity/src/core/studio/components/navbar/search/contexts/search/reducer.ts +++ b/packages/sanity/src/core/studio/components/navbar/search/contexts/search/reducer.ts @@ -1,6 +1,8 @@ import {type CurrentUser} from '@sanity/types' import {type SearchableType, type SearchTerms, type WeightedHit} from '../../../../../../search' -import {type RecentSearch} from '../../datastores/recentSearches' +import {type RecentSearch} from '../../datastores/recentSearches' +import {type SearchFieldDefinitionDictionary} from '../../definitions/fields' +import {type SearchFilterDefinitionDictionary} from '../../definitions/filters' import { getOperatorDefinition, getOperatorInitialValue, @@ -17,8 +19,6 @@ import { } from '../../utils/filterUtils' import {isRecentSearchTerms} from '../../utils/isRecentSearchTerms' import {sortTypes} from '../../utils/selectors' -import {type SearchFieldDefinitionDictionary} from '../../definitions/fields' -import {type SearchFilterDefinitionDictionary} from '../../definitions/filters' export interface SearchReducerState { currentUser: CurrentUser | null diff --git a/packages/sanity/src/structure/comments/src/__workshop__/CommentReactionsMenuButtonStory.tsx b/packages/sanity/src/structure/comments/src/__workshop__/CommentReactionsMenuButtonStory.tsx index 10a9d19a087c..463f33fda53f 100644 --- a/packages/sanity/src/structure/comments/src/__workshop__/CommentReactionsMenuButtonStory.tsx +++ b/packages/sanity/src/structure/comments/src/__workshop__/CommentReactionsMenuButtonStory.tsx @@ -1,6 +1,6 @@ +// eslint-disable-next-line no-restricted-imports import {Button, Flex} from '@sanity/ui' import {useCallback, useState} from 'react' -// eslint-disable-next-line no-restricted-imports import {CommentReactionsMenuButton} from '../components' import {COMMENT_REACTION_OPTIONS} from '../constants' import {CommentReactionOption, CommentReactionShortNames} from '../types' diff --git a/packages/sanity/src/structure/structureBuilder/StructureNodes.ts b/packages/sanity/src/structure/structureBuilder/StructureNodes.ts index 96b30c71e521..27588ae79ca2 100644 --- a/packages/sanity/src/structure/structureBuilder/StructureNodes.ts +++ b/packages/sanity/src/structure/structureBuilder/StructureNodes.ts @@ -1,15 +1,15 @@ import {type ChildResolver} from './ChildResolver' import {type Component, type ComponentBuilder} from './Component' import {type DocumentBuilder} from './Document' -import {type DocumentTypeListBuilder} from './DocumentTypeList' -import {type InitialValueTemplateItemBuilder} from './InitialValueTemplateItem' -import {type View} from './types' import {type DocumentListBuilder, type DocumentList} from './DocumentList' import {type DocumentListItemBuilder} from './DocumentListItem' +import {type DocumentTypeListBuilder} from './DocumentTypeList' +import {type InitialValueTemplateItemBuilder} from './InitialValueTemplateItem' import {type ListBuilder, type List} from './List' import {type ListItemBuilder} from './ListItem' import {type MenuItemBuilder} from './MenuItem' import {type MenuItemGroupBuilder} from './MenuItemGroup' +import {type View} from './types' import {I18nTextRecord} from 'sanity' /**