From c4569565645905893262308e89b0dc580770d898 Mon Sep 17 00:00:00 2001 From: Pedro Bonamin Date: Mon, 19 Feb 2024 12:56:09 +0100 Subject: [PATCH] chore(core): rename commentsSetup to addOnDataset/setup --- packages/sanity/src/core/studio/addOnDataset/index.ts | 1 + .../setup}/CommentsSetupContext.ts | 0 .../setup}/CommentsSetupProvider.tsx | 8 ++++---- .../studio/{commentsSetup => addOnDataset/setup}/index.ts | 0 .../studio/{commentsSetup => addOnDataset/setup}/types.ts | 0 .../setup}/useCommentsSetup.ts | 0 packages/sanity/src/core/studio/index.ts | 2 +- packages/sanity/src/structure/comments/src/hooks/index.ts | 1 - 8 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 packages/sanity/src/core/studio/addOnDataset/index.ts rename packages/sanity/src/core/studio/{commentsSetup => addOnDataset/setup}/CommentsSetupContext.ts (100%) rename packages/sanity/src/core/studio/{commentsSetup => addOnDataset/setup}/CommentsSetupProvider.tsx (94%) rename packages/sanity/src/core/studio/{commentsSetup => addOnDataset/setup}/index.ts (100%) rename packages/sanity/src/core/studio/{commentsSetup => addOnDataset/setup}/types.ts (100%) rename packages/sanity/src/core/studio/{commentsSetup => addOnDataset/setup}/useCommentsSetup.ts (100%) diff --git a/packages/sanity/src/core/studio/addOnDataset/index.ts b/packages/sanity/src/core/studio/addOnDataset/index.ts new file mode 100644 index 000000000000..5a774a6b36e2 --- /dev/null +++ b/packages/sanity/src/core/studio/addOnDataset/index.ts @@ -0,0 +1 @@ +export * from './setup' diff --git a/packages/sanity/src/core/studio/commentsSetup/CommentsSetupContext.ts b/packages/sanity/src/core/studio/addOnDataset/setup/CommentsSetupContext.ts similarity index 100% rename from packages/sanity/src/core/studio/commentsSetup/CommentsSetupContext.ts rename to packages/sanity/src/core/studio/addOnDataset/setup/CommentsSetupContext.ts diff --git a/packages/sanity/src/core/studio/commentsSetup/CommentsSetupProvider.tsx b/packages/sanity/src/core/studio/addOnDataset/setup/CommentsSetupProvider.tsx similarity index 94% rename from packages/sanity/src/core/studio/commentsSetup/CommentsSetupProvider.tsx rename to packages/sanity/src/core/studio/addOnDataset/setup/CommentsSetupProvider.tsx index c6182d14cfdb..8150987ca974 100644 --- a/packages/sanity/src/core/studio/commentsSetup/CommentsSetupProvider.tsx +++ b/packages/sanity/src/core/studio/addOnDataset/setup/CommentsSetupProvider.tsx @@ -1,9 +1,9 @@ import {type SanityClient} from '@sanity/client' import {useCallback, useEffect, useMemo, useState} from 'react' -import {useClient} from '../../hooks' -import {DEFAULT_STUDIO_CLIENT_OPTIONS} from '../../studioClient' -import {useWorkspace} from '../workspace' +import {useClient} from '../../../hooks' +import {DEFAULT_STUDIO_CLIENT_OPTIONS} from '../../../studioClient' +import {useWorkspace} from '../../workspace' import {CommentsSetupContext} from './CommentsSetupContext' import {type CommentsSetupContextValue} from './types' @@ -14,7 +14,7 @@ interface CommentsSetupProviderProps { } /** - * This providers sets the addon dataset client, currently called `comments` dataset. + * This provider sets the addon dataset client, currently called `comments` dataset. * It also exposes a `runSetup` function that can be used to create the addon dataset if it does not exist. * @beta * @hidden diff --git a/packages/sanity/src/core/studio/commentsSetup/index.ts b/packages/sanity/src/core/studio/addOnDataset/setup/index.ts similarity index 100% rename from packages/sanity/src/core/studio/commentsSetup/index.ts rename to packages/sanity/src/core/studio/addOnDataset/setup/index.ts diff --git a/packages/sanity/src/core/studio/commentsSetup/types.ts b/packages/sanity/src/core/studio/addOnDataset/setup/types.ts similarity index 100% rename from packages/sanity/src/core/studio/commentsSetup/types.ts rename to packages/sanity/src/core/studio/addOnDataset/setup/types.ts diff --git a/packages/sanity/src/core/studio/commentsSetup/useCommentsSetup.ts b/packages/sanity/src/core/studio/addOnDataset/setup/useCommentsSetup.ts similarity index 100% rename from packages/sanity/src/core/studio/commentsSetup/useCommentsSetup.ts rename to packages/sanity/src/core/studio/addOnDataset/setup/useCommentsSetup.ts diff --git a/packages/sanity/src/core/studio/index.ts b/packages/sanity/src/core/studio/index.ts index 518dde556f71..98275cd5ec12 100644 --- a/packages/sanity/src/core/studio/index.ts +++ b/packages/sanity/src/core/studio/index.ts @@ -1,6 +1,6 @@ export * from './activeWorkspaceMatcher' +export * from './addOnDataset' export * from './colorScheme' -export * from './commentsSetup' export * from './components' export * from './renderStudio' export * from './source' diff --git a/packages/sanity/src/structure/comments/src/hooks/index.ts b/packages/sanity/src/structure/comments/src/hooks/index.ts index 0ae502238c8b..1905fda09fe7 100644 --- a/packages/sanity/src/structure/comments/src/hooks/index.ts +++ b/packages/sanity/src/structure/comments/src/hooks/index.ts @@ -1,4 +1,3 @@ -export * from '../../../../core/studio/commentsSetup/useCommentsSetup' export * from './use-comment-operations' export * from './useComments' export * from './useCommentsEnabled'