import PropTypes from 'prop-types' ; import { Document } from '@model/document' ; import { Toolbar } from './Toolbar' ; import { Images } from '@core/Images' ; export const OpsPropType = PropTypes . arrayOf ( PropTypes . object ) ; const documentShape = { ops : OpsPropType , currentSelection : PropTypes . object , selectedTextAttributes : PropTypes . object , lastDiff : OpsPropType , schemaVersion : PropTypes . number , } ; const controlSpecsShape = { IconComponent : PropTypes . func . isRequired , actionType : PropTypes . oneOfType ( [ PropTypes . number , PropTypes . string , PropTypes . symbol ] ) . isRequired , iconProps : PropTypes . object , actionOptions : PropTypes . any , } ; export const DocumentPropType = PropTypes . shape ( documentShape ) ; export const ToolbarLayoutPropType = PropTypes . arrayOf ( PropTypes . oneOfType ( [ PropTypes . symbol , PropTypes . shape ( controlSpecsShape ) ] ) ) ; const imagesHookShape = { onImageAddedEvent : PropTypes . func , onImageRemovedEvent : PropTypes . func , } ; export const ImageHooksType = PropTypes . shape ( imagesHookShape ) ; export const TextTransformSpecsType = PropTypes . arrayOf ( PropTypes . object ) ;