Skip to content

Commit

Permalink
chore(test): update imports and exports (use from package sanity vs r…
Browse files Browse the repository at this point in the history
…elative paths)
  • Loading branch information
RitaDias committed Oct 22, 2024
1 parent 9ecc4f6 commit c1f2bf4
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 20 deletions.
7 changes: 7 additions & 0 deletions packages/sanity/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,22 @@ export * from './i18n'
export * from './presence'
export * from './preview'
export {
AddedVersion,
CreatedRelease,
createReleaseId,
DEFAULT_RELEASE_TYPE,
getCreateVersionOrigin,
getDocumentIsInPerspective,
getReleaseTone,
LATEST,
ReleaseActions,
ReleaseAvatar,
ReleaseBadge,
ReleaseForm,
ReleasesMenu,
useDocumentVersions,
usePerspective,
versionDocumentExists,
} from './releases'
export * from './scheduledPublishing'
export * from './schema'
Expand Down
2 changes: 2 additions & 0 deletions packages/sanity/src/core/releases/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './dialog/ReleaseForm'
export * from './panes/ReleaseActions'
export * from './ReleaseAvatar'
export * from './ReleaseBadge'
export * from './ReleasesMenu'
3 changes: 3 additions & 0 deletions packages/sanity/src/core/releases/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export * from './__telemetry__/releases.telemetry'
export * from './components'
export * from './hooks'
export * from './util/const'
export * from './util/createReleaseId'
export * from './util/getReleaseTone'
export * from './util/util'
2 changes: 1 addition & 1 deletion packages/sanity/src/core/releases/navbar/ReleasesNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import {LATEST, ToolLink} from 'sanity'
import {IntentLink, useRouterState} from 'sanity/router'

import {Tooltip} from '../../../ui-components'
import {ReleaseAvatar} from '../components/ReleaseAvatar'
import {usePerspective} from '../hooks/usePerspective'
import {RELEASES_INTENT, RELEASES_TOOL_NAME} from '../plugin'
import {ReleaseAvatar} from '../tool/components/ReleaseAvatar'
import {getReleaseTone} from '../util/getReleaseTone'
import {GlobalPerspectiveMenu} from './GlobalPerspectiveMenu'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {format} from 'date-fns'
import {useCallback} from 'react'
import {type BundleDocument, usePerspective, useTranslation} from 'sanity'

import {ReleaseAvatar} from '../../components/ReleaseAvatar'
import {releasesLocaleNamespace} from '../../i18n'
import {getReleaseTone} from '../../util/getReleaseTone'
import {ReleaseAvatar} from '../components/ReleaseAvatar'
import {ReleaseDetailsEditor} from './ReleaseDetailsEditor'

export function ReleaseDashboardDetails({release}: {release: BundleDocument}) {
Expand Down
1 change: 1 addition & 0 deletions packages/sanity/src/core/store/release/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './types'
export * from './useReleaseOperations'
export * from './useReleases'
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import {Text} from '@sanity/ui'
import {memo, useCallback} from 'react'
import {
getReleaseTone,
getVersionFromId,
isVersionId,
useDateTimeFormat,
usePerspective,
useReleases,
useTranslation,
versionDocumentExists,
} from 'sanity'
import {useDocumentPane, usePaneRouter} from 'sanity/structure'

import {versionDocumentExists} from '../../../../../../core/releases'
import {getReleaseTone} from '../../../../../../core/releases/util/getReleaseTone'
import {usePaneRouter} from '../../../../../components'
import {useDocumentPane} from '../../../useDocumentPane'
import {VersionChip} from './VersionChip'

export const DocumentPerspectiveMenu = memo(function DocumentPerspectiveMenu() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {memo, type MouseEvent, type ReactNode, useCallback, useMemo, useRef, use
import {type BundleDocument, getVersionId} from 'sanity'
import {styled} from 'styled-components'

import {ReleaseAvatar} from '../../../../../../core/releases/tool/components/ReleaseAvatar'
import {ReleaseAvatar} from '../../../../../../core/releases/components/ReleaseAvatar'
import {Button, Popover, Tooltip} from '../../../../../../ui-components'
import {VersionContextMenu} from './contextMenu/VersionContextMenu'
import {CreateReleaseDialog} from './dialog/CreateReleaseDialog'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import {Menu, MenuDivider, Spinner, Stack} from '@sanity/ui'
import {memo, useCallback} from 'react'
import {filter, firstValueFrom} from 'rxjs'
import {
AddedVersion,
type BundleDocument,
getCreateVersionOrigin,
getPublishedId,
Expand All @@ -17,7 +18,6 @@ import {
import {IntentLink} from 'sanity/router'
import {styled} from 'styled-components'

import {AddedVersion} from '../../../../../../../core/releases/__telemetry__/releases.telemetry'
import {MenuGroup, MenuItem} from '../../../../../../../ui-components'
import {VersionContextMenuItem} from './VersionContextMenuItem'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
/* eslint-disable i18next/no-literal-string */
import {Flex, Stack, Text} from '@sanity/ui'
import {memo} from 'react'
import {type BundleDocument, useDateTimeFormat} from 'sanity'

import {ReleaseAvatar} from '../../../../../../../core/releases/tool/components/ReleaseAvatar'
import {getReleaseTone} from '../../../../../../../core/releases/util/getReleaseTone'
import {type BundleDocument, getReleaseTone, ReleaseAvatar, useDateTimeFormat} from 'sanity'

export const VersionContextMenuItem = memo(function VersionContextMenuItem(props: {
release: BundleDocument
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import {type BadgeTone, Box, Flex, Text, useToast} from '@sanity/ui'
import {useCallback, useState} from 'react'
import {filter, firstValueFrom} from 'rxjs'
import {
AddedVersion,
CreatedRelease,
createReleaseId,
DEFAULT_RELEASE_TYPE,
type FormBundleDocument,
getCreateVersionOrigin,
Expand All @@ -12,20 +15,15 @@ import {
isVersionId,
LoadingBlock,
Preview,
ReleaseAvatar,
ReleaseForm,
useDocumentOperation,
useDocumentStore,
usePerspective,
useReleaseOperations,
useSchema,
} from 'sanity'

import {
AddedVersion,
CreatedRelease,
} from '../../../../../../../core/releases/__telemetry__/releases.telemetry'
import {ReleaseForm} from '../../../../../../../core/releases/components/dialog/ReleaseForm'
import {ReleaseAvatar} from '../../../../../../../core/releases/tool/components/ReleaseAvatar'
import {createReleaseId} from '../../../../../../../core/releases/util/createReleaseId'
import {useReleaseOperations} from '../../../../../../../core/store/release/useReleaseOperations'
import {Dialog} from '../../../../../../../ui-components'

export function CreateReleaseDialog(props: {
Expand Down

0 comments on commit c1f2bf4

Please sign in to comment.