// Copyright 2024 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. // import { Suspense, createElement, lazy } from 'preact/compat'; // import type { FC } from 'react'; import './runtime-marker.js'; import './native/index.js'; // import { factory as factory2 } from '../compat/componentIs.js'; // import { useMemo } from '../core/hooks/react.js'; import { __root } from './runtime/page/root-instance.js'; /** * @internal kept only to fail fast when stale internal imports leak into the * Element Template alias surface. This is not a supported ET runtime API. */ export class SnapshotInstance { constructor(public type: string) { throw new Error('SnapshotInstance should not be instantiated when using Element Template.'); } } export { __root }; export { options, // Component is not an internal API, but refresh needs it from 'react/internal' Component, process, } from 'preact'; export type { Options } from 'preact'; export { loadDynamicJS, __dynamicImport } from '../core/lynx/dynamic-import.js'; // Re-exported so lazy bundle shells can reach the host runtime APIs // via `target[sExportsReactInternal]`. export { registerRuntimeVersion, getRuntimeVersion } from '../core/lynx/runtime-version.js'; export { RUNTIME_BACKEND_ELEMENT_TEMPLATE, RUNTIME_BACKEND_SNAPSHOT, registerRuntimeBackend, } from '../core/lynx/runtime-backend.js'; export { withInitDataInState } from '../core/initData.js'; export { wrapWithLynxComponent } from '../core/compat/lynxComponent.js'; /** * @internal a polyfill for */ // export const __ComponentIsPolyfill: FC<{ is: string }> = /* @__PURE__ */ factory2( // // eslint-disable-next-line @typescript-eslint/no-unsafe-argument // { Suspense, lazy, createElement, useMemo } as any, // loadLazyBundle, // ); export { loadLazyBundle } from '../core/lynx/lazy-bundle.js'; export { transformToWorklet } from './runtime/template/main-thread-background-function.js'; export { captureMainThreadObject } from '../core/capture-main-thread-object.js'; export function registerWorkletOnBackground( _type: string, _hash: string, _fn: (...args: unknown[]) => unknown, ): void {} export { __etAttrPlanMap, adaptEventAttrSlot, adaptMTEventAttrSlot, adaptMTRefAttrSlot, adaptRefAttrSlot, adaptSpreadAttrSlot, } from './runtime/template/attr-slot-plan.js'; export { __ElementTemplatePage } from './runtime/page/authored-page.js'; export { __etHost } from './runtime/render/host.js';