diff --git a/api/@internal/component/ets/common.d.ts b/api/@internal/component/ets/common.d.ts index 32dc67c74ff03365f1242b922a6ca52eb52158fe..639b341b26dd5ece29c920319df246905e4b2440 100644 --- a/api/@internal/component/ets/common.d.ts +++ b/api/@internal/component/ets/common.d.ts @@ -18,26 +18,6 @@ * @kit ArkUI */ -/** - * The type for SpringLoadingContext, see the detailed description in dragController. - * - * @typedef {import('../api/@ohos.arkui.dragController').default.SpringLoadingContext} SpringLoadingContext - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -declare type SpringLoadingContext = import('../api/@ohos.arkui.dragController').default.SpringLoadingContext; - -/** - * The type for DragSpringLoadingConfiguration, see the detailed description in dragController. - * - * @typedef {import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration} DragSpringLoadingConfiguration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ -declare type DragSpringLoadingConfiguration = import('../api/@ohos.arkui.dragController').default.DragSpringLoadingConfiguration; - /** * Defines the options of Component ClassDecorator. * @@ -13788,26 +13768,7 @@ declare interface DragEvent { * @since 15 */ startDataLoading(options: DataSyncOptions): string; - - /** - * Retrieve the bundle information of the drag source application. - * - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - getDragSource(): string; - - /** - * Call this method to determine whether the current drag operation is a cross-device drag. - * - * @returns { boolean } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - isRemote(): boolean; + /** * Get the id of display which the drag event is occuring on. @@ -14921,18 +14882,6 @@ declare interface SheetOptions extends BindOptions { */ dragBar?: boolean; - /** - * Defines whether the sheet dragbar is floating, when it's displayed. - * - * @type { ?boolean } - * @default false - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - enableFloatingDragBar?: boolean; - /** * Mask color of the sheet. * @@ -19745,26 +19694,26 @@ declare interface DragInteractionOptions { defaultAnimationBeforeLifting?: boolean; /** - * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. + * Define whether to enable the haptic feedback when dragging, the default value is false. * * @type { ?boolean } - * @default true + * @default false * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ - enableEdgeAutoScroll?: boolean; + enableHapticFeedback?: boolean; /** - * Define whether to enable the haptic feedback when dragging, the default value is false. + * Config if auto scrolling should be triggered when the drag hovered on a scrollable controller's edge. * * @type { ?boolean } - * @default false + * @default true * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ - enableHapticFeedback?: boolean; + enableEdgeAutoScroll?: boolean; /** * Define whether to lifting trigger drag by finger. @@ -19975,17 +19924,6 @@ declare type Optional = T | undefined; */ declare type TipsMessageType = ResourceStr | StyledString; -/** - * Import the Matrix4Transit type object for common method. - * - * @typedef { import('../api/@ohos.matrix4').default.Matrix4Transit } Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare type Matrix4Transit = import('../api/@ohos.matrix4').default.Matrix4Transit; - /** * Define the options for background image. * @@ -20779,19 +20717,6 @@ declare class CommonMethod { */ backgroundColor(color: Optional): T; - /** - * Background color - * - * @param { Optional } color - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - */ - backgroundColor(color: Optional): T; - /** * Sets the pixel rounding policy for the current component in the specified direction. *
If a direction is not set, the pixels are rounded to the nearest whole number in that direction. @@ -21070,8 +20995,6 @@ declare class CommonMethod { * @param { Optional } options - Background effect, including saturation, * brightness, and color. *
If **options** is **undefined**, the background reverts to its default state with no effect. - * @param { SystemAdaptiveOptions } [ sysOptions ] - System adaptive adjustment options. - *
Default value: **{ disableSystemAdaptation: false }**. * @returns { T } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform @@ -23968,19 +23891,6 @@ declare class CommonMethod { */ transform(transform: Optional): T; - /** - * Sets the transformation matrix for the current component. - * The interface can display the effect of three-dimensional matrix transformation. - * - * @param { Optional } transform - transform3D matrix - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - transform3D(transform: Optional): T; - /** * This callback is triggered when a component mounts a display. * @@ -25291,7 +25201,7 @@ declare class CommonMethod { */ overlay(value: string | CustomBuilder | ComponentContent, options?: OverlayOptions): T; - /** + /** * Config toolbar for current component. * * @param { CustomBuilder } value @@ -26606,7 +26516,6 @@ declare class CommonMethod { */ onVisibleAreaChange(ratios: Array, event: VisibleAreaChangeCallback): T; - /** * Set or reset the callback which is triggered when the visibleArea of component changed. * The interval between two visible area change callbacks will not be less than the expected update interval. @@ -27444,36 +27353,6 @@ declare class CommonMethod { * @since 19 */ accessibilityFocusDrawLevel(drawLevel: FocusDrawLevel): T; - - /** - * Enables the component as a drag-and-drop target with spring loading functionality. - * - * When a dragged object hovers over the target, it triggers a callback notification. Spring Loading is an enhanced - * feature for drag-and-drop operations, allowing users to automatically trigger view transitions during dragging - * by hovering (hover) without needing to use another hand. - * This feature is primarily designed to enhance the smoothness and efficiency of drag-and-drop operations. Below are - * some common scenarios suitable for supporting this feature: - * - In a file manager, when dragging a file and hovering over a folder, the folder is automatically opened. - * - On a desktop launcher, when dragging a file and hovering over an application icon, the application is - * automatically opened. - * - * Please note: - * 1. Registering spring-loaded or drag-and-drop events (onDragEnter/Move/Leave/Drop) on a control makes it a - * drag-and-drop target. Only one target can be the responder at the same time when user drags and hovers on, and - * child controls always have higher priority. - * 2. Once a complete spring loading is triggered on a component, new spring loading detection will only occur after the - * dragged object leaves and re-enters the component's range. - * - * @param { Callback | null } callback Registers the callback for spring loading response, or - * sets it to null to reset the component's support for spring loading. - * @param { dragController.DragSpringLoadingConfiguration } configuration The initialized spring loading configuration which is - * only used when the entire spring detecting. - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - onDragSpringLoading(callback: Callback | null, configuration?: DragSpringLoadingConfiguration): T; } /** @@ -32131,7 +32010,7 @@ declare enum KeyboardAvoidMode { * @since 14 */ declare enum HoverModeAreaType { - + /** * Layout top half screen when the phone in hover mode. * @@ -32141,7 +32020,7 @@ declare enum HoverModeAreaType { * @since 14 */ TOP_SCREEN = 0, - + /** * Layout bottom half screen when the phone in hover mode. * diff --git a/api/@internal/component/ets/gesture.d.ts b/api/@internal/component/ets/gesture.d.ts index 83650a1759b05c3a53b60af3446ae07d8b886f00..c9aa9d6019903de64d9d21d473a884cd07229cb1 100644 --- a/api/@internal/component/ets/gesture.d.ts +++ b/api/@internal/component/ets/gesture.d.ts @@ -4326,36 +4326,6 @@ declare class EventTargetInfo { getId(): string; } -/** - * Defines the touch recognizer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ -declare class TouchRecognizer { - /** - * Returns the event target information of the component. - * - * @returns { EventTargetInfo } - the event target information of the component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - getEventTargetInfo(): EventTargetInfo; - /** - * Dispatch touch cancel to the touch recognizer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - cancelTouch(): void; -} - /** * Defines the gesture recognizer. * diff --git a/api/@ohos.arkui.dragController.d.ts b/api/@ohos.arkui.dragController.d.ts index eaf42e314c08acf88dbfb2962011ece5cde43612..4c335ef75db2364d3e3c942064d0221462943787 100644 --- a/api/@ohos.arkui.dragController.d.ts +++ b/api/@ohos.arkui.dragController.d.ts @@ -839,17 +839,18 @@ declare namespace dragController { /** * Define the status for the application to notify the framework whether to execute drag. - * + * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ const enum DragStartRequestStatus { + /** * Notify the framework that the application is not yet ready and needs to temporarily block * the start of drag, only effective in onDragStart calls. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 @@ -859,218 +860,13 @@ declare namespace dragController { /** * Notify the framework that the drag can continue to be started, but only during the start * of drag, and will not take effect when the drag is started. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 18 */ READY = 1, } - - /** - * Defines the drag spring loading state. - * Under default system configuration, if no CANCEL occurs, the state reporting is as follows: - * Hover still--500ms-->BEGIN-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->UPDATE-->100ms-->END - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - enum DragSpringLoadingState { - /** - * The user has remained stationary for a period, initiating the spring loading process. - * This state allows for some preparatory operations during spring loading. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - BEGIN, - /** - * Already in the spring loading state. The system periodically checks the user's hover status. - * If the user remains stationary, it triggers an UPDATE state notification at regular intervals. - * This state allows for UI effect refreshes to emphasize the hover state. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - UPDATE, - /** - * The entire spring loading state ends. The application can perform cleanup operations - * and execute navigation or view switching actions when this state occurs. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - END, - /** - * After entering the BEGIN state, if the user moves out of the component range, exceeds the displacement - * threshold, lifts the finger, or switches windows (pull out), the CANCEL state is triggered. - * The application should restore the UI style and cancel any pending navigation or view switching actions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - CANCEL - } - - /** - * Defines parameters affecting spring loading detection. Typically, default system configurations suffice. - * Customization can be done by specifying the config when binding onDragSpringLoading or dynamically modifying it - * using the updateConfiguration method during the BEGIN state. - * - * @typedef { DragSpringLoadingConfiguration } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - interface DragSpringLoadingConfiguration { - /** - * Time interval to maintain a stationary state before entering spring loading. Default: 500 ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - stillTimeLimit?: number; - - /** - * Interval between update notifications after entering the spring loading state. Default: 100ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateInterval?: number; - - /** - * Maximum number of update notifications to report while in the spring loading state. Default: 3. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateNotifyCount?: number; - - /** - * Maximum wait time from the last UPDATE state to the end of spring loading. Default: 100ms. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateToFinishInterval?: number; - } - - /** - * Defines drag-related information when triggering spring loading callbacks. - * This interface provides drag data summaries and additional drag information, useful for applications - * needing to dynamically determine whether to respond to spring loading callbacks based on drag data. - * - * @typedef { SpringLoadingDragInfos } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - interface SpringLoadingDragInfos { - /** - * Summary of the dragged data. This field is absent if the source application did not configure data. - * - * @type { ?unifiedDataChannel.Summary } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - dataSummary?: unifiedDataChannel.Summary; - /** - * Summary of the dragged data. This field is absent if the source application did not configure data. - * - * @type { ?unifiedDataChannel.Summary } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - extraInfos?: string; - } - - /** - * Context information for the current spring loading trigger. This object is passed to the application - * in the spring loading callback, allowing it to obtain the current state, dynamically refresh UI effects, - * and access drag data to determine whether to handle the drag operation. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - class SpringLoadingContext { - /** - * Current spring loading state. Refer to the DragSpringLoadingState enum for details. - * - * @type { DragSpringLoadingState } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - state: DragSpringLoadingState; - /** - * Sequence number of the current spring loading state notification. Begins at 0 for BEGIN and increments - * with each callback. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - currentNotifySequence: number; - /** - * Drag-related information. Absent when the state is CANCEL. - * - * @type { ?SpringLoadingDragInfos } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - dragInfos?: SpringLoadingDragInfos; - /** - * Current spring loading configuration. Absent when the state is CANCEL. - * - * @type { ?DragSpringLoadingConfiguration } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - currentConfig?: DragSpringLoadingConfiguration; - /** - * Aborts subsequent spring loading triggers. - * Note: Aborting does not trigger a CANCEL notification, the application must handle state cleanup when aborting. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - abort(): void; - /** - * Updates the spring loading configuration for the current trigger. Only effective during the BEGIN state. - * This method does not modify the original configuration set during onDragSpringLoading binding. - * It provides an opportunity for dynamic configuration updates during the current trigger. - * Typically, applications should use default configurations or set them once during binding. - * Use this method sparingly, e.g., for different drag data types requiring varied UX timing. - * - * @param { config } The spring loading detection configuration - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - */ - updateConfiguration(config: DragSpringLoadingConfiguration): void; - } } export default dragController; diff --git a/api/@ohos.arkui.node.d.ts b/api/@ohos.arkui.node.d.ts index 7401413472121764157ea13d378607a3cad4caf5..391de3b79a560819a37fbb6e4d04c00b2c9bea66 100644 --- a/api/@ohos.arkui.node.d.ts +++ b/api/@ohos.arkui.node.d.ts @@ -42,10 +42,19 @@ export { NodeRenderType, RenderOptions, BuilderNode } from './arkui/BuilderNode' */ export { BuildOptions } from './arkui/BuilderNode'; +/** + * Export InputEventType which refers to the event type used for posting. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ +export { InputEventType } from './arkui/BuilderNode'; + /** * Export NodeController, which defines the controller of node container. Provides lifecycle callbacks for the associated NodeContainer * and methods to control the child node of the NodeContainer. - * + * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @since 11