1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15declare type KNode = number | null; 16declare function getUINativeModule(): any; 17declare enum ModifierType { 18 ORIGIN = 0, 19 STATE = 1, 20 FRAME_NODE = 2, 21 EXPOSE_MODIFIER = 3, 22} 23declare class JsPointerClass { 24 invalid(): boolean; 25} 26declare class ArkLogConsole { 27 public static log(...args: Object[]): void; 28 public static debug(...args: Object[]): void; 29 public static info(...args: Object[]): void; 30 public static warn(...args: Object[]): void; 31 public static error(...args: Object[]): void; 32} 33interface Equable { 34 isEqual(value: Equable): boolean; 35} 36declare type AttributeModifierWithKey = ModifierWithKey<number | string | boolean | object>; 37declare class ModifierWithKey<T extends number | string | boolean | object> { 38 stageValue?: T; 39 value?: T; 40 constructor(value: T); 41 applyStage(node: KNode): boolean; 42 applyPeer(node: KNode, reset: boolean): void; 43 checkObjectDiff(): boolean; 44} 45declare class ArkComponent implements CommonMethod<CommonAttribute> { 46 _changed: boolean; 47 _modifiersWithKeys: Map<Symbol, AttributeModifierWithKey>; 48 nativePtr: KNode; 49 _weakPtr: JsPointerClass; 50 _classType: ModifierType | undefined; 51 _nativePtrChanged: boolean; 52 constructor(nativePtr: KNode, classType?: ModifierType); 53 initialize(...args: Object[]); 54 applyModifierPatch(): void; 55 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 56 outline(value: OutlineOptions): this; 57 outlineColor(value: ResourceColor | EdgeColors): this; 58 outlineRadius(value: Dimension | OutlineRadiuses): this; 59 outlineStyle(value: OutlineStyle | EdgeOutlineStyles): this; 60 outlineWidth(value: Dimension | EdgeOutlineWidths): this; 61 width(value: Length): this; 62 height(value: Length): this; 63 expandSafeArea(types?: Array<SafeAreaType>, edges?: Array<SafeAreaEdge>): this; 64 backgroundEffect(options: BackgroundEffectOptions): this; 65 backgroundBrightness(params: BackgroundBrightnessOptions): this; 66 backgroundBrightnessInternal(params: BrightnessOptions): this; 67 foregroundBrightness(params: BrightnessOptions): this; 68 dragPreviewOptions(value: DragPreviewOptions, options?: DragInteractionOptions): this; 69 responseRegion(value: Array<Rectangle> | Rectangle): this; 70 mouseResponseRegion(value: Array<Rectangle> | Rectangle): this; 71 size(value: SizeOptions): this; 72 constraintSize(value: ConstraintSizeOptions): this; 73 touchable(value: boolean): this; 74 hitTestBehavior(value: HitTestMode): this; 75 layoutWeight(value: number | string): this; 76 padding(value: Padding | Length): this; 77 margin(value: Margin | Length): this; 78 background(builder: CustomBuilder, options?: { 79 align?: Alignment; 80 }): this; 81 backgroundColor(value: ResourceColor): this; 82 backgroundImage(src: ResourceStr, repeat?: ImageRepeat): this; 83 backgroundImageSize(value: SizeOptions | ImageSize): this; 84 backgroundImagePosition(value: Position | Alignment): this; 85 backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): this; 86 foregroundBlurStyle(value: BlurStyle, options?: ForegroundBlurStyleOptions): this; 87 opacity(value: number | Resource): this; 88 border(value: BorderOptions): this; 89 borderStyle(value: BorderStyle | EdgeStyles): this; 90 borderWidth(value: Length | EdgeWidths): this; 91 borderColor(value: ResourceColor | EdgeColors): this; 92 borderRadius(value: Length | BorderRadiuses): this; 93 borderImage(value: BorderImageOption): this; 94 foregroundColor(value: ResourceColor | ColoringStrategy): this; 95 onClick(event: (event?: ClickEvent) => void): this; 96 onHover(event: (isHover?: boolean, event?: HoverEvent) => void): this; 97 hoverEffect(value: HoverEffect): this; 98 onMouse(event: (event?: MouseEvent) => void): this; 99 onTouch(event: (event?: TouchEvent) => void): this; 100 onKeyEvent(event: (event?: KeyEvent) => void): this; 101 focusable(value: boolean): this; 102 tabStop(value: boolean): this; 103 onFocus(event: () => void): this; 104 onBlur(event: () => void): this; 105 tabIndex(index: number): this; 106 defaultFocus(value: boolean): this; 107 groupDefaultFocus(value: boolean): this; 108 focusOnTouch(value: boolean): this; 109 animation(value: AnimateParam): this; 110 transition(value: TransitionOptions | TransitionEffect): this; 111 gesture(gesture: GestureType, mask?: GestureMask): this; 112 priorityGesture(gesture: GestureType, mask?: GestureMask): this; 113 parallelGesture(gesture: GestureType, mask?: GestureMask): this; 114 blur(value: number): this; 115 linearGradientBlur(value: number, options: LinearGradientBlurOptions): this; 116 brightness(value: number): this; 117 contrast(value: number): this; 118 grayscale(value: number): this; 119 colorBlend(value: Color | string | Resource): this; 120 saturate(value: number): this; 121 sepia(value: number): this; 122 invert(value: number): this; 123 hueRotate(value: number | string): this; 124 useEffect(value: boolean): this; 125 backdropBlur(value: number): this; 126 renderGroup(value: boolean): this; 127 translate(value: TranslateOptions): this; 128 scale(value: ScaleOptions): this; 129 gridSpan(value: number): this; 130 gridOffset(value: number): this; 131 rotate(value: RotateOptions): this; 132 transform(value: object): this; 133 onAppear(event: () => void): this; 134 onDisAppear(event: () => void): this; 135 onAreaChange(event: (oldValue: Area, newValue: Area) => void): this; 136 visibility(value: Visibility): this; 137 flexGrow(value: number): this; 138 flexShrink(value: number): this; 139 flexBasis(value: number | string): this; 140 alignSelf(value: ItemAlign): this; 141 displayPriority(value: number): this; 142 zIndex(value: number): this; 143 sharedTransition(id: string, options?: sharedTransitionOptions): this; 144 direction(value: Direction): this; 145 align(value: Alignment): this; 146 position(value: Position): this; 147 markAnchor(value: Position): this; 148 offset(value: Position): this; 149 enabled(value: boolean): this; 150 useShadowBatching(value: boolean): this; 151 monopolizeEvents(value: boolean): this; 152 useSizeType(value: { 153 xs?: number | { 154 span: number; 155 offset: number; 156 }; 157 sm?: number | { 158 span: number; 159 offset: number; 160 }; 161 md?: number | { 162 span: number; 163 offset: number; 164 }; 165 lg?: number | { 166 span: number; 167 offset: number; 168 }; 169 }): this; 170 alignRules(value: AlignRuleOption): this; 171 aspectRatio(value: number): this; 172 clickEffect(value: ClickEffect | null): this; 173 onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): this; 174 onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): this; 175 onDragMove(event: (event?: DragEvent, extraParams?: string) => void): this; 176 onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): this; 177 onDrop(event: (event?: DragEvent, extraParams?: string) => void): this; 178 onDragEnd(event: (event: DragEvent, extraParams?: string) => void): this; 179 onPreDrag(event: (preDragStatus: PreDragStatus) => void): this; 180 allowDrop(value: Array<UniformDataType>): this; 181 draggable(value: boolean): this; 182 dragPreview(preview: CustomBuilder | DragItemInfo | string): this; 183 overlay(value: string | CustomBuilder, options?: { 184 align?: Alignment; 185 offset?: { 186 x?: number; 187 y?: number; 188 }; 189 }): this; 190 linearGradient(value: { 191 angle?: number | string; 192 direction?: GradientDirection; 193 colors: Array<any>; 194 repeating?: boolean; 195 }): this; 196 sweepGradient(value: { 197 center: Array<any>; 198 start?: number | string; 199 end?: number | string; 200 rotation?: number | string; 201 colors: Array<any>; 202 repeating?: boolean; 203 }): this; 204 radialGradient(value: { 205 center: Array<any>; 206 radius: number | string; 207 colors: Array<any>; 208 repeating?: boolean; 209 }): this; 210 motionPath(value: MotionPathOptions): this; 211 shadow(value: ShadowOptions | ShadowStyle): this; 212 mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute | ProgressMask): this; 213 key(value: string): this; 214 id(value: string): this; 215 geometryTransition(id: string): this; 216 bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): this; 217 bindMenu(content: Array<MenuElement> | CustomBuilder, options?: MenuOptions): this; 218 bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): this; 219 bindContentCover(isShow: boolean, builder: CustomBuilder, type?: ModalTransition | ContentCoverOptions): this; 220 blendMode(blendMode: BlendMode, blendApplyType?: BlendApplyType): this; 221 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 222 bindSheet(isShow: boolean, builder: CustomBuilder, options?: SheetOptions): this; 223 stateStyles(value: StateStyles): this; 224 restoreId(value: number): this; 225 onVisibleAreaChange(ratios: Array<number>, event: (isVisible: boolean, currentRatio: number) => void): this; 226 sphericalEffect(value: number): this; 227 lightUpEffect(value: number): this; 228 pixelStretchEffect(options: PixelStretchEffectOptions): this; 229 keyboardShortcut(value: string | FunctionKey, keys: Array<ModifierKey>, action?: () => void): this; 230 accessibilityGroup(value: boolean): this; 231 accessibilityText(value: string | Resource): this; 232 accessibilityDescription(value: string | Resource): this; 233 accessibilityLevel(value: string): this; 234 obscured(reasons: Array<ObscuredReasons>): this; 235 reuseId(id: string): this; 236 renderFit(fitMode: RenderFit): this; 237 attributeModifier(modifier: AttributeModifier<CommonAttribute>): this; 238 systemBarEffect(value: null): this; 239} 240declare class ArkBlankComponent extends ArkComponent implements CommonMethod<BlankAttribute> { 241 constructor(nativePtr: KNode, classType?: ModifierType); 242 color(value: ResourceColor): BlankAttribute; 243 height(value: Length): this; 244} 245declare class ArkColumnComponent extends ArkComponent implements CommonMethod<ColumnAttribute> { 246 constructor(nativePtr: KNode, classType?: ModifierType); 247 alignItems(value: HorizontalAlign): ColumnAttribute; 248 justifyContent(value: FlexAlign): ColumnAttribute; 249 pointLight(value: PointLightStyle): ColumnAttribute; 250} 251declare class ArkColumnSplitComponent extends ArkComponent implements CommonMethod<ColumnSplitAttribute> { 252 constructor(nativePtr: KNode, classType?: ModifierType); 253 resizeable(value: boolean): ColumnSplitAttribute; 254 divider(value: ColumnSplitDividerStyle | null): ColumnSplitAttribute; 255 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 256} 257declare class ArkDividerComponent extends ArkComponent implements DividerAttribute { 258 constructor(nativePtr: KNode, classType?: ModifierType); 259 vertical(value: boolean): DividerAttribute; 260 color(value: ResourceColor): DividerAttribute; 261 strokeWidth(value: number | string): DividerAttribute; 262 lineCap(value: LineCapStyle): DividerAttribute; 263} 264declare class ArkFlexComponent extends ArkComponent implements FlexAttribute { 265 constructor(nativePtr: KNode, classType?: ModifierType); 266 pointLight(value: PointLightStyle): this; 267} 268declare class ArkGridRowComponent extends ArkComponent implements CommonMethod<GridRowAttribute> { 269 constructor(nativePtr: KNode, classType?: ModifierType); 270 onBreakpointChange(callback: (breakpoints: string) => void): GridRowAttribute; 271 alignItems(value: ItemAlign): GridRowAttribute; 272} 273declare class ArkGridComponent extends ArkComponent implements GridAttribute { 274 constructor(nativePtr: KNode, classType?: ModifierType); 275 columnsTemplate(value: string): this; 276 rowsTemplate(value: string): this; 277 columnsGap(value: Length): this; 278 rowsGap(value: Length): this; 279 scrollBarWidth(value: string | number): this; 280 scrollBarColor(value: string | number | Color): this; 281 scrollBar(value: BarState): this; 282 onScrollBarUpdate(event: (index: number, offset: number) => ComputedBarAttribute): this; 283 onScrollIndex(event: (first: number, last: number) => void): this; 284 cachedCount(value: number): this; 285 editMode(value: boolean): this; 286 multiSelectable(value: boolean): this; 287 maxCount(value: number): this; 288 minCount(value: number): this; 289 cellLength(value: number): this; 290 layoutDirection(value: GridDirection): this; 291 supportAnimation(value: boolean): this; 292 onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => void | (() => any)): this; 293 onItemDragEnter(event: (event: ItemDragInfo) => void): this; 294 onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): this; 295 onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): this; 296 onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): this; 297 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions | undefined): this; 298 fadingEdge(value: boolean, options?: FadingEdgeOptions | undefined): this; 299 nestedScroll(value: NestedScrollOptions): this; 300 enableScrollInteraction(value: boolean): this; 301 friction(value: number | Resource): this; 302 onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): this; 303 onReachStart(event: () => void): this; 304 onReachEnd(event: () => void): this; 305 onScrollStart(event: () => void): this; 306 onScrollStop(event: () => void): this; 307 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { 308 offsetRemain: number; 309 }): this; 310 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 311 flingSpeedLimit(value: number): this; 312 alignItems(value: GridItemAlignment): this; 313} 314declare class ArkGridColComponent extends ArkComponent implements GridColAttribute { 315 constructor(nativePtr: KNode, classType?: ModifierType); 316 span(value: number | GridColColumnOption): GridColAttribute; 317 gridColOffset(value: number | GridColColumnOption): GridColAttribute; 318 order(value: number | GridColColumnOption): GridColAttribute; 319} 320declare class ImageColorFilterModifier extends ModifierWithKey<ColorFilter | DrawingColorFilter> { 321 constructor(value: ColorFilter); 322 static identity: Symbol; 323 applyPeer(node: KNode, reset: boolean): void; 324 checkObjectDiff(): boolean; 325} 326declare class ArkImageComponent extends ArkComponent implements ImageAttribute { 327 constructor(nativePtr: KNode, classType?: ModifierType); 328 onGestureJudgeBegin(callback: any): this; 329 draggable(value: boolean): this; 330 edgeAntialiasing(value: number): this; 331 alt(value: ResourceStr): this; 332 matchTextDirection(value: boolean): this; 333 fitOriginalSize(value: boolean): this; 334 fillColor(value: ResourceColor): this; 335 objectFit(value: ImageFit): this; 336 objectRepeat(value: ImageRepeat): this; 337 orientation(value: ImageRotateOrientation): this; 338 autoResize(value: boolean): this; 339 renderMode(value: ImageRenderMode): this; 340 interpolation(value: ImageInterpolation): this; 341 sourceSize(value: { 342 width: number; 343 height: number; 344 }): this; 345 syncLoad(value: boolean): this; 346 colorFilter(value: ColorFilter): this; 347 copyOption(value: CopyOptions): this; 348 borderRadius(value: Length | BorderRadiuses): this; 349 onComplete(callback: (event?: { 350 width: number; 351 height: number; 352 componentWidth: number; 353 componentHeight: number; 354 loadingStatus: number; 355 contentWidth: number; 356 contentHeight: number; 357 contentOffsetX: number; 358 contentOffsetY: number; 359 }) => void): this; 360 onError(callback: (event: { 361 componentWidth: number; 362 componentHeight: number; 363 message: string; 364 }) => void): this; 365 onFinish(event: () => void): this; 366 border(value: BorderOptions): this; 367 opacity(value: number | Resource): this; 368 transition(value: TransitionOptions | TransitionEffect): this; 369} 370declare class ImageAnimatorImagesModifier extends ModifierWithKey<Array<ImageFrameInfo>> { 371 constructor(value: Array<ImageFrameInfo>); 372 static identity: Symbol; 373 applyPeer(node: KNode, reset: boolean): void; 374 checkObjectDiff(): boolean; 375 isEqual(one: ImageFrameInfo, another: ImageFrameInfo): boolean; 376 convertImageFrames(value: Array<ImageFrameInfo>): ArkImageFrameInfoToArray; 377} 378declare class ArkImageAnimatorComponent extends ArkComponent implements CommonMethod<ImageAnimatorAttribute> { 379 constructor(nativePtr: KNode, classType?: ModifierType); 380 images(value: Array<ImageFrameInfo>): ImageAnimatorAttribute; 381 state(value: AnimationStatus): ImageAnimatorAttribute; 382 duration(value: number): ImageAnimatorAttribute; 383 reverse(value: boolean): ImageAnimatorAttribute; 384 fixedSize(value: boolean): ImageAnimatorAttribute; 385 preDecode(value: number): ImageAnimatorAttribute; 386 fillMode(value: FillMode): ImageAnimatorAttribute; 387 iterations(value: number): ImageAnimatorAttribute; 388 onStart(event: () => void): ImageAnimatorAttribute; 389 onPause(event: () => void): ImageAnimatorAttribute; 390 onRepeat(event: () => void): ImageAnimatorAttribute; 391 onCancel(event: () => void): ImageAnimatorAttribute; 392 onFinish(event: () => void): ImageAnimatorAttribute; 393} 394declare class ArkImageSpanComponent extends ArkComponent implements ImageSpanAttribute { 395 constructor(nativePtr: KNode, classType?: ModifierType); 396 objectFit(value: ImageFit): ImageSpanAttribute; 397 verticalAlign(value: ImageSpanAlignment): ImageSpanAttribute; 398 onComplete(callback: (event?: { 399 width: number; 400 height: number; 401 componentWidth: number; 402 componentHeight: number; 403 loadingStatus: number; 404 contentWidth: number; 405 contentHeight: number; 406 contentOffsetX: number; 407 contentOffsetY: number; 408 }) => void): ImageSpanAttribute; 409 onError(callback: (event: { 410 componentWidth: number; 411 componentHeight: number; 412 message: string; 413 }) => void): ImageSpanAttribute; 414} 415declare class ArkPatternLockComponent extends ArkComponent implements PatternLockAttribute { 416 constructor(nativePtr: KNode, classType?: ModifierType); 417 sideLength(value: Length): PatternLockAttribute; 418 circleRadius(value: Length): PatternLockAttribute; 419 regularColor(value: ResourceColor): PatternLockAttribute; 420 selectedColor(value: ResourceColor): PatternLockAttribute; 421 activeColor(value: ResourceColor): PatternLockAttribute; 422 pathColor(value: ResourceColor): PatternLockAttribute; 423 pathStrokeWidth(value: number | string): PatternLockAttribute; 424 autoReset(value: boolean): PatternLockAttribute; 425 onPatternComplete(callback: (input: Array<number>) => void): PatternLockAttribute; 426 onDotConnect(callback: any): PatternLockAttribute; 427} 428declare class ArkRichEditorComponent extends ArkComponent implements CommonMethod<RichEditorAttribute> { 429 constructor(nativePtr: KNode, classType?: ModifierType); 430 enableDataDetector(enable: boolean): RichEditorAttribute; 431 dataDetectorConfig(config: any): RichEditorAttribute; 432 copyOptions(value: CopyOptions): RichEditorAttribute; 433 onPaste(callback: (event?: PasteEvent) => void): RichEditorAttribute; 434 onReady(callback: () => void): RichEditorAttribute; 435 onSelect(callback: (value: RichEditorSelection) => void): RichEditorAttribute; 436 aboutToIMEInput(callback: (value: RichEditorInsertValue) => boolean): RichEditorAttribute; 437 onIMEInputComplete(callback: (value: RichEditorTextSpanResult) => void): RichEditorAttribute; 438 aboutToDelete(callback: (value: RichEditorDeleteValue) => boolean): RichEditorAttribute; 439 onDeleteComplete(callback: () => void): RichEditorAttribute; 440 bindSelectionMenu(spanType: RichEditorSpanType, content: CustomBuilder, responseType: ResponseType, options?: SelectionMenuOptions): RichEditorAttribute; 441 customKeyboard(value: CustomBuilder): RichEditorAttribute; 442} 443declare class ArkRowComponent extends ArkComponent implements RowAttribute { 444 constructor(nativePtr: KNode, classType?: ModifierType); 445 alignItems(value: VerticalAlign): RowAttribute; 446 justifyContent(value: FlexAlign): RowAttribute; 447 pointLight(value: PointLightStyle): RowAttribute; 448} 449declare class ArkRowSplitComponent extends ArkComponent implements RowSplitAttribute { 450 constructor(nativePtr: KNode, classType?: ModifierType); 451 resizeable(value: boolean): RowSplitAttribute; 452 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 453} 454declare class ArkSearchComponent extends ArkComponent implements CommonMethod<SearchAttribute> { 455 constructor(nativePtr: KNode, classType?: ModifierType); 456 onEditChange(callback: (isEditing: boolean) => void): SearchAttribute; 457 type(value: SearchType): SearchAttribute; 458 maxLength(value: number): SearchAttribute; 459 onEditChanged(callback: (isEditing: boolean) => void): SearchAttribute; 460 customKeyboard(event: () => void): SearchAttribute; 461 showUnit(event: () => void): SearchAttribute; 462 onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): SearchAttribute; 463 onChange(callback: (value: string) => void): SearchAttribute; 464 onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): SearchAttribute; 465 onCopy(callback: (value: string) => void): SearchAttribute; 466 onCut(callback: (value: string) => void): SearchAttribute; 467 onSubmit(callback: (value: string) => void): SearchAttribute; 468 onPaste(callback: (value: string) => void): SearchAttribute; 469 showCounter(value: boolean): SearchAttribute; 470 searchButton(value: string, option?: SearchButtonOptions): SearchAttribute; 471 selectionMenuHidden(value: boolean): SearchAttribute; 472 enableKeyboardOnFocus(value: boolean): SearchAttribute; 473 caretStyle(value: CaretStyle): SearchAttribute; 474 cancelButton(value: { 475 style?: CancelButtonStyle; 476 icon?: IconOptions; 477 }): SearchAttribute; 478 searchIcon(value: IconOptions): SearchAttribute; 479 fontColor(value: ResourceColor): SearchAttribute; 480 placeholderColor(value: ResourceColor): SearchAttribute; 481 placeholderFont(value?: Font): SearchAttribute; 482 textFont(value?: Font): SearchAttribute; 483 copyOption(value: CopyOptions): SearchAttribute; 484 textAlign(value: TextAlign): SearchAttribute; 485 height(value: Length): this; 486} 487declare class ArkSpanComponent implements CommonMethod<SpanAttribute> { 488 _changed: boolean; 489 _modifiersWithKeys: Map<Symbol, AttributeModifierWithKey>; 490 nativePtr: KNode; 491 _weakPtr: JsPointerClass; 492 _classType: ModifierType | undefined; 493 _nativePtrChanged: boolean; 494 constructor(nativePtr: KNode, classType?: ModifierType); 495 applyModifierPatch(): void; 496 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 497 outline(value: OutlineOptions): this; 498 outlineColor(value: ResourceColor | EdgeColors): this; 499 outlineRadius(value: Dimension | OutlineRadiuses): this; 500 outlineStyle(value: OutlineStyle | EdgeOutlineStyles): this; 501 outlineWidth(value: Dimension | EdgeOutlineWidths): this; 502 width(value: Length): this; 503 height(value: Length): this; 504 expandSafeArea(types?: Array<SafeAreaType>, edges?: Array<SafeAreaEdge>): this; 505 responseRegion(value: Array<Rectangle> | Rectangle): this; 506 mouseResponseRegion(value: Array<Rectangle> | Rectangle): this; 507 size(value: SizeOptions): this; 508 constraintSize(value: ConstraintSizeOptions): this; 509 touchable(value: boolean): this; 510 hitTestBehavior(value: HitTestMode): this; 511 layoutWeight(value: number | string): this; 512 padding(value: Padding | Length): this; 513 margin(value: Margin | Length): this; 514 background(builder: CustomBuilder, options?: { 515 align?: Alignment; 516 }): this; 517 backgroundColor(value: ResourceColor): this; 518 backgroundImage(src: ResourceStr, repeat?: ImageRepeat): this; 519 backgroundImageSize(value: SizeOptions | ImageSize): this; 520 backgroundImagePosition(value: Position | Alignment): this; 521 backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): this; 522 foregroundBlurStyle(value: BlurStyle, options?: ForegroundBlurStyleOptions): this; 523 opacity(value: number | Resource): this; 524 border(value: BorderOptions): this; 525 borderStyle(value: BorderStyle | EdgeStyles): this; 526 borderWidth(value: Length | EdgeWidths): this; 527 borderColor(value: ResourceColor | EdgeColors): this; 528 borderRadius(value: Length | BorderRadiuses): this; 529 borderImage(value: BorderImageOption): this; 530 foregroundColor(value: ResourceColor | ColoringStrategy): this; 531 onClick(event: (event?: ClickEvent) => void): this; 532 onHover(event: (isHover?: boolean, event?: HoverEvent) => void): this; 533 hoverEffect(value: HoverEffect): this; 534 onMouse(event: (event?: MouseEvent) => void): this; 535 onTouch(event: (event?: TouchEvent) => void): this; 536 onKeyEvent(event: (event?: KeyEvent) => void): this; 537 focusable(value: boolean): this; 538 onFocus(event: () => void): this; 539 onBlur(event: () => void): this; 540 tabIndex(index: number): this; 541 defaultFocus(value: boolean): this; 542 groupDefaultFocus(value: boolean): this; 543 focusOnTouch(value: boolean): this; 544 animation(value: AnimateParam): this; 545 transition(value: TransitionOptions | TransitionEffect): this; 546 gesture(gesture: GestureType, mask?: GestureMask): this; 547 priorityGesture(gesture: GestureType, mask?: GestureMask): this; 548 parallelGesture(gesture: GestureType, mask?: GestureMask): this; 549 blur(value: number): this; 550 linearGradientBlur(value: number, options: LinearGradientBlurOptions): this; 551 brightness(value: number): this; 552 contrast(value: number): this; 553 grayscale(value: number): this; 554 colorBlend(value: Color | string | Resource): this; 555 saturate(value: number): this; 556 sepia(value: number): this; 557 invert(value: number): this; 558 hueRotate(value: number | string): this; 559 useEffect(value: boolean): this; 560 backdropBlur(value: number): this; 561 renderGroup(value: boolean): this; 562 translate(value: TranslateOptions): this; 563 scale(value: ScaleOptions): this; 564 gridSpan(value: number): this; 565 gridOffset(value: number): this; 566 rotate(value: RotateOptions): this; 567 transform(value: object): this; 568 onAppear(event: () => void): this; 569 onDisAppear(event: () => void): this; 570 onAreaChange(event: (oldValue: Area, newValue: Area) => void): this; 571 visibility(value: Visibility): this; 572 flexGrow(value: number): this; 573 flexShrink(value: number): this; 574 flexBasis(value: number | string): this; 575 alignSelf(value: ItemAlign): this; 576 displayPriority(value: number): this; 577 zIndex(value: number): this; 578 sharedTransition(id: string, options?: sharedTransitionOptions): this; 579 direction(value: Direction): this; 580 align(value: Alignment): this; 581 position(value: Position): this; 582 markAnchor(value: Position): this; 583 offset(value: Position): this; 584 enabled(value: boolean): this; 585 useSizeType(value: { 586 xs?: number | { 587 span: number; 588 offset: number; 589 }; 590 sm?: number | { 591 span: number; 592 offset: number; 593 }; 594 md?: number | { 595 span: number; 596 offset: number; 597 }; 598 lg?: number | { 599 span: number; 600 offset: number; 601 }; 602 }): this; 603 alignRules(value: AlignRuleOption): this; 604 aspectRatio(value: number): this; 605 clickEffect(value: ClickEffect | null): this; 606 onDragStart(event: (event?: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): this; 607 onDragEnter(event: (event?: DragEvent, extraParams?: string) => void): this; 608 onDragMove(event: (event?: DragEvent, extraParams?: string) => void): this; 609 onDragLeave(event: (event?: DragEvent, extraParams?: string) => void): this; 610 onDrop(event: (event?: DragEvent, extraParams?: string) => void): this; 611 onDragEnd(event: (event: DragEvent, extraParams?: string) => void): this; 612 allowDrop(value: Array<UniformDataType>): this; 613 draggable(value: boolean): this; 614 overlay(value: string | CustomBuilder, options?: { 615 align?: Alignment; 616 offset?: { 617 x?: number; 618 y?: number; 619 }; 620 }): this; 621 linearGradient(value: { 622 angle?: number | string; 623 direction?: GradientDirection; 624 colors: Array<any>; 625 repeating?: boolean; 626 }): this; 627 sweepGradient(value: { 628 center: Array<any>; 629 start?: number | string; 630 end?: number | string; 631 rotation?: number | string; 632 colors: Array<any>; 633 repeating?: boolean; 634 }): this; 635 radialGradient(value: { 636 center: Array<any>; 637 radius: number | string; 638 colors: Array<any>; 639 repeating?: boolean; 640 }): this; 641 motionPath(value: MotionPathOptions): this; 642 shadow(value: ShadowOptions | ShadowStyle): this; 643 mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute | ProgressMask): this; 644 key(value: string): this; 645 id(value: string): this; 646 geometryTransition(id: string): this; 647 bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): this; 648 bindMenu(content: Array<MenuElement> | CustomBuilder, options?: MenuOptions): this; 649 bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): this; 650 bindContentCover(isShow: boolean, builder: CustomBuilder, type?: ModalTransition | ContentCoverOptions): this; 651 blendMode(value: BlendMode): this; 652 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 653 bindSheet(isShow: boolean, builder: CustomBuilder, options?: SheetOptions): this; 654 stateStyles(value: StateStyles): this; 655 restoreId(value: number): this; 656 onVisibleAreaChange(ratios: Array<number>, event: (isVisible: boolean, currentRatio: number) => void): this; 657 sphericalEffect(value: number): this; 658 lightUpEffect(value: number): this; 659 pixelStretchEffect(options: PixelStretchEffectOptions): this; 660 keyboardShortcut(value: string | FunctionKey, keys: Array<ModifierKey>, action?: () => void): this; 661 accessibilityGroup(value: boolean): this; 662 accessibilityText(value: string | Resource): this; 663 accessibilityDescription(value: string | Resource): this; 664 accessibilityLevel(value: string): this; 665 obscured(reasons: Array<ObscuredReasons>): this; 666 reuseId(id: string): this; 667 renderFit(fitMode: RenderFit): this; 668 attributeModifier(modifier: AttributeModifier<CommonAttribute>): this; 669 decoration(value: { 670 type: TextDecorationType; 671 color?: ResourceColor; 672 }): SpanAttribute; 673 font(value: Font): SpanAttribute; 674 lineHeight(value: Length): SpanAttribute; 675 fontSize(value: Length): SpanAttribute; 676 fontColor(value: ResourceColor): SpanAttribute; 677 fontStyle(value: FontStyle): SpanAttribute; 678 fontWeight(value: number | FontWeight | string): SpanAttribute; 679 fontFamily(value: string | Resource): SpanAttribute; 680 letterSpacing(value: number | string): SpanAttribute; 681 textCase(value: TextCase): SpanAttribute; 682} 683declare class ArkSideBarContainerComponent extends ArkComponent implements SideBarContainerAttribute { 684 constructor(nativePtr: KNode, classType?: ModifierType); 685 onChange(callback: (value: boolean) => void): SideBarContainerAttribute; 686 autoHide(value: boolean): SideBarContainerAttribute; 687 showSideBar(value: boolean): SideBarContainerAttribute; 688 maxSideBarWidth(value: number | Length): SideBarContainerAttribute; 689 minSideBarWidth(value: number | Length): SideBarContainerAttribute; 690 minContentWidth(value: Dimension): SideBarContainerAttribute; 691 controlButton(value: ButtonStyle): SideBarContainerAttribute; 692 divider(value: DividerStyle | null): SideBarContainerAttribute; 693 sideBarPosition(value: SideBarPosition): SideBarContainerAttribute; 694 sideBarWidth(value: number | Length): SideBarContainerAttribute; 695 showControlButton(value: boolean): SideBarContainerAttribute; 696} 697declare class ArkStackComponent extends ArkComponent implements StackAttribute { 698 constructor(nativePtr: KNode, classType?: ModifierType); 699 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 700 alignContent(value: Alignment): StackAttribute; 701 align(value: Alignment): this; 702} 703declare class ArkTextComponent extends ArkComponent implements TextAttribute { 704 constructor(nativePtr: KNode, classType?: ModifierType); 705 enableDataDetector(enable: boolean): this; 706 dataDetectorConfig(config: any): this; 707 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 708 font(value: Font): TextAttribute; 709 fontColor(value: ResourceColor): TextAttribute; 710 fontSize(value: any): TextAttribute; 711 minFontSize(value: number | string | Resource): TextAttribute; 712 maxFontSize(value: number | string | Resource): TextAttribute; 713 fontStyle(value: FontStyle): TextAttribute; 714 fontWeight(value: number | FontWeight | string): TextAttribute; 715 textAlign(value: TextAlign): TextAttribute; 716 lineHeight(value: number | string | Resource): TextAttribute; 717 textOverflow(value: { 718 overflow: TextOverflow; 719 }): TextAttribute; 720 fontFamily(value: string | Resource): TextAttribute; 721 maxLines(value: number): TextAttribute; 722 decoration(value: { 723 type: TextDecorationType; 724 color?: ResourceColor; 725 }): TextAttribute; 726 letterSpacing(value: number | string): TextAttribute; 727 lineSpacing(value: LengthMetrics): TextAttribute; 728 textCase(value: TextCase): TextAttribute; 729 baselineOffset(value: number | string): TextAttribute; 730 copyOption(value: CopyOptions): TextAttribute; 731 draggable(value: boolean): this; 732 textShadow(value: ShadowOptions | Array<ShadowOptions>): TextAttribute; 733 heightAdaptivePolicy(value: TextHeightAdaptivePolicy): TextAttribute; 734 textIndent(value: Length): TextAttribute; 735 wordBreak(value: WordBreak): TextAttribute; 736 lineBreakStrategy(value: LineBreakStrategy): TextAttribute; 737 onCopy(callback: (value: string) => void): TextAttribute; 738 selection(selectionStart: number, selectionEnd: number): TextAttribute; 739 textSelectable(value: TextSelectableMode): TextAttribute; 740 ellipsisMode(value: EllipsisMode): TextAttribute; 741 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 742} 743declare class ArkTextAreaComponent extends ArkComponent implements CommonMethod<TextAreaAttribute> { 744 constructor(nativePtr: KNode, classType?: ModifierType); 745 type(value: TextAreaType): TextAreaAttribute; 746 placeholderColor(value: ResourceColor): TextAreaAttribute; 747 placeholderFont(value: Font): TextAreaAttribute; 748 textAlign(value: TextAlign): TextAreaAttribute; 749 caretColor(value: ResourceColor): TextAreaAttribute; 750 fontColor(value: ResourceColor): TextAreaAttribute; 751 fontSize(value: Length): TextAreaAttribute; 752 fontStyle(value: FontStyle): TextAreaAttribute; 753 fontWeight(value: number | FontWeight | string): TextAreaAttribute; 754 fontFamily(value: ResourceStr): TextAreaAttribute; 755 inputFilter(value: ResourceStr, error?: (value: string) => void): TextAreaAttribute; 756 onChange(callback: (value: string) => void): TextAreaAttribute; 757 onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextAreaAttribute; 758 onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextAreaAttribute; 759 onEditChange(callback: (isEditing: boolean) => void): TextAreaAttribute; 760 onCopy(callback: (value: string) => void): TextAreaAttribute; 761 onCut(callback: (value: string) => void): TextAreaAttribute; 762 onPaste(callback: (value: string) => void): TextAreaAttribute; 763 copyOption(value: CopyOptions): TextAreaAttribute; 764 enableKeyboardOnFocus(value: boolean): TextAreaAttribute; 765 maxLength(value: number): TextAreaAttribute; 766 showCounter(value: boolean, options?: InputCounterOptions): TextAreaAttribute; 767 style(value: TextContentStyle): TextAreaAttribute; 768 barState(value: BarState): TextAreaAttribute; 769 selectionMenuHidden(value: boolean): TextAreaAttribute; 770 maxLines(value: number): TextAreaAttribute; 771 customKeyboard(value: CustomBuilder): TextAreaAttribute; 772} 773declare class ArkTextInputComponent extends ArkComponent implements CommonMethod<TextInputAttribute> { 774 constructor(nativePtr: KNode, classType?: ModifierType); 775 cancelButton(value: { 776 style?: CancelButtonStyle; 777 icon?: IconOptions; 778 }): TextInputAttribute; 779 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 780 selectAll(value: boolean): TextInputAttribute; 781 enableAutoFill(value: boolean): TextInputAttribute; 782 passwordRules(value: string): TextInputAttribute; 783 showCounter(value: boolean): TextInputAttribute; 784 type(value: InputType): TextInputAttribute; 785 placeholderColor(value: ResourceColor): TextInputAttribute; 786 placeholderFont(value?: Font): TextInputAttribute; 787 enterKeyType(value: EnterKeyType): TextInputAttribute; 788 caretColor(value: ResourceColor): TextInputAttribute; 789 onEditChanged(callback: (isEditing: boolean) => void): TextInputAttribute; 790 onEditChange(callback: (isEditing: boolean) => void): TextInputAttribute; 791 onSubmit(callback: (enterKey: EnterKeyType) => void): TextInputAttribute; 792 onChange(callback: (value: string) => void): TextInputAttribute; 793 onTextSelectionChange(callback: (selectionStart: number, selectionEnd: number) => void): TextInputAttribute; 794 onContentScroll(callback: (totalOffsetX: number, totalOffsetY: number) => void): TextInputAttribute; 795 maxLength(value: number): TextInputAttribute; 796 fontColor(value: ResourceColor): TextInputAttribute; 797 fontSize(value: Length): TextInputAttribute; 798 fontStyle(value: FontStyle): TextInputAttribute; 799 fontWeight(value: number | FontWeight | string): TextInputAttribute; 800 fontFamily(value: ResourceStr): TextInputAttribute; 801 inputFilter(value: ResourceStr, error?: (value: string) => void): TextInputAttribute; 802 onCopy(callback: (value: string) => void): TextInputAttribute; 803 onCut(callback: (value: string) => void): TextInputAttribute; 804 onPaste(callback: (value: string) => void): TextInputAttribute; 805 copyOption(value: CopyOptions): TextInputAttribute; 806 showPasswordIcon(value: boolean): TextInputAttribute; 807 textAlign(value: TextAlign): TextInputAttribute; 808 style(value: TextInputStyle | TextContentStyle): TextInputAttribute; 809 caretStyle(value: CaretStyle): this; 810 selectedBackgroundColor(value: ResourceColor): TextInputAttribute; 811 caretPosition(value: number): TextInputAttribute; 812 enableKeyboardOnFocus(value: boolean): TextInputAttribute; 813 passwordIcon(value: PasswordIcon): TextInputAttribute; 814 showError(value: string | undefined): TextInputAttribute; 815 showUnit(event: () => void): TextInputAttribute; 816 showUnderline(value: boolean): TextInputAttribute; 817 selectionMenuHidden(value: boolean): TextInputAttribute; 818 barState(value: BarState): TextInputAttribute; 819 maxLines(value: number): TextInputAttribute; 820 customKeyboard(event: () => void): TextInputAttribute; 821} 822declare class ArkVideoComponent extends ArkComponent implements CommonMethod<VideoAttribute> { 823 constructor(nativePtr: KNode, classType?: ModifierType); 824 muted(value: boolean): VideoAttribute; 825 autoPlay(value: boolean): VideoAttribute; 826 controls(value: boolean): VideoAttribute; 827 loop(value: boolean): VideoAttribute; 828 objectFit(value: ImageFit): VideoAttribute; 829 onStart(callback: () => void): VideoAttribute; 830 onPause(callback: () => void): VideoAttribute; 831 onFinish(event: () => void): VideoAttribute; 832 onFullscreenChange(callback: (event: { 833 fullscreen: boolean; 834 }) => void): VideoAttribute; 835 onPrepared(callback: (event: { 836 duration: number; 837 }) => void): VideoAttribute; 838 onSeeking(callback: (event: { 839 time: number; 840 }) => void): VideoAttribute; 841 onSeeked(callback: (event: { 842 time: number; 843 }) => void): VideoAttribute; 844 onUpdate(callback: (event: { 845 time: number; 846 }) => void): VideoAttribute; 847 onError(callback: () => void): VideoAttribute; 848} 849declare class ArkImageFrameInfoToArray { 850 arrSrc: Array<string> | undefined; 851 arrWidth: Array<number | string> | undefined; 852 arrHeight: Array<number | string> | undefined; 853 arrTop: Array<number | string> | undefined; 854 arrLeft: Array<number | string> | undefined; 855 arrDuration: Array<number> | undefined; 856 constructor(); 857 isEqual(another: ArkImageFrameInfoToArray): boolean; 858} 859declare class ArkButtonComponent extends ArkComponent implements ButtonAttribute { 860 constructor(nativePtr: KNode, classType?: ModifierType); 861 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 862 backgroundColor(value: ResourceColor): this; 863 type(value: ButtonType): this; 864 stateEffect(value: boolean): this; 865 fontColor(value: ResourceColor): this; 866 fontSize(value: Length): this; 867 fontWeight(value: string | number | FontWeight): this; 868 fontStyle(value: FontStyle): this; 869 fontFamily(value: string | Resource): this; 870 labelStyle(value: LabelStyle): this; 871 borderRadius(value: Length | BorderRadiuses): this; 872 border(value: BorderOptions): this; 873 size(value: SizeOptions): this; 874} 875declare class ArkLoadingProgressComponent extends ArkComponent implements LoadingProgressAttribute { 876 constructor(nativePtr: KNode, classType?: ModifierType); 877 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 878 color(value: ResourceColor): this; 879 enableLoading(value: boolean): this; 880 foregroundColor(value: ResourceColor): this; 881} 882declare class ArkRefreshComponent extends ArkComponent implements RefreshAttribute { 883 constructor(nativePtr: KNode, classType?: ModifierType); 884 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 885 onStateChange(callback: (state: RefreshStatus) => void): this; 886 onRefreshing(callback: () => void): this; 887} 888declare class ArkScrollComponent extends ArkComponent implements ScrollAttribute { 889 constructor(nativePtr: KNode, classType?: ModifierType); 890 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 891 scrollable(value: ScrollDirection): this; 892 onScroll(event: (xOffset: number, yOffset: number) => void): this; 893 onScrollEdge(event: (side: Edge) => void): this; 894 onScrollStart(event: () => void): this; 895 onScrollEnd(event: () => void): this; 896 onScrollStop(event: () => void): this; 897 enablePaging(value: boolean): this; 898 scrollBar(value: BarState): this; 899 scrollBarColor(color: ResourceColor): this; 900 scrollBarWidth(value: string | number): this; 901 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions): this; 902 fadingEdge(value: boolean, options?: FadingEdgeOptions | undefined): this; 903 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { 904 offsetRemain: number; 905 }): this; 906 nestedScroll(value: NestedScrollOptions): ScrollAttribute; 907 enableScrollInteraction(value: boolean): ScrollAttribute; 908 friction(value: number | Resource): ScrollAttribute; 909 scrollSnap(value: ScrollSnapOptions): ScrollAttribute; 910 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 911 initialOffset(value: OffsetOptions): this; 912 flingSpeedLimit(value: number): this; 913 onReachStart(event: () => void): this; 914 onReachEnd(event: () => void): this; 915} 916declare class ArkToggleComponent extends ArkComponent implements ToggleAttribute { 917 constructor(nativePtr: KNode, classType?: ModifierType); 918 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 919 onChange(callback: (isOn: boolean) => void): this; 920 selectedColor(value: ResourceColor): this; 921 switchPointColor(value: ResourceColor): this; 922 height(value: Length): this; 923 responseRegion(value: Rectangle | Rectangle[]): this; 924 padding(value: Padding | Length): this; 925 backgroundColor(value: ResourceColor): this; 926 hoverEffect(value: HoverEffect): this; 927} 928declare class ArkSelectComponent extends ArkComponent implements SelectAttribute { 929 constructor(nativePtr: KNode, classType?: ModifierType); 930 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 931 optionWidth(value: Dimension | OptionWidthMode): this; 932 optionHeight(value: Dimension): this; 933 width(value: Length): this; 934 height(value: Length): this; 935 size(value: SizeOptions): this; 936 selected(value: number | Resource): this; 937 value(value: ResourceStr): this; 938 font(value: Font): this; 939 fontColor(value: ResourceColor): this; 940 selectedOptionBgColor(value: ResourceColor): this; 941 selectedOptionFont(value: Font): this; 942 selectedOptionFontColor(value: ResourceColor): this; 943 optionBgColor(value: ResourceColor): this; 944 optionFont(value: Font): this; 945 optionFontColor(value: ResourceColor): this; 946 onSelect(callback: (index: number, value: string) => void): this; 947 space(value: Length): this; 948 arrowPosition(value: ArrowPosition): this; 949 menuAlign(alignType: MenuAlignType, offset?: Offset): this; 950} 951declare class ArkRadioComponent extends ArkComponent implements RadioAttribute { 952 constructor(nativePtr: KNode, classType?: ModifierType); 953 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 954 checked(value: boolean): this; 955 onChange(callback: (isChecked: boolean) => void): this; 956 radioStyle(value: RadioStyle): this; 957 width(value: Length): this; 958 height(value: Length): this; 959 size(value: { 960 width: Length; 961 height: Length; 962 }): this; 963 hoverEffect(value: HoverEffect): this; 964 padding(value: Padding | Length): this; 965 responseRegion(value: Array<Rectangle> | Rectangle): this; 966} 967declare class ArkTimePickerComponent extends ArkComponent implements TimePickerAttribute { 968 constructor(nativePtr: KNode, classType?: ModifierType); 969 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 970 loop(value: boolean): this; 971 useMilitaryTime(value: boolean): this; 972 disappearTextStyle(value: PickerTextStyle): this; 973 textStyle(value: PickerTextStyle): this; 974 selectedTextStyle(value: PickerTextStyle): this; 975 onChange(callback: (value: TimePickerResult) => void): this; 976} 977declare class ArkTextPickerComponent extends ArkComponent implements TextPickerAttribute { 978 constructor(nativePtr: KNode, classType?: ModifierType); 979 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 980 defaultPickerItemHeight(value: string | number): this; 981 canLoop(value: boolean): this; 982 disappearTextStyle(value: PickerTextStyle): this; 983 textStyle(value: PickerTextStyle): this; 984 selectedTextStyle(value: PickerTextStyle): this; 985 onAccept(callback: (value: string, index: number) => void): this; 986 onCancel(callback: () => void): this; 987 onChange(callback: (value: string | string[], index: number | number[]) => void): this; 988 selectedIndex(value: number | number[]): this; 989} 990declare class ArkSliderComponent extends ArkComponent implements SliderAttribute { 991 constructor(nativePtr: KNode, classType?: ModifierType); 992 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 993 blockColor(value: ResourceColor): this; 994 trackColor(value: ResourceColor): this; 995 selectedColor(value: ResourceColor): this; 996 minLabel(value: string): this; 997 maxLabel(value: string): this; 998 showSteps(value: boolean): this; 999 showTips(value: boolean, content?: any): this; 1000 trackThickness(value: Length): this; 1001 onChange(callback: (value: number, mode: SliderChangeMode) => void): this; 1002 blockBorderColor(value: ResourceColor): this; 1003 blockBorderWidth(value: Length): this; 1004 stepColor(value: ResourceColor): this; 1005 trackBorderRadius(value: Length): this; 1006 blockSize(value: SizeOptions): this; 1007 blockStyle(value: SliderBlockStyle): this; 1008 stepSize(value: Length): this; 1009} 1010declare class ArkRatingComponent extends ArkComponent implements RatingAttribute { 1011 constructor(nativePtr: KNode, classType?: ModifierType); 1012 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 1013 stars(value: number): this; 1014 stepSize(value: number): this; 1015 starStyle(value: { 1016 backgroundUri: string; 1017 foregroundUri: string; 1018 secondaryUri?: string | undefined; 1019 }): this; 1020 onChange(callback: (value: number) => void): this; 1021} 1022declare class ArkCheckboxComponent extends ArkComponent implements CheckboxAttribute { 1023 constructor(nativePtr: KNode, classType?: ModifierType); 1024 shape(value: CheckBoxShape): this; 1025 width(value: Length): this; 1026 height(value: Length): this; 1027 select(value: boolean): this; 1028 selectedColor(value: ResourceColor): this; 1029 unselectedColor(value: ResourceColor): this; 1030 mark(value: MarkStyle): this; 1031 padding(value: Padding | Length): this; 1032 size(value: SizeOptions): this; 1033 responseRegion(value: Array<Rectangle> | Rectangle): this; 1034 onChange(callback: (value: boolean) => void): this; 1035} 1036declare class ArkNavDestinationComponent extends ArkComponent implements NavDestinationAttribute { 1037 constructor(nativePtr: KNode, classType?: ModifierType); 1038 title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle | undefined, 1039 options?: NavigationTitleOptions): this; 1040 menus(value: Array<NavigationMenuItem> | undefined): this; 1041 hideTitleBar(value: boolean): this; 1042 onShown(callback: () => void): this; 1043 onHidden(callback: () => void): this; 1044 onBackPressed(callback: () => boolean): this; 1045 ignoreLayoutSafeArea(types?: SafeAreaType[], edges?: SafeAreaEdge[]): this; 1046 recoverable(value: boolean | undefined): this; 1047} 1048declare class ArkCounterComponent extends ArkComponent implements CounterAttribute { 1049 constructor(nativePtr: KNode, classType?: ModifierType); 1050 onInc(event: () => void): this; 1051 onDec(event: () => void): this; 1052 enableDec(value: boolean): this; 1053 enableInc(value: boolean): this; 1054 backgroundColor(value: ResourceColor): this; 1055 width(value: Length): this; 1056 height(value: Length): this; 1057 size(value: SizeOptions): this; 1058} 1059declare class ArkCheckboxGroupComponent extends ArkComponent implements CheckboxGroupAttribute { 1060 constructor(nativePtr: KNode, classType?: ModifierType); 1061 selectAll(value: boolean): this; 1062 selectedColor(value: ResourceColor): this; 1063 unselectedColor(value: ResourceColor): this; 1064 mark(value: MarkStyle): this; 1065 onChange(callback: (event: CheckboxGroupResult) => void): CheckboxGroupAttribute; 1066 size(value: SizeOptions): this; 1067 width(value: Length): this; 1068 height(value: Length): this; 1069} 1070declare class ArkPanelComponent extends ArkComponent implements PanelAttribute { 1071 constructor(nativePtr: KNode, classType?: ModifierType); 1072 mode(value: PanelMode): this; 1073 type(value: PanelType): this; 1074 dragBar(value: boolean): this; 1075 customHeight(value: any): this; 1076 fullHeight(value: string | number): this; 1077 halfHeight(value: string | number): this; 1078 miniHeight(value: string | number): this; 1079 show(value: boolean): this; 1080 backgroundMask(color: ResourceColor): this; 1081 showCloseIcon(value: boolean): this; 1082 onChange(event: (width: number, height: number, mode: PanelMode) => void): this; 1083 onHeightChange(callback: (value: number) => void): this; 1084} 1085declare class ArkNavigationComponent extends ArkComponent implements NavigationAttribute { 1086 constructor(nativePtr: KNode, classType?: ModifierType); 1087 navBarWidth(value: Length): NavigationAttribute; 1088 navBarPosition(value: number): NavigationAttribute; 1089 navBarWidthRange(value: [Dimension, Dimension]): NavigationAttribute; 1090 minContentWidth(value: Dimension): NavigationAttribute; 1091 mode(value: number): NavigationAttribute; 1092 backButtonIcon(value: any): NavigationAttribute; 1093 hideNavBar(value: boolean): NavigationAttribute; 1094 title(value: ResourceStr | CustomBuilder | NavigationCommonTitle | NavigationCustomTitle | undefined, 1095 options?: NavigationTitleOptions): NavigationAttribute; 1096 subTitle(value: string): NavigationAttribute; 1097 hideTitleBar(value: boolean): NavigationAttribute; 1098 enableModeChangeAnimation(value: boolean): NavigationAttribute; 1099 hideBackButton(value: boolean): NavigationAttribute; 1100 titleMode(value: NavigationTitleMode): NavigationAttribute; 1101 menus(value: Array<NavigationMenuItem> | undefined): NavigationAttribute; 1102 toolBar(value: any): NavigationAttribute; 1103 toolbarConfiguration(value: any): NavigationAttribute; 1104 hideToolBar(value: boolean): NavigationAttribute; 1105 onTitleModeChange(callback: (titleMode: NavigationTitleMode) => void): NavigationAttribute; 1106 onNavBarStateChange(callback: (isVisible: boolean) => void): NavigationAttribute; 1107 onNavigationModeChange(callback: (mode: NavigationMode) => void): NavigationAttribute; 1108 navDestination(builder: (name: string, param: unknown) => void): NavigationAttribute; 1109 ignoreLayoutSafeArea(types?: SafeAreaType[], edges?: SafeAreaEdge[]): NavigationAttribute; 1110 enableDragBar(value: boolean | undefined): NavigationAttribute; 1111 recoverable(value: boolean | undefined): NavigationAttribute; 1112} 1113declare class ArkNavRouterComponent extends ArkComponent implements NavRouterAttribute { 1114 constructor(nativePtr: KNode, classType?: ModifierType); 1115 onStateChange(callback: (isActivated: boolean) => void): NavRouterAttribute; 1116 mode(mode: NavRouteMode): NavRouterAttribute; 1117} 1118declare class ArkNavigatorComponent extends ArkComponent implements NavigatorAttribute { 1119 constructor(nativePtr: KNode, classType?: ModifierType); 1120 active(value: boolean): this; 1121 type(value: NavigationType): this; 1122 target(value: string): this; 1123 params(value: object): this; 1124} 1125declare class ArkAlphabetIndexerComponent extends ArkComponent implements AlphabetIndexerAttribute { 1126 constructor(nativePtr: KNode, classType?: ModifierType); 1127 onSelected(callback: (index: number) => void): this; 1128 color(value: ResourceColor): this; 1129 selectedColor(value: ResourceColor): this; 1130 popupColor(value: ResourceColor): this; 1131 selectedBackgroundColor(value: ResourceColor): this; 1132 popupBackground(value: ResourceColor): this; 1133 popupSelectedColor(value: ResourceColor): this; 1134 popupUnselectedColor(value: ResourceColor): this; 1135 popupItemBackgroundColor(value: ResourceColor): this; 1136 usingPopup(value: boolean): this; 1137 selectedFont(value: Font): this; 1138 popupFont(value: Font): this; 1139 popupItemFont(value: Font): this; 1140 itemSize(value: string | number): this; 1141 font(value: Font): this; 1142 alignStyle(value: IndexerAlign, offset?: any): this; 1143 onSelect(callback: (index: number) => void): this; 1144 onRequestPopupData(callback: (index: number) => string[]): this; 1145 onPopupSelect(callback: (index: number) => void): this; 1146 selected(index: number): this; 1147 popupPosition(value: Position): this; 1148} 1149declare class ArkCalendarPickerComponent extends ArkComponent implements CalendarPickerAttribute { 1150 constructor(nativePtr: KNode, classType?: ModifierType); 1151 edgeAlign(alignType: CalendarAlign, offset?: Offset | undefined): this; 1152 textStyle(value: PickerTextStyle): this; 1153 onChange(callback: (value: Date) => void): this; 1154 padding(value: Padding | Length): this; 1155 border(value: BorderOptions): this; 1156} 1157declare class ArkDataPanelComponent extends ArkComponent implements DataPanelAttribute { 1158 constructor(nativePtr: KNode, classType?: ModifierType); 1159 closeEffect(value: boolean): this; 1160 valueColors(value: Array<ResourceColor | LinearGradient>): this; 1161 trackBackgroundColor(value: any): this; 1162 strokeWidth(value: any): this; 1163 trackShadow(value: DataPanelShadowOptions): this; 1164} 1165declare class ArkDatePickerComponent extends ArkComponent implements DatePickerAttribute { 1166 constructor(nativePtr: KNode, classType?: ModifierType); 1167 lunar(value: boolean): DatePickerAttribute; 1168 disappearTextStyle(value: PickerTextStyle): DatePickerAttribute; 1169 textStyle(value: PickerTextStyle): DatePickerAttribute; 1170 selectedTextStyle(value: PickerTextStyle): DatePickerAttribute; 1171 onChange(callback: (value: DatePickerResult) => void): DatePickerAttribute; 1172 onDateChange(callback: (value: Date) => void): DatePickerAttribute; 1173 backgroundColor(value: ResourceColor): this; 1174} 1175declare class ArkFormComponentComponent extends ArkComponent implements FormComponentAttribute { 1176 constructor(nativePtr: KNode, classType?: ModifierType); 1177 size(value: { 1178 width: Length; 1179 height: Length; 1180 }): this; 1181 visibility(value: Visibility): this; 1182 moduleName(value: string): this; 1183 dimension(value: FormDimension): this; 1184 allowUpdate(value: boolean): this; 1185 onAcquired(callback: (info: { 1186 id: number; 1187 }) => void): this; 1188 onError(callback: (info: { 1189 errcode: number; 1190 msg: string; 1191 }) => void): this; 1192 onRouter(callback: (info: any) => void): this; 1193 onUninstall(callback: (info: { 1194 id: number; 1195 }) => void): this; 1196 onLoad(callback: () => void): this; 1197} 1198declare class ArkGaugeComponent extends ArkComponent implements GaugeAttribute { 1199 constructor(nativePtr: KNode, classType?: ModifierType); 1200 value(value: number): this; 1201 startAngle(angle: number): this; 1202 endAngle(angle: number): this; 1203 colors(colors: ResourceColor | LinearGradient | Array<[ResourceColor | LinearGradient, number]>): this; 1204 strokeWidth(length: any): this; 1205 description(value: CustomBuilder): this; 1206 trackShadow(value: GaugeShadowOptions): this; 1207 indicator(value: GaugeIndicatorOptions): this; 1208} 1209declare class ArkMarqueeComponent extends ArkComponent implements MarqueeAttribute { 1210 constructor(nativePtr: KNode, classType?: ModifierType); 1211 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 1212 fontSize(value: Length): this; 1213 fontColor(value: ResourceColor): this; 1214 allowScale(value: boolean): this; 1215 fontWeight(value: string | number | FontWeight): this; 1216 fontFamily(value: any): this; 1217 onStart(event: () => void): this; 1218 onBounce(event: () => void): this; 1219 onFinish(event: () => void): this; 1220} 1221declare class ArkMenuComponent extends ArkComponent implements MenuAttribute { 1222 constructor(nativePtr: KNode, classType?: ModifierType); 1223 width(value: Length): this; 1224 fontSize(value: any): this; 1225 font(value: Font): this; 1226 fontColor(value: ResourceColor): this; 1227 radius(value: any): this; 1228} 1229declare class ArkMenuItemComponent extends ArkComponent implements MenuItemAttribute { 1230 constructor(nativePtr: KNode, classType?: ModifierType); 1231 selected(value: boolean): this; 1232 selectIcon(value: boolean | ResourceStr): this; 1233 onChange(callback: (selected: boolean) => void): this; 1234 contentFont(value: Font): this; 1235 contentFontColor(value: ResourceColor): this; 1236 labelFont(value: Font): this; 1237 labelFontColor(value: ResourceColor): this; 1238} 1239declare class ArkMenuItemGroupComponent extends ArkComponent implements MenuItemGroupAttribute { 1240 constructor(nativePtr: KNode, classType?: ModifierType); 1241} 1242declare class ArkPluginComponent extends ArkComponent implements PluginComponentAttribute { 1243 constructor(nativePtr: KNode, classType?: ModifierType); 1244 onComplete(callback: () => void): this; 1245 onError(callback: (info: { 1246 errcode: number; 1247 msg: string; 1248 }) => void): this; 1249 size(value: SizeOptions): this; 1250 width(value: Length): this; 1251 height(value: Length): this; 1252} 1253declare class ArkProgressComponent extends ArkComponent implements ProgressAttribute { 1254 constructor(nativePtr: KNode, classType?: ModifierType); 1255 value(value: number): ProgressAttribute<keyof ProgressStyleMap, LinearStyleOptions | ProgressStyleOptions | RingStyleOptions | 1256 EclipseStyleOptions | ScaleRingStyleOptions | CapsuleStyleOptions>; 1257 color(value: ResourceColor | LinearGradient): ProgressAttribute<keyof ProgressStyleMap, LinearStyleOptions | ProgressStyleOptions | 1258 RingStyleOptions | EclipseStyleOptions | ScaleRingStyleOptions | CapsuleStyleOptions>; 1259 style(value: LinearStyleOptions | ProgressStyleOptions | RingStyleOptions | EclipseStyleOptions | ScaleRingStyleOptions | CapsuleStyleOptions): 1260 ProgressAttribute<keyof ProgressStyleMap, LinearStyleOptions | ProgressStyleOptions | RingStyleOptions | 1261 EclipseStyleOptions | ScaleRingStyleOptions | CapsuleStyleOptions>; 1262 backgroundColor(value: ResourceColor): this; 1263} 1264declare class ArkQRCodeComponent extends ArkComponent implements QRCodeAttribute { 1265 constructor(nativePtr: KNode, classType?: ModifierType); 1266 color(value: ResourceColor): this; 1267 backgroundColor(value: ResourceColor): this; 1268 contentOpacity(value: number | Resource): this; 1269} 1270declare class ArkRichTextComponent extends ArkComponent implements CommonMethod<RichTextAttribute> { 1271 constructor(nativePtr: KNode, classType?: ModifierType); 1272 onStart(callback: () => void): RichTextAttribute; 1273 onComplete(callback: () => void): RichTextAttribute; 1274} 1275declare class ArkScrollBarComponent extends ArkComponent implements ScrollBarAttribute { 1276 constructor(nativePtr: KNode, classType?: ModifierType); 1277 enableNestedScroll(value: boolean): this; 1278} 1279declare class ArkStepperComponent extends ArkComponent implements StepperAttribute { 1280 constructor(nativePtr: KNode, classType?: ModifierType); 1281 onFinish(callback: () => void): this; 1282 onSkip(callback: () => void): this; 1283 onChange(callback: (prevIndex: number, index: number) => void): this; 1284 onNext(callback: (index: number, pendingIndex: number) => void): this; 1285 onPrevious(callback: (index: number, pendingIndex: number) => void): this; 1286} 1287declare class ArkStepperItemComponent extends ArkComponent implements StepperItemAttribute { 1288 constructor(nativePtr: KNode, classType?: ModifierType); 1289 prevLabel(value: string): this; 1290 nextLabel(value: string): this; 1291 status(value?: ItemState | undefined): this; 1292} 1293declare class ArkTextClockComponent extends ArkComponent implements TextClockAttribute { 1294 constructor(nativePtr: KNode, classType?: ModifierType); 1295 format(value: string): this; 1296 onDateChange(event: (value: number) => void): this; 1297 fontColor(value: ResourceColor): this; 1298 fontSize(value: Length): this; 1299 fontStyle(value: FontStyle): this; 1300 fontWeight(value: string | number | FontWeight): this; 1301 fontFamily(value: ResourceStr): this; 1302 textShadow(value: ShadowOptions): this; 1303 fontFeature(value: string): this; 1304} 1305declare class ArkTextTimerComponent extends ArkComponent implements TextTimerAttribute { 1306 constructor(nativePtr: KNode, classType?: ModifierType); 1307 fontColor(value: any): this; 1308 fontSize(value: any): this; 1309 fontWeight(value: number | FontWeight | string): this; 1310 fontStyle(value: FontStyle): this; 1311 fontFamily(value: string | Resource): this; 1312 format(value: string): this; 1313 onTimer(event: (utc: number, elapsedTime: number) => void): this; 1314} 1315declare class ArkWebComponent extends ArkComponent implements WebAttribute { 1316 constructor(nativePtr: KNode, classType?: ModifierType); 1317 javaScriptAccess(javaScriptAccess: boolean): this; 1318 fileAccess(fileAccess: boolean): this; 1319 onlineImageAccess(onlineImageAccess: boolean): this; 1320 domStorageAccess(domStorageAccess: boolean): this; 1321 imageAccess(imageAccess: boolean): this; 1322 mixedMode(mixedMode: MixedMode): this; 1323 zoomAccess(zoomAccess: boolean): this; 1324 geolocationAccess(geolocationAccess: boolean): this; 1325 javaScriptProxy(javaScriptProxy: { 1326 object: object; 1327 name: string; 1328 methodList: string[]; 1329 controller: any; 1330 }): this; 1331 password(password: boolean): this; 1332 cacheMode(cacheMode: CacheMode): this; 1333 darkMode(mode: WebDarkMode): this; 1334 forceDarkAccess(access: boolean): this; 1335 mediaOptions(options: WebMediaOptions): this; 1336 tableData(tableData: boolean): this; 1337 wideViewModeAccess(wideViewModeAccess: boolean): this; 1338 overviewModeAccess(overviewModeAccess: boolean): this; 1339 overScrollMode(mode: OverScrollMode): this; 1340 textZoomAtio(textZoomAtio: number): this; 1341 textZoomRatio(textZoomRatio: number): this; 1342 databaseAccess(databaseAccess: boolean): this; 1343 initialScale(percent: number): this; 1344 userAgent(userAgent: string): this; 1345 onPageEnd(callback: (event?: { 1346 url: string; 1347 } | undefined) => void): this; 1348 onPageBegin(callback: (event?: { 1349 url: string; 1350 } | undefined) => void): this; 1351 onProgressChange(callback: (event?: { 1352 newProgress: number; 1353 } | undefined) => void): this; 1354 onTitleReceive(callback: (event?: { 1355 title: string; 1356 } | undefined) => void): this; 1357 onGeolocationHide(callback: () => void): this; 1358 onGeolocationShow(callback: (event?: { 1359 origin: string; 1360 geolocation: JsGeolocation; 1361 } | undefined) => void): this; 1362 onRequestSelected(callback: () => void): this; 1363 onAlert(callback: (event?: { 1364 url: string; 1365 message: string; 1366 result: JsResult; 1367 } | undefined) => boolean): this; 1368 onBeforeUnload(callback: (event?: { 1369 url: string; 1370 message: string; 1371 result: JsResult; 1372 } | undefined) => boolean): this; 1373 onConfirm(callback: (event?: { 1374 url: string; 1375 message: string; 1376 result: JsResult; 1377 } | undefined) => boolean): this; 1378 onPrompt(callback: (event?: { 1379 url: string; 1380 message: string; 1381 value: string; 1382 result: JsResult; 1383 } | undefined) => boolean): this; 1384 onConsole(callback: (event?: { 1385 message: ConsoleMessage; 1386 } | undefined) => boolean): this; 1387 onErrorReceive(callback: (event?: { 1388 request: WebResourceRequest; 1389 error: WebResourceError; 1390 } | undefined) => void): this; 1391 onHttpErrorReceive(callback: (event?: { 1392 request: WebResourceRequest; 1393 response: WebResourceResponse; 1394 } | undefined) => void): this; 1395 onDownloadStart(callback: (event?: { 1396 url: string; 1397 userAgent: string; 1398 contentDisposition: string; 1399 mimetype: string; 1400 contentLength: number; 1401 } | undefined) => void): this; 1402 onRefreshAccessedHistory(callback: (event?: { 1403 url: string; 1404 isRefreshed: boolean; 1405 } | undefined) => void): this; 1406 onUrlLoadIntercept(callback: (event?: { 1407 data: string | WebResourceRequest; 1408 } | undefined) => boolean): this; 1409 onSslErrorReceive(callback: (event?: { 1410 handler: Function; 1411 error: object; 1412 } | undefined) => void): this; 1413 onRenderExited(callback: (event?: { 1414 renderExitReason: RenderExitReason; 1415 } | undefined) => void): this; 1416 onRenderExited(callback: (event?: { 1417 detail: object; 1418 } | undefined) => boolean): this; 1419 onShowFileSelector(callback: (event?: { 1420 result: FileSelectorResult; 1421 fileSelector: FileSelectorParam; 1422 } | undefined) => boolean): this; 1423 onFileSelectorShow(callback: (event?: { 1424 callback: Function; 1425 fileSelector: object; 1426 } | undefined) => void): this; 1427 onResourceLoad(callback: (event: { 1428 url: string; 1429 }) => void): this; 1430 onFullScreenExit(callback: () => void): this; 1431 onFullScreenEnter(callback: (event: { 1432 handler: FullScreenExitHandler; 1433 }) => void): this; 1434 onScaleChange(callback: (event: { 1435 oldScale: number; 1436 newScale: number; 1437 }) => void): this; 1438 onHttpAuthRequest(callback: (event?: { 1439 handler: HttpAuthHandler; 1440 host: string; 1441 realm: string; 1442 } | undefined) => boolean): this; 1443 onInterceptRequest(callback: (event?: { 1444 request: WebResourceRequest; 1445 } | undefined) => WebResourceResponse): this; 1446 onPermissionRequest(callback: (event?: { 1447 request: PermissionRequest; 1448 } | undefined) => void): this; 1449 onScreenCaptureRequest(callback: (event?: { 1450 handler: ScreenCaptureHandler; 1451 } | undefined) => void): this; 1452 onContextMenuShow(callback: (event?: { 1453 param: WebContextMenuParam; 1454 result: WebContextMenuResult; 1455 } | undefined) => boolean): this; 1456 mediaPlayGestureAccess(access: boolean): this; 1457 onSearchResultReceive(callback: (event?: { 1458 activeMatchOrdinal: number; 1459 numberOfMatches: number; 1460 isDoneCounting: boolean; 1461 } | undefined) => void): this; 1462 onScroll(callback: (event: { 1463 xOffset: number; 1464 yOffset: number; 1465 }) => void): this; 1466 onSslErrorEventReceive(callback: (event: { 1467 handler: SslErrorHandler; 1468 error: SslError; 1469 }) => void): this; 1470 onClientAuthenticationRequest(callback: (event: { 1471 handler: ClientAuthenticationHandler; 1472 host: string; 1473 port: number; 1474 keyTypes: string[]; 1475 issuers: string[]; 1476 }) => void): this; 1477 onWindowNew(callback: (event: { 1478 isAlert: boolean; 1479 isUserTrigger: boolean; 1480 targetUrl: string; 1481 handler: ControllerHandler; 1482 }) => void): this; 1483 onWindowExit(callback: () => void): this; 1484 multiWindowAccess(multiWindow: boolean): this; 1485 onInterceptKeyEvent(callback: (event: KeyEvent) => boolean): this; 1486 webStandardFont(family: string): this; 1487 webSerifFont(family: string): this; 1488 webSansSerifFont(family: string): this; 1489 webFixedFont(family: string): this; 1490 webFantasyFont(family: string): this; 1491 webCursiveFont(family: string): this; 1492 defaultFixedFontSize(size: number): this; 1493 defaultFontSize(size: number): this; 1494 minFontSize(size: number): this; 1495 minLogicalFontSize(size: number): this; 1496 blockNetwork(block: boolean): this; 1497 horizontalScrollBarAccess(horizontalScrollBar: boolean): this; 1498 verticalScrollBarAccess(verticalScrollBar: boolean): this; 1499 onTouchIconUrlReceived(callback: (event: { 1500 url: string; 1501 precomposed: boolean; 1502 }) => void): this; 1503 onFaviconReceived(callback: (event: { 1504 favicon: any; 1505 }) => void): this; 1506 onPageVisible(callback: (event: { 1507 url: string; 1508 }) => void): this; 1509 onDataResubmitted(callback: (event: { 1510 handler: DataResubmissionHandler; 1511 }) => void): this; 1512 pinchSmooth(isEnabled: boolean): this; 1513 allowWindowOpenMethod(flag: boolean): this; 1514 onAudioStateChanged(callback: (event: { 1515 playing: boolean; 1516 }) => void): this; 1517 onFirstContentfulPaint(callback: (event?: { 1518 navigationStartTick: number; 1519 firstContentfulPaintMs: number; 1520 } | undefined) => void): this; 1521 onLoadIntercept(callback: (event: { 1522 data: WebResourceRequest; 1523 }) => boolean): this; 1524 onControllerAttached(callback: () => void): this; 1525 onOverScroll(callback: (event: { 1526 xOffset: number; 1527 yOffset: number; 1528 }) => void): this; 1529 javaScriptOnDocumentStart(scripts: ScriptItem[]): this; 1530 layoutMode(mode: WebLayoutMode): this; 1531 nestedScroll(value: NestedScrollOptions): this; 1532 onRenderProcessNotResponding(callback: (event: { 1533 data: RenderProcessNotRespondingData; 1534 }) => void): this; 1535 onRenderProcessResponding(callback: () => void): this; 1536 onViewportFitChanged(callback: (event: { 1537 viewportFit: ViewportFit; 1538 }) => void): this; 1539 onAdsBlocked(callback: (details?: AdsBlockedDetails | undefined) => void): this; 1540} 1541declare class ArkXComponentComponent implements CommonMethod<XComponentAttribute> { 1542 _modifiersWithKeys: Map<Symbol, AttributeModifierWithKey>; 1543 nativePtr: KNode; 1544 constructor(nativePtr: KNode); 1545 applyModifierPatch(): void; 1546 outline(value: OutlineOptions): this; 1547 outlineColor(value: ResourceColor | EdgeColors): this; 1548 outlineRadius(value: Dimension | OutlineRadiuses): this; 1549 outlineStyle(value: OutlineStyle | EdgeOutlineStyles): this; 1550 outlineWidth(value: Dimension | EdgeOutlineWidths): this; 1551 width(value: Length): this; 1552 height(value: Length): this; 1553 expandSafeArea(types?: SafeAreaType[], edges?: SafeAreaEdge[]): this; 1554 responseRegion(value: Rectangle | Rectangle[]): this; 1555 mouseResponseRegion(value: Rectangle | Rectangle[]): this; 1556 size(value: SizeOptions): this; 1557 constraintSize(value: ConstraintSizeOptions): this; 1558 touchable(value: boolean): this; 1559 hitTestBehavior(value: HitTestMode): this; 1560 layoutWeight(value: string | number): this; 1561 padding(value: Length | Padding): this; 1562 margin(value: Length | Padding): this; 1563 background(builder: CustomBuilder, options?: { 1564 align?: Alignment; 1565 }): this; 1566 backgroundColor(value: ResourceColor): this; 1567 backgroundImage(src: ResourceStr, repeat?: ImageRepeat): this; 1568 backgroundImageSize(value: SizeOptions | ImageSize): this; 1569 backgroundImagePosition(value: Alignment | Position): this; 1570 backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): this; 1571 foregroundBlurStyle(value: BlurStyle, options?: ForegroundBlurStyleOptions): this; 1572 opacity(value: number | Resource): this; 1573 border(value: BorderOptions): this; 1574 borderStyle(value: BorderStyle | EdgeStyles): this; 1575 borderWidth(value: Length | EdgeWidths): this; 1576 borderColor(value: ResourceColor | EdgeColors): this; 1577 borderRadius(value: Length | BorderRadiuses): this; 1578 borderImage(value: BorderImageOption): this; 1579 foregroundColor(value: string | number | Resource | Color): this; 1580 onClick(event: (event: ClickEvent) => void): this; 1581 onHover(event: (isHover: boolean, event: HoverEvent) => void): this; 1582 hoverEffect(value: HoverEffect): this; 1583 onMouse(event: (event: MouseEvent) => void): this; 1584 onTouch(event: (event: TouchEvent) => void): this; 1585 onKeyEvent(event: (event: KeyEvent) => void): this; 1586 focusable(value: boolean): this; 1587 onFocus(event: () => void): this; 1588 onBlur(event: () => void): this; 1589 tabIndex(index: number): this; 1590 defaultFocus(value: boolean): this; 1591 groupDefaultFocus(value: boolean): this; 1592 focusOnTouch(value: boolean): this; 1593 animation(value: AnimateParam): this; 1594 transition(value: TransitionOptions | TransitionEffect): this; 1595 gesture(gesture: GestureType, mask?: GestureMask): this; 1596 priorityGesture(gesture: GestureType, mask?: GestureMask): this; 1597 parallelGesture(gesture: GestureType, mask?: GestureMask): this; 1598 blur(value: number): this; 1599 linearGradientBlur(value: number, options: LinearGradientBlurOptions): this; 1600 brightness(value: number): this; 1601 contrast(value: number): this; 1602 grayscale(value: number): this; 1603 colorBlend(value: string | Resource | Color): this; 1604 saturate(value: number): this; 1605 sepia(value: number): this; 1606 invert(value: number): this; 1607 hueRotate(value: string | number): this; 1608 useEffect(value: boolean): this; 1609 backdropBlur(value: number): this; 1610 renderGroup(value: boolean): this; 1611 translate(value: TranslateOptions): this; 1612 scale(value: ScaleOptions): this; 1613 gridSpan(value: number): this; 1614 gridOffset(value: number): this; 1615 rotate(value: RotateOptions): this; 1616 transform(value: object): this; 1617 onAppear(event: () => void): this; 1618 onDisAppear(event: () => void): this; 1619 onAreaChange(event: (oldValue: Area, newValue: Area) => void): this; 1620 visibility(value: Visibility): this; 1621 flexGrow(value: number): this; 1622 flexShrink(value: number): this; 1623 flexBasis(value: string | number): this; 1624 alignSelf(value: ItemAlign): this; 1625 displayPriority(value: number): this; 1626 zIndex(value: number): this; 1627 sharedTransition(id: string, options?: sharedTransitionOptions): this; 1628 direction(value: Direction): this; 1629 align(value: Alignment): this; 1630 position(value: Position): this; 1631 markAnchor(value: Position): this; 1632 offset(value: Position): this; 1633 enabled(value: boolean): this; 1634 useSizeType(value: { 1635 xs?: number | { 1636 span: number; 1637 offset: number; 1638 }; 1639 sm?: number | { 1640 span: number; 1641 offset: number; 1642 }; 1643 md?: number | { 1644 span: number; 1645 offset: number; 1646 }; 1647 lg?: number | { 1648 span: number; 1649 offset: number; 1650 }; 1651 }): this; 1652 alignRules(value: AlignRuleOption): this; 1653 aspectRatio(value: number): this; 1654 clickEffect(value: ClickEffect): this; 1655 onDragStart(event: (event: DragEvent, extraParams?: string) => CustomBuilder | DragItemInfo): this; 1656 onDragEnter(event: (event: DragEvent, extraParams?: string) => void): this; 1657 onDragMove(event: (event: DragEvent, extraParams?: string) => void): this; 1658 onDragLeave(event: (event: DragEvent, extraParams?: string) => void): this; 1659 onDrop(event: (event: DragEvent, extraParams?: string) => void): this; 1660 onDragEnd(event: (event: DragEvent, extraParams?: string) => void): this; 1661 allowDrop(value: Array<UniformDataType>): this; 1662 draggable(value: boolean): this; 1663 overlay(value: string | CustomBuilder, options?: { 1664 align?: Alignment; 1665 offset?: { 1666 x?: number; 1667 y?: number; 1668 }; 1669 }): this; 1670 linearGradient(value: { 1671 angle?: number | string; 1672 direction?: GradientDirection; 1673 colors: Array<any>; 1674 repeating?: boolean; 1675 }): this; 1676 sweepGradient(value: { 1677 center: Array<any>; 1678 start?: number | string; 1679 end?: number | string; 1680 rotation?: number | string; 1681 colors: Array<any>; 1682 repeating?: boolean; 1683 }): this; 1684 radialGradient(value: { 1685 center: Array<any>; 1686 radius: number | string; 1687 colors: Array<any>; 1688 repeating?: boolean; 1689 }): this; 1690 motionPath(value: MotionPathOptions): this; 1691 shadow(value: ShadowOptions | ShadowStyle): this; 1692 blendMode(value: BlendMode): this; 1693 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 1694 mask(value: CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute | ProgressMask): this; 1695 key(value: string): this; 1696 id(value: string): this; 1697 geometryTransition(id: string): this; 1698 bindPopup(show: boolean, popup: PopupOptions | CustomPopupOptions): this; 1699 bindMenu(content: CustomBuilder | MenuElement[], options?: MenuOptions): this; 1700 bindContextMenu(content: CustomBuilder, responseType: ResponseType, options?: ContextMenuOptions): this; 1701 bindContentCover(isShow: unknown, builder: unknown, options?: unknown): this; 1702 bindSheet(isShow: boolean, builder: CustomBuilder, options?: SheetOptions): this; 1703 stateStyles(value: StateStyles): this; 1704 restoreId(value: number): this; 1705 onVisibleAreaChange(ratios: number[], event: (isVisible: boolean, currentRatio: number) => void): this; 1706 sphericalEffect(value: number): this; 1707 lightUpEffect(value: number): this; 1708 pixelStretchEffect(options: PixelStretchEffectOptions): this; 1709 keyboardShortcut(value: string | FunctionKey, keys: ModifierKey[], action?: () => void): this; 1710 accessibilityGroup(value: boolean): this; 1711 accessibilityText(value: string | Resource): this; 1712 accessibilityDescription(value: string | Resource): this; 1713 accessibilityLevel(value: string): this; 1714 obscured(reasons: ObscuredReasons[]): this; 1715 reuseId(id: string): this; 1716 renderFit(fitMode: RenderFit): this; 1717 attributeModifier(modifier: AttributeModifier<CommonAttribute>): this; 1718 onGestureJudgeBegin(callback: (gestureInfo: GestureInfo, event: BaseGestureEvent) => GestureJudgeResult): this; 1719 onLoad(callback: (event?: object) => void): this; 1720 onDestroy(event: () => void): this; 1721 enableSecure(value: boolean): this; 1722} 1723declare class ArkBadgeComponent extends ArkComponent implements BadgeAttribute { 1724 constructor(nativePtr: KNode, classType?: ModifierType); 1725} 1726declare class ArkFlowItemComponent extends ArkComponent implements FlowItemAttribute { 1727 constructor(nativePtr: KNode, classType?: ModifierType); 1728} 1729declare class ArkFormLinkComponent extends ArkComponent implements FormLinkAttribute { 1730 constructor(nativePtr: KNode, classType?: ModifierType); 1731} 1732declare class ArkGridItemComponent extends ArkComponent implements GridItemAttribute { 1733 constructor(nativePtr: KNode, classType?: ModifierType); 1734 rowStart(value: number): this; 1735 rowEnd(value: number): this; 1736 columnStart(value: number): this; 1737 columnEnd(value: number): this; 1738 forceRebuild(value: boolean): this; 1739 selectable(value: boolean): this; 1740 selected(value: boolean): this; 1741 onSelect(event: (isSelected: boolean) => void): this; 1742} 1743declare class ArkHyperlinkComponent extends ArkComponent implements HyperlinkAttribute { 1744 constructor(nativePtr: KNode, classType?: ModifierType); 1745 color(value: ResourceColor): this; 1746 draggable(value: boolean): this; 1747} 1748declare class ArkListComponent extends ArkComponent implements ListAttribute { 1749 constructor(nativePtr: KNode, classType?: ModifierType); 1750 lanes(value: number | LengthConstrain, gutter?: any): this; 1751 alignListItem(value: ListItemAlign): this; 1752 listDirection(value: Axis): this; 1753 scrollBar(value: BarState): this; 1754 scrollBarWidth(value: string | number): this; 1755 scrollBarColor(value: string | number | Color): this; 1756 flingSpeedLimit(value: number): this; 1757 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions | undefined): this; 1758 fadingEdge(value: boolean, options?: FadingEdgeOptions | undefined): this; 1759 contentStartOffset(value: number): this; 1760 contentEndOffset(value: number): this; 1761 divider(value: { 1762 strokeWidth: any; 1763 color?: any; 1764 startMargin?: any; 1765 endMargin?: any; 1766 } | null): this; 1767 editMode(value: boolean): this; 1768 multiSelectable(value: boolean): this; 1769 cachedCount(value: number): this; 1770 chainAnimation(value: boolean): this; 1771 chainAnimationOptions(value: ChainAnimationOptions): this; 1772 sticky(value: StickyStyle): this; 1773 scrollSnapAlign(value: ScrollSnapAlign): this; 1774 nestedScroll(value: NestedScrollOptions): this; 1775 enableScrollInteraction(value: boolean): this; 1776 friction(value: any): this; 1777 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 1778 onScroll(event: (scrollOffset: number, scrollState: ScrollState) => void): this; 1779 onScrollIndex(event: (start: number, end: number, center: number) => void): this; 1780 onScrollVisibleContentChange(callback: OnScrollVisibleContentChangeCallback): this; 1781 onItemDelete(event: (index: number) => boolean): this; 1782 onItemMove(event: (from: number, to: number) => boolean): this; 1783 onItemDragStart(event: (event: ItemDragInfo, itemIndex: number) => void | (() => any)): this; 1784 onItemDragEnter(event: (event: ItemDragInfo) => void): this; 1785 onItemDragMove(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number) => void): this; 1786 onItemDragLeave(event: (event: ItemDragInfo, itemIndex: number) => void): this; 1787 onItemDrop(event: (event: ItemDragInfo, itemIndex: number, insertIndex: number, isSuccess: boolean) => void): this; 1788 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { 1789 offsetRemain: number; 1790 }): this; 1791 onWillScroll(callback: (xOffset: number, yOffset: number, 1792 scrollState: ScrollState, scrollSource: ScrollSource) => void | OffsetResult): this; 1793 onDidScroll(callback: (xOffset: number, yOffset: number, scrollState: ScrollState) => void): this; 1794 onReachStart(event: () => void): this; 1795 onReachEnd(event: () => void): this; 1796 onScrollStart(event: () => void): this; 1797 onScrollStop(event: () => void): this; 1798 childrenMainSize(value: ChildrenMainSize): this; 1799} 1800declare class ArkListItemComponent extends ArkComponent implements ListItemAttribute { 1801 constructor(nativePtr: KNode, classType?: ModifierType); 1802 sticky(value: Sticky): this; 1803 editable(value: boolean | EditMode): this; 1804 selectable(value: boolean): this; 1805 selected(value: boolean): this; 1806 swipeAction(value: SwipeActionOptions): this; 1807 onSelect(event: (isSelected: boolean) => void): this; 1808} 1809declare class ArkListItemGroupComponent extends ArkComponent implements ListItemGroupAttribute { 1810 constructor(nativePtr: KNode, classType?: ModifierType); 1811 divider(value: { 1812 strokeWidth: any; 1813 color?: any; 1814 startMargin?: any; 1815 endMargin?: any; 1816 } | null): this; 1817 childrenMainSize(value: ChildrenMainSize): this; 1818} 1819declare class ArkRelativeContainerComponent extends ArkComponent implements RelativeContainerAttribute { 1820 constructor(nativePtr: KNode, classType?: ModifierType); 1821} 1822declare class ArkSwiperComponent extends ArkComponent implements SwiperAttribute { 1823 constructor(nativePtr: KNode, classType?: ModifierType); 1824 index(value: number): this; 1825 autoPlay(value: boolean): this; 1826 interval(value: number): this; 1827 indicator(value: boolean | DotIndicator | DigitIndicator): this; 1828 displayArrow(value: boolean | ArrowStyle, isHoverShow?: boolean | undefined): this; 1829 loop(value: boolean): this; 1830 duration(value: number): this; 1831 vertical(value: boolean): this; 1832 itemSpace(value: string | number): this; 1833 displayMode(value: SwiperDisplayMode): this; 1834 cachedCount(value: number, isShown?: boolean): this; 1835 displayCount(value: string | number | SwiperAutoFill, swipeByGroup?: boolean | undefined): this; 1836 effectMode(value: EdgeEffect): this; 1837 disableSwipe(value: boolean): this; 1838 curve(value: string | Curve | ICurve): this; 1839 onChange(event: (index: number) => void): this; 1840 indicatorStyle(value?: IndicatorStyle | undefined): this; 1841 prevMargin(value: Length): this; 1842 nextMargin(value: Length): this; 1843 enabled(value: boolean): this; 1844 onAnimationStart(event: (index: number, targetIndex: number, extraInfo: SwiperAnimationEvent) => void): this; 1845 onAnimationEnd(event: (index: number, extraInfo: SwiperAnimationEvent) => void): this; 1846 onGestureSwipe(event: (index: number, extraInfo: SwiperAnimationEvent) => void): this; 1847 nestedScroll(value: SwiperNestedScrollMode): this; 1848 pageFlipMode(value: PageFlipMode): this; 1849 onContentWillScroll(handler: ContentWillScrollCallback): this; 1850} 1851declare class ArkTabsComponent extends ArkComponent implements TabsAttribute { 1852 constructor(nativePtr: KNode, classType?: ModifierType); 1853 onAnimationStart(handler: (index: number, targetIndex: number, event: TabsAnimationEvent) => void): TabsAttribute; 1854 onAnimationEnd(handler: (index: number, event: TabsAnimationEvent) => void): TabsAttribute; 1855 onGestureSwipe(handler: (index: number, event: TabsAnimationEvent) => void): TabsAttribute; 1856 vertical(value: boolean): TabsAttribute; 1857 barPosition(value: BarPosition): TabsAttribute; 1858 scrollable(value: boolean): TabsAttribute; 1859 barMode(value: BarMode, options?: ScrollableBarModeOptions | undefined): TabsAttribute; 1860 barWidth(value: Length): TabsAttribute; 1861 barHeight(value: Length): TabsAttribute; 1862 animationDuration(value: number): TabsAttribute; 1863 animationMode(value: AnimationMode): TabsAttribute; 1864 onChange(event: (index: number) => void): TabsAttribute; 1865 onTabBarClick(event: (index: number) => void): TabsAttribute; 1866 fadingEdge(value: boolean): TabsAttribute; 1867 divider(value: DividerStyle | null): TabsAttribute; 1868 barOverlap(value: boolean): TabsAttribute; 1869 barBackgroundColor(value: ResourceColor): TabsAttribute; 1870 barBackgroundBlurStyle(value: BlurStyle): TabsAttribute; 1871 barGridAlign(value: BarGridColumnOptions): TabsAttribute; 1872 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 1873 edgeEffect(value: EdgeEffect): TabsAttribute; 1874 pageFlipMode(value: PageFlipMode): TabsAttribute; 1875} 1876declare class ArkTabContentComponent extends ArkComponent implements TabContentAttribute { 1877 constructor(nativePtr: KNode, classType?: ModifierType); 1878 tabBar(value: any): this; 1879 tabBar(value: SubTabBarStyle | BottomTabBarStyle): this; 1880 size(value: SizeOptions): this; 1881 width(value: Length): this; 1882 height(value: Length): this; 1883} 1884declare class ArkUIExtensionComponentComponent extends ArkComponent implements UIExtensionComponentAttribute { 1885 constructor(nativePtr: KNode, classType?: ModifierType); 1886 onRemoteReady(callback: any): UIExtensionComponentAttribute; 1887 onReceive(callback: any): UIExtensionComponentAttribute; 1888 onResult(callback: any): UIExtensionComponentAttribute; 1889 onRelease(callback: any): UIExtensionComponentAttribute; 1890 onError(callback: any): UIExtensionComponentAttribute; 1891} 1892declare class ArkWaterFlowComponent extends ArkComponent implements WaterFlowAttribute { 1893 constructor(nativePtr: KNode, classType?: ModifierType); 1894 columnsTemplate(value: string): this; 1895 rowsTemplate(value: string): this; 1896 itemConstraintSize(value: ConstraintSizeOptions): this; 1897 columnsGap(value: Length): this; 1898 rowsGap(value: Length): this; 1899 layoutDirection(value: FlexDirection): this; 1900 nestedScroll(value: NestedScrollOptions): this; 1901 enableScrollInteraction(value: boolean): this; 1902 friction(value: number | Resource): this; 1903 cachedCount(value: number): this; 1904 onReachStart(event: () => void): this; 1905 onReachEnd(event: () => void): this; 1906 onScrollFrameBegin(event: (offset: number, state: ScrollState) => { 1907 offsetRemain: number; 1908 }): this; 1909 clip(value: boolean | CircleAttribute | EllipseAttribute | PathAttribute | RectAttribute): this; 1910 edgeEffect(value: EdgeEffect, options?: EdgeEffectOptions | undefined): this; 1911 fadingEdge(value: boolean, options?: FadingEdgeOptions | undefined): this; 1912 scrollBarWidth(value: string | number): this; 1913 scrollBarColor(value: string | number | Color): this; 1914 scrollBar(value: BarState): this; 1915 flingSpeedLimit(value: number): this; 1916} 1917declare class ArkCommonShapeComponent extends ArkComponent implements CommonShapeMethod<ShapeAttribute> { 1918 constructor(nativePtr: KNode, classType?: ModifierType); 1919 viewPort(value: { 1920 x?: string | number | undefined; 1921 y?: string | number | undefined; 1922 width?: string | number | undefined; 1923 height?: string | number | undefined; 1924 }): this; 1925 stroke(value: ResourceColor): this; 1926 fill(value: ResourceColor): this; 1927 strokeDashOffset(value: string | number): this; 1928 strokeLineCap(value: LineCapStyle): this; 1929 strokeLineJoin(value: LineJoinStyle): this; 1930 strokeMiterLimit(value: string | number): this; 1931 strokeOpacity(value: number | string | Resource): this; 1932 fillOpacity(value: number | string | Resource): this; 1933 strokeWidth(value: string | number): this; 1934 antiAlias(value: boolean): this; 1935 strokeDashArray(value: any[]): this; 1936 mesh(value: any[], column: number, row: number): this; 1937 height(value: Length): this; 1938 width(value: Length): this; 1939 foregroundColor(value: string | number | Resource | Color): this; 1940} 1941declare class ArkCircleComponent extends ArkCommonShapeComponent implements CircleAttribute { 1942} 1943declare class ArkEllipseComponent extends ArkCommonShapeComponent implements EllipseAttribute { 1944} 1945declare class ArkLineComponent extends ArkCommonShapeComponent implements LineAttribute { 1946 constructor(nativePtr: KNode, classType?: ModifierType); 1947 startPoint(value: Array<Length>): this; 1948 endPoint(value: Array<Length>): this; 1949} 1950declare class ArkPolylineComponent extends ArkCommonShapeComponent implements PolylineAttribute { 1951 constructor(nativePtr: KNode, classType?: ModifierType); 1952 points(value: Array<any>): this; 1953} 1954declare class ArkPolygonComponent extends ArkCommonShapeComponent implements PolygonAttribute { 1955 constructor(nativePtr: KNode, classType?: ModifierType); 1956 points(value: Array<any>): this; 1957} 1958declare class ArkPathComponent extends ArkCommonShapeComponent implements PathAttribute { 1959 constructor(nativePtr: KNode, classType?: ModifierType); 1960 commands(value: string): this; 1961} 1962declare class ArkRectComponent extends ArkCommonShapeComponent implements RectAttribute { 1963 constructor(nativePtr: KNode, classType?: ModifierType); 1964 radiusWidth(value: string | number): this; 1965 radiusHeight(value: string | number): this; 1966 radius(value: string | number | Array<any>): this; 1967} 1968declare class ArkShapeComponent extends ArkCommonShapeComponent implements ShapeAttribute { 1969 constructor(nativePtr: KNode, classType?: ModifierType); 1970 viewPort(value: { 1971 x?: string | number | undefined; 1972 y?: string | number | undefined; 1973 width?: string | number | undefined; 1974 height?: string | number | undefined; 1975 }): this; 1976 mesh(value: Array<any> | undefined, column: number | undefined, row: number | undefined): this; 1977 height(value: Length): this; 1978 width(value: Length): this; 1979} 1980declare class ArkCanvasComponent extends ArkComponent implements CanvasAttribute { 1981 constructor(nativePtr: KNode, classType?: ModifierType); 1982 onReady(event: () => void): this; 1983} 1984declare class ArkGridContainerComponent extends ArkComponent implements ColumnAttribute { 1985 constructor(nativePtr: KNode, classType?: ModifierType); 1986 alignItems(value: HorizontalAlign): ColumnAttribute; 1987 justifyContent(value: FlexAlign): ColumnAttribute; 1988 pointLight(value: PointLightStyle): ColumnAttribute; 1989} 1990declare class ArkEffectComponentComponent extends ArkComponent implements EffectComponentAttribute { 1991} 1992declare class ArkRemoteWindowComponent extends ArkComponent implements RemoteWindowAttribute { 1993} 1994declare class ArkParticleComponent extends ArkComponent implements ParticleAttribute { 1995 constructor(nativePtr: KNode, classType?: ModifierType); 1996 disturbanceFields(fields: Array<DisturbanceFieldsOptions>): ParticleAttribute; 1997} 1998declare class CheckboxWidthModifier extends ModifierWithKey<Length> {} 1999declare class CheckboxHeightModifier extends ModifierWithKey<ResourceColor> {} 2000declare class TextForegroundColorModifier extends ModifierWithKey<ResourceColor | ColoringStrategy> {} 2001 2002declare class ArkSymbolGlyphComponent extends ArkComponent implements SymbolGlyphAttribute { 2003 constructor(nativePtr: KNode, classType?: ModifierType); 2004 fontColor(value: ResourceColor[]): SymbolGlyphAttribute; 2005 fontSize(value: number | string | Resource): SymbolGlyphAttribute; 2006 fontWeight(value: number | FontWeight | string): SymbolGlyphAttribute; 2007 renderingStrategy(value: SymbolRenderingStrategy): SymbolGlyphAttribute; 2008 effectStrategy(value: SymbolEffectStrategy): SymbolGlyphAttribute; 2009} 2010 2011declare class ArkSymbolSpanComponent extends ArkComponent implements SymbolSpanAttribute { 2012 constructor(nativePtr: KNode, classType?: ModifierType); 2013 fontColor(value: ResourceColor[]): SymbolSpanAttribute; 2014 fontSize(value: number | string | Resource): SymbolSpanAttribute; 2015 fontWeight(value: number | FontWeight | string): SymbolSpanAttribute; 2016 renderingStrategy(value: SymbolRenderingStrategy): SymbolSpanAttribute; 2017 effectStrategy(value: SymbolEffectStrategy): SymbolSpanAttribute; 2018} 2019 2020declare class ArkParticleComponent extends ArkComponent implements ParticleAttribute { 2021 constructor(nativePtr: KNode, classType?: ModifierType); 2022 emitter(fields: Array<EmitterProps>): ParticleAttribute; 2023} 2024 2025declare class ArkComponent3DComponent extends ArkComponent implements Component3DAttribute { 2026 constructor(nativePtr: KNode, classType?: ModifierType); 2027 environment(uri: Resource): Component3DAttribute; 2028 customRender(uri: Resource, selfRenderUpdate: boolean): Component3DAttribute; 2029 shader(uri: Resource): Component3DAttribute; 2030 shaderImageTexture(uri: Resource): Component3DAttribute; 2031 shaderInputBuffer(buffer: Array<number>): Component3DAttribute; 2032 renderWidth(value: Dimension): Component3DAttribute; 2033 renderHeight(value: Dimension): Component3DAttribute; 2034} 2035 2036declare class ArkContainerSpanComponent extends ArkComponent implements ContainerSpanAttribute { 2037 constructor(nativePtr: KNode, classType?: ModifierType); 2038 textBackgroundStyle(value: TextBackgroundStyle): ContainerSpanAttribute; 2039} 2040