/** * This is a PhET simulation widget. It is used for rendering simulations * from https://phet.colorado.edu/. */ import * as React from "react"; import { PerseusI18nContext } from "../../components/i18n-context"; import type { WidgetProps, Widget } from "../../types"; import type { UnsupportedWidgetPromptJSON } from "../../widget-ai-utils/unsupported-widget"; import type { PerseusPhetSimulationWidgetOptions } from "@khanacademy/perseus-core"; type Props = WidgetProps; type State = { banner: { message: string; kind: "warning" | "critical"; } | null; url: URL | null; isFullScreen: boolean; }; export declare class PhetSimulation extends React.Component implements Widget { static contextType: React.Context; context: React.ContextType; private readonly iframeRef; isWidget: true; state: State; componentDidMount(): Promise; componentDidUpdate(prevProps: any): Promise; private getLocale; getPromptJSON(): UnsupportedWidgetPromptJSON; displayLoadFailure: () => void; updateSimState(urlString: string): Promise; showLocaleWarning(url: URL): Promise; /** * Mobile App Fullscreen Implementation * * The mobile app environment doesn't support the standard browser fullscreen API. * Instead, we implement a "fake" fullscreen mode with the following approach: * * 1. When fullscreen is toggled, we use a fixed position container that covers * almost the entire viewport (appFullScreenWidgetContainer) * 2. We leave space at the bottom for the mobile app's Check Answer bar (66px) * 3. We position a close button in the top-right corner for exiting fullscreen * 4. The iframe container expands to fill the available space * * This differs from the web implementation which uses the browser's * native Fullscreen API via requestFullscreen(). * * Note: Unfortunately, full screen is not supported in iOS mobile web due to * the lack of support for the Fullscreen API. */ toggleFullScreen: () => void; render(): React.ReactNode; } declare const _default: { name: string; displayName: string; widget: typeof PhetSimulation; isLintable: true; }; export default _default;