From c1c5aac44aa398393f7f881c56c84a82453f3aaa Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Tue, 29 Jun 2021 17:09:18 +0200 Subject: [PATCH] Chore: Refactor --- theatre/studio/src/StudioStore/StudioStore.ts | 4 ++-- theatre/studio/src/store/index.ts | 6 +++--- .../src/utils/redux/actionCreator.test.ts | 4 ++-- theatre/{shared => studio}/src/utils/redux/actionCreator.ts | 0 .../src/utils/redux/actionReducersBundle.ts | 0 .../src/utils/redux/atomFromReduxStore.ts | 0 .../{shared => studio}/src/utils/redux/configureStore.ts | 0 .../src/utils/redux/pointerFriendlySelector.ts | 0 .../src/utils/redux/withHistory/withBatchActions.ts | 2 +- .../src/utils/redux/withHistory/withHistory.ts | 2 +- 10 files changed, 9 insertions(+), 9 deletions(-) rename theatre/{shared => studio}/src/utils/redux/actionCreator.test.ts (89%) rename theatre/{shared => studio}/src/utils/redux/actionCreator.ts (100%) rename theatre/{shared => studio}/src/utils/redux/actionReducersBundle.ts (100%) rename theatre/{shared => studio}/src/utils/redux/atomFromReduxStore.ts (100%) rename theatre/{shared => studio}/src/utils/redux/configureStore.ts (100%) rename theatre/{shared => studio}/src/utils/redux/pointerFriendlySelector.ts (100%) rename theatre/{shared => studio}/src/utils/redux/withHistory/withBatchActions.ts (91%) rename theatre/{shared => studio}/src/utils/redux/withHistory/withHistory.ts (99%) diff --git a/theatre/studio/src/StudioStore/StudioStore.ts b/theatre/studio/src/StudioStore/StudioStore.ts index f1b3577..4d6daf6 100644 --- a/theatre/studio/src/StudioStore/StudioStore.ts +++ b/theatre/studio/src/StudioStore/StudioStore.ts @@ -15,8 +15,8 @@ import {defer} from '@theatre/shared/utils/defer' import forEachDeep from '@theatre/shared/utils/forEachDeep' import getDeep from '@theatre/shared/utils/getDeep' import type {SequenceTrackId} from '@theatre/shared/utils/ids' -import atomFromReduxStore from '@theatre/shared/utils/redux/atomFromReduxStore' -import configureStore from '@theatre/shared/utils/redux/configureStore' +import atomFromReduxStore from '@theatre/studio/utils/redux/atomFromReduxStore' +import configureStore from '@theatre/studio/utils/redux/configureStore' import type {$FixMe, $IntentionalAny, VoidFn} from '@theatre/shared/utils/types' import type {Atom, Pointer} from '@theatre/dataverse' import {getPointerParts, val} from '@theatre/dataverse' diff --git a/theatre/studio/src/store/index.ts b/theatre/studio/src/store/index.ts index 3070e1c..f125d59 100644 --- a/theatre/studio/src/store/index.ts +++ b/theatre/studio/src/store/index.ts @@ -1,10 +1,10 @@ import type {StudioState} from '@theatre/studio/store/types' -import actionCreator from '@theatre/shared/utils/redux/actionCreator' -import type {IWithHistory} from '@theatre/shared/utils/redux/withHistory/withHistory' +import actionCreator from '@theatre/studio/utils/redux/actionCreator' +import type {IWithHistory} from '@theatre/studio/utils/redux/withHistory/withHistory' import { historicActions, withHistory, -} from '@theatre/shared/utils/redux/withHistory/withHistory' +} from '@theatre/studio/utils/redux/withHistory/withHistory' import type {ReduxReducer} from '@theatre/shared/utils/types' import logger from '@theatre/shared/logger' diff --git a/theatre/shared/src/utils/redux/actionCreator.test.ts b/theatre/studio/src/utils/redux/actionCreator.test.ts similarity index 89% rename from theatre/shared/src/utils/redux/actionCreator.test.ts rename to theatre/studio/src/utils/redux/actionCreator.test.ts index 5d74f08..9967291 100644 --- a/theatre/shared/src/utils/redux/actionCreator.test.ts +++ b/theatre/studio/src/utils/redux/actionCreator.test.ts @@ -1,6 +1,6 @@ -import actionCreator from '@theatre/shared/utils/redux/actionCreator' +import actionCreator from '@theatre/studio/utils/redux/actionCreator' -describe('@theatre/shared/utils/redux/actionCreator()', () => { +describe('@theatre/studio/utils/redux/actionCreator()', () => { const actionType = 'Bootstrap' const payload = {a: 1, b: 2} let creator = actionCreator(actionType) diff --git a/theatre/shared/src/utils/redux/actionCreator.ts b/theatre/studio/src/utils/redux/actionCreator.ts similarity index 100% rename from theatre/shared/src/utils/redux/actionCreator.ts rename to theatre/studio/src/utils/redux/actionCreator.ts diff --git a/theatre/shared/src/utils/redux/actionReducersBundle.ts b/theatre/studio/src/utils/redux/actionReducersBundle.ts similarity index 100% rename from theatre/shared/src/utils/redux/actionReducersBundle.ts rename to theatre/studio/src/utils/redux/actionReducersBundle.ts diff --git a/theatre/shared/src/utils/redux/atomFromReduxStore.ts b/theatre/studio/src/utils/redux/atomFromReduxStore.ts similarity index 100% rename from theatre/shared/src/utils/redux/atomFromReduxStore.ts rename to theatre/studio/src/utils/redux/atomFromReduxStore.ts diff --git a/theatre/shared/src/utils/redux/configureStore.ts b/theatre/studio/src/utils/redux/configureStore.ts similarity index 100% rename from theatre/shared/src/utils/redux/configureStore.ts rename to theatre/studio/src/utils/redux/configureStore.ts diff --git a/theatre/shared/src/utils/redux/pointerFriendlySelector.ts b/theatre/studio/src/utils/redux/pointerFriendlySelector.ts similarity index 100% rename from theatre/shared/src/utils/redux/pointerFriendlySelector.ts rename to theatre/studio/src/utils/redux/pointerFriendlySelector.ts diff --git a/theatre/shared/src/utils/redux/withHistory/withBatchActions.ts b/theatre/studio/src/utils/redux/withHistory/withBatchActions.ts similarity index 91% rename from theatre/shared/src/utils/redux/withHistory/withBatchActions.ts rename to theatre/studio/src/utils/redux/withHistory/withBatchActions.ts index 7a4950b..bc36016 100644 --- a/theatre/shared/src/utils/redux/withHistory/withBatchActions.ts +++ b/theatre/studio/src/utils/redux/withHistory/withBatchActions.ts @@ -1,4 +1,4 @@ -import actionCreator from '@theatre/shared/utils/redux/actionCreator' +import actionCreator from '@theatre/studio/utils/redux/actionCreator' import type { $FixMe, GenericAction, diff --git a/theatre/shared/src/utils/redux/withHistory/withHistory.ts b/theatre/studio/src/utils/redux/withHistory/withHistory.ts similarity index 99% rename from theatre/shared/src/utils/redux/withHistory/withHistory.ts rename to theatre/studio/src/utils/redux/withHistory/withHistory.ts index 890201b..211e52a 100644 --- a/theatre/shared/src/utils/redux/withHistory/withHistory.ts +++ b/theatre/studio/src/utils/redux/withHistory/withHistory.ts @@ -1,4 +1,4 @@ -import actionCreator from '@theatre/shared/utils/redux/actionCreator' +import actionCreator from '@theatre/studio/utils/redux/actionCreator' import type { $FixMe, $IntentionalAny,