Remove the accidental dependency between studio and core

This commit is contained in:
Aria Minaei 2023-03-08 12:22:35 +01:00
parent 1bb80991c9
commit 9c16083597
2 changed files with 2 additions and 4 deletions

View file

@ -19,12 +19,11 @@ import type {
import type SheetObject from '@theatre/core/sheetObjects/SheetObject'
import type {ObjectAddressKey} from '@theatre/shared/utils/ids'
import {notify} from '@theatre/shared/notify'
import type {IStudio} from '@theatre/studio'
export type SheetObjectPropTypeConfig =
PropTypeConfig_Compound<UnknownValidCompoundProps>
export type SheetObjectAction = (object: ISheetObject, studio: IStudio) => void
export type SheetObjectAction = (object: ISheetObject) => void
export type SheetObjectActionsConfig = Record<string, SheetObjectAction>

View file

@ -5,7 +5,6 @@ import type {$FixMe} from '@theatre/shared/utils/types'
import DeterminePropEditorForDetail from './DeterminePropEditorForDetail'
import {useVal} from '@theatre/react'
import uniqueKeyForAnyObject from '@theatre/shared/utils/uniqueKeyForAnyObject'
import getStudio from '@theatre/studio/getStudio'
import styled from 'styled-components'
const ActionButtonContainer = styled.div`
@ -63,7 +62,7 @@ const ObjectDetails: React.FC<{
<ActionButton
key={actionName}
onClick={() => {
action(obj.publicApi, getStudio().publicApi)
action(obj.publicApi)
}}
>
{actionName}