Files
TERES_web_frontend/packages/iframe-bridge/src/index.ts

42 lines
999 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 入口文件:仅聚合与导出 API不承载具体逻辑
export type { HostApi, ChildApi } from './types';
export { isEmbedded, toHostPath, toChildPath } from './path';
export {
getClientHostApi,
clientNavigate,
clientClose,
clientReady,
initChildBridge,
} from './client';
export { createPenpalHostBridge } from './host';
// 默认导出一个聚合对象:
// - 兼容某些只识别 default 的打包方案或联邦场景
// - 同时保留命名导出,建议优先使用命名导出
import { isEmbedded, toHostPath, toChildPath } from './path';
import {
getClientHostApi,
clientNavigate,
clientClose,
clientReady,
initChildBridge,
} from './client';
import { createPenpalHostBridge } from './host';
/**
* 默认聚合导出对象:包含全部对外 API。
*/
const bridge = {
isEmbedded,
toHostPath,
toChildPath,
getClientHostApi,
clientNavigate,
clientClose,
clientReady,
createPenpalHostBridge,
initChildBridge,
};
export default bridge;