diff --git a/packages/graphiql-react/src/components/index.ts b/packages/graphiql-react/src/components/index.ts index 15cce57b30d..b161e8b9a2c 100644 --- a/packages/graphiql-react/src/components/index.ts +++ b/packages/graphiql-react/src/components/index.ts @@ -29,12 +29,11 @@ export type { } from './segmented-control'; export { MethodPill } from './method-pill'; export type { MethodPillProps, Operation } from './method-pill'; -export { TopBar, TopBarView } from './top-bar'; -export type { TopBarProps, TopBarViewProps } from './top-bar'; -export { StatusBar, StatusBarView } from './status-bar'; -export type { ConnectionStatus, StatusBarViewProps } from './status-bar'; -export { SidePanel, SidePanelView } from './side-panel'; -export type { SidePanelViewProps } from './side-panel'; +export { TopBar } from './top-bar'; +export type { TopBarProps } from './top-bar'; +export { StatusBar } from './status-bar'; +export type { ConnectionStatus } from './status-bar'; +export { SidePanel } from './side-panel'; export { ActivityRail } from './activity-rail'; export type { ActivityRailProps } from './activity-rail'; export { ResponseHeader } from './response-header'; @@ -44,6 +43,6 @@ export type { ResponseTableViewProps } from './response-table-view'; export { ResponseTreeView } from './response-tree-view'; export type { ResponseTreeViewProps } from './response-tree-view'; export { VarHeadersStrip } from './var-headers-strip'; -export type { VarHeadersStripProps, VarTab } from './var-headers-strip'; +export type { VarHeadersStripProps, VarHeadersTab } from './var-headers-strip'; export { SettingsDialog } from './settings-dialog'; export type { SettingsDialogProps } from './settings-dialog'; diff --git a/packages/graphiql-react/src/components/top-bar/index.tsx b/packages/graphiql-react/src/components/top-bar/index.tsx index 66ce9c81ef3..925ba5aac5f 100644 --- a/packages/graphiql-react/src/components/top-bar/index.tsx +++ b/packages/graphiql-react/src/components/top-bar/index.tsx @@ -11,7 +11,10 @@ import { Tooltip } from '../tooltip'; import { DropdownMenu } from '../dropdown-menu'; import { GraphQLLogoIcon, PlayIcon, ChevronDownIcon } from '../../icons'; import { clsx } from 'clsx'; -import { getRunBlockReason, resolveActiveOperation } from '../../utility'; +import { + getRunBlockReason, + resolveActiveOperation, +} from '../../utility/run-block'; import './index.css'; export type TopBarProps = { diff --git a/packages/graphiql-react/src/components/var-headers-strip/index.tsx b/packages/graphiql-react/src/components/var-headers-strip/index.tsx index d844e53c21a..06ff601d932 100644 --- a/packages/graphiql-react/src/components/var-headers-strip/index.tsx +++ b/packages/graphiql-react/src/components/var-headers-strip/index.tsx @@ -7,9 +7,9 @@ import { useEditorState } from '../../utility/hooks'; import { tryParseJSONC } from '../../utility'; import './index.css'; -export type VarTab = 'variables' | 'headers'; +export type VarHeadersTab = 'variables' | 'headers'; -const VAR_TAB_OPTIONS: { value: VarTab; label: string }[] = [ +const VAR_TAB_OPTIONS: { value: VarHeadersTab; label: string }[] = [ { value: 'variables', label: 'Variables' }, { value: 'headers', label: 'Headers' }, ]; @@ -37,7 +37,7 @@ function useVariablesHint(): string | null { export type VarHeadersStripProps = { /** Which tab is shown initially. @default 'variables' */ - defaultTab?: VarTab; + defaultTab?: VarHeadersTab; /** * Whether the headers tab and editor are available. * When `false`, only the variables editor is shown. @@ -54,7 +54,7 @@ export const VarHeadersStrip: FC = ({ onEditVariables, onEditHeaders, }) => { - const [varTab, setVarTab] = useState( + const [varTab, setVarTab] = useState( headersEditorEnabled ? defaultTab : 'variables', ); const hint = useVariablesHint(); diff --git a/packages/graphiql-react/src/stores/execution.ts b/packages/graphiql-react/src/stores/execution.ts index 31a92f9b6c4..3b0e1efc886 100644 --- a/packages/graphiql-react/src/stores/execution.ts +++ b/packages/graphiql-react/src/stores/execution.ts @@ -17,11 +17,11 @@ import setValue from 'set-value'; import getValue from 'get-value'; import type { StateCreator } from 'zustand'; +import { tryParseJSONC } from '../utility'; import { - tryParseJSONC, getRunBlockReason, resolveActiveOperation, -} from '../utility'; +} from '../utility/run-block'; import { Range } from '../utility/monaco-ssr'; import { STORAGE_KEY } from '../constants'; import type { SlicesWithActions, MonacoEditor } from '../types'; diff --git a/packages/graphiql-react/src/utility/index.ts b/packages/graphiql-react/src/utility/index.ts index d98d977d736..96b6e38edeb 100644 --- a/packages/graphiql-react/src/utility/index.ts +++ b/packages/graphiql-react/src/utility/index.ts @@ -9,11 +9,6 @@ export { debounce } from './debounce'; export { formatJSONC, parseJSONC, tryParseJSONC } from './jsonc'; export { markdown } from './markdown'; export { pick } from './pick'; -export { - getRunBlockReason, - resolveActiveOperation, - MUTATION_REQUIRES_POST_REASON, -} from './run-block'; export { useDragResize } from './resize'; export { typeCategory } from './type-category'; export type { GraphQLTypeCategory } from './type-category';