From 3c2f7ec37feb7964c5fdaac0c231025afaf162ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=B0=B8=E5=87=AF?= Date: Mon, 28 Jul 2025 12:46:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:sdk=E6=8E=A5=E5=8F=A3=E6=8B=86=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 刘永凯 --- .../component/ets/alphabet_indexer.d.ts | 1425 ++----- .../component/ets/effect_component.d.ts | 146 +- .../component/ets/page_transition.d.ts | 1126 ++---- api/@internal/component/ets/particle.d.ts | 3397 +++++------------ api/@internal/component/ets/tab_content.d.ts | 2146 +++-------- api/@internal/component/ets/tabs.d.ts | 2848 ++++---------- api/@ohos.animator.d.ts | 1159 ++---- api/@ohos.arkui.ArcAlphabetIndexer.d.ts | 638 ++-- api/@ohos.arkui.shape.d.ts | 522 ++- api/@ohos.curves.d.ts | 1304 ++----- api/@ohos.matrix4.d.ts | 726 +--- 11 files changed, 4319 insertions(+), 11118 deletions(-) diff --git a/api/@internal/component/ets/alphabet_indexer.d.ts b/api/@internal/component/ets/alphabet_indexer.d.ts index 8f6c408bf6..b4442d01c8 100644 --- a/api/@internal/component/ets/alphabet_indexer.d.ts +++ b/api/@internal/component/ets/alphabet_indexer.d.ts @@ -12,33 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { CommonMethod, BlurStyle, Bindable } from './common' -import { ResourceColor, Length, Position } from './units' -import { Font } from './units' -/*** endif */ - -/** - * indexer align property. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * indexer align property. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ +import { CommonMethod, BlurStyle, Bindable } from './common'; +import { ResourceColor, Length, Position } from "./units"; +import { Font } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; /** * indexer align property. * @@ -46,81 +28,46 @@ import { Font } from './units' * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum IndexerAlign { - /** - * A dialog box is displayed on the right of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * A dialog box is displayed on the right of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * A dialog box is displayed on the right of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Left, - - /** - * A dialog box is displayed on the left of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * A dialog box is displayed on the left of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * A dialog box is displayed on the left of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Right, - - /** - * A dialog box is displayed on the start of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - START, - - /** - * A dialog box is displayed on the end of the index bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - END, +export declare enum IndexerAlign { + /** + * A dialog box is displayed on the right of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Left, + /** + * A dialog box is displayed on the left of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Right, + /** + * A dialog box is displayed on the start of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + START, + /** + * A dialog box is displayed on the end of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + END } - /** * AlphabetIndexer constructor options. * @@ -128,166 +75,31 @@ declare enum IndexerAlign { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -interface AlphabetIndexerOptions { - /** - * Alphabetical index string array. - * - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Alphabetical index string array. - * - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Alphabetical index string array. - * - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Alphabetical index string array. - * Anonymous Object Rectification. - * - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - arrayValue: Array; - /** - * ID of the selected item. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ID of the selected item. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * ID of the selected item. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * ID of the selected item. - * Anonymous Object Rectification. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - selected: number; - /** - * ID of the selected item. - * - * @type { number | Bindable } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected: number | Bindable; +export interface AlphabetIndexerOptions { + /** + * Alphabetical index string array. + * Anonymous Object Rectification. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + arrayValue: Array; + /** + * ID of the selected item. + * + * @type { number | Bindable } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selected: number | Bindable; } - -/** - * Alphabet index bar. - * - * @interface AlphabetIndexerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Alphabet index bar. - * - * @interface AlphabetIndexerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Alphabet index bar. - * - * @interface AlphabetIndexerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface AlphabetIndexerInterface { - /** - * ArrayValue: Alphabetical index string array. - * selected: ID of the selected item. - * - * @param { object } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ArrayValue: Alphabetical index string array. - * selected: ID of the selected item. - * - * @param { object } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * ArrayValue: Alphabetical index string array. - * selected: ID of the selected item. - * - * @param { object } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Construct the alphabet indexer component. - * Called when the alphabet indexer component is used. - * Anonymous Object Rectification. - * - * @param { AlphabetIndexerOptions } options - alphabet indexer options - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options: AlphabetIndexerOptions): AlphabetIndexerAttribute; -} - /** * Defines an AlphabetIndexer callback when onSelect. * @@ -296,11 +108,9 @@ interface AlphabetIndexerInterface { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare type OnAlphabetIndexerSelectCallback = (index: number) => void; - +export type OnAlphabetIndexerSelectCallback = (index: number) => void; /** * Defines an AlphabetIndexer callback when onPopupSelect. * @@ -309,11 +119,9 @@ declare type OnAlphabetIndexerSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; - +export type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; /** * Defines an AlphabetIndexer callback when onRequestPopupData. * @@ -323,797 +131,308 @@ declare type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array; - -/** - * Defines the alphabet index bar attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the alphabet index bar attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the alphabet index bar attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare class AlphabetIndexerAttribute extends CommonMethod { - /** - * Index bar selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 8 - * @useinstead onSelect - */ - onSelected(callback: (index: number) => void): AlphabetIndexerAttribute; - - /** - * Definitions color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Definitions color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Definitions color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - color(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Select the text color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Select the text color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Select the text color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedColor(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Font color of the pop-up prompt text. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Font color of the pop-up prompt text. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font color of the pop-up prompt text. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupColor(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Select the text background color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Select the text background color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Select the text background color. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Background color of the pop-up window index. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Background color of the pop-up window index. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Background color of the pop-up window index. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupBackground(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Set the selected font color of non-alphabetic part of the pop-up window. - * - * @param { ResourceColor } value - indicates the color of the selected font. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the selected font color of non-alphabetic part of the pop-up window. - * - * @param { ResourceColor } value - indicates the color of the selected font. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupSelectedColor(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Set the unselected font color of non-alphabetic part of the pop-up window. - * - * @param { ResourceColor } value - indicates the color of the unselected font. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the unselected font color of non-alphabetic part of the pop-up window. - * - * @param { ResourceColor } value - indicates the color of the unselected font. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupUnselectedColor(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Set the background color of non-alphabetic part of the pop-up window. - * - * @param { ResourceColor } value - indicates the color of background. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the background color of non-alphabetic part of the pop-up window. - * - * @param { ResourceColor } value - indicates the color of background. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupItemBackgroundColor(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Whether to use pop-up index hints. - * - * @param { boolean } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Whether to use pop-up index hints. - * - * @param { boolean } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to use pop-up index hints. - * - * @param { boolean } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - usingPopup(value: boolean): AlphabetIndexerAttribute; - - /** - * Select the text text style, - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Select the text text style, - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Select the text text style, - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedFont(value: Font): AlphabetIndexerAttribute; - - /** - * Select the text background color. - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Select the text background color. - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Select the text background color. - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupFont(value: Font): AlphabetIndexerAttribute; - - /** - * Set the font style of non-alphabetic part of the prompt pop-up window. - * Family and style are not supported currently and will be fixed in future. - * - * @param { Font } value - indicates the style of the font. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the font style of non-alphabetic part of the prompt pop-up window. - * Family and style are not supported currently and will be fixed in future. - * - * @param { Font } value - indicates the style of the font. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupItemFont(value: Font): AlphabetIndexerAttribute; - - /** - * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. - * - * @param { string | number } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. - * - * @param { string | number } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. - * - * @param { string | number } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - itemSize(value: string | number): AlphabetIndexerAttribute; - - /** - * Definitions fonts. - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Definitions fonts. - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Definitions fonts. - * - * @param { Font } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - font(value: Font): AlphabetIndexerAttribute; - - /** - * Alphabet index bar alignment style. The left and right alignment styles are supported, - * which affects the pop-up position of the pop-up window. - * - * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Alphabet index bar alignment style. The left and right alignment styles are supported, - * which affects the pop-up position of the pop-up window. - * - * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. - * @param { Length } [offset] - indicates the horizontal space between pop-up window and indexer bar. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Alphabet index bar alignment style. The left and right alignment styles are supported, - * which affects the pop-up position of the pop-up window. - * - * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. - * @param { Length } [offset] - indicates the horizontal space between pop-up window and indexer bar. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - alignStyle(value: IndexerAlign, offset?: Length): AlphabetIndexerAttribute; - - /** - * Index bar selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Index bar selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Index bar selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Index bar selection callback. - * Anonymous Object Rectification. - * - * @param { OnAlphabetIndexerSelectCallback } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onSelect(callback: OnAlphabetIndexerSelectCallback): AlphabetIndexerAttribute; - - /** - * Index bar selection callback and return the strings which display on pop-up. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Index bar selection callback and return the strings which display on pop-up. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Index bar selection callback and return the strings which display on pop-up. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Index bar selection callback and return the strings which display on pop-up. - * Anonymous Object Rectification. - * - * @param { OnAlphabetIndexerRequestPopupDataCallback } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onRequestPopupData(callback: OnAlphabetIndexerRequestPopupDataCallback): AlphabetIndexerAttribute; - - /** - * Pop-up selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Pop-up selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Pop-up selection callback. - * - * @param { function } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Pop-up selection callback. - * Anonymous Object Rectification. - * - * @param { OnAlphabetIndexerPopupSelectCallback } callback - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onPopupSelect(callback: OnAlphabetIndexerPopupSelectCallback): AlphabetIndexerAttribute; - - /** - * Sets the selected index. - * - * @param { number } index - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Sets the selected index. - * - * @param { number } index - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the selected index. - * - * @param { number } index - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - selected(index: number): AlphabetIndexerAttribute; - /** - * Sets the selected index. - * - * @param { number | Bindable } index - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selected(index: number | Bindable): AlphabetIndexerAttribute; - - /** - * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. - * - * @param { Position } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. - * - * @param { Position } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. - * - * @param { Position } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupPosition(value: Position): AlphabetIndexerAttribute; - - /** - * Automatically collapses the characters when the indexer bar not high enough to display all characters. - * - * @param { boolean } value - A boolean value determines whether auto collapses is enabled for indexer bar. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Automatically collapses the characters when the indexer bar not high enough to display all characters. - * - * @param { boolean } value - A boolean value determines whether auto collapses is enabled for indexer bar. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - autoCollapse(value: boolean): AlphabetIndexerAttribute; - - /** - * Set the radius of the item of the pop-up window. - * - * @param { number } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupItemBorderRadius(value: number): AlphabetIndexerAttribute; - - /** - * Set the radius of the item of the indexer. - * - * @param { number } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - itemBorderRadius(value: number): AlphabetIndexerAttribute; - - /** - * Set the background blurStyle of title of the pop-up window. - * - * @param { BlurStyle } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupBackgroundBlurStyle(value: BlurStyle): AlphabetIndexerAttribute; - - /** - * Set the background color of title of the pop-up window. - * - * @param { ResourceColor } value - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - popupTitleBackground(value: ResourceColor): AlphabetIndexerAttribute; - - /** - * Enable or disable haptic feedback. - * - * @param { boolean } value - Default value is true, set false to disable haptic feedback. - * @returns { AlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - enableHapticFeedback(value: boolean): AlphabetIndexerAttribute; +export type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array; +export declare interface AlphabetIndexerAttribute extends CommonMethod { + /** + * Definitions color. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + color(value: ResourceColor | undefined): this; + /** + * Select the text color. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedColor(value: ResourceColor | undefined): this; + /** + * Font color of the pop-up prompt text. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupColor(value: ResourceColor | undefined): this; + /** + * Select the text background color. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedBackgroundColor(value: ResourceColor | undefined): this; + /** + * Background color of the pop-up window index. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupBackground(value: ResourceColor | undefined): this; + /** + * Set the selected font color of non-alphabetic part of the pop-up window. + * + * @param { ResourceColor } value - indicates the color of the selected font. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupSelectedColor(value: ResourceColor | undefined): this; + /** + * Set the unselected font color of non-alphabetic part of the pop-up window. + * + * @param { ResourceColor } value - indicates the color of the unselected font. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupUnselectedColor(value: ResourceColor | undefined): this; + /** + * Set the background color of non-alphabetic part of the pop-up window. + * + * @param { ResourceColor } value - indicates the color of background. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupItemBackgroundColor(value: ResourceColor | undefined): this; + /** + * Whether to use pop-up index hints. + * + * @param { boolean } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + usingPopup(value: boolean | undefined): this; + /** + * Select the text text style, + * + * @param { Font } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedFont(value: Font | undefined): this; + /** + * Select the text background color. + * + * @param { Font } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupFont(value: Font | undefined): this; + /** + * Set the font style of non-alphabetic part of the prompt pop-up window. + * Family and style are not supported currently and will be fixed in future. + * + * @param { Font } value - indicates the style of the font. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupItemFont(value: Font | undefined): this; + /** + * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. + * + * @param { string | number } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + itemSize(value: string | number | undefined): this; + /** + * Definitions fonts. + * + * @param { Font } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + font(value: Font | undefined): this; + /** + * Alphabet index bar alignment style. The left and right alignment styles are supported, + * which affects the pop-up position of the pop-up window. + * + * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. + * @param { Length } [offset] - indicates the horizontal space between pop-up window and indexer bar. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + alignStyle(value: IndexerAlign | undefined, offset?: Length | undefined): this; + /** + * Index bar selection callback. + * Anonymous Object Rectification. + * + * @param { OnAlphabetIndexerSelectCallback } callback + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onSelect(callback: OnAlphabetIndexerSelectCallback | undefined): this; + /** + * Index bar selection callback and return the strings which display on pop-up. + * Anonymous Object Rectification. + * + * @param { OnAlphabetIndexerRequestPopupDataCallback } callback + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onRequestPopupData(callback: OnAlphabetIndexerRequestPopupDataCallback | undefined): this; + /** + * Pop-up selection callback. + * Anonymous Object Rectification. + * + * @param { OnAlphabetIndexerPopupSelectCallback } callback + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onPopupSelect(callback: OnAlphabetIndexerPopupSelectCallback | undefined): this; + /** + * Sets the selected index. + * + * @param { number | Bindable } index + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selected(index: number | Bindable | undefined): this; + /** + * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. + * + * @param { Position } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupPosition(value: Position | undefined): this; + /** + * Automatically collapses the characters when the indexer bar not high enough to display all characters. + * + * @param { boolean } value - A boolean value determines whether auto collapses is enabled for indexer bar. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + autoCollapse(value: boolean | undefined): this; + /** + * Set the radius of the item of the pop-up window. + * + * @param { number } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupItemBorderRadius(value: number | undefined): this; + /** + * Set the radius of the item of the indexer. + * + * @param { number } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + itemBorderRadius(value: number | undefined): this; + /** + * Set the background blurStyle of title of the pop-up window. + * + * @param { BlurStyle } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupBackgroundBlurStyle(value: BlurStyle | undefined): this; + /** + * Set the background color of title of the pop-up window. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupTitleBackground(value: ResourceColor | undefined): this; + /** + * Enable or disable haptic feedback. + * + * @param { boolean } value - Default value is true, set false to disable haptic feedback. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + enableHapticFeedback(value: boolean | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } -/** - * Defines AlphabetIndexer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines AlphabetIndexer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines AlphabetIndexer Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const AlphabetIndexer: AlphabetIndexerInterface; - -/** - * Defines AlphabetIndexer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines AlphabetIndexer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines AlphabetIndexer Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const AlphabetIndexerInstance: AlphabetIndexerAttribute; +@memo +@ComponentBuilder +export declare function AlphabetIndexer( + options: AlphabetIndexerOptions, + @memo + content_?: () => void, +): AlphabetIndexerAttribute \ No newline at end of file diff --git a/api/@internal/component/ets/effect_component.d.ts b/api/@internal/component/ets/effect_component.d.ts index 98d39ed647..5858e4af2d 100644 --- a/api/@internal/component/ets/effect_component.d.ts +++ b/api/@internal/component/ets/effect_component.d.ts @@ -12,143 +12,21 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ -/*** if arkts 1.2 */ -import { CommonMethod} from './common'; - -/*** endif */ -/** - * Provides an Effect Component, which is invisible, but setting properties on this component defines an effect template - * that child components can apply by setting useEffect(true). - * - * @interface EffectComponentInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface EffectComponentInterface { - /** - * Return effectComponent. - * - * @returns { EffectComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ - (): EffectComponentAttribute; - - /** - * Return effectComponent. - * - * @param { EffectComponentOptions } [options] - EffectComponent constructor options. - * @returns { EffectComponentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - (options?: EffectComponentOptions): EffectComponentAttribute; -} - -/** - * Effect layer enum. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ -declare enum EffectLayer { - /** - * No layer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - NONE = 0, - - /** - * Charge motion layer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - CHARGE_MOTION = 1, - - /** - * Charge text layer. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - CHARGE_TEXT = 2 -} - -/** - * Defines the Effect Component constructor options. - * - * @interface EffectComponentOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ -declare interface EffectComponentOptions { - - /** Use this to determine the component layer 1evel. Default value is none. - * - * @type { ?EffectLayer } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 20 - */ - effectLayer?: EffectLayer; -} - -/** - * Defines the Effect Component attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since arkts {'1.1':'10','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class EffectComponentAttribute extends CommonMethod { - /** - * Use snapshot when Effect Component have no visual effect. - * - * @param { boolean } enable - * @returns { EffectComponentAttribute } - * @throws { BusinessError } 202 - Permission verification failed. A non-system application calls a system API. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 19 - */ - alwaysSnapshot(enable: boolean): EffectComponentAttribute; +import { CommonMethod } from './common'; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; +export declare interface EffectComponentAttribute extends CommonMethod { + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } -/** - * Defines Effect Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ -declare const EffectComponent: EffectComponentInterface; - -/** - * Defines Effect Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @systemapi - * @since 10 - */ -declare const EffectComponentInstance: EffectComponentAttribute; +@memo +@ComponentBuilder +export declare function EffectComponent( + + @memo + content_?: () => void, +): EffectComponentAttribute \ No newline at end of file diff --git a/api/@internal/component/ets/page_transition.d.ts b/api/@internal/component/ets/page_transition.d.ts index 518b2029f1..81c44b56f8 100644 --- a/api/@internal/component/ets/page_transition.d.ts +++ b/api/@internal/component/ets/page_transition.d.ts @@ -12,32 +12,14 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ import { ICurve, TranslateOptions, ScaleOptions } from './common'; -import { Curve } from './enums'; -/*** endif */ - -/** - * Declare the jump method. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Declare the jump method. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ +import { Curve } from "./enums"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; /** * Declare the jump method. * @@ -45,98 +27,37 @@ import { Curve } from './enums'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum RouteType { - /** - * The page is not redirected. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The page is not redirected. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The page is not redirected. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - None, - - /** - * Go to the next page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Go to the next page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Go to the next page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Push, - - /** - * Redirect to a specified page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Redirect to a specified page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Redirect to a specified page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Pop, +export declare enum RouteType { + /** + * The page is not redirected. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + None, + /** + * Go to the next page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Push, + /** + * Redirect to a specified page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Pop } - -/** - * Declare the sliding effect of transition. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Declare the sliding effect of transition. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Declare the sliding effect of transition. * @@ -144,313 +65,64 @@ declare enum RouteType { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum SlideEffect { - /** - * Swipe left. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Swipe left. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Swipe left. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Left, - - /** - * Swipe right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Swipe right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Swipe right. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Right, - - /** - * Swipe top. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Swipe top. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Swipe top. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Top, - - /** - * Swipe bottom. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Swipe bottom. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Swipe bottom. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Bottom, - - /** - * Swipe start. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - START = 5, - - /** - * Swipe end. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - END = 6, -} - -/** - * Provides interfaces for common transitions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides interfaces for common transitions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides interfaces for common transitions. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ -declare class CommonTransition { - /** - * Called when a transition method is required. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when a transition method is required. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when a transition method is required. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - constructor(); - - /** - * Called when the slide in effect of the transition is set. - * - * @param { SlideEffect } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the slide in effect of the transition is set. - * - * @param { SlideEffect } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the slide in effect of the transition is set. - * - * @param { SlideEffect } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - slide(value: SlideEffect): T; - - /** - * Called when the translation effect of page transition is set. - * - * @param { object } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the translation effect of page transition is set. - * - * @param { object } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the translation effect of page transition is set. - * - * @param { object } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Called when the translation effect of page transition is set. - * - * Anonymous Object Rectification. - * @param { TranslateOptions } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - translate(value: TranslateOptions): T; - - /** - * Called when setting the zoom effect of page transition. - * - * @param { object } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when setting the zoom effect of page transition. - * - * @param { object } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when setting the zoom effect of page transition. - * - * @param { object } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Called when setting the zoom effect of page transition. - * - * Anonymous Object Rectification. - * @param { ScaleOptions } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - scale(value: ScaleOptions): T; - - /** - * Called when the transparency value of the starting point of entry or the ending point of exit is set. - * - * @param { number } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the transparency value of the starting point of entry or the ending point of exit is set. - * - * @param { number } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the transparency value of the starting point of entry or the ending point of exit is set. - * - * @param { number } value - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - opacity(value: number): T; +export declare enum SlideEffect { + /** + * Swipe left. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Left, + /** + * Swipe right. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Right, + /** + * Swipe top. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Top, + /** + * Swipe bottom. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Bottom, + /** + * Swipe start. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + START = 5, + /** + * Swipe end. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + END = 6 } - /** * Provides interfaces for common transitions. * @@ -458,77 +130,53 @@ declare class CommonTransition { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -declare class CommonTransition { - /** - * Called when the slide in effect of the transition is set. - * - * @param { SlideEffect } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - slide(value: SlideEffect): this; - - /** - * Called when the translation effect of page transition is set. - * - * @param { TranslateOptions } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - translate(value: TranslateOptions): this; - - /** - * Called when setting the zoom effect of page transition. - * - * @param { ScaleOptions } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scale(value: ScaleOptions): this; - - /** - * Called when the transparency value of the starting point of entry or the ending point of exit is set. - * - * @param { number } value - * @returns { this } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - opacity(value: number): this; +export declare class CommonTransition { + /** + * Called when the slide in effect of the transition is set. + * + * @param { SlideEffect } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + slide(value: SlideEffect): this; + /** + * Called when the translation effect of page transition is set. + * + * @param { TranslateOptions } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + translate(value: TranslateOptions): this; + /** + * Called when setting the zoom effect of page transition. + * + * @param { ScaleOptions } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + scale(value: ScaleOptions): this; + /** + * Called when the transparency value of the starting point of entry or the ending point of exit is set. + * + * @param { number } value + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + opacity(value: number): this; } - -/** - * Defines pageTransition constructor parameters. - * - * @interface PageTransitionOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines pageTransition constructor parameters. - * - * @interface PageTransitionOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Defines pageTransition constructor parameters. * @@ -536,110 +184,48 @@ declare class CommonTransition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface PageTransitionOptions { - /** - * RouteType in which the pageTransition can work. - * @type { ?RouteType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * RouteType in which the pageTransition can work. - * @type { ?RouteType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * RouteType in which the pageTransition can work. - * @type { ?RouteType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - type?: RouteType; - /** - * PageTransition animation duration, in ms. - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * PageTransition animation duration, in ms. - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * PageTransition animation duration, in ms. - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration?: number; - /** - * PageTransition animation curve. - * @type { ?(Curve | string) } - * @default Curve.Linear - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * PageTransition animation curve. - * @type { ?(Curve | string | ICurve) } - * @default Curve.Linear - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * PageTransition animation curve. - * @type { ?(Curve | string | ICurve) } - * @default Curve.Linear - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - curve?: Curve | string | ICurve; - /** - * PageTransition animation delay time, in ms. - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * PageTransition animation delay time, in ms. - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * PageTransition animation delay time, in ms. - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - delay?: number; +export declare interface PageTransitionOptions { + /** + * RouteType in which the pageTransition can work. + * @type { ?RouteType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + type?: RouteType; + /** + * PageTransition animation duration, in ms. + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + duration?: number; + /** + * PageTransition animation curve. + * @type { ?(Curve | string | ICurve) } + * @default Curve.Linear + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + curve?: Curve | string | ICurve; + /** + * PageTransition animation delay time, in ms. + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + delay?: number; } - /** * Callback used to report page trasition events. * @@ -649,112 +235,9 @@ declare interface PageTransitionOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type PageTransitionCallback = (type: RouteType, progress: number) => void; - -/** - * Provides an interface for page rotation mode. - * - * @extends CommonTransition - * @interface PageTransitionEnterInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides an interface to set transition style when a page enters. - * - * @extends CommonTransition - * @interface PageTransitionEnterInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides an interface to set transition style when a page enters. - * - * @extends CommonTransition - * @interface PageTransitionEnterInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ -interface PageTransitionEnterInterface extends CommonTransition { - /** - * Called when page Jump animation is used. - * - * @param { PageTransitionOptions } value - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when page Jump animation is used. - * - * @param { PageTransitionOptions } value - pageTransition options - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when page Jump animation is used. - * - * @param { PageTransitionOptions } value - pageTransition options - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value: PageTransitionOptions): PageTransitionEnterInterface; - - /** - * Called when the incoming parameter is the normalized progress of the current incoming animation. - * - * @param { function } event - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called frame by frame to customize pageTransition animation when the page enters. - * The incoming parameter is the normalized progress of the current incoming animation. - * - * @param { function } event - animation callback frame by frame - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called frame by frame to customize pageTransition animation when the page enters. - * The incoming parameter is the normalized progress of the current incoming animation. - * - * @param { function } event - animation callback frame by frame - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Called frame by frame to customize pageTransition animation when the page enters. - * The incoming parameter is the normalized progress of the current incoming animation. - * - * Anonymous Object Rectification. - * @param { PageTransitionCallback } event - animation callback frame by frame - * @returns { PageTransitionEnterInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onEnter(event: PageTransitionCallback): PageTransitionEnterInterface; -} - +export type PageTransitionCallback = (type: RouteType, progress: number) => void; /** * Provides an interface to set transition style when a page enters. * @@ -763,140 +246,33 @@ interface PageTransitionEnterInterface extends CommonTransition - * @interface PageTransitionExitInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provide an interface to set transition style when a page exits. - * - * @extends CommonTransition - * @interface PageTransitionExitInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provide an interface to set transition style when a page exits. - * - * @extends CommonTransition - * @interface PageTransitionExitInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ -interface PageTransitionExitInterface extends CommonTransition { - /** - * Called when the transition is delayed. - * - * @param { PageTransitionOptions } value - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when page Jump animation is used. - * - * @param { PageTransitionOptions } value - pageTransition options - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when page Jump animation is used. - * - * @param { PageTransitionOptions } value - pageTransition options - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - (value: PageTransitionOptions): PageTransitionExitInterface; - - /** - * Called when the input parameter is the normalized progress of the current exit animation. - * - * @param { function } event - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called frame by frame to customize pageTransition animation when the page exits. - * The input parameter is the normalized progress of the current exit animation. - * - * @param { function } event - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called frame by frame to customize pageTransition animation when the page exits. - * The input parameter is the normalized progress of the current exit animation. - * - * @param { function } event - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Called frame by frame to customize pageTransition animation when the page exits. - * The input parameter is the normalized progress of the current exit animation. - * - * Anonymous Object Rectification. - * @param { PageTransitionCallback } event - * @returns { PageTransitionExitInterface } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - onExit(event: PageTransitionCallback): PageTransitionExitInterface; +export declare class PageTransitionEnter extends CommonTransition { + /** + * Called when page Jump animation is used. + * + * @param { PageTransitionOptions } value - pageTransition options + * @returns { PageTransitionEnter } + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static $_invoke(value: PageTransitionOptions): PageTransitionEnter; + /** + * Called frame by frame to customize pageTransition animation when the page enters. + * The incoming parameter is the normalized progress of the current incoming animation. + * + * @param { PageTransitionCallback } event - animation callback frame by frame + * @returns { this } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onEnter(event: PageTransitionCallback): this; } - /** * Provide an interface to set transition style when a page exits. * @@ -904,81 +280,31 @@ interface PageTransitionExitInterface extends CommonTransition = [T1, T2]; - +export type ParticleTuple = [ + T1, + T2 +]; /** * Defines velocity options. * @@ -44,135 +42,32 @@ declare type ParticleTuple = [T1, T2]; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare interface VelocityOptions { - /** - * Particle speed. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle speed. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle speed. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - speed: ParticleTuple; - - /** - * Angle of particle's direction. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Angle of particle's direction. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Angle of particle's direction. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - angle: ParticleTuple; -} - -/** - * Defines acceleration options. - * - * @typedef AccelerationOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 + * @since 20 */ -declare interface AccelerationOptions< - ACC_SPEED_UPDATER extends ParticleUpdater, - ACC_ANGLE_UPDATER extends ParticleUpdater -> { - /** - * Speed property options. - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Speed property options. - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Speed property options. - * - * Anonymous Object Rectification. - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - speed?: ParticlePropertyOptions; - - /** - * Angle property options. - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Angle property options. - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Angle property options. - * - * Anonymous Object Rectification. - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - angle?: ParticlePropertyOptions; +export declare interface VelocityOptions { + /** + * Particle speed. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + speed: ParticleTuple; + /** + * Angle of particle's direction. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + angle: ParticleTuple; } - /** * Defines acceleration options. * @@ -181,212 +76,29 @@ declare interface AccelerationOptions< * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 - */ -declare interface AccelerationOptions { - /** - * Speed property options. - * - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - speed?: ParticlePropertyOptions; - - /** - * Angle property options. - * - * @type { ?ParticlePropertyOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - angle?: ParticlePropertyOptions; -} - -/** - * Defines the ParticleOptions Interface. - * @interface ParticleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the ParticleOptions Interface. - * @interface ParticleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ -interface ParticleOptions< - PARTICLE extends ParticleType, - COLOR_UPDATER extends ParticleUpdater, - OPACITY_UPDATER extends ParticleUpdater, - SCALE_UPDATER extends ParticleUpdater, - ACC_SPEED_UPDATER extends ParticleUpdater, - ACC_ANGLE_UPDATER extends ParticleUpdater, - SPIN_UPDATER extends ParticleUpdater -> { - /** - * Particle emitter. - * @type { EmitterOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle emitter. - * @type { EmitterOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - emitter: EmitterOptions; - - /** - * Particle color. - * @type { ?ParticleColorPropertyOptions } - * @default {range:['#FFFFFF','#FFFFFF']} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle color. - * @type { ?ParticleColorPropertyOptions } - * @default {range:['#FFFFFF','#FFFFFF']} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - color?: ParticleColorPropertyOptions; - - /** - * Particle opacity. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle opacity. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - opacity?: ParticlePropertyOptions; - - /** - * Particle scale. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle scale. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - scale?: ParticlePropertyOptions; - - /** - * Particle velocity. - * @type { ?object } - * @default {speed:[0,0];angle:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle velocity. - * @type { ?object } - * @default {speed:[0,0];angle:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle velocity. - * - * Anonymous Object Rectification. - * @type { ?VelocityOptions } - * @default {speed:[0,0];angle:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - velocity?: VelocityOptions; - - /** - * Particle acceleration. - * @type { ?object } - * @default {speed:{range:[0,0]};angle:{range:[0,0]}} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle acceleration. - * @type { ?object } - * @default {speed:{range:[0,0]};angle:{range:[0,0]}} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle acceleration. - * - * Anonymous Object Rectification. - * @type { ?AccelerationOptions } - * @default {speed:{range:[0,0]};angle:{range:[0,0]}} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - acceleration?: AccelerationOptions; - - /** - * Particle spin. - * @type { ?ParticlePropertyOptions } - * @default {range:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle spin. - * @type { ?ParticlePropertyOptions } - * @default {range:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - spin?: ParticlePropertyOptions; +export declare interface AccelerationOptions { + /** + * Speed property options. + * + * @type { ?ParticlePropertyOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + speed?: ParticlePropertyOptions; + /** + * Angle property options. + * + * @type { ?ParticlePropertyOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + angle?: ParticlePropertyOptions; } - /** * Defines the ParticleOptions Interface. * @interface ParticleOptions @@ -394,266 +106,139 @@ interface ParticleOptions< * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -interface ParticleOptions { - /** - * Particle emitter. - * @type { EmitterOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - emitter: EmitterOptions; - - /** - * Particle color. - * @type { ?ParticleColorPropertyOptions } - * @default {range:['#FFFFFF','#FFFFFF']} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - color?: ParticleColorPropertyOptions; - - /** - * Particle opacity. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - opacity?: ParticlePropertyOptions; - - /** - * Particle scale. - * @type { ?ParticlePropertyOptions } - * @default {range:[1.0,1.0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - scale?: ParticlePropertyOptions; - - /** - * Particle velocity. - * - * @type { ?VelocityOptions } - * @default {speed:[0,0];angle:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - velocity?: VelocityOptions; - - /** - * Particle acceleration. - * - * @type { ?AccelerationOptions } - * @default {speed:{range:[0,0]};angle:{range:[0,0]}} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - acceleration?: AccelerationOptions; - - /** - * Particle spin. - * @type { ?ParticlePropertyOptions } - * @default {range:[0,0]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - spin?: ParticlePropertyOptions; +export interface ParticleOptions { + /** + * Particle emitter. + * @type { EmitterOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + emitter: EmitterOptions; + /** + * Particle color. + * @type { ?ParticleColorPropertyOptions } + * @default {range:['#FFFFFF','#FFFFFF']} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + color?: ParticleColorPropertyOptions; + /** + * Particle opacity. + * @type { ?ParticlePropertyOptions } + * @default {range:[1.0,1.0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + opacity?: ParticlePropertyOptions; + /** + * Particle scale. + * @type { ?ParticlePropertyOptions } + * @default {range:[1.0,1.0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + scale?: ParticlePropertyOptions; + /** + * Particle velocity. + * + * @type { ?VelocityOptions } + * @default {speed:[0,0];angle:[0,0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + velocity?: VelocityOptions; + /** + * Particle acceleration. + * + * @type { ?AccelerationOptions } + * @default {speed:{range:[0,0]};angle:{range:[0,0]}} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + acceleration?: AccelerationOptions; + /** + * Particle spin. + * @type { ?ParticlePropertyOptions } + * @default {range:[0,0]} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + spin?: ParticlePropertyOptions; } - -/** - * Defines the parameters for a point-like particle. - * @interface PointParticleParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Defines the parameters for a point-like particle. * @interface PointParticleParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -interface PointParticleParameters { - /** - * Particle radius. - * @type { VP } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle radius. - * @type { VP } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - radius: VP; +export interface PointParticleParameters { + /** + * Particle radius. + * @type { VP } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + radius: VP; } - -/** - * Defines the parameters for an image-like particle. - * @interface ImageParticleParameters - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Defines the parameters for an image-like particle. * @interface ImageParticleParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface ImageParticleParameters { - /** - * Particle image pixelMap. - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle image pixelMap. - * @type { ResourceStr } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - src: ResourceStr; - - /** - * Particle image size. - * @type { [Dimension, Dimension] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle image size. - * @type { [Dimension, Dimension] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle image size. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - size: ParticleTuple; - - /** - * Image fit. - * @type { ?ImageFit } - * @default ImageFit.Cover - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Image fit. - * @type { ?ImageFit } - * @default ImageFit.Cover - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - objectFit?: ImageFit; -} - -/** - * Defines the particle configs. - * @interface ParticleConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the particle configs. - * @interface ParticleConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ -interface ParticleConfigs { - /** - * Point-like Particle. - * @type { PointParticleParameters } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Point-like Particle. - * @type { PointParticleParameters } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - [ParticleType.POINT]: PointParticleParameters; - - /** - * Image-like Particle. - * @type { ImageParticleParameters } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Image-like Particle. - * @type { ImageParticleParameters } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - [ParticleType.IMAGE]: ImageParticleParameters; +export interface ImageParticleParameters { + /** + * Particle image pixelMap. + * @type { ResourceStr } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + src: ResourceStr; + /** + * Particle image size. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + size: ParticleTuple; + /** + * Image fit. + * @type { ?ImageFit } + * @default ImageFit.Cover + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + objectFit?: ImageFit; } - /** * Defines the particle configs. * @typedef {PointParticleParameters | ImageParticleParameters} ParticleConfigs @@ -661,10 +246,8 @@ interface ParticleConfigs { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -declare type ParticleConfigs = PointParticleParameters | ImageParticleParameters; - +export type ParticleConfigs = PointParticleParameters | ImageParticleParameters; /** * Defines the emitter property. * @@ -672,217 +255,60 @@ declare type ParticleConfigs = PointParticleParameters | ImageParticleParameters * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface EmitterProperty { - - /** - * Emitter index. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - index: number; - - /** - * Emitter emission rate. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - emitRate?: number; - - /** - * Emitter emission rate. Only support number type. - * - * @type { ?PositionT } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - position?: PositionT; - - /** - * Emitter emission window size. Only support number type. - * - * @type { ?SizeT } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - size?: SizeT; - - /** - * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. - * - * @type { ?ParticleAnnulusRegion } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - annulusRegion?: ParticleAnnulusRegion; -} - -/** - * Defines parameters of particles used by emitters. - * - * @typedef EmitterParticleOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 + * @since 20 */ -interface EmitterParticleOptions { - /** - * Particle type. - * @type { PARTICLE } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle type. - * @type { PARTICLE } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle type. - * - * Anonymous Object Rectification. - * @type { PARTICLE } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - type: PARTICLE; - /** - * Particle config. - * @type { ParticleConfigs[PARTICLE] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle config. - * @type { ParticleConfigs[PARTICLE] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle config. - * - * Anonymous Object Rectification. - * @type { ParticleConfigs[PARTICLE] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - config: ParticleConfigs[PARTICLE]; - - /** - * Particle count. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle count. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle count. - * - * Anonymous Object Rectification. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - count: number; - - /** - * Particle lifetime. - * @type { ?number } - * @default 1000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle lifetime. - * @type { ?number } - * @default 1000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle lifetime. - * - * Anonymous Object Rectification. - * @type { ?number } - * @default 1000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - lifetime?: number; - - /** - * Particle lifetimeRange,value range [0, ∞). - * when lifetimeRange>lifetime,minimum lifetime is 0. - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Particle lifetimeRange,value range [0, ∞). - * when lifetimeRange>lifetime,minimum lifetime is 0. - * - * Anonymous Object Rectification. - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - lifetimeRange?: number; +export interface EmitterProperty { + /** + * Emitter index. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + index: number; + /** + * Emitter emission rate. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + emitRate?: number; + /** + * Emitter emission rate. Only support number type. + * + * @type { ?PositionT } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + position?: PositionT; + /** + * Emitter emission window size. Only support number type. + * + * @type { ?SizeT } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + size?: SizeT; + /** + * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. + * + * @type { ?ParticleAnnulusRegion } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + annulusRegion?: ParticleAnnulusRegion; } - /** * Defines parameters of particles used by emitters. * @@ -891,239 +317,62 @@ interface EmitterParticleOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -interface EmitterParticleOptions { - /** - * Particle type. - * - * @type { ParticleType } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: ParticleType; - - /** - * Particle config. - * - * @type { ParticleConfigs } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - config: ParticleConfigs; - - /** - * Particle count. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - count: number; - - /** - * Particle lifetime. - * - * @type { ?number } - * @default 1000 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - lifetime?: number; - - /** - * Particle lifetimeRange,value range [0, ∞). - * when lifetimeRange>lifetime,minimum lifetime is 0. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - lifetimeRange?: number; +export interface EmitterParticleOptions { + /** + * Particle type. + * + * @type { ParticleType } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + type: ParticleType; + /** + * Particle config. + * + * @type { ParticleConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + config: ParticleConfigs; + /** + * Particle count. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + count: number; + /** + * Particle lifetime. + * + * @type { ?number } + * @default 1000 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + lifetime?: number; + /** + * Particle lifetimeRange,value range [0, ∞). + * when lifetimeRange>lifetime,minimum lifetime is 0. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + lifetimeRange?: number; } - -/** - * Defines the emitter Options. - * @interface EmitterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the emitter Options. - * @interface EmitterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -interface EmitterOptions { - /** - * Set particle config. - * @type { object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set particle config. - * @type { object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Set particle config. - * - * Anonymous Object Rectification. - * @type { EmitterParticleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - particle: EmitterParticleOptions; - - /** - * Emitting rate, that is, the number of particles produced per second. - * @type { ?number } - * @default 5 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Emitting rate, that is, the number of particles produced per second. - * @type { ?number } - * @default 5 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - emitRate?: number; - - /** - * Shape of emitter. - * @type { ?ParticleEmitterShape } - * @default ParticleEmitterShape.RECTANGLE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Shape of emitter. - * @type { ?ParticleEmitterShape } - * @default ParticleEmitterShape.RECTANGLE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - shape?: ParticleEmitterShape; - - /** - * Position of emitter. - * The first element means X-axis location. - * The second element means the Y-axis location. - * @type { ?[Dimension, Dimension] } - * @default [0,0] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Position of emitter. - * The first element means X-axis location. - * The second element means the Y-axis location. - * @type { ?[Dimension, Dimension] } - * @default [0,0] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Position of emitter. - * The first element means X-axis location. - * The second element means the Y-axis location. - * - * Anonymous Object Rectification. - * @type { ?ParticleTuple } - * @default [0,0] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - position?: ParticleTuple; - - /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * @type { ?[Dimension, Dimension] } - * @default ['100%','100%'] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * @type { ?[Dimension, Dimension] } - * @default ['100%','100%'] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * - * Anonymous Object Rectification. - * @type { ?ParticleTuple } - * @default ['100%','100%'] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - size?: ParticleTuple; - - /** - * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. - * - * @type { ?ParticleAnnulusRegion } - * @default {innerRadius:LengthMetrics.vp(0),outerRadius:LengthMetrics.vp(0)} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - annulusRegion?: ParticleAnnulusRegion; -} - /** * Defines the emitter Options. * @interface EmitterOptions @@ -1131,169 +380,76 @@ interface EmitterOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 - */ -interface EmitterOptions { - /** - * Set particle config. - * - * @type { EmitterParticleOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - particle: EmitterParticleOptions; - - /** - * Emitting rate, that is, the number of particles produced per second. - * @type { ?number } - * @default 5 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - emitRate?: number; - - /** - * Shape of emitter. - * @type { ?ParticleEmitterShape } - * @default ParticleEmitterShape.RECTANGLE - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - shape?: ParticleEmitterShape; - - /** - * Position of emitter. - * The first element means X-axis location. - * The second element means the Y-axis location. - * - * @type { ?ParticleTuple } - * @default [0,0] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - position?: ParticleTuple; - - /** - * Size of emitter. - * The first element means emitter width. - * The second element means emitter height. - * - * @type { ?ParticleTuple } - * @default ['100%','100%'] - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - size?: ParticleTuple; - - /** - * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. - * - * @type { ?ParticleAnnulusRegion } - * @default {innerRadius:LengthMetrics.vp(0),outerRadius:LengthMetrics.vp(0)} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - annulusRegion?: ParticleAnnulusRegion; -} - -/** - * Defines the particle property updater configs. - * @interface ParticlePropertyUpdaterConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the particle property updater configs. - * @interface ParticlePropertyUpdaterConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ -interface ParticlePropertyUpdaterConfigs { - /** - * No effect of particle updater. - * - * @type { void } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * No effect of particle updater. - * - * @type { void } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - [ParticleUpdater.NONE]: void; - - /** - * Random effect of particle updater. - * @type { [T, T] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Random effect of particle updater. - * @type { [T, T] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Random effect of particle updater. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - [ParticleUpdater.RANDOM]: ParticleTuple; - - /** - * Curve effect of particle updater. - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Curve effect of particle updater. - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - [ParticleUpdater.CURVE]: Array>; +export interface EmitterOptions { + /** + * Set particle config. + * + * @type { EmitterParticleOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + particle: EmitterParticleOptions; + /** + * Emitting rate, that is, the number of particles produced per second. + * @type { ?number } + * @default 5 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + emitRate?: number; + /** + * Shape of emitter. + * @type { ?ParticleEmitterShape } + * @default ParticleEmitterShape.RECTANGLE + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + shape?: ParticleEmitterShape; + /** + * Position of emitter. + * The first element means X-axis location. + * The second element means the Y-axis location. + * + * @type { ?ParticleTuple } + * @default [0,0] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + position?: ParticleTuple; + /** + * Size of emitter. + * The first element means emitter width. + * The second element means emitter height. + * + * @type { ?ParticleTuple } + * @default ['100%','100%'] + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + size?: ParticleTuple; + /** + * the description of the annulus region. This parameter is valid only for emitter whose shape is annulus. + * + * @type { ?ParticleAnnulusRegion } + * @default {innerRadius:LengthMetrics.vp(0),outerRadius:LengthMetrics.vp(0)} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + annulusRegion?: ParticleAnnulusRegion; } - /** * Defines the particle property updater configs. * @typedef { undefined | ParticleTuple | Array> } ParticlePropertyUpdaterConfigs @@ -1301,75 +457,8 @@ interface ParticlePropertyUpdaterConfigs { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -declare type ParticlePropertyUpdaterConfigs = undefined | ParticleTuple | Array>; - -/** - * Defines the particle updater options. - * - * @typedef ParticleUpdaterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ -interface ParticleUpdaterOptions { - /** - * Particle updater type. - * @type { UPDATER } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle updater type. - * @type { UPDATER } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle updater type. - * - * Anonymous Object Rectification. - * @type { UPDATER } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - type: UPDATER; - - /** - * Particle updater configuration. - * @type { ParticlePropertyUpdaterConfigs[UPDATER] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle updater configuration. - * @type { ParticlePropertyUpdaterConfigs[UPDATER] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle updater configuration. - * - * Anonymous Object Rectification. - * @type { ParticlePropertyUpdaterConfigs[UPDATER] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - config: ParticlePropertyUpdaterConfigs[UPDATER]; -} - +export type ParticlePropertyUpdaterConfigs = undefined | ParticleTuple | Array>; /** * Defines the particle updater options. * @@ -1378,34 +467,29 @@ interface ParticleUpdaterOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -interface ParticleUpdaterOptions { - /** - * Particle updater type. - * - * @type { ParticleUpdater } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: ParticleUpdater; - - /** - * Particle updater configuration. - * - * @type { ParticlePropertyUpdaterConfigs } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - config: ParticlePropertyUpdaterConfigs; +export interface ParticleUpdaterOptions { + /** + * Particle updater type. + * + * @type { ParticleUpdater } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + type: ParticleUpdater; + /** + * Particle updater configuration. + * + * @type { ParticlePropertyUpdaterConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + config: ParticlePropertyUpdaterConfigs; } - /** * Defines the particle color options. * @@ -1413,188 +497,54 @@ interface ParticleUpdaterOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface ParticleColorOptions { - /** - * Red component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Red component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Red component of particle color. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - r: ParticleTuple; - - /** - * Green component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Green component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Green component of particle color. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts{ '1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - g: ParticleTuple; - - /** - * Blue component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Blue component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Blue component of particle color. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - b: ParticleTuple; - - /** - * Opacity component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Opacity component of particle color. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Opacity component of particle color. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - a: ParticleTuple; -} - -/** - * Defines the particle color updater options. - * - * @typedef ParticleColorUpdaterOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 + * @since 20 */ -interface ParticleColorUpdaterOptions { - /** - * Color updater. - * @type { UPDATER } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Color updater. - * @type { UPDATER } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Color updater. - * - * Anonymous Object Rectification. - * @type { UPDATER } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - type: UPDATER; - - /** - * Color updater configuration. - * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Color updater configuration. - * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Color updater configuration. - * - * Anonymous Object Rectification. - * @type { ParticleColorPropertyUpdaterConfigs[UPDATER] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - config: ParticleColorPropertyUpdaterConfigs[UPDATER]; +export interface ParticleColorOptions { + /** + * Red component of particle color. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + r: ParticleTuple; + /** + * Green component of particle color. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + g: ParticleTuple; + /** + * Blue component of particle color. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + b: ParticleTuple; + /** + * Opacity component of particle color. + * + * Anonymous Object Rectification. + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + a: ParticleTuple; } - /** * Defines the particle color updater options. * @@ -1603,108 +553,29 @@ interface ParticleColorUpdaterOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 - */ -interface ParticleColorUpdaterOptions { - /** - * Color updater. - * - * @type { ParticleUpdater } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - type: ParticleUpdater; - - /** - * Color updater configuration. - * - * @type { ParticleColorPropertyUpdaterConfigs } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - config: ParticleColorPropertyUpdaterConfigs; -} - -/** - * Defines the particle property Options. - * @interface ParticlePropertyOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the particle property Options. - * @interface ParticlePropertyOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ -interface ParticlePropertyOptions { - /** - * Initial range, within which the initial value are randomly generated. - * @type { [TYPE, TYPE] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Initial range, within which the initial value are randomly generated. - * @type { [TYPE, TYPE] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Initial range, within which the initial value are randomly generated. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - range: ParticleTuple; - - /** - * Particle property updater. - * @type { ?object } - * @default {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs[UPDATER.NONE]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle property updater. - * @type { ?object } - * @default {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs[UPDATER.NONE]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle property updater. - * - * Anonymous Object Rectification. - * @type { ?ParticleUpdaterOptions } - * @default {type:UPDATER.NONE;config:ParticlePropertyUpdaterConfigs[UPDATER.NONE]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - updater?: ParticleUpdaterOptions; +export interface ParticleColorUpdaterOptions { + /** + * Color updater. + * + * @type { ParticleUpdater } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + type: ParticleUpdater; + /** + * Color updater configuration. + * + * @type { ParticleColorPropertyUpdaterConfigs } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + config: ParticleColorPropertyUpdaterConfigs; } - /** * Defines the particle property Options. * @interface ParticlePropertyOptions @@ -1712,117 +583,30 @@ interface ParticlePropertyOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 - */ -interface ParticlePropertyOptions { - /** - * Initial range, within which the initial value are randomly generated. - * - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - range: ParticleTuple; - - /** - * Particle property updater. - * - * @type { ?ParticleUpdaterOptions } - * @default {type:UPDATER.NONE;config:undefined} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - updater?: ParticleUpdaterOptions; -} - -/** - * Defines the particle color property updater configs. - * @interface ParticleColorPropertyUpdaterConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the particle color property updater configs. - * @interface ParticleColorPropertyUpdaterConfigs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ -interface ParticleColorPropertyUpdaterConfigs { - /** - * No effect of particle color property updater. - * - * @type { void } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * No effect of particle color property updater. - * - * @type { void } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - [ParticleUpdater.NONE]: void; - - /** - * Random effect of particle color property updater. - * @type { object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Random effect of particle color property updater. - * @type { object } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Random effect of particle color property updater. - * - * Anonymous Object Rectification. - * @type { ParticleColorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - [ParticleUpdater.RANDOM]: ParticleColorOptions; - - /** - * Curve effect of particle color property updater. - * - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Curve effect of particle color property updater. - * - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - [ParticleUpdater.CURVE]: Array>; +export interface ParticlePropertyOptions { + /** + * Initial range, within which the initial value are randomly generated. + * + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + range: ParticleTuple; + /** + * Particle property updater. + * + * @type { ?ParticleUpdaterOptions } + * @default {type:UPDATER.NONE;config:undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + updater?: ParticleUpdaterOptions; } - /** * Defines the particle color property updater configs. * @typedef {undefined | ParticleColorOptions | Array>} ParticleColorPropertyUpdaterConfigs @@ -1830,95 +614,8 @@ interface ParticleColorPropertyUpdaterConfigs { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -declare type ParticleColorPropertyUpdaterConfigs = undefined | ParticleColorOptions | Array>; - -/** - * Defines the particle color property updater configs which can support generics. - * @interface ParticleColorPropertyOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the particle color property updater configs which can support generics. - * @interface ParticleColorPropertyOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -interface ParticleColorPropertyOptions { - /** - * Initial color range, within which the initial color is randomly generated. - * @type { [ResourceColor, ResourceColor] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Initial color range, within which the initial color is randomly generated. - * @type { [ResourceColor, ResourceColor] } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Initial color range, within which the initial color is randomly generated. - * - * Anonymous Object Rectification. - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - range: ParticleTuple; - - /** - * Distribution type of particle color. - * @type { ?DistributionType } - * @default DistributionType.UNIFORM - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - distributionType?: DistributionType; - - /** - * Particle color property updater. - * @type { ?object } - * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Particle color property updater. - * @type { ?object } - * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Particle color property updater. - * - * Anonymous Object Rectification. - * @type { ?ParticleColorUpdaterOptions } - * @default {type:UPDATER.NONE;config:ParticleColorPropertyUpdaterConfigs[UPDATER.NONE]} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - updater?: ParticleColorUpdaterOptions; -} - +export type ParticleColorPropertyUpdaterConfigs = undefined | ParticleColorOptions | Array>; /** * Defines the particle color property updater. * @interface ParticleColorPropertyOptions @@ -1926,213 +623,96 @@ interface ParticleColorPropertyOptions { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -interface ParticleColorPropertyOptions { - /** - * Initial color range, within which the initial color is randomly generated. - * - * @type { ParticleTuple } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - range: ParticleTuple; - - /** - * Distribution type of particle color. - * @type { ?DistributionType } - * @default DistributionType.UNIFORM - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - distributionType?: DistributionType; - - /** - * Particle color property updater. - * - * @type { ?ParticleColorUpdaterOptions } - * @default {type:UPDATER.NONE;config:undefined} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - updater?: ParticleColorUpdaterOptions; +export interface ParticleColorPropertyOptions { + /** + * Initial color range, within which the initial color is randomly generated. + * + * @type { ParticleTuple } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + range: ParticleTuple; + /** + * Distribution type of particle color. + * @type { ?DistributionType } + * @default DistributionType.UNIFORM + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + distributionType?: DistributionType; + /** + * Particle color property updater. + * + * @type { ?ParticleColorUpdaterOptions } + * @default {type:UPDATER.NONE;config:undefined} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + updater?: ParticleColorUpdaterOptions; } - -/** - * Defines the particle property lifecycle. - * @interface ParticlePropertyAnimation - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Defines the particle property lifecycle. * @interface ParticlePropertyAnimation * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface ParticlePropertyAnimation { - /** - * Start position of the particle animation. - * @type { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Start position of the particle animation. - * @type { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - from: T; - - /** - * End position of the particle animation. - * @type { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * End position of the particle animation. - * @type { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - to: T; - - /** - * Start millis of the particle animation. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Start millis of the particle animation. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - startMillis: number; - - /** - * End millis of the particle animation. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * End millis of the particle animation. - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - endMillis: number; - - /** - * Curve of the particle animation. - * @type { ?(Curve | ICurve) } - * @default Curve.Linear - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Curve of the particle animation. - * @type { ?(Curve | ICurve) } - * @default Curve.Linear - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - curve?: Curve | ICurve; -} - -/** - * Defines the particle array. - * - * @typedef Particles - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 + * @since 20 */ -interface Particles< - PARTICLE extends ParticleType, - COLOR_UPDATER extends ParticleUpdater, - OPACITY_UPDATER extends ParticleUpdater, - SCALE_UPDATER extends ParticleUpdater, - ACC_SPEED_UPDATER extends ParticleUpdater, - ACC_ANGLE_UPDATER extends ParticleUpdater, - SPIN_UPDATER extends ParticleUpdater -> { - /** - * Array of particles. - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Array of particles. - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Array of particles. - * - * Anonymous Object Rectification. - * @type { Array> } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - particles: Array< - ParticleOptions< - PARTICLE, - COLOR_UPDATER, - OPACITY_UPDATER, - SCALE_UPDATER, - ACC_SPEED_UPDATER, - ACC_ANGLE_UPDATER, - SPIN_UPDATER - > - >; +export interface ParticlePropertyAnimation { + /** + * Start position of the particle animation. + * @type { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + from: T; + /** + * End position of the particle animation. + * @type { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + to: T; + /** + * Start millis of the particle animation. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + startMillis: number; + /** + * End millis of the particle animation. + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + endMillis: number; + /** + * Curve of the particle animation. + * @type { ?(Curve | ICurve) } + * @default Curve.Linear + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + curve?: Curve | ICurve; } - /** * Defines the Particles interface. * @@ -2141,531 +721,279 @@ interface Particles< * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -interface Particles { - /** - * Array of particles. - * - * @type { Array } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - particles: Array; +export interface Particles { + /** + * Array of particles. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + particles: Array; } - -/** - * Defines the particle Interface. - * @interface ParticleInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the particle Interface. - * @interface ParticleInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface ParticleInterface { - /** - * create a particle array. - * @param { object } value - Particle value - * particles - list of ParticleOptions. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * create a particle array. - * @param { object } value - Particle value - * particles - list of ParticleOptions. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * create a particle array. - * - * Anonymous Object Rectification. - * @param { Particles } particles - Array of particles. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - < - PARTICLE extends ParticleType, - COLOR_UPDATER extends ParticleUpdater, - OPACITY_UPDATER extends ParticleUpdater, - SCALE_UPDATER extends ParticleUpdater, - ACC_SPEED_UPDATER extends ParticleUpdater, - ACC_ANGLE_UPDATER extends ParticleUpdater, - SPIN_UPDATER extends ParticleUpdater - >(particles: Particles< - PARTICLE, - COLOR_UPDATER, - OPACITY_UPDATER, - SCALE_UPDATER, - ACC_SPEED_UPDATER, - ACC_ANGLE_UPDATER, - SPIN_UPDATER - >): ParticleAttribute; - - /** - * create a particle array. - * - * @param { Particles } particles - Array of particles. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - (particles: Particles): ParticleAttribute; -} - -/** - * Enumerates the particle types. - * @enum { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Enumerates the particle types. * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum ParticleType { - /** - * Point-like particle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Point-like particle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - POINT = 'point', - - /** - * Image-like particle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Image-like particle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - IMAGE = 'image', +export declare enum ParticleType { + /** + * Point-like particle. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + POINT = 'point', + /** + * Image-like particle. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + IMAGE = 'image' } - -/** - * Enumerates the emitter shapes of a particle. - * @enum { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Enumerates the emitter shapes of a particle. * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum ParticleEmitterShape { - /** - * Rectangle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Rectangle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - RECTANGLE = 'rectangle', - - /** - * Circle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Circle. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - CIRCLE = 'circle', - - /** - * Ellipse. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ellipse. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ELLIPSE = 'ellipse', - - /** - * Annulus. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - ANNULUS = 'annulus', +export declare enum ParticleEmitterShape { + /** + * Rectangle. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + RECTANGLE = 'rectangle', + /** + * Circle. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CIRCLE = 'circle', + /** + * Ellipse. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ELLIPSE = 'ellipse', + /** + * Annulus. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ANNULUS = 'annulus' } - /** * Enumerates the color distribution types of a particle. - * + * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum DistributionType { - /** - * Uniform distribution. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - UNIFORM = 0, - - /** - * Gaussian distribution. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - GAUSSIAN = 1, +export declare enum DistributionType { + /** + * Uniform distribution. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + UNIFORM = 0, + /** + * Gaussian distribution. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + GAUSSIAN = 1 } - -/** - * Enumerates the updater types of a particle. - * @enum { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Enumerates the updater types of a particle. * @enum { string } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum ParticleUpdater { - /** - * No updater is used. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * No updater is used. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - NONE = 'none', - - /** - * Random updater. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Random updater. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - RANDOM = 'random', - - /** - * Curve updater. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Curve updater. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - CURVE = 'curve', +export declare enum ParticleUpdater { + /** + * No updater is used. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + NONE = 'none', + /** + * Random updater. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + RANDOM = 'random', + /** + * Curve updater. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CURVE = 'curve' } - -/** - * Defines the SizeT type. - * - * @typedef { import('../api/arkui/Graphics').SizeT } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare type SizeT = import('../api/arkui/Graphics').SizeT; - - /** - * Defines the PositionT type. - * - * @typedef { import('../api/arkui/Graphics').PositionT } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ -declare type PositionT = import('../api/arkui/Graphics').PositionT; - -/** - * Defines the Particle component attribute functions. - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the Particle component attribute functions. - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class ParticleAttribute extends CommonMethod { - /** - * Particle disturbance Field. - * - * @param { Array } fields - particle disturbance Field params. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - disturbanceFields(fields: Array): ParticleAttribute; - - /** - * Add particle animation component properties. - * - * @param { Array } value - The emitter property. - * @returns { ParticleAttribute } Returns the particle attribute. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - emitter(value : Array) : ParticleAttribute; +export declare interface ParticleAttribute extends CommonMethod { + /** + * Particle disturbance Field. + * + * @param { Array } fields - particle disturbance Field params. + * @returns { ParticleAttribute } Returns the particle attribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + disturbanceFields(fields: Array | undefined): this; + /** + * Add particle animation component properties. + * + * @param { Array } value - The emitter property. + * @returns { ParticleAttribute } Returns the particle attribute. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + emitter(value: Array | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } - -/** - * Defines Particle Component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines Particle Component. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const Particle: ParticleInterface; - /** * Defines particle disturbance Field params. * @interface DisturbanceFieldOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface DisturbanceFieldOptions { - - /** - * Strength of the repulsive force from the center outward, - * with positive numbers indicating outward repulsion and negative numbers indicating - * inward attraction. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - strength?: number; - - /** - * Disturbance filed shape. - * - * @type { ?DisturbanceFieldShape } - * @default DisturbanceFieldShape.RECT - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - shape?: DisturbanceFieldShape; - - /** - * Disturbance filed size width value width, height. - * - * @type { ?SizeT } - * @default {width:0,height:0} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - size?: SizeT; - - /** - * Disturbance filed position width value x, y. - * - * @type { ?PositionT } - * @default {x:0,y:0} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - position?: PositionT; - - /** - * Attenuation degree of the field from the center point to the field boundary. - * ranging from 0 to 100 integers. If 0, it indicates that the field is a rigid body, - * and all particles within the range will be excluded. - * a larger feather value indicates a greater degree of relaxation in the field, - * and more particles near the center point will appear in the field strength range. The default value is 0. - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - feather?: number; - - /** - * Scaling parameter is used to control the overall size of noise, with a value greater or equal 0. - * - * @type { ?number } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - noiseScale?: number; - - /** - * Noise frequency with a value greater or equal 0. - * - * @type { ?number } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - noiseFrequency?: number; - - /** - * NoiseAmplitude fluctuation range of noise, value, - * - * @type { ?number } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - noiseAmplitude?: number; +export declare interface DisturbanceFieldOptions { + /** + * Strength of the repulsive force from the center outward, + * with positive numbers indicating outward repulsion and negative numbers indicating + * inward attraction. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + strength?: number; + /** + * Disturbance filed shape. + * + * @type { ?DisturbanceFieldShape } + * @default DisturbanceFieldShape.RECT + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + shape?: DisturbanceFieldShape; + /** + * Disturbance filed size width value width, height. + * + * @type { ?SizeT } + * @default {width:0,height:0} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + size?: SizeT; + /** + * Disturbance filed position width value x, y. + * + * @type { ?PositionT } + * @default {x:0,y:0} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + position?: PositionT; + /** + * Attenuation degree of the field from the center point to the field boundary. + * ranging from 0 to 100 integers. If 0, it indicates that the field is a rigid body, + * and all particles within the range will be excluded. + * a larger feather value indicates a greater degree of relaxation in the field, + * and more particles near the center point will appear in the field strength range. The default value is 0. + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + feather?: number; + /** + * Scaling parameter is used to control the overall size of noise, with a value greater or equal 0. + * + * @type { ?number } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + noiseScale?: number; + /** + * Noise frequency with a value greater or equal 0. + * + * @type { ?number } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + noiseFrequency?: number; + /** + * NoiseAmplitude fluctuation range of noise, value, + * + * @type { ?number } + * @default 1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + noiseAmplitude?: number; } - /** * Defines particle disturbance shape. * @@ -2673,46 +1001,37 @@ declare interface DisturbanceFieldOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum DisturbanceFieldShape { - - /** - * Shape rect. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - RECT, - - /** - * Shape circle. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - CIRCLE, - - /** - * Shape eclipse. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - ELLIPSE - +export declare enum DisturbanceFieldShape { + /** + * Shape rect. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + RECT, + /** + * Shape circle. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CIRCLE, + /** + * Shape eclipse. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ELLIPSE } - /** * Defines particle annuslus region params. * @interface ParticleAnnulusRegion @@ -2720,65 +1039,67 @@ declare enum DisturbanceFieldShape { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ -declare interface ParticleAnnulusRegion { - /** - * The coordinates of the center of the annulus - * - * @type { ?PositionT } - * @default {x:LengthMetrics.percent(0.5),y:LengthMetrics.percent(0.5)} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - center?: PositionT, - /** - * The outer radius of the annulus - * - * @type { LengthMetrics } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - outerRadius: LengthMetrics, - /** - * The inner radius of the annulus - * - * @type { LengthMetrics } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - innerRadius: LengthMetrics, - /** - * The start angle of the annulus, in degree - * - * @type { ?number } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - startAngle?: number, - /** - * The end angle of the annulus, in degree - * - * @type { ?number } - * @default 360 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - endAngle?: number, +export declare interface ParticleAnnulusRegion { + /** + * The coordinates of the center of the annulus + * + * @type { ?PositionT } + * @default {x:LengthMetrics.percent(0.5),y:LengthMetrics.percent(0.5)} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + center?: PositionT; + /** + * The outer radius of the annulus + * + * @type { LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + outerRadius: LengthMetrics; + /** + * The inner radius of the annulus + * + * @type { LengthMetrics } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + innerRadius: LengthMetrics; + /** + * The start angle of the annulus, in degree + * + * @type { ?number } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + startAngle?: number; + /** + * The end angle of the annulus, in degree + * + * @type { ?number } + * @default 360 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + endAngle?: number; } + +@memo +@ComponentBuilder +export declare function Particle( + particles: Particles, + @memo + content_?: () => void, +): ParticleAttribute \ No newline at end of file diff --git a/api/@internal/component/ets/tab_content.d.ts b/api/@internal/component/ets/tab_content.d.ts index 56eb3f714a..5316137952 100644 --- a/api/@internal/component/ets/tab_content.d.ts +++ b/api/@internal/component/ets/tab_content.d.ts @@ -12,29 +12,18 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ import { CommonMethod } from './common'; -import { CustomBuilder } from './builder' -import { TextHeightAdaptivePolicy, TextOverflow, VerticalAlign } from './enums'; -import { Dimension, Font, Length, LocalizedPadding, Padding, Resource, ResourceColor, ResourceStr, VoidCallback } from './units'; -import { ComponentContent } from '../ComponentContent' +import { CustomBuilder } from './builder'; +import { TextHeightAdaptivePolicy, TextOverflow, VerticalAlign } from "./enums"; +import { Dimension, Font, Length, LocalizedPadding, Padding, Resource, ResourceColor, ResourceStr, VoidCallback } from "./units"; +import { ComponentContent } from '../ComponentContent'; import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; -/*** endif */ - -/** - * Enum for the mode of the tab bar when selected. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; /** * Enum for the mode of the tab bar when selected. * @@ -42,248 +31,66 @@ import { SymbolGlyphModifier } from '../SymbolGlyphModifier'; * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum SelectedMode { - /** - * The value of indicator - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Indicator mode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - INDICATOR, - - /** - * The value of board - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Board mode. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - BOARD +export declare enum SelectedMode { + /** + * Indicator mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + INDICATOR, + /** + * Board mode. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + BOARD } - /** * Enum for the layout mode of the content in the tab bar. * * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ -/** - * Enum for the layout mode of the content in the tab bar. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare enum LayoutMode { - - /** - * The the content is laid vertically or horizontally, according to its width. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The the content is laid vertically or horizontally, according to its width. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - AUTO = 0, - /** - * The the content is laid vertically - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The the content is laid vertically - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - VERTICAL = 1, - - /** - * The the content is laid horizontally - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The the content is laid horizontally - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - HORIZONTAL = 2 -} - - -/** - * Provide an interface for the style of an indicator including color, height, width, border radius - * and margin top - * - * @interface IndicatorStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provide an interface for the style of an indicator including color, height, width, border radius - * and margin top - * - * @interface IndicatorStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since 11 + * @since 20 */ -interface IndicatorStyle { - /** - * Define the color of the indicator - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Color of the indicator and board. - * - * @type { ?ResourceColor } - * @default #FF007DFF - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - color?: ResourceColor; - - /** - * Define the height of the indicator - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Height of the indicator. It cannot be set in percentage. - * - * @type { ?Length } - * @default 2vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - height?: Length; - - /** - * Define the width of the indicator. - * If it is 0, the width will be equal to the width of the content - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Width of the indicator. It cannot be set in percentage. - * If it is 0, the width will be equal to the width of the content - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - width?: Length; - - /** - * Define the border radius of the indicator - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Rounded corner radius of the indicator. It cannot be set in percentage. - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - borderRadius?: Length; - - /** - * Define the margin top of the indicator - * - * @type { ?Length } - * @default 8 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Spacing between the indicator and text.It cannot be set in percentage. - * - * @type { ?Length } - * @default 8vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - marginTop?: Length; +export declare enum LayoutMode { + /** + * The the content is laid vertically or horizontally, according to its width. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + AUTO = 0, + /** + * The the content is laid vertically + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + VERTICAL = 1, + /** + * The the content is laid horizontally + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + HORIZONTAL = 2 } - /** * Provide an interface for the style of an SubTabBar indicator including color, height, width, border radius * and margin top @@ -292,77 +99,58 @@ interface IndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @atomicservice * @since 20 - * @arkts 1.2 */ -declare interface SubTabBarIndicatorStyle { - /** - * Define the color of the indicator - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - color?: ResourceColor; - - /** - * Define the height of the indicator - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - height?: Length; - - /** - * Define the width of the indicator. - * If it is 0, the width will be equal to the width of the content - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - width?: Length; - - /** - * Define the border radius of the indicator - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - borderRadius?: Length; - - /** - * Define the margin top of the indicator - * - * @type { ?Length } - * @default 8 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - marginTop?: Length; +export declare interface SubTabBarIndicatorStyle { + /** + * Define the color of the indicator + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + color?: ResourceColor; + /** + * Define the height of the indicator + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + height?: Length; + /** + * Define the width of the indicator. + * If it is 0, the width will be equal to the width of the content + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + width?: Length; + /** + * Define the border radius of the indicator + * + * @type { ?Length } + * @default 0 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + borderRadius?: Length; + /** + * Define the margin top of the indicator + * + * @type { ?Length } + * @default 8 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + marginTop?: Length; } - -/** - * Provide an interface for the style of an indicator including border radius - * - * @interface BoardStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Provide an interface for the style of an indicator including border radius * @@ -370,191 +158,20 @@ declare interface SubTabBarIndicatorStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface BoardStyle { - /** - * Define the border radius of the board - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Define the border radius of the board - * - * @type { ?Length } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - borderRadius?: Length; -} - -/** - * LabelStyle object. - * - * @interface LabelStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * LabelStyle object. - * - * @interface LabelStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 + * @since 20 */ -declare interface LabelStyle { - /** - * overflow mode. - * - * @type { ?TextOverflow } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Display mode when the label text is too long. - * - * @type { ?TextOverflow } - * @default TextOverflow.Ellipsis - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - overflow?: TextOverflow; - - /** - * Label max lines. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Maximum number of lines in the label text. - * - * @type { ?number } - * @default 1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - maxLines?: number; - - /** - * Min font size for adapted height. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Minimum font size of the label text. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - minFontSize?: number | ResourceStr; - - /** - * Max font size for adapted height. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Maximum font size of the label text. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - maxFontSize?: number | ResourceStr; - - /** - * Adapt text height option. - * - * @type { ?TextHeightAdaptivePolicy } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * How the adaptive height is determined for the label text. - * - * @type { ?TextHeightAdaptivePolicy } - * @default TextHeightAdaptivePolicy.MAX_LINES_FIRST - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - heightAdaptivePolicy?: TextHeightAdaptivePolicy; - - /** - * Font style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Font of the label text. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - font?: Font; - - /** - * Font color of the label text when it is selected. - * - * @type { ?ResourceColor } - * @default #FF007DFF - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - selectedColor?: ResourceColor; - - /** - * Font color of the label text when it is not selected. - * - * @type { ?ResourceColor } - * @default #99182431 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - unselectedColor?: ResourceColor; +export interface BoardStyle { + /** + * Define the border radius of the board + * + * @type { ?Length } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + borderRadius?: Length; } - /** * TabBarLabelStyle object. * @@ -563,107 +180,89 @@ declare interface LabelStyle { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.2 */ -declare interface TabBarLabelStyle { - - /** - * overflow mode. - * - * @type { ?TextOverflow } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - overflow?: TextOverflow; - - /** - * Label max lines. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - maxLines?: number; - - /** - * Min font size for adapted height. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - minFontSize?: number | ResourceStr; - - /** - * Max font size for adapted height. - * - * @type { ?(number | ResourceStr) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - maxFontSize?: number | ResourceStr; - - /** - * Adapt text height option. - * - * @type { ?TextHeightAdaptivePolicy } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - heightAdaptivePolicy?: TextHeightAdaptivePolicy; - - /** - * Font style. - * - * @type { ?Font } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - font?: Font; - - /** - * The text color of the selected tab bar. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - selectedColor?: ResourceColor; - - /** - * The text color of the unselected tab bar. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - unselectedColor?: ResourceColor; +export declare interface TabBarLabelStyle { + /** + * overflow mode. + * + * @type { ?TextOverflow } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + overflow?: TextOverflow; + /** + * Label max lines. + * + * @type { ?number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + maxLines?: number; + /** + * Min font size for adapted height. + * + * @type { ?(number | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + minFontSize?: number | ResourceStr; + /** + * Max font size for adapted height. + * + * @type { ?(number | ResourceStr) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + maxFontSize?: number | ResourceStr; + /** + * Adapt text height option. + * + * @type { ?TextHeightAdaptivePolicy } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + heightAdaptivePolicy?: TextHeightAdaptivePolicy; + /** + * Font style. + * + * @type { ?Font } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + font?: Font; + /** + * The text color of the selected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedColor?: ResourceColor; + /** + * The text color of the unselected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + unselectedColor?: ResourceColor; } - /** * TabBarIconStyle object. * @@ -671,42 +270,30 @@ declare interface TabBarLabelStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface TabBarIconStyle { - /** - * The icon color of the selected tab bar. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedColor?: ResourceColor; - - /** - * The icon color of the unselected tab bar. - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - unselectedColor?: ResourceColor; +export declare interface TabBarIconStyle { + /** + * The icon color of the selected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedColor?: ResourceColor; + /** + * The icon color of the unselected tab bar. + * + * @type { ?ResourceColor } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + unselectedColor?: ResourceColor; } - -/** - * TabBarSymbol object. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ /** * TabBarSymbol object. * @@ -714,54 +301,31 @@ declare interface TabBarIconStyle { * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ -declare class TabBarSymbol { - /** - * Symbol icon in the normal style. - * - * @type { SymbolGlyphModifier } - * @default fontColor: #66182431, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Symbol icon in the normal style. - * - * @type { SymbolGlyphModifier } - * @default fontColor: #66182431, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - normal: SymbolGlyphModifier; - - /** - * Symbol icon in the selected style. - * - * @type { ?SymbolGlyphModifier } - * @default fontColor: #ff007dff, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 12 - */ - /** - * Symbol icon in the selected style. - * - * @type { ?SymbolGlyphModifier } - * @default fontColor: #ff007dff, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - selected?: SymbolGlyphModifier; +export declare class TabBarSymbol { + /** + * Symbol icon in the normal style. + * + * @type { SymbolGlyphModifier } + * @default fontColor: #66182431, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + normal: SymbolGlyphModifier; + /** + * Symbol icon in the selected style. + * + * @type { ?SymbolGlyphModifier } + * @default fontColor: #ff007dff, renderingStrategy: SymbolRenderingStrategy.MULTIPLE_OPACITY, fontSize: 24vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selected?: SymbolGlyphModifier; } - /** * Icon and text for TabBar. * @@ -769,913 +333,357 @@ declare class TabBarSymbol { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface TabBarOptions { - /** - * TabBar icon. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * TabBar icon. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * TabBar icon. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * TabBar icon. - * Anonymous Object Rectification - * - *

NOTE: - *
If the icon uses an SVG image, the width and height attributes of the SVG image must be deleted. - * Otherwise, the icon size will be determined by the width and height attributes of the SVG image. - *

- * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - icon?: string | Resource; - - /** - * TabBar text. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * TabBar text. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * TabBar text. - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * TabBar text. - * Anonymous Object Rectification - * - * @type { ?(string | Resource) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - text?: string | Resource +export declare interface TabBarOptions { + /** + * TabBar icon. + * Anonymous Object Rectification + * + *

NOTE: + *
If the icon uses an SVG image, the width and height attributes of the SVG image must be deleted. + * Otherwise, the icon size will be determined by the width and height attributes of the SVG image. + *

+ * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + icon?: string | Resource; + /** + * TabBar text. + * Anonymous Object Rectification + * + * @type { ?(string | Resource) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + text?: string | Resource; } - -/** - * Define SubTabBarStyle, the style is text and underline. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * Define SubTabBarStyle, the style is text and underline. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Define SubTabBarStyle, the style is text and underline. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare class SubTabBarStyle { - /** - * constructor. - * - * @param { ResourceStr } content - indicates the content of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * constructor. - * - * @param { ResourceStr } content - indicates the content of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * constructor. - * - * @param { ResourceStr } content - indicates the content of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(content: ResourceStr); - /** - * constructor. - * - * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(content: ResourceStr | ComponentContent); - - /** - * constructor - * - * @param { ResourceStr } content - indicates the content of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Static constructor used to create a SubTabBarStyle instance. - * - * @param { ResourceStr } content - indicates the content of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - static of(content: ResourceStr): SubTabBarStyle; - /** - * Static constructor used to create a SubTabBarStyle instance. You can set custom content with ComponentContent. - * - * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - static of(content: ResourceStr | ComponentContent): SubTabBarStyle; - - /** - * Set the style of the indicator when selected - * - * @param { IndicatorStyle } value - indicates the indicator style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the indicator style of the selected subtab. - * - * @param { IndicatorStyle } value - indicator style object for the selected subtab. - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - indicator(value: IndicatorStyle): SubTabBarStyle; - - /** - * Set the style of the indicator when selected - * - * @param { SubTabBarIndicatorStyle } style - indicates the indicator style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - indicator(style: SubTabBarIndicatorStyle): SubTabBarStyle; - - /** - * Set the mode of the indicator when selected - * - * @param { SelectedMode } value - indicates the selected mode of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the display mode of the selected subtab. - * - *

NOTE: - *
It takes effect only in the horizontal layout. - *

- * - * @param { SelectedMode } value - display mode of the selected subtab. Default value is SelectedMode.INDICATOR. - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - selectedMode(value: SelectedMode): SubTabBarStyle; - - /** - * Set the style of the board when selected - * - * @param { BoardStyle } value - indicates the board style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the background style (board style) of the selected subtab. - * - *

NOTE: - *
It takes effect only in the horizontal layout. - *

- * - * @param { BoardStyle } value - background style object for the selected subtab. - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - board(value: BoardStyle): SubTabBarStyle; - - /** - * Set the label style of the indicator - * - * @param { LabelStyle } value - indicates the label style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the style of the label text and font for the subtab. - * - * @param { LabelStyle } value - style object for the label text and font of the subtab. - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - labelStyle(value: LabelStyle): SubTabBarStyle; - - /** - * Set the label style of the sub tab bar - * - * @param { TabBarLabelStyle } style - indicates the label style of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - labelStyle(style: TabBarLabelStyle): SubTabBarStyle; - - /** - * Set the padding of the sub tab bar - * - * @param { Padding | Dimension } value - indicates the padding of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the padding of the sub tab bar - * - *

NOTE: - *
It cannot be set in percentage. - *
When the parameter is of the Dimension type, the value applies to all sides. - *

- * - * @param { Padding | Dimension } value - indicates the padding of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - padding(value: Padding | Dimension): SubTabBarStyle; - - /** - * Set the padding of the sub tab bar - * - *

NOTE: - *
This API supports mirroring but does not support percentage-based settings. - *

- * - * @param { LocalizedPadding } padding - indicates the padding of the sub tab bar - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - padding(padding: LocalizedPadding): SubTabBarStyle; - - /** - * Set an id to the sub tab bar to identify it - * - * @param { string } value - id of the sub tab bar to identify it - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Set an id to the sub tab bar to identify it - * - * @param { string } value - id of the sub tab bar to identify it - * @returns { SubTabBarStyle } the style of the sub tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - id(value: string): SubTabBarStyle; +export declare class SubTabBarStyle { + /** + * constructor. + * + * @param { ResourceStr } content - indicates the content of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(content: ResourceStr); + /** + * constructor. + * + * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(content: ResourceStr | ComponentContent); + /** + * Static constructor used to create a SubTabBarStyle instance. + * + * @param { ResourceStr } content - indicates the content of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static of(content: ResourceStr): SubTabBarStyle; + /** + * Static constructor used to create a SubTabBarStyle instance. You can set custom content with ComponentContent. + * + * @param { ResourceStr | ComponentContent } content - indicates the content of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static of(content: ResourceStr | ComponentContent): SubTabBarStyle; + /** + * Set the style of the indicator when selected + * + * @param { SubTabBarIndicatorStyle } style - indicates the indicator style of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + indicator(style: SubTabBarIndicatorStyle): SubTabBarStyle; + /** + * Sets the display mode of the selected subtab. + * + *

NOTE: + *
It takes effect only in the horizontal layout. + *

+ * + * @param { SelectedMode } value - display mode of the selected subtab. Default value is SelectedMode.INDICATOR. + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedMode(value: SelectedMode): SubTabBarStyle; + /** + * Sets the background style (board style) of the selected subtab. + * + *

NOTE: + *
It takes effect only in the horizontal layout. + *

+ * + * @param { BoardStyle } value - background style object for the selected subtab. + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + board(value: BoardStyle): SubTabBarStyle; + /** + * Set the label style of the sub tab bar + * + * @param { TabBarLabelStyle } style - indicates the label style of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + labelStyle(style: TabBarLabelStyle): SubTabBarStyle; + /** + * Set the padding of the sub tab bar + * + *

NOTE: + *
It cannot be set in percentage. + *
When the parameter is of the Dimension type, the value applies to all sides. + *

+ * + * @param { Padding | Dimension } value - indicates the padding of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + padding(value: Padding | Dimension): SubTabBarStyle; + /** + * Set the padding of the sub tab bar + * + *

NOTE: + *
This API supports mirroring but does not support percentage-based settings. + *

+ * + * @param { LocalizedPadding } padding - indicates the padding of the sub tab bar + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + padding(padding: LocalizedPadding): SubTabBarStyle; + /** + * Set an id to the sub tab bar to identify it + * + * @param { string } value - id of the sub tab bar to identify it + * @returns { SubTabBarStyle } the style of the sub tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + id(value: string): SubTabBarStyle; } - /** * Define BottomTabBarStyle, the style is icon and text. * * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ -/** - * Define BottomTabBarStyle, the style is icon and text. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Define BottomTabBarStyle, the style is icon and text. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class BottomTabBarStyle { - /** - * constructor. - * - * @param { ResourceStr } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * constructor. - * - * @param { ResourceStr } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * constructor. - * - * @param { ResourceStr } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * constructor. - * - * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); - - /** - * of. - * - * @param { ResourceStr } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * of. - * - * @param { ResourceStr } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Static constructor used to create a BottomTabBarStyle instance. - * - * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar - * @param { ResourceStr } text - indicates the text of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @static - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; - - /** - * Set the label style of the indicator - * - * @param { LabelStyle } value - indicates the label style of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the style of the label text and font for the bottom tab. - * - * @param { LabelStyle } value - style of the label text and font for the bottom tab. - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - labelStyle(value: LabelStyle): BottomTabBarStyle; - - /** - * Set the label style of the bottom tab bar - * - * @param { TabBarLabelStyle } style - indicates the label style of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - labelStyle(style: TabBarLabelStyle): BottomTabBarStyle; - - /** - * Set the padding of the bottom tab bar - * - * @param { Padding | Dimension } value - indicates the padding of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the padding of the bottom tab bar - * - * @param { Padding | Dimension } value - indicates the padding of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Set the padding of the bottom tab bar - * - *

NOTE: - *
It cannot be set in percentage. - *
When the parameter is of the Dimension type, the value applies to all sides. - *

- * - * @param { Padding | Dimension | LocalizedPadding } value - indicates the padding of the bottom tab bar - * Default value is { left:4.0vp, right:4.0vp, top:0.0vp, bottom:0.0vp }. - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; - - /** - * Set the layout mode of the bottom tab bar - * - * @param { LayoutMode } value - indicates the layout mode of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the layout mode of the images and texts on the bottom tab. - * - * @param { LayoutMode } value - layout mode of the images and text on the bottom tab. - * Default value is LayoutMode.VERTICAL. - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - layoutMode(value: LayoutMode): BottomTabBarStyle; - - /** - * Set the vertical alignment style of the bottom tab bar - * - * @param { VerticalAlign } value - indicates the vertical alignment of the bottom tab bar - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the vertical alignment mode of the images and text on the bottom tab. - * - * @param { VerticalAlign } value - vertical alignment mode of the images and text on the bottom tab. - * Default value is VerticalAlign.Center. - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - verticalAlign(value: VerticalAlign): BottomTabBarStyle; - - /** - * Set the symmetric extensible of the bottom tab bar - * - * @param { boolean } value - indicates whether the bottom tab bar is extensible - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets whether the images and text on the bottom tab can be symmetrically extended by - * the minimum value of the available space on the left and right bottom tabs. - * - *

NOTE: - *
This parameter is valid only between bottom tabs in fixed horizontal mode. - *

- * - * @param { boolean } value - indicates whether the bottom tab bar is extensible. Default value is false. - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - symmetricExtensible(value: boolean): BottomTabBarStyle; - - /** - * Set an id to the bottom tab bar to identify it - * - * @param { string } value - id of the bottom tab bar to identify it - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Set an id to the bottom tab bar to identify it - * - * @param { string } value - id of the bottom tab bar to identify it - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - id(value: string): BottomTabBarStyle; - - /** - * Sets the style of the label icon on the bottom tab. - * - * @param { TabBarIconStyle } style - style of the label icon on the bottom tab. - * @returns { BottomTabBarStyle } the style of the bottom tab bar - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - iconStyle(style: TabBarIconStyle): BottomTabBarStyle; -} - -/** - * Provides an interface for switching the content view on a tab page. - * - * @interface TabContentInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides an interface for switching the content view on a tab page. - * - * @interface TabContentInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides an interface for switching the content view on a tab page. - * - * @interface TabContentInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -interface TabContentInterface { - /** - * Called when the content view of the switch tab is set. - * - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the content view of the switch tab is set. - * - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the content view of the switch tab is set. - * - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - (): TabContentAttribute; +export declare class BottomTabBarStyle { + /** + * constructor. + * + * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar + * @param { ResourceStr } text - indicates the text of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(icon: ResourceStr | TabBarSymbol, text: ResourceStr); + /** + * Static constructor used to create a BottomTabBarStyle instance. + * + * @param { ResourceStr | TabBarSymbol } icon - indicates the icon of the bottom tab bar + * @param { ResourceStr } text - indicates the text of the bottom tab bar + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @static + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static of(icon: ResourceStr | TabBarSymbol, text: ResourceStr): BottomTabBarStyle; + /** + * Set the label style of the bottom tab bar + * + * @param { TabBarLabelStyle } style - indicates the label style of the bottom tab bar + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + labelStyle(style: TabBarLabelStyle): BottomTabBarStyle; + /** + * Set the padding of the bottom tab bar + * + *

NOTE: + *
It cannot be set in percentage. + *
When the parameter is of the Dimension type, the value applies to all sides. + *

+ * + * @param { Padding | Dimension | LocalizedPadding } value - indicates the padding of the bottom tab bar + * Default value is { left:4.0vp, right:4.0vp, top:0.0vp, bottom:0.0vp }. + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + padding(value: Padding | Dimension | LocalizedPadding): BottomTabBarStyle; + /** + * Sets the layout mode of the images and texts on the bottom tab. + * + * @param { LayoutMode } value - layout mode of the images and text on the bottom tab. + * Default value is LayoutMode.VERTICAL. + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + layoutMode(value: LayoutMode): BottomTabBarStyle; + /** + * Sets the vertical alignment mode of the images and text on the bottom tab. + * + * @param { VerticalAlign } value - vertical alignment mode of the images and text on the bottom tab. + * Default value is VerticalAlign.Center. + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + verticalAlign(value: VerticalAlign): BottomTabBarStyle; + /** + * Sets whether the images and text on the bottom tab can be symmetrically extended by + * the minimum value of the available space on the left and right bottom tabs. + * + *

NOTE: + *
This parameter is valid only between bottom tabs in fixed horizontal mode. + *

+ * + * @param { boolean } value - indicates whether the bottom tab bar is extensible. Default value is false. + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + symmetricExtensible(value: boolean): BottomTabBarStyle; + /** + * Set an id to the bottom tab bar to identify it + * + * @param { string } value - id of the bottom tab bar to identify it + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + id(value: string): BottomTabBarStyle; + /** + * Sets the style of the label icon on the bottom tab. + * + * @param { TabBarIconStyle } style - style of the label icon on the bottom tab. + * @returns { BottomTabBarStyle } the style of the bottom tab bar + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + iconStyle(style: TabBarIconStyle): BottomTabBarStyle; } - -/** - * Defines the attribute functions of TabContent. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines the attribute functions of TabContent. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the attribute functions of TabContent. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TabContentAttribute extends CommonMethod { - /** - * Called when tabbar is entered. - * - * @param { string | Resource | { icon?: string | Resource; text?: string | Resource } } value - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when tabbar is entered. - * - * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when tabbar is entered. - * - * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when tabbar is entered. - * - * @param { string | Resource | CustomBuilder | { icon?: string | Resource; text?: string | Resource } } value - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Sets the content displayed on the tab bar. - * Anonymous Object Rectification - * - *

NOTE: - *
If the content set exceeds the space provided by the tab bar, it will be clipped. - *

- * - * @param { string | Resource | CustomBuilder | TabBarOptions } options - Content displayed on the tab bar. - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 18 - */ - tabBar(options: string | Resource | CustomBuilder | TabBarOptions): TabContentAttribute; - - /** - * Called when tabbar is entered. - * - * @param { SubTabBarStyle | BottomTabBarStyle } value - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Called when tabbar is entered. - * - * @param { SubTabBarStyle | BottomTabBarStyle } value - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the content displayed on the tab bar. - * - *

NOTE: - *
The bottom tab style does not include an indicator. - *
When an icon display error occurs, a gray blank block is displayed. - *

- * - * @param { SubTabBarStyle | BottomTabBarStyle } value - Content displayed on the tab bar. - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - tabBar(value: SubTabBarStyle | BottomTabBarStyle): TabContentAttribute; - - /** - * Sets the content displayed on the tab bar. - * Anonymous Object Rectification - * - *

NOTE: - *
If BottomTabBarStyle or TabBarOptions is used and an icon is set, - * a gray block will be displayed if the icon is invalid. - *
If the content exceeds the space provided by the tab bar, it will be clipped. - *

- * - * @param { ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions } content - * Content displayed on the tab bar. - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - tabBar(content: ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | - TabBarOptions): TabContentAttribute; - - /** - * Called when the tab content is about to be displayed. The scenarios include the first-time display, - * tab switching, page switching, and window switching between the foreground and background. - * - * @param { VoidCallback } event - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillShow(event: VoidCallback): TabContentAttribute; - - /** - * Called when the tab content is about to be hidden. The scenarios include the tab switching, - * page switching, and window switching between the foreground and background. - * - * @param { VoidCallback } event - * @returns { TabContentAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onWillHide(event: VoidCallback): TabContentAttribute; +export declare interface TabContentAttribute extends CommonMethod { + /** + * Sets the content displayed on the tab bar. + * Anonymous Object Rectification + * + *

NOTE: + *
If BottomTabBarStyle or TabBarOptions is used and an icon is set, + * a gray block will be displayed if the icon is invalid. + *
If the content exceeds the space provided by the tab bar, it will be clipped. + *

+ * + * @param { ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions } content + * Content displayed on the tab bar. + * @returns { TabContentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + tabBar(content: ComponentContent | SubTabBarStyle | BottomTabBarStyle | string | Resource | CustomBuilder | TabBarOptions | undefined): this; + /** + * Called when the tab content is about to be displayed. The scenarios include the first-time display, + * tab switching, page switching, and window switching between the foreground and background. + * + * @param { VoidCallback } event + * @returns { TabContentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onWillShow(event: VoidCallback | undefined): this; + /** + * Called when the tab content is about to be hidden. The scenarios include the tab switching, + * page switching, and window switching between the foreground and background. + * + * @param { VoidCallback } event + * @returns { TabContentAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onWillHide(event: VoidCallback | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } -/** - * Defines TabContent Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines TabContent Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TabContent Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TabContent: TabContentInterface; - -/** - * Defines TabContent Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines TabContent Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines TabContent Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TabContentInstance: TabContentAttribute; +@memo +@ComponentBuilder +export declare function TabContent( + + @memo + content_?: () => void, +): TabContentAttribute \ No newline at end of file diff --git a/api/@internal/component/ets/tabs.d.ts b/api/@internal/component/ets/tabs.d.ts index a5c460d779..efa338f827 100644 --- a/api/@internal/component/ets/tabs.d.ts +++ b/api/@internal/component/ets/tabs.d.ts @@ -12,44 +12,15 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ import { BackgroundBlurStyleOptions, BackgroundEffectOptions, BlurStyle, Callback, CommonMethod, Optional, TranslateOptions, DividerStyle, Bindable } from './common'; -import { EdgeEffect, PageFlipMode } from './enums'; -import { Dimension, Length, ResourceColor } from './units'; -/*** endif */ - -/** - * CommonModifier - * - * @typedef { import('../api/arkui/CommonModifier').CommonModifier } CommonModifier - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ -declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifier; - -/** - * Declare the graphic format of the bar chart. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Declare the graphic format of the bar chart. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ +import { EdgeEffect, PageFlipMode } from "./enums"; +import { Dimension, Length, ResourceColor } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; /** * Declare the graphic format of the bar chart. * @@ -57,62 +28,31 @@ declare type CommonModifier = import('../api/arkui/CommonModifier').CommonModifi * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum BarMode { - /** - * The actual layout width of the TabBar is used. If the width exceeds the total width, you can slide the tabbar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The actual layout width of the TabBar is used. If the width exceeds the total width, you can slide the tabbar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The width of each tab is determined by the actual layout. The tabs are scrollable in the following case: - * In horizontal layout, the total width exceeds the tab bar width; in vertical layout, - * the total height exceeds the tab bar height. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Scrollable = 0, - - /** - * The width of all TabBars is evenly allocated. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * The width of all TabBars is evenly allocated. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The width of each tab is determined by equally dividing the number of tabs by the bar width - * (or bar height in the vertical layout). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Fixed = 1, +export declare enum BarMode { + /** + * The width of each tab is determined by the actual layout. The tabs are scrollable in the following case: + * In horizontal layout, the total width exceeds the tab bar width; in vertical layout, + * the total height exceeds the tab bar height. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Scrollable = 0, + /** + * The width of each tab is determined by equally dividing the number of tabs by the bar width + * (or bar height in the vertical layout). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Fixed = 1 } - /** * Declare the animation mode of tab content. * @@ -120,83 +60,57 @@ declare enum BarMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum AnimationMode { - /** - * Load the content of the target page before starting the switching animation. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - CONTENT_FIRST = 0, - - /** - * Start the switching animation before loading the content of the target page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - ACTION_FIRST = 1, - - /** - * Disable the default switching animation. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - NO_ANIMATION = 2, - - /** - * Load the content of the target page first, then jump to the vicinity of the target page without animation, - * and finally jump to the target page with animation. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - CONTENT_FIRST_WITH_JUMP = 3, - - /** - * Jump to the vicinity of the target page without animation first, - * then jump to the target page with animation, and finally load the content of the target page. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - ACTION_FIRST_WITH_JUMP = 4, +export declare enum AnimationMode { + /** + * Load the content of the target page before starting the switching animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CONTENT_FIRST = 0, + /** + * Start the switching animation before loading the content of the target page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ACTION_FIRST = 1, + /** + * Disable the default switching animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + NO_ANIMATION = 2, + /** + * Load the content of the target page first, then jump to the vicinity of the target page without animation, + * and finally jump to the target page with animation. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CONTENT_FIRST_WITH_JUMP = 3, + /** + * Jump to the vicinity of the target page without animation first, + * then jump to the target page with animation, and finally load the content of the target page. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ACTION_FIRST_WITH_JUMP = 4 } - -/** - * Declare the location of the bar chart. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Declare the location of the bar chart. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Declare the location of the bar chart. * @@ -204,67 +118,28 @@ declare enum AnimationMode { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum BarPosition { - /** - * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - Start, - - /** - * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - End, +export declare enum BarPosition { + /** + * When the vertical attribute method is set to true, the tab is on the left of the container. When the vertical property method is set to false, the tab is at the top of the container. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Start, + /** + * When the vertical attribute method is set to true, the tab is located on the right of the container. When the vertical property method is set to false, the tab is at the bottom of the container. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + End } - -/** - * Declare the layout style of the tab bar items. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Declare the layout style of the tab bar items. * @@ -272,69 +147,42 @@ declare enum BarPosition { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum LayoutStyle { - /** - * The tab bar items are laid in the center of the tab bar. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * If the tab content exceeds the tab bar width, the tabs are scrollable. - * If not, the tabs are compactly centered on the tab bar and not scrollable. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ALWAYS_CENTER = 0, - /** - * The tab bar items are laid in the tab bar by an average split. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * If the tab content exceeds the tab bar width, the tabs are scrollable. - * If not, the tabs are not scrollable, and the width of the tab bar is evenly distributed among all tabs. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - ALWAYS_AVERAGE_SPLIT = 1, - /** - * The tab bar items are laid in the center of the bar when their total length is more than half of the tab bar. - * Otherwise, they are laid in the center half of the tab bar with the same space between them. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * If the tab content exceeds the tab bar width, the tabs are scrollable. If the tab content exceeds - * half the width of the tab bar but is still within the tab bar width, the tabs are compactly centered and - * not scrollable.If the tab content does not exceed half the width of the tab bar, the tabs are centered within - * half the width of the tab bar with even spacing between them and are not scrollable. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - SPACE_BETWEEN_OR_CENTER = 2 -} - +export declare enum LayoutStyle { + /** + * If the tab content exceeds the tab bar width, the tabs are scrollable. + * If not, the tabs are compactly centered on the tab bar and not scrollable. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ALWAYS_CENTER = 0, + /** + * If the tab content exceeds the tab bar width, the tabs are scrollable. + * If not, the tabs are not scrollable, and the width of the tab bar is evenly distributed among all tabs. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + ALWAYS_AVERAGE_SPLIT = 1, + /** + * If the tab content exceeds the tab bar width, the tabs are scrollable. If the tab content exceeds + * half the width of the tab bar but is still within the tab bar width, the tabs are compactly centered and + * not scrollable.If the tab content does not exceed half the width of the tab bar, the tabs are centered within + * half the width of the tab bar with even spacing between them and are not scrollable. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + SPACE_BETWEEN_OR_CENTER = 2 +} /** * Declare the cache mode of the child components. * @@ -342,150 +190,93 @@ declare enum LayoutStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare enum TabsCacheMode { - /** - * Caches the child components on both sides of the current child components. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - CACHE_BOTH_SIDE = 0, - - /** - * Caches the latest switched child components. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - CACHE_LATEST_SWITCHED = 1 +export declare enum TabsCacheMode { + /** + * Caches the child components on both sides of the current child components. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CACHE_BOTH_SIDE = 0, + /** + * Caches the latest switched child components. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + CACHE_LATEST_SWITCHED = 1 } - -/** - * Provides methods for switching tabs. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides methods for switching tabs. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Provides methods for switching tabs. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare class TabsController { - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * constructor. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(); - - /** - * Called when the tab is switched. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the tab is switched. - * - * @param { number } value - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Switches to the specified tab. - * - * @param { number } value - Index of the tab. If this parameter is set to a value less than 0 - * or greater than the maximum number, the default value 0 is used. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - changeIndex(value: number): void; - - /** - * Called when need to preload specified tab content. - * - * @param { Optional> } indices - Indices of tab content to be preloaded. - * @returns { Promise } The promise returned by the function. - * @throws { BusinessError } 401 - Parameter invalid. Possible causes: - *
1. The parameter type is not Array. - *
2. The parameter is an empty array. - *
3. The parameter contains an invalid index. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - preloadItems(indices: Optional>): Promise; - - /** - * Set tab bar translate. - * - * @param { TranslateOptions } translate - translate options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 - */ - setTabBarTranslate(translate: TranslateOptions): void; - - /** - * Set tab bar opacity. - * - * @param { number } opacity - opacity - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'13','1.2':'20'} - * @arkts 1.1&1.2 - */ - setTabBarOpacity(opacity: number): void; +export declare class TabsController { + /** + * constructor. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(); + /** + * Switches to the specified tab. + * + * @param { number } value - Index of the tab. If this parameter is set to a value less than 0 + * or greater than the maximum number, the default value 0 is used. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + changeIndex(value: number): void; + /** + * Called when need to preload specified tab content. + * + * @param { Optional> } indices - Indices of tab content to be preloaded. + * @returns { Promise } The promise returned by the function. + * @throws { BusinessError } 401 - Parameter invalid. Possible causes: + *
1. The parameter type is not Array. + *
2. The parameter is an empty array. + *
3. The parameter contains an invalid index. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + preloadItems(indices: Optional>): Promise; + /** + * Set tab bar translate. + * + * @param { TranslateOptions } translate - translate options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + setTabBarTranslate(translate: TranslateOptions): void; + /** + * Set tab bar opacity. + * + * @param { number } opacity - opacity + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + setTabBarOpacity(opacity: number): void; } - /** * Options used to create Tabs. * @@ -493,292 +284,40 @@ declare class TabsController { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface TabsOptions { - /** - * Set the tab location for Tabs. - * - * @type { ?BarPosition } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the tab location for Tabs. - * - * @type { ?BarPosition } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the tab location for Tabs. - * - * @type { ?BarPosition } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barPosition?: BarPosition; - - /** - * Set the index of the currently displayed tab. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the index of the currently displayed tab. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the index of the currently displayed tab. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - index?: number; - /** - * Set the index of the currently displayed tab. - * - * @type { ?(number | Bindable) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - * @arkts 1.2 - */ - index?: number | Bindable; - - /** - * Set the Tabs controller. - * - * @type { ?TabsController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set the Tabs controller. - * - * @type { ?TabsController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the Tabs controller. - * - * @type { ?TabsController } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - controller?: TabsController - - /** - * Set common attributes to tabbar. - * - * @type { ?CommonModifier } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 15 - */ - barModifier?: CommonModifier -} - -/** - * Provides an interface for switching views. - * - * @interface TabsInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Provides an interface for switching views. - * - * @interface TabsInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides an interface for switching views. - * - * @interface TabsInterface - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -interface TabsInterface { - /** - * Called when the view is switched. - * - * @param { object } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the view is switched. - * - * @param { object } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the view is switched. - * - * @param { object } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Called when the view is switched. - * - * @param { TabsOptions } [options] - Tabs options. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - (options?: TabsOptions): TabsAttribute; -} - -/** - * Provides an interface for the style of an divider including stroke width, color, start margin - * and end margin - * - * @interface DividerStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Provides an interface for the style of an divider including stroke width, color, start margin - * and end margin - * - * @interface DividerStyle - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -interface DividerStyle { - /** - * Define the stroke width of the divider - * - * @type { Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Width of the divider. It cannot be set in percentage. - * - * @type { Length } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - strokeWidth: Length; - - /** - * Define the color of the divider - * - * @type { ?ResourceColor } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Color of the divider. - * - * @type { ?ResourceColor } - * @default #33182431 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - color?: ResourceColor; - - /** - * Define the start margin of the divider - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Distance between the divider and the top of the sidebar. It cannot be set in percentage. - * - * @type { ?Length } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - startMargin?: Length; - - /** - * Define the end margin of the divider - * - * @type { ?Length } - * @default 0 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Distance between the divider and the bottom of the sidebar. It cannot be set in percentage. - * - * @type { ?Length } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - endMargin?: Length; +export declare interface TabsOptions { + /** + * Set the tab location for Tabs. + * + * @type { ?BarPosition } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barPosition?: BarPosition; + /** + * Set the index of the currently displayed tab. + * + * @type { ?(number | Bindable) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + index?: number | Bindable; + /** + * Set the Tabs controller. + * + * @type { ?TabsController } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + controller?: TabsController; } - -/** - * Provides an interface for tabs animation. - * - * @interface TabsAnimationEvent - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ /** * Provides an interface for tabs animation. * @@ -786,85 +325,43 @@ interface DividerStyle { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface TabsAnimationEvent { - /** - * Offset of the current page to the start position of the tabs main axis. The unit is vp. - * - * @type { number } - * @default 0.0 vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Offset of the current page to the start position of the tabs main axis. The unit is vp. - * - * @type { number } - * @default 0.0 vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - currentOffset: number; - - /** - * Offset of the target page to the start position of the tabs main axis. The unit is vp. - * - * @type { number } - * @default 0.0 vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Offset of the target page to the start position of the tabs main axis. The unit is vp. - * - * @type { number } - * @default 0.0 vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - targetOffset: number; - - /** - * Start speed of the page-turning animation. The unit is vp/s. - * - * @type { number } - * @default 0.0 vp/s - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Start speed of the page-turning animation. The unit is vp/s. - * - * @type { number } - * @default 0.0 vp/s - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - velocity: number; +export declare interface TabsAnimationEvent { + /** + * Offset of the current page to the start position of the tabs main axis. The unit is vp. + * + * @type { number } + * @default 0.0 vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + currentOffset: number; + /** + * Offset of the target page to the start position of the tabs main axis. The unit is vp. + * + * @type { number } + * @default 0.0 vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + targetOffset: number; + /** + * Start speed of the page-turning animation. The unit is vp/s. + * + * @type { number } + * @default 0.0 vp/s + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + velocity: number; } - -/** - * Provides an interface for the grid column options of an tab bar including sm, md, lg, margin and gutter. - * - * @interface BarGridColumnOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Provides an interface for the grid column options of an tab bar including sm, md, lg, margin and gutter. * @@ -872,127 +369,68 @@ declare interface TabsAnimationEvent { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -interface BarGridColumnOptions { - /** - * Define the occupied column number when the screen is of small size - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Number of columns occupied by a tab on a screen whose width is - * greater than or equal to 320 vp but less than 600 vp. The value must be a non-negative even number. - * - * @type { ?number } - * @default -1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - sm?: number; - - /** - * Define the occupied column number when the screen is of middle size - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Number of columns occupied by a tab on a screen whose width is - * greater than or equal to 600 vp but less than 800 vp. The value must be a non-negative even number. - * - * @type { ?number } - * @default -1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - md?: number; - - /** - * Define the occupied column number when the screen is of large size - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Number of columns occupied by a tab on a screen whose width is - * greater than or equal to 840 vp but less than 1024 vp. The value must be a non-negative even number. - * - * @type { ?number } - * @default -1 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - lg?: number; - - /** - * Define the margin size of the columns - * - * @type { ?Dimension } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Column margin in grid mode. It cannot be set in percentage. - * - * @type { ?Dimension } - * @default 24vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - margin?: Dimension; - - /** - * Define the gutter size of the columns - * - * @type { ?Dimension } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Column gutter (that is, gap between columns) in grid mode. It cannot be set in percentage. - * - * @type { ?Dimension } - * @default 24vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - gutter?: Dimension; +export interface BarGridColumnOptions { + /** + * Number of columns occupied by a tab on a screen whose width is + * greater than or equal to 320 vp but less than 600 vp. The value must be a non-negative even number. + * + * @type { ?number } + * @default -1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + sm?: number; + /** + * Number of columns occupied by a tab on a screen whose width is + * greater than or equal to 600 vp but less than 800 vp. The value must be a non-negative even number. + * + * @type { ?number } + * @default -1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + md?: number; + /** + * Number of columns occupied by a tab on a screen whose width is + * greater than or equal to 840 vp but less than 1024 vp. The value must be a non-negative even number. + * + * @type { ?number } + * @default -1 + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + lg?: number; + /** + * Column margin in grid mode. It cannot be set in percentage. + * + * @type { ?Dimension } + * @default 24vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + margin?: Dimension; + /** + * Column gutter (that is, gap between columns) in grid mode. It cannot be set in percentage. + * + * @type { ?Dimension } + * @default 24vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + gutter?: Dimension; } - -/** - * Provides an interface for the options for the scrollable bar mode including margin and nonScrollableLayoutStyle. - * - * @interface ScrollableBarModeOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ /** * Provides an interface for the options for the scrollable bar mode including margin and nonScrollableLayoutStyle. * @@ -1000,53 +438,32 @@ interface BarGridColumnOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -interface ScrollableBarModeOptions { - /** - * Define the margin size of the bar items when the tab bar is scrollable. - * - * @type { ?Dimension } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Left and right margin of the tab bar in scrollable mode. It cannot be set in percentage. - * - * @type { ?Dimension } - * @default 0vp - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - margin?: Dimension; - - /** - * Define the layout style of the bar items when the tab bar is not scrollable. - * - * @type { ?LayoutStyle } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Tab layout mode of the tab bar when not scrolling in scrollable mode. - * - * @type { ?LayoutStyle } - * @default LayoutStyle.ALWAYS_CENTER - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - nonScrollableLayoutStyle?: LayoutStyle; +export interface ScrollableBarModeOptions { + /** + * Left and right margin of the tab bar in scrollable mode. It cannot be set in percentage. + * + * @type { ?Dimension } + * @default 0vp + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + margin?: Dimension; + /** + * Tab layout mode of the tab bar when not scrolling in scrollable mode. + * + * @type { ?LayoutStyle } + * @default LayoutStyle.ALWAYS_CENTER + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + nonScrollableLayoutStyle?: LayoutStyle; } - /** * Defines a tabs callback when onAnimationStart. * @@ -1057,11 +474,9 @@ interface ScrollableBarModeOptions { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, extraInfo: TabsAnimationEvent) => void; - +export type OnTabsAnimationStartCallback = (index: number, targetIndex: number, extraInfo: TabsAnimationEvent) => void; /** * Defines a tabs callback when onAnimationEnd. * @@ -1071,11 +486,9 @@ declare type OnTabsAnimationStartCallback = (index: number, targetIndex: number, * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimationEvent) => void; - +export type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimationEvent) => void; /** * Defines a tabs callback when onGestureSwipe. * @@ -1085,11 +498,9 @@ declare type OnTabsAnimationEndCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimationEvent) => void; - +export type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimationEvent) => void; /** * Defines a tabs callback when customContentTransition. * @@ -1100,11 +511,9 @@ declare type OnTabsGestureSwipeCallback = (index: number, extraInfo: TabsAnimati * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare type TabsCustomContentTransitionCallback = (from: number, to: number) => TabContentAnimatedTransition | undefined; - +export type TabsCustomContentTransitionCallback = (from: number, to: number) => TabContentAnimatedTransition | undefined; /** * Defines a tabs callback when onContentWillChange. * @@ -1117,901 +526,390 @@ declare type TabsCustomContentTransitionCallback = (from: number, to: number) => * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare type OnTabsContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; - -/** - * Defines the tabs attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 + * @since 20 */ -/** - * Defines the tabs attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the tabs attribute functions. - * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ -declare class TabsAttribute extends CommonMethod { - /** - * Called when determining whether the tab is vertical. - * - * @param { boolean } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when determining whether the tab is vertical. - * - * @param { boolean } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets whether to use vertical tabs. - * - * @param { boolean } value - Whether to use vertical tabs. Default value is false. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - vertical(value: boolean): TabsAttribute; - - /** - * Called when determining the location of the bar chart. - * - * @param { BarPosition } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Called when determining the location of the bar chart. - * - * @param { BarPosition } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the position of the Tabs component. - * - * @param { BarPosition } value - Position of the Tabs component. Default value is BarPosition.Start. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barPosition(value: BarPosition): TabsAttribute; - - /** - * Called when judging whether page switching can be performed by sliding left and right. - * - * @param { boolean } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when judging whether page switching can be performed by sliding left and right. - * - * @param { boolean } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets whether the tabs are scrollable. - * - * @param { boolean } value - Whether the tabs are scrollable. Default value is true. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - scrollable(value: boolean): TabsAttribute; - - /** - * Called when the graphic format of the bar chart is selected as fixed mode. - * - * @param { BarMode.Fixed } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the tab bar layout mode to BarMode.Fixed. - * - * @param { BarMode.Fixed } value - The width of each tab is determined by equally dividing - * the number of tabs by the bar width (or bar height in the vertical layout). - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - barMode(value: BarMode.Fixed): TabsAttribute; - - /** - * Called when the graphic format of the bar chart is selected as scrollable mode. - * - * @param { BarMode.Scrollable } value - * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the tab bar layout mode to BarMode.Scrollable. - * - * @param { BarMode.Scrollable } value - The width of each tab is determined by the actual layout. - * The tabs are scrollable in the following case: In horizontal layout, the total width exceeds the tab bar width; - * in vertical layout, the total height exceeds the tab bar height. - * @param { ScrollableBarModeOptions } [options] - Layout style of the tab bar in scrollable mode. - * This parameter is effective only when the tab bar is in scrollable mode. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - barMode(value: BarMode.Scrollable, options: ScrollableBarModeOptions): TabsAttribute; - - /** - * Called when the graphic format of the bar chart is selected. - * - * @param { BarMode } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the graphic format of the bar chart is selected. - * - * @param { BarMode } value - * @param { ScrollableBarModeOptions } [options] - options indicate the options for the scrollable bar mode - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the tab bar layout mode. - * - * @param { BarMode } value - Layout mode. Default value is BarMode.Fixed. - * @param { ScrollableBarModeOptions } [options] - Layout style of the tab bar in scrollable mode. - * This parameter is effective only when the tab bar is in horizontal scrollable mode. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barMode(value: BarMode, options?: ScrollableBarModeOptions): TabsAttribute; - - /** - * Called when the width of the bar graph is set. - * Notice: barWidth only supports Number type. - * - * @param { number } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the width of the bar graph is set. - * Notice: barWidth only supports Number type on 7, supports Length type since 8. - * - * @param { Length } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the width of the bar graph is set. - * Notice: barWidth only supports Number type on 7, supports Length type since 8. - * - * @param { Length } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the width of the tab bar. - * Notice: barWidth only supports Number type on 7, supports Length type since 8. - * - * @param { Length } value - Width of the tab bar. If the set value is less than 0 - * or greater than the width of the Tabs component, the default value is used. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barWidth(value: Length): TabsAttribute; - - /** - * Called when the height of the bar graph is set. - * Notice: barHeight only supports Number type. - * - * @param { number } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the height of the bar graph is set. - * Notice: barHeight only supports Number type on 7, supports Length type since 8. - * - * @param { Length } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 8 - */ - /** - * Called when the height of the bar graph is set. - * Notice: barHeight only supports Number type on 7, supports Length type since 8. - * - * @param { Length } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the height of the tab bar. - * Notice: barHeight only supports Number type on 7, supports Length type since 8. - * - * @param { Length } value - Height of the tab bar. If the set value is less than 0 or - * greater than the height of the Tabs component, the default value is used. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barHeight(value: Length): TabsAttribute; - +export type OnTabsContentWillChangeCallback = (currentIndex: number, comingIndex: number) => boolean; +export declare interface TabsAttribute extends CommonMethod { /** - * Called when the height of the bar graph is set. - * Notice: barHeight only supports Number type on 7, supports Length type since 8. - * - * @param { Length } height - the height of the tabBar. - * @param { boolean } noMinHeightLimit - indicates whether there is a minimum limit on the height of the tabBar - * when height is set to auto, default value is false. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - barHeight(height: Length, noMinHeightLimit: boolean): TabsAttribute; - - /** - * Sets the animation curve - * - * @param { Curve | ICurve } curve - animation curve for tabs switch animation, - * Curve is an enumeration type for common curves, ICurve is a curve object. - * Default value: - * When pages are turned by swiping in TabContent, the default value is - * interpolatingSpring(-1, 1, 228, 30). - * When pages are turned by tapping tabs or calling the changeIndex API of TabsController, - * the default value is cubicBezierCurve(0.2, 0.0, 0.1, 1.0). - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 20 - */ - animationCurve(curve: Curve | ICurve): TabsAttribute; - - /** - * Called when the animation duration of the bar graph is set. - * - * @param { number } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the animation duration of the bar graph is set. - * - * @param { number } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the length of time required to complete the tab switching animation, - * which is initiated by clicking a specific tab or by calling the changeIndex API of TabsController. - * - * @param { number } value - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - animationDuration(value: number): TabsAttribute; - - /** - * Sets the animation mode for tab switching initiated by clicking a specific tab or - * by calling the changeIndex API of TabsController. - * - * @param { Optional } mode - animation mode for tabs switch animation. - * Default value is AnimationMode.CONTENT_FIRST. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - animationMode(mode: Optional): TabsAttribute; - - /** - * Sets the edge effect used when the boundary of the scrolling area is reached. - * - * @param { Optional } edgeEffect - Effect used when the boundary of the scrolling area is reached. - * Default value is EdgeEffect.Spring. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - edgeEffect(edgeEffect: Optional): TabsAttribute; - - /** - * Called when the tab is switched. - * - * @param { function } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Called when the tab is switched. - * - * @param { function } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the tab is switched. - * - * @param { function } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Triggered when a tab is switched. - * Anonymous Object Rectification - * - *

NOTE: - *
This event is triggered when any of the following conditions is met: - * 1. The swiping animation is completed, followed by tab switching. - * 2. The Controller API is called. - * 3. The attribute value is updated using a state variable. - * 4. A tab is clicked. - *

- * - * @param { Callback } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onChange(event: Callback): TabsAttribute; - - /** - * Called when a new tab becomes selected. Animation is not necessarily complete. - * - * @param { Callback } event - callback to notify which index has been selected - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onSelected(event: Callback): TabsAttribute; - - /** - * Called when the tab is clicked. - * - * @param { function } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Called when the tab is clicked. - * - * @param { function } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Triggered when a tab is clicked. - * Anonymous Object Rectification - * - * @param { Callback } event - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onTabBarClick(event: Callback): TabsAttribute; - - /** - * Called when a new tab becomes unselected. Animation is not necessarily complete. - * - * @param { Callback } event - callback to notify which index has been unselected - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onUnselected(event: Callback): TabsAttribute; - - /** - * Called when the tab content flip animation start. - * - * @param { function } handler - - * "index": the index value of the tab that when animation start. - * "targetIndex": the target index value of the tab that when animation start. - * "event": the animation event callback info. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Called when the tab content flip animation start. - * - * @param { function } handler - - * "index": the index value of the tab that when animation start. - * "targetIndex": the target index value of the tab that when animation start. - * "event": the animation event callback info. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Triggered when the tab switching animation starts. - * Anonymous Object Rectification - * - * @param { OnTabsAnimationStartCallback } handler - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onAnimationStart(handler: OnTabsAnimationStartCallback): TabsAttribute; - - /** - * Called when the tab content flip animation end. - * - * @param { function } handler - - * "index": the index value of the tab that when animation start. - * "event": the animation event callback info. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Called when the tab content flip animation end. - * - * @param { function } handler - - * "index": the index value of the tab that when animation start. - * "event": the animation event callback info. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Triggered when the tab switching animation ends. - * Anonymous Object Rectification - * - * @param { OnTabsAnimationEndCallback } handler - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onAnimationEnd(handler: OnTabsAnimationEndCallback): TabsAttribute; - - /** - * Called when swiping the tab content with the gesture. - * - * @param { function } handler - - * "index": the index value of the tab that when animation start. - * "event": the animation event callback info. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 11 - */ - /** - * Called when swiping the tab content with the gesture. - * - * @param { function } handler - - * "index": the index value of the tab that when animation start. - * "event": the animation event callback info. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Triggered on a frame-by-frame basis when the tab is switched by a swipe. - * Anonymous Object Rectification - * - * @param { OnTabsGestureSwipeCallback } handler - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onGestureSwipe(handler: OnTabsGestureSwipeCallback): TabsAttribute; - - /** - * Set whether the edges of tab bar are fading. - * - * @param { boolean } value - indicates whether the edges of tab bar are fading. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets whether the tab fades out when it exceeds the container width. - * - *

NOTE: - *
It is recommended that this attribute be used together with the barBackgroundColor attribute. - * If the barBackgroundColor attribute is not defined, the tab fades out in white - * when it exceeds the container width by default. - *

- * - * @param { boolean } value - Whether the tab fades out when it exceeds the container width. Default value is true. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fadingEdge(value: boolean): TabsAttribute; - - /** - * Set the divider between tab bar and tab content. - * - * @param { DividerStyle | null } value - indicates the style of the indicator. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Set the divider between tab bar and tab content. - * - * @param { DividerStyle | null } value - indicates the style of the indicator. Default value is null. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - divider(value: DividerStyle | null): TabsAttribute; - - /** - * Set whether the tab bar overlaps with the tab content. - * - * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Sets whether the tab bar is superimposed on the TabContent component after having its background blurred. - * - * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. Default value is false. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barOverlap(value: boolean): TabsAttribute; - - /** - * Set the background color of the tab bar. - * - * @param { ResourceColor } value - indicates the background color of the tab bar. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 10 - */ - /** - * Set the background color of the tab bar. - * - * @param { ResourceColor } value - indicates the background color of the tab bar. - * Default value is Color.Transparent. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barBackgroundColor(value: ResourceColor): TabsAttribute; - - /** - * Set the grid alignment options of the tab bar. - * - * @param { BarGridColumnOptions } value - indicates the bar grid alignment options. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sets the visible area of the tab bar in grid mode. - * - *

NOTE: - *
This attribute is effective only in horizontal mode. It is not applicable to XS, XL, and XXL devices. - *

- * - * @param { BarGridColumnOptions } value - indicates the bar grid alignment options. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barGridAlign(value: BarGridColumnOptions): TabsAttribute; - - /** - * Custom tab content transition animation. - * When undefined is set, this interface does not take effect. - * - * @param { function } delegate - custom content transition animation. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Custom tab content transition animation. - * When undefined is set, this interface does not take effect. - * - * @param { function } delegate - custom content transition animation. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - /** - * Custom tab content transition animation. - * When undefined is set, this interface does not take effect. - * Anonymous Object Rectification - * - *

NOTE: - *
Instructions: - *
1. When the custom tab switching animation is used, the default switching animation of - * the Tabs component is disabled, and tabs cannot be switched through swiping. - *
2. The value undefined means not to use the custom tab switching animation, - * in which case the default switching animation is used. - *
3. The custom tab switching animation cannot be interrupted. - *
4. Currently, the custom tab switching animation can be triggered only by clicking a tab - * or by calling the TabsController.changeIndex() API. - *
5. When the custom tab switching animation is used, - * the Tabs component supports all events except onGestureSwipe. - *
6. Notes about the onChange and onAnimationEnd events: If the second custom animation is triggered - * during the execution of the first custom animation, the onChange and onAnimationEnd events of - * the first custom animation will be triggered when the second custom animation starts. - *
7. When the custom animation is used, the stack layout is used for pages involved in the animation. - * If the zIndex attribute is not set for related pages, the zIndex values of all pages are the same. - * In this case, the pages are rendered in the order in which they are added to - * the component tree(that is, the sequence of page indexes). In light of this, - * to control the rendering levels of pages, set the zIndex attribute of the pages. - *

- * - * @param { TabsCustomContentTransitionCallback } delegate - Custom content transition animation. - * @returns { TabsAttribute } The attribute of the tabs. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - customContentTransition(delegate: TabsCustomContentTransitionCallback): TabsAttribute; - - /** - * Sets the background blur style of the tab bar. - * - * @param { BlurStyle } value - Background blur style of the tab bar. Default value is BlurStyle.NONE. - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - barBackgroundBlurStyle(value: BlurStyle): TabsAttribute; - - /** - * Setting page flip mode on mouse wheel event. - * - * @param { Optional } mode - page flip mode on mouse wheel event. The default value is PageFlipMode.CONTINUOUS. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'15','1.2':'20'} - * @arkts 1.1&1.2 - */ - pageFlipMode(mode: Optional): TabsAttribute; - - /** - * Set the BlurStyle of the tab bar. - * - * @param { BlurStyle } style - style indicate the blur style for the tab bar - * @param { BackgroundBlurStyleOptions } options - options indicate the options for the tab bar - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - barBackgroundBlurStyle(style: BlurStyle, options: BackgroundBlurStyleOptions): TabsAttribute; - - /** - * Set the BackgroundEffect of the tab bar. - * - * @param { BackgroundEffectOptions } options - options indicate the options for the tab bar - * @returns { TabsAttribute } the attribute of the tabs - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - barBackgroundEffect(options: BackgroundEffectOptions): TabsAttribute; - - /** - * Called when content will change. - * - * @param { function } handler - * "currentIndex": the index value of the current tab. - * "comingIndex": the index value of the tab that will change. - * Tabs can change from currentIndex to comingIndex if function return true. - * Tabs can not change from currentIndex to comingIndex if function return false. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 12 - */ - /** - * Triggered when a new page is about to be displayed. - * Anonymous Object Rectification - * - *

NOTE: - *
This event is triggered when any of the following conditions is met: - * 1. When the user swipes on the TabContent component (provided that it supports swiping) to switch to a new page. - * 2. When TabsController.changeIndex is called to switch to a new page. - * 3. When the **index** attribute is changed to switch to a new page. - * 4. When the user clicks a tab on the tab bar to switch to a new page. - * 5. When the user presses the left or right arrow key on the keyboard to switch to a new page - * while the tab bar is focused. - *

- * - * @param { OnTabsContentWillChangeCallback } handler - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - onContentWillChange(handler: OnTabsContentWillChangeCallback): TabsAttribute; - - /** - * Sets the maximum number of child components to be cached. - * - * @param { number } count - the maximum number of child components to be cached. - * @param { TabsCacheMode } mode - the mode of caching child components. - * @returns { TabsAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'19','1.2':'20'} - * @arkts 1.1&1.2 - */ - cachedMaxCount(count: number, mode: TabsCacheMode): TabsAttribute; + * Sets whether to use vertical tabs. + * + * @param { boolean } value - Whether to use vertical tabs. Default value is false. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + vertical(value: boolean | undefined): this; + /** + * Sets the position of the Tabs component. + * + * @param { BarPosition } value - Position of the Tabs component. Default value is BarPosition.Start. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barPosition(value: BarPosition | undefined): this; + /** + * Sets whether the tabs are scrollable. + * + * @param { boolean } value - Whether the tabs are scrollable. Default value is true. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + scrollable(value: boolean | undefined): this; + /** + * Sets the tab bar layout mode. + * + * @param { BarMode } value - Layout mode. Default value is BarMode.Fixed. + * @param { ScrollableBarModeOptions } [options] - Layout style of the tab bar in scrollable mode. + * This parameter is effective only when the tab bar is in horizontal scrollable mode. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barMode(value: BarMode | undefined, options?: ScrollableBarModeOptions | undefined): this; + /** + * Sets the width of the tab bar. + * Notice: barWidth only supports Number type on 7, supports Length type since 8. + * + * @param { Length } value - Width of the tab bar. If the set value is less than 0 + * or greater than the width of the Tabs component, the default value is used. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barWidth(value: Length | undefined): this; + /** + * Sets the height of the tab bar. + * Notice: barHeight only supports Number type on 7, supports Length type since 8. + * + * @param { Length } value - Height of the tab bar. If the set value is less than 0 or + * greater than the height of the Tabs component, the default value is used. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barHeight(value: Length | undefined): this; + /** + * Sets the length of time required to complete the tab switching animation, + * which is initiated by clicking a specific tab or by calling the changeIndex API of TabsController. + * + * @param { number } value + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + animationDuration(value: number | undefined): this; + /** + * Sets the animation mode for tab switching initiated by clicking a specific tab or + * by calling the changeIndex API of TabsController. + * + * @param { Optional } mode - animation mode for tabs switch animation. + * Default value is AnimationMode.CONTENT_FIRST. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + animationMode(mode: AnimationMode | undefined): this; + /** + * Sets the edge effect used when the boundary of the scrolling area is reached. + * + * @param { Optional } edgeEffect - Effect used when the boundary of the scrolling area is reached. + * Default value is EdgeEffect.Spring. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + edgeEffect(edgeEffect: EdgeEffect | undefined): this; + /** + * Triggered when a tab is switched. + * Anonymous Object Rectification + * + *

NOTE: + *
This event is triggered when any of the following conditions is met: + * 1. The swiping animation is completed, followed by tab switching. + * 2. The Controller API is called. + * 3. The attribute value is updated using a state variable. + * 4. A tab is clicked. + *

+ * + * @param { Callback } event + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onChange(event: Callback | undefined): this; + /** + * Called when a new tab becomes selected. Animation is not necessarily complete. + * + * @param { Callback } event - callback to notify which index has been selected + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onSelected(event: Callback | undefined): this; + /** + * Triggered when a tab is clicked. + * Anonymous Object Rectification + * + * @param { Callback } event + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onTabBarClick(event: Callback | undefined): this; + /** + * Called when a new tab becomes unselected. Animation is not necessarily complete. + * + * @param { Callback } event - callback to notify which index has been unselected + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onUnselected(event: Callback | undefined): this; + /** + * Triggered when the tab switching animation starts. + * Anonymous Object Rectification + * + * @param { OnTabsAnimationStartCallback } handler + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAnimationStart(handler: OnTabsAnimationStartCallback | undefined): this; + /** + * Triggered when the tab switching animation ends. + * Anonymous Object Rectification + * + * @param { OnTabsAnimationEndCallback } handler + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onAnimationEnd(handler: OnTabsAnimationEndCallback | undefined): this; + /** + * Triggered on a frame-by-frame basis when the tab is switched by a swipe. + * Anonymous Object Rectification + * + * @param { OnTabsGestureSwipeCallback } handler + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onGestureSwipe(handler: OnTabsGestureSwipeCallback | undefined): this; + /** + * Sets whether the tab fades out when it exceeds the container width. + * + *

NOTE: + *
It is recommended that this attribute be used together with the barBackgroundColor attribute. + * If the barBackgroundColor attribute is not defined, the tab fades out in white + * when it exceeds the container width by default. + *

+ * + * @param { boolean } value - Whether the tab fades out when it exceeds the container width. Default value is true. + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fadingEdge(value: boolean | undefined): this; + /** + * Set the divider between tab bar and tab content. + * + * @param { DividerStyle | null } value - indicates the style of the indicator. Default value is null. + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + divider(value: DividerStyle | null | undefined): this; + /** + * Sets whether the tab bar is superimposed on the TabContent component after having its background blurred. + * + * @param { boolean } value - indicates whether the tab bar overlaps with the tab content. Default value is false. + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barOverlap(value: boolean | undefined): this; + /** + * Set the background color of the tab bar. + * + * @param { ResourceColor } value - indicates the background color of the tab bar. + * Default value is Color.Transparent. + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barBackgroundColor(value: ResourceColor | undefined): this; + /** + * Sets the visible area of the tab bar in grid mode. + * + *

NOTE: + *
This attribute is effective only in horizontal mode. It is not applicable to XS, XL, and XXL devices. + *

+ * + * @param { BarGridColumnOptions } value - indicates the bar grid alignment options. + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barGridAlign(value: BarGridColumnOptions | undefined): this; + /** + * Custom tab content transition animation. + * When undefined is set, this interface does not take effect. + * Anonymous Object Rectification + * + *

NOTE: + *
Instructions: + *
1. When the custom tab switching animation is used, the default switching animation of + * the Tabs component is disabled, and tabs cannot be switched through swiping. + *
2. The value undefined means not to use the custom tab switching animation, + * in which case the default switching animation is used. + *
3. The custom tab switching animation cannot be interrupted. + *
4. Currently, the custom tab switching animation can be triggered only by clicking a tab + * or by calling the TabsController.changeIndex() API. + *
5. When the custom tab switching animation is used, + * the Tabs component supports all events except onGestureSwipe. + *
6. Notes about the onChange and onAnimationEnd events: If the second custom animation is triggered + * during the execution of the first custom animation, the onChange and onAnimationEnd events of + * the first custom animation will be triggered when the second custom animation starts. + *
7. When the custom animation is used, the stack layout is used for pages involved in the animation. + * If the zIndex attribute is not set for related pages, the zIndex values of all pages are the same. + * In this case, the pages are rendered in the order in which they are added to + * the component tree(that is, the sequence of page indexes). In light of this, + * to control the rendering levels of pages, set the zIndex attribute of the pages. + *

+ * + * @param { TabsCustomContentTransitionCallback } delegate - Custom content transition animation. + * @returns { TabsAttribute } The attribute of the tabs. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + customContentTransition(delegate: TabsCustomContentTransitionCallback | undefined): this; + /** + * Sets the background blur style of the tab bar. + * + * @param { BlurStyle } value - Background blur style of the tab bar. Default value is BlurStyle.NONE. + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barBackgroundBlurStyle(value: BlurStyle | undefined): this; + /** + * Setting page flip mode on mouse wheel event. + * + * @param { Optional } mode - page flip mode on mouse wheel event. The default value is PageFlipMode.CONTINUOUS. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + pageFlipMode(mode: PageFlipMode | undefined): this; + /** + * Set the BlurStyle of the tab bar. + * + * @param { BlurStyle } style - style indicate the blur style for the tab bar + * @param { BackgroundBlurStyleOptions } options - options indicate the options for the tab bar + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barBackgroundBlurStyle(style: BlurStyle | undefined, options: BackgroundBlurStyleOptions | undefined): this; + /** + * Set the BackgroundEffect of the tab bar. + * + * @param { BackgroundEffectOptions } options - options indicate the options for the tab bar + * @returns { TabsAttribute } the attribute of the tabs + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + barBackgroundEffect(options: BackgroundEffectOptions | undefined): this; + /** + * Triggered when a new page is about to be displayed. + * Anonymous Object Rectification + * + *

NOTE: + *
This event is triggered when any of the following conditions is met: + * 1. When the user swipes on the TabContent component (provided that it supports swiping) to switch to a new page. + * 2. When TabsController.changeIndex is called to switch to a new page. + * 3. When the **index** attribute is changed to switch to a new page. + * 4. When the user clicks a tab on the tab bar to switch to a new page. + * 5. When the user presses the left or right arrow key on the keyboard to switch to a new page + * while the tab bar is focused. + *

+ * + * @param { OnTabsContentWillChangeCallback } handler + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onContentWillChange(handler: OnTabsContentWillChangeCallback | undefined): this; + /** + * Sets the maximum number of child components to be cached. + * + * @param { number } count - the maximum number of child components to be cached. + * @param { TabsCacheMode } mode - the mode of caching child components. + * @returns { TabsAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + cachedMaxCount(count: number | undefined, mode: TabsCacheMode | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; } - -/** - * Defines the Tab Content animated transition options. - * - * @interface TabContentAnimatedTransition - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ /** * Defines the Tab Content animated transition options. * @@ -2020,79 +918,35 @@ declare class TabsAttribute extends CommonMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface TabContentAnimatedTransition { - /** - * Defines the timeout of custom content transition animation. The unit is ms. - * If TabContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. - * - * @type { ?number } - * @default 1000 ms - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Defines the timeout of custom content transition animation. The unit is ms. - * If TabContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. - * - * @type { ?number } - * @default 1000 ms - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - timeout?: number; - - /** - * Called when custom content transition animation start. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Called when custom content transition animation start. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 12 - */ - /** - * Called when custom content transition animation start. - * Anonymous Object Rectification - * - * @type { Callback } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - transition: Callback; +export declare interface TabContentAnimatedTransition { + /** + * Defines the timeout of custom content transition animation. The unit is ms. + * If TabContentTransitionProxy.finishTransition() is not invoked, use the timeout as animation end time. + * + * @type { ?number } + * @default 1000 ms + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + timeout?: number; + /** + * Called when custom content transition animation start. + * Anonymous Object Rectification + * + * @type { Callback } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + transition: Callback; } - -/** - * The proxy of TabContentAnimatedTransition. - * - * @interface TabContentTransitionProxy - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ /** * The proxy of TabContentAnimatedTransition. * @@ -2101,117 +955,47 @@ declare interface TabContentAnimatedTransition { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ -declare interface TabContentTransitionProxy { - /** - * The index of current tab content. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * The index of current tab content. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - from: number; - - /** - * The index of target tab content. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * The index of target tab content. - * - * @type { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - to: number; - - /** - * Notifies Tabs component the custom content transition animation is complete. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @since 11 - */ - /** - * Notifies Tabs component the custom content transition animation is complete. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - finishTransition(): void; +export declare interface TabContentTransitionProxy { + /** + * The index of current tab content. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + from: number; + /** + * The index of target tab content. + * + * @type { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + to: number; + /** + * Notifies Tabs component the custom content transition animation is complete. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + finishTransition(): void; } -/** - * Defines Tabs Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Tabs Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines Tabs Component. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const Tabs: TabsInterface; - -/** - * Defines Tabs Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Defines Tabs Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines Tabs Component instance. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ -declare const TabsInstance: TabsAttribute; +@memo +@ComponentBuilder +export declare function Tabs( + options?: TabsOptions, + @memo + content_?: () => void, +): TabsAttribute \ No newline at end of file diff --git a/api/@ohos.animator.d.ts b/api/@ohos.animator.d.ts index 7b40c6e1ec..37a11c28b7 100644 --- a/api/@ohos.animator.d.ts +++ b/api/@ohos.animator.d.ts @@ -12,856 +12,403 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ import { FillMode, PlayMode } from './arkui/component/enums'; import { ExpectedFrameRateRange } from './arkui/component/common'; -/*** endif */ -/** - * Defines the animator options. - * @interface AnimatorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ -/** - * Defines the animator options. - * @interface AnimatorOptions - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + /** * Defines the animator options. * @interface AnimatorOptions * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface AnimatorOptions { - /** - * Duration of the animation, in milliseconds. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Duration of the animation, in milliseconds. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Duration of the animation, in milliseconds. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration: number; - - /** - * Time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * The default value is ease. - * @type {string} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * The default value is ease. - * @type {string} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * interpolating-spring(velocity, mass, stiffness, damping), interpolating spring curve. - * The default value is ease. - * @type {string} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - easing: string; - - /** - * Delay for the animation start. The default value indicates no delay. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Delay for the animation start. The default value indicates no delay. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Delay for the animation start. The default value indicates no delay. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - delay: number; - - /** - * Whether to resume to the initial state after the animation is executed. - * none: The initial state is restored after the animation is executed. - * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @type {"none" | "forwards" | "backwards" | "both"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Whether to resume to the initial state after the animation is executed. - * none: The initial state is restored after the animation is executed. - * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @type {"none" | "forwards" | "backwards" | "both"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Whether to resume to the initial state after the animation is executed. - * none: The initial state is restored after the animation is executed. - * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. - * @type {"none" | "forwards" | "backwards" | "both"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - fill: "none" | "forwards" | "backwards" | "both"; - - /** - * The animation playback mode. - * The default value is "normal". - * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation playback mode. - * The default value is "normal". - * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation playback mode. - * The default value is "normal". - * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; - - /** - * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - iterations: number; - - /** - * Starting point of animator interpolation. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Starting point of animator interpolation. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Starting point of animator interpolation. - * The default value is 0. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - begin: number; - - /** - * Ending point of Dynamic Interpolation - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Ending point of Dynamic Interpolation - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ending point of Dynamic Interpolation - * The default value is 1. - * @type {number} - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - end: number; + + + /** + * Duration of the animation, in milliseconds. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + duration: number; + + + /** + * Time curve of the animation. For details about the supported types. + * linear The animation speed keeps unchanged. + * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). + * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). + * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). + * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). + * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). + * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). + * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). + * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). + * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). + * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). + * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). + * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). + * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. + * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. + * interpolating-spring(velocity, mass, stiffness, damping), interpolating spring curve. + * The default value is ease. + * @type {string} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + easing: string; + + + /** + * Delay for the animation start. The default value indicates no delay. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + delay: number; + + + /** + * Whether to resume to the initial state after the animation is executed. + * none: The initial state is restored after the animation is executed. + * forwards: The state at the end of the animation (defined in the last key frame) is retained after the animation is executed. + * @type {"none" | "forwards" | "backwards" | "both"} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fill: "none" | "forwards" | "backwards" | "both"; + + + /** + * The animation playback mode. + * The default value is "normal". + * @type {"normal" | "reverse" | "alternate" | "alternate-reverse"} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + direction: "normal" | "reverse" | "alternate" | "alternate-reverse"; + + + /** + * Number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. + * The default value is 1. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + iterations: number; + + + /** + * Starting point of animator interpolation. + * The default value is 0. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + begin: number; + + + /** + * Ending point of Dynamic Interpolation + * The default value is 1. + * @type {number} + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + end: number; } - /** * Defines the SimpleAnimatorOptions class. * * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export declare class SimpleAnimatorOptions { - /** - * constructor. - * - * @param { number } begin - Starting point of animator interpolation. - * @param { number } end - Ending point of animator interpolation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(begin: number, end: number); - - /** - * Set duration of the animation, in milliseconds. - * - * @param { number } duration - if not set, default is 1000. - * @returns { SimpleAnimatorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - duration(duration: number): SimpleAnimatorOptions; - - /** - * Set time curve of the animation. For details about the supported types. - * linear The animation speed keeps unchanged. - * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). - * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). - * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). - * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). - * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). - * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). - * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). - * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). - * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). - * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). - * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). - * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). - * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. - * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. - * @param { string } curve - if not set, default is ease. - * @returns { SimpleAnimatorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - easing(curve: string): SimpleAnimatorOptions; - - /** - * Set delay for the animation start. The default value indicates no delay. - * - * @param { number } delay - if not set, default is 0. - * @returns { SimpleAnimatorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - delay(delay: number): SimpleAnimatorOptions; - - /** - * Set FillMode of animation. FillMode indicates whether to resume to the initial state after the animation is executed. - * - * @param { FillMode } fillMode - if not set, default is FillMode.Forwards. - * @returns { SimpleAnimatorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - fill(fillMode: FillMode): SimpleAnimatorOptions; - - /** - * Set the animation playback mode. - * - * @param { PlayMode } direction - if not set, default is PlayMode.Normal. - * @returns { SimpleAnimatorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - direction(direction: PlayMode): SimpleAnimatorOptions; - - /** - * Set number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. - * - * @param { number } iterations - if not set, default is 1. - * @returns { SimpleAnimatorOptions } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - iterations(iterations: number): SimpleAnimatorOptions; + /** + * constructor. + * + * @param { number } begin - Starting point of animator interpolation. + * @param { number } end - Ending point of animator interpolation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + constructor(begin: number, end: number); + /** + * Set duration of the animation, in milliseconds. + * + * @param { number } duration - if not set, default is 1000. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + duration(duration: number): SimpleAnimatorOptions; + /** + * Set time curve of the animation. For details about the supported types. + * linear The animation speed keeps unchanged. + * ease The animation starts and ends at a low speed, cubic-bezier(0.25, 0.1, 0.25, 1.0). + * ease-in The animation starts at a low speed, cubic-bezier(0.42, 0.0, 1.0, 1.0). + * ease-out The animation ends at a low speed, cubic-bezier(0.0, 0.0, 0.58, 1.0). + * ease-in-out The animation starts and ends at a low speed, cubic-bezier(0.42, 0.0, 0.58, 1.0). + * fast-out-slow-in Standard curve, cubic-bezier(0.4, 0.0, 0.2, 1.0). + * linear-out-slow-in Deceleration curve, cubic-bezier(0.0, 0.0, 0.2, 1.0). + * fast-out-linear-in Acceleration curve, cubic-bezier(0.4, 0.0, 1.0, 1.0). + * friction Damping curve, cubic-bezier(0.2, 0.0, 0.2, 1.0). + * extreme-deceleration Extreme deceleration curve, cubic-bezier(0.0, 0.0, 0.0, 1.0). + * sharp Sharp curve, cubic-bezier(0.33, 0.0, 0.67, 1.0). + * rhythm Rhythm curve, cubic-bezier(0.7, 0.0, 0.2, 1.0). + * smooth Smooth curve, cubic-bezier(0.4, 0.0, 0.4, 1.0). + * cubic-bezier(x1, y1, x2, y2) You can customize an animation speed curve in the cubic-bezier() function. The x and y values of each input parameter must be between 0 and 1. + * Step curve. The number must be set and only an integer is supported, step-position is optional. It can be set to start or end. The default value is end. + * @param { string } curve - if not set, default is ease. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + easing(curve: string): SimpleAnimatorOptions; + /** + * Set delay for the animation start. The default value indicates no delay. + * + * @param { number } delay - if not set, default is 0. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + delay(delay: number): SimpleAnimatorOptions; + /** + * Set FillMode of animation. FillMode indicates whether to resume to the initial state after the animation is executed. + * + * @param { FillMode } fillMode - if not set, default is FillMode.Forwards. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + fill(fillMode: FillMode): SimpleAnimatorOptions; + /** + * Set the animation playback mode. + * + * @param { PlayMode } direction - if not set, default is PlayMode.Normal. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + direction(direction: PlayMode): SimpleAnimatorOptions; + /** + * Set number of times the animation will be played. number indicates a fixed number of playback operations, and -1 an unlimited number of playback operations. + * + * @param { number } iterations - if not set, default is 1. + * @returns { SimpleAnimatorOptions } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + iterations(iterations: number): SimpleAnimatorOptions; } -/** - * Defines the Animator result interface. - * @interface AnimatorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ -/** - * Defines the Animator result interface. - * @interface AnimatorResult - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + /** * Defines the Animator result interface. * @interface AnimatorResult * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface AnimatorResult { - /** - * Update the options for current animator. - * @param { AnimatorOptions } options - Options. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - * @deprecated since 9 - * @useinstead ohos.animator.reset - */ - update(options: AnimatorOptions): void; - - /** - * Reset the options for current animator. - * @param { AnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Reset the options for current animator. - * @param { AnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Reset the options for current animator. - * @param { AnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - reset(options: AnimatorOptions): void; - - /** - * Reset the options for current animator. - * @param { AnimatorOptions | SimpleAnimatorOptions } options - Options. - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - reset(options: AnimatorOptions | SimpleAnimatorOptions): void; - - /** - * Starts the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Starts the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Starts the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - play(): void; - - /** - * Ends the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Ends the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ends the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - finish(): void; - - /** - * Pauses the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Pauses the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Pauses the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - pause(): void; - - /** - * Cancels the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Cancels the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Cancels the animation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - cancel(): void; - - /** - * Plays the animation in reverse direction. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Plays the animation in reverse direction. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Plays the animation in reverse direction. - * Invalid when using interpolating-spring curve. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - reverse(): void; - - /** - * Trigger when vsync callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * Trigger when vsync callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Trigger when vsync callback. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onFrame - */ - onframe: (progress: number) => void; - - /** - * Trigger when vSync callback. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onFrame: (progress: number) => void; - - /** - * The animation is finished. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation is finished. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation is finished. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onFinish - */ - onfinish: () => void; - - /** - * The animation is finished. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onFinish: () => void; - - /** - * The animation is canceled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation is canceled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation is canceled. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onCancel - */ - oncancel: () => void; - - /** - * The animation is canceled. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onCancel: () => void; - - /** - * The animation is repeated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ - /** - * The animation is repeated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * The animation is repeated. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 12 - * @useinstead ohos.animator.onRepeat - */ - onrepeat: () => void; + + + /** + * Reset the options for current animator. + * @param { AnimatorOptions } options - Options. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + reset(options: AnimatorOptions): void; + /** + * Reset the options for current animator. + * @param { AnimatorOptions | SimpleAnimatorOptions } options - Options. + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @throws { BusinessError } 100001 - The specified page is not found or the object property list is not obtained. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + reset(options: AnimatorOptions | SimpleAnimatorOptions): void; + + + /** + * Starts the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + play(): void; + + + /** + * Ends the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + finish(): void; + + + /** + * Pauses the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + pause(): void; + + + /** + * Cancels the animation. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + cancel(): void; + + + /** + * Plays the animation in reverse direction. + * Invalid when using interpolating-spring curve. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + reverse(): void; + /** + * Trigger when vSync callback. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onFrame: (progress: number) => void; + /** + * The animation is finished. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onFinish: () => void; + /** + * The animation is canceled. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onCancel: () => void; + /** + * The animation is repeated. + * + * @type { function } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onRepeat: () => void; + /** + * The expected frame rate of dynamical of rate range. + * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void; +} - /** - * The animation is repeated. - * - * @type { function } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - onRepeat: () => void; - /** - * The expected frame rate of dynamical of rate range. - * @param { ExpectedFrameRateRange } rateRange - Indicates ExpectedFrameRateRange. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - setExpectedFrameRateRange(rateRange: ExpectedFrameRateRange): void; -} -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - */ -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Defines the Animator class. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ /** * Defines the Animator class. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ declare class Animator { - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 6 - * @deprecated since 9 - * @useinstead ohos.animator.create - */ - static createAnimator(options: AnimatorOptions): AnimatorResult; - - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - * @deprecated since 18 - * @useinstead ohos.arkui.UIContext.UIContext#createAnimator - */ - static create(options: AnimatorOptions): AnimatorResult; - - /** - * Create an animator object for custom animation. - * @param { AnimatorOptions | SimpleAnimatorOptions } options - Options. - * @returns { AnimatorResult } animator result - * @throws { BusinessError } 401 - Parameter error. Possible causes: - *
1. Mandatory parameters are left unspecified. - *
2. Incorrect parameters types. - *
3. Parameter verification failed. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'18','1.2':'20'} - * @arkts 1.1&1.2 - */ - static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; + /** + * Create an animator object for custom animation. + * @param { AnimatorOptions | SimpleAnimatorOptions } options - Options. + * @returns { AnimatorResult } animator result + * @throws { BusinessError } 401 - Parameter error. Possible causes: + *
1. Mandatory parameters are left unspecified. + *
2. Incorrect parameters types. + *
3. Parameter verification failed. + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + static create(options: AnimatorOptions | SimpleAnimatorOptions): AnimatorResult; } - export default Animator; diff --git a/api/@ohos.arkui.ArcAlphabetIndexer.d.ts b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts index d8561313e2..b4442d01c8 100755 --- a/api/@ohos.arkui.ArcAlphabetIndexer.d.ts +++ b/api/@ohos.arkui.ArcAlphabetIndexer.d.ts @@ -1,5 +1,5 @@ /* - * Copyright (c) 2024 Huawei Device Co., Ltd. + * Copyright (c) 2021-2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -12,277 +12,427 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - +import { CommonMethod, BlurStyle, Bindable } from './common'; +import { ResourceColor, Length, Position } from "./units"; +import { Font } from "./units"; +import { memo, ComponentBuilder } from "./../stateManagement/runtime"; +import { AttributeModifier, CommonMethod } from "./common"; /** - * Define the initialization parameters of the arc alphabet index bar + * indexer align property. * - * @typedef ArcAlphabetIndexerInitInfo - * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @enum { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ -declare interface ArcAlphabetIndexerInitInfo { - /** - * Array of alphabetic indexed strings, cannot be set to empty. - * - * @type { string[] } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - arrayValue: string[]; - /** - * The index value of the initial selected item. - * - * @type { number } - If it is out of the index range, the default value is 0 - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selected: number; +export declare enum IndexerAlign { + /** + * A dialog box is displayed on the right of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Left, + /** + * A dialog box is displayed on the left of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + Right, + /** + * A dialog box is displayed on the start of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + START, + /** + * A dialog box is displayed on the end of the index bar. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + END } - /** - * Callback when index bar is selected. - * - * @typedef { function } OnSelectCallback - * @param { number } index - the selected index - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ -declare type OnSelectCallback = (index: number) => void; - -/** - * Arc Alphabet index bar. + * AlphabetIndexer constructor options. * - * @interface ArcAlphabetIndexerInterface - * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @interface AlphabetIndexerOptions + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ -export interface ArcAlphabetIndexerInterface { - /** - * Create ArcAlphabetIndexer component - * - * ArrayValue: Alphabetical index string array. - * selected: ID of the selected item. - * - * @param { ArcAlphabetIndexerInitInfo } info - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - (info: ArcAlphabetIndexerInitInfo): ArcAlphabetIndexerAttribute; +export interface AlphabetIndexerOptions { + /** + * Alphabetical index string array. + * Anonymous Object Rectification. + * + * @type { Array } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + arrayValue: Array; + /** + * ID of the selected item. + * + * @type { number | Bindable } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selected: number | Bindable; } - /** - * Defines the arc alphabet index bar attribute functions. + * Defines an AlphabetIndexer callback when onSelect. * - * @extends CommonMethod - * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @typedef { function } OnAlphabetIndexerSelectCallback + * @param { number } index - selected index + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ -declare class ArcAlphabetIndexerAttribute extends CommonMethod { - /** - * Definitions text color. - * - * @param { Optional } color - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - color(color: Optional): ArcAlphabetIndexerAttribute; - - /** - * Selected text color. - * - * @param { Optional } color - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedColor(color: Optional): ArcAlphabetIndexerAttribute; - - /** - * Font color of the pop-up prompt text. - * - * @param { Optional } color - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - popupColor(color: Optional): ArcAlphabetIndexerAttribute; - - /** - * Select the text background color. - * - * @param { Optional } color - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedBackgroundColor(color: Optional): ArcAlphabetIndexerAttribute; - - /** - * Background color of the pop-up window. - * - * @param { Optional } color - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - popupBackground(color: Optional): ArcAlphabetIndexerAttribute; - - /** - * Whether to use pop-up index hints. - * - * @param { Optional } enabled - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - usePopup(enabled: Optional): ArcAlphabetIndexerAttribute; - - /** - * Selected text style. - * - * @param { Optional } font - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selectedFont(font: Optional): ArcAlphabetIndexerAttribute; - - /** - * Popup text style. - * - * @param { Optional } font - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - popupFont(font: Optional): ArcAlphabetIndexerAttribute; - - /** - * Definitions fonts. - * - * @param { Optional } font - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - font(font: Optional): ArcAlphabetIndexerAttribute; - - /** - * Size of the letter area on the letter index bar. The letter area is a circle. Set the diameter of the circle. - * - * @param { Optional } size - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - itemSize(size: Optional): ArcAlphabetIndexerAttribute; - - /** - * Sets the selected index. - * - * @param { Optional } index - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - selected(index: Optional): ArcAlphabetIndexerAttribute; - - /** - * Automatically collapses the characters when the indexer bar not enough to display all characters. - * - * @param { Optional } enable - A boolean value determines whether auto collapses is enabled for indexer bar. - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - autoCollapse(enable: Optional): ArcAlphabetIndexerAttribute; - - /** - * Index bar selection callback. - * - * @param { Optional } handler - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - onSelect(handler: Optional): ArcAlphabetIndexerAttribute; - - /** - * Set the background blurStyle of the pop-up window. - * - * @param { Optional } style - * @returns { ArcAlphabetIndexerAttribute } - * @syscap SystemCapability.ArkUI.ArkUI.Circle - * @crossplatform - * @atomicservice - * @since 18 - */ - popupBackgroundBlurStyle(style: Optional): ArcAlphabetIndexerAttribute; -} - +export type OnAlphabetIndexerSelectCallback = (index: number) => void; /** - * Defines ArcAlphabetIndexer Component. + * Defines an AlphabetIndexer callback when onPopupSelect. * - * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @typedef { function } OnAlphabetIndexerPopupSelectCallback + * @param { number } index - selected index + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ -declare const ArcAlphabetIndexer: ArcAlphabetIndexerInterface; - +export type OnAlphabetIndexerPopupSelectCallback = (index: number) => void; /** - * Defines ArcAlphabetIndexer Component instance. + * Defines an AlphabetIndexer callback when onRequestPopupData. * - * @syscap SystemCapability.ArkUI.ArkUI.Circle + * @typedef { function } OnAlphabetIndexerRequestPopupDataCallback + * @param { number } index - selected index + * @returns { Array } string array corresponding to the index + * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 18 + * @since 20 */ -declare const ArcAlphabetIndexerInstance: ArcAlphabetIndexerAttribute; \ No newline at end of file +export type OnAlphabetIndexerRequestPopupDataCallback = (index: number) => Array; +export declare interface AlphabetIndexerAttribute extends CommonMethod { + /** + * Definitions color. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + color(value: ResourceColor | undefined): this; + /** + * Select the text color. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedColor(value: ResourceColor | undefined): this; + /** + * Font color of the pop-up prompt text. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupColor(value: ResourceColor | undefined): this; + /** + * Select the text background color. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedBackgroundColor(value: ResourceColor | undefined): this; + /** + * Background color of the pop-up window index. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupBackground(value: ResourceColor | undefined): this; + /** + * Set the selected font color of non-alphabetic part of the pop-up window. + * + * @param { ResourceColor } value - indicates the color of the selected font. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupSelectedColor(value: ResourceColor | undefined): this; + /** + * Set the unselected font color of non-alphabetic part of the pop-up window. + * + * @param { ResourceColor } value - indicates the color of the unselected font. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupUnselectedColor(value: ResourceColor | undefined): this; + /** + * Set the background color of non-alphabetic part of the pop-up window. + * + * @param { ResourceColor } value - indicates the color of background. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupItemBackgroundColor(value: ResourceColor | undefined): this; + /** + * Whether to use pop-up index hints. + * + * @param { boolean } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + usingPopup(value: boolean | undefined): this; + /** + * Select the text text style, + * + * @param { Font } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selectedFont(value: Font | undefined): this; + /** + * Select the text background color. + * + * @param { Font } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupFont(value: Font | undefined): this; + /** + * Set the font style of non-alphabetic part of the prompt pop-up window. + * Family and style are not supported currently and will be fixed in future. + * + * @param { Font } value - indicates the style of the font. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupItemFont(value: Font | undefined): this; + /** + * Size of the letter area on the letter index bar. The letter area is a square. Set the length of the square side. + * + * @param { string | number } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + itemSize(value: string | number | undefined): this; + /** + * Definitions fonts. + * + * @param { Font } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + font(value: Font | undefined): this; + /** + * Alphabet index bar alignment style. The left and right alignment styles are supported, + * which affects the pop-up position of the pop-up window. + * + * @param { IndexerAlign } value - indicates the alignment style of Alphabet index. + * @param { Length } [offset] - indicates the horizontal space between pop-up window and indexer bar. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + alignStyle(value: IndexerAlign | undefined, offset?: Length | undefined): this; + /** + * Index bar selection callback. + * Anonymous Object Rectification. + * + * @param { OnAlphabetIndexerSelectCallback } callback + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onSelect(callback: OnAlphabetIndexerSelectCallback | undefined): this; + /** + * Index bar selection callback and return the strings which display on pop-up. + * Anonymous Object Rectification. + * + * @param { OnAlphabetIndexerRequestPopupDataCallback } callback + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onRequestPopupData(callback: OnAlphabetIndexerRequestPopupDataCallback | undefined): this; + /** + * Pop-up selection callback. + * Anonymous Object Rectification. + * + * @param { OnAlphabetIndexerPopupSelectCallback } callback + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + onPopupSelect(callback: OnAlphabetIndexerPopupSelectCallback | undefined): this; + /** + * Sets the selected index. + * + * @param { number | Bindable } index + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + selected(index: number | Bindable | undefined): this; + /** + * Position of the pop-up windows, relative to the midpoint of the top border of the indexer bar. + * + * @param { Position } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupPosition(value: Position | undefined): this; + /** + * Automatically collapses the characters when the indexer bar not high enough to display all characters. + * + * @param { boolean } value - A boolean value determines whether auto collapses is enabled for indexer bar. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + autoCollapse(value: boolean | undefined): this; + /** + * Set the radius of the item of the pop-up window. + * + * @param { number } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupItemBorderRadius(value: number | undefined): this; + /** + * Set the radius of the item of the indexer. + * + * @param { number } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + itemBorderRadius(value: number | undefined): this; + /** + * Set the background blurStyle of title of the pop-up window. + * + * @param { BlurStyle } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupBackgroundBlurStyle(value: BlurStyle | undefined): this; + /** + * Set the background color of title of the pop-up window. + * + * @param { ResourceColor } value + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @atomicservice + * @since 20 + */ + popupTitleBackground(value: ResourceColor | undefined): this; + /** + * Enable or disable haptic feedback. + * + * @param { boolean } value - Default value is true, set false to disable haptic feedback. + * @returns { AlphabetIndexerAttribute } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @atomicservice + * @since 20 + */ + enableHapticFeedback(value: boolean | undefined): this; + attributeModifier(modifier: AttributeModifier | AttributeModifier | undefined): this; +} + +@memo +@ComponentBuilder +export declare function AlphabetIndexer( + options: AlphabetIndexerOptions, + @memo + content_?: () => void, +): AlphabetIndexerAttribute \ No newline at end of file diff --git a/api/@ohos.arkui.shape.d.ts b/api/@ohos.arkui.shape.d.ts index 3274f282b2..aed6718452 100644 --- a/api/@ohos.arkui.shape.d.ts +++ b/api/@ohos.arkui.shape.d.ts @@ -12,16 +12,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ - -/*** if arkts 1.2 */ -import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units' -/*** endif */ - +import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/units'; /** * Interface for shape size properties. * @@ -30,33 +25,28 @@ import { Position, ResourceColor, Length, SizeOptions } from './arkui/component/ * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface ShapeSize { - /** - * Defines the width of Shape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - width?: number | string; - - /** - * Defines the height of Shape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - height?: number | string; + /** + * Defines the width of Shape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + */ + width?: number | string; + /** + * Defines the height of Shape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + */ + height?: number | string; } - /** * Interface for RectShape constructor parameters. * @@ -66,22 +56,19 @@ export interface ShapeSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface RectShapeOptions extends ShapeSize { - /** - * Defines the corner radius of the RectShape. - * @type { ? (number | string | Array) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - radius?: number | string | Array; + /** + * Defines the corner radius of the RectShape. + * @type { ? (number | string | Array) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + */ + radius?: number | string | Array; } - /** * Interface for RectShape constructor parameters with separate radius values. * @@ -91,33 +78,28 @@ export interface RectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface RoundRectShapeOptions extends ShapeSize { - /** - * Defines the width of the corner radius for RectShape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - radiusWidth?: number | string; - - /** - * Defines the height of the corner radius for RectShape. - * @type { ? (number | string) } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - radiusHeight?: number | string; + /** + * Defines the width of the corner radius for RectShape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + */ + radiusWidth?: number | string; + /** + * Defines the height of the corner radius for RectShape. + * @type { ? (number | string) } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + */ + radiusHeight?: number | string; } - /** * Interface for PathShape constructor parameters. * @@ -126,22 +108,19 @@ export interface RoundRectShapeOptions extends ShapeSize { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export interface PathShapeOptions { - /** - * Defines the commands for drawing the PathShape. - * @type { ?string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - commands?: string; + /** + * Defines the commands for drawing the PathShape. + * @type { ?string } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @form + * @atomicservice + * @since 20 + */ + commands?: string; } - /** * Common shape method class * @@ -149,53 +128,46 @@ export interface PathShapeOptions { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare class CommonShapeMethod { - /** - * Sets coordinate offset relative to the layout completion position. - * - * @param { Position } offset - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - offset(offset: Position): T; - - /** - * Sets the fill color of the shape. - * - * @param { ResourceColor } color - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - fill(color: ResourceColor): T; - - /** - * Sets the position of the shape. - * - * @param { Position } position - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - position(position: Position): T; + /** + * Sets coordinate offset relative to the layout completion position. + * + * @param { Position } offset + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + offset(offset: Position): T; + /** + * Sets the fill color of the shape. + * + * @param { ResourceColor } color + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + fill(color: ResourceColor): T; + /** + * Sets the position of the shape. + * + * @param { Position } position + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + position(position: Position): T; } - /** * Base shape class * @@ -204,209 +176,183 @@ declare class CommonShapeMethod { * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ declare class BaseShape extends CommonShapeMethod { - /** - * Sets the width of the shape. - * - * @param { Length } width - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - width(width: Length): T; - - /** - * Sets the height of the shape. - * - * @param { Length } height - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - height(height: Length): T; - - /** - * Sets the size of the shape. - * - * @param { SizeOptions } size - * @returns { T } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - size(size: SizeOptions): T; + /** + * Sets the width of the shape. + * + * @param { Length } width + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + width(width: Length): T; + /** + * Sets the height of the shape. + * + * @param { Length } height + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + height(height: Length): T; + /** + * Sets the size of the shape. + * + * @param { SizeOptions } size + * @returns { T } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + size(size: SizeOptions): T; } - /** * Defines a rect drawing class. - * + * * @extends BaseShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export declare class RectShape extends BaseShape { - /** - * Constructor. - * - * @param { RectShapeOptions | RoundRectShapeOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(options?: RectShapeOptions | RoundRectShapeOptions); - - /** - * Sets the width of the corner radius for RectShape. - * - * @param { number | string } rWidth - * @returns { RectShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - radiusWidth(rWidth: number | string): RectShape; - - /** - * Sets the height of the corner radius for RectShape. - * - * @param { number | string } rHeight - * @returns { RectShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - radiusHeight(rHeight: number | string): RectShape; - - /** - * Sets the corner radius for RectShape. - * - * @param { number | string | Array } radius - * @returns { RectShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - radius(radius: number | string | Array): RectShape; + /** + * Constructor. + * + * @param { RectShapeOptions | RoundRectShapeOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + constructor(options?: RectShapeOptions | RoundRectShapeOptions); + /** + * Sets the width of the corner radius for RectShape. + * + * @param { number | string } rWidth + * @returns { RectShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + radiusWidth(rWidth: number | string): RectShape; + /** + * Sets the height of the corner radius for RectShape. + * + * @param { number | string } rHeight + * @returns { RectShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + radiusHeight(rHeight: number | string): RectShape; + /** + * Sets the corner radius for RectShape. + * + * @param { number | string | Array } radius + * @returns { RectShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + radius(radius: number | string | Array): RectShape; } - /** * Defines a circle drawing class. - * + * * @extends BaseShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export declare class CircleShape extends BaseShape { - /** - * Constructor. - * - * @param { ShapeSize } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(options?: ShapeSize); + /** + * Constructor. + * + * @param { ShapeSize } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + constructor(options?: ShapeSize); } - /** * Defines an ellipse drawing class. - * + * * @extends BaseShape * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export declare class EllipseShape extends BaseShape { - /** - * Constructor. - * - * @param { ShapeSize } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(options?: ShapeSize); + /** + * Constructor. + * + * @param { ShapeSize } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + constructor(options?: ShapeSize); } - /** * Defines a path drawing class. - * + * * @extends CommonShapeMethod * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 20 */ export declare class PathShape extends CommonShapeMethod { - /** - * Constructor. - * - * @param { PathShapeOptions } options - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - constructor(options?: PathShapeOptions); - - /** - * Sets the commands for drawing the PathShape. - * - * @param { string } commands - * @returns { PathShape } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 - */ - commands(commands: string): PathShape; -} \ No newline at end of file + /** + * Constructor. + * + * @param { PathShapeOptions } options + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + constructor(options?: PathShapeOptions); + /** + * Sets the commands for drawing the PathShape. + * + * @param { string } commands + * @returns { PathShape } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + commands(commands: string): PathShape; +} diff --git a/api/@ohos.curves.d.ts b/api/@ohos.curves.d.ts index 6e9f42033b..4556305b81 100644 --- a/api/@ohos.curves.d.ts +++ b/api/@ohos.curves.d.ts @@ -12,36 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - /** * @file * @kit ArkUI */ -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ -/** - * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. - * - * @namespace curves - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ + + /** * Contains interpolator functions such as initialization, third-order Bezier curves, and spring curves. * @@ -51,993 +28,438 @@ * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ declare namespace curves { - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * enum Curve. - * - * @enum { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - export enum Curve { - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Linear. Indicates that the animation has the same velocity from start to finish. - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ + + + /** - * Linear. Indicates that the animation has the same velocity from start to finish. + * enum Curve. * + * @enum { number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ - Linear, - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, - * CubicBezier(0.25, 0.1, 0.25, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - Ease, - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). - * + export enum Curve { + + + + /** + * Linear. Indicates that the animation has the same velocity from start to finish. + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + Linear, + + + + /** + * Ease. Indicates that the animation starts at a low speed, then speeds up, and slows down before the end, + * CubicBezier(0.25, 0.1, 0.25, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + Ease, + + + + /** + * EaseIn. Indicates that the animation starts at a low speed, Cubic Bezier (0.42, 0.0, 1.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + EaseIn, + + + + /** + * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + EaseOut, + + + + /** + * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + EaseInOut, + + + + /** + * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + FastOutSlowIn, + + + + /** + * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + LinearOutSlowIn, + + + + /** + * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + FastOutLinearIn, + + + + /** + * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + ExtremeDeceleration, + + + + /** + * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + Sharp, + + + + /** + * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + Rhythm, + + + + /** + * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + Smooth, + + + + /** + * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). + * + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + Friction + } + + + + /** + * Interface for curve object. + * + * @interface ICurve * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 - */ - EaseIn, - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * EaseOut. Indicates that the animation ends at low speed, CubicBezier (0.0, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - EaseOut, - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * EaseInOut. Indicates that the animation starts and ends at low speed, CubicBezier (0.42, 0.0, 0.58, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - EaseInOut, - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * FastOutSlowIn. Standard curve, cubic-bezier (0.4, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - FastOutSlowIn, - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ - /** - * LinearOutSlowIn. Deceleration curve, cubic-bezier (0.0, 0.0, 0.2, 1.0). - * + export interface ICurve { + + + + /** + * Get curve value by fraction. + * + * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. + * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. + * @returns { number } + * @syscap SystemCapability.ArkUI.ArkUI.Full + * @crossplatform + * @form + * @atomicservice + * @since 20 + */ + interpolate(fraction: number): number; + } + + + /** + * Implements initialization for the interpolation curve, + * which is used to create an interpolation curve based on the input parameter. + * + * @param { Curve } [curve] - Curve type.
Default value: **Curve.Linear**. + * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ - LinearOutSlowIn, + export function initCurve(curve?: Curve): ICurve; + + /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * FastOutLinearIn. Acceleration curve, cubic-bezier (0.4, 0.0, 1.0, 1.0). + * Creates a step curve. * + * @param { number } count - Number of steps. The value must be a positive integer.
Value range: [1, +∞). + *

**NOTE**: + *
A value less than 1 evaluates to the value **1**. + *

+ * @param { boolean } end -Whether jumping occurs when the interpolation ends. + * **true**: Jumping occurs when the interpolation ends. + * *false**: Jumping occurs when the interpolation starts. + * @returns { ICurve } Interpolation curve. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 - */ - FastOutLinearIn, - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ + export function stepsCurve(count: number, end: boolean): ICurve; + /** - * ExtremeDeceleration. Abrupt curve, cubic-bezier (0.0, 0.0, 0.0, 1.0). + * Creates a custom curve. * + * @param { function } interpolate - Custom interpolation callback.fraction: input x value for interpolation. + * when the animation starts. Value range: [0, 1]The return value is the y value of the curve. Value range: [0, 1]. + *

**NOTE**: + *
If fraction is 0, the return value 0 corresponds to the animation start point; any other return value means that + *
the animation jumps at the start point.If fraction is 1, the return value 1 corresponds to the animation + *
end point; any other return value means that the end value of the animation is not the value of the state + *
variable, which will result in an effect of transition from that end value to the value of the state variable. + *

+ * @returns { ICurve } Interpolation curve. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ - ExtremeDeceleration, + export function customCurve(interpolate: (fraction: number) => number): ICurve; + + /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Sharp. Sharp curves, cubic-bezier (0.33, 0.0, 0.67, 1.0). + * Creates a cubic Bezier curve. The curve values must be between 0 and 1. * + * @param { number } x1 - X coordinate of the first point on the Bezier curve.
Value range: [0, 1]. + *

**NOTE**: + *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. + *

+ * @param { number } y1 - Y coordinate of the first point on the Bezier curve.
Value range: (-∞, +∞). + * @param { number } x2 - X coordinate of the second point on the Bezier curve.
Value range: [0, 1]. + *

**NOTE**: + *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. + *

+ * @param { number } y2 - Y coordinate of the second point on the Bezier curve.
Value range: (-∞, +∞). + * @returns { ICurve } Interpolation curve. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 - */ - Sharp, - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ + export function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; + + /** - * Rhythm. Rhythmic curve, cubic-bezier (0.7, 0.0, 0.2, 1.0). + * Creates a spring curve. The curve shape is subject to the spring parameters, and the animation duration + * is subject to the **duration** parameter in **animation** and **animateTo**. * + * @param { number } velocity - Initial velocity. It is applied by external factors to the spring animation, + * designed to help ensure the smooth transition from the previous motion state. The velocity is the normalized + * velocity, and its value is equal to the actual velocity at the beginning of the animation divided by the + * animation attribute change value.Value range: (-∞, +∞). + * @param { number } mass - Mass, which influences the inertia in the spring system. The greater the mass, + * the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. + * Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value 1 is used. + *

+ * @param { number } stiffness - Stiffness.It is the degree to which an object deforms by resisting the force + * applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, + * and the faster the speed of restoring to the equilibrium position.Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value 1 is used. + *

+ * @param { number } damping -Damping. It is used to describe the oscillation and attenuation of the system + * after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, + * and the smaller the oscillation amplitude.Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value 1 is used. + *

+ * @returns { ICurve } Interpolation curve. * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 - */ - Rhythm, - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ + export function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + + /** - * Smooth. Smooth curves, cubic-bezier (0.4, 0.0, 0.4, 1.0). + * Creates a spring animation curve. + * If multiple spring animations are applied to the same attribute of an object, + * each animation replaces their predecessor and inherits the velocity. * + * @param { number } [response] Duration of one complete oscillation. + *
Default value: **0.55**.
Unit: second
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the default value **0.55** is used. + *

+ * @param { number } [dampingFraction] Damping coefficient. + * **0**: undamped. In this case, the spring oscillates forever.
> 0 and < 1: underdamped. + * In this case, the spring overshoots the equilibrium position.
**1**: critically damped. + * 1: overdamped. In this case, the spring approaches equilibrium gradually.
Default value: **0.825**. + * Unit: second. + * Value range: [0, +∞). + *

**NOTE**: + *
A value less than 0 evaluates to the default value **0.825**. + *

+ * @param { number } [overlapDuration] Duration for animations to overlap, in seconds. + * When animations overlap, the **response** values of these animations will transit smoothly over this duratio + * if they are different.
Default value: **0**
Unit: second
Value range: [0, +∞). + *

**NOTE** + *
A value less than 0 evaluates to the default value **0**. + *
The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and + * the previous velocity, rather than the **duration** parameter in animation, animateTo, or pageTransition. + * The time cannot be normalized. Therefore, the interpolation cannot be obtained using + * the **interpolate** function of the curve. + *

+ * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 - */ - Smooth, - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). - * - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 */ + export function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + + /** - * Friction. Damping curves, CubicBezier (0.2, 0.0, 0.2, 1.0). + * Creates a responsive spring animation curve. It is a special case of [springMotion](#curvesspringmotion9), + * with the only difference in the default values. It can be used together with **springMotion**. * + * @param { number } [response] See **response** in **springMotion**.
Default value: **0.15**. + * Unit: second
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the default value **0.15** is used. + *

+ * @param { number } [dampingFraction] See **dampingFraction** in **springMotion**.
Default value: **0.86**. + * Unit: second
Value range: [0, +∞). + *

**NOTE** + *
A value less than 0 evaluates to the default value **0.86**. + *

+ * @param { number } [overlapDuration] See **overlapDuration** in **springMotion**.
Default value: **0.25**. + * Unit: second
Value range: [0, +∞). + *

**NOTE**: + *
A value less than 0 evaluates to the default value **0.25**. + *
To apply custom settings for a spring animation, you are advised to use **springMotion**. + *
When using **responsiveSpringMotion**, you are advised to retain the default settings. + *
The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the + * previous velocity, rather than the duration parameter in animation, animateTo, or pageTransition. + *
In addition, the interpolation cannot be obtained using the **interpolate** function of the curve. + *

+ * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 - */ - Friction, - } - - /** - * Interface for curve object. - * - * @typedef ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Interface for curve object. - * - * @typedef ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Interface for curve object. - * - * @typedef ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Interface for curve object. - * - * @interface ICurve - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @form - * @atomicservice - * @since 20 - * @arkts 1.1&1.2 - */ - export interface ICurve { - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 */ + export function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; + /** - * Implements calculation. + * Creates an interpolating spring curve animated from 0 to 1. The actual animation value is calculated based + * on the curve. The animation duration is subject to the curve parameters, rather than the **duration** parameter + * in **animation** or **animateTo**. * - * @param { number } fraction - Current normalized time.
Value range: [0, 1]. + * @param { number } velocity - Initial velocity. It is applied by external factors to the spring animation, + * designed to help ensure the smooth transition from the previous motion state. + * The velocity is the normalized velocity, and its value is equal to the actual velocity at the beginning of + * the animation divided by the animation attribute change value.
Value range: (-∞, +∞). + * @param { number } mass - Mass, which influences the inertia in the spring system. The greater the mass, + * the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. + *
Value range: (0, +∞). *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. + *
If this parameter is set to a value less than or equal to 0, the value **1** is used. *

- * @returns { number } - Curve interpolation corresponding to the normalized time point. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since 11 - */ - /** - * Get curve value by fraction. - * - * @param { number } fraction -Indicates the current normalized time parameter. Value range: [0, 1]. - * Note: If the value is less than 0, it will be processed as 0. If the value is greater than 1, 1 is used. - * @returns { number } + * @param { number } stiffness - Stiffness. It is the degree to which an object deforms by resisting + * the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist + * deformation, and the faster the speed of restoring to the equilibrium position.
Value range: (0, +∞). + *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value **1** is used. + *

+ * @param { number } damping - Damping. It is used to describe the oscillation and attenuation of the system + * after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, + * and the smaller the oscillation amplitude.
Value range: (0, +∞)
+ *

**NOTE**: + *
If this parameter is set to a value less than or equal to 0, the value **1** is used. + *

+ * @returns { ICurve } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @form * @atomicservice * @since 20 - * @arkts 1.1&1.2 */ - interpolate(fraction: number): number; - } - - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] The default value is Curve.Linear - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] The default value is Curve.Linear - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Implements initialization for the interpolation curve, - * which is used to create an interpolation curve based on the input parameter. - * - * @param { Curve } [curve] - Curve type.
Default value: **Curve.Linear**. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function initCurve(curve?: Curve): ICurve; - - /** - * Initializes the interpolator curve when called. - * - * @param { Curve } [curve] - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead initCurve - */ - function init(curve?: Curve): string; - - /** - * Constructs a step curve when called. - * - * @param { number } count -The number of steps. The range of this value is [1, +∞). - * @param { boolean } end -A step change occurs at the start or end of each interval. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a step curve when called. - * - * @param { number } count -The number of steps. The range of this value is [1, +∞). - * @param { boolean } end -A step change occurs at the start or end of each interval. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates a step curve. - * - * @param { number } count - Number of steps. The value must be a positive integer.
Value range: [1, +∞). - *

**NOTE**: - *
A value less than 1 evaluates to the value **1**. - *

- * @param { boolean } end -Whether jumping occurs when the interpolation ends. - * **true**: Jumping occurs when the interpolation ends. - * *false**: Jumping occurs when the interpolation starts. - * @returns { ICurve } Interpolation curve. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function stepsCurve(count: number, end: boolean): ICurve; - - /** - * Constructs a custom curve when called. - * - * @param { function } interpolate - fraction range is [0,1], the return number must between [0,1]. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates a custom curve. - * - * @param { function } interpolate - Custom interpolation callback.fraction: input x value for interpolation. - * when the animation starts. Value range: [0, 1]The return value is the y value of the curve. Value range: [0, 1]. - *

**NOTE**: - *
If fraction is 0, the return value 0 corresponds to the animation start point; any other return value means that - *
the animation jumps at the start point.If fraction is 1, the return value 1 corresponds to the animation - *
end point; any other return value means that the end value of the animation is not the value of the state - *
variable, which will result in an effect of transition from that end value to the value of the state variable. - *

- * @returns { ICurve } Interpolation curve. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function customCurve(interpolate: (fraction: number) => number): ICurve; - - /** - * Constructs a step curve when called. - * - * @param { number } count - * @param { boolean } end - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead stepsCurve - */ - function steps(count: number, end: boolean): string; - - /** - * Constructs a third-order Bezier curve when called. - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a third-order Bezier curve when called. - * - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates a cubic Bezier curve. The curve values must be between 0 and 1. - * - * @param { number } x1 - X coordinate of the first point on the Bezier curve.
Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

- * @param { number } y1 - Y coordinate of the first point on the Bezier curve.
Value range: (-∞, +∞). - * @param { number } x2 - X coordinate of the second point on the Bezier curve.
Value range: [0, 1]. - *

**NOTE**: - *
A value less than 0 is handed as **0**. A value greater than 1 is handed as **1**. - *

- * @param { number } y2 - Y coordinate of the second point on the Bezier curve.
Value range: (-∞, +∞). - * @returns { ICurve } Interpolation curve. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function cubicBezierCurve(x1: number, y1: number, x2: number, y2: number): ICurve; - - /** - * Creates a cubic Bezier curve. The curve value must range from 0 to 1. This API is deprecated since API version 9. - * You are advised to use cubicBezierCurve instead. - * - * @param { number } x1 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y1 -Value range (-∞, +∞). - * @param { number } x2 -Value range [0, 1]. - * Note: If the value is less than 0, 0 is used. If the value is greater than 1, 1 is used. - * @param { number } y2 -Value range (-∞, +∞). - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead cubicBezierCurve - */ - function cubicBezier(x1: number, y1: number, x2: number, y2: number): string; - - /** - * Constructs a spring curve when called. For more information about the meaning of the parameter, see spring(). - * - * @param { number } velocity -Value range (-∞, +∞). - * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a spring curve when called. - * - * @param { number } velocity -Value range (-∞, +∞). - * @param { number } mass -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } stiffness -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @param { number } damping -Value range (0, +∞). Note: If the value is less than or equal to 0, 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates a spring curve. The curve shape is subject to the spring parameters, and the animation duration - * is subject to the **duration** parameter in **animation** and **animateTo**. - * - * @param { number } velocity - Initial velocity. It is applied by external factors to the spring animation, - * designed to help ensure the smooth transition from the previous motion state. The velocity is the normalized - * velocity, and its value is equal to the actual velocity at the beginning of the animation divided by the - * animation attribute change value.Value range: (-∞, +∞). - * @param { number } mass - Mass, which influences the inertia in the spring system. The greater the mass, - * the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. - * Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the value 1 is used. - *

- * @param { number } stiffness - Stiffness.It is the degree to which an object deforms by resisting the force - * applied. In an elastic system, the greater the stiffness, the stronger the ability to resist deformation, - * and the faster the speed of restoring to the equilibrium position.Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the value 1 is used. - *

- * @param { number } damping -Damping. It is used to describe the oscillation and attenuation of the system - * after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, - * and the smaller the oscillation amplitude.Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the value 1 is used. - *

- * @returns { ICurve } Interpolation curve. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function springCurve(velocity: number, mass: number, stiffness: number, damping: number): ICurve; - - /** - * Constructs a spring curve when called. - * - * @param { number } velocity -Initial velocity. An influence parameter of external factors on elastic dynamics, - * purpose is to ensure a smooth transition of the object from the previous state of motion to the elastic dynamics. - * @param { number } mass -Quality. The force object of the elastic system will have an inertial effect on elastic - * system. The greater the mass, the greater the amplitude of the oscillation. - * @param { number } stiffness -The degree to which an object is deformed by resisting the applied force. - * @param { number } damping -Pure number, Used to describe oscillation and decay of a system after being disturbed. - * @returns { string } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - * @deprecated since 9 - * @useinstead springCurve - */ - function spring(velocity: number, mass: number, stiffness: number, damping: number): string; - - /** - * Constructs a spring motion when called. - * - * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.55 is used. - * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.825 is used. - * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a spring motion when called. - * - * @param { number } [response] The default value is 0.55. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.55 is used. - * @param { number } [dampingFraction] The default value is 0.825. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.825 is used. - * @param { number } [overlapDuration] The default value is 0. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates a spring animation curve. - * If multiple spring animations are applied to the same attribute of an object, - * each animation replaces their predecessor and inherits the velocity. - * - * @param { number } [response] Duration of one complete oscillation. - *
Default value: **0.55**.
Unit: second
Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the default value **0.55** is used. - *

- * @param { number } [dampingFraction] Damping coefficient. - * **0**: undamped. In this case, the spring oscillates forever.
> 0 and < 1: underdamped. - * In this case, the spring overshoots the equilibrium position.
**1**: critically damped. - * 1: overdamped. In this case, the spring approaches equilibrium gradually.
Default value: **0.825**. - * Unit: second. - * Value range: [0, +∞). - *

**NOTE**: - *
A value less than 0 evaluates to the default value **0.825**. - *

- * @param { number } [overlapDuration] Duration for animations to overlap, in seconds. - * When animations overlap, the **response** values of these animations will transit smoothly over this duratio - * if they are different.
Default value: **0**
Unit: second
Value range: [0, +∞). - *

**NOTE** - *
A value less than 0 evaluates to the default value **0**. - *
The spring animation curve is physics-based. Its duration depends on the **springMotion** parameters and - * the previous velocity, rather than the **duration** parameter in animation, animateTo, or pageTransition. - * The time cannot be normalized. Therefore, the interpolation cannot be obtained using - * the **interpolate** function of the curve. - *

- * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function springMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; - - /** - * Constructs a responsive spring motion when called. - * - * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.15 is used. - * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.86 is used. - * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.25 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 9 - */ - /** - * Constructs a responsive spring motion when called. - * - * @param { number } [response] The default value is 0.15. Unit: seconds. Value range: (0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.15 is used. - * @param { number } [dampingFraction] The default value is 0.86. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.86 is used. - * @param { number } [overlapDuration] The default value is 0.25. Unit: seconds. Value range: [0, +∞). - * Note: If a value is set to 0 or less, the default value of 0.25 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates a responsive spring animation curve. It is a special case of [springMotion](#curvesspringmotion9), - * with the only difference in the default values. It can be used together with **springMotion**. - * - * @param { number } [response] See **response** in **springMotion**.
Default value: **0.15**. - * Unit: second
Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the default value **0.15** is used. - *

- * @param { number } [dampingFraction] See **dampingFraction** in **springMotion**.
Default value: **0.86**. - * Unit: second
Value range: [0, +∞). - *

**NOTE** - *
A value less than 0 evaluates to the default value **0.86**. - *

- * @param { number } [overlapDuration] See **overlapDuration** in **springMotion**.
Default value: **0.25**. - * Unit: second
Value range: [0, +∞). - *

**NOTE**: - *
A value less than 0 evaluates to the default value **0.25**. - *
To apply custom settings for a spring animation, you are advised to use **springMotion**. - *
When using **responsiveSpringMotion**, you are advised to retain the default settings. - *
The duration of the responsive spring animation depends on the **responsiveSpringMotion** parameters and the - * previous velocity, rather than the duration parameter in animation, animateTo, or pageTransition. - *
In addition, the interpolation cannot be obtained using the **interpolate** function of the curve. - *

- * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function responsiveSpringMotion(response?: number, dampingFraction?: number, overlapDuration?: number): ICurve; - - /** - * Constructs an interpolating spring curve when called, the animation duration can not be specified manually, - * and is determined by parameters of the curve. It produces values change from 0 to 1, and then uses interpolator - * to calculate the actual animation values. - * - * @param { number } velocity - the initial velocity of the spring, and is a normalized speed corresponding to the - * value changes from 0 to 1,specific value range (-∞, ∞). - * @param { number } mass - the mass of object in the mass-damper-spring system, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @param { number } stiffness - the stiffness of spring, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @param { number } damping - the damping value of spring, value range (0, +∞). - * Note: If the value is less than or equal to 0, the value 1 is used. - * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Creates an interpolating spring curve animated from 0 to 1. The actual animation value is calculated based - * on the curve. The animation duration is subject to the curve parameters, rather than the **duration** parameter - * in **animation** or **animateTo**. - * - * @param { number } velocity - Initial velocity. It is applied by external factors to the spring animation, - * designed to help ensure the smooth transition from the previous motion state. - * The velocity is the normalized velocity, and its value is equal to the actual velocity at the beginning of - * the animation divided by the animation attribute change value.
Value range: (-∞, +∞). - * @param { number } mass - Mass, which influences the inertia in the spring system. The greater the mass, - * the greater the amplitude of the oscillation, and the slower the speed of restoring to the equilibrium position. - *
Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the value **1** is used. - *

- * @param { number } stiffness - Stiffness. It is the degree to which an object deforms by resisting - * the force applied. In an elastic system, the greater the stiffness, the stronger the ability to resist - * deformation, and the faster the speed of restoring to the equilibrium position.
Value range: (0, +∞). - *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the value **1** is used. - *

- * @param { number } damping - Damping. It is used to describe the oscillation and attenuation of the system - * after being disturbed. The larger the damping, the smaller the number of oscillations of elastic motion, - * and the smaller the oscillation amplitude.
Value range: (0, +∞)
- *

**NOTE**: - *
If this parameter is set to a value less than or equal to 0, the value **1** is used. - *

- * @returns { ICurve } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 - */ - export function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; + export function interpolatingSpring(velocity: number, mass: number, stiffness: number, damping: number): ICurve; } - export default curves; diff --git a/api/@ohos.matrix4.d.ts b/api/@ohos.matrix4.d.ts index ae8ae432e4..aebf8ed5e7 100644 --- a/api/@ohos.matrix4.d.ts +++ b/api/@ohos.matrix4.d.ts @@ -18,21 +18,8 @@ * @kit ArkUI */ -/** - * Used to do matrix operations - * - * @namespace matrix4 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ -/** - * Used to do matrix operations - * - * @namespace matrix4 - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + + /** * Used to do matrix operations * @@ -40,25 +27,11 @@ * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ declare namespace matrix4 { - /** - * Set translation parameters - * - * @interface TranslateOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set translation parameters - * - * @interface TranslateOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + + /** * Set translation parameters * @@ -66,116 +39,51 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface TranslateOption { - /** - * Indicates the translation distance of the x-axis, in px. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + interface TranslateOption { + + /** * Indicates the translation distance of the x-axis, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Translation distance along the x-axis. - *
Unit: px. - *
Default value: **0**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: number; - /** - * Indicates the translation distance of the y-axis, in px. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Indicates the translation distance of the y-axis, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Translation distance along the y-axis. - *
Unit: px. - *
Default value: **0**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: number; - /** - * Indicates the translation distance of the z-axis, in px. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Indicates the translation distance of the z-axis, in px. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Translation distance along the z-axis. - *
Unit: px. - *
Default value: **0**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ z?: number; } - /** - * Set scaling parameters - * - * @interface ScaleOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set scaling parameters - * - * @interface ScaleOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + + /** * Set scaling parameters * @@ -183,179 +91,77 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface ScaleOption { - /** - * Zoom factor of the x-axis. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + interface ScaleOption { + + /** * Zoom factor of the x-axis. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Scaling multiple along the x-axis. x > 1: The image is scaled up along the x-axis. - *
0 < x < 1: The image is scaled down along the x-axis. - *
x < 0: The image is scaled in the reverse direction of the x-axis. - *
Default value: **1**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: number; + + /** * Zoom factor of the y-axis. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Zoom factor of the y-axis. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Scaling multiple along the y-axis. y > 1: The image is scaled up along the y-axis. - *
0 < y < 1: The image is scaled down along the y-axis. - *
y < 0: The image is scaled in the reverse direction of the y-axis. - *
Default value: **1**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: number; + + /** * Zoom factor of the z-axis. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Zoom factor of the z-axis. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Scaling multiple along the z-axis. z > 1: The image is scaled up along the z-axis. - *
0 < z < 1: The image is scaled down along the z-axis. - *
z < 0: The image is scaled in the reverse direction of the z-axis. - *
Default value: **1**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ z?: number; + + /** * Transform the x-axis coordinate of the center point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Transform the x-axis coordinate of the center point. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * X coordinate of the center point. - *
Unit: px. - *
Default value: X-coordinate of the component center. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerX?: number; - /** - * Transform the y-axis coordinate of the center point. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Transform the y-axis coordinate of the center point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Y coordinate of the center point. - *
Unit: px. - *
Default value: Y-coordinate of the component center. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerY?: number; } - /** - * Set Rotation Parameters. - * - * @interface RotateOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Set Rotation Parameters. - * - * @interface RotateOption - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + + /** * Set Rotation Parameters. * @@ -363,187 +169,84 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface RotateOption { - /** - * Axis of rotation vector x coordinate. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + interface RotateOption { + + /** * Axis of rotation vector x coordinate. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * X coordinate of the rotation axis vector. - *
Default value: **0**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ x?: number; - /** - * Axis of rotation vector y coordinate. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Axis of rotation vector y coordinate. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Y coordinate of the rotation axis vector. - *
Default value: **0**. - *
Value range: (-∞, +∞). - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ y?: number; - /** - * Axis of rotation vector z coordinate. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Axis of rotation vector z coordinate. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Z coordinate of the rotation axis vector. - *
Default value: **0**. - *
Value range: (-∞, +∞). - *
**NOTE**
The rotation axis vector is valid only when at least one of **x**, **y**, and **z** is not 0. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ z?: number; + + /** * Transform the x-axis coordinate of the center point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Transform the x-axis coordinate of the center point. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Additional x-axis offset of the transformation center relative to the component's anchor. - *
Unit: px. - *
Default value: **0**. - *

**NOTE**: - *
The value **0** indicates that the transformation center coincides with the component's x-axis anchor. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerX?: number; - /** - * Transform the y-axis coordinate of the center point. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Transform the y-axis coordinate of the center point. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Additional y-axis offset of the transformation center relative to the component's anchor. - *
Unit: px. - *
Default value: **0**. - *

**NOTE** - *
The value **0** indicates that the transformation center coincides with the component's y-axis anchor. - *

- * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ centerY?: number; - /** - * Rotation angle. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Rotation angle. * * @type { ?number } * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Rotation angle. - *
Default value: **0**. - * - * @type { ?number } - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ angle?: number; } @@ -556,8 +259,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface Point { @@ -568,8 +270,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ x: number; @@ -580,8 +281,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ y: number; } @@ -593,8 +293,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ export interface PolyToPolyOptions { @@ -605,8 +304,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ src: Array; @@ -617,8 +315,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ srcIndex?: number; @@ -629,8 +326,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dst:Array; @@ -642,8 +338,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ dstIndex?: number; @@ -657,100 +352,51 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ pointCount?:number; } + + /** - * Implements a **Matrix4Transit** object. - * - * @interface Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Implements a **Matrix4Transit** object. - * - * @interface Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Implements a **Matrix4Transit** object. + * Matrix4Transit. * * @interface Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ - export interface Matrix4Transit { - /** - * Copy function of Matrix, which can copy a copy of the current matrix object. - * - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + interface Matrix4Transit { + + /** * Copy function of Matrix, which can copy a copy of the current matrix object. * * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Copies this matrix object. - * - * @returns { Matrix4Transit } Copy object of the current matrix. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ copy(): Matrix4Transit; - /** - * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite. - * - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * The inverse function of Matrix returns an inverse matrix of the current matrix object, that is, the effect is exactly the opposite. * * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Inverts this matrix object. The original matrix that calls this API will be changed. - * - * @returns { Matrix4Transit } Inverse matrix object of the current matrix. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ invert(): Matrix4Transit; - /** - * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object. - * - * @param { Matrix4Transit } options - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Matrix superposition function, which can superpose the effects of two matrices to generate a new matrix object. * @@ -758,29 +404,13 @@ declare namespace matrix4 { * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Combines the effects of two matrices to generate a new matrix object. The original matrix that calls this API will be changed. - * - * @param { Matrix4Transit } options - Matrix object to be combined. - * @returns { Matrix4Transit } Object after matrix combination. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ combine(options: Matrix4Transit): Matrix4Transit; - /** - * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. - * - * @param { TranslateOption } options - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Matrix translation function, which can add the x-axis, Y-axis, or Z-axis translation effect to the current matrix. * @@ -788,29 +418,13 @@ declare namespace matrix4 { * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Translates this matrix object along the x, y, and z axes. The original matrix that calls this API will be changed. - * - * @param { TranslateOption } options - Translation configuration. - * @returns { Matrix4Transit } Matrix object after the translation. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ translate(options: TranslateOption): Matrix4Transit; - /** - * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix. - * - * @param { ScaleOption } options - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Scaling function of the Matrix, which can add the x-axis, Y-axis, or Z-axis scaling effect to the current matrix. * @@ -818,92 +432,51 @@ declare namespace matrix4 { * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Scales this matrix object along the x, y, and z axes. The matrix that calls this API will be changed. - * - * @param { ScaleOption } options - Scaling configuration. - * @returns { Matrix4Transit } Matrix object after the scaling. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ scale(options: ScaleOption): Matrix4Transit; /** - * Skews this matrix object along the x and y axes. The matrix that calls this API will be changed. + * Skew function of the Matrix, which can add the x-axis, y-axis skew effect to the current matrix. + * Skew function takes a generic point with coordinates (x0, y0, z0) to the point (x0 + x*y0, y0 + y*x0, z0), + * where x, y are fixed parameters, called the shear factors. * - * @param { number } x - Amount of skewing on the x-axis. - * @param { number } y - Amount of skewing on the y-axis. - * @returns { Matrix4Transit } Matrix object after the skewing. + * @param { number } x - the shear factor of x-axis. + * @param { number } y - the shear factor of y-axis. + * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ skew(x: number, y: number): Matrix4Transit; + + /** * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. * * @param { RotateOption } options * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Rotation function of the Matrix. You can add the x-axis, Y-axis, or Z-axis rotation effect to the current matrix. - * - * @param { RotateOption } options - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Rotates this matrix object along the x, y, and z axes. The matrix that calls this API will be changed. - * - * @param { RotateOption } options - Rotation configuration. - * @returns { Matrix4Transit } Matrix object after the rotation. - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ rotate(options: RotateOption): Matrix4Transit; + + /** * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point. * * @param { [number, number] } options * @returns { [number, number] } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Matrix coordinate point conversion function, which can apply the current transformation effect to a coordinate point. - * - * @param { [number, number] } options - * @returns { [number, number] } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ - /** - * Applies the current transformation effect to a coordinate point. - * - * @param { [number, number] } options - Point to be transformed. - * @returns { [number, number] } Point object after matrix transformation - * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ transformPoint(options: [number, number]): [number, number]; @@ -915,42 +488,15 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ setPolyToPoly(options: PolyToPolyOptions): Matrix4Transit } - /** - * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first. - * - * @param { [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] } options - * options indicates a fourth-order matrix - * The default value: - * [1, 0, 0, 0, - * 0, 1, 0, 0, - * 0, 0, 1, 0, - * 0, 0, 0, 1] - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ - /** - * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first. - * - * @param { [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] } options - * options indicates a fourth-order matrix - * The default value: - * [1, 0, 0, 0, - * 0, 1, 0, 0, - * 0, 0, 1, 0, - * 0, 0, 0, 1] - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @since 10 - */ + + + /** * Constructor of Matrix, which can create a fourth-order matrix based on the input parameters. The matrix is column-first. * @@ -963,17 +509,17 @@ declare namespace matrix4 { * 0, 0, 0, 1] * Fourth-order matrix notes: * m00 { number } -The x-axis scale value, the identity matrix defaults to 1. - * m01 { number } -The second value, the rotation of the xyz axis affects this value. + * m01 { number } -The second value, the rotation and skew of the xyz axis affects this value. * m02 { number } -The third value, the rotation of the xyz axis affects this value. - * m03 { number } -Meaningless. - * m10 { number } -The fifth value, the rotation of the xyz axis affects this value. + * m03 { number } -The fourth value, the perspective projection affects this value. + * m10 { number } -The fifth value, the rotation and skew of the xyz axis affects this value. * m11 { number } -The y-axis scales the value, and the identity matrix defaults to 1. * m12 { number } -The 7th value, the rotation of the xyz axis affects this value. - * m13 { number } -Meaningless. + * m13 { number } -The 8th value, the perspective projection affects this value. * m20 { number } -The 9th value, the rotation of the xyz axis affects this value. * m21 { number } -The 10th value, xyz axis rotation affects this value. * m22 { number } -The z-axis scale value, the identity matrix defaults to 1. - * m23 { number } -Meaningless. + * m23 { number } -The 12th value, the perspective projection affects this value. * m30 { number } -The x-axis translation value in px, the identity matrix defaults to 0. * m31 { number } -Y-axis translation value, in px, the identity matrix defaults to 0. * m32 { number } -The z-axis translation value in px, the identity matrix defaults to 0. @@ -982,38 +528,7 @@ declare namespace matrix4 { * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform * @atomicservice - * @since 11 - */ - /** - * Matrix constructor, which is used to create a 4 x 4 matrix with the input parameters. Column-major order is used. - * - * @param { [number,number,number,number,number,number,number,number,number,number,number,number,number,number,number,number] } options - * A number array whose length is 16 (4 x 4). For details, see **4 x 4 matrix description**. - *
Value range of each number: (-∞, +∞). - *
Default value:
[1, 0, 0, 0,
0, 1, 0, 0,
0, 0, 1, 0,
0, 0, 0, 1]. - * Fourth-order matrix notes: - * m00 { number } -Scaling value of the x-axis. The default value is **1** for the identity matrix. - * m01 { number } -The second value, which is affected by the rotation or tilt of the x, y, and z axes. - * m02 { number } -The third value, which is affected by the rotation of the x, y, and z axes. - * m03 { number } -The fourth value, which is affected by perspective projection. - * m10 { number } -The fifth value, which is affected by the rotation or tilt of the x, y, and z axes. - * m11 { number } -Scaling value of the y-axis. The default value is **1** for the identity matrix. - * m12 { number } -The seventh value, which is affected by the rotation of the x, y, and z axes. - * m13 { number } -The eighth value, which is affected by perspective projection. - * m20 { number } -The ninth value, which is affected by the rotation of the x, y, and z axes. - * m21 { number } -The tenth value, which is affected by the rotation of the x, y, and z axes. - * m22 { number } -Scaling value of the z-axis. The default value is **1** for the identity matrix. - * m23 { number } -The 12th value, which is affected by perspective projection. - * m30 { number } -Translation value of the x-axis, in px. The default value is **0** for the identity matrix. - * m31 { number } -Translation value of the y-axis, in px. The default value is **0** for the identity matrix. - * m32 { number } -Translation value of the z-axis, in px. The default value is **0** for the identity matrix. - * m33 { number } -Valid in homogeneous coordinates, presenting the perspective projection effect. - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform - * @atomicservice - * @since arkts {'1.1':'12','1.2':'20'} - * @arkts 1.1&1.2 + * @since 12 */ function init( options: [ @@ -1036,30 +551,16 @@ declare namespace matrix4 { ] ): Matrix4Transit; - /** - * Matrix initialization function, which can return an identity matrix object. - * - * @returns { Matrix4Transit } Return to Matrix4Transit - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @since 7 - */ + + /** * Matrix initialization function, which can return an identity matrix object. * * @returns { Matrix4Transit } Return to Matrix4Transit * @syscap SystemCapability.ArkUI.ArkUI.Full * @crossplatform - * @since 10 - */ - /** - * Constructs an identity matrix. - * - * @returns { Matrix4Transit } Identity matrix object. - * @syscap SystemCapability.ArkUI.ArkUI.Full - * @crossplatform * @atomicservice - * @since arkts {'1.1':'11','1.2':'20'} - * @arkts 1.1&1.2 + * @since 11 */ function identity(): Matrix4Transit; @@ -1138,5 +639,4 @@ declare namespace matrix4 { */ function transformPoint(options: [number, number]): [number, number]; } - -export default matrix4; +export default matrix4; \ No newline at end of file -- Gitee