Skip to content

The open-source full-stack studio for Opus 5.5 motion video. Reverse engineering for any video. Code video with HTML: recreate, edit and render. BYOA + BYOK · Motion.md · Images, Video, Music & Voice.

1008 B
Raw Blame
import { createContext, useContext, type ReactNode, type ComponentType } from 'react';

/** Product chrome only. Editing, panel state and rendering stay owned by Studio. */
export interface StudioHost {
  /** Restrict editor entry points without removing authoring or Agent capabilities. */
  mvpEditor?: boolean;
  brand?: ReactNode;
  projectLabel?: ReactNode;
  headerActions?: ReactNode;
  communityAction?: ReactNode;
  previewAction?: ReactNode;
  historyActions?: ReactNode;
  windowMenu?: ReactNode;
  languageMenu?: ReactNode;
  panels?: ReactNode;
  AppFrame?: ComponentType<{ children: ReactNode }>;
  EditorFrame?: ComponentType<{ children: ReactNode }>;
  HeaderFrame?: ComponentType<{ children: ReactNode }>;
  desktopLink?: boolean;
  feedback?: boolean;
  themeToggle?: boolean;
}

export const StudioHostContext = createContext<StudioHost | null>(null);
export const useStudioHost = () => useContext(StudioHostContext);
export const useMvpEditor = () => useStudioHost()?.mvpEditor === true;