From 4ac12abb58e6353efd5fd13a66ba1744379803c3 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Fri, 2 Jul 2021 11:44:07 +0200 Subject: [PATCH] Chore: Moved propTypes to @theatre/core --- theatre/core/src/coreExports.ts | 2 +- theatre/{shared => core}/src/propTypes/index.ts | 0 theatre/core/src/sheetObjects/TheatreSheetObject.ts | 2 +- theatre/core/src/sheetObjects/getPropDefaultsOfSheetObject.ts | 2 +- theatre/core/src/sheets/TheatreSheet.ts | 2 +- theatre/shared/src/propTypes/utils.ts | 2 +- theatre/shared/src/testUtils.ts | 2 +- .../ObjectEditorPanel/propEditors/CompoundPropEditor.tsx | 4 ++-- .../ObjectEditorPanel/propEditors/DeterminePropEditor.tsx | 2 +- .../panels/ObjectEditorPanel/propEditors/NumberPropEditor.tsx | 2 +- theatre/studio/src/panels/SequenceEditorPanel/layout/tree.ts | 4 ++-- 11 files changed, 12 insertions(+), 12 deletions(-) rename theatre/{shared => core}/src/propTypes/index.ts (100%) diff --git a/theatre/core/src/coreExports.ts b/theatre/core/src/coreExports.ts index 0e6592a..08ccd4d 100644 --- a/theatre/core/src/coreExports.ts +++ b/theatre/core/src/coreExports.ts @@ -6,7 +6,7 @@ import type { } from '@theatre/core/projects/TheatreProject' import TheatreProject from '@theatre/core/projects/TheatreProject' import globals from '@theatre/shared/globals' -import * as types from '@theatre/shared/propTypes' +import * as types from '@theatre/core/propTypes' import {InvalidArgumentError} from '@theatre/shared/utils/errors' import {validateName} from '@theatre/shared/utils/sanitizers' import userReadableTypeOfValue from '@theatre/shared/utils/userReadableTypeOfValue' diff --git a/theatre/shared/src/propTypes/index.ts b/theatre/core/src/propTypes/index.ts similarity index 100% rename from theatre/shared/src/propTypes/index.ts rename to theatre/core/src/propTypes/index.ts diff --git a/theatre/core/src/sheetObjects/TheatreSheetObject.ts b/theatre/core/src/sheetObjects/TheatreSheetObject.ts index 76e30b2..76c788b 100644 --- a/theatre/core/src/sheetObjects/TheatreSheetObject.ts +++ b/theatre/core/src/sheetObjects/TheatreSheetObject.ts @@ -12,7 +12,7 @@ import type { } from '@theatre/shared/utils/types' import type {IDerivation, Pointer} from '@theatre/dataverse' import {prism, val} from '@theatre/dataverse' -import type {PropTypeConfig_Compound} from '@theatre/shared/propTypes' +import type {PropTypeConfig_Compound} from '@theatre/core/propTypes' import type SheetObject from './SheetObject' export interface ISheetObject< diff --git a/theatre/core/src/sheetObjects/getPropDefaultsOfSheetObject.ts b/theatre/core/src/sheetObjects/getPropDefaultsOfSheetObject.ts index 254c2e6..3b7163b 100644 --- a/theatre/core/src/sheetObjects/getPropDefaultsOfSheetObject.ts +++ b/theatre/core/src/sheetObjects/getPropDefaultsOfSheetObject.ts @@ -9,7 +9,7 @@ import type { PropTypeConfig, PropTypeConfig_Compound, PropTypeConfig_Enum, -} from '@theatre/shared/propTypes' +} from '@theatre/core/propTypes' const cachedDefaults = new WeakMap() diff --git a/theatre/core/src/sheets/TheatreSheet.ts b/theatre/core/src/sheets/TheatreSheet.ts index 4608276..117079d 100644 --- a/theatre/core/src/sheets/TheatreSheet.ts +++ b/theatre/core/src/sheets/TheatreSheet.ts @@ -2,7 +2,7 @@ import {privateAPI, setPrivateAPI} from '@theatre/core/privateAPIs' import type {IProject} from '@theatre/core/projects/TheatreProject' import type TheatreSequence from '@theatre/core/sequences/TheatreSequence' import type {ISequence} from '@theatre/core/sequences/TheatreSequence' -import type {PropTypeConfig_Compound} from '@theatre/shared/propTypes' +import type {PropTypeConfig_Compound} from '@theatre/core/propTypes' import type {ISheetObject} from '@theatre/core/sheetObjects/TheatreSheetObject' import type Sheet from '@theatre/core/sheets/Sheet' import type {SheetAddress} from '@theatre/shared/utils/addresses' diff --git a/theatre/shared/src/propTypes/utils.ts b/theatre/shared/src/propTypes/utils.ts index b009703..ac7a0e7 100644 --- a/theatre/shared/src/propTypes/utils.ts +++ b/theatre/shared/src/propTypes/utils.ts @@ -1,4 +1,4 @@ -import type {PropTypeConfig} from '@theatre/shared/propTypes' +import type {PropTypeConfig} from '@theatre/core/propTypes' export function isPropConfigComposite(c: PropTypeConfig): boolean { return c.type === 'compound' || c.type === 'enum' diff --git a/theatre/shared/src/testUtils.ts b/theatre/shared/src/testUtils.ts index 1a5a663..9bb7e32 100644 --- a/theatre/shared/src/testUtils.ts +++ b/theatre/shared/src/testUtils.ts @@ -4,7 +4,7 @@ import {getProject} from '@theatre/core' import {privateAPI} from '@theatre/core/privateAPIs' import type {ProjectState_Historic} from '@theatre/core/projects/store/storeTypes' import type {SheetState_Historic} from '@theatre/core/projects/store/types/SheetState_Historic' -import * as t from '@theatre/shared/propTypes' +import * as t from '@theatre/core/propTypes' import getStudio from '@theatre/studio/getStudio' import coreTicker from '@theatre/core/coreTicker' import globals from './globals' diff --git a/theatre/studio/src/panels/ObjectEditorPanel/propEditors/CompoundPropEditor.tsx b/theatre/studio/src/panels/ObjectEditorPanel/propEditors/CompoundPropEditor.tsx index 91e65a1..17869ab 100644 --- a/theatre/studio/src/panels/ObjectEditorPanel/propEditors/CompoundPropEditor.tsx +++ b/theatre/studio/src/panels/ObjectEditorPanel/propEditors/CompoundPropEditor.tsx @@ -1,5 +1,5 @@ -import type {PropTypeConfig_Compound} from '@theatre/shared/propTypes' -import {isPropConfigComposite} from '@theatre/shared/propTypes/utils' +import type {PropTypeConfig_Compound} from '@theatre/core/propTypes' +import {isPropConfigComposite} from '@theatre/shared/src/propTypes/utils' import type SheetObject from '@theatre/core/sheetObjects/SheetObject' import {theme} from '@theatre/studio/css' import {voidFn} from '@theatre/shared/utils' diff --git a/theatre/studio/src/panels/ObjectEditorPanel/propEditors/DeterminePropEditor.tsx b/theatre/studio/src/panels/ObjectEditorPanel/propEditors/DeterminePropEditor.tsx index b76eae6..e0a4916 100644 --- a/theatre/studio/src/panels/ObjectEditorPanel/propEditors/DeterminePropEditor.tsx +++ b/theatre/studio/src/panels/ObjectEditorPanel/propEditors/DeterminePropEditor.tsx @@ -1,4 +1,4 @@ -import type {PropTypeConfig} from '@theatre/shared/propTypes' +import type {PropTypeConfig} from '@theatre/core/propTypes' import type SheetObject from '@theatre/core/sheetObjects/SheetObject' import {getPointerParts} from '@theatre/dataverse' import React from 'react' diff --git a/theatre/studio/src/panels/ObjectEditorPanel/propEditors/NumberPropEditor.tsx b/theatre/studio/src/panels/ObjectEditorPanel/propEditors/NumberPropEditor.tsx index 13e3a94..5ed05cc 100644 --- a/theatre/studio/src/panels/ObjectEditorPanel/propEditors/NumberPropEditor.tsx +++ b/theatre/studio/src/panels/ObjectEditorPanel/propEditors/NumberPropEditor.tsx @@ -1,4 +1,4 @@ -import type {PropTypeConfig_Number} from '@theatre/shared/propTypes' +import type {PropTypeConfig_Number} from '@theatre/core/propTypes' import type SheetObject from '@theatre/core/sheetObjects/SheetObject' import BasicNumberEditor from '@theatre/studio/uiComponents/BasicNumberEditor' import useContextMenu from '@theatre/studio/uiComponents/simpleContextMenu/useContextMenu' diff --git a/theatre/studio/src/panels/SequenceEditorPanel/layout/tree.ts b/theatre/studio/src/panels/SequenceEditorPanel/layout/tree.ts index 8524a5a..52705cc 100644 --- a/theatre/studio/src/panels/SequenceEditorPanel/layout/tree.ts +++ b/theatre/studio/src/panels/SequenceEditorPanel/layout/tree.ts @@ -3,8 +3,8 @@ import type { PropTypeConfig, PropTypeConfig_AllPrimitives, PropTypeConfig_Compound, -} from '@theatre/shared/propTypes' -import {isPropConfigComposite} from '@theatre/shared/propTypes/utils' +} from '@theatre/core/propTypes' +import {isPropConfigComposite} from '@theatre/shared/src/propTypes/utils' import type SheetObject from '@theatre/core/sheetObjects/SheetObject' import type {IPropPathToTrackIdTree} from '@theatre/core/sheetObjects/SheetObjectTemplate' import type Sheet from '@theatre/core/sheets/Sheet'