16
declare type PixelMap = import('../resource/image').default.PixelMap;
18
declare type SymbolGlyphModifier = import('../../resource/symbol').SymbolGlyphModifier;
20
declare type ComponentContent = import('../api/arkui/ComponentContent').ComponentContent;
22
declare type AnimationRange<T> = [from: T, to: T];
24
declare interface Callback<T> {}
26
declare interface BaseEvent {}
28
declare interface ClickEvent extends BaseEvent {
35
declare interface CommonConfiguration<T> {
39
contentModifier: ContentModifier<T>
44
interpolate(fraction: number): number;
47
declare interface StateStyles {
52
declare interface AttributeModifier<T>{}
53
declare interface ContentModifier<T>{}
55
declare interface SheetTitleOptions {
57
subtitle?: ResourceStr;
60
declare interface UICommonEvent {
61
setOnClick(callback: Callback<ClickEvent> | undefined): void;
64
declare enum SheetSize {
70
declare enum SheetType {
76
declare enum SheetMode {
81
declare enum ShadowStyle {
90
declare enum ShadowType {
95
declare interface ShadowOptions {
96
radius: number | Resource;
98
color?: Color | string | Resource | ColoringStrategy;
99
offsetX?: number | Resource;
100
offsetY?: number | Resource;
104
declare interface SheetDismiss {
108
declare enum DismissReason {
115
declare interface DismissSheetAction {
116
dismiss: Callback<void>;
117
reason: DismissReason;
120
declare interface SpringBackAction {
121
springBack: Callback<void>;
124
declare type CustomBuilder = (() => any) | void;
126
declare interface BindOptions {
127
backgroundColor?: ResourceColor;
128
onAppear?: () => void;
129
onDisappear?: () => void;
130
onWillAppear?: () => void;
131
onWillDisappear?: () => void;
134
declare type UIContext = import('../api/@ohos.arkui.UIContext').UIContext;
136
declare interface SheetOptions extends BindOptions {
137
height?: SheetSize | Length;
139
maskColor?: ResourceColor;
140
detents?: [(SheetSize | Length), (SheetSize | Length)?, (SheetSize | Length)?];
141
blurStyle?: BlurStyle;
142
showClose?: boolean | Resource;
143
preferType?: SheetType;
144
title?: SheetTitleOptions | CustomBuilder;
145
shouldDismiss?: (sheetDismiss: SheetDismiss) => void;
146
onWillDismiss?: Callback<DismissSheetAction>;
147
onWillSpringBackWhenDismiss?: Callback<SpringBackAction>;
148
enableOutsideInteractive?: boolean;
150
borderWidth?: Dimension | EdgeWidths | LocalizedEdgeWidths;
151
borderColor?: ResourceColor | EdgeColors | LocalizedEdgeColors;
152
borderStyle?: BorderStyle | EdgeStyles;
153
shadow?: ShadowOptions | ShadowStyle;
154
onHeightDidChange?: Callback<number>;
156
onDetentsDidChange?: Callback<number>;
157
onWidthDidChange?: Callback<number>;
158
onTypeDidChange?: Callback<SheetType>;
159
uiContext?: UIContext;
162
declare enum BlurStyle {
166
declare enum ThemeColorMode {
172
declare enum AdaptiveColor {
176
declare interface BlurOptions {
177
grayscale: [number, number];
182
declare interface BlurStyleOptions {
183
colorMode?: ThemeColorMode;
184
adaptiveColor?: AdaptiveColor;
186
blurOptions?: BlurOptions;
189
declare enum BlurStyleActivePolicy {
198
FOLLOWS_WINDOW_ACTIVE_STATE = 0,
221
declare enum BlurType {
242
declare interface BackgroundBlurStyleOptions extends BlurStyleOptions {}
244
declare interface SizeResult {
249
declare type EdgeWidths = {
256
declare type EdgeWidth = EdgeWidths;
258
declare type Padding = {
265
declare interface LocalizedEdgeWidths {
268
bottom?: LengthMetrics;
269
start?: LengthMetrics;
272
declare type EdgeColors = {
274
right?: ResourceColor;
275
bottom?: ResourceColor;
276
left?: ResourceColor;
279
declare interface LocalizedEdgeColors {
282
bottom?: ResourceColor;
283
start?: ResourceColor;
286
declare type BorderRadiuses = {
290
bottomRight?: Length;
293
declare interface LocalizedBorderRadiuses {
294
topStart?: LengthMetrics;
295
topEnd?: LengthMetrics;
296
bottomStart?: LengthMetrics;
297
bottomEnd?: LengthMetrics;
300
declare enum BorderStyle {
306
declare type EdgeStyles = {
309
bottom?: BorderStyle;
313
declare interface BorderOptions {
320
declare enum DragPreviewMode {
323
ENABLE_DEFAULT_SHADOW = 3,
324
ENABLE_DEFAULT_RADIUS = 4,
327
declare type ImageModifier = import('../api/arkui/ImageModifier').ImageModifier;
329
declare interface DragPreviewOptions {
330
mode?: DragPreviewMode | Array<DragPreviewMode>;
331
modifier?: ImageModifier;
332
numberBadge?: boolean | number;
335
declare interface DragInteractionOptions {
337
isMultiSelectionEnabled?: boolean;
339
defaultAnimationBeforeLifting?: boolean;
342
declare enum GradientDirection {
354
declare class AttributeModifier<T> {}
356
declare class CommonMethod<T> {
360
stateStyles(value: StateStyles): T;
362
backdropBlur(value: number, options?: BlurOptions): T;
364
width(value: Length): T;
366
height(value: Length): T;
368
key(value: string): T;
370
restoreId(value: number): T;
372
padding(value: Padding | Dimension): T;
374
bindSheet(isShow: boolean, builder: CustomBuilder, options?: SheetOptions): T;
376
backgroundBlurStyle(value: BlurStyle, options?: BackgroundBlurStyleOptions): T;
378
dragPreviewOptions(value: DragPreviewOptions, options?: DragInteractionOptions): T;
380
linearGradient(value: {
381
angle?: number | string;
382
direction?: GradientDirection;
383
colors: Array<[ResourceColor, number]>;
387
border(value: BorderOptions): T;
389
onChildTouchTest(event: (value: Array<TouchTestInfo>) => string): T;
391
attributeModifier(modifier: AttributeModifier<T>): T
393
gestureModifier(modifier: GestureModifier): T;
395
onGestureRecognizerJudgeBegin(callback: GestureRecognizerJudgeBeginCallback): T;
398
declare interface Rectangle {
409
declare interface RectResult {
416
declare class TouchTestInfo {
426
declare interface CommonInterface {
430
declare class CommonAttribute extends CommonMethod<CommonAttribute> {
433
declare const Common: CommonInterface
435
declare class CustomComponent extends CommonAttribute {
437
aboutToAppear?(): void;
438
aboutToDisappear?(): void;
439
aboutToReuse?(params: { [key: string]: unknown }): void;
440
aboutToRecycle?(): void;
443
declare class CommonShapeMethod<T> extends CommonMethod<T> {
446
stroke(value: ResourceColor): T;
449
declare class ScrollableCommonMethod<T> extends CommonMethod<T> {
450
scrollBarWidth(value: number | string): T;
453
declare enum SourceTool {
462
declare interface UIGestureEvent {
464
addGesture<T>(gesture: GestureHandler<T>, priority?: GesturePriority, mask?: GestureMask): void;
467
declare interface GestureModifier {
468
applyGesture(): void;
469
applyGesture(event: UIGestureEvent): void;
472
declare type GestureRecognizerJudgeBeginCallback = (event: BaseGestureEvent, current: GestureRecognizer, recognizers: Array<GestureRecognizer>) => GestureJudgeResult;
475
declare module 'commonEvent' {
476
module 'commonEvent' {
478
export { UICommonEvent };
482
declare module 'commonAttribute'{
483
module 'commonAttribute' {
485
export { CommonAttribute };