// Copyright 2026 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 type { ReactNode } from '@lynx-js/react' import type { CSSProperties } from '@lynx-js/types' // eslint-disable-next-line @typescript-eslint/no-empty-object-type -- expected empty interface export interface LazyComponentRef {} export interface LazyComponentProps { /** * Be used to mark the exposure timing of lazy loading. Please ensure that it is unique throughout the page. * @zh 用于标记懒加载的曝光时机。请确保该标识在整个页面中是唯一的。 * @Android * @iOS */ pid: string /** * Be used to mark the exposure timing of lazy loading. Please ensure that it is unique throughout the page. * @zh 用于标记懒加载的曝光时机。请确保该标识在整个页面中是唯一的。 * @Android * @iOS */ scene: string /** * Estimated height and width need to be set * @zh 需要设置预估的高度和宽度 * @Android * @iOS */ estimatedStyle: CSSProperties /** * To change the viewport size of the target node itself during exposure. >0 means extending the upper boundary of the node, <0 means shrinking the upper boundary of the node. * @zh 来更改目标节点本身在曝光中的视窗大小,>0代表扩展节点上边界,<0代表缩小节点上边界 * @defaultValue 10px * @Android * @iOS */ top?: `${number}px` | `${number}rpx` /** * To change the viewport size of the target node itself during exposure. >0 means extending the lower boundary of the node, <0 means shrinking the lower boundary of the node. * @zh 来更改目标节点本身在曝光中的视窗大小,>0代表扩展节点下边界,<0代表缩小节点下边界 * @defaultValue 10px * @Android * @iOS */ bottom?: `${number}px` | `${number}rpx` /** * To change the viewport size of the target node itself during exposure. >0 means extending the left boundary of the node, <0 means shrinking the left boundary of the node. * @zh 来更改目标节点本身在曝光中的视窗大小,>0代表扩展节点左边界,<0代表缩小节点左边界 * @defaultValue 10px * @Android * @iOS */ left?: `${number}px` | `${number}rpx` /** * To change the viewport size of the target node itself during exposure. >0 means extending the right boundary of the node, <0 means shrinking the right boundary of the node. * @zh 来更改目标节点本身在曝光中的视窗大小,>0代表扩展节点右边界,<0代表缩小节点右边界 * @defaultValue 10px * @Android * @iOS */ right?: `${number}px` | `${number}rpx` /** * Unmount child when dis-exposure to save mem-usage * @zh 当元素不可见时卸载子元素以节省内存使用 * @defaultValue false * @Android * @iOS */ unmountOnExit?: boolean /** * Unload child when dis-exposure to save mem-usage * @zh 当元素不可见时卸载子元素以节省内存使用 * @deprecated Please use unmountOnExit instead. * @defaultValue false * @Android * @iOS */ unloadable?: boolean /** * Children * @zh 子节点 * @Android * @iOS */ children: ReactNode }