@atlaskit/editor-plugin-media
Version:
Media plugin for @atlaskit/editor-core
26 lines (25 loc) • 1.13 kB
TypeScript
/**
* @jsxRuntime classic
* @jsx jsx
*/
import React from 'react';
type GeneratedMediaRevealProps = {
children: React.ReactNode;
isEnabled: boolean;
/** The node is held closed until this is true, so the wait happens before the document moves. */
isReady: boolean;
/**
* Identity of the media being revealed. Changing it restarts the reveal, so media replaced
* in place waits for its own preview instead of inheriting the previous file's open state.
*/
mediaKey?: string;
};
/**
* Opens the document out to make room for a media node once its preview is ready, rather than
* having the node snap into place at full height. For AI-generated media in the Create with
* Rovo preview, where images are inserted after the surrounding content has streamed in:
* holding the node closed until the preview has rendered means the space opens exactly once,
* with the image already fading in, so there is no placeholder to look at in between.
*/
export declare const GeneratedMediaReveal: ({ children, isEnabled, isReady, mediaKey, }: GeneratedMediaRevealProps) => React.JSX.Element;
export {};