1 | import { JSX, JSXElement } from 'solid-js'
|
2 | import { TaroElement } from '@tarojs/runtime'
|
3 | import { AdProps } from '@tarojs/components/types/Ad'
|
4 | import { AdCustomProps } from '@tarojs/components/types/AdCustom'
|
5 | import { AudioProps } from '@tarojs/components/types/Audio'
|
6 | import { ButtonProps } from '@tarojs/components/types/Button'
|
7 | import { CameraProps } from '@tarojs/components/types/Camera'
|
8 | import { CanvasProps } from '@tarojs/components/types/Canvas'
|
9 | import { ChannelLiveProps } from '@tarojs/components/types/ChannelLive'
|
10 | import { ChannelVideoProps } from '@tarojs/components/types/ChannelVideo'
|
11 | import { CheckboxProps } from '@tarojs/components/types/Checkbox'
|
12 | import { CheckboxGroupProps } from '@tarojs/components/types/CheckboxGroup'
|
13 | import { StandardProps } from '@tarojs/components/types/common'
|
14 | import { CoverImageProps } from '@tarojs/components/types/CoverImage'
|
15 | import { CoverViewProps } from '@tarojs/components/types/CoverView'
|
16 | import { CustomWrapperProps } from '@tarojs/components/types/CustomWrapper'
|
17 | import { EditorProps } from '@tarojs/components/types/Editor'
|
18 | import { FormProps } from '@tarojs/components/types/Form'
|
19 | import { FunctionalPageNavigatorProps } from '@tarojs/components/types/FunctionalPageNavigator'
|
20 | import { GridViewProps } from '@tarojs/components/types/GridView'
|
21 | import { IconProps } from '@tarojs/components/types/Icon'
|
22 | import { ImageProps } from '@tarojs/components/types/Image'
|
23 | import { InputProps } from '@tarojs/components/types/Input'
|
24 | import { KeyboardAccessoryProps } from '@tarojs/components/types/KeyboardAccessory'
|
25 | import { LabelProps } from '@tarojs/components/types/Label'
|
26 | import { ListViewProps } from '@tarojs/components/types/ListView'
|
27 | import { LivePlayerProps } from '@tarojs/components/types/LivePlayer'
|
28 | import { LivePusherProps } from '@tarojs/components/types/LivePusher'
|
29 | import { MapProps } from '@tarojs/components/types/Map'
|
30 | import { MatchMediaProps } from '@tarojs/components/types/MatchMedia'
|
31 | import { MovableAreaProps } from '@tarojs/components/types/MovableArea'
|
32 | import { MovableViewProps } from '@tarojs/components/types/MovableView'
|
33 | import { NativeSlotProps } from '@tarojs/components/types/NativeSlot'
|
34 | import { NavigationBarProps } from '@tarojs/components/types/NavigationBar'
|
35 | import { NavigatorProps } from '@tarojs/components/types/Navigator'
|
36 | import { OfficialAccountProps } from '@tarojs/components/types/OfficialAccount'
|
37 | import { OpenDataProps } from '@tarojs/components/types/OpenData'
|
38 | import { PageContainerProps } from '@tarojs/components/types/PageContainer'
|
39 | import { PageMetaProps } from '@tarojs/components/types/PageMeta'
|
40 | import {
|
41 | PickerDateProps, PickerMultiSelectorProps,
|
42 | PickerRegionProps, PickerSelectorProps, PickerTimeProps
|
43 | } from '@tarojs/components/types/Picker'
|
44 | import { PickerViewProps } from '@tarojs/components/types/PickerView'
|
45 | import { PickerViewColumnProps } from '@tarojs/components/types/PickerViewColumn'
|
46 | import { ProgressProps } from '@tarojs/components/types/Progress'
|
47 | import { RadioProps } from '@tarojs/components/types/Radio'
|
48 | import { RadioGroupProps } from '@tarojs/components/types/RadioGroup'
|
49 | import { RichTextProps } from '@tarojs/components/types/RichText'
|
50 | import { RootPortalProps } from '@tarojs/components/types/RootPortal'
|
51 | import { ScrollViewProps } from '@tarojs/components/types/ScrollView'
|
52 | import { ShareElementProps } from '@tarojs/components/types/ShareElement'
|
53 | import { SliderProps } from '@tarojs/components/types/Slider'
|
54 | import { SlotProps } from '@tarojs/components/types/Slot'
|
55 | import { SnapshotProps } from '@tarojs/components/types/SnapShot'
|
56 | import { StickyHeaderProps } from '@tarojs/components/types/StickyHeader'
|
57 | import { StickySectionProps } from '@tarojs/components/types/StickySection'
|
58 | import { SwiperProps } from '@tarojs/components/types/Swiper'
|
59 | import { SwiperItemProps } from '@tarojs/components/types/SwiperItem'
|
60 | import { SwitchProps } from '@tarojs/components/types/Switch'
|
61 | import { TextProps } from '@tarojs/components/types/Text'
|
62 | import { TextareaProps } from '@tarojs/components/types/Textarea'
|
63 | import { VideoProps } from '@tarojs/components/types/Video'
|
64 | import { ViewProps } from '@tarojs/components/types/View'
|
65 | import { VoipRoomProps } from '@tarojs/components/types/VoipRoom'
|
66 | import { WebViewProps } from '@tarojs/components/types/WebView'
|
67 |
|
68 |
|
69 | interface SlimProps {
|
70 | children?: JSXElement
|
71 | class?: string
|
72 | style?: string | JSX.CSSProperties | undefined
|
73 | innerHTML?: string
|
74 | }
|
75 |
|
76 | type DistributiveOmit<T, K extends keyof T> = T extends unknown ? Omit<T, K> : never
|
77 |
|
78 | export type RemoveReactAttribute = 'children' | 'className' | 'style' | 'key' | 'ref' | 'dangerouslySetInnerHTML'
|
79 |
|
80 | export type TransformReact2SolidType<P extends StandardProps = Record<string, never>> = DistributiveOmit<P, RemoveReactAttribute> & SlimProps & JSX.DirectiveAttributes & JSX.CustomAttributes<TaroElement>
|
81 |
|
82 | type Components<T> = (props: TransformReact2SolidType<T>) => JSXElement;
|
83 |
|
84 |
|
85 |
|
86 | export declare const Block: Components<StandardProps>
|
87 | export declare const CoverImage: Components<CoverImageProps>
|
88 | export declare const CoverView: Components<CoverViewProps>
|
89 | export declare const GridView: Components<GridViewProps>
|
90 | export declare const ListView: Components<ListViewProps>
|
91 | export declare const MatchMedia: Components<MatchMediaProps>
|
92 | export declare const MovableArea: Components<MovableAreaProps>
|
93 | export declare const MovableView: Components<MovableViewProps>
|
94 | export declare const PageContainer: Components<PageContainerProps>
|
95 | export declare const RootPortal: Components<RootPortalProps>
|
96 | export declare const ScrollView: Components<ScrollViewProps>
|
97 | export declare const ShareElement: Components<ShareElementProps>
|
98 | export declare const StickyHeader: Components<StickyHeaderProps>
|
99 | export declare const StickySection: Components<StickySectionProps>
|
100 | export declare const Swiper: Components<SwiperProps>
|
101 | export declare const SwiperItem: Components<SwiperItemProps>
|
102 | export declare const View: Components<ViewProps>
|
103 |
|
104 | export declare const Icon: Components<IconProps>
|
105 | export declare const Progress: Components<ProgressProps>
|
106 | export declare const RichText: Components<RichTextProps>
|
107 | export declare const Text: Components<TextProps>
|
108 |
|
109 | export declare const Button: Components<ButtonProps>
|
110 | export declare const Checkbox: Components<CheckboxProps>
|
111 | export declare const CheckboxGroup: Components<CheckboxGroupProps>
|
112 | export declare const Editor: Components<EditorProps>
|
113 | export declare const Form: Components<FormProps>
|
114 | export declare const Input: Components<InputProps>
|
115 | export declare const KeyboardAccessory: Components<KeyboardAccessoryProps>
|
116 | export declare const Label: Components<LabelProps>
|
117 | export declare const Picker: Components<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
118 | export declare const PickerView: Components<PickerViewProps>
|
119 | export declare const PickerViewColumn: Components<PickerViewColumnProps>
|
120 | export declare const Radio: Components<RadioProps>
|
121 | export declare const RadioGroup: Components<RadioGroupProps>
|
122 | export declare const Slider: Components<SliderProps>
|
123 | export declare const Switch: Components<SwitchProps>
|
124 | export declare const Textarea: Components<TextareaProps>
|
125 |
|
126 | export declare const FunctionalPageNavigator: Components<FunctionalPageNavigatorProps>
|
127 | export declare const Navigator: Components<NavigatorProps>
|
128 | export declare const NavigationBar: Components<NavigationBarProps>
|
129 |
|
130 | export declare const Audio: Components<AudioProps>
|
131 | export declare const Camera: Components<CameraProps>
|
132 | export declare const ChannelLive: Components<ChannelLiveProps>
|
133 | export declare const ChannelVideo: Components<ChannelVideoProps>
|
134 | export declare const Image: Components<ImageProps>
|
135 | export declare const LivePlayer: Components<LivePlayerProps>
|
136 | export declare const LivePusher: Components<LivePusherProps>
|
137 | export declare const Video: Components<VideoProps>
|
138 | export declare const VoipRoom: Components<VoipRoomProps>
|
139 |
|
140 | export declare const Map: Components<MapProps>
|
141 |
|
142 | export declare const Canvas: Components<CanvasProps>
|
143 |
|
144 | export declare const Ad: Components<AdProps>
|
145 | export declare const AdCustom: Components<AdCustomProps>
|
146 | export declare const OfficialAccount: Components<OfficialAccountProps>
|
147 | export declare const OpenData: Components<OpenDataProps>
|
148 | export declare const WebView: Components<WebViewProps>
|
149 |
|
150 | export declare const PageMeta: Components<PageMetaProps>
|
151 |
|
152 | export declare const CustomWrapper: Components<CustomWrapperProps>
|
153 | export declare const Slot: Components<SlotProps>
|
154 | export declare const NativeSlot: Components<NativeSlotProps>
|
155 |
|
156 | declare global {
|
157 | namespace JSX {
|
158 | interface IntrinsicElements {
|
159 |
|
160 | block: TransformReact2SolidType<StandardProps>
|
161 | 'taro-block-core': TransformReact2SolidType<StandardProps>
|
162 | 'cover-image': TransformReact2SolidType<CoverImageProps>
|
163 | 'taro-cover-image-core': TransformReact2SolidType<CoverImageProps>
|
164 | 'cover-view': TransformReact2SolidType<CoverViewProps>
|
165 | 'taro-cover-view-core': TransformReact2SolidType<CoverViewProps>
|
166 | 'match-media': TransformReact2SolidType<MatchMediaProps>
|
167 | 'taro-match-media-core': TransformReact2SolidType<MatchMediaProps>
|
168 | 'movable-area': TransformReact2SolidType<MovableAreaProps>
|
169 | 'taro-movable-area-core': TransformReact2SolidType<MovableAreaProps>
|
170 | 'movable-view': TransformReact2SolidType<MovableViewProps>
|
171 | 'taro-movable-view-core': TransformReact2SolidType<MovableViewProps>
|
172 | 'page-container': TransformReact2SolidType<PageContainerProps>
|
173 | 'taro-page-container-core': TransformReact2SolidType<PageContainerProps>
|
174 | 'root-portal': TransformReact2SolidType<RootPortalProps>
|
175 | 'taro-root-portal-core': TransformReact2SolidType<RootPortalProps>
|
176 | 'scroll-view': TransformReact2SolidType<ScrollViewProps>
|
177 | 'taro-scroll-view-core': TransformReact2SolidType<ScrollViewProps>
|
178 | swiper: TransformReact2SolidType<SwiperProps>
|
179 | 'taro-swiper-core': TransformReact2SolidType<SwiperProps>
|
180 | 'swiper-item': TransformReact2SolidType<SwiperItemProps>
|
181 | 'taro-swiper-item-core': TransformReact2SolidType<SwiperItemProps>
|
182 | view: TransformReact2SolidType<ViewProps>
|
183 | 'taro-view-core': TransformReact2SolidType<ViewProps>
|
184 |
|
185 | icon: TransformReact2SolidType<IconProps>
|
186 | 'taro-icon-core': TransformReact2SolidType<IconProps>
|
187 | progress: TransformReact2SolidType<ProgressProps>
|
188 | 'taro-progress-core': TransformReact2SolidType<ProgressProps>
|
189 | 'rich-text': TransformReact2SolidType<RichTextProps>
|
190 | 'taro-rich-text-core': TransformReact2SolidType<RichTextProps>
|
191 | text: TransformReact2SolidType<TextProps>
|
192 | 'taro-text-core': TransformReact2SolidType<TextProps>
|
193 |
|
194 | button: TransformReact2SolidType<ButtonProps>
|
195 | 'taro-button-core': TransformReact2SolidType<ButtonProps>
|
196 | checkbox: TransformReact2SolidType<CheckboxProps>
|
197 | 'taro-checkbox-core': TransformReact2SolidType<CheckboxProps>
|
198 | 'checkbox-group': TransformReact2SolidType<CheckboxGroupProps>
|
199 | 'taro-checkbox-group-core': TransformReact2SolidType<CheckboxGroupProps>
|
200 | editor: TransformReact2SolidType<EditorProps>
|
201 | 'taro-editor-core': TransformReact2SolidType<EditorProps>
|
202 | form: TransformReact2SolidType<FormProps>
|
203 | 'taro-form-core': TransformReact2SolidType<FormProps>
|
204 | input: TransformReact2SolidType<InputProps>
|
205 | 'taro-input-core': TransformReact2SolidType<InputProps>
|
206 | 'keyboard-accessory': TransformReact2SolidType<KeyboardAccessoryProps>
|
207 | 'taro-keyboard-accessory-core': TransformReact2SolidType<KeyboardAccessoryProps>
|
208 | label: TransformReact2SolidType<LabelProps>
|
209 | 'taro-label-core': TransformReact2SolidType<LabelProps>
|
210 | picker: TransformReact2SolidType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
211 | 'taro-picker-core': TransformReact2SolidType<PickerMultiSelectorProps | PickerTimeProps | PickerDateProps | PickerRegionProps | PickerSelectorProps>
|
212 | 'picker-view': TransformReact2SolidType<PickerViewProps>
|
213 | 'taro-picker-view-core': TransformReact2SolidType<PickerViewProps>
|
214 | 'picker-view-column': TransformReact2SolidType<PickerViewColumnProps>
|
215 | 'taro-picker-view-column-core': TransformReact2SolidType<PickerViewColumnProps>
|
216 | radio: TransformReact2SolidType<RadioProps>
|
217 | 'taro-radio-core': TransformReact2SolidType<RadioProps>
|
218 | 'radio-group': TransformReact2SolidType<RadioGroupProps>
|
219 | 'taro-radio-group-core': TransformReact2SolidType<RadioGroupProps>
|
220 | slider: TransformReact2SolidType<SliderProps>
|
221 | 'taro-slider-core': TransformReact2SolidType<SliderProps>
|
222 | switch: TransformReact2SolidType<SwitchProps>
|
223 | 'taro-switch-core': TransformReact2SolidType<SwitchProps>
|
224 | textarea: TransformReact2SolidType<TextareaProps>
|
225 | 'taro-textarea-core': TransformReact2SolidType<TextareaProps>
|
226 |
|
227 | 'grid-view': TransformReact2SolidType<GridViewProps>
|
228 | 'taro-grid-view-core': TransformReact2SolidType<GridViewProps>
|
229 | 'list-view': TransformReact2SolidType<ListViewProps>
|
230 | 'taro-list-view-core': TransformReact2SolidType<ListViewProps>
|
231 | 'share-element': TransformReact2SolidType<ShareElementProps>
|
232 | 'taro-share-element-core': TransformReact2SolidType<ShareElementProps>
|
233 | 'snapshot': TransformReact2SolidType<SnapshotProps>
|
234 | 'taro-snapshot-core': TransformReact2SolidType<SnapshotProps>
|
235 | 'sticky-header': TransformReact2SolidType<StickyHeaderProps>
|
236 | 'taro-sticky-header-core': TransformReact2SolidType<StickyHeaderProps>
|
237 | 'sticky-section': TransformReact2SolidType<StickySectionProps>
|
238 | 'taro-sticky-section-core': TransformReact2SolidType<StickySectionProps>
|
239 |
|
240 | 'functional-page-navigator': TransformReact2SolidType<FunctionalPageNavigatorProps>
|
241 | 'taro-functional-page-navigator-core': TransformReact2SolidType<FunctionalPageNavigatorProps>
|
242 | navigator: TransformReact2SolidType<NavigatorProps>
|
243 | 'taro-navigator-core': TransformReact2SolidType<NavigatorProps>
|
244 | 'navigation-bar': TransformReact2SolidType<NavigationBarProps>
|
245 | 'taro-navigation-bar-core': TransformReact2SolidType<NavigationBarProps>
|
246 |
|
247 | audio: TransformReact2SolidType<AudioProps>
|
248 | 'taro-audio-core': TransformReact2SolidType<AudioProps>
|
249 | camera: TransformReact2SolidType<CameraProps>
|
250 | 'taro-camera-core': TransformReact2SolidType<CameraProps>
|
251 | 'channel-live': TransformReact2SolidType<ChannelLiveProps>
|
252 | 'taro-channel-live-core': TransformReact2SolidType<ChannelLiveProps>
|
253 | 'channel-video': TransformReact2SolidType<ChannelVideoProps>
|
254 | 'taro-channel-video-core': TransformReact2SolidType<ChannelVideoProps>
|
255 | image: TransformReact2SolidType<ImageProps>
|
256 | 'taro-image-core': TransformReact2SolidType<ImageProps>
|
257 | 'live-player': TransformReact2SolidType<LivePlayerProps>
|
258 | 'taro-live-player-core': TransformReact2SolidType<LivePlayerProps>
|
259 | 'live-pusher': TransformReact2SolidType<LivePusherProps>
|
260 | 'taro-live-pusher-core': TransformReact2SolidType<LivePusherProps>
|
261 | video: TransformReact2SolidType<VideoProps>
|
262 | 'taro-video-core': TransformReact2SolidType<VideoProps>
|
263 | 'voip-room': TransformReact2SolidType<VoipRoomProps>
|
264 | 'taro-voip-room-core': TransformReact2SolidType<VoipRoomProps>
|
265 |
|
266 | map: TransformReact2SolidType<MapProps>
|
267 | 'taro-map-core': TransformReact2SolidType<MapProps>
|
268 |
|
269 | canvas: TransformReact2SolidType<CanvasProps>
|
270 | 'taro-canvas-core': TransformReact2SolidType<CanvasProps>
|
271 |
|
272 | ad: TransformReact2SolidType<AdProps>
|
273 | 'taro-ad-core': TransformReact2SolidType<AdProps>
|
274 | 'ad-custom': TransformReact2SolidType<AdCustomProps>
|
275 | 'taro-ad-custom-core': TransformReact2SolidType<AdCustomProps>
|
276 | 'official-account': TransformReact2SolidType<OfficialAccountProps>
|
277 | 'taro-official-account-core': TransformReact2SolidType<OfficialAccountProps>
|
278 | 'open-data': TransformReact2SolidType<OpenDataProps>
|
279 | 'taro-open-data-core': TransformReact2SolidType<OpenDataProps>
|
280 | 'web-view': TransformReact2SolidType<WebViewProps>
|
281 | 'taro-web-view-core': TransformReact2SolidType<WebViewProps>
|
282 |
|
283 | 'page-meta': TransformReact2SolidType<PageMetaProps>
|
284 | 'taro-page-meta-core': TransformReact2SolidType<PageMetaProps>
|
285 |
|
286 | 'custom-wrapper': TransformReact2SolidType<CustomWrapperProps>
|
287 | 'taro-custom-wrapper-core': TransformReact2SolidType<CustomWrapperProps>
|
288 |
|
289 | 'slot': TransformReact2SolidType<SlotProps> & Record<string, any>
|
290 | 'taro-slot-core': TransformReact2SolidType<SlotProps>
|
291 | 'native-slot': TransformReact2SolidType<NativeSlotProps>
|
292 | 'taro-native-slot-core': TransformReact2SolidType<NativeSlotProps>
|
293 | }
|
294 | }
|
295 | }
|
296 |
|
297 |
|