jsbox-cview 1.6.6 → 1.6.8
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/README.md +4 -0
- package/dist/components/alert/input-alert.d.ts +22 -0
- package/dist/components/alert/login-alert.d.ts +21 -0
- package/dist/components/alert/plain-alert.d.ts +15 -0
- package/dist/components/alert/uialert.d.ts +29 -0
- package/{components/base.ts → dist/components/base.d.ts} +9 -28
- package/dist/components/custom-navigation-bar.d.ts +117 -0
- package/dist/components/dialogs/dialog-sheet.d.ts +46 -0
- package/dist/components/dialogs/dialog-sheet.js +4 -2
- package/dist/components/dialogs/form-dialog.d.ts +15 -0
- package/dist/components/dialogs/list-dialog.d.ts +23 -0
- package/dist/components/dialogs/list-dialog.js +1 -1
- package/dist/components/dialogs/text-dialog.d.ts +13 -0
- package/dist/components/dynamic-contextmenu-view.d.ts +40 -0
- package/dist/components/dynamic-itemsize-matrix.d.ts +79 -0
- package/dist/components/dynamic-itemsize-matrix.js +1 -0
- package/dist/components/dynamic-itemsize-section-matrix.d.ts +115 -0
- package/dist/components/dynamic-preference-listview.d.ts +63 -0
- package/dist/components/dynamic-rowheight-list.d.ts +38 -0
- package/dist/components/enhanced-imageview.d.ts +41 -0
- package/dist/components/flowlayout.d.ts +63 -0
- package/dist/components/image-pager.d.ts +49 -0
- package/dist/components/oc-webview.d.ts +64 -0
- package/dist/components/page-control.d.ts +45 -0
- package/dist/components/pageviewer-titlebar.d.ts +48 -0
- package/dist/components/pageviewer.d.ts +41 -0
- package/dist/components/pageviewer.js +12 -3
- package/dist/components/refresh-button.d.ts +25 -0
- package/dist/components/rotating-view.d.ts +45 -0
- package/dist/components/searchbar.d.ts +118 -0
- package/dist/components/sheet.d.ts +42 -0
- package/dist/components/single-views.d.ts +289 -0
- package/dist/components/spinners/loading-dual-ring.d.ts +18 -0
- package/dist/components/spinners/loading-wedges.d.ts +15 -0
- package/dist/components/spinners/spinner-androidstyle.d.ts +30 -0
- package/dist/components/static-preference-listview.d.ts +389 -0
- package/dist/components/symbol-button.d.ts +39 -0
- package/dist/components/tabbar.d.ts +140 -0
- package/dist/controller/base-controller.d.ts +108 -0
- package/dist/controller/base-controller.js +10 -25
- package/dist/controller/controller-router.d.ts +48 -0
- package/dist/controller/controller-router.js +2 -1
- package/dist/controller/controller-status.d.ts +16 -0
- package/dist/controller/controller-status.js +19 -0
- package/dist/controller/pageviewer-controller.d.ts +38 -0
- package/dist/controller/pageviewer-controller.js +32 -3
- package/dist/controller/presented-page-controller.d.ts +41 -0
- package/dist/controller/splitview-controller.d.ts +90 -0
- package/dist/controller/splitview-controller.js +5 -0
- package/dist/controller/tabbar-controller.d.ts +49 -0
- package/dist/controller/tabbar-controller.js +2 -3
- package/{index.ts → dist/index.d.ts} +2 -0
- package/dist/index.js +2 -0
- package/dist/utils/colors.d.ts +7 -0
- package/dist/utils/cvid.d.ts +11 -0
- package/dist/utils/l10n.d.ts +1 -0
- package/dist/utils/path.d.ts +8 -0
- package/dist/utils/rect.d.ts +38 -0
- package/dist/utils/uitools.d.ts +75 -0
- package/package.json +20 -6
- package/.prettierignore +0 -6
- package/.prettierrc +0 -3
- package/components/alert/input-alert.ts +0 -64
- package/components/alert/login-alert.ts +0 -66
- package/components/alert/plain-alert.ts +0 -39
- package/components/alert/uialert.ts +0 -107
- package/components/custom-navigation-bar.ts +0 -579
- package/components/dialogs/dialog-sheet.ts +0 -111
- package/components/dialogs/form-dialog.ts +0 -63
- package/components/dialogs/list-dialog.ts +0 -119
- package/components/dialogs/text-dialog.ts +0 -44
- package/components/dynamic-contextmenu-view.ts +0 -115
- package/components/dynamic-itemsize-matrix.ts +0 -206
- package/components/dynamic-itemsize-section-matrix.ts +0 -363
- package/components/dynamic-preference-listview.ts +0 -684
- package/components/dynamic-rowheight-list.ts +0 -77
- package/components/enhanced-imageview.ts +0 -132
- package/components/flowlayout.ts +0 -248
- package/components/image-pager.ts +0 -180
- package/components/oc-webview.ts +0 -177
- package/components/page-control.ts +0 -93
- package/components/pageviewer-titlebar.ts +0 -166
- package/components/pageviewer.ts +0 -125
- package/components/refresh-button.ts +0 -83
- package/components/rotating-view.ts +0 -133
- package/components/searchbar.ts +0 -398
- package/components/sheet.ts +0 -104
- package/components/single-views.ts +0 -956
- package/components/spinners/loading-dual-ring.ts +0 -97
- package/components/spinners/loading-wedges.ts +0 -106
- package/components/spinners/spinner-androidstyle.ts +0 -269
- package/components/static-preference-listview.ts +0 -1282
- package/components/symbol-button.ts +0 -108
- package/components/tabbar.ts +0 -453
- package/controller/base-controller.ts +0 -214
- package/controller/controller-router.ts +0 -73
- package/controller/pageviewer-controller.ts +0 -93
- package/controller/presented-page-controller.ts +0 -76
- package/controller/splitview-controller.ts +0 -359
- package/controller/tabbar-controller.ts +0 -131
- package/dist/test/custom-navigation-bar.js +0 -40
- package/dist/test/dialog-sheet.js +0 -40
- package/dist/test/dynamic-contextmenu-view.js +0 -66
- package/dist/test/dynamic-itemsize-matrix.js +0 -74
- package/dist/test/dynamic-itemsize-section-matrix.js +0 -138
- package/dist/test/dynamic-preference-listview.js +0 -150
- package/dist/test/flowlayout.js +0 -76
- package/dist/test/form-dialog.js +0 -51
- package/dist/test/oc-webview.js +0 -195
- package/dist/test/pageviewer-controller.js +0 -20
- package/dist/test/pageviewer-titlebar.js +0 -18
- package/dist/test/pageviewer.js +0 -32
- package/dist/test/refresh-button.js +0 -26
- package/dist/test/searchbar.js +0 -36
- package/dist/test/splitview-controller.js +0 -41
- package/dist/test/static-preference-listview.js +0 -143
- package/dist/test/tabbar-controller.js +0 -48
- package/test/custom-navigation-bar.ts +0 -40
- package/test/dialog-sheet.ts +0 -40
- package/test/dynamic-contextmenu-view.ts +0 -67
- package/test/dynamic-itemsize-matrix.ts +0 -74
- package/test/dynamic-itemsize-section-matrix.ts +0 -142
- package/test/dynamic-preference-listview.ts +0 -151
- package/test/flowlayout.ts +0 -79
- package/test/form-dialog.ts +0 -48
- package/test/oc-webview.ts +0 -197
- package/test/pageviewer-controller.ts +0 -21
- package/test/pageviewer-titlebar.ts +0 -18
- package/test/pageviewer.ts +0 -31
- package/test/refresh-button.ts +0 -26
- package/test/searchbar.ts +0 -38
- package/test/splitview-controller.ts +0 -42
- package/test/static-preference-listview.ts +0 -142
- package/test/tabbar-controller.ts +0 -49
- package/tsconfig.json +0 -122
- package/utils/colors.ts +0 -17
- package/utils/cvid.ts +0 -32
- package/utils/l10n.ts +0 -42
- package/utils/path.ts +0 -97
- package/utils/rect.ts +0 -90
- package/utils/uitools.ts +0 -122
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Base } from "./base";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* 创建新的 UIViewController,主要用于 formSheet 和 pageSheet
|
|
5
|
+
*
|
|
6
|
+
* ## 参数:
|
|
7
|
+
* - presentMode: number, default: 1, pageSheet: 1, formSheet: 2
|
|
8
|
+
* - animated: boolean = true 是否启用动画效果
|
|
9
|
+
* - interactiveDismissalDisabled: boolean = false 是否禁用下拉退出
|
|
10
|
+
* - bgcolor: $color $color("secondarySurface")
|
|
11
|
+
* - cview: Cview
|
|
12
|
+
* - dismissalHandler: function 退出时的回调
|
|
13
|
+
*
|
|
14
|
+
* ## 方法:
|
|
15
|
+
* - present()
|
|
16
|
+
* - dismiss()
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export declare class Sheet<T extends Base<U, R>, U extends AllUIView, R extends UiTypes.AllViewOptions> {
|
|
20
|
+
id: string;
|
|
21
|
+
_animated: boolean;
|
|
22
|
+
_presentMode: number;
|
|
23
|
+
_interactiveDismissalDisabled: boolean;
|
|
24
|
+
_bgcolor: UIColor;
|
|
25
|
+
_cview?: T;
|
|
26
|
+
_dismissalHandler?: () => void;
|
|
27
|
+
_PSViewController: any;
|
|
28
|
+
_PSViewControllerView: any;
|
|
29
|
+
constructor({ presentMode, animated, interactiveDismissalDisabled, bgcolor, cview, dismissalHandler, }: {
|
|
30
|
+
presentMode?: number;
|
|
31
|
+
animated?: boolean;
|
|
32
|
+
interactiveDismissalDisabled?: boolean;
|
|
33
|
+
bgcolor?: UIColor;
|
|
34
|
+
cview?: T;
|
|
35
|
+
dismissalHandler?: () => void;
|
|
36
|
+
});
|
|
37
|
+
_create(): void;
|
|
38
|
+
_define(): void;
|
|
39
|
+
_add(cview: T): void;
|
|
40
|
+
present(): void;
|
|
41
|
+
dismiss(): void;
|
|
42
|
+
}
|
|
@@ -0,0 +1,289 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 实现单个视图的定义
|
|
3
|
+
*/
|
|
4
|
+
import { Base } from "./base";
|
|
5
|
+
export declare class SingleView<T extends UiTypes.AllViewTypes, V extends UIBaseView, P extends UiTypes.BaseViewProps, E extends UiTypes.BaseViewEvents<V>, O extends UiTypes.AllViewOptions> extends Base<V, O> {
|
|
6
|
+
_type: T;
|
|
7
|
+
_props?: P;
|
|
8
|
+
_layout?: (make: MASConstraintMaker, view: V) => void;
|
|
9
|
+
_events?: E;
|
|
10
|
+
_views?: UiTypes.AllViewOptions[];
|
|
11
|
+
_defineView: () => O;
|
|
12
|
+
constructor({ type, props, layout, events, views, }: {
|
|
13
|
+
type: T;
|
|
14
|
+
props?: P;
|
|
15
|
+
layout?: (make: MASConstraintMaker, view: V) => void;
|
|
16
|
+
events?: E;
|
|
17
|
+
views?: UiTypes.AllViewOptions[];
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export declare class ClearView extends SingleView<"view", UIView, UiTypes.ViewProps, UiTypes.BaseViewEvents<UIView>, UiTypes.ViewOptions> {
|
|
21
|
+
constructor({ props, layout, events, views, }: {
|
|
22
|
+
props?: UiTypes.ViewProps;
|
|
23
|
+
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
24
|
+
events?: UiTypes.BaseViewEvents<UIView>;
|
|
25
|
+
views?: UiTypes.AllViewOptions[];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export declare class ContentView extends SingleView<"view", UIView, UiTypes.ViewProps, UiTypes.BaseViewEvents<UIView>, UiTypes.ViewOptions> {
|
|
29
|
+
constructor({ props, layout, events, views, }: {
|
|
30
|
+
props?: UiTypes.ViewProps;
|
|
31
|
+
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
32
|
+
events?: UiTypes.BaseViewEvents;
|
|
33
|
+
views?: UiTypes.AllViewOptions[];
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 遮挡视图,使得下面的view无法操作并且整体变暗。
|
|
38
|
+
* 设计上此视图不单独使用,而是作为一个子视图
|
|
39
|
+
* events:
|
|
40
|
+
* - tapped 点击事件,通常用于dismiss
|
|
41
|
+
*/
|
|
42
|
+
export declare class MaskView extends SingleView<"view", UIView, UiTypes.ViewProps, UiTypes.BaseViewEvents<UIView>, UiTypes.ViewOptions> {
|
|
43
|
+
constructor({ props, layout, events, views, }: {
|
|
44
|
+
props?: UiTypes.ViewProps;
|
|
45
|
+
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
46
|
+
events?: UiTypes.BaseViewEvents;
|
|
47
|
+
views?: UiTypes.AllViewOptions[];
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
export declare class Label extends SingleView<"label", UILabelView, UiTypes.LabelProps, UiTypes.BaseViewEvents<UILabelView>, UiTypes.LabelOptions> {
|
|
51
|
+
constructor({ props, layout, events, views, }: {
|
|
52
|
+
props?: UiTypes.LabelProps;
|
|
53
|
+
layout?: (make: MASConstraintMaker, view: UILabelView) => void;
|
|
54
|
+
events?: UiTypes.BaseViewEvents<UILabelView>;
|
|
55
|
+
views?: UiTypes.AllViewOptions[];
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
export declare class Button extends SingleView<"button", UIButtonView, UiTypes.ButtonProps, UiTypes.BaseViewEvents<UIButtonView>, UiTypes.ButtonOptions> {
|
|
59
|
+
constructor({ props, layout, events, views, }: {
|
|
60
|
+
props?: UiTypes.ButtonProps;
|
|
61
|
+
layout?: (make: MASConstraintMaker, view: UIButtonView) => void;
|
|
62
|
+
events?: UiTypes.BaseViewEvents<UIButtonView>;
|
|
63
|
+
views?: UiTypes.AllViewOptions[];
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
export declare class Input extends SingleView<"input", UIInputView, UiTypes.InputProps, UiTypes.InputEvents, UiTypes.InputOptions> {
|
|
67
|
+
constructor({ props, layout, events, views, }: {
|
|
68
|
+
props?: UiTypes.InputProps;
|
|
69
|
+
layout?: (make: MASConstraintMaker, view: UIInputView) => void;
|
|
70
|
+
events?: UiTypes.InputEvents;
|
|
71
|
+
views?: UiTypes.AllViewOptions[];
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export declare class Slider extends SingleView<"slider", UISliderView, UiTypes.SliderProps, UiTypes.SliderEvents, UiTypes.SliderOptions> {
|
|
75
|
+
constructor({ props, layout, events, views, }: {
|
|
76
|
+
props?: UiTypes.SliderProps;
|
|
77
|
+
layout?: (make: MASConstraintMaker, view: UISliderView) => void;
|
|
78
|
+
events?: UiTypes.SliderEvents;
|
|
79
|
+
views?: UiTypes.AllViewOptions[];
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export declare class Switch extends SingleView<"switch", UISwitchView, UiTypes.SwitchProps, UiTypes.SwitchEvents, UiTypes.SwitchOptions> {
|
|
83
|
+
constructor({ props, layout, events, views, }: {
|
|
84
|
+
props?: UiTypes.SwitchProps;
|
|
85
|
+
layout?: (make: MASConstraintMaker, view: UISwitchView) => void;
|
|
86
|
+
events?: UiTypes.SwitchEvents;
|
|
87
|
+
views?: UiTypes.AllViewOptions[];
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
export declare class Spinner extends SingleView<"spinner", UISpinnerView, UiTypes.SpinnerProps, UiTypes.BaseViewEvents<UISpinnerView>, UiTypes.SpinnerOptions> {
|
|
91
|
+
constructor({ props, layout, events, views, }: {
|
|
92
|
+
props?: UiTypes.SpinnerProps;
|
|
93
|
+
layout?: (make: MASConstraintMaker, view: UISpinnerView) => void;
|
|
94
|
+
events?: UiTypes.BaseViewEvents<UISpinnerView>;
|
|
95
|
+
views?: UiTypes.AllViewOptions[];
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
export declare class Progress extends SingleView<"progress", UIProgressView, UiTypes.ProgressProps, UiTypes.BaseViewEvents<UIProgressView>, UiTypes.ProgressOptions> {
|
|
99
|
+
constructor({ props, layout, events, views, }: {
|
|
100
|
+
props?: UiTypes.ProgressProps;
|
|
101
|
+
layout?: (make: MASConstraintMaker, view: UIProgressView) => void;
|
|
102
|
+
events?: UiTypes.BaseViewEvents<UIProgressView>;
|
|
103
|
+
views?: UiTypes.AllViewOptions[];
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
export declare class Gallery extends SingleView<"gallery", UIGalleryView, UiTypes.GalleryProps, UiTypes.GalleryEvents, UiTypes.GalleryOptions> {
|
|
107
|
+
constructor({ props, layout, events, views, }: {
|
|
108
|
+
props?: UiTypes.GalleryProps;
|
|
109
|
+
layout?: (make: MASConstraintMaker, view: UIGalleryView) => void;
|
|
110
|
+
events?: UiTypes.GalleryEvents;
|
|
111
|
+
views?: UiTypes.AllViewOptions[];
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
export declare class Stepper extends SingleView<"stepper", UIStepperView, UiTypes.StepperProps, UiTypes.StepperEvents, UiTypes.StepperOptions> {
|
|
115
|
+
constructor({ props, layout, events, views, }: {
|
|
116
|
+
props?: UiTypes.StepperProps;
|
|
117
|
+
layout?: (make: MASConstraintMaker, view: UIStepperView) => void;
|
|
118
|
+
events?: UiTypes.StepperEvents;
|
|
119
|
+
views?: UiTypes.AllViewOptions[];
|
|
120
|
+
});
|
|
121
|
+
}
|
|
122
|
+
export declare class Text extends SingleView<"text", UITextView, UiTypes.TextProps, UiTypes.TextEvents, UiTypes.TextOptions> {
|
|
123
|
+
constructor({ props, layout, events, views, }: {
|
|
124
|
+
props?: UiTypes.TextProps;
|
|
125
|
+
layout?: (make: MASConstraintMaker, view: UITextView) => void;
|
|
126
|
+
events?: UiTypes.TextEvents;
|
|
127
|
+
views?: UiTypes.AllViewOptions[];
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
export declare class Image extends SingleView<"image", UIImageView, UiTypes.ImageProps, UiTypes.BaseViewEvents<UIImageView>, UiTypes.ImageOptions> {
|
|
131
|
+
constructor({ props, layout, events, views, }: {
|
|
132
|
+
props?: UiTypes.ImageProps;
|
|
133
|
+
layout?: (make: MASConstraintMaker, view: UIImageView) => void;
|
|
134
|
+
events?: UiTypes.BaseViewEvents<UIImageView>;
|
|
135
|
+
views?: UiTypes.AllViewOptions[];
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
export declare class Video extends SingleView<"video", UIVideoView, UiTypes.VideoProps, UiTypes.BaseViewEvents<UIVideoView>, UiTypes.VideoOptions> {
|
|
139
|
+
constructor({ props, layout, events, views, }: {
|
|
140
|
+
props?: UiTypes.VideoProps;
|
|
141
|
+
layout?: (make: MASConstraintMaker, view: UIVideoView) => void;
|
|
142
|
+
events?: UiTypes.BaseViewEvents<UIVideoView>;
|
|
143
|
+
views?: UiTypes.AllViewOptions[];
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
export declare class Scroll extends SingleView<"scroll", UIScrollView, UiTypes.ScrollProps, UiTypes.ScrollEvents, UiTypes.ScrollOptions> {
|
|
147
|
+
constructor({ props, layout, events, views, }: {
|
|
148
|
+
props?: UiTypes.ScrollProps;
|
|
149
|
+
layout?: (make: MASConstraintMaker, view: UIScrollView) => void;
|
|
150
|
+
events?: UiTypes.ScrollEvents;
|
|
151
|
+
views?: UiTypes.AllViewOptions[];
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
export declare class Stack extends SingleView<"stack", UIStackView, UiTypes.StackProps, UiTypes.BaseViewEvents<UIStackView>, UiTypes.StackOptions> {
|
|
155
|
+
constructor({ props, layout, events, views, }: {
|
|
156
|
+
props?: UiTypes.StackProps;
|
|
157
|
+
layout?: (make: MASConstraintMaker, view: UIStackView) => void;
|
|
158
|
+
events?: UiTypes.BaseViewEvents<UIStackView>;
|
|
159
|
+
views?: UiTypes.AllViewOptions[];
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
export declare class Tab extends SingleView<"tab", UITabView, UiTypes.TabProps, UiTypes.TabEvents, UiTypes.TabOptions> {
|
|
163
|
+
constructor({ props, layout, events, views, }: {
|
|
164
|
+
props?: UiTypes.TabProps;
|
|
165
|
+
layout?: (make: MASConstraintMaker, view: UITabView) => void;
|
|
166
|
+
events?: UiTypes.TabEvents;
|
|
167
|
+
views?: UiTypes.AllViewOptions[];
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
export declare class Menu extends SingleView<"menu", UIMenuView, UiTypes.MenuProps, UiTypes.MenuEvents, UiTypes.MenuOptions> {
|
|
171
|
+
constructor({ props, layout, events, views, }: {
|
|
172
|
+
props?: UiTypes.MenuProps;
|
|
173
|
+
layout?: (make: MASConstraintMaker, view: UIMenuView) => void;
|
|
174
|
+
events?: UiTypes.MenuEvents;
|
|
175
|
+
views?: UiTypes.AllViewOptions[];
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
export declare class Map extends SingleView<"map", UIMapView, UiTypes.MapProps, UiTypes.BaseViewEvents<UIMapView>, UiTypes.MapOptions> {
|
|
179
|
+
constructor({ props, layout, events, views, }: {
|
|
180
|
+
props?: UiTypes.MapProps;
|
|
181
|
+
layout?: (make: MASConstraintMaker, view: UIMapView) => void;
|
|
182
|
+
events?: UiTypes.BaseViewEvents<UIMapView>;
|
|
183
|
+
views?: UiTypes.AllViewOptions[];
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
export declare class Web extends SingleView<"web", UIWebView, UiTypes.WebProps, UiTypes.WebEvents, UiTypes.WebOptions> {
|
|
187
|
+
constructor({ props, layout, events, views, }: {
|
|
188
|
+
props?: UiTypes.WebProps;
|
|
189
|
+
layout?: (make: MASConstraintMaker, view: UIWebView) => void;
|
|
190
|
+
events?: UiTypes.WebEvents;
|
|
191
|
+
views?: UiTypes.AllViewOptions[];
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
export declare class List extends SingleView<"list", UIListView, UiTypes.ListProps, UiTypes.ListEvents, UiTypes.ListOptions> {
|
|
195
|
+
constructor({ props, layout, events, views, }: {
|
|
196
|
+
props?: UiTypes.ListProps;
|
|
197
|
+
layout?: (make: MASConstraintMaker, view: UIListView) => void;
|
|
198
|
+
events?: UiTypes.ListEvents;
|
|
199
|
+
views?: UiTypes.AllViewOptions[];
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
export declare class Matrix extends SingleView<"matrix", UIMatrixView, UiTypes.MatrixProps, UiTypes.MatrixEvents, UiTypes.MatrixOptions> {
|
|
203
|
+
constructor({ props, layout, events, views, }: {
|
|
204
|
+
props?: UiTypes.MatrixProps;
|
|
205
|
+
layout?: (make: MASConstraintMaker, view: UIMatrixView) => void;
|
|
206
|
+
events?: UiTypes.MatrixEvents;
|
|
207
|
+
views?: UiTypes.AllViewOptions[];
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
export declare class Blur extends SingleView<"blur", UIBlurView, UiTypes.BlurProps, UiTypes.BaseViewEvents<UIBlurView>, UiTypes.BlurOptions> {
|
|
211
|
+
constructor({ props, layout, events, views, }: {
|
|
212
|
+
props?: UiTypes.BlurProps;
|
|
213
|
+
layout?: (make: MASConstraintMaker, view: UIBlurView) => void;
|
|
214
|
+
events?: UiTypes.BaseViewEvents<UIBlurView>;
|
|
215
|
+
views?: UiTypes.AllViewOptions[];
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
export declare class Gradient extends SingleView<"gradient", UIGradientView, UiTypes.GradientProps, UiTypes.BaseViewEvents<UIGradientView>, UiTypes.GradientOptions> {
|
|
219
|
+
constructor({ props, layout, events, views, }: {
|
|
220
|
+
props?: UiTypes.GradientProps;
|
|
221
|
+
layout?: (make: MASConstraintMaker, view: UIGradientView) => void;
|
|
222
|
+
events?: UiTypes.BaseViewEvents<UIGradientView>;
|
|
223
|
+
views?: UiTypes.AllViewOptions[];
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
export declare class DatePicker extends SingleView<"date-picker", UIDatePickerView, UiTypes.DatePickerProps, UiTypes.DatePickerEvents, UiTypes.DatePickerOptions> {
|
|
227
|
+
constructor({ props, layout, events, views, }: {
|
|
228
|
+
props?: UiTypes.DatePickerProps;
|
|
229
|
+
layout?: (make: MASConstraintMaker, view: UIDatePickerView) => void;
|
|
230
|
+
events?: UiTypes.DatePickerEvents;
|
|
231
|
+
views?: UiTypes.AllViewOptions[];
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
export declare class Picker extends SingleView<"picker", UIPickerView, UiTypes.PickerProps, UiTypes.PickerEvents, UiTypes.PickerOptions> {
|
|
235
|
+
constructor({ props, layout, events, views, }: {
|
|
236
|
+
props?: UiTypes.PickerProps;
|
|
237
|
+
layout?: (make: MASConstraintMaker, view: UIPickerView) => void;
|
|
238
|
+
events?: UiTypes.PickerEvents;
|
|
239
|
+
views?: UiTypes.AllViewOptions[];
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
export declare class Canvas extends SingleView<"canvas", UICanvasView, UiTypes.CanvasProps, UiTypes.CanvasEvents, UiTypes.CanvasOptions> {
|
|
243
|
+
constructor({ props, layout, events, views, }: {
|
|
244
|
+
props?: UiTypes.CanvasProps;
|
|
245
|
+
layout?: (make: MASConstraintMaker, view: UICanvasView) => void;
|
|
246
|
+
events?: UiTypes.CanvasEvents;
|
|
247
|
+
views?: UiTypes.AllViewOptions[];
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
export declare class Markdown extends SingleView<"markdown", UIMarkdownView, UiTypes.MarkdownProps, UiTypes.BaseViewEvents<UIMarkdownView>, UiTypes.MarkdownOptions> {
|
|
251
|
+
constructor({ props, layout, events, views, }: {
|
|
252
|
+
props?: UiTypes.MarkdownProps;
|
|
253
|
+
layout?: (make: MASConstraintMaker, view: UIMarkdownView) => void;
|
|
254
|
+
events?: UiTypes.BaseViewEvents<UIMarkdownView>;
|
|
255
|
+
views?: UiTypes.AllViewOptions[];
|
|
256
|
+
});
|
|
257
|
+
}
|
|
258
|
+
export declare class Lottie extends SingleView<"lottie", UILottieView, UiTypes.LottieProps, UiTypes.BaseViewEvents<UILottieView>, UiTypes.LottieOptions> {
|
|
259
|
+
constructor({ props, layout, events, views, }: {
|
|
260
|
+
props?: UiTypes.LottieProps;
|
|
261
|
+
layout?: (make: MASConstraintMaker, view: UILottieView) => void;
|
|
262
|
+
events?: UiTypes.BaseViewEvents<UILottieView>;
|
|
263
|
+
views?: UiTypes.AllViewOptions[];
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
export declare class Chart extends SingleView<"chart", UIChartView, UiTypes.ChartProps, UiTypes.ChartEvents, UiTypes.ChartOptions> {
|
|
267
|
+
constructor({ props, layout, events, views, }: {
|
|
268
|
+
props?: UiTypes.ChartProps;
|
|
269
|
+
layout?: (make: MASConstraintMaker, view: UIChartView) => void;
|
|
270
|
+
events?: UiTypes.ChartEvents;
|
|
271
|
+
views?: UiTypes.AllViewOptions[];
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
export declare class Code extends SingleView<"code", UICodeView, UiTypes.CodeProps, UiTypes.BaseViewEvents<UICodeView>, UiTypes.CodeOptions> {
|
|
275
|
+
constructor({ props, layout, events, views, }: {
|
|
276
|
+
props?: UiTypes.CodeProps;
|
|
277
|
+
layout?: (make: MASConstraintMaker, view: UICodeView) => void;
|
|
278
|
+
events?: UiTypes.BaseViewEvents<UICodeView>;
|
|
279
|
+
views?: UiTypes.AllViewOptions[];
|
|
280
|
+
});
|
|
281
|
+
}
|
|
282
|
+
export declare class Runtime extends SingleView<"runtime", UIView, UiTypes.RuntimeProps, UiTypes.BaseViewEvents<UIView>, UiTypes.RuntimeOptions> {
|
|
283
|
+
constructor({ props, layout, events, views, }: {
|
|
284
|
+
props?: UiTypes.RuntimeProps;
|
|
285
|
+
layout?: (make: MASConstraintMaker, view: UIView) => void;
|
|
286
|
+
events?: UiTypes.BaseViewEvents<UIView>;
|
|
287
|
+
views?: UiTypes.AllViewOptions[];
|
|
288
|
+
});
|
|
289
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Base } from "../base";
|
|
2
|
+
/**
|
|
3
|
+
* 两个圆环旋转的加载动画
|
|
4
|
+
*
|
|
5
|
+
* 这是一个示例组件,由于帧数有限而且不稳定,不建议在实际项目中使用。
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
export declare class DualRing extends Base<UIView, UiTypes.ViewOptions> {
|
|
9
|
+
_defineView: () => UiTypes.ViewOptions;
|
|
10
|
+
/**
|
|
11
|
+
* @param colors 颜色(必须是2个),默认为 [$color("#f5542e"), $color("#f2c327")]
|
|
12
|
+
* @param layout 布局
|
|
13
|
+
*/
|
|
14
|
+
constructor({ colors, layout, }: {
|
|
15
|
+
colors?: UIColor[];
|
|
16
|
+
layout: (make: MASConstraintMaker, view: UIView) => void;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Base } from "../base";
|
|
2
|
+
/**
|
|
3
|
+
* 饼图加载动画, 4个颜色的饼图以不同的速度旋转,产生华丽的效果
|
|
4
|
+
*/
|
|
5
|
+
export declare class Wedges extends Base<UIView, UiTypes.ViewOptions> {
|
|
6
|
+
_defineView: () => UiTypes.ViewOptions;
|
|
7
|
+
/**
|
|
8
|
+
* @param colors 饼图颜色(必须是4个颜色)
|
|
9
|
+
* @param layout 布局
|
|
10
|
+
*/
|
|
11
|
+
constructor({ colors, layout, }: {
|
|
12
|
+
colors?: UIColor[];
|
|
13
|
+
layout: (make: MASConstraintMaker, view: UIView) => void;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Base } from "../base";
|
|
2
|
+
interface AndroidStyleSpinnerProps {
|
|
3
|
+
id?: string;
|
|
4
|
+
weight: number;
|
|
5
|
+
diameter: number;
|
|
6
|
+
color: UIColor;
|
|
7
|
+
bgcolor: UIColor;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* 安卓风格的加载指示器, 基于Lottie实现, 效果是一个圆环一边旋转一边缩放。
|
|
11
|
+
* 由于帧数有限,不建议在大视图上使用。
|
|
12
|
+
*/
|
|
13
|
+
export declare class AndroidStyleSpinner extends Base<UILottieView, UiTypes.LottieOptions> {
|
|
14
|
+
private _props;
|
|
15
|
+
_defineView: () => UiTypes.LottieOptions;
|
|
16
|
+
/**
|
|
17
|
+
* @param props AndroidStyleSpinnerProps
|
|
18
|
+
* - id?: string 可以重新指定 id,以供 list 或者 matrix 的 template 使用
|
|
19
|
+
* - weight: number
|
|
20
|
+
* - diameter: number
|
|
21
|
+
* - color: UIColor, 默认 gray
|
|
22
|
+
* - bgcolor: UIColor, 默认 clear
|
|
23
|
+
* @param layout 可选布局,默认居中
|
|
24
|
+
*/
|
|
25
|
+
constructor({ props, layout, }: {
|
|
26
|
+
props: Partial<AndroidStyleSpinnerProps>;
|
|
27
|
+
layout?: (make: MASConstraintMaker, view: UILottieView) => void;
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
export {};
|