diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 0a2d2edefc144f1b7b2311cef3f31a8004bc8bcb..85cd6b0772a83198876c471320e3dad3e39b7887 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -18199,6 +18199,68 @@ declare interface MenuMaskType { backgroundBlurStyle?: BlurStyle; } +/** + * Defines the scaling mode for custom preview of contextMenu. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare enum PreviewScaleMode { + /** + * Automatically resize preview based on the layout area. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + AUTO = 0, + + /** + * Maintain original size of preview content without scaling. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CONSTANT = 1, + + /** + * Maintain aspect ratio to scale preview. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + MAINTAIN = 2, +} + +/** + * Defines the available layout area. + * + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +declare enum AvailableLayoutArea { + /** + * Size of safe area. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + SAFE_AREA = 0, +} + /** * Defines the context menu options. * @@ -18710,6 +18772,29 @@ declare interface ContextMenuOptions { * @since 20 */ onWillDisappear?: Callback; + + /** + * Defines the scaling mode for custom preview of contextMenu. + * + * @type { ?PreviewScaleMode } + * @default PreviewScaleMode.AUTO + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + previewScaleMode?: PreviewScaleMode; + + /** + * Defines the available layout area of preview. + * + * @type { ?AvailableLayoutArea } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + availableLayoutArea?: AvailableLayoutArea; } /**