circular dependencies refactor (#1863)

* circular dependencies refactor

* clean up
This commit is contained in:
Kurt Hutten
2024-03-22 16:55:30 +11:00
committed by GitHub
parent ccd0c619a6
commit 465d933d53
49 changed files with 283 additions and 258 deletions

View File

@ -1,6 +1,6 @@
import { useEffect } from 'react'
import { useStore } from 'useStore'
import { engineCommandManager } from '../lang/std/engineConnection'
import { engineCommandManager } from 'lib/singletons'
import { useModelingContext } from './useModelingContext'
import { getEventForSelectWithPoint } from 'lib/selections'

View File

@ -1,9 +1,8 @@
import { useLayoutEffect, useEffect, useRef } from 'react'
import { parse } from '../lang/wasm'
import { useStore } from '../useStore'
import { engineCommandManager } from '../lang/std/engineConnection'
import { engineCommandManager, kclManager } from 'lib/singletons'
import { deferExecution } from 'lib/utils'
import { kclManager } from 'lang/KclSingleton'
export function useSetupEngineManager(
streamRef: React.RefObject<HTMLDivElement>,

View File

@ -11,7 +11,7 @@ import {
NetworkHealthState,
useNetworkStatus,
} from 'components/NetworkHealthIndicator'
import { useKclContext } from 'lang/KclSingleton'
import { useKclContext } from 'lang/KclProvider'
import { useStore } from 'useStore'
// This might not be necessary, AnyStateMachine from xstate is working

View File

@ -2,7 +2,7 @@ import {
SetVarNameModal,
createSetVarNameModal,
} from 'components/SetVarNameModal'
import { kclManager } from 'lang/KclSingleton'
import { kclManager } from 'lib/singletons'
import { moveValueIntoNewVariable } from 'lang/modifyAst'
import { isNodeSafeToReplace } from 'lang/queryAst'
import { useEffect, useState } from 'react'