import { EventBridgeContextValue } from '@plitzi/sdk-event-bridge'; import { AnalyticsConfig, Theme, Environment, OfflineDataRaw, RenderMode, Server, RuntimeStateInstance } from '@plitzi/sdk-shared'; import { ThemeScope } from '@plitzi/sdk-shared/theme'; import { ReactNode } from 'react'; export type AppProps = { className?: string; children?: ReactNode; revision?: number; webKey?: string; environment?: Environment; currentPageId?: string; server?: Partial; offlineMode?: boolean; offlineData?: OfflineDataRaw; offlineDataType?: 'json' | 'yaml'; renderMode?: RenderMode; /** * Whether this space owns the browser's address bar. * * `browser` is right for a space that IS the page — it is the site, so its pages are the window's URLs. `memory` * is for a space EMBEDDED in an application that has a router of its own: the desktop app, a component mounted * in a host. Without it the space's own navigation rewrites the host's location — the desktop window went from * `#/spaces/view/my-space` to `/tasks#/spaces` on the first link followed inside a space, and a reload then * landed on the shell's index with the space gone. */ routing?: 'browser' | 'memory'; debugMode?: boolean; isHydrating?: boolean; previewMode?: boolean; /** Set by the server that metered this render: the account behind this space is over its quota, so the page says * so. Never authored — a space cannot turn it off from its own settings. */ overQuota?: boolean; externalStyle?: string; /** Reporting channel for this render — see {@link AnalyticsConfig}. Absent means report nothing. */ analytics?: AnalyticsConfig; /** * Whose theme this space follows and repaints. * * `document` — the default — is a space that IS the page. `container` is a space EMBEDDED in an application with * a theme of its own (the desktop window, a component mounted in a host): it wears the class on its own root and * keeps a theme store of its own, so toggling it never reaches the application around it, and two spaces in one * document do not answer for each other. * * Left out, it is `container` for a space drawn inside another (the `plitziSdk` element, a plugin rendering one) and * `document` otherwise. */ themeScope?: ThemeScope; /** The theme the host already settled — from the cookie a server read before it rendered the document. */ theme?: Theme; state?: Record; /** * The feature flags this embedding decides, by name: `{ newCheckout: true }`. Above whatever the space and the server * rendering it say, below a tester with the dev tools. Only for flags the space declares — anything else is ignored, * with a warning in the console. */ flags?: Record; /** Set by the server that rendered this page: the flags its deployment decides (`createServer({ flags })`). */ serverFlags?: Record; /** * Set by the server that rendered this page for somebody allowed to debug it: the flags a tester forced, read from * the cookie the dev tools write — so the page hydrates drawn the way the server drew it. */ forcedFlags?: Record; onInitStateManager?: (instance: RuntimeStateInstance) => void; onInitEventBridge?: (instance: EventBridgeContextValue) => void; }; declare const App: ({ className: classNameProp, children, webKey, server, renderMode: renderModeProp, routing, debugMode: debugModeProp, themeScope: themeScopeProp, theme, state, forcedFlags, ...sdkProps }: AppProps) => import('react').JSX.Element; export default App;