@rsmax/toutiao 1.0.1
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/CHANGELOG.md +6 -0
- package/README.md +3 -0
- package/cjs/api/index.d.ts +2347 -0
- package/cjs/api/index.js +127 -0
- package/cjs/hostComponents/Button/index.d.ts +18 -0
- package/cjs/hostComponents/Button/index.js +15 -0
- package/cjs/hostComponents/Button/node.d.ts +34 -0
- package/cjs/hostComponents/Button/node.js +37 -0
- package/cjs/hostComponents/Canvas/index.d.ts +6 -0
- package/cjs/hostComponents/Canvas/index.js +5 -0
- package/cjs/hostComponents/Canvas/node.d.ts +19 -0
- package/cjs/hostComponents/Canvas/node.js +22 -0
- package/cjs/hostComponents/Checkbox/index.d.ts +10 -0
- package/cjs/hostComponents/Checkbox/index.js +9 -0
- package/cjs/hostComponents/Checkbox/node.d.ts +13 -0
- package/cjs/hostComponents/Checkbox/node.js +16 -0
- package/cjs/hostComponents/CheckboxGroup/index.d.ts +7 -0
- package/cjs/hostComponents/CheckboxGroup/index.js +5 -0
- package/cjs/hostComponents/CheckboxGroup/node.d.ts +8 -0
- package/cjs/hostComponents/CheckboxGroup/node.js +11 -0
- package/cjs/hostComponents/Form/index.d.ts +10 -0
- package/cjs/hostComponents/Form/index.js +8 -0
- package/cjs/hostComponents/Form/node.d.ts +11 -0
- package/cjs/hostComponents/Form/node.js +14 -0
- package/cjs/hostComponents/Icon/index.d.ts +8 -0
- package/cjs/hostComponents/Icon/index.js +8 -0
- package/cjs/hostComponents/Icon/node.d.ts +10 -0
- package/cjs/hostComponents/Icon/node.js +13 -0
- package/cjs/hostComponents/Image/index.d.ts +17 -0
- package/cjs/hostComponents/Image/index.js +9 -0
- package/cjs/hostComponents/Image/node.d.ts +19 -0
- package/cjs/hostComponents/Image/node.js +22 -0
- package/cjs/hostComponents/Input/index.d.ts +25 -0
- package/cjs/hostComponents/Input/index.js +17 -0
- package/cjs/hostComponents/Input/node.d.ts +32 -0
- package/cjs/hostComponents/Input/node.js +35 -0
- package/cjs/hostComponents/Label/index.d.ts +6 -0
- package/cjs/hostComponents/Label/index.js +5 -0
- package/cjs/hostComponents/Label/node.d.ts +8 -0
- package/cjs/hostComponents/Label/node.js +11 -0
- package/cjs/hostComponents/MovableArea/index.d.ts +10 -0
- package/cjs/hostComponents/MovableArea/index.js +8 -0
- package/cjs/hostComponents/MovableArea/node.d.ts +8 -0
- package/cjs/hostComponents/MovableArea/node.js +12 -0
- package/cjs/hostComponents/MovableView/index.d.ts +37 -0
- package/cjs/hostComponents/MovableView/index.js +20 -0
- package/cjs/hostComponents/MovableView/node.d.ts +26 -0
- package/cjs/hostComponents/MovableView/node.js +30 -0
- package/cjs/hostComponents/Navigator/index.d.ts +12 -0
- package/cjs/hostComponents/Navigator/index.js +12 -0
- package/cjs/hostComponents/Navigator/node.d.ts +23 -0
- package/cjs/hostComponents/Navigator/node.js +26 -0
- package/cjs/hostComponents/Picker/index.d.ts +45 -0
- package/cjs/hostComponents/Picker/index.js +9 -0
- package/cjs/hostComponents/Picker/node.d.ts +20 -0
- package/cjs/hostComponents/Picker/node.js +23 -0
- package/cjs/hostComponents/PickerView/index.d.ts +10 -0
- package/cjs/hostComponents/PickerView/index.js +5 -0
- package/cjs/hostComponents/PickerView/node.d.ts +18 -0
- package/cjs/hostComponents/PickerView/node.js +21 -0
- package/cjs/hostComponents/PickerViewColumn/index.d.ts +2 -0
- package/cjs/hostComponents/PickerViewColumn/index.js +5 -0
- package/cjs/hostComponents/PickerViewColumn/node.d.ts +2 -0
- package/cjs/hostComponents/PickerViewColumn/node.js +5 -0
- package/cjs/hostComponents/Progress/index.d.ts +12 -0
- package/cjs/hostComponents/Progress/index.js +14 -0
- package/cjs/hostComponents/Progress/node.d.ts +18 -0
- package/cjs/hostComponents/Progress/node.js +21 -0
- package/cjs/hostComponents/Radio/index.d.ts +10 -0
- package/cjs/hostComponents/Radio/index.js +10 -0
- package/cjs/hostComponents/Radio/node.d.ts +12 -0
- package/cjs/hostComponents/Radio/node.js +15 -0
- package/cjs/hostComponents/RadioGroup/index.d.ts +7 -0
- package/cjs/hostComponents/RadioGroup/index.js +5 -0
- package/cjs/hostComponents/RadioGroup/node.d.ts +9 -0
- package/cjs/hostComponents/RadioGroup/node.js +12 -0
- package/cjs/hostComponents/RichText/index.d.ts +12 -0
- package/cjs/hostComponents/RichText/index.js +5 -0
- package/cjs/hostComponents/RichText/node.d.ts +17 -0
- package/cjs/hostComponents/RichText/node.js +20 -0
- package/cjs/hostComponents/ScrollView/index.d.ts +16 -0
- package/cjs/hostComponents/ScrollView/index.js +12 -0
- package/cjs/hostComponents/ScrollView/node.d.ts +22 -0
- package/cjs/hostComponents/ScrollView/node.js +25 -0
- package/cjs/hostComponents/Slider/index.d.ts +20 -0
- package/cjs/hostComponents/Slider/index.js +19 -0
- package/cjs/hostComponents/Slider/node.d.ts +23 -0
- package/cjs/hostComponents/Slider/node.js +26 -0
- package/cjs/hostComponents/Swiper/index.d.ts +21 -0
- package/cjs/hostComponents/Swiper/index.js +20 -0
- package/cjs/hostComponents/Swiper/node.d.ts +26 -0
- package/cjs/hostComponents/Swiper/node.js +29 -0
- package/cjs/hostComponents/SwiperItem/index.d.ts +6 -0
- package/cjs/hostComponents/SwiperItem/index.js +5 -0
- package/cjs/hostComponents/SwiperItem/node.d.ts +9 -0
- package/cjs/hostComponents/SwiperItem/node.js +12 -0
- package/cjs/hostComponents/Switch/index.d.ts +11 -0
- package/cjs/hostComponents/Switch/index.js +11 -0
- package/cjs/hostComponents/Switch/node.d.ts +14 -0
- package/cjs/hostComponents/Switch/node.js +17 -0
- package/cjs/hostComponents/Text/index.d.ts +9 -0
- package/cjs/hostComponents/Text/index.js +10 -0
- package/cjs/hostComponents/Text/node.d.ts +11 -0
- package/cjs/hostComponents/Text/node.js +14 -0
- package/cjs/hostComponents/Textarea/index.d.ts +22 -0
- package/cjs/hostComponents/Textarea/index.js +16 -0
- package/cjs/hostComponents/Textarea/node.d.ts +33 -0
- package/cjs/hostComponents/Textarea/node.js +36 -0
- package/cjs/hostComponents/Video/index.d.ts +37 -0
- package/cjs/hostComponents/Video/index.js +14 -0
- package/cjs/hostComponents/Video/node.d.ts +42 -0
- package/cjs/hostComponents/Video/node.js +45 -0
- package/cjs/hostComponents/View/index.d.ts +24 -0
- package/cjs/hostComponents/View/index.js +11 -0
- package/cjs/hostComponents/View/node.d.ts +26 -0
- package/cjs/hostComponents/View/node.js +29 -0
- package/cjs/hostComponents/WebView/index.d.ts +8 -0
- package/cjs/hostComponents/WebView/index.js +8 -0
- package/cjs/hostComponents/WebView/node.d.ts +8 -0
- package/cjs/hostComponents/WebView/node.js +11 -0
- package/cjs/hostComponents/index.d.ts +29 -0
- package/cjs/hostComponents/index.js +45 -0
- package/cjs/hostComponents/node.d.ts +2 -0
- package/cjs/hostComponents/node.js +85 -0
- package/cjs/index.d.ts +3 -0
- package/cjs/index.js +19 -0
- package/cjs/node/index.d.ts +3 -0
- package/cjs/node/index.js +51 -0
- package/cjs/types/component.d.ts +28 -0
- package/cjs/types/component.js +2 -0
- package/cjs/types/config.d.ts +192 -0
- package/cjs/types/config.js +2 -0
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/index.js +17 -0
- package/esm/api/index.d.ts +2347 -0
- package/esm/api/index.js +122 -0
- package/esm/hostComponents/Button/index.d.ts +18 -0
- package/esm/hostComponents/Button/index.js +12 -0
- package/esm/hostComponents/Button/node.d.ts +34 -0
- package/esm/hostComponents/Button/node.js +34 -0
- package/esm/hostComponents/Canvas/index.d.ts +6 -0
- package/esm/hostComponents/Canvas/index.js +2 -0
- package/esm/hostComponents/Canvas/node.d.ts +19 -0
- package/esm/hostComponents/Canvas/node.js +19 -0
- package/esm/hostComponents/Checkbox/index.d.ts +10 -0
- package/esm/hostComponents/Checkbox/index.js +6 -0
- package/esm/hostComponents/Checkbox/node.d.ts +13 -0
- package/esm/hostComponents/Checkbox/node.js +13 -0
- package/esm/hostComponents/CheckboxGroup/index.d.ts +7 -0
- package/esm/hostComponents/CheckboxGroup/index.js +2 -0
- package/esm/hostComponents/CheckboxGroup/node.d.ts +8 -0
- package/esm/hostComponents/CheckboxGroup/node.js +8 -0
- package/esm/hostComponents/Form/index.d.ts +10 -0
- package/esm/hostComponents/Form/index.js +5 -0
- package/esm/hostComponents/Form/node.d.ts +11 -0
- package/esm/hostComponents/Form/node.js +11 -0
- package/esm/hostComponents/Icon/index.d.ts +8 -0
- package/esm/hostComponents/Icon/index.js +5 -0
- package/esm/hostComponents/Icon/node.d.ts +10 -0
- package/esm/hostComponents/Icon/node.js +10 -0
- package/esm/hostComponents/Image/index.d.ts +17 -0
- package/esm/hostComponents/Image/index.js +6 -0
- package/esm/hostComponents/Image/node.d.ts +19 -0
- package/esm/hostComponents/Image/node.js +19 -0
- package/esm/hostComponents/Input/index.d.ts +25 -0
- package/esm/hostComponents/Input/index.js +14 -0
- package/esm/hostComponents/Input/node.d.ts +32 -0
- package/esm/hostComponents/Input/node.js +32 -0
- package/esm/hostComponents/Label/index.d.ts +6 -0
- package/esm/hostComponents/Label/index.js +2 -0
- package/esm/hostComponents/Label/node.d.ts +8 -0
- package/esm/hostComponents/Label/node.js +8 -0
- package/esm/hostComponents/MovableArea/index.d.ts +10 -0
- package/esm/hostComponents/MovableArea/index.js +5 -0
- package/esm/hostComponents/MovableArea/node.d.ts +8 -0
- package/esm/hostComponents/MovableArea/node.js +9 -0
- package/esm/hostComponents/MovableView/index.d.ts +37 -0
- package/esm/hostComponents/MovableView/index.js +17 -0
- package/esm/hostComponents/MovableView/node.d.ts +26 -0
- package/esm/hostComponents/MovableView/node.js +27 -0
- package/esm/hostComponents/Navigator/index.d.ts +12 -0
- package/esm/hostComponents/Navigator/index.js +9 -0
- package/esm/hostComponents/Navigator/node.d.ts +23 -0
- package/esm/hostComponents/Navigator/node.js +23 -0
- package/esm/hostComponents/Picker/index.d.ts +45 -0
- package/esm/hostComponents/Picker/index.js +6 -0
- package/esm/hostComponents/Picker/node.d.ts +20 -0
- package/esm/hostComponents/Picker/node.js +20 -0
- package/esm/hostComponents/PickerView/index.d.ts +10 -0
- package/esm/hostComponents/PickerView/index.js +2 -0
- package/esm/hostComponents/PickerView/node.d.ts +18 -0
- package/esm/hostComponents/PickerView/node.js +18 -0
- package/esm/hostComponents/PickerViewColumn/index.d.ts +2 -0
- package/esm/hostComponents/PickerViewColumn/index.js +2 -0
- package/esm/hostComponents/PickerViewColumn/node.d.ts +2 -0
- package/esm/hostComponents/PickerViewColumn/node.js +2 -0
- package/esm/hostComponents/Progress/index.d.ts +12 -0
- package/esm/hostComponents/Progress/index.js +11 -0
- package/esm/hostComponents/Progress/node.d.ts +18 -0
- package/esm/hostComponents/Progress/node.js +18 -0
- package/esm/hostComponents/Radio/index.d.ts +10 -0
- package/esm/hostComponents/Radio/index.js +7 -0
- package/esm/hostComponents/Radio/node.d.ts +12 -0
- package/esm/hostComponents/Radio/node.js +12 -0
- package/esm/hostComponents/RadioGroup/index.d.ts +7 -0
- package/esm/hostComponents/RadioGroup/index.js +2 -0
- package/esm/hostComponents/RadioGroup/node.d.ts +9 -0
- package/esm/hostComponents/RadioGroup/node.js +9 -0
- package/esm/hostComponents/RichText/index.d.ts +12 -0
- package/esm/hostComponents/RichText/index.js +2 -0
- package/esm/hostComponents/RichText/node.d.ts +17 -0
- package/esm/hostComponents/RichText/node.js +17 -0
- package/esm/hostComponents/ScrollView/index.d.ts +16 -0
- package/esm/hostComponents/ScrollView/index.js +9 -0
- package/esm/hostComponents/ScrollView/node.d.ts +22 -0
- package/esm/hostComponents/ScrollView/node.js +22 -0
- package/esm/hostComponents/Slider/index.d.ts +20 -0
- package/esm/hostComponents/Slider/index.js +16 -0
- package/esm/hostComponents/Slider/node.d.ts +23 -0
- package/esm/hostComponents/Slider/node.js +23 -0
- package/esm/hostComponents/Swiper/index.d.ts +21 -0
- package/esm/hostComponents/Swiper/index.js +17 -0
- package/esm/hostComponents/Swiper/node.d.ts +26 -0
- package/esm/hostComponents/Swiper/node.js +26 -0
- package/esm/hostComponents/SwiperItem/index.d.ts +6 -0
- package/esm/hostComponents/SwiperItem/index.js +2 -0
- package/esm/hostComponents/SwiperItem/node.d.ts +9 -0
- package/esm/hostComponents/SwiperItem/node.js +9 -0
- package/esm/hostComponents/Switch/index.d.ts +11 -0
- package/esm/hostComponents/Switch/index.js +8 -0
- package/esm/hostComponents/Switch/node.d.ts +14 -0
- package/esm/hostComponents/Switch/node.js +14 -0
- package/esm/hostComponents/Text/index.d.ts +9 -0
- package/esm/hostComponents/Text/index.js +7 -0
- package/esm/hostComponents/Text/node.d.ts +11 -0
- package/esm/hostComponents/Text/node.js +11 -0
- package/esm/hostComponents/Textarea/index.d.ts +22 -0
- package/esm/hostComponents/Textarea/index.js +13 -0
- package/esm/hostComponents/Textarea/node.d.ts +33 -0
- package/esm/hostComponents/Textarea/node.js +33 -0
- package/esm/hostComponents/Video/index.d.ts +37 -0
- package/esm/hostComponents/Video/index.js +11 -0
- package/esm/hostComponents/Video/node.d.ts +42 -0
- package/esm/hostComponents/Video/node.js +42 -0
- package/esm/hostComponents/View/index.d.ts +24 -0
- package/esm/hostComponents/View/index.js +8 -0
- package/esm/hostComponents/View/node.d.ts +26 -0
- package/esm/hostComponents/View/node.js +26 -0
- package/esm/hostComponents/WebView/index.d.ts +8 -0
- package/esm/hostComponents/WebView/index.js +5 -0
- package/esm/hostComponents/WebView/node.d.ts +8 -0
- package/esm/hostComponents/WebView/node.js +8 -0
- package/esm/hostComponents/index.d.ts +29 -0
- package/esm/hostComponents/index.js +29 -0
- package/esm/hostComponents/node.d.ts +2 -0
- package/esm/hostComponents/node.js +60 -0
- package/esm/index.d.ts +3 -0
- package/esm/index.js +3 -0
- package/esm/node/index.d.ts +3 -0
- package/esm/node/index.js +23 -0
- package/esm/types/component.d.ts +28 -0
- package/esm/types/component.js +1 -0
- package/esm/types/config.d.ts +192 -0
- package/esm/types/config.js +1 -0
- package/esm/types/index.d.ts +1 -0
- package/esm/types/index.js +1 -0
- package/node.js +1 -0
- package/package.json +37 -0
- package/templates/base.ejs +52 -0
- package/templates/component.ejs +47 -0
- package/templates/page.ejs +3 -0
- package/vitest.config.js +7 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
id: string;
|
|
3
|
+
className: string;
|
|
4
|
+
style: string;
|
|
5
|
+
src: string;
|
|
6
|
+
duration: string;
|
|
7
|
+
controls: string;
|
|
8
|
+
danmuList: string;
|
|
9
|
+
danmuBtn: string;
|
|
10
|
+
enableDanmu: string;
|
|
11
|
+
autoplay: string;
|
|
12
|
+
loop: string;
|
|
13
|
+
muted: string;
|
|
14
|
+
initialTime: string;
|
|
15
|
+
pageGesture: string;
|
|
16
|
+
direction: string;
|
|
17
|
+
showProgress: string;
|
|
18
|
+
showFullscreenBtn: string;
|
|
19
|
+
showPlayBtn: string;
|
|
20
|
+
showCenterPlayBtn: string;
|
|
21
|
+
enableProgressGesture: string;
|
|
22
|
+
objectFit: string;
|
|
23
|
+
poster: string;
|
|
24
|
+
showMuteBtn: string;
|
|
25
|
+
title: string;
|
|
26
|
+
playBtnPosition: string;
|
|
27
|
+
enablePlayGesture: string;
|
|
28
|
+
autoPauseIfNavigate: string;
|
|
29
|
+
autoPauseIfOpenNative: string;
|
|
30
|
+
vSlideGesture: string;
|
|
31
|
+
vSlideGestureInfullscreen: string;
|
|
32
|
+
onPlay: string;
|
|
33
|
+
onPause: string;
|
|
34
|
+
onEnded: string;
|
|
35
|
+
onTimeUpdate: string;
|
|
36
|
+
onFullscreenChange: string;
|
|
37
|
+
onWaiting: string;
|
|
38
|
+
onError: string;
|
|
39
|
+
onProgress: string;
|
|
40
|
+
animation: string;
|
|
41
|
+
};
|
|
42
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = exports.alias = void 0;
|
|
4
|
+
exports.alias = {
|
|
5
|
+
id: 'id',
|
|
6
|
+
className: 'class',
|
|
7
|
+
style: 'style',
|
|
8
|
+
src: 'src',
|
|
9
|
+
duration: 'duration',
|
|
10
|
+
controls: 'controls',
|
|
11
|
+
danmuList: 'danmu-list',
|
|
12
|
+
danmuBtn: 'danmu-btn',
|
|
13
|
+
enableDanmu: 'enable-danmu',
|
|
14
|
+
autoplay: 'autoplay',
|
|
15
|
+
loop: 'loop',
|
|
16
|
+
muted: 'muted',
|
|
17
|
+
initialTime: 'initial-time',
|
|
18
|
+
pageGesture: 'page-gesture',
|
|
19
|
+
direction: 'direction',
|
|
20
|
+
showProgress: 'show-progress',
|
|
21
|
+
showFullscreenBtn: 'show-fullscreen-btn',
|
|
22
|
+
showPlayBtn: 'show-play-btn',
|
|
23
|
+
showCenterPlayBtn: 'show-center-play-btn',
|
|
24
|
+
enableProgressGesture: 'enable-progress-gesture',
|
|
25
|
+
objectFit: 'object-fit',
|
|
26
|
+
poster: 'poster',
|
|
27
|
+
showMuteBtn: 'show-mute-btn',
|
|
28
|
+
title: 'title',
|
|
29
|
+
playBtnPosition: 'play-btn-position',
|
|
30
|
+
enablePlayGesture: 'enable-play-gesture',
|
|
31
|
+
autoPauseIfNavigate: 'auto-pause-if-navigate',
|
|
32
|
+
autoPauseIfOpenNative: 'auto-pause-if-open-native',
|
|
33
|
+
vSlideGesture: 'vslide-gesture',
|
|
34
|
+
vSlideGestureInfullscreen: 'vslide-gesture-in-fullscreen',
|
|
35
|
+
onPlay: 'bindplay',
|
|
36
|
+
onPause: 'bindpause',
|
|
37
|
+
onEnded: 'bindended',
|
|
38
|
+
onTimeUpdate: 'bindtimeupdate',
|
|
39
|
+
onFullscreenChange: 'bindfullscreenchange',
|
|
40
|
+
onWaiting: 'bindwaiting',
|
|
41
|
+
onError: 'binderror',
|
|
42
|
+
onProgress: 'bindprogress',
|
|
43
|
+
animation: 'animation',
|
|
44
|
+
};
|
|
45
|
+
exports.props = Object.values(exports.alias);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
export interface ViewProps extends BaseProps {
|
|
4
|
+
slot?: string;
|
|
5
|
+
hoverClassName?: string;
|
|
6
|
+
hoverStartTime?: number;
|
|
7
|
+
hoverStayTime?: number;
|
|
8
|
+
hoverStopPropagation?: boolean;
|
|
9
|
+
onFocus?: (e: any) => void;
|
|
10
|
+
onTap?: (e: any) => any;
|
|
11
|
+
onClick?: (e: any) => any;
|
|
12
|
+
onTouchStart?: (e: any) => any;
|
|
13
|
+
onTouchMove?: (e: any) => any;
|
|
14
|
+
onTouchEnd?: (e: any) => any;
|
|
15
|
+
onTouchCancel?: (e: any) => any;
|
|
16
|
+
onLongTap?: (e: any) => any;
|
|
17
|
+
onLongClick?: (e: any) => any;
|
|
18
|
+
onTransitionEnd?: (e: any) => any;
|
|
19
|
+
onAnimationIteration?: (e: any) => any;
|
|
20
|
+
onAnimationStart?: (e: any) => any;
|
|
21
|
+
onAnimationEnd?: (e: any) => any;
|
|
22
|
+
children?: React.ReactNode;
|
|
23
|
+
}
|
|
24
|
+
export declare const View: React.ComponentType<ViewProps>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.View = void 0;
|
|
4
|
+
const runtime_1 = require("@rsmax/runtime");
|
|
5
|
+
exports.View = (0, runtime_1.createHostComponent)('view');
|
|
6
|
+
exports.View.defaultProps = {
|
|
7
|
+
hoverClassName: 'none',
|
|
8
|
+
hoverStartTime: 50,
|
|
9
|
+
hoverStayTime: 400,
|
|
10
|
+
hoverStopPropagation: false,
|
|
11
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const alias: {
|
|
2
|
+
id: string;
|
|
3
|
+
disableScroll: string;
|
|
4
|
+
hoverClass: string;
|
|
5
|
+
hoverClassName: string;
|
|
6
|
+
hoverStartTime: string;
|
|
7
|
+
hoverStayTime: string;
|
|
8
|
+
hidden: string;
|
|
9
|
+
className: string;
|
|
10
|
+
style: string;
|
|
11
|
+
animation: string;
|
|
12
|
+
hoverStopPropagation: string;
|
|
13
|
+
onTap: string;
|
|
14
|
+
onClick: string;
|
|
15
|
+
onTouchStart: string;
|
|
16
|
+
onTouchMove: string;
|
|
17
|
+
onTouchEnd: string;
|
|
18
|
+
onTouchCancel: string;
|
|
19
|
+
onLongTap: string;
|
|
20
|
+
onLongClick: string;
|
|
21
|
+
onTransitionEnd: string;
|
|
22
|
+
onAnimationIteration: string;
|
|
23
|
+
onAnimationStart: string;
|
|
24
|
+
onAnimationEnd: string;
|
|
25
|
+
};
|
|
26
|
+
export declare const props: string[];
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.props = exports.alias = void 0;
|
|
4
|
+
exports.alias = {
|
|
5
|
+
id: 'id',
|
|
6
|
+
disableScroll: 'disable-scroll',
|
|
7
|
+
hoverClass: 'hover-class',
|
|
8
|
+
hoverClassName: 'hover-class',
|
|
9
|
+
hoverStartTime: 'hover-start-time',
|
|
10
|
+
hoverStayTime: 'hover-stay-time',
|
|
11
|
+
hidden: 'hidden',
|
|
12
|
+
className: 'class',
|
|
13
|
+
style: 'style',
|
|
14
|
+
animation: 'animation',
|
|
15
|
+
hoverStopPropagation: 'hover-stop-propagation',
|
|
16
|
+
onTap: 'bindtap',
|
|
17
|
+
onClick: 'bindtap',
|
|
18
|
+
onTouchStart: 'bindtouchstart',
|
|
19
|
+
onTouchMove: 'bindtouchmove',
|
|
20
|
+
onTouchEnd: 'bindtouchend',
|
|
21
|
+
onTouchCancel: 'bindtouchcancel',
|
|
22
|
+
onLongTap: 'bindlongtap',
|
|
23
|
+
onLongClick: 'bindlongtap',
|
|
24
|
+
onTransitionEnd: 'bindtransitionend',
|
|
25
|
+
onAnimationIteration: 'bindanimationiteration',
|
|
26
|
+
onAnimationStart: 'bindanimationstart',
|
|
27
|
+
onAnimationEnd: 'bindanimationend',
|
|
28
|
+
};
|
|
29
|
+
exports.props = Object.values(exports.alias);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BaseProps } from '../../types/component';
|
|
3
|
+
export interface WebViewProps extends BaseProps {
|
|
4
|
+
src?: string;
|
|
5
|
+
onMessage?: (e: any) => void;
|
|
6
|
+
progressbarColor?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const WebView: React.ComponentType<WebViewProps>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WebView = void 0;
|
|
4
|
+
const runtime_1 = require("@rsmax/runtime");
|
|
5
|
+
exports.WebView = (0, runtime_1.createHostComponent)('web-view');
|
|
6
|
+
exports.WebView.defaultProps = {
|
|
7
|
+
progressbarColor: '#51a0d8',
|
|
8
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.alias = exports.props = void 0;
|
|
4
|
+
exports.props = ['src', 'bindmessage', 'bindload', 'binderror'];
|
|
5
|
+
exports.alias = {
|
|
6
|
+
src: 'src',
|
|
7
|
+
progressbarColor: 'progressbar-color',
|
|
8
|
+
onMessage: 'bindmessage',
|
|
9
|
+
onLoad: 'bindload',
|
|
10
|
+
onError: 'binderror',
|
|
11
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export * from './View';
|
|
2
|
+
export * from './Input';
|
|
3
|
+
export * from './Textarea';
|
|
4
|
+
export * from './Video';
|
|
5
|
+
export * from './Swiper';
|
|
6
|
+
export * from './ScrollView';
|
|
7
|
+
export * from './SwiperItem';
|
|
8
|
+
export * from './Icon';
|
|
9
|
+
export * from './Text';
|
|
10
|
+
export * from './RichText';
|
|
11
|
+
export * from './Progress';
|
|
12
|
+
export * from './Button';
|
|
13
|
+
export * from './CheckboxGroup';
|
|
14
|
+
export * from './Checkbox';
|
|
15
|
+
export * from './Form';
|
|
16
|
+
export * from './Label';
|
|
17
|
+
export * from './Picker';
|
|
18
|
+
export * from './PickerView';
|
|
19
|
+
export * from './PickerViewColumn';
|
|
20
|
+
export * from './RadioGroup';
|
|
21
|
+
export * from './Radio';
|
|
22
|
+
export * from './Slider';
|
|
23
|
+
export * from './Switch';
|
|
24
|
+
export * from './Navigator';
|
|
25
|
+
export * from './Image';
|
|
26
|
+
export * from './Canvas';
|
|
27
|
+
export * from './WebView';
|
|
28
|
+
export * from './MovableArea';
|
|
29
|
+
export * from './MovableView';
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./View"), exports);
|
|
18
|
+
__exportStar(require("./Input"), exports);
|
|
19
|
+
__exportStar(require("./Textarea"), exports);
|
|
20
|
+
__exportStar(require("./Video"), exports);
|
|
21
|
+
__exportStar(require("./Swiper"), exports);
|
|
22
|
+
__exportStar(require("./ScrollView"), exports);
|
|
23
|
+
__exportStar(require("./SwiperItem"), exports);
|
|
24
|
+
__exportStar(require("./Icon"), exports);
|
|
25
|
+
__exportStar(require("./Text"), exports);
|
|
26
|
+
__exportStar(require("./RichText"), exports);
|
|
27
|
+
__exportStar(require("./Progress"), exports);
|
|
28
|
+
__exportStar(require("./Button"), exports);
|
|
29
|
+
__exportStar(require("./CheckboxGroup"), exports);
|
|
30
|
+
__exportStar(require("./Checkbox"), exports);
|
|
31
|
+
__exportStar(require("./Form"), exports);
|
|
32
|
+
__exportStar(require("./Label"), exports);
|
|
33
|
+
__exportStar(require("./Picker"), exports);
|
|
34
|
+
__exportStar(require("./PickerView"), exports);
|
|
35
|
+
__exportStar(require("./PickerViewColumn"), exports);
|
|
36
|
+
__exportStar(require("./RadioGroup"), exports);
|
|
37
|
+
__exportStar(require("./Radio"), exports);
|
|
38
|
+
__exportStar(require("./Slider"), exports);
|
|
39
|
+
__exportStar(require("./Switch"), exports);
|
|
40
|
+
__exportStar(require("./Navigator"), exports);
|
|
41
|
+
__exportStar(require("./Image"), exports);
|
|
42
|
+
__exportStar(require("./Canvas"), exports);
|
|
43
|
+
__exportStar(require("./WebView"), exports);
|
|
44
|
+
__exportStar(require("./MovableArea"), exports);
|
|
45
|
+
__exportStar(require("./MovableView"), exports);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const button = __importStar(require("./Button/node"));
|
|
27
|
+
const canvas = __importStar(require("./Canvas/node"));
|
|
28
|
+
const checkboxGroup = __importStar(require("./CheckboxGroup/node"));
|
|
29
|
+
const checkbox = __importStar(require("./Checkbox/node"));
|
|
30
|
+
const form = __importStar(require("./Form/node"));
|
|
31
|
+
const icon = __importStar(require("./Icon/node"));
|
|
32
|
+
const image = __importStar(require("./Image/node"));
|
|
33
|
+
const input = __importStar(require("./Input/node"));
|
|
34
|
+
const label = __importStar(require("./Label/node"));
|
|
35
|
+
const navigator = __importStar(require("./Navigator/node"));
|
|
36
|
+
const pickerViewColumn = __importStar(require("./PickerViewColumn/node"));
|
|
37
|
+
const pickerView = __importStar(require("./PickerView/node"));
|
|
38
|
+
const picker = __importStar(require("./Picker/node"));
|
|
39
|
+
const progress = __importStar(require("./Progress/node"));
|
|
40
|
+
const radioGroup = __importStar(require("./RadioGroup/node"));
|
|
41
|
+
const radio = __importStar(require("./Radio/node"));
|
|
42
|
+
const richText = __importStar(require("./RichText/node"));
|
|
43
|
+
const scrollView = __importStar(require("./ScrollView/node"));
|
|
44
|
+
const slider = __importStar(require("./Slider/node"));
|
|
45
|
+
const swiperItem = __importStar(require("./SwiperItem/node"));
|
|
46
|
+
const swiper = __importStar(require("./Swiper/node"));
|
|
47
|
+
const switchComponent = __importStar(require("./Switch/node"));
|
|
48
|
+
const text = __importStar(require("./Text/node"));
|
|
49
|
+
const textarea = __importStar(require("./Textarea/node"));
|
|
50
|
+
const video = __importStar(require("./Video/node"));
|
|
51
|
+
const view = __importStar(require("./View/node"));
|
|
52
|
+
const webView = __importStar(require("./WebView/node"));
|
|
53
|
+
const movableArea = __importStar(require("./MovableArea/node"));
|
|
54
|
+
const movableView = __importStar(require("./MovableView/node"));
|
|
55
|
+
const hostComponents = new Map();
|
|
56
|
+
hostComponents.set('button', button);
|
|
57
|
+
hostComponents.set('canvas', canvas);
|
|
58
|
+
hostComponents.set('checkbox-group', checkboxGroup);
|
|
59
|
+
hostComponents.set('checkbox', checkbox);
|
|
60
|
+
hostComponents.set('form', form);
|
|
61
|
+
hostComponents.set('icon', icon);
|
|
62
|
+
hostComponents.set('image', image);
|
|
63
|
+
hostComponents.set('input', input);
|
|
64
|
+
hostComponents.set('label', label);
|
|
65
|
+
hostComponents.set('navigator', navigator);
|
|
66
|
+
hostComponents.set('picker-view-column', pickerViewColumn);
|
|
67
|
+
hostComponents.set('picker-view', pickerView);
|
|
68
|
+
hostComponents.set('picker', picker);
|
|
69
|
+
hostComponents.set('progress', progress);
|
|
70
|
+
hostComponents.set('radio-group', radioGroup);
|
|
71
|
+
hostComponents.set('radio', radio);
|
|
72
|
+
hostComponents.set('rich-text', richText);
|
|
73
|
+
hostComponents.set('scroll-view', scrollView);
|
|
74
|
+
hostComponents.set('slider', slider);
|
|
75
|
+
hostComponents.set('swiper-item', swiperItem);
|
|
76
|
+
hostComponents.set('swiper', swiper);
|
|
77
|
+
hostComponents.set('switch', switchComponent);
|
|
78
|
+
hostComponents.set('text', text);
|
|
79
|
+
hostComponents.set('textarea', textarea);
|
|
80
|
+
hostComponents.set('video', video);
|
|
81
|
+
hostComponents.set('view', view);
|
|
82
|
+
hostComponents.set('web-view', webView);
|
|
83
|
+
hostComponents.set('movable-area', movableArea);
|
|
84
|
+
hostComponents.set('movable-view', movableView);
|
|
85
|
+
exports.default = hostComponents;
|
package/cjs/index.d.ts
ADDED
package/cjs/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./hostComponents"), exports);
|
|
18
|
+
__exportStar(require("./api"), exports);
|
|
19
|
+
__exportStar(require("./types"), exports);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
const path = __importStar(require("path"));
|
|
30
|
+
const node_1 = __importDefault(require("../hostComponents/node"));
|
|
31
|
+
const EJS_TPL_ROOT = path.join(__dirname, '../../templates');
|
|
32
|
+
const plugin = () => {
|
|
33
|
+
return {
|
|
34
|
+
meta: {
|
|
35
|
+
global: 'tt',
|
|
36
|
+
template: {
|
|
37
|
+
extension: '.ttml',
|
|
38
|
+
tag: 'import',
|
|
39
|
+
src: 'src',
|
|
40
|
+
},
|
|
41
|
+
style: '.ttss',
|
|
42
|
+
ejs: {
|
|
43
|
+
base: path.join(EJS_TPL_ROOT, 'base.ejs'),
|
|
44
|
+
page: path.join(EJS_TPL_ROOT, 'page.ejs'),
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
hostComponents: node_1.default,
|
|
48
|
+
skipHostComponents: ['swiper-item'],
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
exports.default = plugin;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { BaseEvent } from '@rsmax/wechat/esm/types/component';
|
|
3
|
+
/**
|
|
4
|
+
* 头条内置共有属性
|
|
5
|
+
* https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/component/introduction/basic-componen
|
|
6
|
+
*/
|
|
7
|
+
export interface BaseProps {
|
|
8
|
+
/** 组件的唯一标示: 保持整个页面唯一 */
|
|
9
|
+
id?: string;
|
|
10
|
+
/** 组件的样式类: 在对应的 TTSS 中定义的样式类 */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** 组件的内联样式: 可以动态设置的内联样式 */
|
|
13
|
+
style?: React.CSSProperties;
|
|
14
|
+
/** 组件是否显示: 所有组件默认显示 */
|
|
15
|
+
hidden?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** 自定义事件对象属性列表 */
|
|
18
|
+
export interface GenericEvent<Detail = any> extends BaseEvent {
|
|
19
|
+
/** 额外的信息 */
|
|
20
|
+
detail: Detail;
|
|
21
|
+
}
|
|
22
|
+
/** 触摸事件对象属性列表 */
|
|
23
|
+
export interface TouchEvent<T = Touch> extends BaseEvent {
|
|
24
|
+
/** 触摸事件,当前停留在屏幕中的触摸点信息的数组 */
|
|
25
|
+
touches: T[];
|
|
26
|
+
/** 触摸事件,当前变化的触摸点信息的数组 */
|
|
27
|
+
changedTouches: T[];
|
|
28
|
+
}
|