@compass-framework/core 1.2.56 → 1.2.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@types/AbsoluteLayout.d.ts +6 -0
- package/@types/AccelerateDecelerateInterpolator.d.ts +3 -0
- package/@types/AccelerateInterpolator.d.ts +3 -0
- package/@types/Adapter.d.ts +6 -0
- package/@types/AlphaAnimation.d.ts +6 -1
- package/@types/Animation.d.ts +15 -2
- package/@types/AnimationSet.d.ts +5 -1
- package/@types/Animator.d.ts +12 -0
- package/@types/Application.d.ts +50 -11
- package/@types/ApplicationWindow.d.ts +9 -5
- package/@types/ArrayAdapter.d.ts +3 -0
- package/@types/Assets.d.ts +3 -0
- package/@types/AttributeSet.d.ts +5 -2
- package/@types/BaseAdapter.d.ts +3 -0
- package/@types/BlendMode.ts +150 -0
- package/@types/BounceInterpolator.d.ts +3 -0
- package/@types/Button.d.ts +3 -0
- package/@types/Canvas.d.ts +46 -60
- package/@types/Color.d.ts +40 -30
- package/@types/ColorDrawable.d.ts +5 -1
- package/@types/ColorFilter.ts +15 -0
- package/@types/Configuration.d.ts +3 -0
- package/@types/Context.d.ts +21 -3
- package/@types/ContextUtils.d.ts +3 -0
- package/@types/CornerPathEffect.d.ts +26 -0
- package/@types/CornersDrawable.d.ts +15 -6
- package/@types/CycleInterpolator.d.ts +3 -0
- package/@types/DecelerateInterpolator.d.ts +3 -0
- package/@types/DisplayMetrics.d.ts +3 -0
- package/@types/DoubleClick.d.ts +3 -0
- package/@types/DoubleClickListener.d.ts +6 -0
- package/@types/Drawable.d.ts +20 -5
- package/@types/EditRichText.d.ts +3 -0
- package/@types/EditText.d.ts +3 -0
- package/@types/Editable.d.ts +6 -0
- package/@types/Environment.ts +3 -0
- package/@types/FrameLayout.d.ts +8 -2
- package/@types/FreezeAbsoluteLayout.d.ts +6 -0
- package/@types/FreezeLayoutViewGroup.d.ts +3 -0
- package/@types/Gravity.d.ts +3 -0
- package/@types/GridLayout.d.ts +6 -0
- package/@types/GridLayoutAnimationController.d.ts +3 -0
- package/@types/GridView.d.ts +3 -0
- package/@types/HorizontalScrollView.ts +3 -0
- package/@types/Image.d.ts +28 -0
- package/@types/ImageDrawable.ts +43 -0
- package/@types/ImageFilter.ts +13 -0
- package/@types/ImageView.d.ts +9 -0
- package/@types/InputMethodService.d.ts +6 -0
- package/@types/Interpolator.d.ts +6 -0
- package/@types/KeyEvent.d.ts +3 -0
- package/@types/LayerDrawable.d.ts +6 -2
- package/@types/LayoutAnimationController.d.ts +9 -0
- package/@types/LayoutInflater.ts +3 -0
- package/@types/LinearGradient.d.ts +22 -2
- package/@types/LinearGradientDrawable.d.ts +3 -0
- package/@types/LinearInterpolator.d.ts +3 -0
- package/@types/LinearLayout.d.ts +6 -0
- package/@types/ListAdapter.d.ts +6 -0
- package/@types/ListView.d.ts +3 -0
- package/@types/Matrix.d.ts +110 -53
- package/@types/MotionEvent.d.ts +9 -0
- package/@types/{ICursor.d.ts → MouseCursor.ts} +18 -7
- package/@types/Outline.d.ts +6 -2
- package/@types/Paint.d.ts +141 -76
- package/@types/Path.d.ts +86 -44
- package/@types/PathEffect.ts +7 -1
- package/@types/Picture.d.ts +24 -15
- package/@types/PictureDrawable.d.ts +7 -5
- package/@types/PixelFormat.ts +3 -0
- package/@types/PopupWindow.d.ts +9 -6
- package/@types/PropertyValuesHolder.d.ts +3 -0
- package/@types/Rect.d.ts +66 -43
- package/@types/RelativeLayout.d.ts +6 -0
- package/@types/RendererBackend.ts +8 -0
- package/@types/Resolver.ts +7 -2
- package/@types/Resources.d.ts +3 -0
- package/@types/ResourcesInflater.d.ts +3 -0
- package/@types/RotateAnimation.d.ts +7 -3
- package/@types/ScaleAnimation.d.ts +7 -3
- package/@types/ScrollView.d.ts +3 -0
- package/@types/Shader.d.ts +15 -1
- package/@types/Shadow.d.ts +32 -6
- package/@types/Slot.d.ts +9 -0
- package/@types/Surface.d.ts +32 -0
- package/@types/SurfaceProvider.d.ts +25 -0
- package/@types/TabBarLayout.d.ts +12 -0
- package/@types/TableLayout.d.ts +6 -0
- package/@types/TableRow.d.ts +6 -0
- package/@types/TextView.d.ts +3 -0
- package/@types/Theme.d.ts +9 -0
- package/@types/TimeInterpolator.d.ts +6 -0
- package/@types/Transformation.d.ts +6 -0
- package/@types/TranslateAnimation.d.ts +6 -2
- package/@types/TypeEvaluator.d.ts +3 -0
- package/@types/Typeface.d.ts +21 -3
- package/@types/TypefaceFactory.d.ts +40 -4
- package/@types/ValueAnimator.d.ts +12 -0
- package/@types/View.d.ts +66 -0
- package/@types/ViewGroup.d.ts +9 -0
- package/@types/ViewGroupOverlay.d.ts +3 -0
- package/@types/ViewOutlineProvider.d.ts +3 -0
- package/@types/ViewOverlay.d.ts +3 -0
- package/@types/ViewParent.d.ts +6 -0
- package/@types/ViewSlot.d.ts +3 -0
- package/@types/ViewTreeObserver.d.ts +27 -0
- package/@types/{IWindow.d.ts → Window.d.ts} +10 -4
- package/@types/WindowManager.d.ts +14 -6
- package/@types/XMLLayoutParser.d.ts +3 -0
- package/@types/XMLResourcesParser.d.ts +3 -0
- package/@types/XMLViewFactoryRegistry.d.ts +18 -0
- package/index.d.ts +111 -113
- package/package.json +2 -2
- package/@types/ApplicationBoot.ts +0 -10
- package/@types/ApplicationContext.d.ts +0 -3
- package/@types/ApplicationFrame.d.ts +0 -33
- package/@types/ApplicationFrameContext.ts +0 -5
- package/@types/ApplicationFrameObserver.d.ts +0 -17
- package/@types/ApplicationFrameSettings.ts +0 -5
- package/@types/ApplicationManifest.d.ts +0 -5
- package/@types/Bitmap.d.ts +0 -7
- package/@types/BitmapDrawable.d.ts +0 -31
- package/@types/CornerPathEffect.ts +0 -7
- package/@types/InputMethodServer.ts +0 -1
- package/@types/Readying.ts +0 -3
- package/@types/StackLayout.d.ts +0 -9
- package/@types/WindowContext.d.ts +0 -9
package/@types/Rect.d.ts
CHANGED
|
@@ -1,75 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
import { Context } from "./Context";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
/**
|
|
5
|
+
* 矩形区域,表示轴对齐的边界框。
|
|
6
|
+
*/
|
|
7
|
+
export interface Rect {
|
|
8
|
+
equals(rect: Rect): boolean
|
|
5
9
|
|
|
6
|
-
|
|
7
|
-
public constructor(rect: Rect);
|
|
8
|
-
public constructor(width: number, height: number);
|
|
9
|
-
public constructor(left: number, top: number, right: number, bottom: number);
|
|
10
|
+
isEmpty(): boolean
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
width(): number
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
height(): number
|
|
14
15
|
|
|
15
|
-
|
|
16
|
+
centerX(): number
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
centerY(): number
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
setEmpty(): void
|
|
20
21
|
|
|
21
|
-
|
|
22
|
+
exactCenterX(): number
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
exactCenterY(): number
|
|
24
25
|
|
|
25
|
-
|
|
26
|
+
set(rect: Rect):void;
|
|
27
|
+
set(left: number, top: number, right: number, bottom: number):void;
|
|
26
28
|
|
|
27
|
-
|
|
29
|
+
offset(dx: number, dy: number): void
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
public set(left: number, top: number, right: number, bottom: number):void;
|
|
31
|
+
offsetTo(newLeft: number, newTop: number): void
|
|
31
32
|
|
|
32
|
-
|
|
33
|
+
inset(dx: number, dy: number): void
|
|
33
34
|
|
|
34
|
-
|
|
35
|
+
contains(rect: Rect): boolean;
|
|
36
|
+
contains(x: number, y: number): boolean;
|
|
37
|
+
contains(left: number, top: number, right: number, bottom: number): boolean;
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
intersect(rect: Rect): boolean;
|
|
40
|
+
intersect(left: number, top: number, right: number, bottom: number): boolean;
|
|
37
41
|
|
|
38
|
-
|
|
39
|
-
public contains(x: number, y: number): boolean;
|
|
40
|
-
public contains(left: number, top: number, right: number, bottom: number): boolean;
|
|
42
|
+
setIntersect(a: Rect, b: Rect): boolean
|
|
41
43
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
+
intersects(rect: Rect): boolean;
|
|
45
|
+
intersects(left: number, top: number, right: number, bottom: number): boolean;
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
union(rect: Rect): void;
|
|
48
|
+
union(x: number, y: number,): void;
|
|
49
|
+
union(left: number, top: number, right: number, bottom: number): void;
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
public intersects(left: number, top: number, right: number, bottom: number): boolean;
|
|
51
|
+
sort(): void
|
|
49
52
|
|
|
50
|
-
|
|
51
|
-
public union(x: number, y: number,): void;
|
|
52
|
-
public union(left: number, top: number, right: number, bottom: number): void;
|
|
53
|
+
round(): void
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
scale(scale: number): void
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
getLeft(): number
|
|
57
58
|
|
|
58
|
-
|
|
59
|
+
getRight(): number
|
|
59
60
|
|
|
60
|
-
|
|
61
|
+
getTop(): number
|
|
61
62
|
|
|
62
|
-
|
|
63
|
+
getBottom(): number
|
|
63
64
|
|
|
64
|
-
|
|
65
|
+
setLeft(left: number): Rect
|
|
65
66
|
|
|
66
|
-
|
|
67
|
+
setRight(right: number): Rect
|
|
67
68
|
|
|
68
|
-
|
|
69
|
+
setTop(top: number): Rect
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
setBottom(bottom: number): Rect
|
|
71
72
|
|
|
72
|
-
|
|
73
|
+
toString(): string
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
dispose(): void;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Rect 接口的实现基类。
|
|
80
|
+
*/
|
|
81
|
+
export abstract class Rect extends InterfaceTemplate {}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Rect 相关工具与工厂方法。
|
|
85
|
+
*/
|
|
86
|
+
export namespace Rect {
|
|
87
|
+
/**
|
|
88
|
+
* 判断两个矩形是否相交。
|
|
89
|
+
*/
|
|
90
|
+
export function intersects(a: Rect, b: Rect): boolean;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* 创建 Rect 实例。
|
|
94
|
+
*/
|
|
95
|
+
export function create(context: Context,): Rect;
|
|
96
|
+
export function create(context: Context, rect: Rect): Rect;
|
|
97
|
+
export function create(context: Context, left: number, top: number, right: number, bottom: number): Rect;
|
|
75
98
|
}
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 相对布局,按相对关系定位子视图。
|
|
5
|
+
*/
|
|
3
6
|
export declare class RelativeLayout extends ViewGroup {}
|
|
4
7
|
|
|
5
8
|
export declare namespace RelativeLayout {
|
|
9
|
+
/**
|
|
10
|
+
* RelativeLayout 的布局参数。
|
|
11
|
+
*/
|
|
6
12
|
class LayoutParams extends RelativeLayout.MarginLayoutParams {}
|
|
7
13
|
}
|
package/@types/Resolver.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Context } from "./Context";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 环境解析器,在 Context 挂载后解析命名参数。
|
|
5
|
+
*/
|
|
3
6
|
export declare class Resolver {
|
|
4
|
-
public mounted(
|
|
7
|
+
public mounted(context: Context): void;
|
|
5
8
|
|
|
6
9
|
public resolve(...parameter: any[]): any;
|
|
10
|
+
|
|
11
|
+
public getContext(): Context;
|
|
7
12
|
}
|
package/@types/Resources.d.ts
CHANGED
|
@@ -6,6 +6,9 @@ import { ColorDrawable } from "./ColorDrawable";
|
|
|
6
6
|
import { Configuration } from "./Configuration";
|
|
7
7
|
import { AttributeSet } from "./AttributeSet";
|
|
8
8
|
|
|
9
|
+
/**
|
|
10
|
+
* 资源管理器,提供布局、drawable、字符串等资源读写。
|
|
11
|
+
*/
|
|
9
12
|
export declare class Resources {
|
|
10
13
|
public getDisplayMetrics(): DisplayMetrics;
|
|
11
14
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Animation } from "./Animation";
|
|
2
2
|
import { Transformation } from "./Transformation";
|
|
3
|
+
import { Context } from "./Context";
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 旋转动画。
|
|
7
|
+
*/
|
|
4
8
|
export declare class RotateAnimation extends Animation {
|
|
5
|
-
public constructor(fromDegrees: number, toDegrees: number);
|
|
6
|
-
public constructor(fromDegrees: number, toDegrees: number, pivotX: number, pivotY: number);
|
|
7
|
-
public constructor(fromDegrees: number, toDegrees: number, pivotXType: number, pivotXValue: number, pivotYType: number, pivotYValue: number);
|
|
9
|
+
public constructor(context: Context, fromDegrees: number, toDegrees: number);
|
|
10
|
+
public constructor(context: Context, fromDegrees: number, toDegrees: number, pivotX: number, pivotY: number);
|
|
11
|
+
public constructor(context: Context, fromDegrees: number, toDegrees: number, pivotXType: number, pivotXValue: number, pivotYType: number, pivotYValue: number);
|
|
8
12
|
|
|
9
13
|
public applyTransformation(interpolatedTime: number, t: Transformation): void;
|
|
10
14
|
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { Animation } from "./Animation";
|
|
2
2
|
import { Transformation } from "./Transformation";
|
|
3
|
+
import { Context } from "./Context";
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 缩放动画。
|
|
7
|
+
*/
|
|
4
8
|
export declare class ScaleAnimation extends Animation {
|
|
5
|
-
public constructor(fromX: number, toX: number, fromY: number, toY: number);
|
|
6
|
-
public constructor(fromX: number, toX: number, fromY: number, toY: number, pivotX: number, pivotY: number);
|
|
7
|
-
public constructor(fromX: number, toX: number, fromY: number, toY: number, pivotXType: number, pivotXValue: number, pivotYType: number, pivotYValue: number);
|
|
9
|
+
public constructor(contex: Context, fromX: number, toX: number, fromY: number, toY: number);
|
|
10
|
+
public constructor(contex: Context, fromX: number, toX: number, fromY: number, toY: number, pivotX: number, pivotY: number);
|
|
11
|
+
public constructor(contex: Context, fromX: number, toX: number, fromY: number, toY: number, pivotXType: number, pivotXValue: number, pivotYType: number, pivotYValue: number);
|
|
8
12
|
|
|
9
13
|
public applyTransformation(interpolatedTime: number, t: Transformation): void;
|
|
10
14
|
|
package/@types/ScrollView.d.ts
CHANGED
package/@types/Shader.d.ts
CHANGED
|
@@ -1 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
InterfaceTemplate,
|
|
3
|
+
} from "@compass-framework/library";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 着色器,为 Paint 提供渐变或图案填充。
|
|
7
|
+
*/
|
|
8
|
+
export interface Shader {
|
|
9
|
+
dispose(): void;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Shader 接口的实现基类。
|
|
14
|
+
*/
|
|
15
|
+
export abstract class Shader extends InterfaceTemplate {}
|
package/@types/Shadow.d.ts
CHANGED
|
@@ -1,8 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
public color: number;
|
|
1
|
+
import {
|
|
2
|
+
InterfaceTemplate,
|
|
3
|
+
} from "@compass-framework/library";
|
|
4
|
+
import { Context } from "./Context";
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* 阴影效果,描述偏移、模糊半径与颜色。
|
|
8
|
+
*/
|
|
9
|
+
export interface Shadow {
|
|
10
|
+
getShadowX(): number;
|
|
11
|
+
|
|
12
|
+
getShadowY(): number;
|
|
13
|
+
|
|
14
|
+
getShadowRadius(): number;
|
|
15
|
+
|
|
16
|
+
getShadowColor(): number;
|
|
17
|
+
|
|
18
|
+
dispose(): void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Shadow 接口的实现基类。
|
|
23
|
+
*/
|
|
24
|
+
export abstract class Shadow extends InterfaceTemplate {}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Shadow 工厂方法。
|
|
28
|
+
*/
|
|
29
|
+
export namespace Shadow {
|
|
30
|
+
/**
|
|
31
|
+
* 创建阴影效果实例。
|
|
32
|
+
*/
|
|
33
|
+
export function create(context: Context, shadowX: number, shadowY: number, shadowRadius: number, shadowColor: number): Shadow;
|
|
8
34
|
}
|
package/@types/Slot.d.ts
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
1
|
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
2
|
import { View } from "./View";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 插槽接口,用于替换目标视图内容。
|
|
6
|
+
*/
|
|
4
7
|
export declare interface Slot {
|
|
5
8
|
replace(target: View, options?: Slot.Options): void
|
|
6
9
|
}
|
|
7
10
|
|
|
11
|
+
/**
|
|
12
|
+
* Slot 的接口模板实现。
|
|
13
|
+
*/
|
|
8
14
|
export class Slot extends InterfaceTemplate {
|
|
9
15
|
|
|
10
16
|
}
|
|
11
17
|
|
|
12
18
|
export namespace Slot {
|
|
19
|
+
/**
|
|
20
|
+
* 插槽替换选项,控制替换或包裹模式。
|
|
21
|
+
*/
|
|
13
22
|
export interface Options {
|
|
14
23
|
patten?: 'replace' | 'wrap'
|
|
15
24
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
import { Image } from "./Image";
|
|
3
|
+
import { Canvas } from "./Canvas";
|
|
4
|
+
import { Context } from "./Context";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* 离屏绘制表面,可获取 Canvas 并生成图像快照。
|
|
8
|
+
*/
|
|
9
|
+
export interface Surface {
|
|
10
|
+
getCanvas(): Canvas;
|
|
11
|
+
|
|
12
|
+
dispose(): void;
|
|
13
|
+
|
|
14
|
+
flush(): void;
|
|
15
|
+
|
|
16
|
+
makeImageSnapshot(): Image
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Surface 接口的实现基类。
|
|
21
|
+
*/
|
|
22
|
+
export abstract class Surface extends InterfaceTemplate {}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Surface 工厂方法。
|
|
26
|
+
*/
|
|
27
|
+
export namespace Surface {
|
|
28
|
+
/**
|
|
29
|
+
* 创建指定宽高的 Surface。
|
|
30
|
+
*/
|
|
31
|
+
export function create(context: Context, width: number, height: number): Surface;
|
|
32
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
import { Context } from "./Context";
|
|
3
|
+
import { Surface } from "./Surface";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Surface 提供者,按设备尺寸创建绘制表面。
|
|
7
|
+
*/
|
|
8
|
+
export interface SurfaceProvider {
|
|
9
|
+
makeSurface(deviceWidth: number, deviceHeight: number): Surface;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* SurfaceProvider 接口的实现基类。
|
|
14
|
+
*/
|
|
15
|
+
export abstract class SurfaceProvider extends InterfaceTemplate {}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* SurfaceProvider 工厂方法。
|
|
19
|
+
*/
|
|
20
|
+
export namespace SurfaceProvider {
|
|
21
|
+
/**
|
|
22
|
+
* 创建 SurfaceProvider 实例。
|
|
23
|
+
*/
|
|
24
|
+
export function create(context: Context): SurfaceProvider;
|
|
25
|
+
}
|
package/@types/TabBarLayout.d.ts
CHANGED
|
@@ -2,6 +2,9 @@ import { InterfaceTemplate } from "@compass-framework/library";
|
|
|
2
2
|
import { View } from "./View";
|
|
3
3
|
import { LinearLayout } from "./LinearLayout";
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 标签栏布局,管理内容区与页脚区的标签切换。
|
|
7
|
+
*/
|
|
5
8
|
export declare class TabBarLayout extends LinearLayout {
|
|
6
9
|
public hasScroll(): boolean;
|
|
7
10
|
|
|
@@ -17,16 +20,25 @@ export declare class TabBarLayout extends LinearLayout {
|
|
|
17
20
|
}
|
|
18
21
|
|
|
19
22
|
export namespace TabBarLayout {
|
|
23
|
+
/**
|
|
24
|
+
* 标签栏插槽类型,区分内容区、页脚与默认区域。
|
|
25
|
+
*/
|
|
20
26
|
export enum Slot {
|
|
21
27
|
CONTENT = "CONTENT",
|
|
22
28
|
FOOTER = "FOOTER",
|
|
23
29
|
DEFAULT = "DEFAULT",
|
|
24
30
|
}
|
|
25
31
|
|
|
32
|
+
/**
|
|
33
|
+
* 标签栏元素视图的编辑与状态回调。
|
|
34
|
+
*/
|
|
26
35
|
export interface TabBarLayoutElementViewListener {
|
|
27
36
|
onEdit(): void;
|
|
28
37
|
onState(status: boolean): void;
|
|
29
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* TabBarLayoutElementViewListener 的接口模板实现。
|
|
41
|
+
*/
|
|
30
42
|
export class TabBarLayoutElementViewListener extends InterfaceTemplate {
|
|
31
43
|
|
|
32
44
|
}
|
package/@types/TableLayout.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
2
|
import { LinearLayout } from "./LinearLayout";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 表格布局,按行列组织子视图。
|
|
6
|
+
*/
|
|
4
7
|
export declare class TableLayout extends ViewGroup {}
|
|
5
8
|
|
|
6
9
|
export declare namespace TableLayout {
|
|
10
|
+
/**
|
|
11
|
+
* TableLayout 的布局参数。
|
|
12
|
+
*/
|
|
7
13
|
export class LayoutParams extends LinearLayout.LayoutParams {}
|
|
8
14
|
}
|
package/@types/TableRow.d.ts
CHANGED
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ViewGroup } from "./ViewGroup";
|
|
2
2
|
import { LinearLayout } from "./LinearLayout";
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 表格行,作为 TableLayout 中的一行容器。
|
|
6
|
+
*/
|
|
4
7
|
export declare class TableRow extends ViewGroup {}
|
|
5
8
|
|
|
6
9
|
export namespace TableRow {
|
|
10
|
+
/**
|
|
11
|
+
* TableRow 的布局参数。
|
|
12
|
+
*/
|
|
7
13
|
export class LayoutParams extends LinearLayout.LayoutParams {}
|
|
8
14
|
}
|
package/@types/TextView.d.ts
CHANGED
package/@types/Theme.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 主题,管理亮色/暗色模式。
|
|
3
|
+
*/
|
|
1
4
|
export declare class Theme {
|
|
2
5
|
public constructor();
|
|
3
6
|
public constructor(theme: Theme);
|
|
@@ -9,7 +12,13 @@ export declare class Theme {
|
|
|
9
12
|
public setMode(mode: Theme.Mode): void;
|
|
10
13
|
}
|
|
11
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Theme 相关类型定义。
|
|
17
|
+
*/
|
|
12
18
|
export namespace Theme {
|
|
19
|
+
/**
|
|
20
|
+
* 主题模式(亮色/暗色)。
|
|
21
|
+
*/
|
|
13
22
|
export enum Mode {
|
|
14
23
|
Light,
|
|
15
24
|
Dark,
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* 时间插值器接口。
|
|
5
|
+
*/
|
|
3
6
|
export declare interface TimeInterpolator {
|
|
4
7
|
getInterpolation(input: number): number;
|
|
5
8
|
}
|
|
6
9
|
|
|
10
|
+
/**
|
|
11
|
+
* 时间插值器实现类。
|
|
12
|
+
*/
|
|
7
13
|
export declare class TimeInterpolator extends InterfaceTemplate {
|
|
8
14
|
|
|
9
15
|
}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { Matrix } from './Matrix';
|
|
2
|
+
import { Context } from "./Context";
|
|
2
3
|
|
|
4
|
+
/**
|
|
5
|
+
* 变换信息,组合透明度与矩阵用于动画插值结果。
|
|
6
|
+
*/
|
|
3
7
|
export declare class Transformation {
|
|
4
8
|
public static TYPE_IDENTITY: number;
|
|
5
9
|
public static TYPE_ALPHA: number;
|
|
6
10
|
public static TYPE_MATRIX: number;
|
|
7
11
|
public static TYPE_BOTH: number;
|
|
8
12
|
|
|
13
|
+
public constructor(context: Context);
|
|
14
|
+
|
|
9
15
|
public clear(): void;
|
|
10
16
|
|
|
11
17
|
public getTransformationType(): number;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { Animation } from "./Animation";
|
|
2
2
|
import { Transformation } from "./Transformation";
|
|
3
|
+
import { Context } from "./Context";
|
|
3
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 平移动画。
|
|
7
|
+
*/
|
|
4
8
|
export declare class TranslateAnimation extends Animation {
|
|
5
|
-
public constructor(fromXDelta: number, toXDelta: number, fromYDelta: number, toYDelta: number);
|
|
6
|
-
public constructor(fromXType: number, fromXValue: number, toXType: number, toXValue: number, fromYType: number, fromYValue: number, toYType: number, toYValue: number);
|
|
9
|
+
public constructor(context: Context, fromXDelta: number, toXDelta: number, fromYDelta: number, toYDelta: number);
|
|
10
|
+
public constructor(context: Context, fromXType: number, fromXValue: number, toXType: number, toXValue: number, fromYType: number, fromYValue: number, toYType: number, toYValue: number);
|
|
7
11
|
|
|
8
12
|
public applyTransformation(interpolatedTime: number, t:Transformation): void;
|
|
9
13
|
|
package/@types/Typeface.d.ts
CHANGED
|
@@ -1,10 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
InterfaceTemplate,
|
|
3
|
+
} from "@compass-framework/library";
|
|
3
4
|
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 字体(字型),描述字体名称与样式。
|
|
7
|
+
*/
|
|
8
|
+
export interface Typeface {
|
|
9
|
+
getTypefaceName(): string;
|
|
10
|
+
|
|
11
|
+
getTypefaceStyle(): Typeface.TypefaceStyle;
|
|
5
12
|
}
|
|
6
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Typeface 接口的实现基类。
|
|
16
|
+
*/
|
|
17
|
+
export abstract class Typeface extends InterfaceTemplate {}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Typeface 相关类型。
|
|
21
|
+
*/
|
|
7
22
|
export namespace Typeface {
|
|
23
|
+
/**
|
|
24
|
+
* 字体样式(常规、粗体、斜体等)。
|
|
25
|
+
*/
|
|
8
26
|
export enum TypefaceStyle {
|
|
9
27
|
NORMAL,
|
|
10
28
|
BOLD,
|
|
@@ -1,9 +1,45 @@
|
|
|
1
|
+
import { InterfaceTemplate } from "@compass-framework/library";
|
|
2
|
+
import { Context } from "./Context";
|
|
1
3
|
import { Typeface } from "./Typeface";
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* 字体工厂,用于获取、创建与加载 Typeface。
|
|
7
|
+
*/
|
|
8
|
+
export interface TypefaceFactory {
|
|
9
|
+
createFromTypeface(typeface: Typeface, style?: Typeface.TypefaceStyle): Typeface;
|
|
5
10
|
|
|
6
|
-
|
|
11
|
+
acquireTypeface(name: string, style?: Typeface.TypefaceStyle): Typeface;
|
|
7
12
|
|
|
8
|
-
|
|
13
|
+
defaultFromStyle(style?: Typeface.TypefaceStyle): Typeface;
|
|
14
|
+
|
|
15
|
+
useDefaultTypeface(typeface: Typeface, style?: Typeface.TypefaceStyle): void
|
|
16
|
+
|
|
17
|
+
loadTypefaceFromUrl(name: string, url: string, options?: TypefaceFactory.LoadTypefaceOptions): Promise<Typeface>;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* TypefaceFactory 接口的实现基类。
|
|
22
|
+
*/
|
|
23
|
+
export abstract class TypefaceFactory extends InterfaceTemplate {}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* TypefaceFactory 相关常量、选项与单例访问。
|
|
27
|
+
*/
|
|
28
|
+
export namespace TypefaceFactory {
|
|
29
|
+
export const SANS_SERIF: string;
|
|
30
|
+
export const SERIF : string;
|
|
31
|
+
export const MONOSPACE: string;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 从 URL 加载字体时的选项。
|
|
35
|
+
*/
|
|
36
|
+
export interface LoadTypefaceOptions {
|
|
37
|
+
useDefault?: boolean;
|
|
38
|
+
style?: Typeface.TypefaceStyle
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 获取 TypefaceFactory 单例。
|
|
43
|
+
*/
|
|
44
|
+
export function getInstance(context: Context): TypefaceFactory;
|
|
9
45
|
}
|
|
@@ -5,6 +5,9 @@ import { PropertyValuesHolder } from "./PropertyValuesHolder";
|
|
|
5
5
|
import { TimeInterpolator } from "./TimeInterpolator";
|
|
6
6
|
import { TypeEvaluator } from "./TypeEvaluator";
|
|
7
7
|
|
|
8
|
+
/**
|
|
9
|
+
* 值动画,在指定值之间插值。
|
|
10
|
+
*/
|
|
8
11
|
export declare class ValueAnimator extends Animator {
|
|
9
12
|
public static getCurrentAnimationsCount(): number;
|
|
10
13
|
|
|
@@ -103,10 +106,19 @@ export declare class ValueAnimator extends Animator {
|
|
|
103
106
|
public setCurrentPlayTime(playTime: number): void;
|
|
104
107
|
}
|
|
105
108
|
|
|
109
|
+
/**
|
|
110
|
+
* 值动画相关类型。
|
|
111
|
+
*/
|
|
106
112
|
export namespace ValueAnimator {
|
|
113
|
+
/**
|
|
114
|
+
* 动画值更新监听器。
|
|
115
|
+
*/
|
|
107
116
|
export interface AnimatorUpdateListener {
|
|
108
117
|
onAnimationUpdate(animation: ValueAnimator): void;
|
|
109
118
|
}
|
|
110
119
|
|
|
120
|
+
/**
|
|
121
|
+
* 动画值更新监听器实现类。
|
|
122
|
+
*/
|
|
111
123
|
export class AnimatorUpdateListener extends InterfaceTemplate {}
|
|
112
124
|
}
|