@rsmax/toutiao 1.3.12 → 1.3.13
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/cjs/hostComponents/Ad/index.d.ts +2 -2
- package/cjs/hostComponents/Button/index.d.ts +2 -2
- package/cjs/hostComponents/Camera/index.d.ts +2 -2
- package/cjs/hostComponents/Canvas/index.d.ts +2 -2
- package/cjs/hostComponents/Checkbox/index.d.ts +2 -2
- package/cjs/hostComponents/CheckboxGroup/index.d.ts +2 -2
- package/cjs/hostComponents/Form/index.d.ts +2 -2
- package/cjs/hostComponents/Icon/index.d.ts +2 -2
- package/cjs/hostComponents/Image/index.d.ts +2 -2
- package/cjs/hostComponents/Input/index.d.ts +2 -2
- package/cjs/hostComponents/Label/index.d.ts +2 -2
- package/cjs/hostComponents/LivePlayer/index.d.ts +2 -2
- package/cjs/hostComponents/LivePreview/index.d.ts +2 -2
- package/cjs/hostComponents/Map/index.d.ts +2 -2
- package/cjs/hostComponents/Mask/index.d.ts +2 -2
- package/cjs/hostComponents/MatchMedia/index.d.ts +2 -3
- package/cjs/hostComponents/MatchMedia/node.d.ts +8 -3
- package/cjs/hostComponents/MatchMedia/node.js +8 -3
- package/cjs/hostComponents/MovableArea/index.d.ts +2 -2
- package/cjs/hostComponents/MovableView/index.d.ts +2 -2
- package/cjs/hostComponents/Navigator/index.d.ts +2 -2
- package/cjs/hostComponents/Picker/index.d.ts +2 -2
- package/cjs/hostComponents/PickerView/index.d.ts +2 -2
- package/cjs/hostComponents/PickerViewColumn/index.d.ts +1 -1
- package/cjs/hostComponents/Progress/index.d.ts +2 -2
- package/cjs/hostComponents/Radio/index.d.ts +2 -2
- package/cjs/hostComponents/RadioGroup/index.d.ts +2 -2
- package/cjs/hostComponents/RichText/index.d.ts +2 -2
- package/cjs/hostComponents/RtcRoom/index.d.ts +2 -2
- package/cjs/hostComponents/ScrollView/index.d.ts +2 -2
- package/cjs/hostComponents/Slider/index.d.ts +2 -2
- package/cjs/hostComponents/Swiper/index.d.ts +2 -2
- package/cjs/hostComponents/SwiperItem/index.d.ts +2 -2
- package/cjs/hostComponents/Switch/index.d.ts +2 -2
- package/cjs/hostComponents/Text/index.d.ts +2 -2
- package/cjs/hostComponents/Textarea/index.d.ts +2 -2
- package/cjs/hostComponents/Video/index.d.ts +2 -2
- package/cjs/hostComponents/View/index.d.ts +2 -2
- package/cjs/hostComponents/WebView/index.d.ts +2 -2
- package/cjs/hostComponents/node.js +15 -15
- package/cjs/node/index.js +1 -1
- package/cjs/types/component.d.ts +2 -2
- package/esm/hostComponents/Ad/index.d.ts +2 -2
- package/esm/hostComponents/Button/index.d.ts +2 -2
- package/esm/hostComponents/Camera/index.d.ts +2 -2
- package/esm/hostComponents/Canvas/index.d.ts +2 -2
- package/esm/hostComponents/Checkbox/index.d.ts +2 -2
- package/esm/hostComponents/CheckboxGroup/index.d.ts +2 -2
- package/esm/hostComponents/Form/index.d.ts +2 -2
- package/esm/hostComponents/Icon/index.d.ts +2 -2
- package/esm/hostComponents/Image/index.d.ts +2 -2
- package/esm/hostComponents/Input/index.d.ts +2 -2
- package/esm/hostComponents/Label/index.d.ts +2 -2
- package/esm/hostComponents/LivePlayer/index.d.ts +2 -2
- package/esm/hostComponents/LivePreview/index.d.ts +2 -2
- package/esm/hostComponents/Map/index.d.ts +2 -2
- package/esm/hostComponents/Mask/index.d.ts +2 -2
- package/esm/hostComponents/MatchMedia/index.d.ts +2 -3
- package/esm/hostComponents/MatchMedia/node.d.ts +8 -3
- package/esm/hostComponents/MatchMedia/node.js +8 -3
- package/esm/hostComponents/MovableArea/index.d.ts +2 -2
- package/esm/hostComponents/MovableView/index.d.ts +2 -2
- package/esm/hostComponents/Navigator/index.d.ts +2 -2
- package/esm/hostComponents/Picker/index.d.ts +2 -2
- package/esm/hostComponents/PickerView/index.d.ts +2 -2
- package/esm/hostComponents/PickerViewColumn/index.d.ts +1 -1
- package/esm/hostComponents/Progress/index.d.ts +2 -2
- package/esm/hostComponents/Radio/index.d.ts +2 -2
- package/esm/hostComponents/RadioGroup/index.d.ts +2 -2
- package/esm/hostComponents/RichText/index.d.ts +2 -2
- package/esm/hostComponents/RtcRoom/index.d.ts +2 -2
- package/esm/hostComponents/ScrollView/index.d.ts +2 -2
- package/esm/hostComponents/Slider/index.d.ts +2 -2
- package/esm/hostComponents/Swiper/index.d.ts +2 -2
- package/esm/hostComponents/SwiperItem/index.d.ts +2 -2
- package/esm/hostComponents/Switch/index.d.ts +2 -2
- package/esm/hostComponents/Text/index.d.ts +2 -2
- package/esm/hostComponents/Textarea/index.d.ts +2 -2
- package/esm/hostComponents/Video/index.d.ts +2 -2
- package/esm/hostComponents/View/index.d.ts +2 -2
- package/esm/hostComponents/WebView/index.d.ts +2 -2
- package/esm/hostComponents/node.js +15 -15
- package/esm/node/index.js +1 -1
- package/esm/types/component.d.ts +2 -2
- package/package.json +11 -11
- package/vitest.config.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.3.13](https://github.com/remaxjs/remax/compare/v1.3.12...v1.3.13) (2025-06-16)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **toutiao:** 修复 MatchMedia 组件缺失属性 ([7abfece](https://github.com/remaxjs/remax/commit/7abfece2a75978a0e4b977ddfdec10ba33734f71))
|
|
11
|
+
|
|
6
12
|
## [1.3.12](https://github.com/remaxjs/remax/compare/v1.3.11...v1.3.12) (2025-06-08)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @rsmax/toutiao
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps, GenericEvent } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
3
|
export interface AdProps extends BaseProps {
|
|
4
4
|
unitId: string;
|
|
5
5
|
onLoad?: (event: GenericEvent) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ButtonProps extends BaseProps {
|
|
4
4
|
size?: 'default' | 'mini';
|
|
5
5
|
type?: 'primary' | 'default';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
/**
|
|
4
4
|
* camera
|
|
5
5
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/camera
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface CheckboxGroupProps extends BaseProps {
|
|
4
4
|
name?: string;
|
|
5
5
|
onChange?: (e: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface FormProps extends BaseProps {
|
|
4
4
|
onSubmit?: (e: any) => void;
|
|
5
5
|
onReset?: (e: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface IconProps extends BaseProps {
|
|
4
4
|
type: 'info' | 'warn' | 'waiting' | 'cancel' | 'download' | 'search' | 'clear' | 'success' | 'success_no_circle' | 'loading';
|
|
5
5
|
size?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ImageProps extends BaseProps {
|
|
4
4
|
src?: string;
|
|
5
5
|
mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
/**
|
|
4
4
|
* live-preview
|
|
5
5
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/live-preview
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface MaskProps extends BaseProps {
|
|
4
4
|
hidden?: boolean;
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface MatchMediaProps extends BaseProps {
|
|
4
4
|
minWidth?: number;
|
|
5
5
|
maxWidth?: number;
|
|
@@ -8,7 +8,6 @@ export interface MatchMediaProps extends BaseProps {
|
|
|
8
8
|
maxHeight?: number;
|
|
9
9
|
height?: number;
|
|
10
10
|
orientation?: 'portrait' | 'portraitupsidedown' | 'landscapeleft' | 'landscaperight';
|
|
11
|
-
onClick?: (e: any) => void;
|
|
12
11
|
children?: React.ReactNode;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export declare const alias: {
|
|
2
|
-
className: string;
|
|
3
2
|
id: string;
|
|
3
|
+
className: string;
|
|
4
4
|
style: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
minWidth: string;
|
|
6
|
+
maxWidth: string;
|
|
7
|
+
width: string;
|
|
8
|
+
minHeight: string;
|
|
9
|
+
maxHeight: string;
|
|
10
|
+
height: string;
|
|
11
|
+
orientation: string;
|
|
7
12
|
};
|
|
8
13
|
export declare const props: string[];
|
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.props = exports.alias = void 0;
|
|
4
4
|
exports.alias = {
|
|
5
|
-
className: 'class',
|
|
6
5
|
id: 'id',
|
|
6
|
+
className: 'class',
|
|
7
7
|
style: 'style',
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
minWidth: 'min-width',
|
|
9
|
+
maxWidth: 'max-width',
|
|
10
|
+
width: 'width',
|
|
11
|
+
minHeight: 'min-height',
|
|
12
|
+
maxHeight: 'max-height',
|
|
13
|
+
height: 'height',
|
|
14
|
+
orientation: 'orientation',
|
|
10
15
|
};
|
|
11
16
|
exports.props = Object.values(exports.alias);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
/**
|
|
4
4
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/view-container/movable-area
|
|
5
5
|
* 基础库 2.25.0 开始支持本组件。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps, GenericEvent } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
3
|
/***
|
|
4
4
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/view-container/movable-view
|
|
5
5
|
* 基础库 2.25.0 开始支持本组件。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
type Mode = 'selector' | 'multiSelector' | 'time' | 'date' | 'region';
|
|
4
4
|
interface PickerPropsMap extends BaseProps {
|
|
5
5
|
selector: SelectorProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
export declare const PickerViewColumn: React.ComponentType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ProgressProps extends BaseProps {
|
|
4
4
|
percent?: number;
|
|
5
5
|
strokeWidth?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface RadioGroupProps extends BaseProps {
|
|
4
4
|
name?: string;
|
|
5
5
|
onChange?: (e: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface RtcRoomProps extends BaseProps {
|
|
4
4
|
userId: string;
|
|
5
5
|
mode?: 'camera' | 'video' | 'screen';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ScrollViewProps extends BaseProps {
|
|
4
4
|
scrollX?: boolean;
|
|
5
5
|
scrollY?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface SwiperProps extends BaseProps {
|
|
4
4
|
indicatorDots?: boolean;
|
|
5
5
|
indicatorColor?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface TextProps extends BaseProps {
|
|
4
4
|
selectable?: boolean;
|
|
5
5
|
space?: string | boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface WebViewProps extends BaseProps {
|
|
4
4
|
src?: string;
|
|
5
5
|
onMessage?: (e: any) => void;
|
|
@@ -23,43 +23,43 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
const ad = __importStar(require("./Ad/node"));
|
|
26
27
|
const button = __importStar(require("./Button/node"));
|
|
28
|
+
const camera = __importStar(require("./Camera/node"));
|
|
27
29
|
const canvas = __importStar(require("./Canvas/node"));
|
|
28
|
-
const checkboxGroup = __importStar(require("./CheckboxGroup/node"));
|
|
29
30
|
const checkbox = __importStar(require("./Checkbox/node"));
|
|
31
|
+
const checkboxGroup = __importStar(require("./CheckboxGroup/node"));
|
|
30
32
|
const form = __importStar(require("./Form/node"));
|
|
31
33
|
const icon = __importStar(require("./Icon/node"));
|
|
32
34
|
const image = __importStar(require("./Image/node"));
|
|
33
35
|
const input = __importStar(require("./Input/node"));
|
|
34
36
|
const label = __importStar(require("./Label/node"));
|
|
37
|
+
const livePlayer = __importStar(require("./LivePlayer/node"));
|
|
38
|
+
const livePreview = __importStar(require("./LivePreview/node"));
|
|
39
|
+
const map = __importStar(require("./Map/node"));
|
|
40
|
+
const mask = __importStar(require("./Mask/node"));
|
|
41
|
+
const matchMedia = __importStar(require("./MatchMedia/node"));
|
|
42
|
+
const movableArea = __importStar(require("./MovableArea/node"));
|
|
43
|
+
const movableView = __importStar(require("./MovableView/node"));
|
|
35
44
|
const navigator = __importStar(require("./Navigator/node"));
|
|
36
|
-
const pickerViewColumn = __importStar(require("./PickerViewColumn/node"));
|
|
37
|
-
const pickerView = __importStar(require("./PickerView/node"));
|
|
38
45
|
const picker = __importStar(require("./Picker/node"));
|
|
46
|
+
const pickerView = __importStar(require("./PickerView/node"));
|
|
47
|
+
const pickerViewColumn = __importStar(require("./PickerViewColumn/node"));
|
|
39
48
|
const progress = __importStar(require("./Progress/node"));
|
|
40
|
-
const radioGroup = __importStar(require("./RadioGroup/node"));
|
|
41
49
|
const radio = __importStar(require("./Radio/node"));
|
|
50
|
+
const radioGroup = __importStar(require("./RadioGroup/node"));
|
|
42
51
|
const richText = __importStar(require("./RichText/node"));
|
|
52
|
+
const rtcRoom = __importStar(require("./RtcRoom/node"));
|
|
43
53
|
const scrollView = __importStar(require("./ScrollView/node"));
|
|
44
54
|
const slider = __importStar(require("./Slider/node"));
|
|
45
|
-
const swiperItem = __importStar(require("./SwiperItem/node"));
|
|
46
55
|
const swiper = __importStar(require("./Swiper/node"));
|
|
56
|
+
const swiperItem = __importStar(require("./SwiperItem/node"));
|
|
47
57
|
const switchComponent = __importStar(require("./Switch/node"));
|
|
48
58
|
const text = __importStar(require("./Text/node"));
|
|
49
59
|
const textarea = __importStar(require("./Textarea/node"));
|
|
50
60
|
const video = __importStar(require("./Video/node"));
|
|
51
61
|
const view = __importStar(require("./View/node"));
|
|
52
62
|
const webView = __importStar(require("./WebView/node"));
|
|
53
|
-
const movableArea = __importStar(require("./MovableArea/node"));
|
|
54
|
-
const movableView = __importStar(require("./MovableView/node"));
|
|
55
|
-
const mask = __importStar(require("./Mask/node"));
|
|
56
|
-
const ad = __importStar(require("./Ad/node"));
|
|
57
|
-
const rtcRoom = __importStar(require("./RtcRoom/node"));
|
|
58
|
-
const matchMedia = __importStar(require("./MatchMedia/node"));
|
|
59
|
-
const livePlayer = __importStar(require("./LivePlayer/node"));
|
|
60
|
-
const livePreview = __importStar(require("./LivePreview/node"));
|
|
61
|
-
const camera = __importStar(require("./Camera/node"));
|
|
62
|
-
const map = __importStar(require("./Map/node"));
|
|
63
63
|
const hostComponents = new Map();
|
|
64
64
|
hostComponents.set('button', button);
|
|
65
65
|
hostComponents.set('canvas', canvas);
|
package/cjs/node/index.js
CHANGED
|
@@ -26,7 +26,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
const path = __importStar(require("path"));
|
|
29
|
+
const path = __importStar(require("node:path"));
|
|
30
30
|
const node_1 = __importDefault(require("../hostComponents/node"));
|
|
31
31
|
const EJS_TPL_ROOT = path.join(__dirname, '../../templates');
|
|
32
32
|
const plugin = () => {
|
package/cjs/types/component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { BaseEvent } from '@rsmax/wechat/esm/types/component';
|
|
2
|
+
import type * as React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* 头条内置共有属性
|
|
5
5
|
* https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/component/introduction/basic-componen
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps, GenericEvent } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
3
|
export interface AdProps extends BaseProps {
|
|
4
4
|
unitId: string;
|
|
5
5
|
onLoad?: (event: GenericEvent) => any;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ButtonProps extends BaseProps {
|
|
4
4
|
size?: 'default' | 'mini';
|
|
5
5
|
type?: 'primary' | 'default';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
/**
|
|
4
4
|
* camera
|
|
5
5
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/camera
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface CheckboxGroupProps extends BaseProps {
|
|
4
4
|
name?: string;
|
|
5
5
|
onChange?: (e: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface FormProps extends BaseProps {
|
|
4
4
|
onSubmit?: (e: any) => void;
|
|
5
5
|
onReset?: (e: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface IconProps extends BaseProps {
|
|
4
4
|
type: 'info' | 'warn' | 'waiting' | 'cancel' | 'download' | 'search' | 'clear' | 'success' | 'success_no_circle' | 'loading';
|
|
5
5
|
size?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ImageProps extends BaseProps {
|
|
4
4
|
src?: string;
|
|
5
5
|
mode?: 'scaleToFill' | 'aspectFit' | 'aspectFill' | 'widthFix' | 'top' | 'bottom' | 'center' | 'left' | 'right' | 'top left' | 'top right' | 'bottom left' | 'bottom right';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
/**
|
|
4
4
|
* live-preview
|
|
5
5
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/media-component/live-preview
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface MaskProps extends BaseProps {
|
|
4
4
|
hidden?: boolean;
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface MatchMediaProps extends BaseProps {
|
|
4
4
|
minWidth?: number;
|
|
5
5
|
maxWidth?: number;
|
|
@@ -8,7 +8,6 @@ export interface MatchMediaProps extends BaseProps {
|
|
|
8
8
|
maxHeight?: number;
|
|
9
9
|
height?: number;
|
|
10
10
|
orientation?: 'portrait' | 'portraitupsidedown' | 'landscapeleft' | 'landscaperight';
|
|
11
|
-
onClick?: (e: any) => void;
|
|
12
11
|
children?: React.ReactNode;
|
|
13
12
|
}
|
|
14
13
|
/**
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export declare const alias: {
|
|
2
|
-
className: string;
|
|
3
2
|
id: string;
|
|
3
|
+
className: string;
|
|
4
4
|
style: string;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
minWidth: string;
|
|
6
|
+
maxWidth: string;
|
|
7
|
+
width: string;
|
|
8
|
+
minHeight: string;
|
|
9
|
+
maxHeight: string;
|
|
10
|
+
height: string;
|
|
11
|
+
orientation: string;
|
|
7
12
|
};
|
|
8
13
|
export declare const props: string[];
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
export const alias = {
|
|
2
|
-
className: 'class',
|
|
3
2
|
id: 'id',
|
|
3
|
+
className: 'class',
|
|
4
4
|
style: 'style',
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
minWidth: 'min-width',
|
|
6
|
+
maxWidth: 'max-width',
|
|
7
|
+
width: 'width',
|
|
8
|
+
minHeight: 'min-height',
|
|
9
|
+
maxHeight: 'max-height',
|
|
10
|
+
height: 'height',
|
|
11
|
+
orientation: 'orientation',
|
|
7
12
|
};
|
|
8
13
|
export const props = Object.values(alias);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
/**
|
|
4
4
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/view-container/movable-area
|
|
5
5
|
* 基础库 2.25.0 开始支持本组件。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps, GenericEvent } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps, GenericEvent } from '../../types/component';
|
|
3
3
|
/***
|
|
4
4
|
* https://developer.open-douyin.com/docs/resource/zh-CN/mini-app/develop/component/view-container/movable-view
|
|
5
5
|
* 基础库 2.25.0 开始支持本组件。
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
type Mode = 'selector' | 'multiSelector' | 'time' | 'date' | 'region';
|
|
4
4
|
interface PickerPropsMap extends BaseProps {
|
|
5
5
|
selector: SelectorProps;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
export declare const PickerViewColumn: React.ComponentType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ProgressProps extends BaseProps {
|
|
4
4
|
percent?: number;
|
|
5
5
|
strokeWidth?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface RadioGroupProps extends BaseProps {
|
|
4
4
|
name?: string;
|
|
5
5
|
onChange?: (e: any) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface RtcRoomProps extends BaseProps {
|
|
4
4
|
userId: string;
|
|
5
5
|
mode?: 'camera' | 'video' | 'screen';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface ScrollViewProps extends BaseProps {
|
|
4
4
|
scrollX?: boolean;
|
|
5
5
|
scrollY?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface SwiperProps extends BaseProps {
|
|
4
4
|
indicatorDots?: boolean;
|
|
5
5
|
indicatorColor?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface TextProps extends BaseProps {
|
|
4
4
|
selectable?: boolean;
|
|
5
5
|
space?: string | boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { BaseProps } from '../../types/component';
|
|
1
|
+
import type React from 'react';
|
|
2
|
+
import type { BaseProps } from '../../types/component';
|
|
3
3
|
export interface WebViewProps extends BaseProps {
|
|
4
4
|
src?: string;
|
|
5
5
|
onMessage?: (e: any) => void;
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
+
import * as ad from './Ad/node';
|
|
1
2
|
import * as button from './Button/node';
|
|
3
|
+
import * as camera from './Camera/node';
|
|
2
4
|
import * as canvas from './Canvas/node';
|
|
3
|
-
import * as checkboxGroup from './CheckboxGroup/node';
|
|
4
5
|
import * as checkbox from './Checkbox/node';
|
|
6
|
+
import * as checkboxGroup from './CheckboxGroup/node';
|
|
5
7
|
import * as form from './Form/node';
|
|
6
8
|
import * as icon from './Icon/node';
|
|
7
9
|
import * as image from './Image/node';
|
|
8
10
|
import * as input from './Input/node';
|
|
9
11
|
import * as label from './Label/node';
|
|
12
|
+
import * as livePlayer from './LivePlayer/node';
|
|
13
|
+
import * as livePreview from './LivePreview/node';
|
|
14
|
+
import * as map from './Map/node';
|
|
15
|
+
import * as mask from './Mask/node';
|
|
16
|
+
import * as matchMedia from './MatchMedia/node';
|
|
17
|
+
import * as movableArea from './MovableArea/node';
|
|
18
|
+
import * as movableView from './MovableView/node';
|
|
10
19
|
import * as navigator from './Navigator/node';
|
|
11
|
-
import * as pickerViewColumn from './PickerViewColumn/node';
|
|
12
|
-
import * as pickerView from './PickerView/node';
|
|
13
20
|
import * as picker from './Picker/node';
|
|
21
|
+
import * as pickerView from './PickerView/node';
|
|
22
|
+
import * as pickerViewColumn from './PickerViewColumn/node';
|
|
14
23
|
import * as progress from './Progress/node';
|
|
15
|
-
import * as radioGroup from './RadioGroup/node';
|
|
16
24
|
import * as radio from './Radio/node';
|
|
25
|
+
import * as radioGroup from './RadioGroup/node';
|
|
17
26
|
import * as richText from './RichText/node';
|
|
27
|
+
import * as rtcRoom from './RtcRoom/node';
|
|
18
28
|
import * as scrollView from './ScrollView/node';
|
|
19
29
|
import * as slider from './Slider/node';
|
|
20
|
-
import * as swiperItem from './SwiperItem/node';
|
|
21
30
|
import * as swiper from './Swiper/node';
|
|
31
|
+
import * as swiperItem from './SwiperItem/node';
|
|
22
32
|
import * as switchComponent from './Switch/node';
|
|
23
33
|
import * as text from './Text/node';
|
|
24
34
|
import * as textarea from './Textarea/node';
|
|
25
35
|
import * as video from './Video/node';
|
|
26
36
|
import * as view from './View/node';
|
|
27
37
|
import * as webView from './WebView/node';
|
|
28
|
-
import * as movableArea from './MovableArea/node';
|
|
29
|
-
import * as movableView from './MovableView/node';
|
|
30
|
-
import * as mask from './Mask/node';
|
|
31
|
-
import * as ad from './Ad/node';
|
|
32
|
-
import * as rtcRoom from './RtcRoom/node';
|
|
33
|
-
import * as matchMedia from './MatchMedia/node';
|
|
34
|
-
import * as livePlayer from './LivePlayer/node';
|
|
35
|
-
import * as livePreview from './LivePreview/node';
|
|
36
|
-
import * as camera from './Camera/node';
|
|
37
|
-
import * as map from './Map/node';
|
|
38
38
|
const hostComponents = new Map();
|
|
39
39
|
hostComponents.set('button', button);
|
|
40
40
|
hostComponents.set('canvas', canvas);
|
package/esm/node/index.js
CHANGED
package/esm/types/component.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { BaseEvent } from '@rsmax/wechat/esm/types/component';
|
|
2
|
+
import type * as React from 'react';
|
|
3
3
|
/**
|
|
4
4
|
* 头条内置共有属性
|
|
5
5
|
* https://microapp.bytedance.com/docs/zh-CN/mini-app/develop/component/introduction/basic-componen
|
package/package.json
CHANGED
|
@@ -1,30 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsmax/toutiao",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.13",
|
|
4
4
|
"description": "Rsmax for Toutiao",
|
|
5
|
+
"repository": "git+https://github.com/remaxjs/remax.git",
|
|
6
|
+
"license": "MIT",
|
|
5
7
|
"main": "./cjs/index.js",
|
|
6
|
-
"esnext": "./esm/index.js",
|
|
7
8
|
"module": "./esm/index.js",
|
|
8
9
|
"typings": "./esm/index.d.ts",
|
|
9
10
|
"scripts": {
|
|
10
|
-
"clean": "rimraf cjs esm tsconfig.tsbuildinfo",
|
|
11
11
|
"prebuild": "npm run clean",
|
|
12
12
|
"build": "tsc",
|
|
13
13
|
"build:cjs": "tsc --module CommonJS --outDir cjs",
|
|
14
|
+
"clean": "rimraf cjs esm tsconfig.tsbuildinfo",
|
|
14
15
|
"test": "vitest run"
|
|
15
16
|
},
|
|
16
|
-
"repository": "git+https://github.com/remaxjs/remax.git",
|
|
17
|
-
"license": "MIT",
|
|
18
17
|
"dependencies": {
|
|
19
|
-
"@rsmax/shared": "1.3.
|
|
18
|
+
"@rsmax/shared": "1.3.13",
|
|
20
19
|
"lodash": "^4.17.21"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"@douyin-microapp/typings": "^1.3.1",
|
|
24
|
-
"@rsmax/framework-shared": "1.3.
|
|
25
|
-
"@rsmax/runtime": "1.3.
|
|
26
|
-
"@rsmax/types": "1.3.
|
|
27
|
-
"@rsmax/wechat": "1.3.
|
|
23
|
+
"@rsmax/framework-shared": "1.3.13",
|
|
24
|
+
"@rsmax/runtime": "1.3.13",
|
|
25
|
+
"@rsmax/types": "1.3.13",
|
|
26
|
+
"@rsmax/wechat": "1.3.13",
|
|
28
27
|
"@types/react": "^18.3.0",
|
|
29
28
|
"@types/react-test-renderer": "^18.3.0",
|
|
30
29
|
"react": "^18.3.0",
|
|
@@ -33,5 +32,6 @@
|
|
|
33
32
|
"publishConfig": {
|
|
34
33
|
"access": "public"
|
|
35
34
|
},
|
|
36
|
-
"
|
|
35
|
+
"esnext": "./esm/index.js",
|
|
36
|
+
"gitHead": "ff3656307036567c5b9d9b62dcaa599f539d56b7"
|
|
37
37
|
}
|